Thomas Vachuska
Committed by Gerrit Code Review

ONOS-2486 Adding swagger-based REST API documentation.

Change-Id: I237d973d73549ad30ddc638c1c201f024d344c70
Showing 52 changed files with 5393 additions and 272 deletions
...@@ -39,7 +39,13 @@ ...@@ -39,7 +39,13 @@
39 <onos.version>1.3.0-SNAPSHOT</onos.version> 39 <onos.version>1.3.0-SNAPSHOT</onos.version>
40 <onos.app.name>org.onosproject.acl</onos.app.name> 40 <onos.app.name>org.onosproject.acl</onos.app.name>
41 <onos.app.origin>DLUT</onos.app.origin> 41 <onos.app.origin>DLUT</onos.app.origin>
42 - <web.context>/onos/v1/acl</web.context> 42 + <web.context>/onos/acl</web.context>
43 + <api.version>1.0.0</api.version>
44 + <api.title>ONOS ACL Application REST API</api.title>
45 + <api.description>
46 + APIs for interacting with the ACL application.
47 + </api.description>
48 + <api.package>org.onos.acl.impl</api.package>
43 </properties> 49 </properties>
44 50
45 <dependencies> 51 <dependencies>
...@@ -108,6 +114,10 @@ ...@@ -108,6 +114,10 @@
108 <configuration> 114 <configuration>
109 <instructions> 115 <instructions>
110 <_wab>src/main/webapp/</_wab> 116 <_wab>src/main/webapp/</_wab>
117 + <Include-Resource>
118 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
119 + {maven-resources}
120 + </Include-Resource>
111 <Bundle-SymbolicName> 121 <Bundle-SymbolicName>
112 ${project.groupId}.${project.artifactId} 122 ${project.groupId}.${project.artifactId}
113 </Bundle-SymbolicName> 123 </Bundle-SymbolicName>
......
...@@ -40,8 +40,9 @@ import java.io.IOException; ...@@ -40,8 +40,9 @@ import java.io.IOException;
40 import java.io.InputStream; 40 import java.io.InputStream;
41 import java.util.List; 41 import java.util.List;
42 42
43 +// FIXME: This does now follow REST-full principles and should be refactored.
43 /** 44 /**
44 - * REST resource for interacting with ACL application. 45 + * Manage ACL rules.
45 */ 46 */
46 @Path("") 47 @Path("")
47 public class AclWebResource extends AbstractWebResource { 48 public class AclWebResource extends AbstractWebResource {
......
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
33 <properties> 33 <properties>
34 <onos.app.name>org.onosproject.cordfabric</onos.app.name> 34 <onos.app.name>org.onosproject.cordfabric</onos.app.name>
35 <web.context>/onos/cordfabric</web.context> 35 <web.context>/onos/cordfabric</web.context>
36 + <api.version>1.0.0</api.version>
37 + <api.title>ONOS CORD Fabric REST API</api.title>
38 + <api.description>
39 + APIs for interacting with the CORD Fabric application.
40 + </api.description>
41 + <api.package>org.onosproject.cordfabric</api.package>
36 </properties> 42 </properties>
37 43
38 <dependencies> 44 <dependencies>
...@@ -94,6 +100,10 @@ ...@@ -94,6 +100,10 @@
94 <configuration> 100 <configuration>
95 <instructions> 101 <instructions>
96 <_wab>src/main/webapp/</_wab> 102 <_wab>src/main/webapp/</_wab>
103 + <Include-Resource>
104 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
105 + {maven-resources}
106 + </Include-Resource>
97 <Bundle-SymbolicName> 107 <Bundle-SymbolicName>
98 ${project.groupId}.${project.artifactId} 108 ${project.groupId}.${project.artifactId}
99 </Bundle-SymbolicName> 109 </Bundle-SymbolicName>
......
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
33 <properties> 33 <properties>
34 <onos.app.name>org.onosproject.segmentrouting</onos.app.name> 34 <onos.app.name>org.onosproject.segmentrouting</onos.app.name>
35 <web.context>/onos/segmentrouting</web.context> 35 <web.context>/onos/segmentrouting</web.context>
36 + <api.version>1.0.0</api.version>
37 + <api.title>ONOS Segment Routing REST API</api.title>
38 + <api.description>
39 + APIs for interacting with the Segment Routing application.
40 + </api.description>
41 + <api.package>org.onosproject.segmentrouting.web</api.package>
36 </properties> 42 </properties>
37 43
38 <dependencies> 44 <dependencies>
...@@ -94,6 +100,10 @@ ...@@ -94,6 +100,10 @@
94 <configuration> 100 <configuration>
95 <instructions> 101 <instructions>
96 <_wab>src/main/webapp/</_wab> 102 <_wab>src/main/webapp/</_wab>
103 + <Include-Resource>
104 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
105 + {maven-resources}
106 + </Include-Resource>
97 <Bundle-SymbolicName> 107 <Bundle-SymbolicName>
98 ${project.groupId}.${project.artifactId} 108 ${project.groupId}.${project.artifactId}
99 </Bundle-SymbolicName> 109 </Bundle-SymbolicName>
......
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.rest;
17 +
18 +import org.apache.felix.scr.annotations.Activate;
19 +import org.apache.felix.scr.annotations.Component;
20 +import org.apache.felix.scr.annotations.Deactivate;
21 +import org.apache.felix.scr.annotations.Reference;
22 +import org.apache.felix.scr.annotations.ReferenceCardinality;
23 +
24 +/**
25 + * Self-registering REST API provider.
26 + */
27 +@Component(immediate = true, componentAbstract = true)
28 +public abstract class AbstractApiDocRegistrator {
29 +
30 + protected final ApiDocProvider provider;
31 +
32 + @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
33 + protected ApiDocService service;
34 +
35 + /**
36 + * Creates registrator for the specified REST API doc provider.
37 + *
38 + * @param provider REST API provider
39 + */
40 + protected AbstractApiDocRegistrator(ApiDocProvider provider) {
41 + this.provider = provider;
42 + }
43 +
44 + @Activate
45 + protected void activate() {
46 + service.register(provider);
47 + }
48 +
49 + @Deactivate
50 + protected void deactivate() {
51 + service.unregister(provider);
52 + }
53 +}
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.ui.impl; 16 +package org.onosproject.rest;
17 -
18 -import org.onlab.rest.BaseResource;
19 17
20 import java.io.ByteArrayInputStream; 18 import java.io.ByteArrayInputStream;
21 import java.io.InputStream; 19 import java.io.InputStream;
...@@ -28,7 +26,7 @@ import static com.google.common.base.Preconditions.checkArgument; ...@@ -28,7 +26,7 @@ import static com.google.common.base.Preconditions.checkArgument;
28 /** 26 /**
29 * Resource for serving semi-static resources. 27 * Resource for serving semi-static resources.
30 */ 28 */
31 -public class AbstractInjectionResource extends BaseResource { 29 +public class AbstractInjectionResource extends AbstractWebResource {
32 30
33 /** 31 /**
34 * Returns the index into the supplied string where the end of the 32 * Returns the index into the supplied string where the end of the
...@@ -63,7 +61,7 @@ public class AbstractInjectionResource extends BaseResource { ...@@ -63,7 +61,7 @@ public class AbstractInjectionResource extends BaseResource {
63 protected class StreamEnumeration implements Enumeration<InputStream> { 61 protected class StreamEnumeration implements Enumeration<InputStream> {
64 private final Iterator<InputStream> iterator; 62 private final Iterator<InputStream> iterator;
65 63
66 - StreamEnumeration(List<InputStream> streams) { 64 + public StreamEnumeration(List<InputStream> streams) {
67 this.iterator = streams.iterator(); 65 this.iterator = streams.iterator();
68 } 66 }
69 67
......
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.rest;
17 +
18 +import com.google.common.annotations.Beta;
19 +import org.slf4j.Logger;
20 +import org.slf4j.LoggerFactory;
21 +
22 +import java.io.InputStream;
23 +
24 +import static com.google.common.base.Preconditions.checkNotNull;
25 +
26 +/**
27 + * Entity capable of providing REST API documentation resources.
28 + */
29 +@Beta
30 +public class ApiDocProvider {
31 +
32 + private final Logger log = LoggerFactory.getLogger(getClass());
33 +
34 + private static final String DOCS = "/apidoc/swagger.json";
35 + private static final String MODEL = "/apidoc/model.json";
36 +
37 + private final String key;
38 + private final String name;
39 + private final ClassLoader classLoader;
40 +
41 + /**
42 + * Creates a new REST API documentation provider.
43 + *
44 + * @param key REST API key
45 + * @param name REST API name
46 + * @param classLoader class loader
47 + */
48 + public ApiDocProvider(String key, String name, ClassLoader classLoader) {
49 + this.key = checkNotNull(key, "Key cannot be null");
50 + this.name = checkNotNull(name, "Name cannot be null");
51 + this.classLoader = checkNotNull(classLoader, "Class loader cannot be null");
52 + }
53 +
54 + /**
55 + * Returns the REST API key.
56 + *
57 + * @return REST API key
58 + */
59 + public String key() {
60 + return key;
61 + }
62 +
63 + /**
64 + * Returns the REST API name.
65 + *
66 + * @return REST API name
67 + */
68 + public String name() {
69 + return name;
70 + }
71 +
72 + /**
73 + * Returns input stream containing Swagger UI compatible JSON.
74 + *
75 + * @return input stream with Swagger JSON data
76 + */
77 + public InputStream docs() {
78 + return get(DOCS);
79 + }
80 +
81 + /**
82 + * Returns input stream containing JSON model schema.
83 + *
84 + * @return input stream with JSON model schema
85 + */
86 + public InputStream model() {
87 + return get(MODEL);
88 + }
89 +
90 + private InputStream get(String resource) {
91 + InputStream stream = classLoader.getResourceAsStream(resource);
92 + if (stream == null) {
93 + log.warn("Unable to find JSON resource {}", resource);
94 + }
95 + return stream;
96 + }
97 +
98 +}
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.rest;
17 +
18 +import com.google.common.annotations.Beta;
19 +
20 +import java.util.Set;
21 +
22 +/**
23 + * Service for registering REST API documentation resources.
24 + */
25 +@Beta
26 +public interface ApiDocService {
27 +
28 + /**
29 + * Registers the specified REST API documentation provider.
30 + *
31 + * @param provider REST API documentation provider
32 + */
33 + void register(ApiDocProvider provider);
34 +
35 + /**
36 + * Unregisters the specified REST API documentation provider.
37 + *
38 + * @param provider REST API documentation provider
39 + */
40 + void unregister(ApiDocProvider provider);
41 +
42 + /**
43 + * Returns the set of all registered REST API documentation providers.
44 + *
45 + * @return set of registered documentation providers
46 + */
47 + Set<ApiDocProvider> getDocProviders();
48 +
49 + /**
50 + * Returns the specified REST API documentation provider with the specified
51 + * key.
52 + *
53 + * @param key REST API key
54 + * @return documentation provider
55 + */
56 + ApiDocProvider getDocProvider(String key);
57 +
58 +}
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
30 <relativePath>tools/build/pom.xml</relativePath> 30 <relativePath>tools/build/pom.xml</relativePath>
31 </parent> 31 </parent>
32 32
33 - <groupId>org.onosproject</groupId>
34 <artifactId>onos</artifactId> 33 <artifactId>onos</artifactId>
35 <packaging>pom</packaging> 34 <packaging>pom</packaging>
36 <version>1.3.0-SNAPSHOT</version> 35 <version>1.3.0-SNAPSHOT</version>
...@@ -43,18 +42,23 @@ ...@@ -43,18 +42,23 @@
43 <module>core</module> 42 <module>core</module>
44 <module>web</module> 43 <module>web</module>
45 <module>cli</module> 44 <module>cli</module>
45 +
46 + <module>openflow</module>
47 + <module>ovsdb</module>
48 + <module>pcep</module>
49 +
46 <module>providers</module> 50 <module>providers</module>
47 <module>drivers</module> 51 <module>drivers</module>
48 - <module>openflow</module> 52 +
49 <module>apps</module> 53 <module>apps</module>
50 <module>incubator</module> 54 <module>incubator</module>
51 <module>features</module> 55 <module>features</module>
52 - <module>pcep</module> 56 +
53 <module>tools/package/archetypes</module> 57 <module>tools/package/archetypes</module>
54 <module>tools/package/branding</module> 58 <module>tools/package/branding</module>
59 +
55 <!-- FIXME remove before release --> 60 <!-- FIXME remove before release -->
56 <module>tools/package/maven-plugin</module> 61 <module>tools/package/maven-plugin</module>
57 - <module>ovsdb</module>
58 </modules> 62 </modules>
59 63
60 <url>http://onosproject.org/</url> 64 <url>http://onosproject.org/</url>
...@@ -515,9 +519,11 @@ ...@@ -515,9 +519,11 @@
515 <artifactId>maven-surefire-plugin</artifactId> 519 <artifactId>maven-surefire-plugin</artifactId>
516 <version>2.18.1</version> 520 <version>2.18.1</version>
517 <configuration> 521 <configuration>
518 - <redirectTestOutputToFile>true</redirectTestOutputToFile> 522 + <redirectTestOutputToFile>true
523 + </redirectTestOutputToFile>
519 <printSummary>true</printSummary> 524 <printSummary>true</printSummary>
520 - <excludedGroups>org.onlab.junit.IntegrationTest</excludedGroups> 525 + <excludedGroups>org.onlab.junit.IntegrationTest
526 + </excludedGroups>
521 <rerunFailingTestsCount>1</rerunFailingTestsCount> 527 <rerunFailingTestsCount>1</rerunFailingTestsCount>
522 </configuration> 528 </configuration>
523 </plugin> 529 </plugin>
...@@ -618,7 +624,7 @@ ...@@ -618,7 +624,7 @@
618 </execution> 624 </execution>
619 <execution> 625 <execution>
620 <id>swagger</id> 626 <id>swagger</id>
621 - <phase>generate-resources</phase> 627 + <phase>generate-sources</phase>
622 <goals> 628 <goals>
623 <goal>swagger</goal> 629 <goal>swagger</goal>
624 </goals> 630 </goals>
......
...@@ -18,6 +18,8 @@ package org.onosproject.maven; ...@@ -18,6 +18,8 @@ package org.onosproject.maven;
18 import com.fasterxml.jackson.databind.ObjectMapper; 18 import com.fasterxml.jackson.databind.ObjectMapper;
19 import com.fasterxml.jackson.databind.node.ArrayNode; 19 import com.fasterxml.jackson.databind.node.ArrayNode;
20 import com.fasterxml.jackson.databind.node.ObjectNode; 20 import com.fasterxml.jackson.databind.node.ObjectNode;
21 +import com.google.common.io.ByteStreams;
22 +import com.google.common.io.Files;
21 import com.thoughtworks.qdox.JavaProjectBuilder; 23 import com.thoughtworks.qdox.JavaProjectBuilder;
22 import com.thoughtworks.qdox.model.DocletTag; 24 import com.thoughtworks.qdox.model.DocletTag;
23 import com.thoughtworks.qdox.model.JavaAnnotation; 25 import com.thoughtworks.qdox.model.JavaAnnotation;
...@@ -30,6 +32,7 @@ import org.apache.maven.plugin.MojoExecutionException; ...@@ -30,6 +32,7 @@ import org.apache.maven.plugin.MojoExecutionException;
30 import org.apache.maven.plugins.annotations.LifecyclePhase; 32 import org.apache.maven.plugins.annotations.LifecyclePhase;
31 import org.apache.maven.plugins.annotations.Mojo; 33 import org.apache.maven.plugins.annotations.Mojo;
32 import org.apache.maven.plugins.annotations.Parameter; 34 import org.apache.maven.plugins.annotations.Parameter;
35 +import org.apache.maven.project.MavenProject;
33 36
34 import java.io.File; 37 import java.io.File;
35 import java.io.FileWriter; 38 import java.io.FileWriter;
...@@ -39,16 +42,22 @@ import java.util.HashMap; ...@@ -39,16 +42,22 @@ import java.util.HashMap;
39 import java.util.Map; 42 import java.util.Map;
40 import java.util.Optional; 43 import java.util.Optional;
41 44
45 +import static com.google.common.base.Strings.isNullOrEmpty;
46 +
42 /** 47 /**
43 * Produces ONOS Swagger api-doc. 48 * Produces ONOS Swagger api-doc.
44 */ 49 */
45 -@Mojo(name = "swagger", defaultPhase = LifecyclePhase.GENERATE_RESOURCES) 50 +@Mojo(name = "swagger", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
46 public class OnosSwaggerMojo extends AbstractMojo { 51 public class OnosSwaggerMojo extends AbstractMojo {
47 private final ObjectMapper mapper = new ObjectMapper(); 52 private final ObjectMapper mapper = new ObjectMapper();
48 53
54 + private static final String JSON_FILE = "swagger.json";
55 + private static final String GEN_SRC = "generated-sources";
56 + private static final String REG_SRC = "registrator.javat";
57 +
49 private static final String PATH = "javax.ws.rs.Path"; 58 private static final String PATH = "javax.ws.rs.Path";
50 - private static final String PATHPARAM = "javax.ws.rs.PathParam"; 59 + private static final String PATH_PARAM = "javax.ws.rs.PathParam";
51 - private static final String QUERYPARAM = "javax.ws.rs.QueryParam"; 60 + private static final String QUERY_PARAM = "javax.ws.rs.QueryParam";
52 private static final String POST = "javax.ws.rs.POST"; 61 private static final String POST = "javax.ws.rs.POST";
53 private static final String GET = "javax.ws.rs.GET"; 62 private static final String GET = "javax.ws.rs.GET";
54 private static final String PUT = "javax.ws.rs.PUT"; 63 private static final String PUT = "javax.ws.rs.PUT";
...@@ -66,30 +75,74 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -66,30 +75,74 @@ public class OnosSwaggerMojo extends AbstractMojo {
66 /** 75 /**
67 * The directory where the generated catalogue file will be put. 76 * The directory where the generated catalogue file will be put.
68 */ 77 */
69 - @Parameter(defaultValue = "${project.build.outputDirectory}") 78 + @Parameter(defaultValue = "${project.build.directory}")
70 protected File dstDirectory; 79 protected File dstDirectory;
71 80
81 + /**
82 + * REST API web-context
83 + */
84 + @Parameter(defaultValue = "${web.context}")
85 + protected String webContext;
86 +
87 + /**
88 + * REST API version
89 + */
90 + @Parameter(defaultValue = "${api.version}")
91 + protected String apiVersion;
92 +
93 + /**
94 + * REST API description
95 + */
96 + @Parameter(defaultValue = "${api.description}")
97 + protected String apiDescription;
98 +
99 + /**
100 + * REST API title
101 + */
102 + @Parameter(defaultValue = "${api.title}")
103 + protected String apiTitle;
104 +
105 + /**
106 + * REST API title
107 + */
108 + @Parameter(defaultValue = "${api.package}")
109 + protected String apiPackage;
110 +
111 + /**
112 + * Maven project
113 + */
114 + @Parameter(defaultValue = "${project}")
115 + protected MavenProject project;
116 +
117 +
72 @Override 118 @Override
73 public void execute() throws MojoExecutionException { 119 public void execute() throws MojoExecutionException {
74 - getLog().info("Generating ONOS REST api documentation...");
75 try { 120 try {
76 JavaProjectBuilder builder = new JavaProjectBuilder(); 121 JavaProjectBuilder builder = new JavaProjectBuilder();
77 builder.addSourceTree(new File(srcDirectory, "src/main/java")); 122 builder.addSourceTree(new File(srcDirectory, "src/main/java"));
78 123
79 ObjectNode root = initializeRoot(); 124 ObjectNode root = initializeRoot();
80 -
81 ArrayNode tags = mapper.createArrayNode(); 125 ArrayNode tags = mapper.createArrayNode();
82 - root.set("tags", tags);
83 -
84 ObjectNode paths = mapper.createObjectNode(); 126 ObjectNode paths = mapper.createObjectNode();
127 +
128 + root.set("tags", tags);
85 root.set("paths", paths); 129 root.set("paths", paths);
86 - builder.getClasses().forEach(javaClass -> { 130 +
87 - processClass(javaClass, paths, tags); 131 + builder.getClasses().forEach(jc -> processClass(jc, paths, tags));
88 - //writeCatalog(root); // write out this api json file 132 +
89 - }); 133 + if (paths.size() > 0) {
90 - writeCatalog(root); // write out this api json file 134 + getLog().info("Generating ONOS REST API documentation...");
135 + genCatalog(root);
136 +
137 + if (!isNullOrEmpty(apiPackage)) {
138 + genRegistrator();
139 + }
140 + }
141 +
142 + project.addCompileSourceRoot(new File(dstDirectory, GEN_SRC).getPath());
143 +
91 } catch (Exception e) { 144 } catch (Exception e) {
92 - e.printStackTrace(); 145 + getLog().warn("Unable to generate ONOS REST API documentation", e);
93 throw e; 146 throw e;
94 } 147 }
95 } 148 }
...@@ -100,12 +153,11 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -100,12 +153,11 @@ public class OnosSwaggerMojo extends AbstractMojo {
100 root.put("swagger", "2.0"); 153 root.put("swagger", "2.0");
101 ObjectNode info = mapper.createObjectNode(); 154 ObjectNode info = mapper.createObjectNode();
102 root.set("info", info); 155 root.set("info", info);
103 - info.put("title", "ONOS API");
104 - info.put("description", "Move your networking forward with ONOS");
105 - info.put("version", "1.0.0");
106 156
107 - root.put("host", "http://localhost:8181/onos"); 157 + root.put("basePath", webContext);
108 - root.put("basePath", "/v1"); 158 + info.put("version", apiVersion);
159 + info.put("title", apiTitle);
160 + info.put("description", apiDescription);
109 161
110 ArrayNode produces = mapper.createArrayNode(); 162 ArrayNode produces = mapper.createArrayNode();
111 produces.add("application/json"); 163 produces.add("application/json");
...@@ -121,34 +173,41 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -121,34 +173,41 @@ public class OnosSwaggerMojo extends AbstractMojo {
121 // Checks whether javaClass has a path tag associated with it and if it does 173 // Checks whether javaClass has a path tag associated with it and if it does
122 // processes its methods and creates a tag for the class on the root 174 // processes its methods and creates a tag for the class on the root
123 void processClass(JavaClass javaClass, ObjectNode paths, ArrayNode tags) { 175 void processClass(JavaClass javaClass, ObjectNode paths, ArrayNode tags) {
124 - Optional<JavaAnnotation> optional = 176 + // If the class does not have a Path tag then ignore it
125 - javaClass.getAnnotations().stream().filter(a -> a.getType().getName().equals(PATH)).findAny(); 177 + JavaAnnotation annotation = getPathAnnotation(javaClass);
126 - JavaAnnotation annotation = optional.isPresent() ? optional.get() : null;
127 - // if the class does not have a Path tag then ignore it
128 if (annotation == null) { 178 if (annotation == null) {
129 return; 179 return;
130 } 180 }
131 181
132 - String resourcePath = getPath(annotation), pathName = ""; //returns empty string if something goes wrong 182 + String path = getPath(annotation);
183 + if (path == null) {
184 + return;
185 + }
133 186
134 - // creating tag for this class on the root 187 + String resourcePath = "/" + path;
188 + String tagPath = path.isEmpty() ? "/" : path;
189 +
190 + // Create tag node for this class.
135 ObjectNode tagObject = mapper.createObjectNode(); 191 ObjectNode tagObject = mapper.createObjectNode();
136 - if (resourcePath != null && resourcePath.length() > 1) { 192 + tagObject.put("name", tagPath);
137 - pathName = resourcePath.substring(1);
138 - tagObject.put("name", pathName); //tagObject.put("name", resourcePath.substring(1));
139 - }
140 if (javaClass.getComment() != null) { 193 if (javaClass.getComment() != null) {
141 - tagObject.put("description", javaClass.getComment()); 194 + tagObject.put("description", shortText(javaClass.getComment()));
142 } 195 }
143 tags.add(tagObject); 196 tags.add(tagObject);
144 197
145 - //creating tag to add to all methods from this class 198 + // Create an array node add to all methods from this class.
146 ArrayNode tagArray = mapper.createArrayNode(); 199 ArrayNode tagArray = mapper.createArrayNode();
147 - tagArray.add(pathName); 200 + tagArray.add(tagPath);
148 201
149 processAllMethods(javaClass, resourcePath, paths, tagArray); 202 processAllMethods(javaClass, resourcePath, paths, tagArray);
150 } 203 }
151 204
205 + private JavaAnnotation getPathAnnotation(JavaClass javaClass) {
206 + Optional<JavaAnnotation> optional = javaClass.getAnnotations()
207 + .stream().filter(a -> a.getType().getName().equals(PATH)).findAny();
208 + return optional.isPresent() ? optional.get() : null;
209 + }
210 +
152 // Checks whether a class's methods are REST methods and then places all the 211 // Checks whether a class's methods are REST methods and then places all the
153 // methods under a specific path into the paths node 212 // methods under a specific path into the paths node
154 private void processAllMethods(JavaClass javaClass, String resourcePath, 213 private void processAllMethods(JavaClass javaClass, String resourcePath,
...@@ -176,14 +235,15 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -176,14 +235,15 @@ public class OnosSwaggerMojo extends AbstractMojo {
176 } 235 }
177 236
178 private void processRestMethod(JavaMethod javaMethod, String method, 237 private void processRestMethod(JavaMethod javaMethod, String method,
179 - Map<String, ObjectNode> pathMap, String resourcePath, 238 + Map<String, ObjectNode> pathMap,
180 - ArrayNode tagArray) { 239 + String resourcePath, ArrayNode tagArray) {
181 String fullPath = resourcePath, consumes = "", produces = "", 240 String fullPath = resourcePath, consumes = "", produces = "",
182 comment = javaMethod.getComment(); 241 comment = javaMethod.getComment();
183 for (JavaAnnotation annotation : javaMethod.getAnnotations()) { 242 for (JavaAnnotation annotation : javaMethod.getAnnotations()) {
184 String name = annotation.getType().getName(); 243 String name = annotation.getType().getName();
185 if (name.equals(PATH)) { 244 if (name.equals(PATH)) {
186 - fullPath += getPath(annotation); 245 + fullPath = resourcePath + "/" + getPath(annotation);
246 + fullPath = fullPath.replaceFirst("^//", "/");
187 } 247 }
188 if (name.equals(CONSUMES)) { 248 if (name.equals(CONSUMES)) {
189 consumes = getIOType(annotation); 249 consumes = getIOType(annotation);
...@@ -237,7 +297,7 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -237,7 +297,7 @@ public class OnosSwaggerMojo extends AbstractMojo {
237 } 297 }
238 } 298 }
239 299
240 - // temporary solution to add responses to a method 300 + // Temporary solution to add responses to a method
241 // TODO Provide annotations in the web resources for responses and parse them 301 // TODO Provide annotations in the web resources for responses and parse them
242 private void addResponses(ObjectNode methodNode) { 302 private void addResponses(ObjectNode methodNode) {
243 ObjectNode responses = mapper.createObjectNode(); 303 ObjectNode responses = mapper.createObjectNode();
...@@ -252,8 +312,8 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -252,8 +312,8 @@ public class OnosSwaggerMojo extends AbstractMojo {
252 responses.set("default", defaultObj); 312 responses.set("default", defaultObj);
253 } 313 }
254 314
255 - // for now only checks if the annotations has a value of JSON and 315 + // Checks if the annotations has a value of JSON and returns the string
256 - // returns the string that Swagger requires 316 + // that Swagger requires
257 private String getIOType(JavaAnnotation annotation) { 317 private String getIOType(JavaAnnotation annotation) {
258 if (annotation.getNamedParameter("value").toString().equals(JSON)) { 318 if (annotation.getNamedParameter("value").toString().equals(JSON)) {
259 return "application/json"; 319 return "application/json";
...@@ -261,32 +321,24 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -261,32 +321,24 @@ public class OnosSwaggerMojo extends AbstractMojo {
261 return ""; 321 return "";
262 } 322 }
263 323
264 - // if the annotation has a Path tag, returns the value with a 324 + // If the annotation has a Path tag, returns the value with leading and
265 - // preceding backslash, else returns empty string 325 + // trailing double quotes and slash removed.
266 private String getPath(JavaAnnotation annotation) { 326 private String getPath(JavaAnnotation annotation) {
267 String path = annotation.getNamedParameter("value").toString(); 327 String path = annotation.getNamedParameter("value").toString();
268 - if (path == null) { 328 + return path == null ? null : path.replaceAll("(^[\\\"/]*|[/\\\"]*$)", "");
269 - return "";
270 - }
271 - path = path.substring(1, path.length() - 1); // removing end quotes
272 - path = "/" + path;
273 - if (path.charAt(path.length()-1) == '/') {
274 - return path.substring(0, path.length() - 1);
275 - }
276 - return path;
277 } 329 }
278 330
279 - // processes parameters of javaMethod and enters the proper key-values into the methodNode 331 + // Processes parameters of javaMethod and enters the proper key-values into the methodNode
280 private void processParameters(JavaMethod javaMethod, ObjectNode methodNode) { 332 private void processParameters(JavaMethod javaMethod, ObjectNode methodNode) {
281 ArrayNode parameters = mapper.createArrayNode(); 333 ArrayNode parameters = mapper.createArrayNode();
282 methodNode.set("parameters", parameters); 334 methodNode.set("parameters", parameters);
283 boolean required = true; 335 boolean required = true;
284 336
285 - for (JavaParameter javaParameter: javaMethod.getParameters()) { 337 + for (JavaParameter javaParameter : javaMethod.getParameters()) {
286 ObjectNode individualParameterNode = mapper.createObjectNode(); 338 ObjectNode individualParameterNode = mapper.createObjectNode();
287 Optional<JavaAnnotation> optional = javaParameter.getAnnotations().stream().filter( 339 Optional<JavaAnnotation> optional = javaParameter.getAnnotations().stream().filter(
288 - annotation -> annotation.getType().getName().equals(PATHPARAM) || 340 + annotation -> annotation.getType().getName().equals(PATH_PARAM) ||
289 - annotation.getType().getName().equals(QUERYPARAM)).findAny(); 341 + annotation.getType().getName().equals(QUERY_PARAM)).findAny();
290 JavaAnnotation pathType = optional.isPresent() ? optional.get() : null; 342 JavaAnnotation pathType = optional.isPresent() ? optional.get() : null;
291 343
292 String annotationName = javaParameter.getName(); 344 String annotationName = javaParameter.getName();
...@@ -295,9 +347,9 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -295,9 +347,9 @@ public class OnosSwaggerMojo extends AbstractMojo {
295 if (pathType != null) { //the parameter is a path or query parameter 347 if (pathType != null) { //the parameter is a path or query parameter
296 individualParameterNode.put("name", 348 individualParameterNode.put("name",
297 pathType.getNamedParameter("value").toString().replace("\"", "")); 349 pathType.getNamedParameter("value").toString().replace("\"", ""));
298 - if (pathType.getType().getName().equals(PATHPARAM)) { 350 + if (pathType.getType().getName().equals(PATH_PARAM)) {
299 individualParameterNode.put("in", "path"); 351 individualParameterNode.put("in", "path");
300 - } else if (pathType.getType().getName().equals(QUERYPARAM)) { 352 + } else if (pathType.getType().getName().equals(QUERY_PARAM)) {
301 individualParameterNode.put("in", "query"); 353 individualParameterNode.put("in", "query");
302 } 354 }
303 individualParameterNode.put("type", getType(javaParameter.getType())); 355 individualParameterNode.put("type", getType(javaParameter.getType()));
...@@ -328,7 +380,7 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -328,7 +380,7 @@ public class OnosSwaggerMojo extends AbstractMojo {
328 } 380 }
329 } 381 }
330 382
331 - // returns the Swagger specified strings for the type of a parameter 383 + // Returns the Swagger specified strings for the type of a parameter
332 private String getType(JavaType javaType) { 384 private String getType(JavaType javaType) {
333 String type = javaType.getFullyQualifiedName(); 385 String type = javaType.getFullyQualifiedName();
334 String value; 386 String value;
...@@ -346,30 +398,54 @@ public class OnosSwaggerMojo extends AbstractMojo { ...@@ -346,30 +398,54 @@ public class OnosSwaggerMojo extends AbstractMojo {
346 return value; 398 return value;
347 } 399 }
348 400
349 - // Takes the top root node and prints it SwaggerConfigFile JSON file 401 + // Writes the swagger.json file using the supplied JSON root.
350 - // at onos/web/api/target/classes/SwaggerConfig. 402 + private void genCatalog(ObjectNode root) {
351 - private void writeCatalog(ObjectNode root) { 403 + File swaggerCfg = new File(dstDirectory, JSON_FILE);
352 - File dir = new File(dstDirectory, "SwaggerConfig"); 404 + if (dstDirectory.exists() || dstDirectory.mkdirs()) {
353 - //File dir = new File(dstDirectory, javaClass.getPackageName().replace('.', '/'));
354 - dir.mkdirs();
355 -
356 - File swaggerCfg = new File(dir, "SwaggerConfigFile" + ".json");
357 try (FileWriter fw = new FileWriter(swaggerCfg); 405 try (FileWriter fw = new FileWriter(swaggerCfg);
358 PrintWriter pw = new PrintWriter(fw)) { 406 PrintWriter pw = new PrintWriter(fw)) {
359 pw.println(root.toString()); 407 pw.println(root.toString());
360 } catch (IOException e) { 408 } catch (IOException e) {
361 - System.err.println("Unable to write catalog for "); 409 + getLog().warn("Unable to write " + JSON_FILE);
362 - e.printStackTrace(); 410 + }
411 + } else {
412 + getLog().warn("Unable to create " + dstDirectory);
363 } 413 }
364 } 414 }
365 415
366 - // Prints "nickname" based on method and path for a REST method 416 + // Generates the registrator Java component.
367 - // Useful while log debugging 417 + private void genRegistrator() {
418 + File dir = new File(dstDirectory, GEN_SRC);
419 + File reg = new File(dir, apiPackage.replaceAll("\\.", "/") + "/ApiDocRegistrator.java");
420 + File pkg = reg.getParentFile();
421 + if (pkg.exists() || pkg.mkdirs()) {
422 + try {
423 + String src = new String(ByteStreams.toByteArray(getClass().getResourceAsStream(REG_SRC)));
424 + src = src.replace("${api.package}", apiPackage)
425 + .replace("${web.context}", webContext)
426 + .replace("${api.title}", apiTitle)
427 + .replace("${api.description}", apiTitle);
428 + Files.write(src.getBytes(), reg);
429 + } catch (IOException e) {
430 + getLog().warn("Unable to write " + reg);
431 + }
432 + } else {
433 + getLog().warn("Unable to create " + reg);
434 + }
435 + }
436 +
437 + // Returns "nickname" based on method and path for a REST method
368 private String setNickname(String method, String path) { 438 private String setNickname(String method, String path) {
369 if (!path.equals("")) { 439 if (!path.equals("")) {
370 - return (method + path.replace('/', '_').replace("{","").replace("}","")).toLowerCase(); 440 + return (method + path.replace('/', '_').replace("{", "").replace("}", "")).toLowerCase();
371 } else { 441 } else {
372 return method.toLowerCase(); 442 return method.toLowerCase();
373 } 443 }
374 } 444 }
445 +
446 + private String shortText(String comment) {
447 + int i = comment.indexOf('.');
448 + return i > 0 ? comment.substring(0, i) : comment;
449 + }
450 +
375 } 451 }
......
1 +/*
2 + * Auto-generated by OnosSwaggerMojo.
3 + *
4 + * Copyright 2015 Open Networking Laboratory
5 + *
6 + * Licensed under the Apache License, Version 2.0 (the "License");
7 + * you may not use this file except in compliance with the License.
8 + * You may obtain a copy of the License at
9 + *
10 + * http://www.apache.org/licenses/LICENSE-2.0
11 + *
12 + * Unless required by applicable law or agreed to in writing, software
13 + * distributed under the License is distributed on an "AS IS" BASIS,
14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 + * See the License for the specific language governing permissions and
16 + * limitations under the License.
17 + */
18 +package ${api.package};
19 +
20 +import org.apache.felix.scr.annotations.Component;
21 +import org.onosproject.rest.AbstractApiDocRegistrator;
22 +import org.onosproject.rest.ApiDocProvider;
23 +
24 +@Component(immediate = true)
25 +public class ApiDocRegistrator extends AbstractApiDocRegistrator {
26 + public ApiDocRegistrator() {
27 + super(new ApiDocProvider("${web.context}",
28 + "${api.title}",
29 + ApiDocRegistrator.class.getClassLoader()));
30 + }
31 +}
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 <artifactId>onos-rest</artifactId> 29 <artifactId>onos-rest</artifactId>
30 <packaging>bundle</packaging> 30 <packaging>bundle</packaging>
31 31
32 - <description>ONOS REST API</description> 32 + <description>ONOS Core REST API</description>
33 33
34 <dependencies> 34 <dependencies>
35 <dependency> 35 <dependency>
...@@ -57,6 +57,12 @@ ...@@ -57,6 +57,12 @@
57 57
58 <properties> 58 <properties>
59 <web.context>/onos/v1</web.context> 59 <web.context>/onos/v1</web.context>
60 + <api.version>1.0.0</api.version>
61 + <api.title>${project.description}</api.title>
62 + <api.description>
63 + Core APIs for external interactions with various ONOS subsystems.
64 + </api.description>
65 + <api.package>org.onosproject.rest.impl</api.package>
60 </properties> 66 </properties>
61 67
62 <build> 68 <build>
...@@ -65,6 +71,43 @@ ...@@ -65,6 +71,43 @@
65 <groupId>org.onosproject</groupId> 71 <groupId>org.onosproject</groupId>
66 <artifactId>onos-maven-plugin</artifactId> 72 <artifactId>onos-maven-plugin</artifactId>
67 </plugin> 73 </plugin>
74 +
75 + <plugin>
76 + <groupId>org.apache.felix</groupId>
77 + <artifactId>maven-bundle-plugin</artifactId>
78 + <extensions>true</extensions>
79 + <configuration>
80 + <instructions>
81 + <_wab>src/main/webapp/</_wab>
82 + <Include-Resource>
83 + WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
84 + {maven-resources}
85 + </Include-Resource>
86 + <Bundle-SymbolicName>
87 + ${project.groupId}.${project.artifactId}
88 + </Bundle-SymbolicName>
89 + <Import-Package>
90 + org.slf4j,
91 + org.osgi.framework,
92 + javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,
93 + com.sun.jersey.api,
94 + com.sun.jersey.spi.container.servlet,
95 + com.sun.jersey.server.impl.container.servlet,
96 + com.fasterxml.jackson.databind,
97 + com.fasterxml.jackson.databind.node,
98 + com.google.common.base.*,
99 + com.google.common.collect.*,
100 + com.google.common.io.*,
101 + org.onlab.util.*,
102 + org.onlab.osgi.*,
103 + org.onlab.packet.*,
104 + org.onlab.rest.*,
105 + org.onosproject.*
106 + </Import-Package>
107 + <Web-ContextPath>${web.context}</Web-ContextPath>
108 + </instructions>
109 + </configuration>
110 + </plugin>
68 </plugins> 111 </plugins>
69 </build> 112 </build>
70 113
......
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.rest.impl;
17 +
18 +import com.google.common.collect.ImmutableSet;
19 +import com.google.common.collect.Maps;
20 +import org.apache.felix.scr.annotations.Activate;
21 +import org.apache.felix.scr.annotations.Component;
22 +import org.apache.felix.scr.annotations.Deactivate;
23 +import org.apache.felix.scr.annotations.Service;
24 +import org.onosproject.rest.ApiDocProvider;
25 +import org.onosproject.rest.ApiDocService;
26 +import org.slf4j.Logger;
27 +import org.slf4j.LoggerFactory;
28 +
29 +import java.util.Map;
30 +import java.util.Set;
31 +
32 +/**
33 + * Implementation of the REST API documentation tracker.
34 + */
35 +@Component(immediate = true)
36 +@Service
37 +public class ApiDocManager implements ApiDocService {
38 +
39 + private final Logger log = LoggerFactory.getLogger(getClass());
40 +
41 + // Set of doc providers
42 + private final Map<String, ApiDocProvider> providers = Maps.newConcurrentMap();
43 +
44 + @Activate
45 + public void activate() {
46 + log.info("Started");
47 + }
48 +
49 + @Deactivate
50 + public void deactivate() {
51 + log.info("Stopped");
52 + }
53 +
54 + @Override
55 + public void register(ApiDocProvider provider) {
56 + providers.put(provider.key(), provider);
57 + }
58 +
59 + @Override
60 + public void unregister(ApiDocProvider provider) {
61 + providers.remove(provider.name());
62 + }
63 +
64 + @Override
65 + public Set<ApiDocProvider> getDocProviders() {
66 + return ImmutableSet.copyOf(providers.values());
67 + }
68 +
69 + @Override
70 + public ApiDocProvider getDocProvider(String key) {
71 + return providers.get(key);
72 + }
73 +}
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +/**
18 + * REST API related service.
19 + */
20 +package org.onosproject.rest.impl;
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.rest.resources;
17 +
18 +import com.fasterxml.jackson.databind.node.ArrayNode;
19 +import com.fasterxml.jackson.databind.node.ObjectNode;
20 +import org.onosproject.rest.AbstractInjectionResource;
21 +import org.onosproject.rest.ApiDocService;
22 +
23 +import javax.ws.rs.GET;
24 +import javax.ws.rs.Path;
25 +import javax.ws.rs.PathParam;
26 +import javax.ws.rs.core.Response;
27 +import java.io.ByteArrayInputStream;
28 +import java.io.IOException;
29 +import java.io.InputStream;
30 +import java.io.SequenceInputStream;
31 +
32 +import static com.google.common.collect.ImmutableList.of;
33 +import static com.google.common.io.ByteStreams.toByteArray;
34 +import static javax.ws.rs.core.MediaType.*;
35 +import static org.onlab.util.Tools.nullIsNotFound;
36 +
37 +/**
38 + * REST API documentation.
39 + */
40 +@Path("docs")
41 +public class ApiDocResource extends AbstractInjectionResource {
42 +
43 + private static final String CONTENT_TYPE = "Content-Type";
44 + private static final String STYLESHEET = "text/css";
45 + private static final String SCRIPT = "text/javascript";
46 + private static final String DOCS = "/docs/";
47 +
48 + private static final String INJECT_START = "<!-- {API-START} -->";
49 + private static final String INJECT_END = "<!-- {API-END} -->";
50 +
51 + /**
52 + * Get all registered REST API docs.
53 + * Returns array of all registered API docs.
54 + *
55 + * @return 200 OK
56 + */
57 + @GET
58 + @Path("apis")
59 + public Response getApiList() {
60 + ObjectNode root = mapper().createObjectNode();
61 + ArrayNode apis = newArray(root, "apis");
62 + get(ApiDocService.class).getDocProviders().forEach(p -> apis.add(p.name()));
63 + return ok(root.toString()).build();
64 + }
65 +
66 + /**
67 + * Get Swagger UI JSON.
68 + *
69 + * @param key REST API web context
70 + * @return 200 OK
71 + */
72 + @GET
73 + @Path("apis/{key: .*?}/swagger.json")
74 + public Response getApi(@PathParam("key") String key) {
75 + String k = key.startsWith("/") ? key : "/" + key;
76 + InputStream stream = nullIsNotFound(get(ApiDocService.class).getDocProvider(k),
77 + "REST API not found for " + k).docs();
78 + return ok(nullIsNotFound(stream, "REST API docs not found for " + k))
79 + .header(CONTENT_TYPE, APPLICATION_JSON).build();
80 + }
81 +
82 + /**
83 + * Get REST API model schema.
84 + *
85 + * @param key REST API web context
86 + * @return 200 OK
87 + */
88 + @GET
89 + @Path("apis/{key: .*?}/model.json")
90 + public Response getApiModel(@PathParam("name") String key) {
91 + String k = key.startsWith("/") ? key : "/" + key;
92 + InputStream stream = nullIsNotFound(get(ApiDocService.class).getDocProvider(k),
93 + "REST API not found for " + k).model();
94 + return ok(nullIsNotFound(stream, "REST API model not found for " + k))
95 + .header(CONTENT_TYPE, APPLICATION_JSON).build();
96 + }
97 +
98 + /**
99 + * Get Swagger UI main index page.
100 + *
101 + * @return 200 OK
102 + */
103 + @GET
104 + @Path("/")
105 + public Response getDefault() throws IOException {
106 + return getIndex();
107 + }
108 +
109 + /**
110 + * Get Swagger UI main index page.
111 + *
112 + * @return 200 OK
113 + */
114 + @GET
115 + @Path("index.html")
116 + public Response getIndex() throws IOException {
117 + InputStream stream = getClass().getClassLoader().getResourceAsStream(DOCS + "index.html");
118 + nullIsNotFound(stream, "index.html not found");
119 +
120 + String index = new String(toByteArray(stream));
121 +
122 + int p1s = split(index, 0, INJECT_START);
123 + int p1e = split(index, p1s, INJECT_END);
124 + int p2s = split(index, p1e, null);
125 +
126 + StreamEnumeration streams =
127 + new StreamEnumeration(of(stream(index, 0, p1s),
128 + includeOptions(get(ApiDocService.class)),
129 + stream(index, p1e, p2s)));
130 +
131 + return ok(new SequenceInputStream(streams))
132 + .header(CONTENT_TYPE, TEXT_HTML).build();
133 + }
134 +
135 + private InputStream includeOptions(ApiDocService service) {
136 + StringBuilder sb = new StringBuilder();
137 + service.getDocProviders().forEach(p -> {
138 + sb.append("<option value=\"").append(p.key()).append("\"")
139 + .append(p.key().equals("/onos/v1") ? " selected>" : ">")
140 + .append(p.name())
141 + .append("</option>");
142 + });
143 + return new ByteArrayInputStream(sb.toString().getBytes());
144 + }
145 +
146 + /**
147 + * Get Swagger UI resource.
148 + *
149 + * @return 200 OK
150 + */
151 + @GET
152 + @Path("{resource: .*}")
153 + public Response getResource(@PathParam("resource") String resource) throws IOException {
154 + InputStream stream = getClass().getClassLoader().getResourceAsStream(DOCS + resource);
155 + return ok(nullIsNotFound(stream, resource + " not found"))
156 + .header(CONTENT_TYPE, contentType(resource)).build();
157 + }
158 +
159 + static String contentType(String resource) {
160 + return resource.endsWith(".html") ? TEXT_HTML :
161 + resource.endsWith(".css") ? STYLESHEET :
162 + resource.endsWith(".js") ? SCRIPT :
163 + APPLICATION_OCTET_STREAM;
164 + }
165 +}
...@@ -35,30 +35,52 @@ import java.io.InputStream; ...@@ -35,30 +35,52 @@ import java.io.InputStream;
35 import java.util.Set; 35 import java.util.Set;
36 36
37 /** 37 /**
38 - * REST resource for interacting with the inventory of applications. 38 + * Manage inventory of applications.
39 */ 39 */
40 @Path("applications") 40 @Path("applications")
41 public class ApplicationsWebResource extends AbstractWebResource { 41 public class ApplicationsWebResource extends AbstractWebResource {
42 42
43 + /**
44 + * Get all installed applications.
45 + * Returns array of all installed applications.
46 + *
47 + * @return 200 OK
48 + */
43 @GET 49 @GET
44 - public Response getApplications() { 50 + public Response getApps() {
45 ApplicationAdminService service = get(ApplicationAdminService.class); 51 ApplicationAdminService service = get(ApplicationAdminService.class);
46 Set<Application> apps = service.getApplications(); 52 Set<Application> apps = service.getApplications();
47 return ok(encodeArray(Application.class, "applications", apps)).build(); 53 return ok(encodeArray(Application.class, "applications", apps)).build();
48 } 54 }
49 55
56 + /**
57 + * Get application details.
58 + * Returns details of the specified application.
59 + *
60 + * @param name application name
61 + * @return 200 OK; 404; 401
62 + */
50 @GET 63 @GET
51 @Path("{name}") 64 @Path("{name}")
52 - public Response getApplication(@PathParam("name") String name) { 65 + public Response getApp(@PathParam("name") String name) {
53 ApplicationAdminService service = get(ApplicationAdminService.class); 66 ApplicationAdminService service = get(ApplicationAdminService.class);
54 ApplicationId appId = service.getId(name); 67 ApplicationId appId = service.getId(name);
55 return response(service, appId); 68 return response(service, appId);
56 } 69 }
57 70
71 + /**
72 + * Install a new application.
73 + * Uploads application archive stream and optionally activates the
74 + * application.
75 + *
76 + * @param activate true to activate app also
77 + * @param stream application archive stream
78 + * @return 200 OK; 404; 401
79 + */
58 @POST 80 @POST
59 @Consumes(MediaType.APPLICATION_OCTET_STREAM) 81 @Consumes(MediaType.APPLICATION_OCTET_STREAM)
60 @Produces(MediaType.APPLICATION_JSON) 82 @Produces(MediaType.APPLICATION_JSON)
61 - public Response installApplication(@QueryParam("activate") 83 + public Response installApp(@QueryParam("activate")
62 @DefaultValue("false") boolean activate, 84 @DefaultValue("false") boolean activate,
63 InputStream stream) { 85 InputStream stream) {
64 ApplicationAdminService service = get(ApplicationAdminService.class); 86 ApplicationAdminService service = get(ApplicationAdminService.class);
...@@ -69,30 +91,51 @@ public class ApplicationsWebResource extends AbstractWebResource { ...@@ -69,30 +91,51 @@ public class ApplicationsWebResource extends AbstractWebResource {
69 return ok(codec(Application.class).encode(app, this)).build(); 91 return ok(codec(Application.class).encode(app, this)).build();
70 } 92 }
71 93
94 + /**
95 + * Uninstall application.
96 + * Uninstalls the specified application deactivating it first if necessary.
97 + *
98 + * @param name application name
99 + * @return 200 OK; 404; 401
100 + */
72 @DELETE 101 @DELETE
73 @Produces(MediaType.APPLICATION_JSON) 102 @Produces(MediaType.APPLICATION_JSON)
74 @Path("{name}") 103 @Path("{name}")
75 - public Response uninstallApplication(@PathParam("name") String name) { 104 + public Response uninstallApp(@PathParam("name") String name) {
76 ApplicationAdminService service = get(ApplicationAdminService.class); 105 ApplicationAdminService service = get(ApplicationAdminService.class);
77 ApplicationId appId = service.getId(name); 106 ApplicationId appId = service.getId(name);
78 service.uninstall(appId); 107 service.uninstall(appId);
79 return Response.ok().build(); 108 return Response.ok().build();
80 } 109 }
81 110
111 + /**
112 + * Activate application.
113 + * Activates the specified application.
114 + *
115 + * @param name application name
116 + * @return 200 OK; 404; 401
117 + */
82 @POST 118 @POST
83 @Produces(MediaType.APPLICATION_JSON) 119 @Produces(MediaType.APPLICATION_JSON)
84 @Path("{name}/active") 120 @Path("{name}/active")
85 - public Response activateApplication(@PathParam("name") String name) { 121 + public Response activateApp(@PathParam("name") String name) {
86 ApplicationAdminService service = get(ApplicationAdminService.class); 122 ApplicationAdminService service = get(ApplicationAdminService.class);
87 ApplicationId appId = service.getId(name); 123 ApplicationId appId = service.getId(name);
88 service.activate(appId); 124 service.activate(appId);
89 return response(service, appId); 125 return response(service, appId);
90 } 126 }
91 127
128 + /**
129 + * De-activate application.
130 + * De-activates the specified application.
131 + *
132 + * @param name application name
133 + * @return 200 OK; 404; 401
134 + */
92 @DELETE 135 @DELETE
93 @Produces(MediaType.APPLICATION_JSON) 136 @Produces(MediaType.APPLICATION_JSON)
94 @Path("{name}/active") 137 @Path("{name}/active")
95 - public Response deactivateApplication(@PathParam("name") String name) { 138 + public Response deactivateApp(@PathParam("name") String name) {
96 ApplicationAdminService service = get(ApplicationAdminService.class); 139 ApplicationAdminService service = get(ApplicationAdminService.class);
97 ApplicationId appId = service.getId(name); 140 ApplicationId appId = service.getId(name);
98 service.deactivate(appId); 141 service.deactivate(appId);
......
...@@ -37,19 +37,32 @@ import java.util.List; ...@@ -37,19 +37,32 @@ import java.util.List;
37 import static org.onlab.util.Tools.nullIsNotFound; 37 import static org.onlab.util.Tools.nullIsNotFound;
38 38
39 /** 39 /**
40 - * REST resource for interacting with the ONOS cluster subsystem. 40 + * Manage cluster of ONOS instances.
41 */ 41 */
42 @Path("cluster") 42 @Path("cluster")
43 public class ClusterWebResource extends AbstractWebResource { 43 public class ClusterWebResource extends AbstractWebResource {
44 44
45 public static final String NODE_NOT_FOUND = "Node is not found"; 45 public static final String NODE_NOT_FOUND = "Node is not found";
46 46
47 + /**
48 + * Get all cluster nodes.
49 + * Returns array of all cluster nodes.
50 + *
51 + * @return 200 OK
52 + */
47 @GET 53 @GET
48 public Response getClusterNodes() { 54 public Response getClusterNodes() {
49 Iterable<ControllerNode> nodes = get(ClusterService.class).getNodes(); 55 Iterable<ControllerNode> nodes = get(ClusterService.class).getNodes();
50 return ok(encodeArray(ControllerNode.class, "nodes", nodes)).build(); 56 return ok(encodeArray(ControllerNode.class, "nodes", nodes)).build();
51 } 57 }
52 58
59 + /**
60 + * Get cluster node details.
61 + * Returns details of the specified cluster node.
62 + *
63 + * @param id cluster node identifier
64 + * @return 200 OK
65 + */
53 @GET 66 @GET
54 @Path("{id}") 67 @Path("{id}")
55 public Response getClusterNode(@PathParam("id") String id) { 68 public Response getClusterNode(@PathParam("id") String id) {
...@@ -58,6 +71,13 @@ public class ClusterWebResource extends AbstractWebResource { ...@@ -58,6 +71,13 @@ public class ClusterWebResource extends AbstractWebResource {
58 return ok(codec(ControllerNode.class).encode(node, this)).build(); 71 return ok(codec(ControllerNode.class).encode(node, this)).build();
59 } 72 }
60 73
74 + /**
75 + * Forms cluster of ONOS instances.
76 + * Forms ONOS cluster using the uploaded JSON definition.
77 + *
78 + * @param config cluster definition
79 + * @return 200 OK
80 + */
61 @POST 81 @POST
62 @Path("configuration") 82 @Path("configuration")
63 public Response formCluster(InputStream config) throws IOException { 83 public Response formCluster(InputStream config) throws IOException {
......
...@@ -33,11 +33,17 @@ import java.util.Set; ...@@ -33,11 +33,17 @@ import java.util.Set;
33 import static org.onlab.util.Tools.nullIsNotFound; 33 import static org.onlab.util.Tools.nullIsNotFound;
34 34
35 /** 35 /**
36 - * REST resource for cluster-wide component configuration. 36 + * Manage component configurations.
37 */ 37 */
38 @Path("configuration") 38 @Path("configuration")
39 public class ComponentConfigWebResource extends AbstractWebResource { 39 public class ComponentConfigWebResource extends AbstractWebResource {
40 40
41 + /**
42 + * Get all component configurations.
43 + * Returns collection of all registered component configurations.
44 + *
45 + * @return 200 OK
46 + */
41 @GET 47 @GET
42 public Response getComponentConfigs() { 48 public Response getComponentConfigs() {
43 ComponentConfigService service = get(ComponentConfigService.class); 49 ComponentConfigService service = get(ComponentConfigService.class);
...@@ -47,6 +53,12 @@ public class ComponentConfigWebResource extends AbstractWebResource { ...@@ -47,6 +53,12 @@ public class ComponentConfigWebResource extends AbstractWebResource {
47 return ok(root).build(); 53 return ok(root).build();
48 } 54 }
49 55
56 + /**
57 + * Get configuration of the specified component.
58 + *
59 + * @param component component name
60 + * @return 200 OK
61 + */
50 @GET 62 @GET
51 @Path("{component}") 63 @Path("{component}")
52 public Response getComponentConfigs(@PathParam("component") String component) { 64 public Response getComponentConfigs(@PathParam("component") String component) {
...@@ -65,9 +77,16 @@ public class ComponentConfigWebResource extends AbstractWebResource { ...@@ -65,9 +77,16 @@ public class ComponentConfigWebResource extends AbstractWebResource {
65 props.forEach(p -> compNode.put(p.name(), p.value())); 77 props.forEach(p -> compNode.put(p.name(), p.value()));
66 } 78 }
67 79
80 + /**
81 + * Selectively set configuration properties.
82 + * Sets only the properties present in the JSON request.
83 + *
84 + * @param component component name
85 + * @return 200 OK
86 + */
68 @POST 87 @POST
69 @Path("{component}") 88 @Path("{component}")
70 - public Response setComponentConfigs(@PathParam("component") String component, 89 + public Response setConfigs(@PathParam("component") String component,
71 InputStream request) throws IOException { 90 InputStream request) throws IOException {
72 ComponentConfigService service = get(ComponentConfigService.class); 91 ComponentConfigService service = get(ComponentConfigService.class);
73 ObjectNode props = (ObjectNode) mapper().readTree(request); 92 ObjectNode props = (ObjectNode) mapper().readTree(request);
...@@ -76,9 +95,16 @@ public class ComponentConfigWebResource extends AbstractWebResource { ...@@ -76,9 +95,16 @@ public class ComponentConfigWebResource extends AbstractWebResource {
76 return Response.noContent().build(); 95 return Response.noContent().build();
77 } 96 }
78 97
98 + /**
99 + * Selectively clear configuration properties.
100 + * Clears only the properties present in the JSON request.
101 + *
102 + * @param component component name
103 + * @return 200 OK
104 + */
79 @DELETE 105 @DELETE
80 @Path("{component}") 106 @Path("{component}")
81 - public Response unsetComponentConfigs(@PathParam("component") String component, 107 + public Response unsetConfigs(@PathParam("component") String component,
82 InputStream request) throws IOException { 108 InputStream request) throws IOException {
83 ComponentConfigService service = get(ComponentConfigService.class); 109 ComponentConfigService service = get(ComponentConfigService.class);
84 ObjectNode props = (ObjectNode) mapper().readTree(request); 110 ObjectNode props = (ObjectNode) mapper().readTree(request);
......
...@@ -37,14 +37,20 @@ import java.io.InputStream; ...@@ -37,14 +37,20 @@ import java.io.InputStream;
37 import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR; 37 import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR;
38 38
39 /** 39 /**
40 - * Resource that acts as an ancillary provider for uploading pre-configured 40 + * Inject devices, ports, links and end-station hosts.
41 - * devices, ports and links.
42 */ 41 */
43 @Path("config") 42 @Path("config")
44 public class ConfigWebResource extends BaseResource { 43 public class ConfigWebResource extends BaseResource {
45 44
46 private static Logger log = LoggerFactory.getLogger(ConfigWebResource.class); 45 private static Logger log = LoggerFactory.getLogger(ConfigWebResource.class);
47 46
47 + /**
48 + * Upload device, port, link and host data.
49 + *
50 + * @param input JSON blob
51 + * @return 200 OK
52 + * @throws IOException
53 + */
48 @POST 54 @POST
49 @Path("topology") 55 @Path("topology")
50 @Consumes(MediaType.APPLICATION_JSON) 56 @Consumes(MediaType.APPLICATION_JSON)
......
...@@ -34,19 +34,32 @@ import static org.onlab.util.Tools.nullIsNotFound; ...@@ -34,19 +34,32 @@ import static org.onlab.util.Tools.nullIsNotFound;
34 import static org.onosproject.net.DeviceId.deviceId; 34 import static org.onosproject.net.DeviceId.deviceId;
35 35
36 /** 36 /**
37 - * REST resource for interacting with the inventory of infrastructure devices. 37 + * Manage inventory of infrastructure devices.
38 */ 38 */
39 @Path("devices") 39 @Path("devices")
40 public class DevicesWebResource extends AbstractWebResource { 40 public class DevicesWebResource extends AbstractWebResource {
41 41
42 public static final String DEVICE_NOT_FOUND = "Device is not found"; 42 public static final String DEVICE_NOT_FOUND = "Device is not found";
43 43
44 + /**
45 + * Get all infrastructure devices.
46 + * Returns array of all discovered infrastructure devices.
47 + *
48 + * @return 200 OK
49 + */
44 @GET 50 @GET
45 public Response getDevices() { 51 public Response getDevices() {
46 Iterable<Device> devices = get(DeviceService.class).getDevices(); 52 Iterable<Device> devices = get(DeviceService.class).getDevices();
47 return ok(encodeArray(Device.class, "devices", devices)).build(); 53 return ok(encodeArray(Device.class, "devices", devices)).build();
48 } 54 }
49 55
56 + /**
57 + * Get details of infrastructure device.
58 + * Returns details of the specified infrastructure device.
59 + *
60 + * @param id device identifier
61 + * @return 200 OK
62 + */
50 @GET 63 @GET
51 @Path("{id}") 64 @Path("{id}")
52 public Response getDevice(@PathParam("id") String id) { 65 public Response getDevice(@PathParam("id") String id) {
...@@ -55,6 +68,14 @@ public class DevicesWebResource extends AbstractWebResource { ...@@ -55,6 +68,14 @@ public class DevicesWebResource extends AbstractWebResource {
55 return ok(codec(Device.class).encode(device, this)).build(); 68 return ok(codec(Device.class).encode(device, this)).build();
56 } 69 }
57 70
71 + /**
72 + * Remove infrastructure device.
73 + * Administratively deletes the specified device from the inventory of
74 + * known devices.
75 + *
76 + * @param id device identifier
77 + * @return 200 OK
78 + */
58 @DELETE 79 @DELETE
59 @Path("{id}") 80 @Path("{id}")
60 public Response removeDevice(@PathParam("id") String id) { 81 public Response removeDevice(@PathParam("id") String id) {
...@@ -64,6 +85,13 @@ public class DevicesWebResource extends AbstractWebResource { ...@@ -64,6 +85,13 @@ public class DevicesWebResource extends AbstractWebResource {
64 return ok(codec(Device.class).encode(device, this)).build(); 85 return ok(codec(Device.class).encode(device, this)).build();
65 } 86 }
66 87
88 + /**
89 + * Get ports of infrastructure device.
90 + * Returns details of the specified infrastructure device.
91 + *
92 + * @param id device identifier
93 + * @return 200 OK
94 + */
67 @GET 95 @GET
68 @Path("{id}/ports") 96 @Path("{id}/ports")
69 public Response getDevicePorts(@PathParam("id") String id) { 97 public Response getDevicePorts(@PathParam("id") String id) {
......
...@@ -45,7 +45,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; ...@@ -45,7 +45,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
45 import com.fasterxml.jackson.databind.node.ObjectNode; 45 import com.fasterxml.jackson.databind.node.ObjectNode;
46 46
47 /** 47 /**
48 - * REST resource for interacting with the inventory of flows. 48 + * Query and program flow rules.
49 */ 49 */
50 50
51 @Path("flows") 51 @Path("flows")
...@@ -57,14 +57,13 @@ public class FlowsWebResource extends AbstractWebResource { ...@@ -57,14 +57,13 @@ public class FlowsWebResource extends AbstractWebResource {
57 final ArrayNode flowsNode = root.putArray("flows"); 57 final ArrayNode flowsNode = root.putArray("flows");
58 58
59 /** 59 /**
60 - * Gets an array containing all the intents in the system. 60 + * Get all flow entries. Returns array of all flow rules in the system.
61 * 61 *
62 * @return array of all the intents in the system 62 * @return array of all the intents in the system
63 */ 63 */
64 @GET 64 @GET
65 @Produces(MediaType.APPLICATION_JSON) 65 @Produces(MediaType.APPLICATION_JSON)
66 public Response getFlows() { 66 public Response getFlows() {
67 -
68 final Iterable<Device> devices = get(DeviceService.class).getDevices(); 67 final Iterable<Device> devices = get(DeviceService.class).getDevices();
69 for (final Device device : devices) { 68 for (final Device device : devices) {
70 final Iterable<FlowEntry> deviceEntries = service.getFlowEntries(device.id()); 69 final Iterable<FlowEntry> deviceEntries = service.getFlowEntries(device.id());
...@@ -79,9 +78,10 @@ public class FlowsWebResource extends AbstractWebResource { ...@@ -79,9 +78,10 @@ public class FlowsWebResource extends AbstractWebResource {
79 } 78 }
80 79
81 /** 80 /**
82 - * Gets the flows for a device, where the device is specified by Id. 81 + * Get flow entries of a device. Returns array of all flow rules for the
82 + * specified device.
83 * 83 *
84 - * @param deviceId Id of device to look up 84 + * @param deviceId device identifier
85 * @return flow data as an array 85 * @return flow data as an array
86 */ 86 */
87 @GET 87 @GET
...@@ -101,10 +101,11 @@ public class FlowsWebResource extends AbstractWebResource { ...@@ -101,10 +101,11 @@ public class FlowsWebResource extends AbstractWebResource {
101 } 101 }
102 102
103 /** 103 /**
104 - * Gets the flows for a device, where the device is specified by Id. 104 + * Get flow rule. Returns the flow entry specified by the device id and
105 + * flow rule id.
105 * 106 *
106 - * @param deviceId Id of device to look up 107 + * @param deviceId device identifier
107 - * @param flowId Id of flow to look up 108 + * @param flowId flow rule identifier
108 * @return flow data as an array 109 * @return flow data as an array
109 */ 110 */
110 @GET 111 @GET
...@@ -127,10 +128,11 @@ public class FlowsWebResource extends AbstractWebResource { ...@@ -127,10 +128,11 @@ public class FlowsWebResource extends AbstractWebResource {
127 } 128 }
128 129
129 /** 130 /**
130 - * Creates a flow rule from a POST of a JSON string and attempts to apply it. 131 + * Create new flow rule. Creates and installs a new flow rule for the
132 + * specified device.
131 * 133 *
132 * @param deviceId device identifier 134 * @param deviceId device identifier
133 - * @param stream input JSON 135 + * @param stream flow rule JSON
134 * @return status of the request - CREATED if the JSON is correct, 136 * @return status of the request - CREATED if the JSON is correct,
135 * BAD_REQUEST if the JSON is invalid 137 * BAD_REQUEST if the JSON is invalid
136 */ 138 */
...@@ -163,10 +165,10 @@ public class FlowsWebResource extends AbstractWebResource { ...@@ -163,10 +165,10 @@ public class FlowsWebResource extends AbstractWebResource {
163 } 165 }
164 166
165 /** 167 /**
166 - * Removes the flows for a given device with the given flow id. 168 + * Remove flow rule. Removes the specified flow rule.
167 * 169 *
168 - * @param deviceId Id of device to look up 170 + * @param deviceId device identifier
169 - * @param flowId Id of flow to look up 171 + * @param flowId flow rule identifier
170 */ 172 */
171 @DELETE 173 @DELETE
172 @Produces(MediaType.APPLICATION_JSON) 174 @Produces(MediaType.APPLICATION_JSON)
......
...@@ -56,7 +56,7 @@ import static org.onlab.util.Tools.nullIsNotFound; ...@@ -56,7 +56,7 @@ import static org.onlab.util.Tools.nullIsNotFound;
56 import static org.onosproject.net.HostId.hostId; 56 import static org.onosproject.net.HostId.hostId;
57 57
58 /** 58 /**
59 - * REST resource for interacting with the inventory of hosts. 59 + * Manage inventory of end-station hosts.
60 */ 60 */
61 @Path("hosts") 61 @Path("hosts")
62 public class HostsWebResource extends AbstractWebResource { 62 public class HostsWebResource extends AbstractWebResource {
...@@ -65,6 +65,12 @@ public class HostsWebResource extends AbstractWebResource { ...@@ -65,6 +65,12 @@ public class HostsWebResource extends AbstractWebResource {
65 UriInfo uriInfo; 65 UriInfo uriInfo;
66 public static final String HOST_NOT_FOUND = "Host is not found"; 66 public static final String HOST_NOT_FOUND = "Host is not found";
67 67
68 + /**
69 + * Get all end-station hosts.
70 + * Returns array of all known end-station hosts.
71 + *
72 + * @return 200 OK
73 + */
68 @GET 74 @GET
69 @Produces(MediaType.APPLICATION_JSON) 75 @Produces(MediaType.APPLICATION_JSON)
70 public Response getHosts() { 76 public Response getHosts() {
...@@ -73,6 +79,13 @@ public class HostsWebResource extends AbstractWebResource { ...@@ -73,6 +79,13 @@ public class HostsWebResource extends AbstractWebResource {
73 return ok(root).build(); 79 return ok(root).build();
74 } 80 }
75 81
82 + /**
83 + * Get details of end-station host.
84 + * Returns detailed properties of the specified end-station host.
85 + *
86 + * @param id host identifier
87 + * @return 200 OK
88 + */
76 @GET 89 @GET
77 @Produces(MediaType.APPLICATION_JSON) 90 @Produces(MediaType.APPLICATION_JSON)
78 @Path("{id}") 91 @Path("{id}")
...@@ -83,6 +96,14 @@ public class HostsWebResource extends AbstractWebResource { ...@@ -83,6 +96,14 @@ public class HostsWebResource extends AbstractWebResource {
83 return ok(root).build(); 96 return ok(root).build();
84 } 97 }
85 98
99 + /**
100 + * Get details of end-station host with MAC/VLAN.
101 + * Returns detailed properties of the specified end-station host.
102 + *
103 + * @param mac host MAC address
104 + * @param vlan host VLAN identifier
105 + * @return 200 OK
106 + */
86 @GET 107 @GET
87 @Produces(MediaType.APPLICATION_JSON) 108 @Produces(MediaType.APPLICATION_JSON)
88 @Path("{mac}/{vlan}") 109 @Path("{mac}/{vlan}")
...@@ -157,6 +178,7 @@ public class HostsWebResource extends AbstractWebResource { ...@@ -157,6 +178,7 @@ public class HostsWebResource extends AbstractWebResource {
157 178
158 /** 179 /**
159 * Creates and adds new host based on given data and returns its host ID. 180 * Creates and adds new host based on given data and returns its host ID.
181 + *
160 * @param node JsonNode containing host information 182 * @param node JsonNode containing host information
161 * @return host ID of new host created 183 * @return host ID of new host created
162 */ 184 */
......
...@@ -55,9 +55,8 @@ import static org.onosproject.net.intent.IntentState.WITHDRAWN; ...@@ -55,9 +55,8 @@ import static org.onosproject.net.intent.IntentState.WITHDRAWN;
55 import static org.slf4j.LoggerFactory.getLogger; 55 import static org.slf4j.LoggerFactory.getLogger;
56 56
57 /** 57 /**
58 - * REST resource for interacting with the inventory of intents. 58 + * Query, submit and withdraw network intents.
59 */ 59 */
60 -
61 @Path("intents") 60 @Path("intents")
62 public class IntentsWebResource extends AbstractWebResource { 61 public class IntentsWebResource extends AbstractWebResource {
63 @Context 62 @Context
...@@ -69,7 +68,8 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -69,7 +68,8 @@ public class IntentsWebResource extends AbstractWebResource {
69 public static final String INTENT_NOT_FOUND = "Intent is not found"; 68 public static final String INTENT_NOT_FOUND = "Intent is not found";
70 69
71 /** 70 /**
72 - * Gets an array containing all the intents in the system. 71 + * Get all intents.
72 + * Returns array containing all the intents in the system.
73 * 73 *
74 * @return array of all the intents in the system 74 * @return array of all the intents in the system
75 */ 75 */
...@@ -82,10 +82,11 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -82,10 +82,11 @@ public class IntentsWebResource extends AbstractWebResource {
82 } 82 }
83 83
84 /** 84 /**
85 - * Gets a single intent by Id. 85 + * Get intent by application and key.
86 + * Returns details of the specified intent.
86 * 87 *
87 - * @param appId the Application ID 88 + * @param appId application identifier
88 - * @param key the Intent key value to look up 89 + * @param key intent key
89 * @return intent data 90 * @return intent data
90 */ 91 */
91 @GET 92 @GET
...@@ -133,23 +134,53 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -133,23 +134,53 @@ public class IntentsWebResource extends AbstractWebResource {
133 } 134 }
134 135
135 /** 136 /**
136 - * Uninstalls a single intent by Id. 137 + * Submit a new intent.
138 + * Creates and submits intent from the JSON request.
137 * 139 *
138 - * @param appId the Application ID 140 + * @param stream input JSON
139 - * @param keyString the Intent key value to look up 141 + * @return status of the request - CREATED if the JSON is correct,
142 + * BAD_REQUEST if the JSON is invalid
143 + */
144 + @POST
145 + @Consumes(MediaType.APPLICATION_JSON)
146 + @Produces(MediaType.APPLICATION_JSON)
147 + public Response createIntent(InputStream stream) {
148 + try {
149 + IntentService service = get(IntentService.class);
150 + ObjectNode root = (ObjectNode) mapper().readTree(stream);
151 + Intent intent = codec(Intent.class).decode(root, this);
152 + service.submit(intent);
153 + UriBuilder locationBuilder = uriInfo.getBaseUriBuilder()
154 + .path("intents")
155 + .path(Short.toString(intent.appId().id()))
156 + .path(Long.toString(intent.id().fingerprint()));
157 + return Response
158 + .created(locationBuilder.build())
159 + .build();
160 + } catch (IOException ioe) {
161 + throw new IllegalArgumentException(ioe);
162 + }
163 + }
164 +
165 + /**
166 + * Withdraw intent.
167 + * Withdraws the specified intent from the system.
168 + *
169 + * @param appId application identifier
170 + * @param key intent key
140 */ 171 */
141 @DELETE 172 @DELETE
142 @Path("{appId}/{key}") 173 @Path("{appId}/{key}")
143 public void deleteIntentById(@PathParam("appId") String appId, 174 public void deleteIntentById(@PathParam("appId") String appId,
144 - @PathParam("key") String keyString) { 175 + @PathParam("key") String key) {
145 final ApplicationId app = get(CoreService.class).getAppId(appId); 176 final ApplicationId app = get(CoreService.class).getAppId(appId);
146 177
147 - Intent intent = get(IntentService.class).getIntent(Key.of(keyString, app)); 178 + Intent intent = get(IntentService.class).getIntent(Key.of(key, app));
148 IntentService service = get(IntentService.class); 179 IntentService service = get(IntentService.class);
149 180
150 if (intent == null) { 181 if (intent == null) {
151 intent = service 182 intent = service
152 - .getIntent(Key.of(Long.decode(keyString), app)); 183 + .getIntent(Key.of(Long.decode(key), app));
153 } 184 }
154 if (intent == null) { 185 if (intent == null) {
155 // No such intent. REST standards recommend a positive status code 186 // No such intent. REST standards recommend a positive status code
...@@ -158,12 +189,12 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -158,12 +189,12 @@ public class IntentsWebResource extends AbstractWebResource {
158 } 189 }
159 190
160 191
161 - Key key = intent.key(); 192 + Key k = intent.key();
162 193
163 // set up latch and listener to track uninstall progress 194 // set up latch and listener to track uninstall progress
164 CountDownLatch latch = new CountDownLatch(1); 195 CountDownLatch latch = new CountDownLatch(1);
165 196
166 - IntentListener listener = new DeleteListener(key, latch); 197 + IntentListener listener = new DeleteListener(k, latch);
167 service.addListener(listener); 198 service.addListener(listener);
168 199
169 try { 200 try {
...@@ -173,10 +204,10 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -173,10 +204,10 @@ public class IntentsWebResource extends AbstractWebResource {
173 try { 204 try {
174 latch.await(WITHDRAW_EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS); 205 latch.await(WITHDRAW_EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
175 } catch (InterruptedException e) { 206 } catch (InterruptedException e) {
176 - log.info("REST Delete operation timed out waiting for intent {}", key); 207 + log.info("REST Delete operation timed out waiting for intent {}", k);
177 } 208 }
178 // double check the state 209 // double check the state
179 - IntentState state = service.getIntentState(key); 210 + IntentState state = service.getIntentState(k);
180 if (state == WITHDRAWN || state == FAILED) { 211 if (state == WITHDRAWN || state == FAILED) {
181 service.purge(intent); 212 service.purge(intent);
182 } 213 }
...@@ -187,32 +218,4 @@ public class IntentsWebResource extends AbstractWebResource { ...@@ -187,32 +218,4 @@ public class IntentsWebResource extends AbstractWebResource {
187 } 218 }
188 } 219 }
189 220
190 - /**
191 - * Creates an intent from a POST of a JSON string and attempts to apply it.
192 - *
193 - * @param stream input JSON
194 - * @return status of the request - CREATED if the JSON is correct,
195 - * BAD_REQUEST if the JSON is invalid
196 - */
197 - @POST
198 - @Consumes(MediaType.APPLICATION_JSON)
199 - @Produces(MediaType.APPLICATION_JSON)
200 - public Response createIntent(InputStream stream) {
201 - try {
202 - IntentService service = get(IntentService.class);
203 - ObjectNode root = (ObjectNode) mapper().readTree(stream);
204 - Intent intent = codec(Intent.class).decode(root, this);
205 - service.submit(intent);
206 - UriBuilder locationBuilder = uriInfo.getBaseUriBuilder()
207 - .path("intents")
208 - .path(Short.toString(intent.appId().id()))
209 - .path(Long.toString(intent.id().fingerprint()));
210 - return Response
211 - .created(locationBuilder.build())
212 - .build();
213 - } catch (IOException ioe) {
214 - throw new IllegalArgumentException(ioe);
215 - }
216 - }
217 -
218 } 221 }
......
...@@ -30,7 +30,7 @@ import static org.onosproject.net.DeviceId.deviceId; ...@@ -30,7 +30,7 @@ import static org.onosproject.net.DeviceId.deviceId;
30 import static org.onosproject.net.PortNumber.portNumber; 30 import static org.onosproject.net.PortNumber.portNumber;
31 31
32 /** 32 /**
33 - * REST resource for interacting with the inventory of infrastructure links. 33 + * Manage inventory of infrastructure links.
34 */ 34 */
35 @Path("links") 35 @Path("links")
36 public class LinksWebResource extends AbstractWebResource { 36 public class LinksWebResource extends AbstractWebResource {
...@@ -41,6 +41,15 @@ public class LinksWebResource extends AbstractWebResource { ...@@ -41,6 +41,15 @@ public class LinksWebResource extends AbstractWebResource {
41 EGRESS 41 EGRESS
42 } 42 }
43 43
44 + /**
45 + * Get infrastructure links.
46 + * Returns array of all links, or links for the specified device or port.
47 + *
48 + * @param deviceId (optional) device identifier
49 + * @param port (optional) port number
50 + * @param direction (optional) direction qualifier
51 + * @return 200 OK
52 + */
44 @GET 53 @GET
45 public Response getLinks(@QueryParam("device") String deviceId, 54 public Response getLinks(@QueryParam("device") String deviceId,
46 @QueryParam("port") String port, 55 @QueryParam("port") String port,
......
...@@ -33,13 +33,13 @@ import java.io.IOException; ...@@ -33,13 +33,13 @@ import java.io.IOException;
33 import java.io.InputStream; 33 import java.io.InputStream;
34 34
35 /** 35 /**
36 - * REST resource for injecting and retrieving common network configuration. 36 + * Manage network configurations.
37 */ 37 */
38 @Path("network/configuration") 38 @Path("network/configuration")
39 public class NetworkConfigWebResource extends AbstractWebResource { 39 public class NetworkConfigWebResource extends AbstractWebResource {
40 40
41 /** 41 /**
42 - * Returns entire network configuration base. 42 + * Get entire network configuration base.
43 * 43 *
44 * @return network configuration JSON 44 * @return network configuration JSON
45 */ 45 */
...@@ -55,7 +55,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -55,7 +55,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
55 } 55 }
56 56
57 /** 57 /**
58 - * Returns the network configuration for the specified subject class. 58 + * Get all network configuration for a subject class.
59 * 59 *
60 * @param subjectKey subject class key 60 * @param subjectKey subject class key
61 * @return network configuration JSON 61 * @return network configuration JSON
...@@ -72,7 +72,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -72,7 +72,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
72 } 72 }
73 73
74 /** 74 /**
75 - * Returns the network configuration for the specified subject. 75 + * Get all network configuration for a subject.
76 * 76 *
77 * @param subjectKey subject class key 77 * @param subjectKey subject class key
78 * @param subject subject key 78 * @param subject subject key
...@@ -92,8 +92,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -92,8 +92,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
92 } 92 }
93 93
94 /** 94 /**
95 - * Returns the network configuration for the specified subject and given 95 + * Get specific network configuration for a subject.
96 - * configuration class.
97 * 96 *
98 * @param subjectKey subject class key 97 * @param subjectKey subject class key
99 * @param subject subject key 98 * @param subject subject key
...@@ -126,7 +125,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -126,7 +125,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
126 125
127 126
128 /** 127 /**
129 - * Uploads network configuration in bulk. 128 + * Upload bulk network configuration.
130 * 129 *
131 * @param request network configuration JSON rooted at the top node 130 * @param request network configuration JSON rooted at the top node
132 * @throws IOException if unable to parse the request 131 * @throws IOException if unable to parse the request
...@@ -145,7 +144,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -145,7 +144,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
145 } 144 }
146 145
147 /** 146 /**
148 - * Uploads network configuration for the specified subject class. 147 + * Upload multiple network configurations for a subject class.
149 * 148 *
150 * @param subjectKey subject class key 149 * @param subjectKey subject class key
151 * @param request network configuration JSON rooted at the top node 150 * @param request network configuration JSON rooted at the top node
...@@ -165,7 +164,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -165,7 +164,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
165 } 164 }
166 165
167 /** 166 /**
168 - * Uploads network configuration for the specified subject. 167 + * Upload mutliple network configurations for a subject.
169 * 168 *
170 * @param subjectKey subject class key 169 * @param subjectKey subject class key
171 * @param subject subject key 170 * @param subject subject key
...@@ -189,8 +188,7 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -189,8 +188,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
189 } 188 }
190 189
191 /** 190 /**
192 - * Uploads network configuration for the specified subject and given 191 + * Upload specific network configuration for a subject.
193 - * configuration class.
194 * 192 *
195 * @param subjectKey subject class key 193 * @param subjectKey subject class key
196 * @param subject subject key 194 * @param subject subject key
...@@ -232,79 +230,76 @@ public class NetworkConfigWebResource extends AbstractWebResource { ...@@ -232,79 +230,76 @@ public class NetworkConfigWebResource extends AbstractWebResource {
232 230
233 231
234 /** 232 /**
235 - * Clears network configuration for the specified subject. 233 + * Clear entire network configuration base.
236 * 234 *
237 - * @param subjectKey subject class key
238 - * @param subject subject key
239 * @return empty response 235 * @return empty response
240 */ 236 */
241 @DELETE 237 @DELETE
242 - @Path("{subjectKey}/{subject}")
243 @SuppressWarnings("unchecked") 238 @SuppressWarnings("unchecked")
244 - public Response delete(@PathParam("subjectKey") String subjectKey, 239 + public Response delete() {
245 - @PathParam("subject") String subject) {
246 NetworkConfigService service = get(NetworkConfigService.class); 240 NetworkConfigService service = get(NetworkConfigService.class);
247 - Object s = service.getSubjectFactory(subjectKey).createSubject(subject); 241 + service.getSubjectClasses()
248 - service.getConfigs(s).forEach(c -> service.removeConfig(s, c.getClass())); 242 + .forEach(subjectClass -> service.getSubjects(subjectClass)
243 + .forEach(subject -> service.getConfigs(subject)
244 + .forEach(config -> service
245 + .removeConfig(subject, config.getClass()))));
249 return Response.ok().build(); 246 return Response.ok().build();
250 } 247 }
251 248
252 /** 249 /**
253 - * Clears network configuration for the specified subject and given 250 + * Clear all network configurations for a subject class.
254 - * configuration class.
255 * 251 *
256 * @param subjectKey subject class key 252 * @param subjectKey subject class key
257 - * @param subject subject key
258 - * @param configKey configuration class key
259 * @return empty response 253 * @return empty response
260 */ 254 */
261 @DELETE 255 @DELETE
262 - @Path("{subjectKey}/{subject}/{configKey}") 256 + @Path("{subjectKey}")
263 @SuppressWarnings("unchecked") 257 @SuppressWarnings("unchecked")
264 - public Response delete(@PathParam("subjectKey") String subjectKey, 258 + public Response delete(@PathParam("subjectKey") String subjectKey) {
265 - @PathParam("subject") String subject,
266 - @PathParam("configKey") String configKey) {
267 NetworkConfigService service = get(NetworkConfigService.class); 259 NetworkConfigService service = get(NetworkConfigService.class);
268 - service.removeConfig(service.getSubjectFactory(subjectKey).createSubject(subject), 260 + service.getSubjects(service.getSubjectFactory(subjectKey).getClass())
269 - service.getConfigClass(subjectKey, configKey)); 261 + .forEach(subject -> service.getConfigs(subject)
262 + .forEach(config -> service
263 + .removeConfig(subject, config.getClass())));
270 return Response.ok().build(); 264 return Response.ok().build();
271 } 265 }
272 266
273 -
274 /** 267 /**
275 - * Clears all network configurations. 268 + * Clear all network configurations for a subject.
276 * 269 *
270 + * @param subjectKey subject class key
271 + * @param subject subject key
277 * @return empty response 272 * @return empty response
278 */ 273 */
279 @DELETE 274 @DELETE
275 + @Path("{subjectKey}/{subject}")
280 @SuppressWarnings("unchecked") 276 @SuppressWarnings("unchecked")
281 - public Response delete() { 277 + public Response delete(@PathParam("subjectKey") String subjectKey,
278 + @PathParam("subject") String subject) {
282 NetworkConfigService service = get(NetworkConfigService.class); 279 NetworkConfigService service = get(NetworkConfigService.class);
283 - service.getSubjectClasses() 280 + Object s = service.getSubjectFactory(subjectKey).createSubject(subject);
284 - .forEach(subjectClass -> service.getSubjects(subjectClass) 281 + service.getConfigs(s).forEach(c -> service.removeConfig(s, c.getClass()));
285 - .forEach(subject -> service.getConfigs(subject)
286 - .forEach(config -> service
287 - .removeConfig(subject, config.getClass()))));
288 return Response.ok().build(); 282 return Response.ok().build();
289 } 283 }
290 284
291 -
292 - // TODO: this one below doesn't work correctly
293 /** 285 /**
294 - * Clears network configuration for the specified subject class. 286 + * Clear specific network configuration for a subject.
295 * 287 *
296 * @param subjectKey subject class key 288 * @param subjectKey subject class key
289 + * @param subject subject key
290 + * @param configKey configuration class key
297 * @return empty response 291 * @return empty response
298 */ 292 */
299 @DELETE 293 @DELETE
300 - @Path("{subjectKey}/") 294 + @Path("{subjectKey}/{subject}/{configKey}")
301 @SuppressWarnings("unchecked") 295 @SuppressWarnings("unchecked")
302 - public Response delete(@PathParam("subjectKey") String subjectKey) { 296 + public Response delete(@PathParam("subjectKey") String subjectKey,
297 + @PathParam("subject") String subject,
298 + @PathParam("configKey") String configKey) {
303 NetworkConfigService service = get(NetworkConfigService.class); 299 NetworkConfigService service = get(NetworkConfigService.class);
304 - service.getSubjects(service.getSubjectFactory(subjectKey).getClass()) 300 + service.removeConfig(service.getSubjectFactory(subjectKey).createSubject(subject),
305 - .forEach(subject -> service.getConfigs(subject) 301 + service.getConfigClass(subjectKey, configKey));
306 - .forEach(config -> service
307 - .removeConfig(subject, config.getClass())));
308 return Response.ok().build(); 302 return Response.ok().build();
309 } 303 }
304 +
310 } 305 }
......
...@@ -33,7 +33,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; ...@@ -33,7 +33,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
33 import org.onosproject.rest.AbstractWebResource; 33 import org.onosproject.rest.AbstractWebResource;
34 34
35 /** 35 /**
36 - * REST resource for interacting with path calculations. 36 + * Compute paths in the network graph.
37 */ 37 */
38 @Path("paths") 38 @Path("paths")
39 public class PathsWebResource extends AbstractWebResource { 39 public class PathsWebResource extends AbstractWebResource {
...@@ -46,19 +46,15 @@ public class PathsWebResource extends AbstractWebResource { ...@@ -46,19 +46,15 @@ public class PathsWebResource extends AbstractWebResource {
46 * @return HostId if the id is valid, null otherwise 46 * @return HostId if the id is valid, null otherwise
47 */ 47 */
48 private HostId isHostId(String id) { 48 private HostId isHostId(String id) {
49 - 49 + return id.matches("..:..:..:..:..:../.*") ? HostId.hostId(id) : null;
50 - if (!id.matches("..:..:..:..:..:../.*")) {
51 - return null;
52 - }
53 -
54 - return HostId.hostId(id);
55 } 50 }
56 51
57 /** 52 /**
58 - * Gets the paths between two elements. 53 + * Get all shortest paths between any two hosts or devices.
54 + * Returns array of all shortest paths between any two elements.
59 * 55 *
60 - * @param src source 56 + * @param src source identifier
61 - * @param dst destination 57 + * @param dst destination identifier
62 * @return path data 58 * @return path data
63 */ 59 */
64 @GET 60 @GET
...@@ -81,10 +77,8 @@ public class PathsWebResource extends AbstractWebResource { ...@@ -81,10 +77,8 @@ public class PathsWebResource extends AbstractWebResource {
81 dstElement = DeviceId.deviceId(dst); 77 dstElement = DeviceId.deviceId(dst);
82 } 78 }
83 79
84 - Set<org.onosproject.net.Path> paths = 80 + Set<org.onosproject.net.Path> paths = pathService.getPaths(srcElement, dstElement);
85 - pathService.getPaths(srcElement, dstElement); 81 + ObjectNode root = encodeArray(org.onosproject.net.Path.class, "paths", paths);
86 - ObjectNode root =
87 - encodeArray(org.onosproject.net.Path.class, "paths", paths);
88 return ok(root).build(); 82 return ok(root).build();
89 } 83 }
90 84
......
...@@ -44,7 +44,7 @@ import static org.onosproject.net.DeviceId.deviceId; ...@@ -44,7 +44,7 @@ import static org.onosproject.net.DeviceId.deviceId;
44 import static org.onosproject.net.PortNumber.portNumber; 44 import static org.onosproject.net.PortNumber.portNumber;
45 45
46 /** 46 /**
47 - * Statistics REST APIs. 47 + * Query flow statistics.
48 */ 48 */
49 @Path("statistics") 49 @Path("statistics")
50 public class StatisticsWebResource extends AbstractWebResource { 50 public class StatisticsWebResource extends AbstractWebResource {
...@@ -52,7 +52,7 @@ public class StatisticsWebResource extends AbstractWebResource { ...@@ -52,7 +52,7 @@ public class StatisticsWebResource extends AbstractWebResource {
52 UriInfo uriInfo; 52 UriInfo uriInfo;
53 53
54 /** 54 /**
55 - * Gets the Load statistics for all links, or for a specific link. 55 + * Get load statistics for all links or for a specific link.
56 * 56 *
57 * @param deviceId (optional) device ID for a specific link 57 * @param deviceId (optional) device ID for a specific link
58 * @param port (optional) port number for a specified link 58 * @param port (optional) port number for a specified link
...@@ -77,7 +77,6 @@ public class StatisticsWebResource extends AbstractWebResource { ...@@ -77,7 +77,6 @@ public class StatisticsWebResource extends AbstractWebResource {
77 JsonCodec<Load> loadCodec = codec(Load.class); 77 JsonCodec<Load> loadCodec = codec(Load.class);
78 StatisticService statsService = getService(StatisticService.class); 78 StatisticService statsService = getService(StatisticService.class);
79 79
80 -
81 StreamSupport.stream(Spliterators.spliteratorUnknownSize( 80 StreamSupport.stream(Spliterators.spliteratorUnknownSize(
82 links.iterator(), Spliterator.ORDERED), false) 81 links.iterator(), Spliterator.ORDERED), false)
83 .forEach(link -> { 82 .forEach(link -> {
......
...@@ -39,16 +39,15 @@ import java.util.List; ...@@ -39,16 +39,15 @@ import java.util.List;
39 import static org.onlab.util.Tools.nullIsNotFound; 39 import static org.onlab.util.Tools.nullIsNotFound;
40 40
41 /** 41 /**
42 - * REST resource for interacting with the inventory of clusters. 42 + * Query network topology graph and its components.
43 */ 43 */
44 -
45 @Path("topology") 44 @Path("topology")
46 public class TopologyWebResource extends AbstractWebResource { 45 public class TopologyWebResource extends AbstractWebResource {
47 46
48 public static final String CLUSTER_NOT_FOUND = "Cluster is not found"; 47 public static final String CLUSTER_NOT_FOUND = "Cluster is not found";
49 48
50 /** 49 /**
51 - * Gets the topology overview for a REST GET operation. 50 + * Get overview of current topology.
52 * 51 *
53 * @return topology overview 52 * @return topology overview
54 */ 53 */
...@@ -61,7 +60,7 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -61,7 +60,7 @@ public class TopologyWebResource extends AbstractWebResource {
61 } 60 }
62 61
63 /** 62 /**
64 - * Gets the topology clusters overview for a REST GET operation. 63 + * Get overview of topology SCCs.
65 * 64 *
66 * @return topology clusters overview 65 * @return topology clusters overview
67 */ 66 */
...@@ -77,7 +76,7 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -77,7 +76,7 @@ public class TopologyWebResource extends AbstractWebResource {
77 } 76 }
78 77
79 /** 78 /**
80 - * Gets details for a topology cluster for a REST GET operation. 79 + * Get details of a specific SCC.
81 * 80 *
82 * @param clusterId id of the cluster to query 81 * @param clusterId id of the cluster to query
83 * @return topology cluster details 82 * @return topology cluster details
...@@ -100,7 +99,7 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -100,7 +99,7 @@ public class TopologyWebResource extends AbstractWebResource {
100 } 99 }
101 100
102 /** 101 /**
103 - * Gets devices for a topology cluster for a REST GET operation. 102 + * Get devices in a specific SCC.
104 * 103 *
105 * @param clusterId id of the cluster to query 104 * @param clusterId id of the cluster to query
106 * @return topology cluster devices 105 * @return topology cluster devices
...@@ -123,7 +122,7 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -123,7 +122,7 @@ public class TopologyWebResource extends AbstractWebResource {
123 } 122 }
124 123
125 /** 124 /**
126 - * Gets links for a topology cluster for a REST GET operation. 125 + * Get links in specific SCC.
127 * 126 *
128 * @param clusterId id of the cluster to query 127 * @param clusterId id of the cluster to query
129 * @return topology cluster links 128 * @return topology cluster links
...@@ -171,18 +170,16 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -171,18 +170,16 @@ public class TopologyWebResource extends AbstractWebResource {
171 } 170 }
172 171
173 /** 172 /**
174 - * Gets the broadcast flag of a connect point for a REST GET operation. 173 + * Test if a connect point is in broadcast set.
175 * 174 *
176 - * @param connectPointString string representation of the connect point to query. 175 + * @param connectPointString deviceid:portnumber
177 - * Format is deviceid:portnumber
178 * @return JSON representation of true if the connect point is broadcast, 176 * @return JSON representation of true if the connect point is broadcast,
179 * false otherwise 177 * false otherwise
180 */ 178 */
181 @GET 179 @GET
182 @Produces(MediaType.APPLICATION_JSON) 180 @Produces(MediaType.APPLICATION_JSON)
183 @Path("broadcast/{connectPoint}") 181 @Path("broadcast/{connectPoint}")
184 - public Response getConnectPointBroadcast( 182 + public Response getConnectPointBroadcast(@PathParam("connectPoint") String connectPointString) {
185 - @PathParam("connectPoint") String connectPointString) {
186 Topology topology = get(TopologyService.class).currentTopology(); 183 Topology topology = get(TopologyService.class).currentTopology();
187 184
188 DeviceId deviceId = DeviceId.deviceId(getDeviceId(connectPointString)); 185 DeviceId deviceId = DeviceId.deviceId(getDeviceId(connectPointString));
...@@ -197,18 +194,16 @@ public class TopologyWebResource extends AbstractWebResource { ...@@ -197,18 +194,16 @@ public class TopologyWebResource extends AbstractWebResource {
197 } 194 }
198 195
199 /** 196 /**
200 - * Gets the infrastructure flag of a connect point for a REST GET operation. 197 + * Test if a connect point is infrastructure or edge.
201 * 198 *
202 - * @param connectPointString string representation of the connect point to query. 199 + * @param connectPointString deviceid:portnumber
203 - * Format is deviceid:portnumber
204 * @return JSON representation of true if the connect point is broadcast, 200 * @return JSON representation of true if the connect point is broadcast,
205 * false otherwise 201 * false otherwise
206 */ 202 */
207 @GET 203 @GET
208 @Produces(MediaType.APPLICATION_JSON) 204 @Produces(MediaType.APPLICATION_JSON)
209 @Path("infrastructure/{connectPoint}") 205 @Path("infrastructure/{connectPoint}")
210 - public Response getConnectPointInfrastructure( 206 + public Response getConnectPointInfrastructure(@PathParam("connectPoint") String connectPointString) {
211 - @PathParam("connectPoint") String connectPointString) {
212 Topology topology = get(TopologyService.class).currentTopology(); 207 Topology topology = get(TopologyService.class).currentTopology();
213 208
214 DeviceId deviceId = DeviceId.deviceId(getDeviceId(connectPointString)); 209 DeviceId deviceId = DeviceId.deviceId(getDeviceId(connectPointString));
......
1 +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
2 +.swagger-section pre code {
3 + display: block;
4 + padding: 0.5em;
5 + background: #F0F0F0;
6 +}
7 +.swagger-section pre code,
8 +.swagger-section pre .subst,
9 +.swagger-section pre .tag .title,
10 +.swagger-section pre .lisp .title,
11 +.swagger-section pre .clojure .built_in,
12 +.swagger-section pre .nginx .title {
13 + color: black;
14 +}
15 +.swagger-section pre .string,
16 +.swagger-section pre .title,
17 +.swagger-section pre .constant,
18 +.swagger-section pre .parent,
19 +.swagger-section pre .tag .value,
20 +.swagger-section pre .rules .value,
21 +.swagger-section pre .rules .value .number,
22 +.swagger-section pre .preprocessor,
23 +.swagger-section pre .ruby .symbol,
24 +.swagger-section pre .ruby .symbol .string,
25 +.swagger-section pre .aggregate,
26 +.swagger-section pre .template_tag,
27 +.swagger-section pre .django .variable,
28 +.swagger-section pre .smalltalk .class,
29 +.swagger-section pre .addition,
30 +.swagger-section pre .flow,
31 +.swagger-section pre .stream,
32 +.swagger-section pre .bash .variable,
33 +.swagger-section pre .apache .tag,
34 +.swagger-section pre .apache .cbracket,
35 +.swagger-section pre .tex .command,
36 +.swagger-section pre .tex .special,
37 +.swagger-section pre .erlang_repl .function_or_atom,
38 +.swagger-section pre .markdown .header {
39 + color: #800;
40 +}
41 +.swagger-section pre .comment,
42 +.swagger-section pre .annotation,
43 +.swagger-section pre .template_comment,
44 +.swagger-section pre .diff .header,
45 +.swagger-section pre .chunk,
46 +.swagger-section pre .markdown .blockquote {
47 + color: #888;
48 +}
49 +.swagger-section pre .number,
50 +.swagger-section pre .date,
51 +.swagger-section pre .regexp,
52 +.swagger-section pre .literal,
53 +.swagger-section pre .smalltalk .symbol,
54 +.swagger-section pre .smalltalk .char,
55 +.swagger-section pre .go .constant,
56 +.swagger-section pre .change,
57 +.swagger-section pre .markdown .bullet,
58 +.swagger-section pre .markdown .link_url {
59 + color: #080;
60 +}
61 +.swagger-section pre .label,
62 +.swagger-section pre .javadoc,
63 +.swagger-section pre .ruby .string,
64 +.swagger-section pre .decorator,
65 +.swagger-section pre .filter .argument,
66 +.swagger-section pre .localvars,
67 +.swagger-section pre .array,
68 +.swagger-section pre .attr_selector,
69 +.swagger-section pre .important,
70 +.swagger-section pre .pseudo,
71 +.swagger-section pre .pi,
72 +.swagger-section pre .doctype,
73 +.swagger-section pre .deletion,
74 +.swagger-section pre .envvar,
75 +.swagger-section pre .shebang,
76 +.swagger-section pre .apache .sqbracket,
77 +.swagger-section pre .nginx .built_in,
78 +.swagger-section pre .tex .formula,
79 +.swagger-section pre .erlang_repl .reserved,
80 +.swagger-section pre .prompt,
81 +.swagger-section pre .markdown .link_label,
82 +.swagger-section pre .vhdl .attribute,
83 +.swagger-section pre .clojure .attribute,
84 +.swagger-section pre .coffeescript .property {
85 + color: #8888ff;
86 +}
87 +.swagger-section pre .keyword,
88 +.swagger-section pre .id,
89 +.swagger-section pre .phpdoc,
90 +.swagger-section pre .title,
91 +.swagger-section pre .built_in,
92 +.swagger-section pre .aggregate,
93 +.swagger-section pre .css .tag,
94 +.swagger-section pre .javadoctag,
95 +.swagger-section pre .phpdoc,
96 +.swagger-section pre .yardoctag,
97 +.swagger-section pre .smalltalk .class,
98 +.swagger-section pre .winutils,
99 +.swagger-section pre .bash .variable,
100 +.swagger-section pre .apache .tag,
101 +.swagger-section pre .go .typename,
102 +.swagger-section pre .tex .command,
103 +.swagger-section pre .markdown .strong,
104 +.swagger-section pre .request,
105 +.swagger-section pre .status {
106 + font-weight: bold;
107 +}
108 +.swagger-section pre .markdown .emphasis {
109 + font-style: italic;
110 +}
111 +.swagger-section pre .nginx .built_in {
112 + font-weight: normal;
113 +}
114 +.swagger-section pre .coffeescript .javascript,
115 +.swagger-section pre .javascript .xml,
116 +.swagger-section pre .tex .formula,
117 +.swagger-section pre .xml .javascript,
118 +.swagger-section pre .xml .vbscript,
119 +.swagger-section pre .xml .css,
120 +.swagger-section pre .xml .cdata {
121 + opacity: 0.5;
122 +}
123 +.swagger-section .swagger-ui-wrap {
124 + line-height: 1;
125 + font-family: "Droid Sans", sans-serif;
126 + max-width: 960px;
127 + margin-left: auto;
128 + margin-right: auto;
129 +}
130 +.swagger-section .swagger-ui-wrap b,
131 +.swagger-section .swagger-ui-wrap strong {
132 + font-family: "Droid Sans", sans-serif;
133 + font-weight: bold;
134 +}
135 +.swagger-section .swagger-ui-wrap q,
136 +.swagger-section .swagger-ui-wrap blockquote {
137 + quotes: none;
138 +}
139 +.swagger-section .swagger-ui-wrap p {
140 + line-height: 1.4em;
141 + padding: 0 0 10px;
142 + color: #333333;
143 +}
144 +.swagger-section .swagger-ui-wrap q:before,
145 +.swagger-section .swagger-ui-wrap q:after,
146 +.swagger-section .swagger-ui-wrap blockquote:before,
147 +.swagger-section .swagger-ui-wrap blockquote:after {
148 + content: none;
149 +}
150 +.swagger-section .swagger-ui-wrap .heading_with_menu h1,
151 +.swagger-section .swagger-ui-wrap .heading_with_menu h2,
152 +.swagger-section .swagger-ui-wrap .heading_with_menu h3,
153 +.swagger-section .swagger-ui-wrap .heading_with_menu h4,
154 +.swagger-section .swagger-ui-wrap .heading_with_menu h5,
155 +.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
156 + display: block;
157 + clear: none;
158 + float: left;
159 + -moz-box-sizing: border-box;
160 + -webkit-box-sizing: border-box;
161 + -ms-box-sizing: border-box;
162 + box-sizing: border-box;
163 + width: 60%;
164 +}
165 +.swagger-section .swagger-ui-wrap table {
166 + border-collapse: collapse;
167 + border-spacing: 0;
168 +}
169 +.swagger-section .swagger-ui-wrap table thead tr th {
170 + padding: 5px;
171 + font-size: 0.9em;
172 + color: #666666;
173 + border-bottom: 1px solid #999999;
174 +}
175 +.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
176 + border-bottom: none;
177 +}
178 +.swagger-section .swagger-ui-wrap table tbody tr.offset {
179 + background-color: #f0f0f0;
180 +}
181 +.swagger-section .swagger-ui-wrap table tbody tr td {
182 + padding: 6px;
183 + font-size: 0.9em;
184 + border-bottom: 1px solid #cccccc;
185 + vertical-align: top;
186 + line-height: 1.3em;
187 +}
188 +.swagger-section .swagger-ui-wrap ol {
189 + margin: 0px 0 10px;
190 + padding: 0 0 0 18px;
191 + list-style-type: decimal;
192 +}
193 +.swagger-section .swagger-ui-wrap ol li {
194 + padding: 5px 0px;
195 + font-size: 0.9em;
196 + color: #333333;
197 +}
198 +.swagger-section .swagger-ui-wrap ol,
199 +.swagger-section .swagger-ui-wrap ul {
200 + list-style: none;
201 +}
202 +.swagger-section .swagger-ui-wrap h1 a,
203 +.swagger-section .swagger-ui-wrap h2 a,
204 +.swagger-section .swagger-ui-wrap h3 a,
205 +.swagger-section .swagger-ui-wrap h4 a,
206 +.swagger-section .swagger-ui-wrap h5 a,
207 +.swagger-section .swagger-ui-wrap h6 a {
208 + text-decoration: none;
209 +}
210 +.swagger-section .swagger-ui-wrap h1 a:hover,
211 +.swagger-section .swagger-ui-wrap h2 a:hover,
212 +.swagger-section .swagger-ui-wrap h3 a:hover,
213 +.swagger-section .swagger-ui-wrap h4 a:hover,
214 +.swagger-section .swagger-ui-wrap h5 a:hover,
215 +.swagger-section .swagger-ui-wrap h6 a:hover {
216 + text-decoration: underline;
217 +}
218 +.swagger-section .swagger-ui-wrap h1 span.divider,
219 +.swagger-section .swagger-ui-wrap h2 span.divider,
220 +.swagger-section .swagger-ui-wrap h3 span.divider,
221 +.swagger-section .swagger-ui-wrap h4 span.divider,
222 +.swagger-section .swagger-ui-wrap h5 span.divider,
223 +.swagger-section .swagger-ui-wrap h6 span.divider {
224 + color: #aaaaaa;
225 +}
226 +.swagger-section .swagger-ui-wrap a {
227 + color: #547f00;
228 +}
229 +.swagger-section .swagger-ui-wrap a img {
230 + border: none;
231 +}
232 +.swagger-section .swagger-ui-wrap article,
233 +.swagger-section .swagger-ui-wrap aside,
234 +.swagger-section .swagger-ui-wrap details,
235 +.swagger-section .swagger-ui-wrap figcaption,
236 +.swagger-section .swagger-ui-wrap figure,
237 +.swagger-section .swagger-ui-wrap footer,
238 +.swagger-section .swagger-ui-wrap header,
239 +.swagger-section .swagger-ui-wrap hgroup,
240 +.swagger-section .swagger-ui-wrap menu,
241 +.swagger-section .swagger-ui-wrap nav,
242 +.swagger-section .swagger-ui-wrap section,
243 +.swagger-section .swagger-ui-wrap summary {
244 + display: block;
245 +}
246 +.swagger-section .swagger-ui-wrap pre {
247 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
248 + background-color: #fcf6db;
249 + border: 1px solid #e5e0c6;
250 + padding: 10px;
251 +}
252 +.swagger-section .swagger-ui-wrap pre code {
253 + line-height: 1.6em;
254 + background: none;
255 +}
256 +.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
257 + clear: both;
258 + display: block;
259 + color: #0F6AB4;
260 + font-size: 1.1em;
261 + margin: 0;
262 + padding: 15px 0 5px;
263 +}
264 +.swagger-section .swagger-ui-wrap .content pre {
265 + font-size: 12px;
266 + margin-top: 5px;
267 + padding: 5px;
268 +}
269 +.swagger-section .swagger-ui-wrap .icon-btn {
270 + cursor: pointer;
271 +}
272 +.swagger-section .swagger-ui-wrap .info_title {
273 + padding-bottom: 10px;
274 + font-weight: bold;
275 + font-size: 25px;
276 +}
277 +.swagger-section .swagger-ui-wrap .footer {
278 + margin-top: 20px;
279 +}
280 +.swagger-section .swagger-ui-wrap p.big,
281 +.swagger-section .swagger-ui-wrap div.big p {
282 + font-size: 1em;
283 + margin-bottom: 10px;
284 +}
285 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
286 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
287 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
288 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
289 + width: 500px !important;
290 +}
291 +.swagger-section .swagger-ui-wrap .info_license {
292 + padding-bottom: 5px;
293 +}
294 +.swagger-section .swagger-ui-wrap .info_tos {
295 + padding-bottom: 5px;
296 +}
297 +.swagger-section .swagger-ui-wrap .message-fail {
298 + color: #cc0000;
299 +}
300 +.swagger-section .swagger-ui-wrap .info_url {
301 + padding-bottom: 5px;
302 +}
303 +.swagger-section .swagger-ui-wrap .info_email {
304 + padding-bottom: 5px;
305 +}
306 +.swagger-section .swagger-ui-wrap .info_name {
307 + padding-bottom: 5px;
308 +}
309 +.swagger-section .swagger-ui-wrap .info_description {
310 + padding-bottom: 10px;
311 + font-size: 15px;
312 +}
313 +.swagger-section .swagger-ui-wrap .markdown ol li,
314 +.swagger-section .swagger-ui-wrap .markdown ul li {
315 + padding: 3px 0px;
316 + line-height: 1.4em;
317 + color: #333333;
318 +}
319 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
320 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
321 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
322 + display: block;
323 + padding: 4px;
324 + width: auto;
325 + clear: both;
326 +}
327 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
328 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
329 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
330 + font-size: 1.3em;
331 +}
332 +.swagger-section .swagger-ui-wrap table.fullwidth {
333 + width: 100%;
334 +}
335 +.swagger-section .swagger-ui-wrap .model-signature {
336 + font-family: "Droid Sans", sans-serif;
337 + font-size: 1em;
338 + line-height: 1.5em;
339 +}
340 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
341 + text-decoration: none;
342 + color: #AAA;
343 +}
344 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
345 + text-decoration: underline;
346 + color: black;
347 +}
348 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
349 + color: black;
350 + text-decoration: none;
351 +}
352 +.swagger-section .swagger-ui-wrap .model-signature .propType {
353 + color: #5555aa;
354 +}
355 +.swagger-section .swagger-ui-wrap .model-signature pre:hover {
356 + background-color: #ffffdd;
357 +}
358 +.swagger-section .swagger-ui-wrap .model-signature pre {
359 + font-size: .85em;
360 + line-height: 1.2em;
361 + overflow: auto;
362 + max-height: 200px;
363 + cursor: pointer;
364 +}
365 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
366 + display: block;
367 + margin: 0;
368 + padding: 0;
369 +}
370 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
371 + padding-right: 0;
372 + border-right: none;
373 +}
374 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
375 + float: left;
376 + margin: 0 5px 5px 0;
377 + padding: 2px 5px 2px 0;
378 + border-right: 1px solid #ddd;
379 +}
380 +.swagger-section .swagger-ui-wrap .model-signature .propOpt {
381 + color: #555;
382 +}
383 +.swagger-section .swagger-ui-wrap .model-signature .snippet small {
384 + font-size: 0.75em;
385 +}
386 +.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
387 + font-style: italic;
388 +}
389 +.swagger-section .swagger-ui-wrap .model-signature .description .strong {
390 + font-weight: bold;
391 + color: #000;
392 + font-size: .9em;
393 +}
394 +.swagger-section .swagger-ui-wrap .model-signature .description div {
395 + font-size: 0.9em;
396 + line-height: 1.5em;
397 + margin-left: 1em;
398 +}
399 +.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
400 + font-weight: bold;
401 + color: #000;
402 +}
403 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
404 + border-spacing: 0;
405 + position: absolute;
406 + background-color: #ffffff;
407 + border: 1px solid #bbbbbb;
408 + display: none;
409 + font-size: 11px;
410 + max-width: 400px;
411 + line-height: 30px;
412 + color: black;
413 + padding: 5px;
414 + margin-left: 10px;
415 +}
416 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
417 + text-align: center;
418 + background-color: #eeeeee;
419 + border: 1px solid #bbbbbb;
420 + font-size: 11px;
421 + color: #666666;
422 + font-weight: bold;
423 + padding: 5px;
424 + line-height: 15px;
425 +}
426 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
427 + font-weight: bold;
428 +}
429 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
430 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
431 + display: inline;
432 +}
433 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
434 + display: block;
435 + content: '';
436 +}
437 +.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
438 + margin-right: -3px;
439 +}
440 +.swagger-section .swagger-ui-wrap .model-signature .propName {
441 + font-weight: bold;
442 +}
443 +.swagger-section .swagger-ui-wrap .model-signature .signature-container {
444 + clear: both;
445 +}
446 +.swagger-section .swagger-ui-wrap .body-textarea {
447 + width: 300px;
448 + height: 100px;
449 + border: 1px solid #aaa;
450 +}
451 +.swagger-section .swagger-ui-wrap .markdown p code,
452 +.swagger-section .swagger-ui-wrap .markdown li code {
453 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
454 + background-color: #f0f0f0;
455 + color: black;
456 + padding: 1px 3px;
457 +}
458 +.swagger-section .swagger-ui-wrap .required {
459 + font-weight: bold;
460 +}
461 +.swagger-section .swagger-ui-wrap input.parameter {
462 + width: 300px;
463 + border: 1px solid #aaa;
464 +}
465 +.swagger-section .swagger-ui-wrap h1 {
466 + color: black;
467 + font-size: 1.5em;
468 + line-height: 1.3em;
469 + padding: 10px 0 10px 0;
470 + font-family: "Droid Sans", sans-serif;
471 + font-weight: bold;
472 +}
473 +.swagger-section .swagger-ui-wrap .heading_with_menu {
474 + float: none;
475 + clear: both;
476 + overflow: hidden;
477 + display: block;
478 +}
479 +.swagger-section .swagger-ui-wrap .heading_with_menu ul {
480 + display: block;
481 + clear: none;
482 + float: right;
483 + -moz-box-sizing: border-box;
484 + -webkit-box-sizing: border-box;
485 + -ms-box-sizing: border-box;
486 + box-sizing: border-box;
487 + margin-top: 10px;
488 +}
489 +.swagger-section .swagger-ui-wrap h2 {
490 + color: black;
491 + font-size: 1.3em;
492 + padding: 10px 0 10px 0;
493 +}
494 +.swagger-section .swagger-ui-wrap h2 a {
495 + color: black;
496 +}
497 +.swagger-section .swagger-ui-wrap h2 span.sub {
498 + font-size: 0.7em;
499 + color: #999999;
500 + font-style: italic;
501 +}
502 +.swagger-section .swagger-ui-wrap h2 span.sub a {
503 + color: #777777;
504 +}
505 +.swagger-section .swagger-ui-wrap span.weak {
506 + color: #666666;
507 +}
508 +.swagger-section .swagger-ui-wrap .message-success {
509 + color: #89BF04;
510 +}
511 +.swagger-section .swagger-ui-wrap caption,
512 +.swagger-section .swagger-ui-wrap th,
513 +.swagger-section .swagger-ui-wrap td {
514 + text-align: left;
515 + font-weight: normal;
516 + vertical-align: middle;
517 +}
518 +.swagger-section .swagger-ui-wrap .code {
519 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
520 +}
521 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
522 + font-family: "Droid Sans", sans-serif;
523 + height: 250px;
524 + padding: 4px;
525 + display: block;
526 + clear: both;
527 +}
528 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
529 + display: block;
530 + clear: both;
531 +}
532 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
533 + float: none;
534 + clear: both;
535 + overflow: hidden;
536 + display: block;
537 +}
538 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
539 + display: block;
540 + float: left;
541 + clear: none;
542 + margin: 0;
543 + padding: 0;
544 +}
545 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
546 + display: block;
547 + float: left;
548 + clear: none;
549 + margin: 0 5px 0 0;
550 +}
551 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
552 + color: black;
553 +}
554 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
555 + display: block;
556 + clear: both;
557 + width: auto;
558 + padding: 0 0 3px;
559 + color: #666666;
560 +}
561 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
562 + padding-left: 3px;
563 + color: #888888;
564 +}
565 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
566 + margin-left: 0;
567 + font-style: italic;
568 + font-size: 0.9em;
569 + margin: 0;
570 +}
571 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
572 + margin: 0;
573 + padding: 0;
574 +}
575 +.swagger-section .swagger-ui-wrap span.blank,
576 +.swagger-section .swagger-ui-wrap span.empty {
577 + color: #888888;
578 + font-style: italic;
579 +}
580 +.swagger-section .swagger-ui-wrap .markdown h3 {
581 + color: #547f00;
582 +}
583 +.swagger-section .swagger-ui-wrap .markdown h4 {
584 + color: #666666;
585 +}
586 +.swagger-section .swagger-ui-wrap .markdown pre {
587 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
588 + background-color: #fcf6db;
589 + border: 1px solid #e5e0c6;
590 + padding: 10px;
591 + margin: 0 0 10px 0;
592 +}
593 +.swagger-section .swagger-ui-wrap .markdown pre code {
594 + line-height: 1.6em;
595 +}
596 +.swagger-section .swagger-ui-wrap div.gist {
597 + margin: 20px 0 25px 0 !important;
598 +}
599 +.swagger-section .swagger-ui-wrap ul#resources {
600 + font-family: "Droid Sans", sans-serif;
601 + font-size: 0.9em;
602 +}
603 +.swagger-section .swagger-ui-wrap ul#resources li.resource {
604 + border-bottom: 1px solid #dddddd;
605 +}
606 +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
607 +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
608 + color: black;
609 +}
610 +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
611 +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
612 + color: #555555;
613 +}
614 +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
615 + border-bottom: none;
616 +}
617 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
618 + border: 1px solid transparent;
619 + float: none;
620 + clear: both;
621 + overflow: hidden;
622 + display: block;
623 +}
624 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
625 + overflow: hidden;
626 + padding: 0;
627 + display: block;
628 + clear: none;
629 + float: right;
630 + margin: 14px 10px 0 0;
631 +}
632 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
633 + float: left;
634 + clear: none;
635 + margin: 0;
636 + padding: 2px 10px;
637 + border-right: 1px solid #dddddd;
638 + color: #666666;
639 + font-size: 0.9em;
640 +}
641 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
642 + color: #aaaaaa;
643 + text-decoration: none;
644 +}
645 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
646 + text-decoration: underline;
647 + color: black;
648 +}
649 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
650 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
651 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
652 + text-decoration: underline;
653 +}
654 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
655 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
656 + padding-left: 0;
657 +}
658 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
659 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
660 + padding-right: 0;
661 + border-right: none;
662 +}
663 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
664 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
665 + padding-left: 0;
666 +}
667 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
668 + color: #999999;
669 + padding-left: 0;
670 + display: block;
671 + clear: none;
672 + float: left;
673 + font-family: "Droid Sans", sans-serif;
674 + font-weight: bold;
675 +}
676 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
677 + color: #999999;
678 +}
679 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
680 + color: black;
681 +}
682 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
683 + float: none;
684 + clear: both;
685 + overflow: hidden;
686 + display: block;
687 + margin: 0 0 10px;
688 + padding: 0;
689 +}
690 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
691 + float: none;
692 + clear: both;
693 + overflow: hidden;
694 + display: block;
695 + margin: 0;
696 + padding: 0;
697 +}
698 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
699 + display: block;
700 + clear: none;
701 + float: left;
702 + width: auto;
703 + margin: 0;
704 + padding: 0;
705 + line-height: 1.1em;
706 + color: black;
707 +}
708 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
709 + padding-left: 10px;
710 +}
711 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
712 + color: black;
713 + text-decoration: none;
714 +}
715 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
716 + text-decoration: underline;
717 +}
718 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
719 + text-transform: uppercase;
720 + text-decoration: none;
721 + color: white;
722 + display: inline-block;
723 + width: 50px;
724 + font-size: 0.7em;
725 + text-align: center;
726 + padding: 7px 0 4px;
727 + -moz-border-radius: 2px;
728 + -webkit-border-radius: 2px;
729 + -o-border-radius: 2px;
730 + -ms-border-radius: 2px;
731 + -khtml-border-radius: 2px;
732 + border-radius: 2px;
733 +}
734 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
735 + margin: 0;
736 + padding: 0;
737 +}
738 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
739 + overflow: hidden;
740 + padding: 0;
741 + display: block;
742 + clear: none;
743 + float: right;
744 + margin: 6px 10px 0 0;
745 +}
746 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
747 + float: left;
748 + clear: none;
749 + margin: 0;
750 + padding: 2px 10px;
751 + font-size: 0.9em;
752 +}
753 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
754 + text-decoration: none;
755 +}
756 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
757 + color: black;
758 +}
759 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
760 + border-top: none;
761 + padding: 10px;
762 + -moz-border-radius-bottomleft: 6px;
763 + -webkit-border-bottom-left-radius: 6px;
764 + -o-border-bottom-left-radius: 6px;
765 + -ms-border-bottom-left-radius: 6px;
766 + -khtml-border-bottom-left-radius: 6px;
767 + border-bottom-left-radius: 6px;
768 + -moz-border-radius-bottomright: 6px;
769 + -webkit-border-bottom-right-radius: 6px;
770 + -o-border-bottom-right-radius: 6px;
771 + -ms-border-bottom-right-radius: 6px;
772 + -khtml-border-bottom-right-radius: 6px;
773 + border-bottom-right-radius: 6px;
774 + margin: 0 0 20px;
775 +}
776 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
777 + font-size: 1.1em;
778 + margin: 0;
779 + padding: 15px 0 5px;
780 +}
781 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
782 + float: none;
783 + clear: both;
784 + overflow: hidden;
785 + display: block;
786 +}
787 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
788 + padding: 4px 0 0 10px;
789 + display: inline-block;
790 + font-size: 0.9em;
791 +}
792 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
793 + display: block;
794 + clear: none;
795 + float: left;
796 + padding: 6px 8px;
797 +}
798 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
799 + background-image: url('../images/throbber.gif');
800 + width: 128px;
801 + height: 16px;
802 + display: block;
803 + clear: none;
804 + float: right;
805 +}
806 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
807 + outline: 2px solid black;
808 + outline-color: #cc0000;
809 +}
810 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
811 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
812 + padding: 10px;
813 + font-size: 0.9em;
814 + max-height: 400px;
815 + overflow-y: auto;
816 +}
817 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
818 + background-color: #f9f2e9;
819 + border: 1px solid #f0e0ca;
820 +}
821 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
822 + background-color: #c5862b;
823 +}
824 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
825 + border-right: 1px solid #dddddd;
826 + border-right-color: #f0e0ca;
827 + color: #c5862b;
828 +}
829 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
830 + color: #c5862b;
831 +}
832 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
833 + background-color: #faf5ee;
834 + border: 1px solid #f0e0ca;
835 +}
836 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
837 + color: #c5862b;
838 +}
839 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
840 + color: #dcb67f;
841 +}
842 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
843 + background-color: #fcffcd;
844 + border: 1px solid black;
845 + border-color: #ffd20f;
846 +}
847 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
848 + text-transform: uppercase;
849 + background-color: #ffd20f;
850 +}
851 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
852 + border-right: 1px solid #dddddd;
853 + border-right-color: #ffd20f;
854 + color: #ffd20f;
855 +}
856 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
857 + color: #ffd20f;
858 +}
859 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
860 + background-color: #fcffcd;
861 + border: 1px solid black;
862 + border-color: #ffd20f;
863 +}
864 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
865 + color: #ffd20f;
866 +}
867 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
868 + color: #6fc992;
869 +}
870 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
871 + background-color: #f5e8e8;
872 + border: 1px solid #e8c6c7;
873 +}
874 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
875 + text-transform: uppercase;
876 + background-color: #a41e22;
877 +}
878 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
879 + border-right: 1px solid #dddddd;
880 + border-right-color: #e8c6c7;
881 + color: #a41e22;
882 +}
883 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
884 + color: #a41e22;
885 +}
886 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
887 + background-color: #f7eded;
888 + border: 1px solid #e8c6c7;
889 +}
890 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
891 + color: #a41e22;
892 +}
893 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
894 + color: #c8787a;
895 +}
896 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
897 + background-color: #e7f6ec;
898 + border: 1px solid #c3e8d1;
899 +}
900 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
901 + background-color: #10a54a;
902 +}
903 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
904 + border-right: 1px solid #dddddd;
905 + border-right-color: #c3e8d1;
906 + color: #10a54a;
907 +}
908 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
909 + color: #10a54a;
910 +}
911 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
912 + background-color: #ebf7f0;
913 + border: 1px solid #c3e8d1;
914 +}
915 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
916 + color: #10a54a;
917 +}
918 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
919 + color: #6fc992;
920 +}
921 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
922 + background-color: #FCE9E3;
923 + border: 1px solid #F5D5C3;
924 +}
925 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
926 + background-color: #D38042;
927 +}
928 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
929 + border-right: 1px solid #dddddd;
930 + border-right-color: #f0cecb;
931 + color: #D38042;
932 +}
933 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
934 + color: #D38042;
935 +}
936 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
937 + background-color: #faf0ef;
938 + border: 1px solid #f0cecb;
939 +}
940 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
941 + color: #D38042;
942 +}
943 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
944 + color: #dcb67f;
945 +}
946 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
947 + background-color: #e7f0f7;
948 + border: 1px solid #c3d9ec;
949 +}
950 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
951 + background-color: #0f6ab4;
952 +}
953 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
954 + border-right: 1px solid #dddddd;
955 + border-right-color: #c3d9ec;
956 + color: #0f6ab4;
957 +}
958 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
959 + color: #0f6ab4;
960 +}
961 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
962 + background-color: #ebf3f9;
963 + border: 1px solid #c3d9ec;
964 +}
965 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
966 + color: #0f6ab4;
967 +}
968 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
969 + color: #6fa5d2;
970 +}
971 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
972 + background-color: #e7f0f7;
973 + border: 1px solid #c3d9ec;
974 +}
975 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
976 + background-color: #0f6ab4;
977 +}
978 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
979 + border-right: 1px solid #dddddd;
980 + border-right-color: #c3d9ec;
981 + color: #0f6ab4;
982 +}
983 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
984 + color: #0f6ab4;
985 +}
986 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
987 + background-color: #ebf3f9;
988 + border: 1px solid #c3d9ec;
989 +}
990 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
991 + color: #0f6ab4;
992 +}
993 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
994 + color: #6fa5d2;
995 +}
996 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
997 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
998 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
999 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
1000 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
1001 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
1002 + border-top: none;
1003 +}
1004 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
1005 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
1006 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
1007 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
1008 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
1009 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
1010 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
1011 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
1012 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
1013 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
1014 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
1015 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
1016 + padding-right: 0;
1017 + border-right: none;
1018 +}
1019 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
1020 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
1021 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
1022 + text-decoration: underline;
1023 +}
1024 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
1025 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
1026 + padding-left: 0;
1027 +}
1028 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
1029 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
1030 + padding-left: 0;
1031 +}
1032 +.swagger-section .swagger-ui-wrap p#colophon {
1033 + margin: 0 15px 40px 15px;
1034 + padding: 10px 0;
1035 + font-size: 0.8em;
1036 + border-top: 1px solid #dddddd;
1037 + font-family: "Droid Sans", sans-serif;
1038 + color: #999999;
1039 + font-style: italic;
1040 +}
1041 +.swagger-section .swagger-ui-wrap p#colophon a {
1042 + text-decoration: none;
1043 + color: #547f00;
1044 +}
1045 +.swagger-section .swagger-ui-wrap h3 {
1046 + color: black;
1047 + font-size: 1.1em;
1048 + padding: 10px 0 10px 0;
1049 +}
1050 +.swagger-section .swagger-ui-wrap .markdown ol,
1051 +.swagger-section .swagger-ui-wrap .markdown ul {
1052 + font-family: "Droid Sans", sans-serif;
1053 + margin: 5px 0 10px;
1054 + padding: 0 0 0 18px;
1055 + list-style-type: disc;
1056 +}
1057 +.swagger-section .swagger-ui-wrap form.form_box {
1058 + background-color: #ebf3f9;
1059 + border: 1px solid #c3d9ec;
1060 + padding: 10px;
1061 +}
1062 +.swagger-section .swagger-ui-wrap form.form_box label {
1063 + color: #0f6ab4 !important;
1064 +}
1065 +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
1066 + display: block;
1067 + padding: 10px;
1068 +}
1069 +.swagger-section .swagger-ui-wrap form.form_box p.weak {
1070 + font-size: 0.8em;
1071 +}
1072 +.swagger-section .swagger-ui-wrap form.form_box p {
1073 + font-size: 0.9em;
1074 + padding: 0 0 15px;
1075 + color: #7e7b6d;
1076 +}
1077 +.swagger-section .swagger-ui-wrap form.form_box p a {
1078 + color: #646257;
1079 +}
1080 +.swagger-section .swagger-ui-wrap form.form_box p strong {
1081 + color: black;
1082 +}
1083 +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
1084 + padding-bottom: 0;
1085 +}
1086 +.swagger-section .title {
1087 + font-style: bold;
1088 +}
1089 +.swagger-section .secondary_form {
1090 + display: none;
1091 +}
1092 +.swagger-section .main_image {
1093 + display: block;
1094 + margin-left: auto;
1095 + margin-right: auto;
1096 +}
1097 +.swagger-section .oauth_body {
1098 + margin-left: 100px;
1099 + margin-right: 100px;
1100 +}
1101 +.swagger-section .oauth_submit {
1102 + text-align: center;
1103 +}
1104 +.swagger-section .api-popup-dialog {
1105 + z-index: 10000;
1106 + position: absolute;
1107 + width: 500px;
1108 + background: #FFF;
1109 + padding: 20px;
1110 + border: 1px solid #ccc;
1111 + border-radius: 5px;
1112 + display: none;
1113 + font-size: 13px;
1114 + color: #777;
1115 +}
1116 +.swagger-section .api-popup-dialog .api-popup-title {
1117 + font-size: 24px;
1118 + padding: 10px 0;
1119 +}
1120 +.swagger-section .api-popup-dialog .api-popup-title {
1121 + font-size: 24px;
1122 + padding: 10px 0;
1123 +}
1124 +.swagger-section .api-popup-dialog p.error-msg {
1125 + padding-left: 5px;
1126 + padding-bottom: 5px;
1127 +}
1128 +.swagger-section .api-popup-dialog button.api-popup-authbtn {
1129 + height: 30px;
1130 +}
1131 +.swagger-section .api-popup-dialog button.api-popup-cancel {
1132 + height: 30px;
1133 +}
1134 +.swagger-section .api-popup-scopes {
1135 + padding: 10px 20px;
1136 +}
1137 +.swagger-section .api-popup-scopes li {
1138 + padding: 5px 0;
1139 + line-height: 20px;
1140 +}
1141 +.swagger-section .api-popup-scopes .api-scope-desc {
1142 + padding-left: 20px;
1143 + font-style: italic;
1144 +}
1145 +.swagger-section .api-popup-scopes li input {
1146 + position: relative;
1147 + top: 2px;
1148 +}
1149 +.swagger-section .api-popup-actions {
1150 + padding-top: 10px;
1151 +}
1152 +#header {
1153 + display: none;
1154 +}
1155 +.swagger-section .swagger-ui-wrap .model-signature pre {
1156 + max-height: none;
1157 +}
1158 +.swagger-section .swagger-ui-wrap .body-textarea {
1159 + width: 100px;
1160 +}
1161 +.swagger-section .swagger-ui-wrap input.parameter {
1162 + width: 100px;
1163 +}
1164 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
1165 + display: none;
1166 +}
1167 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints {
1168 + display: block !important;
1169 +}
1170 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
1171 + display: block !important;
1172 +}
1 +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
2 +html,
3 +body,
4 +div,
5 +span,
6 +applet,
7 +object,
8 +iframe,
9 +h1,
10 +h2,
11 +h3,
12 +h4,
13 +h5,
14 +h6,
15 +p,
16 +blockquote,
17 +pre,
18 +a,
19 +abbr,
20 +acronym,
21 +address,
22 +big,
23 +cite,
24 +code,
25 +del,
26 +dfn,
27 +em,
28 +img,
29 +ins,
30 +kbd,
31 +q,
32 +s,
33 +samp,
34 +small,
35 +strike,
36 +strong,
37 +sub,
38 +sup,
39 +tt,
40 +var,
41 +b,
42 +u,
43 +i,
44 +center,
45 +dl,
46 +dt,
47 +dd,
48 +ol,
49 +ul,
50 +li,
51 +fieldset,
52 +form,
53 +label,
54 +legend,
55 +table,
56 +caption,
57 +tbody,
58 +tfoot,
59 +thead,
60 +tr,
61 +th,
62 +td,
63 +article,
64 +aside,
65 +canvas,
66 +details,
67 +embed,
68 +figure,
69 +figcaption,
70 +footer,
71 +header,
72 +hgroup,
73 +menu,
74 +nav,
75 +output,
76 +ruby,
77 +section,
78 +summary,
79 +time,
80 +mark,
81 +audio,
82 +video {
83 + margin: 0;
84 + padding: 0;
85 + border: 0;
86 + font-size: 100%;
87 + font: inherit;
88 + vertical-align: baseline;
89 +}
90 +/* HTML5 display-role reset for older browsers */
91 +article,
92 +aside,
93 +details,
94 +figcaption,
95 +figure,
96 +footer,
97 +header,
98 +hgroup,
99 +menu,
100 +nav,
101 +section {
102 + display: block;
103 +}
104 +body {
105 + line-height: 1;
106 +}
107 +ol,
108 +ul {
109 + list-style: none;
110 +}
111 +blockquote,
112 +q {
113 + quotes: none;
114 +}
115 +blockquote:before,
116 +blockquote:after,
117 +q:before,
118 +q:after {
119 + content: '';
120 + content: none;
121 +}
122 +table {
123 + border-collapse: collapse;
124 + border-spacing: 0;
125 +}
1 +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
2 +.swagger-section pre code {
3 + display: block;
4 + padding: 0.5em;
5 + background: #F0F0F0;
6 +}
7 +.swagger-section pre code,
8 +.swagger-section pre .subst,
9 +.swagger-section pre .tag .title,
10 +.swagger-section pre .lisp .title,
11 +.swagger-section pre .clojure .built_in,
12 +.swagger-section pre .nginx .title {
13 + color: black;
14 +}
15 +.swagger-section pre .string,
16 +.swagger-section pre .title,
17 +.swagger-section pre .constant,
18 +.swagger-section pre .parent,
19 +.swagger-section pre .tag .value,
20 +.swagger-section pre .rules .value,
21 +.swagger-section pre .rules .value .number,
22 +.swagger-section pre .preprocessor,
23 +.swagger-section pre .ruby .symbol,
24 +.swagger-section pre .ruby .symbol .string,
25 +.swagger-section pre .aggregate,
26 +.swagger-section pre .template_tag,
27 +.swagger-section pre .django .variable,
28 +.swagger-section pre .smalltalk .class,
29 +.swagger-section pre .addition,
30 +.swagger-section pre .flow,
31 +.swagger-section pre .stream,
32 +.swagger-section pre .bash .variable,
33 +.swagger-section pre .apache .tag,
34 +.swagger-section pre .apache .cbracket,
35 +.swagger-section pre .tex .command,
36 +.swagger-section pre .tex .special,
37 +.swagger-section pre .erlang_repl .function_or_atom,
38 +.swagger-section pre .markdown .header {
39 + color: #800;
40 +}
41 +.swagger-section pre .comment,
42 +.swagger-section pre .annotation,
43 +.swagger-section pre .template_comment,
44 +.swagger-section pre .diff .header,
45 +.swagger-section pre .chunk,
46 +.swagger-section pre .markdown .blockquote {
47 + color: #888;
48 +}
49 +.swagger-section pre .number,
50 +.swagger-section pre .date,
51 +.swagger-section pre .regexp,
52 +.swagger-section pre .literal,
53 +.swagger-section pre .smalltalk .symbol,
54 +.swagger-section pre .smalltalk .char,
55 +.swagger-section pre .go .constant,
56 +.swagger-section pre .change,
57 +.swagger-section pre .markdown .bullet,
58 +.swagger-section pre .markdown .link_url {
59 + color: #080;
60 +}
61 +.swagger-section pre .label,
62 +.swagger-section pre .javadoc,
63 +.swagger-section pre .ruby .string,
64 +.swagger-section pre .decorator,
65 +.swagger-section pre .filter .argument,
66 +.swagger-section pre .localvars,
67 +.swagger-section pre .array,
68 +.swagger-section pre .attr_selector,
69 +.swagger-section pre .important,
70 +.swagger-section pre .pseudo,
71 +.swagger-section pre .pi,
72 +.swagger-section pre .doctype,
73 +.swagger-section pre .deletion,
74 +.swagger-section pre .envvar,
75 +.swagger-section pre .shebang,
76 +.swagger-section pre .apache .sqbracket,
77 +.swagger-section pre .nginx .built_in,
78 +.swagger-section pre .tex .formula,
79 +.swagger-section pre .erlang_repl .reserved,
80 +.swagger-section pre .prompt,
81 +.swagger-section pre .markdown .link_label,
82 +.swagger-section pre .vhdl .attribute,
83 +.swagger-section pre .clojure .attribute,
84 +.swagger-section pre .coffeescript .property {
85 + color: #8888ff;
86 +}
87 +.swagger-section pre .keyword,
88 +.swagger-section pre .id,
89 +.swagger-section pre .phpdoc,
90 +.swagger-section pre .title,
91 +.swagger-section pre .built_in,
92 +.swagger-section pre .aggregate,
93 +.swagger-section pre .css .tag,
94 +.swagger-section pre .javadoctag,
95 +.swagger-section pre .phpdoc,
96 +.swagger-section pre .yardoctag,
97 +.swagger-section pre .smalltalk .class,
98 +.swagger-section pre .winutils,
99 +.swagger-section pre .bash .variable,
100 +.swagger-section pre .apache .tag,
101 +.swagger-section pre .go .typename,
102 +.swagger-section pre .tex .command,
103 +.swagger-section pre .markdown .strong,
104 +.swagger-section pre .request,
105 +.swagger-section pre .status {
106 + font-weight: bold;
107 +}
108 +.swagger-section pre .markdown .emphasis {
109 + font-style: italic;
110 +}
111 +.swagger-section pre .nginx .built_in {
112 + font-weight: normal;
113 +}
114 +.swagger-section pre .coffeescript .javascript,
115 +.swagger-section pre .javascript .xml,
116 +.swagger-section pre .tex .formula,
117 +.swagger-section pre .xml .javascript,
118 +.swagger-section pre .xml .vbscript,
119 +.swagger-section pre .xml .css,
120 +.swagger-section pre .xml .cdata {
121 + opacity: 0.5;
122 +}
123 +.swagger-section .swagger-ui-wrap {
124 + line-height: 1;
125 + font-family: Helvetica, Arial, sans-serif;
126 + max-width: 960px;
127 + margin-left: auto;
128 + margin-right: auto;
129 +}
130 +.swagger-section .swagger-ui-wrap b,
131 +.swagger-section .swagger-ui-wrap strong {
132 + font-family: Helvetica, Arial, sans-serif;
133 + font-weight: bold;
134 +}
135 +.swagger-section .swagger-ui-wrap q,
136 +.swagger-section .swagger-ui-wrap blockquote {
137 + quotes: none;
138 +}
139 +.swagger-section .swagger-ui-wrap p {
140 + line-height: 1.4em;
141 + padding: 0 0 10px;
142 + color: #333333;
143 +}
144 +.swagger-section .swagger-ui-wrap q:before,
145 +.swagger-section .swagger-ui-wrap q:after,
146 +.swagger-section .swagger-ui-wrap blockquote:before,
147 +.swagger-section .swagger-ui-wrap blockquote:after {
148 + content: none;
149 +}
150 +.swagger-section .swagger-ui-wrap .heading_with_menu h1,
151 +.swagger-section .swagger-ui-wrap .heading_with_menu h2,
152 +.swagger-section .swagger-ui-wrap .heading_with_menu h3,
153 +.swagger-section .swagger-ui-wrap .heading_with_menu h4,
154 +.swagger-section .swagger-ui-wrap .heading_with_menu h5,
155 +.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
156 + display: block;
157 + clear: none;
158 + float: left;
159 + -moz-box-sizing: border-box;
160 + -webkit-box-sizing: border-box;
161 + -ms-box-sizing: border-box;
162 + box-sizing: border-box;
163 + width: 60%;
164 +}
165 +.swagger-section .swagger-ui-wrap table {
166 + border-collapse: collapse;
167 + border-spacing: 0;
168 +}
169 +.swagger-section .swagger-ui-wrap table thead tr th {
170 + padding: 5px;
171 + font-size: 0.9em;
172 + color: #666666;
173 + border-bottom: 1px solid #999999;
174 +}
175 +.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
176 + border-bottom: none;
177 +}
178 +.swagger-section .swagger-ui-wrap table tbody tr.offset {
179 + background-color: #f0f0f0;
180 +}
181 +.swagger-section .swagger-ui-wrap table tbody tr td {
182 + padding: 6px;
183 + font-size: 0.9em;
184 + border-bottom: 1px solid #cccccc;
185 + vertical-align: top;
186 + line-height: 1.3em;
187 +}
188 +.swagger-section .swagger-ui-wrap ol {
189 + margin: 0px 0 10px;
190 + padding: 0 0 0 18px;
191 + list-style-type: decimal;
192 +}
193 +.swagger-section .swagger-ui-wrap ol li {
194 + padding: 5px 0px;
195 + font-size: 0.9em;
196 + color: #333333;
197 +}
198 +.swagger-section .swagger-ui-wrap ol,
199 +.swagger-section .swagger-ui-wrap ul {
200 + list-style: none;
201 +}
202 +.swagger-section .swagger-ui-wrap h1 a,
203 +.swagger-section .swagger-ui-wrap h2 a,
204 +.swagger-section .swagger-ui-wrap h3 a,
205 +.swagger-section .swagger-ui-wrap h4 a,
206 +.swagger-section .swagger-ui-wrap h5 a,
207 +.swagger-section .swagger-ui-wrap h6 a {
208 + text-decoration: none;
209 +}
210 +.swagger-section .swagger-ui-wrap h1 a:hover,
211 +.swagger-section .swagger-ui-wrap h2 a:hover,
212 +.swagger-section .swagger-ui-wrap h3 a:hover,
213 +.swagger-section .swagger-ui-wrap h4 a:hover,
214 +.swagger-section .swagger-ui-wrap h5 a:hover,
215 +.swagger-section .swagger-ui-wrap h6 a:hover {
216 + text-decoration: underline;
217 +}
218 +.swagger-section .swagger-ui-wrap h1 span.divider,
219 +.swagger-section .swagger-ui-wrap h2 span.divider,
220 +.swagger-section .swagger-ui-wrap h3 span.divider,
221 +.swagger-section .swagger-ui-wrap h4 span.divider,
222 +.swagger-section .swagger-ui-wrap h5 span.divider,
223 +.swagger-section .swagger-ui-wrap h6 span.divider {
224 + color: #aaaaaa;
225 +}
226 +.swagger-section .swagger-ui-wrap a {
227 + color: #CE5650;
228 +}
229 +.swagger-section .swagger-ui-wrap a img {
230 + border: none;
231 +}
232 +.swagger-section .swagger-ui-wrap article,
233 +.swagger-section .swagger-ui-wrap aside,
234 +.swagger-section .swagger-ui-wrap details,
235 +.swagger-section .swagger-ui-wrap figcaption,
236 +.swagger-section .swagger-ui-wrap figure,
237 +.swagger-section .swagger-ui-wrap footer,
238 +.swagger-section .swagger-ui-wrap header,
239 +.swagger-section .swagger-ui-wrap hgroup,
240 +.swagger-section .swagger-ui-wrap menu,
241 +.swagger-section .swagger-ui-wrap nav,
242 +.swagger-section .swagger-ui-wrap section,
243 +.swagger-section .swagger-ui-wrap summary {
244 + display: block;
245 +}
246 +.swagger-section .swagger-ui-wrap pre {
247 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
248 + background-color: #fcf6db;
249 + border: 1px solid #e5e0c6;
250 + padding: 10px;
251 +}
252 +.swagger-section .swagger-ui-wrap pre code {
253 + line-height: 1.6em;
254 + background: none;
255 +}
256 +.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
257 + clear: both;
258 + display: block;
259 + color: #0F6AB4;
260 + font-size: 1.1em;
261 + margin: 0;
262 + padding: 15px 0 5px;
263 +}
264 +.swagger-section .swagger-ui-wrap .content pre {
265 + font-size: 12px;
266 + margin-top: 5px;
267 + padding: 5px;
268 +}
269 +.swagger-section .swagger-ui-wrap .icon-btn {
270 + cursor: pointer;
271 +}
272 +.swagger-section .swagger-ui-wrap .info_title {
273 + padding-bottom: 10px;
274 + font-weight: bold;
275 + font-size: 25px;
276 +}
277 +.swagger-section .swagger-ui-wrap .footer {
278 + margin-top: 20px;
279 +}
280 +.swagger-section .swagger-ui-wrap p.big,
281 +.swagger-section .swagger-ui-wrap div.big p {
282 + font-size: 1em;
283 + margin-bottom: 10px;
284 +}
285 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
286 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
287 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
288 +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
289 + width: 500px !important;
290 +}
291 +.swagger-section .swagger-ui-wrap .info_license {
292 + padding-bottom: 5px;
293 +}
294 +.swagger-section .swagger-ui-wrap .info_tos {
295 + padding-bottom: 5px;
296 +}
297 +.swagger-section .swagger-ui-wrap .message-fail {
298 + color: #cc0000;
299 +}
300 +.swagger-section .swagger-ui-wrap .info_url {
301 + padding-bottom: 5px;
302 +}
303 +.swagger-section .swagger-ui-wrap .info_email {
304 + padding-bottom: 5px;
305 +}
306 +.swagger-section .swagger-ui-wrap .info_name {
307 + padding-bottom: 5px;
308 +}
309 +.swagger-section .swagger-ui-wrap .info_description {
310 + padding-bottom: 10px;
311 + font-size: 15px;
312 +}
313 +.swagger-section .swagger-ui-wrap .markdown ol li,
314 +.swagger-section .swagger-ui-wrap .markdown ul li {
315 + padding: 3px 0px;
316 + line-height: 1.4em;
317 + color: #333333;
318 +}
319 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
320 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
321 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
322 + display: block;
323 + padding: 4px;
324 + width: auto;
325 + clear: both;
326 +}
327 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
328 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
329 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
330 + font-size: 1.3em;
331 +}
332 +.swagger-section .swagger-ui-wrap table.fullwidth {
333 + width: 100%;
334 +}
335 +.swagger-section .swagger-ui-wrap .model-signature {
336 + font-family: Helvetica, Arial, sans-serif;
337 + font-size: 1em;
338 + line-height: 1.5em;
339 +}
340 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
341 + text-decoration: none;
342 + color: #AAA;
343 +}
344 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
345 + text-decoration: underline;
346 + color: black;
347 +}
348 +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
349 + color: black;
350 + text-decoration: none;
351 +}
352 +.swagger-section .swagger-ui-wrap .model-signature .propType {
353 + color: #5555aa;
354 +}
355 +.swagger-section .swagger-ui-wrap .model-signature pre:hover {
356 + background-color: #ffffdd;
357 +}
358 +.swagger-section .swagger-ui-wrap .model-signature pre {
359 + font-size: .85em;
360 + line-height: 1.2em;
361 + overflow: auto;
362 + max-height: 200px;
363 + cursor: pointer;
364 +}
365 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
366 + display: block;
367 + margin: 0;
368 + padding: 0;
369 +}
370 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
371 + padding-right: 0;
372 + border-right: none;
373 +}
374 +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
375 + float: left;
376 + margin: 0 5px 5px 0;
377 + padding: 2px 5px 2px 0;
378 + border-right: 1px solid #ddd;
379 +}
380 +.swagger-section .swagger-ui-wrap .model-signature .propOpt {
381 + color: #555;
382 +}
383 +.swagger-section .swagger-ui-wrap .model-signature .snippet small {
384 + font-size: 0.75em;
385 +}
386 +.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
387 + font-style: italic;
388 +}
389 +.swagger-section .swagger-ui-wrap .model-signature .description .strong {
390 + font-weight: bold;
391 + color: #000;
392 + font-size: .9em;
393 +}
394 +.swagger-section .swagger-ui-wrap .model-signature .description div {
395 + font-size: 0.9em;
396 + line-height: 1.5em;
397 + margin-left: 1em;
398 +}
399 +.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
400 + font-weight: bold;
401 + color: #000;
402 +}
403 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
404 + border-spacing: 0;
405 + position: absolute;
406 + background-color: #ffffff;
407 + border: 1px solid #bbbbbb;
408 + display: none;
409 + font-size: 11px;
410 + max-width: 400px;
411 + line-height: 30px;
412 + color: black;
413 + padding: 5px;
414 + margin-left: 10px;
415 +}
416 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
417 + text-align: center;
418 + background-color: #eeeeee;
419 + border: 1px solid #bbbbbb;
420 + font-size: 11px;
421 + color: #666666;
422 + font-weight: bold;
423 + padding: 5px;
424 + line-height: 15px;
425 +}
426 +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
427 + font-weight: bold;
428 +}
429 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
430 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
431 + display: inline;
432 +}
433 +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
434 + display: block;
435 + content: '';
436 +}
437 +.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
438 + margin-right: -3px;
439 +}
440 +.swagger-section .swagger-ui-wrap .model-signature .propName {
441 + font-weight: bold;
442 +}
443 +.swagger-section .swagger-ui-wrap .model-signature .signature-container {
444 + clear: both;
445 +}
446 +.swagger-section .swagger-ui-wrap .body-textarea {
447 + width: 300px;
448 + height: 100px;
449 + border: 1px solid #aaa;
450 +}
451 +.swagger-section .swagger-ui-wrap .markdown p code,
452 +.swagger-section .swagger-ui-wrap .markdown li code {
453 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
454 + background-color: #f0f0f0;
455 + color: black;
456 + padding: 1px 3px;
457 +}
458 +.swagger-section .swagger-ui-wrap .required {
459 + font-weight: bold;
460 +}
461 +.swagger-section .swagger-ui-wrap input.parameter {
462 + width: 300px;
463 + border: 1px solid #aaa;
464 +}
465 +.swagger-section .swagger-ui-wrap h1 {
466 + color: black;
467 + font-size: 1.5em;
468 + line-height: 1.3em;
469 + padding: 10px 0 10px 0;
470 + font-family: Helvetica, Arial, sans-serif;
471 + font-weight: bold;
472 +}
473 +.swagger-section .swagger-ui-wrap .heading_with_menu {
474 + float: none;
475 + clear: both;
476 + overflow: hidden;
477 + display: block;
478 +}
479 +.swagger-section .swagger-ui-wrap .heading_with_menu ul {
480 + display: block;
481 + clear: none;
482 + float: right;
483 + -moz-box-sizing: border-box;
484 + -webkit-box-sizing: border-box;
485 + -ms-box-sizing: border-box;
486 + box-sizing: border-box;
487 + margin-top: 10px;
488 +}
489 +.swagger-section .swagger-ui-wrap h2 {
490 + color: black;
491 + font-size: 1.3em;
492 + padding: 10px 0 10px 0;
493 +}
494 +.swagger-section .swagger-ui-wrap h2 a {
495 + color: black;
496 +}
497 +.swagger-section .swagger-ui-wrap h2 span.sub {
498 + font-size: 0.7em;
499 + color: #999999;
500 + font-style: italic;
501 +}
502 +.swagger-section .swagger-ui-wrap h2 span.sub a {
503 + color: #777777;
504 +}
505 +.swagger-section .swagger-ui-wrap span.weak {
506 + color: #666666;
507 +}
508 +.swagger-section .swagger-ui-wrap .message-success {
509 + color: #89BF04;
510 +}
511 +.swagger-section .swagger-ui-wrap caption,
512 +.swagger-section .swagger-ui-wrap th,
513 +.swagger-section .swagger-ui-wrap td {
514 + text-align: left;
515 + font-weight: normal;
516 + vertical-align: middle;
517 +}
518 +.swagger-section .swagger-ui-wrap .code {
519 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
520 +}
521 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
522 + font-family: Helvetica, Arial, sans-serif;
523 + height: 250px;
524 + padding: 4px;
525 + display: block;
526 + clear: both;
527 +}
528 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
529 + display: block;
530 + clear: both;
531 +}
532 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
533 + float: none;
534 + clear: both;
535 + overflow: hidden;
536 + display: block;
537 +}
538 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
539 + display: block;
540 + float: left;
541 + clear: none;
542 + margin: 0;
543 + padding: 0;
544 +}
545 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
546 + display: block;
547 + float: left;
548 + clear: none;
549 + margin: 0 5px 0 0;
550 +}
551 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
552 + color: black;
553 +}
554 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
555 + display: block;
556 + clear: both;
557 + width: auto;
558 + padding: 0 0 3px;
559 + color: #666666;
560 +}
561 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
562 + padding-left: 3px;
563 + color: #888888;
564 +}
565 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
566 + margin-left: 0;
567 + font-style: italic;
568 + font-size: 0.9em;
569 + margin: 0;
570 +}
571 +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
572 + margin: 0;
573 + padding: 0;
574 +}
575 +.swagger-section .swagger-ui-wrap span.blank,
576 +.swagger-section .swagger-ui-wrap span.empty {
577 + color: #888888;
578 + font-style: italic;
579 +}
580 +.swagger-section .swagger-ui-wrap .markdown h3 {
581 + color: #CE5650;
582 +}
583 +.swagger-section .swagger-ui-wrap .markdown h4 {
584 + color: #666666;
585 +}
586 +.swagger-section .swagger-ui-wrap .markdown pre {
587 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
588 + background-color: #fcf6db;
589 + border: 1px solid #e5e0c6;
590 + padding: 10px;
591 + margin: 0 0 10px 0;
592 +}
593 +.swagger-section .swagger-ui-wrap .markdown pre code {
594 + line-height: 1.6em;
595 +}
596 +.swagger-section .swagger-ui-wrap div.gist {
597 + margin: 20px 0 25px 0 !important;
598 +}
599 +.swagger-section .swagger-ui-wrap ul#resources {
600 + font-family: Helvetica, Arial, sans-serif;
601 + font-size: 0.9em;
602 +}
603 +.swagger-section .swagger-ui-wrap ul#resources li.resource {
604 + border-bottom: 1px solid #dddddd;
605 +}
606 +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
607 +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
608 + color: black;
609 +}
610 +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
611 +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
612 + color: #555555;
613 +}
614 +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
615 + border-bottom: none;
616 +}
617 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
618 + border: 1px solid transparent;
619 + float: none;
620 + clear: both;
621 + overflow: hidden;
622 + display: block;
623 +}
624 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
625 + overflow: hidden;
626 + padding: 0;
627 + display: block;
628 + clear: none;
629 + float: right;
630 + margin: 14px 10px 0 0;
631 +}
632 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
633 + float: left;
634 + clear: none;
635 + margin: 0;
636 + padding: 2px 10px;
637 + border-right: 1px solid #dddddd;
638 + color: #666666;
639 + font-size: 0.9em;
640 +}
641 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
642 + color: #aaaaaa;
643 + text-decoration: none;
644 +}
645 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
646 + text-decoration: underline;
647 + color: black;
648 +}
649 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
650 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
651 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
652 + text-decoration: underline;
653 +}
654 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
655 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
656 + padding-left: 0;
657 +}
658 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
659 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
660 + padding-right: 0;
661 + border-right: none;
662 +}
663 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
664 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
665 + padding-left: 0;
666 +}
667 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
668 + color: #999999;
669 + padding-left: 0;
670 + display: block;
671 + clear: none;
672 + float: left;
673 + font-family: Helvetica, Arial, sans-serif;
674 + font-weight: bold;
675 +}
676 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
677 + color: #999999;
678 +}
679 +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
680 + color: black;
681 +}
682 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
683 + float: none;
684 + clear: both;
685 + overflow: hidden;
686 + display: block;
687 + margin: 0 0 10px;
688 + padding: 0;
689 +}
690 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
691 + float: none;
692 + clear: both;
693 + overflow: hidden;
694 + display: block;
695 + margin: 0;
696 + padding: 0;
697 +}
698 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
699 + display: block;
700 + clear: none;
701 + float: left;
702 + width: auto;
703 + margin: 0;
704 + padding: 0;
705 + line-height: 1.1em;
706 + color: black;
707 +}
708 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
709 + padding-left: 10px;
710 +}
711 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
712 + color: black;
713 + text-decoration: none;
714 +}
715 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
716 + text-decoration: underline;
717 +}
718 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
719 + text-transform: uppercase;
720 + text-decoration: none;
721 + color: white;
722 + display: inline-block;
723 + width: 50px;
724 + font-size: 0.7em;
725 + text-align: center;
726 + padding: 7px 0 4px;
727 + -moz-border-radius: 2px;
728 + -webkit-border-radius: 2px;
729 + -o-border-radius: 2px;
730 + -ms-border-radius: 2px;
731 + -khtml-border-radius: 2px;
732 + border-radius: 2px;
733 +}
734 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
735 + margin: 0;
736 + padding: 0;
737 +}
738 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
739 + overflow: hidden;
740 + padding: 0;
741 + display: block;
742 + clear: none;
743 + float: right;
744 + margin: 6px 10px 0 0;
745 +}
746 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
747 + float: left;
748 + clear: none;
749 + margin: 0;
750 + padding: 2px 10px;
751 + font-size: 0.9em;
752 +}
753 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
754 + text-decoration: none;
755 +}
756 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
757 + color: black;
758 +}
759 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
760 + border-top: none;
761 + padding: 10px;
762 + -moz-border-radius-bottomleft: 6px;
763 + -webkit-border-bottom-left-radius: 6px;
764 + -o-border-bottom-left-radius: 6px;
765 + -ms-border-bottom-left-radius: 6px;
766 + -khtml-border-bottom-left-radius: 6px;
767 + border-bottom-left-radius: 6px;
768 + -moz-border-radius-bottomright: 6px;
769 + -webkit-border-bottom-right-radius: 6px;
770 + -o-border-bottom-right-radius: 6px;
771 + -ms-border-bottom-right-radius: 6px;
772 + -khtml-border-bottom-right-radius: 6px;
773 + border-bottom-right-radius: 6px;
774 + margin: 0 0 20px;
775 +}
776 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
777 + font-size: 1.1em;
778 + margin: 0;
779 + padding: 15px 0 5px;
780 +}
781 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
782 + float: none;
783 + clear: both;
784 + overflow: hidden;
785 + display: block;
786 +}
787 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
788 + padding: 4px 0 0 10px;
789 + display: inline-block;
790 + font-size: 0.9em;
791 +}
792 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
793 + display: block;
794 + clear: none;
795 + float: left;
796 + padding: 6px 8px;
797 +}
798 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
799 + background-image: url('../images/throbber.gif');
800 + width: 128px;
801 + height: 16px;
802 + display: block;
803 + clear: none;
804 + float: right;
805 +}
806 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
807 + outline: 2px solid black;
808 + outline-color: #cc0000;
809 +}
810 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
811 + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
812 + padding: 10px;
813 + font-size: 0.9em;
814 + max-height: 400px;
815 + overflow-y: auto;
816 +}
817 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
818 + background-color: #f9f2e9;
819 + border: 1px solid #f0e0ca;
820 +}
821 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
822 + background-color: #c5862b;
823 +}
824 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
825 + border-right: 1px solid #dddddd;
826 + border-right-color: #f0e0ca;
827 + color: #c5862b;
828 +}
829 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
830 + color: #c5862b;
831 +}
832 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
833 + background-color: #faf5ee;
834 + border: 1px solid #f0e0ca;
835 +}
836 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
837 + color: #c5862b;
838 +}
839 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
840 + color: #dcb67f;
841 +}
842 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
843 + background-color: #fcffcd;
844 + border: 1px solid black;
845 + border-color: #ffd20f;
846 +}
847 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
848 + text-transform: uppercase;
849 + background-color: #ffd20f;
850 +}
851 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
852 + border-right: 1px solid #dddddd;
853 + border-right-color: #ffd20f;
854 + color: #ffd20f;
855 +}
856 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
857 + color: #ffd20f;
858 +}
859 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
860 + background-color: #fcffcd;
861 + border: 1px solid black;
862 + border-color: #ffd20f;
863 +}
864 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
865 + color: #ffd20f;
866 +}
867 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
868 + color: #6fc992;
869 +}
870 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
871 + background-color: #f5e8e8;
872 + border: 1px solid #e8c6c7;
873 +}
874 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
875 + text-transform: uppercase;
876 + background-color: #a41e22;
877 +}
878 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
879 + border-right: 1px solid #dddddd;
880 + border-right-color: #e8c6c7;
881 + color: #a41e22;
882 +}
883 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
884 + color: #a41e22;
885 +}
886 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
887 + background-color: #f7eded;
888 + border: 1px solid #e8c6c7;
889 +}
890 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
891 + color: #a41e22;
892 +}
893 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
894 + color: #c8787a;
895 +}
896 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
897 + background-color: #e7f6ec;
898 + border: 1px solid #c3e8d1;
899 +}
900 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
901 + background-color: #10a54a;
902 +}
903 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
904 + border-right: 1px solid #dddddd;
905 + border-right-color: #c3e8d1;
906 + color: #10a54a;
907 +}
908 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
909 + color: #10a54a;
910 +}
911 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
912 + background-color: #ebf7f0;
913 + border: 1px solid #c3e8d1;
914 +}
915 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
916 + color: #10a54a;
917 +}
918 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
919 + color: #6fc992;
920 +}
921 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
922 + background-color: #FCE9E3;
923 + border: 1px solid #F5D5C3;
924 +}
925 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
926 + background-color: #D38042;
927 +}
928 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
929 + border-right: 1px solid #dddddd;
930 + border-right-color: #f0cecb;
931 + color: #D38042;
932 +}
933 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
934 + color: #D38042;
935 +}
936 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
937 + background-color: #faf0ef;
938 + border: 1px solid #f0cecb;
939 +}
940 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
941 + color: #D38042;
942 +}
943 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
944 + color: #dcb67f;
945 +}
946 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
947 + background-color: #e7f0f7;
948 + border: 1px solid #c3d9ec;
949 +}
950 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
951 + background-color: #0f6ab4;
952 +}
953 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
954 + border-right: 1px solid #dddddd;
955 + border-right-color: #c3d9ec;
956 + color: #0f6ab4;
957 +}
958 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
959 + color: #0f6ab4;
960 +}
961 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
962 + background-color: #ebf3f9;
963 + border: 1px solid #c3d9ec;
964 +}
965 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
966 + color: #0f6ab4;
967 +}
968 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
969 + color: #6fa5d2;
970 +}
971 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
972 + background-color: #e7f0f7;
973 + border: 1px solid #c3d9ec;
974 +}
975 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
976 + background-color: #0f6ab4;
977 +}
978 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
979 + border-right: 1px solid #dddddd;
980 + border-right-color: #c3d9ec;
981 + color: #0f6ab4;
982 +}
983 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
984 + color: #0f6ab4;
985 +}
986 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
987 + background-color: #ebf3f9;
988 + border: 1px solid #c3d9ec;
989 +}
990 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
991 + color: #0f6ab4;
992 +}
993 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
994 + color: #6fa5d2;
995 +}
996 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
997 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
998 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
999 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
1000 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
1001 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
1002 + border-top: none;
1003 +}
1004 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
1005 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
1006 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
1007 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
1008 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
1009 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
1010 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
1011 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
1012 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
1013 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
1014 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
1015 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
1016 + padding-right: 0;
1017 + border-right: none;
1018 +}
1019 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
1020 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
1021 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
1022 + text-decoration: underline;
1023 +}
1024 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
1025 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
1026 + padding-left: 0;
1027 +}
1028 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
1029 +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
1030 + padding-left: 0;
1031 +}
1032 +.swagger-section .swagger-ui-wrap p#colophon {
1033 + margin: 0 15px 40px 15px;
1034 + padding: 10px 0;
1035 + font-size: 0.8em;
1036 + border-top: 1px solid #dddddd;
1037 + font-family: Helvetica, Arial, sans-serif;
1038 + color: #999999;
1039 + font-style: italic;
1040 +}
1041 +.swagger-section .swagger-ui-wrap p#colophon a {
1042 + text-decoration: none;
1043 + color: #CE5650;
1044 +}
1045 +.swagger-section .swagger-ui-wrap h3 {
1046 + color: black;
1047 + font-size: 1.1em;
1048 + padding: 10px 0 10px 0;
1049 +}
1050 +.swagger-section .swagger-ui-wrap .markdown ol,
1051 +.swagger-section .swagger-ui-wrap .markdown ul {
1052 + font-family: Helvetica, Arial, sans-serif;
1053 + margin: 5px 0 10px;
1054 + padding: 0 0 0 18px;
1055 + list-style-type: disc;
1056 +}
1057 +.swagger-section .swagger-ui-wrap form.form_box {
1058 + background-color: #ebf3f9;
1059 + border: 1px solid #c3d9ec;
1060 + padding: 10px;
1061 +}
1062 +.swagger-section .swagger-ui-wrap form.form_box label {
1063 + color: #0f6ab4 !important;
1064 +}
1065 +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
1066 + display: block;
1067 + padding: 10px;
1068 +}
1069 +.swagger-section .swagger-ui-wrap form.form_box p.weak {
1070 + font-size: 0.8em;
1071 +}
1072 +.swagger-section .swagger-ui-wrap form.form_box p {
1073 + font-size: 0.9em;
1074 + padding: 0 0 15px;
1075 + color: #7e7b6d;
1076 +}
1077 +.swagger-section .swagger-ui-wrap form.form_box p a {
1078 + color: #646257;
1079 +}
1080 +.swagger-section .swagger-ui-wrap form.form_box p strong {
1081 + color: black;
1082 +}
1083 +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
1084 + padding-bottom: 0;
1085 +}
1086 +.swagger-section .title {
1087 + font-style: bold;
1088 +}
1089 +.swagger-section .secondary_form {
1090 + display: none;
1091 +}
1092 +.swagger-section .main_image {
1093 + display: block;
1094 + margin-left: auto;
1095 + margin-right: auto;
1096 +}
1097 +.swagger-section .oauth_body {
1098 + margin-left: 100px;
1099 + margin-right: 100px;
1100 +}
1101 +.swagger-section .oauth_submit {
1102 + text-align: center;
1103 +}
1104 +.swagger-section .api-popup-dialog {
1105 + z-index: 10000;
1106 + position: absolute;
1107 + width: 500px;
1108 + background: #FFF;
1109 + padding: 20px;
1110 + border: 1px solid #ccc;
1111 + border-radius: 5px;
1112 + display: none;
1113 + font-size: 13px;
1114 + color: #777;
1115 +}
1116 +.swagger-section .api-popup-dialog .api-popup-title {
1117 + font-size: 24px;
1118 + padding: 10px 0;
1119 +}
1120 +.swagger-section .api-popup-dialog .api-popup-title {
1121 + font-size: 24px;
1122 + padding: 10px 0;
1123 +}
1124 +.swagger-section .api-popup-dialog p.error-msg {
1125 + padding-left: 5px;
1126 + padding-bottom: 5px;
1127 +}
1128 +.swagger-section .api-popup-dialog button.api-popup-authbtn {
1129 + height: 30px;
1130 +}
1131 +.swagger-section .api-popup-dialog button.api-popup-cancel {
1132 + height: 30px;
1133 +}
1134 +.swagger-section .api-popup-scopes {
1135 + padding: 10px 20px;
1136 +}
1137 +.swagger-section .api-popup-scopes li {
1138 + padding: 5px 0;
1139 + line-height: 20px;
1140 +}
1141 +.swagger-section .api-popup-scopes .api-scope-desc {
1142 + padding-left: 20px;
1143 + font-style: italic;
1144 +}
1145 +.swagger-section .api-popup-scopes li input {
1146 + position: relative;
1147 + top: 2px;
1148 +}
1149 +.swagger-section .api-popup-actions {
1150 + padding-top: 10px;
1151 +}
1152 +.swagger-section .access {
1153 + float: right;
1154 +}
1155 +.swagger-section .auth {
1156 + float: right;
1157 +}
1158 +.swagger-section #api_information_panel {
1159 + position: absolute;
1160 + background: #FFF;
1161 + border: 1px solid #ccc;
1162 + border-radius: 5px;
1163 + display: none;
1164 + font-size: 13px;
1165 + max-width: 300px;
1166 + line-height: 30px;
1167 + color: black;
1168 + padding: 5px;
1169 +}
1170 +.swagger-section #api_information_panel p .api-msg-enabled {
1171 + color: green;
1172 +}
1173 +.swagger-section #api_information_panel p .api-msg-disabled {
1174 + color: red;
1175 +}
1176 +.swagger-section .api-ic {
1177 + height: 18px;
1178 + vertical-align: middle;
1179 + display: inline-block;
1180 + background: url(../images/explorer_icons.png) no-repeat;
1181 +}
1182 +.swagger-section .ic-info {
1183 + background-position: 0 0;
1184 + width: 18px;
1185 + margin-top: -7px;
1186 + margin-left: 4px;
1187 +}
1188 +.swagger-section .ic-warning {
1189 + background-position: -60px 0;
1190 + width: 18px;
1191 + margin-top: -7px;
1192 + margin-left: 4px;
1193 +}
1194 +.swagger-section .ic-error {
1195 + background-position: -30px 0;
1196 + width: 18px;
1197 + margin-top: -7px;
1198 + margin-left: 4px;
1199 +}
1200 +.swagger-section .ic-off {
1201 + background-position: -90px 0;
1202 + width: 58px;
1203 + margin-top: -4px;
1204 + cursor: pointer;
1205 +}
1206 +.swagger-section .ic-on {
1207 + background-position: -160px 0;
1208 + width: 58px;
1209 + margin-top: -4px;
1210 + cursor: pointer;
1211 +}
1212 +.swagger-section #header {
1213 + background-color: #bbb;
1214 + box-shadow: 0 2px 8px #777;
1215 + padding: 10px;
1216 +}
1217 +.swagger-section #footer {
1218 + color: #999;
1219 + font-style: italic;
1220 + font-size: small;
1221 + padding: 14px;
1222 +}
1223 +
1224 +.swagger-section #header a#logo {
1225 + font-size: 1.6em;
1226 + font-weight: bold;
1227 + text-decoration: none;
1228 + background: transparent url(../images/onos-logo.png) no-repeat left center;
1229 + padding: 20px 0 20px 60px;
1230 + color: white;
1231 +}
1232 +.swagger-section #header form#api_selector {
1233 + display: block;
1234 + clear: none;
1235 + float: right;
1236 +}
1237 +.swagger-section #header form#api_selector .input {
1238 + display: block;
1239 + clear: none;
1240 + float: left;
1241 + margin: 0 10px 0 0;
1242 +}
1243 +.swagger-section #header form#api_selector .input input#input_apiKey {
1244 + width: 200px;
1245 + border-radius: 3px;
1246 + border: solid 2px #fff;
1247 +}
1248 +.swagger-section #header form#api_selector .input input#input_baseUrl {
1249 + width: 200px;
1250 + display: none;
1251 +}
1252 +.swagger-section #header form#api_selector .input a#explore {
1253 + display: block;
1254 + text-decoration: none;
1255 + font-weight: bold;
1256 + padding: 6px 8px;
1257 + font-size: 0.9em;
1258 + color: white;
1259 + background-color: #CE5650;
1260 + -moz-border-radius: 4px;
1261 + -webkit-border-radius: 4px;
1262 + -o-border-radius: 4px;
1263 + -ms-border-radius: 4px;
1264 + -khtml-border-radius: 4px;
1265 + border-radius: 4px;
1266 +}
1267 +.swagger-section #header form#api_selector .input a#explore:hover {
1268 + background-color: #CE5650;
1269 +}
1270 +
1271 +.swagger-section #header form#api_selector #selector {
1272 + width: 580px;
1273 + height: 28px;
1274 + overflow: hidden;
1275 +}
1276 +.swagger-section #header form#api_selector .input select {
1277 + background: transparent;
1278 + border: 0;
1279 + border-radius: 0;
1280 + -webkit-appearance: none;
1281 + padding: 0 8px 0 48px;
1282 + background: url(../images/nav-menu.png) no-repeat left;
1283 + background-size: 30px 30px;
1284 + outline: 0;
1285 + font-size: 14pt;
1286 + font-weight: normal;
1287 + font-style: italic;
1288 + color: #369;
1289 + width: 580px;
1290 + height: 28px;
1291 +}
1292 +
1293 +.swagger-section #header form#api_selector .input input {
1294 + font-size: 0.9em;
1295 + padding: 3px;
1296 + margin: 0;
1297 +}
1298 +.swagger-section #content_message {
1299 + margin: 10px 15px;
1300 + font-style: italic;
1301 + color: #999999;
1302 +}
1303 +.swagger-section #message-bar {
1304 + min-height: 30px;
1305 + text-align: center;
1306 + padding-top: 10px;
1307 +}
1 +<!-- Adapted from Swagger UI -->
2 +<!DOCTYPE html>
3 +<html>
4 +<head>
5 + <title>ONOS API Docs</title>
6 + <link rel="icon" type="image/png" href="images/onos-logo.png"/>
7 +
8 + <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
9 + <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
10 + <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
11 + <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
12 + <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
13 + <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
14 + <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
15 + <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
16 + <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
17 + <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
18 + <script src='lib/underscore-min.js' type='text/javascript'></script>
19 + <script src='lib/backbone-min.js' type='text/javascript'></script>
20 + <script src='swagger-ui.js' type='text/javascript'></script>
21 + <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
22 + <script src='lib/marked.js' type='text/javascript'></script>
23 + <script src='lib/swagger-oauth.js' type='text/javascript'></script>
24 +
25 + <script type="text/javascript">
26 + $(function () {
27 + var url = window.location.search.match(/url=([^&]+)/);
28 + if (url && url.length > 1) {
29 + url = decodeURIComponent(url[1]);
30 + } else {
31 + url = "/onos/v1/docs/apis/onos/v1/swagger.json";
32 + }
33 + window.swaggerUi = new SwaggerUi({
34 + url: url,
35 + dom_id: "swagger-ui-container",
36 + supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
37 + onComplete: function(swaggerApi, swaggerUi){
38 + if(typeof initOAuth == "function") {
39 + initOAuth({
40 + clientId: "your-client-id",
41 + realm: "your-realms",
42 + appName: "your-app-name"
43 + });
44 + }
45 +
46 + $('pre code').each(function(i, e) {
47 + hljs.highlightBlock(e)
48 + });
49 +
50 + addApiKeyAuthorization();
51 + },
52 + onFailure: function(data) {
53 + log("Unable to Load SwaggerUI");
54 + },
55 + docExpansion: "none",
56 + apisSorter: "alpha",
57 + showRequestHeaders: false
58 + });
59 +
60 + function addApiKeyAuthorization(){
61 + var key = encodeURIComponent($('#input_apiKey')[0].value);
62 + if(key && key.trim() != "") {
63 + var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("api_key", key, "query");
64 + window.swaggerUi.api.clientAuthorizations.add("api_key", apiKeyAuth);
65 + log("added key " + key);
66 + }
67 + }
68 +
69 + $('#input_apiKey').change(addApiKeyAuthorization);
70 +
71 + // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
72 + /*
73 + var apiKey = "myApiKeyXXXX123456789";
74 + $('#input_apiKey').val(apiKey);
75 + */
76 +
77 + window.swaggerUi.load();
78 +
79 + function log() {
80 + if ('console' in window) {
81 + console.log.apply(console, arguments);
82 + }
83 + }
84 + });
85 +
86 + function selectApi() {
87 + $('#input_baseUrl').val('/onos/v1/docs/apis' + $('select').val() + '/swagger.json');
88 + $('#explore').click();
89 + }
90 + </script>
91 +</head>
92 +
93 +<body class="swagger-section">
94 +<div id='header'>
95 + <div class="swagger-ui-wrap">
96 + <a id="logo" href="#"></a>
97 + <form id='api_selector'>
98 + <div class='input' id='selector'>
99 + <select onchange="selectApi()">
100 + <!-- {API-START} -->
101 + <option value="v1">ONOS v1 Core</option>
102 + <option value="foo">ONOS Foo app</option>
103 + <option value="bar">ONOS Bar app</option>
104 + <!-- {API-END} -->
105 + </select>
106 + </div>
107 + <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
108 + <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
109 + <div class='input'><a id="explore" href="#">Explore</a></div>
110 + </form>
111 + </div>
112 +</div>
113 +
114 +<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
115 +<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
116 +<div id="footer" class="swagger-ui-wrap"><a href="http://swagger.io/swagger-ui/">Swagger UI</a> adaptation</div>
117 +</body>
118 +</html>
1 +// Backbone.js 1.1.2
2 +
3 +(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e});
4 +
5 +// From http://stackoverflow.com/a/19431552
6 +// Compatibility override - Backbone 1.1 got rid of the 'options' binding
7 +// automatically to views in the constructor - we need to keep that.
8 +Backbone.View = (function(View) {
9 + return View.extend({
10 + constructor: function(options) {
11 + this.options = options || {};
12 + View.apply(this, arguments);
13 + }
14 + });
15 +})(Backbone.View);
...\ No newline at end of file ...\ No newline at end of file
1 +/*!
2 +
3 + handlebars v2.0.0
4 +
5 +Copyright (C) 2011-2014 by Yehuda Katz
6 +
7 +Permission is hereby granted, free of charge, to any person obtaining a copy
8 +of this software and associated documentation files (the "Software"), to deal
9 +in the Software without restriction, including without limitation the rights
10 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 +copies of the Software, and to permit persons to whom the Software is
12 +furnished to do so, subject to the following conditions:
13 +
14 +The above copyright notice and this permission notice shall be included in
15 +all copies or substantial portions of the Software.
16 +
17 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 +THE SOFTWARE.
24 +
25 +@license
26 +*/
27 +!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a){return a instanceof h?a.toString():null==a?"":a?(a=""+a,k.test(a)?a.replace(j,b):a):a+""}function e(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function f(a,b){return(a?a+".":"")+b}var g={},h=a,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var b,c=["description","fileName","lineNumber","message","name","number","stack"];return a.prototype=new Error,b=a}(),d=function(a,b){"use strict";function c(a,b){this.helpers=a||{},this.partials=b||{},d(this)}function d(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new g("Missing helper: '"+arguments[arguments.length-1].name+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse,e=c.fn;if(b===!0)return e(this);if(b===!1||null==b)return d(this);if(k(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):this.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unknown template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this.$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:this.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&&(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)return!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!f(a[c],b[c]))return!1;return!0}}var g={},h=a,i=b.isArray,j=[].slice;return g.Compiler=c,c.prototype={compiler:c,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;
28 +this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.accept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h=this.source[f];h.appendToBuffer?b=b?b+"\n + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n ":(c=!0,d=b+";\n "),b=void 0),d+=h+"\n ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendingContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b=g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popStack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m});
...\ No newline at end of file ...\ No newline at end of file
1 +var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
...\ No newline at end of file ...\ No newline at end of file
1 +/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
2 +(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
3 + * http://benalman.com/projects/jquery-bbq-plugin/
4 + *
5 + * Copyright (c) 2010 "Cowboy" Ben Alman
6 + * Dual licensed under the MIT and GPL licenses.
7 + * http://benalman.com/about/license/
8 + */
9 +(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
10 +/*
11 + * jQuery hashchange event - v1.2 - 2/11/2010
12 + * http://benalman.com/projects/jquery-hashchange-plugin/
13 + *
14 + * Copyright (c) 2010 "Cowboy" Ben Alman
15 + * Dual licensed under the MIT and GPL licenses.
16 + * http://benalman.com/about/license/
17 + */
18 +(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
...\ No newline at end of file ...\ No newline at end of file
1 +(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);
1 +/*
2 +jQuery Wiggle
3 +Author: WonderGroup, Jordan Thomas
4 +URL: http://labs.wondergroup.com/demos/mini-ui/index.html
5 +License: MIT (http://en.wikipedia.org/wiki/MIT_License)
6 +*/
7 +jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
8 +if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
...\ No newline at end of file ...\ No newline at end of file
1 +/**
2 + * marked - a markdown parser
3 + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
4 + * https://github.com/chjj/marked
5 + */
6 +
7 +;(function() {
8 +
9 +/**
10 + * Block-Level Grammar
11 + */
12 +
13 +var block = {
14 + newline: /^\n+/,
15 + code: /^( {4}[^\n]+\n*)+/,
16 + fences: noop,
17 + hr: /^( *[-*_]){3,} *(?:\n+|$)/,
18 + heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
19 + nptable: noop,
20 + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
21 + blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
22 + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
23 + html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
24 + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
25 + table: noop,
26 + paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
27 + text: /^[^\n]+/
28 +};
29 +
30 +block.bullet = /(?:[*+-]|\d+\.)/;
31 +block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
32 +block.item = replace(block.item, 'gm')
33 + (/bull/g, block.bullet)
34 + ();
35 +
36 +block.list = replace(block.list)
37 + (/bull/g, block.bullet)
38 + ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')
39 + ('def', '\\n+(?=' + block.def.source + ')')
40 + ();
41 +
42 +block.blockquote = replace(block.blockquote)
43 + ('def', block.def)
44 + ();
45 +
46 +block._tag = '(?!(?:'
47 + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
48 + + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
49 + + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
50 +
51 +block.html = replace(block.html)
52 + ('comment', /<!--[\s\S]*?-->/)
53 + ('closed', /<(tag)[\s\S]+?<\/\1>/)
54 + ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)
55 + (/tag/g, block._tag)
56 + ();
57 +
58 +block.paragraph = replace(block.paragraph)
59 + ('hr', block.hr)
60 + ('heading', block.heading)
61 + ('lheading', block.lheading)
62 + ('blockquote', block.blockquote)
63 + ('tag', '<' + block._tag)
64 + ('def', block.def)
65 + ();
66 +
67 +/**
68 + * Normal Block Grammar
69 + */
70 +
71 +block.normal = merge({}, block);
72 +
73 +/**
74 + * GFM Block Grammar
75 + */
76 +
77 +block.gfm = merge({}, block.normal, {
78 + fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,
79 + paragraph: /^/
80 +});
81 +
82 +block.gfm.paragraph = replace(block.paragraph)
83 + ('(?!', '(?!'
84 + + block.gfm.fences.source.replace('\\1', '\\2') + '|'
85 + + block.list.source.replace('\\1', '\\3') + '|')
86 + ();
87 +
88 +/**
89 + * GFM + Tables Block Grammar
90 + */
91 +
92 +block.tables = merge({}, block.gfm, {
93 + nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,
94 + table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/
95 +});
96 +
97 +/**
98 + * Block Lexer
99 + */
100 +
101 +function Lexer(options) {
102 + this.tokens = [];
103 + this.tokens.links = {};
104 + this.options = options || marked.defaults;
105 + this.rules = block.normal;
106 +
107 + if (this.options.gfm) {
108 + if (this.options.tables) {
109 + this.rules = block.tables;
110 + } else {
111 + this.rules = block.gfm;
112 + }
113 + }
114 +}
115 +
116 +/**
117 + * Expose Block Rules
118 + */
119 +
120 +Lexer.rules = block;
121 +
122 +/**
123 + * Static Lex Method
124 + */
125 +
126 +Lexer.lex = function(src, options) {
127 + var lexer = new Lexer(options);
128 + return lexer.lex(src);
129 +};
130 +
131 +/**
132 + * Preprocessing
133 + */
134 +
135 +Lexer.prototype.lex = function(src) {
136 + src = src
137 + .replace(/\r\n|\r/g, '\n')
138 + .replace(/\t/g, ' ')
139 + .replace(/\u00a0/g, ' ')
140 + .replace(/\u2424/g, '\n');
141 +
142 + return this.token(src, true);
143 +};
144 +
145 +/**
146 + * Lexing
147 + */
148 +
149 +Lexer.prototype.token = function(src, top, bq) {
150 + var src = src.replace(/^ +$/gm, '')
151 + , next
152 + , loose
153 + , cap
154 + , bull
155 + , b
156 + , item
157 + , space
158 + , i
159 + , l;
160 +
161 + while (src) {
162 + // newline
163 + if (cap = this.rules.newline.exec(src)) {
164 + src = src.substring(cap[0].length);
165 + if (cap[0].length > 1) {
166 + this.tokens.push({
167 + type: 'space'
168 + });
169 + }
170 + }
171 +
172 + // code
173 + if (cap = this.rules.code.exec(src)) {
174 + src = src.substring(cap[0].length);
175 + cap = cap[0].replace(/^ {4}/gm, '');
176 + this.tokens.push({
177 + type: 'code',
178 + text: !this.options.pedantic
179 + ? cap.replace(/\n+$/, '')
180 + : cap
181 + });
182 + continue;
183 + }
184 +
185 + // fences (gfm)
186 + if (cap = this.rules.fences.exec(src)) {
187 + src = src.substring(cap[0].length);
188 + this.tokens.push({
189 + type: 'code',
190 + lang: cap[2],
191 + text: cap[3]
192 + });
193 + continue;
194 + }
195 +
196 + // heading
197 + if (cap = this.rules.heading.exec(src)) {
198 + src = src.substring(cap[0].length);
199 + this.tokens.push({
200 + type: 'heading',
201 + depth: cap[1].length,
202 + text: cap[2]
203 + });
204 + continue;
205 + }
206 +
207 + // table no leading pipe (gfm)
208 + if (top && (cap = this.rules.nptable.exec(src))) {
209 + src = src.substring(cap[0].length);
210 +
211 + item = {
212 + type: 'table',
213 + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
214 + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
215 + cells: cap[3].replace(/\n$/, '').split('\n')
216 + };
217 +
218 + for (i = 0; i < item.align.length; i++) {
219 + if (/^ *-+: *$/.test(item.align[i])) {
220 + item.align[i] = 'right';
221 + } else if (/^ *:-+: *$/.test(item.align[i])) {
222 + item.align[i] = 'center';
223 + } else if (/^ *:-+ *$/.test(item.align[i])) {
224 + item.align[i] = 'left';
225 + } else {
226 + item.align[i] = null;
227 + }
228 + }
229 +
230 + for (i = 0; i < item.cells.length; i++) {
231 + item.cells[i] = item.cells[i].split(/ *\| */);
232 + }
233 +
234 + this.tokens.push(item);
235 +
236 + continue;
237 + }
238 +
239 + // lheading
240 + if (cap = this.rules.lheading.exec(src)) {
241 + src = src.substring(cap[0].length);
242 + this.tokens.push({
243 + type: 'heading',
244 + depth: cap[2] === '=' ? 1 : 2,
245 + text: cap[1]
246 + });
247 + continue;
248 + }
249 +
250 + // hr
251 + if (cap = this.rules.hr.exec(src)) {
252 + src = src.substring(cap[0].length);
253 + this.tokens.push({
254 + type: 'hr'
255 + });
256 + continue;
257 + }
258 +
259 + // blockquote
260 + if (cap = this.rules.blockquote.exec(src)) {
261 + src = src.substring(cap[0].length);
262 +
263 + this.tokens.push({
264 + type: 'blockquote_start'
265 + });
266 +
267 + cap = cap[0].replace(/^ *> ?/gm, '');
268 +
269 + // Pass `top` to keep the current
270 + // "toplevel" state. This is exactly
271 + // how markdown.pl works.
272 + this.token(cap, top, true);
273 +
274 + this.tokens.push({
275 + type: 'blockquote_end'
276 + });
277 +
278 + continue;
279 + }
280 +
281 + // list
282 + if (cap = this.rules.list.exec(src)) {
283 + src = src.substring(cap[0].length);
284 + bull = cap[2];
285 +
286 + this.tokens.push({
287 + type: 'list_start',
288 + ordered: bull.length > 1
289 + });
290 +
291 + // Get each top-level item.
292 + cap = cap[0].match(this.rules.item);
293 +
294 + next = false;
295 + l = cap.length;
296 + i = 0;
297 +
298 + for (; i < l; i++) {
299 + item = cap[i];
300 +
301 + // Remove the list item's bullet
302 + // so it is seen as the next token.
303 + space = item.length;
304 + item = item.replace(/^ *([*+-]|\d+\.) +/, '');
305 +
306 + // Outdent whatever the
307 + // list item contains. Hacky.
308 + if (~item.indexOf('\n ')) {
309 + space -= item.length;
310 + item = !this.options.pedantic
311 + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
312 + : item.replace(/^ {1,4}/gm, '');
313 + }
314 +
315 + // Determine whether the next list item belongs here.
316 + // Backpedal if it does not belong in this list.
317 + if (this.options.smartLists && i !== l - 1) {
318 + b = block.bullet.exec(cap[i + 1])[0];
319 + if (bull !== b && !(bull.length > 1 && b.length > 1)) {
320 + src = cap.slice(i + 1).join('\n') + src;
321 + i = l - 1;
322 + }
323 + }
324 +
325 + // Determine whether item is loose or not.
326 + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
327 + // for discount behavior.
328 + loose = next || /\n\n(?!\s*$)/.test(item);
329 + if (i !== l - 1) {
330 + next = item.charAt(item.length - 1) === '\n';
331 + if (!loose) loose = next;
332 + }
333 +
334 + this.tokens.push({
335 + type: loose
336 + ? 'loose_item_start'
337 + : 'list_item_start'
338 + });
339 +
340 + // Recurse.
341 + this.token(item, false, bq);
342 +
343 + this.tokens.push({
344 + type: 'list_item_end'
345 + });
346 + }
347 +
348 + this.tokens.push({
349 + type: 'list_end'
350 + });
351 +
352 + continue;
353 + }
354 +
355 + // html
356 + if (cap = this.rules.html.exec(src)) {
357 + src = src.substring(cap[0].length);
358 + this.tokens.push({
359 + type: this.options.sanitize
360 + ? 'paragraph'
361 + : 'html',
362 + pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',
363 + text: cap[0]
364 + });
365 + continue;
366 + }
367 +
368 + // def
369 + if ((!bq && top) && (cap = this.rules.def.exec(src))) {
370 + src = src.substring(cap[0].length);
371 + this.tokens.links[cap[1].toLowerCase()] = {
372 + href: cap[2],
373 + title: cap[3]
374 + };
375 + continue;
376 + }
377 +
378 + // table (gfm)
379 + if (top && (cap = this.rules.table.exec(src))) {
380 + src = src.substring(cap[0].length);
381 +
382 + item = {
383 + type: 'table',
384 + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
385 + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
386 + cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
387 + };
388 +
389 + for (i = 0; i < item.align.length; i++) {
390 + if (/^ *-+: *$/.test(item.align[i])) {
391 + item.align[i] = 'right';
392 + } else if (/^ *:-+: *$/.test(item.align[i])) {
393 + item.align[i] = 'center';
394 + } else if (/^ *:-+ *$/.test(item.align[i])) {
395 + item.align[i] = 'left';
396 + } else {
397 + item.align[i] = null;
398 + }
399 + }
400 +
401 + for (i = 0; i < item.cells.length; i++) {
402 + item.cells[i] = item.cells[i]
403 + .replace(/^ *\| *| *\| *$/g, '')
404 + .split(/ *\| */);
405 + }
406 +
407 + this.tokens.push(item);
408 +
409 + continue;
410 + }
411 +
412 + // top-level paragraph
413 + if (top && (cap = this.rules.paragraph.exec(src))) {
414 + src = src.substring(cap[0].length);
415 + this.tokens.push({
416 + type: 'paragraph',
417 + text: cap[1].charAt(cap[1].length - 1) === '\n'
418 + ? cap[1].slice(0, -1)
419 + : cap[1]
420 + });
421 + continue;
422 + }
423 +
424 + // text
425 + if (cap = this.rules.text.exec(src)) {
426 + // Top-level should never reach here.
427 + src = src.substring(cap[0].length);
428 + this.tokens.push({
429 + type: 'text',
430 + text: cap[0]
431 + });
432 + continue;
433 + }
434 +
435 + if (src) {
436 + throw new
437 + Error('Infinite loop on byte: ' + src.charCodeAt(0));
438 + }
439 + }
440 +
441 + return this.tokens;
442 +};
443 +
444 +/**
445 + * Inline-Level Grammar
446 + */
447 +
448 +var inline = {
449 + escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
450 + autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
451 + url: noop,
452 + tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
453 + link: /^!?\[(inside)\]\(href\)/,
454 + reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
455 + nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
456 + strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,
457 + em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
458 + code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
459 + br: /^ {2,}\n(?!\s*$)/,
460 + del: noop,
461 + text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/
462 +};
463 +
464 +inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;
465 +inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;
466 +
467 +inline.link = replace(inline.link)
468 + ('inside', inline._inside)
469 + ('href', inline._href)
470 + ();
471 +
472 +inline.reflink = replace(inline.reflink)
473 + ('inside', inline._inside)
474 + ();
475 +
476 +/**
477 + * Normal Inline Grammar
478 + */
479 +
480 +inline.normal = merge({}, inline);
481 +
482 +/**
483 + * Pedantic Inline Grammar
484 + */
485 +
486 +inline.pedantic = merge({}, inline.normal, {
487 + strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
488 + em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/
489 +});
490 +
491 +/**
492 + * GFM Inline Grammar
493 + */
494 +
495 +inline.gfm = merge({}, inline.normal, {
496 + escape: replace(inline.escape)('])', '~|])')(),
497 + url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,
498 + del: /^~~(?=\S)([\s\S]*?\S)~~/,
499 + text: replace(inline.text)
500 + (']|', '~]|')
501 + ('|', '|https?://|')
502 + ()
503 +});
504 +
505 +/**
506 + * GFM + Line Breaks Inline Grammar
507 + */
508 +
509 +inline.breaks = merge({}, inline.gfm, {
510 + br: replace(inline.br)('{2,}', '*')(),
511 + text: replace(inline.gfm.text)('{2,}', '*')()
512 +});
513 +
514 +/**
515 + * Inline Lexer & Compiler
516 + */
517 +
518 +function InlineLexer(links, options) {
519 + this.options = options || marked.defaults;
520 + this.links = links;
521 + this.rules = inline.normal;
522 + this.renderer = this.options.renderer || new Renderer;
523 + this.renderer.options = this.options;
524 +
525 + if (!this.links) {
526 + throw new
527 + Error('Tokens array requires a `links` property.');
528 + }
529 +
530 + if (this.options.gfm) {
531 + if (this.options.breaks) {
532 + this.rules = inline.breaks;
533 + } else {
534 + this.rules = inline.gfm;
535 + }
536 + } else if (this.options.pedantic) {
537 + this.rules = inline.pedantic;
538 + }
539 +}
540 +
541 +/**
542 + * Expose Inline Rules
543 + */
544 +
545 +InlineLexer.rules = inline;
546 +
547 +/**
548 + * Static Lexing/Compiling Method
549 + */
550 +
551 +InlineLexer.output = function(src, links, options) {
552 + var inline = new InlineLexer(links, options);
553 + return inline.output(src);
554 +};
555 +
556 +/**
557 + * Lexing/Compiling
558 + */
559 +
560 +InlineLexer.prototype.output = function(src) {
561 + var out = ''
562 + , link
563 + , text
564 + , href
565 + , cap;
566 +
567 + while (src) {
568 + // escape
569 + if (cap = this.rules.escape.exec(src)) {
570 + src = src.substring(cap[0].length);
571 + out += cap[1];
572 + continue;
573 + }
574 +
575 + // autolink
576 + if (cap = this.rules.autolink.exec(src)) {
577 + src = src.substring(cap[0].length);
578 + if (cap[2] === '@') {
579 + text = cap[1].charAt(6) === ':'
580 + ? this.mangle(cap[1].substring(7))
581 + : this.mangle(cap[1]);
582 + href = this.mangle('mailto:') + text;
583 + } else {
584 + text = escape(cap[1]);
585 + href = text;
586 + }
587 + out += this.renderer.link(href, null, text);
588 + continue;
589 + }
590 +
591 + // url (gfm)
592 + if (!this.inLink && (cap = this.rules.url.exec(src))) {
593 + src = src.substring(cap[0].length);
594 + text = escape(cap[1]);
595 + href = text;
596 + out += this.renderer.link(href, null, text);
597 + continue;
598 + }
599 +
600 + // tag
601 + if (cap = this.rules.tag.exec(src)) {
602 + if (!this.inLink && /^<a /i.test(cap[0])) {
603 + this.inLink = true;
604 + } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
605 + this.inLink = false;
606 + }
607 + src = src.substring(cap[0].length);
608 + out += this.options.sanitize
609 + ? escape(cap[0])
610 + : cap[0];
611 + continue;
612 + }
613 +
614 + // link
615 + if (cap = this.rules.link.exec(src)) {
616 + src = src.substring(cap[0].length);
617 + this.inLink = true;
618 + out += this.outputLink(cap, {
619 + href: cap[2],
620 + title: cap[3]
621 + });
622 + this.inLink = false;
623 + continue;
624 + }
625 +
626 + // reflink, nolink
627 + if ((cap = this.rules.reflink.exec(src))
628 + || (cap = this.rules.nolink.exec(src))) {
629 + src = src.substring(cap[0].length);
630 + link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
631 + link = this.links[link.toLowerCase()];
632 + if (!link || !link.href) {
633 + out += cap[0].charAt(0);
634 + src = cap[0].substring(1) + src;
635 + continue;
636 + }
637 + this.inLink = true;
638 + out += this.outputLink(cap, link);
639 + this.inLink = false;
640 + continue;
641 + }
642 +
643 + // strong
644 + if (cap = this.rules.strong.exec(src)) {
645 + src = src.substring(cap[0].length);
646 + out += this.renderer.strong(this.output(cap[2] || cap[1]));
647 + continue;
648 + }
649 +
650 + // em
651 + if (cap = this.rules.em.exec(src)) {
652 + src = src.substring(cap[0].length);
653 + out += this.renderer.em(this.output(cap[2] || cap[1]));
654 + continue;
655 + }
656 +
657 + // code
658 + if (cap = this.rules.code.exec(src)) {
659 + src = src.substring(cap[0].length);
660 + out += this.renderer.codespan(escape(cap[2], true));
661 + continue;
662 + }
663 +
664 + // br
665 + if (cap = this.rules.br.exec(src)) {
666 + src = src.substring(cap[0].length);
667 + out += this.renderer.br();
668 + continue;
669 + }
670 +
671 + // del (gfm)
672 + if (cap = this.rules.del.exec(src)) {
673 + src = src.substring(cap[0].length);
674 + out += this.renderer.del(this.output(cap[1]));
675 + continue;
676 + }
677 +
678 + // text
679 + if (cap = this.rules.text.exec(src)) {
680 + src = src.substring(cap[0].length);
681 + out += escape(this.smartypants(cap[0]));
682 + continue;
683 + }
684 +
685 + if (src) {
686 + throw new
687 + Error('Infinite loop on byte: ' + src.charCodeAt(0));
688 + }
689 + }
690 +
691 + return out;
692 +};
693 +
694 +/**
695 + * Compile Link
696 + */
697 +
698 +InlineLexer.prototype.outputLink = function(cap, link) {
699 + var href = escape(link.href)
700 + , title = link.title ? escape(link.title) : null;
701 +
702 + return cap[0].charAt(0) !== '!'
703 + ? this.renderer.link(href, title, this.output(cap[1]))
704 + : this.renderer.image(href, title, escape(cap[1]));
705 +};
706 +
707 +/**
708 + * Smartypants Transformations
709 + */
710 +
711 +InlineLexer.prototype.smartypants = function(text) {
712 + if (!this.options.smartypants) return text;
713 + return text
714 + // em-dashes
715 + .replace(/--/g, '\u2014')
716 + // opening singles
717 + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
718 + // closing singles & apostrophes
719 + .replace(/'/g, '\u2019')
720 + // opening doubles
721 + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
722 + // closing doubles
723 + .replace(/"/g, '\u201d')
724 + // ellipses
725 + .replace(/\.{3}/g, '\u2026');
726 +};
727 +
728 +/**
729 + * Mangle Links
730 + */
731 +
732 +InlineLexer.prototype.mangle = function(text) {
733 + var out = ''
734 + , l = text.length
735 + , i = 0
736 + , ch;
737 +
738 + for (; i < l; i++) {
739 + ch = text.charCodeAt(i);
740 + if (Math.random() > 0.5) {
741 + ch = 'x' + ch.toString(16);
742 + }
743 + out += '&#' + ch + ';';
744 + }
745 +
746 + return out;
747 +};
748 +
749 +/**
750 + * Renderer
751 + */
752 +
753 +function Renderer(options) {
754 + this.options = options || {};
755 +}
756 +
757 +Renderer.prototype.code = function(code, lang, escaped) {
758 + if (this.options.highlight) {
759 + var out = this.options.highlight(code, lang);
760 + if (out != null && out !== code) {
761 + escaped = true;
762 + code = out;
763 + }
764 + }
765 +
766 + if (!lang) {
767 + return '<pre><code>'
768 + + (escaped ? code : escape(code, true))
769 + + '\n</code></pre>';
770 + }
771 +
772 + return '<pre><code class="'
773 + + this.options.langPrefix
774 + + escape(lang, true)
775 + + '">'
776 + + (escaped ? code : escape(code, true))
777 + + '\n</code></pre>\n';
778 +};
779 +
780 +Renderer.prototype.blockquote = function(quote) {
781 + return '<blockquote>\n' + quote + '</blockquote>\n';
782 +};
783 +
784 +Renderer.prototype.html = function(html) {
785 + return html;
786 +};
787 +
788 +Renderer.prototype.heading = function(text, level, raw) {
789 + return '<h'
790 + + level
791 + + ' id="'
792 + + this.options.headerPrefix
793 + + raw.toLowerCase().replace(/[^\w]+/g, '-')
794 + + '">'
795 + + text
796 + + '</h'
797 + + level
798 + + '>\n';
799 +};
800 +
801 +Renderer.prototype.hr = function() {
802 + return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
803 +};
804 +
805 +Renderer.prototype.list = function(body, ordered) {
806 + var type = ordered ? 'ol' : 'ul';
807 + return '<' + type + '>\n' + body + '</' + type + '>\n';
808 +};
809 +
810 +Renderer.prototype.listitem = function(text) {
811 + return '<li>' + text + '</li>\n';
812 +};
813 +
814 +Renderer.prototype.paragraph = function(text) {
815 + return '<p>' + text + '</p>\n';
816 +};
817 +
818 +Renderer.prototype.table = function(header, body) {
819 + return '<table>\n'
820 + + '<thead>\n'
821 + + header
822 + + '</thead>\n'
823 + + '<tbody>\n'
824 + + body
825 + + '</tbody>\n'
826 + + '</table>\n';
827 +};
828 +
829 +Renderer.prototype.tablerow = function(content) {
830 + return '<tr>\n' + content + '</tr>\n';
831 +};
832 +
833 +Renderer.prototype.tablecell = function(content, flags) {
834 + var type = flags.header ? 'th' : 'td';
835 + var tag = flags.align
836 + ? '<' + type + ' style="text-align:' + flags.align + '">'
837 + : '<' + type + '>';
838 + return tag + content + '</' + type + '>\n';
839 +};
840 +
841 +// span level renderer
842 +Renderer.prototype.strong = function(text) {
843 + return '<strong>' + text + '</strong>';
844 +};
845 +
846 +Renderer.prototype.em = function(text) {
847 + return '<em>' + text + '</em>';
848 +};
849 +
850 +Renderer.prototype.codespan = function(text) {
851 + return '<code>' + text + '</code>';
852 +};
853 +
854 +Renderer.prototype.br = function() {
855 + return this.options.xhtml ? '<br/>' : '<br>';
856 +};
857 +
858 +Renderer.prototype.del = function(text) {
859 + return '<del>' + text + '</del>';
860 +};
861 +
862 +Renderer.prototype.link = function(href, title, text) {
863 + if (this.options.sanitize) {
864 + try {
865 + var prot = decodeURIComponent(unescape(href))
866 + .replace(/[^\w:]/g, '')
867 + .toLowerCase();
868 + } catch (e) {
869 + return '';
870 + }
871 + if (prot.indexOf('javascript:') === 0) {
872 + return '';
873 + }
874 + }
875 + var out = '<a href="' + href + '"';
876 + if (title) {
877 + out += ' title="' + title + '"';
878 + }
879 + out += '>' + text + '</a>';
880 + return out;
881 +};
882 +
883 +Renderer.prototype.image = function(href, title, text) {
884 + var out = '<img src="' + href + '" alt="' + text + '"';
885 + if (title) {
886 + out += ' title="' + title + '"';
887 + }
888 + out += this.options.xhtml ? '/>' : '>';
889 + return out;
890 +};
891 +
892 +/**
893 + * Parsing & Compiling
894 + */
895 +
896 +function Parser(options) {
897 + this.tokens = [];
898 + this.token = null;
899 + this.options = options || marked.defaults;
900 + this.options.renderer = this.options.renderer || new Renderer;
901 + this.renderer = this.options.renderer;
902 + this.renderer.options = this.options;
903 +}
904 +
905 +/**
906 + * Static Parse Method
907 + */
908 +
909 +Parser.parse = function(src, options, renderer) {
910 + var parser = new Parser(options, renderer);
911 + return parser.parse(src);
912 +};
913 +
914 +/**
915 + * Parse Loop
916 + */
917 +
918 +Parser.prototype.parse = function(src) {
919 + this.inline = new InlineLexer(src.links, this.options, this.renderer);
920 + this.tokens = src.reverse();
921 +
922 + var out = '';
923 + while (this.next()) {
924 + out += this.tok();
925 + }
926 +
927 + return out;
928 +};
929 +
930 +/**
931 + * Next Token
932 + */
933 +
934 +Parser.prototype.next = function() {
935 + return this.token = this.tokens.pop();
936 +};
937 +
938 +/**
939 + * Preview Next Token
940 + */
941 +
942 +Parser.prototype.peek = function() {
943 + return this.tokens[this.tokens.length - 1] || 0;
944 +};
945 +
946 +/**
947 + * Parse Text Tokens
948 + */
949 +
950 +Parser.prototype.parseText = function() {
951 + var body = this.token.text;
952 +
953 + while (this.peek().type === 'text') {
954 + body += '\n' + this.next().text;
955 + }
956 +
957 + return this.inline.output(body);
958 +};
959 +
960 +/**
961 + * Parse Current Token
962 + */
963 +
964 +Parser.prototype.tok = function() {
965 + switch (this.token.type) {
966 + case 'space': {
967 + return '';
968 + }
969 + case 'hr': {
970 + return this.renderer.hr();
971 + }
972 + case 'heading': {
973 + return this.renderer.heading(
974 + this.inline.output(this.token.text),
975 + this.token.depth,
976 + this.token.text);
977 + }
978 + case 'code': {
979 + return this.renderer.code(this.token.text,
980 + this.token.lang,
981 + this.token.escaped);
982 + }
983 + case 'table': {
984 + var header = ''
985 + , body = ''
986 + , i
987 + , row
988 + , cell
989 + , flags
990 + , j;
991 +
992 + // header
993 + cell = '';
994 + for (i = 0; i < this.token.header.length; i++) {
995 + flags = { header: true, align: this.token.align[i] };
996 + cell += this.renderer.tablecell(
997 + this.inline.output(this.token.header[i]),
998 + { header: true, align: this.token.align[i] }
999 + );
1000 + }
1001 + header += this.renderer.tablerow(cell);
1002 +
1003 + for (i = 0; i < this.token.cells.length; i++) {
1004 + row = this.token.cells[i];
1005 +
1006 + cell = '';
1007 + for (j = 0; j < row.length; j++) {
1008 + cell += this.renderer.tablecell(
1009 + this.inline.output(row[j]),
1010 + { header: false, align: this.token.align[j] }
1011 + );
1012 + }
1013 +
1014 + body += this.renderer.tablerow(cell);
1015 + }
1016 + return this.renderer.table(header, body);
1017 + }
1018 + case 'blockquote_start': {
1019 + var body = '';
1020 +
1021 + while (this.next().type !== 'blockquote_end') {
1022 + body += this.tok();
1023 + }
1024 +
1025 + return this.renderer.blockquote(body);
1026 + }
1027 + case 'list_start': {
1028 + var body = ''
1029 + , ordered = this.token.ordered;
1030 +
1031 + while (this.next().type !== 'list_end') {
1032 + body += this.tok();
1033 + }
1034 +
1035 + return this.renderer.list(body, ordered);
1036 + }
1037 + case 'list_item_start': {
1038 + var body = '';
1039 +
1040 + while (this.next().type !== 'list_item_end') {
1041 + body += this.token.type === 'text'
1042 + ? this.parseText()
1043 + : this.tok();
1044 + }
1045 +
1046 + return this.renderer.listitem(body);
1047 + }
1048 + case 'loose_item_start': {
1049 + var body = '';
1050 +
1051 + while (this.next().type !== 'list_item_end') {
1052 + body += this.tok();
1053 + }
1054 +
1055 + return this.renderer.listitem(body);
1056 + }
1057 + case 'html': {
1058 + var html = !this.token.pre && !this.options.pedantic
1059 + ? this.inline.output(this.token.text)
1060 + : this.token.text;
1061 + return this.renderer.html(html);
1062 + }
1063 + case 'paragraph': {
1064 + return this.renderer.paragraph(this.inline.output(this.token.text));
1065 + }
1066 + case 'text': {
1067 + return this.renderer.paragraph(this.parseText());
1068 + }
1069 + }
1070 +};
1071 +
1072 +/**
1073 + * Helpers
1074 + */
1075 +
1076 +function escape(html, encode) {
1077 + return html
1078 + .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
1079 + .replace(/</g, '&lt;')
1080 + .replace(/>/g, '&gt;')
1081 + .replace(/"/g, '&quot;')
1082 + .replace(/'/g, '&#39;');
1083 +}
1084 +
1085 +function unescape(html) {
1086 + return html.replace(/&([#\w]+);/g, function(_, n) {
1087 + n = n.toLowerCase();
1088 + if (n === 'colon') return ':';
1089 + if (n.charAt(0) === '#') {
1090 + return n.charAt(1) === 'x'
1091 + ? String.fromCharCode(parseInt(n.substring(2), 16))
1092 + : String.fromCharCode(+n.substring(1));
1093 + }
1094 + return '';
1095 + });
1096 +}
1097 +
1098 +function replace(regex, opt) {
1099 + regex = regex.source;
1100 + opt = opt || '';
1101 + return function self(name, val) {
1102 + if (!name) return new RegExp(regex, opt);
1103 + val = val.source || val;
1104 + val = val.replace(/(^|[^\[])\^/g, '$1');
1105 + regex = regex.replace(name, val);
1106 + return self;
1107 + };
1108 +}
1109 +
1110 +function noop() {}
1111 +noop.exec = noop;
1112 +
1113 +function merge(obj) {
1114 + var i = 1
1115 + , target
1116 + , key;
1117 +
1118 + for (; i < arguments.length; i++) {
1119 + target = arguments[i];
1120 + for (key in target) {
1121 + if (Object.prototype.hasOwnProperty.call(target, key)) {
1122 + obj[key] = target[key];
1123 + }
1124 + }
1125 + }
1126 +
1127 + return obj;
1128 +}
1129 +
1130 +
1131 +/**
1132 + * Marked
1133 + */
1134 +
1135 +function marked(src, opt, callback) {
1136 + if (callback || typeof opt === 'function') {
1137 + if (!callback) {
1138 + callback = opt;
1139 + opt = null;
1140 + }
1141 +
1142 + opt = merge({}, marked.defaults, opt || {});
1143 +
1144 + var highlight = opt.highlight
1145 + , tokens
1146 + , pending
1147 + , i = 0;
1148 +
1149 + try {
1150 + tokens = Lexer.lex(src, opt)
1151 + } catch (e) {
1152 + return callback(e);
1153 + }
1154 +
1155 + pending = tokens.length;
1156 +
1157 + var done = function(err) {
1158 + if (err) {
1159 + opt.highlight = highlight;
1160 + return callback(err);
1161 + }
1162 +
1163 + var out;
1164 +
1165 + try {
1166 + out = Parser.parse(tokens, opt);
1167 + } catch (e) {
1168 + err = e;
1169 + }
1170 +
1171 + opt.highlight = highlight;
1172 +
1173 + return err
1174 + ? callback(err)
1175 + : callback(null, out);
1176 + };
1177 +
1178 + if (!highlight || highlight.length < 3) {
1179 + return done();
1180 + }
1181 +
1182 + delete opt.highlight;
1183 +
1184 + if (!pending) return done();
1185 +
1186 + for (; i < tokens.length; i++) {
1187 + (function(token) {
1188 + if (token.type !== 'code') {
1189 + return --pending || done();
1190 + }
1191 + return highlight(token.text, token.lang, function(err, code) {
1192 + if (err) return done(err);
1193 + if (code == null || code === token.text) {
1194 + return --pending || done();
1195 + }
1196 + token.text = code;
1197 + token.escaped = true;
1198 + --pending || done();
1199 + });
1200 + })(tokens[i]);
1201 + }
1202 +
1203 + return;
1204 + }
1205 + try {
1206 + if (opt) opt = merge({}, marked.defaults, opt);
1207 + return Parser.parse(Lexer.lex(src, opt), opt);
1208 + } catch (e) {
1209 + e.message += '\nPlease report this to https://github.com/chjj/marked.';
1210 + if ((opt || marked.defaults).silent) {
1211 + return '<p>An error occured:</p><pre>'
1212 + + escape(e.message + '', true)
1213 + + '</pre>';
1214 + }
1215 + throw e;
1216 + }
1217 +}
1218 +
1219 +/**
1220 + * Options
1221 + */
1222 +
1223 +marked.options =
1224 +marked.setOptions = function(opt) {
1225 + merge(marked.defaults, opt);
1226 + return marked;
1227 +};
1228 +
1229 +marked.defaults = {
1230 + gfm: true,
1231 + tables: true,
1232 + breaks: false,
1233 + pedantic: false,
1234 + sanitize: false,
1235 + smartLists: false,
1236 + silent: false,
1237 + highlight: null,
1238 + langPrefix: 'lang-',
1239 + smartypants: false,
1240 + headerPrefix: '',
1241 + renderer: new Renderer,
1242 + xhtml: false
1243 +};
1244 +
1245 +/**
1246 + * Expose
1247 + */
1248 +
1249 +marked.Parser = Parser;
1250 +marked.parser = Parser.parse;
1251 +
1252 +marked.Renderer = Renderer;
1253 +
1254 +marked.Lexer = Lexer;
1255 +marked.lexer = Lexer.lex;
1256 +
1257 +marked.InlineLexer = InlineLexer;
1258 +marked.inlineLexer = InlineLexer.output;
1259 +
1260 +marked.parse = marked;
1261 +
1262 +if (typeof module !== 'undefined' && typeof exports === 'object') {
1263 + module.exports = marked;
1264 +} else if (typeof define === 'function' && define.amd) {
1265 + define(function() { return marked; });
1266 +} else {
1267 + this.marked = marked;
1268 +}
1269 +
1270 +}).call(function() {
1271 + return this || (typeof window !== 'undefined' ? window : global);
1272 +}());
...\ No newline at end of file ...\ No newline at end of file
1 +var appName;
2 +var popupMask;
3 +var popupDialog;
4 +var clientId;
5 +var realm;
6 +var oauth2KeyName;
7 +var redirect_uri;
8 +
9 +function handleLogin() {
10 + var scopes = [];
11 +
12 + var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
13 + if(auths) {
14 + var key;
15 + var defs = auths;
16 + for(key in defs) {
17 + var auth = defs[key];
18 + if(auth.type === 'oauth2' && auth.scopes) {
19 + oauth2KeyName = key;
20 + var scope;
21 + if(Array.isArray(auth.scopes)) {
22 + // 1.2 support
23 + var i;
24 + for(i = 0; i < auth.scopes.length; i++) {
25 + scopes.push(auth.scopes[i]);
26 + }
27 + }
28 + else {
29 + // 2.0 support
30 + for(scope in auth.scopes) {
31 + scopes.push({scope: scope, description: auth.scopes[scope]});
32 + }
33 + }
34 + }
35 + }
36 + }
37 +
38 + if(window.swaggerUi.api
39 + && window.swaggerUi.api.info) {
40 + appName = window.swaggerUi.api.info.title;
41 + }
42 +
43 + popupDialog = $(
44 + [
45 + '<div class="api-popup-dialog">',
46 + '<div class="api-popup-title">Select OAuth2.0 Scopes</div>',
47 + '<div class="api-popup-content">',
48 + '<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.',
49 + '<a href="#">Learn how to use</a>',
50 + '</p>',
51 + '<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>',
52 + '<ul class="api-popup-scopes">',
53 + '</ul>',
54 + '<p class="error-msg"></p>',
55 + '<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>',
56 + '</div>',
57 + '</div>'].join(''));
58 + $(document.body).append(popupDialog);
59 +
60 + popup = popupDialog.find('ul.api-popup-scopes').empty();
61 + for (i = 0; i < scopes.length; i ++) {
62 + scope = scopes[i];
63 + str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"/>' + '<label for="scope_' + i + '">' + scope.scope;
64 + if (scope.description) {
65 + str += '<br/><span class="api-scope-desc">' + scope.description + '</span>';
66 + }
67 + str += '</label></li>';
68 + popup.append(str);
69 + }
70 +
71 + var $win = $(window),
72 + dw = $win.width(),
73 + dh = $win.height(),
74 + st = $win.scrollTop(),
75 + dlgWd = popupDialog.outerWidth(),
76 + dlgHt = popupDialog.outerHeight(),
77 + top = (dh -dlgHt)/2 + st,
78 + left = (dw - dlgWd)/2;
79 +
80 + popupDialog.css({
81 + top: (top < 0? 0 : top) + 'px',
82 + left: (left < 0? 0 : left) + 'px'
83 + });
84 +
85 + popupDialog.find('button.api-popup-cancel').click(function() {
86 + popupMask.hide();
87 + popupDialog.hide();
88 + popupDialog.empty();
89 + popupDialog = [];
90 + });
91 +
92 + $('button.api-popup-authbtn').unbind();
93 + popupDialog.find('button.api-popup-authbtn').click(function() {
94 + popupMask.hide();
95 + popupDialog.hide();
96 +
97 + var authSchemes = window.swaggerUi.api.authSchemes;
98 + var host = window.location;
99 + var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
100 + var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
101 + var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
102 + var url = null;
103 +
104 + for (var key in authSchemes) {
105 + if (authSchemes.hasOwnProperty(key)) {
106 + var flow = authSchemes[key].flow;
107 +
108 + if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
109 + var dets = authSchemes[key];
110 + url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
111 + window.swaggerUi.tokenName = dets.tokenName || 'access_token';
112 + window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
113 + }
114 + else if(authSchemes[key].grantTypes) {
115 + // 1.2 support
116 + var o = authSchemes[key].grantTypes;
117 + for(var t in o) {
118 + if(o.hasOwnProperty(t) && t === 'implicit') {
119 + var dets = o[t];
120 + var ep = dets.loginEndpoint.url;
121 + url = dets.loginEndpoint.url + '?response_type=token';
122 + window.swaggerUi.tokenName = dets.tokenName;
123 + }
124 + else if (o.hasOwnProperty(t) && t === 'accessCode') {
125 + var dets = o[t];
126 + var ep = dets.tokenRequestEndpoint.url;
127 + url = dets.tokenRequestEndpoint.url + '?response_type=code';
128 + window.swaggerUi.tokenName = dets.tokenName;
129 + }
130 + }
131 + }
132 + }
133 + }
134 + var scopes = []
135 + var o = $('.api-popup-scopes').find('input:checked');
136 +
137 + for(k =0; k < o.length; k++) {
138 + var scope = $(o[k]).attr('scope');
139 +
140 + if (scopes.indexOf(scope) === -1)
141 + scopes.push(scope);
142 + }
143 +
144 + // Implicit auth recommends a state parameter.
145 + var state = Math.random ();
146 +
147 + window.enabledScopes=scopes;
148 +
149 + redirect_uri = redirectUrl;
150 +
151 + url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
152 + url += '&realm=' + encodeURIComponent(realm);
153 + url += '&client_id=' + encodeURIComponent(clientId);
154 + url += '&scope=' + encodeURIComponent(scopes.join(' '));
155 + url += '&state=' + encodeURIComponent(state);
156 +
157 + window.open(url);
158 + });
159 +
160 + popupMask.show();
161 + popupDialog.show();
162 + return;
163 +}
164 +
165 +
166 +function handleLogout() {
167 + for(key in window.authorizations.authz){
168 + window.authorizations.remove(key)
169 + }
170 + window.enabledScopes = null;
171 + $('.api-ic.ic-on').addClass('ic-off');
172 + $('.api-ic.ic-on').removeClass('ic-on');
173 +
174 + // set the info box
175 + $('.api-ic.ic-warning').addClass('ic-error');
176 + $('.api-ic.ic-warning').removeClass('ic-warning');
177 +}
178 +
179 +function initOAuth(opts) {
180 + var o = (opts||{});
181 + var errors = [];
182 +
183 + appName = (o.appName||errors.push('missing appName'));
184 + popupMask = (o.popupMask||$('#api-common-mask'));
185 + popupDialog = (o.popupDialog||$('.api-popup-dialog'));
186 + clientId = (o.clientId||errors.push('missing client id'));
187 + realm = (o.realm||errors.push('missing realm'));
188 +
189 + if(errors.length > 0){
190 + log('auth unable initialize oauth: ' + errors);
191 + return;
192 + }
193 +
194 + $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
195 + $('.api-ic').unbind();
196 + $('.api-ic').click(function(s) {
197 + if($(s.target).hasClass('ic-off'))
198 + handleLogin();
199 + else {
200 + handleLogout();
201 + }
202 + false;
203 + });
204 +}
205 +
206 +window.processOAuthCode = function processOAuthCode(data) {
207 + var params = {
208 + 'client_id': clientId,
209 + 'code': data.code,
210 + 'grant_type': 'authorization_code',
211 + 'redirect_uri': redirect_uri
212 + }
213 + $.ajax(
214 + {
215 + url : window.swaggerUi.tokenUrl,
216 + type: "POST",
217 + data: params,
218 + success:function(data, textStatus, jqXHR)
219 + {
220 + onOAuthComplete(data);
221 + },
222 + error: function(jqXHR, textStatus, errorThrown)
223 + {
224 + onOAuthComplete("");
225 + }
226 + });
227 +}
228 +
229 +window.onOAuthComplete = function onOAuthComplete(token) {
230 + if(token) {
231 + if(token.error) {
232 + var checkbox = $('input[type=checkbox],.secured')
233 + checkbox.each(function(pos){
234 + checkbox[pos].checked = false;
235 + });
236 + alert(token.error);
237 + }
238 + else {
239 + var b = token[window.swaggerUi.tokenName];
240 + if(b){
241 + // if all roles are satisfied
242 + var o = null;
243 + $.each($('.auth #api_information_panel'), function(k, v) {
244 + var children = v;
245 + if(children && children.childNodes) {
246 + var requiredScopes = [];
247 + $.each((children.childNodes), function (k1, v1){
248 + var inner = v1.innerHTML;
249 + if(inner)
250 + requiredScopes.push(inner);
251 + });
252 + var diff = [];
253 + for(var i=0; i < requiredScopes.length; i++) {
254 + var s = requiredScopes[i];
255 + if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) {
256 + diff.push(s);
257 + }
258 + }
259 + if(diff.length > 0){
260 + o = v.parentNode;
261 + $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');
262 + $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');
263 +
264 + // sorry, not all scopes are satisfied
265 + $(o).find('.api-ic').addClass('ic-warning');
266 + $(o).find('.api-ic').removeClass('ic-error');
267 + }
268 + else {
269 + o = v.parentNode;
270 + $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');
271 + $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');
272 +
273 + // all scopes are satisfied
274 + $(o).find('.api-ic').addClass('ic-info');
275 + $(o).find('.api-ic').removeClass('ic-warning');
276 + $(o).find('.api-ic').removeClass('ic-error');
277 + }
278 + }
279 + });
280 + window.swaggerUi.api.clientAuthorizations.add(oauth2KeyName, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
281 + }
282 + }
283 + }
284 +}
1 +// Underscore.js 1.7.0
2 +// http://underscorejs.org
3 +// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4 +// Underscore may be freely distributed under the MIT license.
5 +(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])<u?i=o+1:a=o}return i},h.toArray=function(n){return n?h.isArray(n)?a.call(n):n.length===+n.length?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:n.length===+n.length?n.length:h.keys(n).length},h.partition=function(n,t,r){t=h.iteratee(t,r);var e=[],u=[];return h.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},h.first=h.head=h.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},h.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this);
6 +//# sourceMappingURL=underscore-min.map
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
61 org.onosproject.rest.exceptions.IllegalStateExceptionMapper, 61 org.onosproject.rest.exceptions.IllegalStateExceptionMapper,
62 org.onosproject.rest.resources.JsonBodyWriter, 62 org.onosproject.rest.resources.JsonBodyWriter,
63 63
64 + org.onosproject.rest.resources.ApiDocResource,
64 org.onosproject.rest.resources.ApplicationsWebResource, 65 org.onosproject.rest.resources.ApplicationsWebResource,
65 org.onosproject.rest.resources.ComponentConfigWebResource, 66 org.onosproject.rest.resources.ComponentConfigWebResource,
66 org.onosproject.rest.resources.NetworkConfigWebResource, 67 org.onosproject.rest.resources.NetworkConfigWebResource,
......
...@@ -18,6 +18,7 @@ package org.onosproject.ui.impl; ...@@ -18,6 +18,7 @@ package org.onosproject.ui.impl;
18 import com.google.common.collect.ImmutableList; 18 import com.google.common.collect.ImmutableList;
19 import com.google.common.collect.ImmutableList.Builder; 19 import com.google.common.collect.ImmutableList.Builder;
20 import org.onlab.osgi.ServiceNotFoundException; 20 import org.onlab.osgi.ServiceNotFoundException;
21 +import org.onosproject.rest.AbstractInjectionResource;
21 import org.onosproject.ui.UiExtensionService; 22 import org.onosproject.ui.UiExtensionService;
22 23
23 import javax.ws.rs.GET; 24 import javax.ws.rs.GET;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.ui.impl; 16 package org.onosproject.ui.impl;
17 17
18 +import org.onosproject.rest.AbstractInjectionResource;
18 import org.onosproject.ui.UiExtension; 19 import org.onosproject.ui.UiExtension;
19 import org.onosproject.ui.UiExtensionService; 20 import org.onosproject.ui.UiExtensionService;
20 import org.onosproject.ui.UiView; 21 import org.onosproject.ui.UiView;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.ui.impl; 16 package org.onosproject.ui.impl;
17 17
18 +import org.onosproject.rest.AbstractInjectionResource;
18 import org.onosproject.ui.UiExtension; 19 import org.onosproject.ui.UiExtension;
19 import org.onosproject.ui.UiExtensionService; 20 import org.onosproject.ui.UiExtensionService;
20 import org.onosproject.ui.UiView; 21 import org.onosproject.ui.UiView;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.ui.impl; 16 package org.onosproject.ui.impl;
17 17
18 +import org.onosproject.rest.AbstractInjectionResource;
18 import org.onosproject.ui.UiExtension; 19 import org.onosproject.ui.UiExtension;
19 import org.onosproject.ui.UiExtensionService; 20 import org.onosproject.ui.UiExtensionService;
20 21
......
...@@ -75,8 +75,6 @@ ...@@ -75,8 +75,6 @@
75 <scope>test</scope> 75 <scope>test</scope>
76 </dependency> 76 </dependency>
77 77
78 -
79 -
80 <dependency> 78 <dependency>
81 <groupId>com.sun.jersey</groupId> 79 <groupId>com.sun.jersey</groupId>
82 <artifactId>jersey-servlet</artifactId> 80 <artifactId>jersey-servlet</artifactId>
...@@ -118,39 +116,6 @@ ...@@ -118,39 +116,6 @@
118 <groupId>org.apache.felix</groupId> 116 <groupId>org.apache.felix</groupId>
119 <artifactId>maven-scr-plugin</artifactId> 117 <artifactId>maven-scr-plugin</artifactId>
120 </plugin> 118 </plugin>
121 - <plugin>
122 - <groupId>org.apache.felix</groupId>
123 - <artifactId>maven-bundle-plugin</artifactId>
124 - <extensions>true</extensions>
125 - <configuration>
126 - <instructions>
127 - <_wab>src/main/webapp/</_wab>
128 - <Bundle-SymbolicName>
129 - ${project.groupId}.${project.artifactId}
130 - </Bundle-SymbolicName>
131 - <Import-Package>
132 - org.slf4j,
133 - org.osgi.framework,
134 - javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext,
135 - com.sun.jersey.api,
136 - com.sun.jersey.spi.container.servlet,
137 - com.sun.jersey.server.impl.container.servlet,
138 - com.fasterxml.jackson.databind,
139 - com.fasterxml.jackson.databind.node,
140 - com.google.common.base.*,
141 - com.google.common.collect.*,
142 - com.google.common.io.*,
143 - org.eclipse.jetty.websocket.*,
144 - org.onlab.util.*,
145 - org.onlab.osgi.*,
146 - org.onlab.packet.*,
147 - org.onlab.rest.*,
148 - org.onosproject.*
149 - </Import-Package>
150 - <Web-ContextPath>${web.context}</Web-ContextPath>
151 - </instructions>
152 - </configuration>
153 - </plugin>
154 </plugins> 119 </plugins>
155 </build> 120 </build>
156 121
......