Added web server and partly integrated frontend

This commit is contained in:
simon 2018-04-27 16:58:50 -04:00
parent 3c5bfdb30b
commit bd5f8573e8
94 changed files with 161410 additions and 27 deletions

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -18,6 +23,34 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.10.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-template-velocity:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-core:2.5.5" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.21" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -17,6 +22,34 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.10.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-template-velocity:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-core:2.5.5" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.21" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -20,5 +25,33 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.10.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-template-velocity:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-core:2.5.5" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.21" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
</component>
</module>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -20,5 +25,33 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.10.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-template-velocity:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-core:2.5.5" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.21" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
</component>
</module>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -19,5 +24,33 @@
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.10.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-template-velocity:2.7.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.sparkjava:spark-core:2.5.5" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.3.6.v20151106" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.21" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
</component>
</module>

View File

@ -24,10 +24,6 @@
<resources>
<resource>
<directory>../Server/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>config.properties</include>
</includes>
</resource>
</resources>
</configuration>
@ -123,6 +119,21 @@
<artifactId>mongo-java-driver</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-template-velocity</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
</dependency>
</dependencies>

View File

@ -2,8 +2,15 @@ package net.simon987.server;
import net.simon987.server.logging.LogManager;
import net.simon987.server.webserver.SocketServer;
import org.apache.velocity.app.VelocityEngine;
import spark.ModelAndView;
import spark.Spark;
import spark.template.velocity.VelocityTemplateEngine;
import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public class Main {
@ -22,5 +29,36 @@ public class Main {
(new Thread(socketServer)).start();
(new Thread(GameServer.INSTANCE)).start();
//TEST ---------------------------
Properties properties = new Properties();
properties.setProperty("file.resource.loader.path", "templates/");
VelocityTemplateEngine templateEngine = new VelocityTemplateEngine(new VelocityEngine(properties));
//--
Spark.staticFiles.externalLocation("static");
Spark.get("/", (request, response) -> {
Map<String, Object> model = new HashMap<>();
System.out.println((String) request.session().attribute("user"));
return new ModelAndView(model, "home.vm");
}, templateEngine);
Spark.get("/leaderboard", (request, response) -> {
return new ModelAndView(new HashMap<>(), "leaderboard.vm");
}, templateEngine);
Spark.get("/play", (request, response) -> {
Map<String, Object> model = new HashMap<>();
return new ModelAndView(model, "play.vm");
}, templateEngine);
Spark.get("/account", (request, response) -> {
Map<String, Object> model = new HashMap<>();
return new ModelAndView(model, "account.vm");
}, templateEngine);
Spark.after((request, response) -> response.header("Content-Encoding", "gzip"));
}
}

View File

@ -0,0 +1,10 @@
package net.simon987.server.game;
//Alpha: ±5cm
//Beta: 10-20 feet
//Gamma: 100+ feet
public interface Radioactive {
}

View File

@ -0,0 +1,58 @@
package net.simon987.server.user;
import com.mongodb.*;
import net.simon987.server.assembly.exception.CancelledException;
import org.springframework.security.crypto.bcrypt.BCrypt;
import java.util.ArrayList;
public class UserManager {
private MongoClient mongo;
private DBCollection userCollection;
public UserManager(MongoClient mongo) {
this.mongo = mongo;
DB db = mongo.getDB("mar");
userCollection = db.getCollection("user");
}
public ArrayList<User> getUsers() {
ArrayList<User> userList = new ArrayList<>();
DBCursor cursor = userCollection.find();
while (cursor.hasNext()) {
try {
userList.add(User.deserialize(cursor.next()));
} catch (CancelledException e) {
e.printStackTrace();
}
}
return userList;
}
public void registerUser(User user, String password) {
DBObject dbUser = user.mongoSerialise();
String salt = BCrypt.gensalt(12);
String hashedPassword = BCrypt.hashpw(password, salt);
dbUser.put("password", hashedPassword);
userCollection.save(dbUser);
}
public boolean validateUser(String username, String password) {
DBObject where = new BasicDBObject();
where.put("_id", username);
DBObject user = userCollection.findOne(where);
return user != null && BCrypt.checkpw(password, (String) user.get("password"));
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
/*!
* Bootstrap Reboot v4.1.0 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,127 @@
#console-wrapper {
height: 400px;
width: 100%;
position: relative;
line-height: 1.2;
display: inline-block;
margin: 1em 0 0 0;
z-index: 1;
}
.piece {
display: block;
height: 100%;
left: 0;
top: 0;
width: 100%;
}
.noclick {
pointer-events: none;
}
#consoleText {
font-family: fixedsys;
font-size: 24px;
white-space: pre-wrap;
-webkit-animation: crt-output 10ms infinite;
animation: crt-output 10ms infinite;
overflow-y: scroll;
position: absolute;
padding: 3rem 2rem;
pointer-events: auto;
text-align: left;
text-shadow: 0 0.2rem 1rem #0c7b46;
border-radius: 2rem;
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);
z-index: -1;
}
#consoleText::-webkit-scrollbar {
display: none;
}
@-webkit-keyframes crt-output {
0% {
opacity: 0.95;
}
50% {
opacity: 1;
}
}
@keyframes crt-output {
0% {
opacity: 0.95;
}
50% {
opacity: 1;
}
}
.scanlines {
background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), color-stop(50%, rgba(255, 255, 255, 0)), color-stop(70%, rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.6)));
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0.6));
background-size: 100% 0.3rem;
border-radius: 2rem;
position: absolute;
}
.glow {
-webkit-animation: crt-glow 20s infinite;
animation: crt-glow 20s infinite;
background: radial-gradient(circle at 50% 50%, #1bd459 0%, rgba(27, 212, 89, 0.88) 58%, rgba(21, 235, 92, 0.57) 80%, rgba(19, 94, 29, 0.27) 93%, rgba(10, 23, 12, 0) 100%);
opacity: 0.15;
pointer-events: none;
position: relative;
}
@-webkit-keyframes crt-glow {
0% {
opacity: 0.1;
}
50% {
opacity: 0.2;
}
}
@keyframes crt-glow {
0% {
opacity: 0.1;
}
50% {
opacity: 0.2;
}
}
.ctr-selection::-moz-selection {
background-color: #14fdce;
color: #031e11;
}
.ctr-selection::selection {
background-color: #14fdce;
color: #031e11;
}
.ctr-selection-inverted::-moz-selection {
background-color: #031e11;
color: #14fdce;
}
.ctr-selection-inverted::selection {
background-color: #031e11;
color: #14fdce;
}
.ctr-text {
color: #14fdce;
background-color: #031e11;
}
.ctr-text-inverted {
color: #031e11;
background-color: #14fdce;
}

View File

@ -0,0 +1,82 @@
.feature-image {
width: 100%;
height: 100%;
border-radius: 10px 10px 0 0;
}
.footer {
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #282A38;
}
@media (min-width: 550px) {
.card-columns {
column-count: 2;
}
}
@media (min-width: 1200px) {
.card-columns {
column-count: 4;
}
}
@media (min-width: 1500px) {
.container {
max-width: 1440px;
}
}
@media (min-width: 1800px) {
.container {
max-width: 1550px;
}
}
.container {
margin-top: 1em;
}
#editor {
margin: 1em 0 1em 1em;
height: 35em;
box-shadow: rgba(46, 94, 80, 0.45) 0 0 2ex;
}
@font-face {
font-family: 'fixedsys';
src: url("../webfonts/FSEX301-L2.ttf");
}
.regular-screen {
display: none;
}
@media (min-width: 992px) {
.small-screen {
display: none;
}
.regular-screen {
display: inherit;
}
}
.col-sm-4 {
-webkit-box-flex: 0;
-webkit-flex: 0 0 33.33333%;
-ms-flex: 0 0 33.33333%;
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.col-sm-2 {
-webkit-box-flex: 0;
-webkit-flex: 0 0 16.66667%;
-ms-flex: 0 0 16.66667%;
flex: 0 0 16.66667%;
max-width: 16.66667%;
}

View File

@ -0,0 +1,36 @@
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(/webfonts/MaterialIcons-Regular.woff2) format('woff2'),
url(/webfonts/MaterialIcons-Regular.woff) format('woff'),
url(/webfonts/MaterialIcons-Regular.ttf) format('truetype');
}
.mi {
font-family: 'Material Icons', serif;
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
vertical-align: bottom;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,511 @@
define("ace/ext/searchbox", ["require", "exports", "module", "ace/lib/dom", "ace/lib/lang", "ace/lib/event", "ace/keyboard/hash_handler", "ace/lib/keys"], function (require, exports, module) {
"use strict";
var dom = require("../lib/dom");
var lang = require("../lib/lang");
var event = require("../lib/event");
var searchboxCss = "\
.ace_search {\
background-color: #ddd;\
color: #666;\
border: 1px solid #cbcbcb;\
border-top: 0 none;\
overflow: hidden;\
margin: 0;\
padding: 4px 6px 0 4px;\
position: absolute;\
top: 0;\
z-index: 99;\
white-space: normal;\
}\
.ace_search.left {\
border-left: 0 none;\
border-radius: 0px 0px 5px 0px;\
left: 0;\
}\
.ace_search.right {\
border-radius: 0px 0px 0px 5px;\
border-right: 0 none;\
right: 0;\
}\
.ace_search_form, .ace_replace_form {\
margin: 0 20px 4px 0;\
overflow: hidden;\
line-height: 1.9;\
}\
.ace_replace_form {\
margin-right: 0;\
}\
.ace_search_form.ace_nomatch {\
outline: 1px solid red;\
}\
.ace_search_field {\
border-radius: 3px 0 0 3px;\
background-color: white;\
color: black;\
border: 1px solid #cbcbcb;\
border-right: 0 none;\
box-sizing: border-box!important;\
outline: 0;\
padding: 0;\
font-size: inherit;\
margin: 0;\
line-height: inherit;\
padding: 0 6px;\
min-width: 17em;\
vertical-align: top;\
}\
.ace_searchbtn {\
border: 1px solid #cbcbcb;\
line-height: inherit;\
display: inline-block;\
padding: 0 6px;\
background: #fff;\
border-right: 0 none;\
border-left: 1px solid #dcdcdc;\
cursor: pointer;\
margin: 0;\
position: relative;\
box-sizing: content-box!important;\
color: #666;\
}\
.ace_searchbtn:last-child {\
border-radius: 0 3px 3px 0;\
border-right: 1px solid #cbcbcb;\
}\
.ace_searchbtn:disabled {\
background: none;\
cursor: default;\
}\
.ace_searchbtn:hover {\
background-color: #eef1f6;\
}\
.ace_searchbtn.prev, .ace_searchbtn.next {\
padding: 0px 0.7em\
}\
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\
content: \"\";\
border: solid 2px #888;\
width: 0.5em;\
height: 0.5em;\
border-width: 2px 0 0 2px;\
display:inline-block;\
transform: rotate(-45deg);\
}\
.ace_searchbtn.next:after {\
border-width: 0 2px 2px 0 ;\
}\
.ace_searchbtn_close {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
border-radius: 50%;\
border: 0 none;\
color: #656565;\
cursor: pointer;\
font: 16px/16px Arial;\
padding: 0;\
height: 14px;\
width: 14px;\
top: 9px;\
right: 7px;\
position: absolute;\
}\
.ace_searchbtn_close:hover {\
background-color: #656565;\
background-position: 50% 100%;\
color: white;\
}\
.ace_button {\
margin-left: 2px;\
cursor: pointer;\
-webkit-user-select: none;\
-moz-user-select: none;\
-o-user-select: none;\
-ms-user-select: none;\
user-select: none;\
overflow: hidden;\
opacity: 0.7;\
border: 1px solid rgba(100,100,100,0.23);\
padding: 1px;\
box-sizing: border-box!important;\
color: black;\
}\
.ace_button:hover {\
background-color: #eee;\
opacity:1;\
}\
.ace_button:active {\
background-color: #ddd;\
}\
.ace_button.checked {\
border-color: #3399ff;\
opacity:1;\
}\
.ace_search_options{\
margin-bottom: 3px;\
text-align: right;\
-webkit-user-select: none;\
-moz-user-select: none;\
-o-user-select: none;\
-ms-user-select: none;\
user-select: none;\
clear: both;\
}\
.ace_search_counter {\
float: left;\
font-family: arial;\
padding: 0 8px;\
}";
var HashHandler = require("../keyboard/hash_handler").HashHandler;
var keyUtil = require("../lib/keys");
var MAX_COUNT = 999;
dom.importCssString(searchboxCss, "ace_searchbox");
var html = '<div class="ace_search right">\
<span action="hide" class="ace_searchbtn_close"></span>\
<div class="ace_search_form">\
<input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
<span action="findPrev" class="ace_searchbtn prev"></span>\
<span action="findNext" class="ace_searchbtn next"></span>\
<span action="findAll" class="ace_searchbtn" title="Alt-Enter">All</span>\
</div>\
<div class="ace_replace_form">\
<input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
<span action="replaceAndFindNext" class="ace_searchbtn">Replace</span>\
<span action="replaceAll" class="ace_searchbtn">All</span>\
</div>\
<div class="ace_search_options">\
<span action="toggleReplace" class="ace_button" title="Toggle Replace mode"\
style="float:left;margin-top:-2px;padding:0 5px;">+</span>\
<span class="ace_search_counter"></span>\
<span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
<span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
<span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
<span action="searchInSelection" class="ace_button" title="Search In Selection">S</span>\
</div>\
</div>'.replace(/> +/g, ">");
var SearchBox = function (editor, range, showReplaceForm) {
var div = dom.createElement("div");
div.innerHTML = html;
this.element = div.firstChild;
this.setSession = this.setSession.bind(this);
this.$init();
this.setEditor(editor);
};
(function () {
this.setEditor = function (editor) {
editor.searchBox = this;
editor.renderer.scroller.appendChild(this.element);
this.editor = editor;
};
this.setSession = function (e) {
this.searchRange = null;
this.$syncOptions(true);
};
this.$initElements = function (sb) {
this.searchBox = sb.querySelector(".ace_search_form");
this.replaceBox = sb.querySelector(".ace_replace_form");
this.searchOption = sb.querySelector("[action=searchInSelection]");
this.replaceOption = sb.querySelector("[action=toggleReplace]");
this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
this.searchInput = this.searchBox.querySelector(".ace_search_field");
this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
this.searchCounter = sb.querySelector(".ace_search_counter");
};
this.$init = function () {
var sb = this.element;
this.$initElements(sb);
var _this = this;
event.addListener(sb, "mousedown", function (e) {
setTimeout(function () {
_this.activeInput.focus();
}, 0);
event.stopPropagation(e);
});
event.addListener(sb, "click", function (e) {
var t = e.target || e.srcElement;
var action = t.getAttribute("action");
if (action && _this[action])
_this[action]();
else if (_this.$searchBarKb.commands[action])
_this.$searchBarKb.commands[action].exec(_this);
event.stopPropagation(e);
});
event.addCommandKeyListener(sb, function (e, hashId, keyCode) {
var keyString = keyUtil.keyCodeToString(keyCode);
var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
if (command && command.exec) {
command.exec(_this);
event.stopEvent(e);
}
});
this.$onChange = lang.delayedCall(function () {
_this.find(false, false);
});
event.addListener(this.searchInput, "input", function () {
_this.$onChange.schedule(20);
});
event.addListener(this.searchInput, "focus", function () {
_this.activeInput = _this.searchInput;
_this.searchInput.value && _this.highlight();
});
event.addListener(this.replaceInput, "focus", function () {
_this.activeInput = _this.replaceInput;
_this.searchInput.value && _this.highlight();
});
};
this.$closeSearchBarKb = new HashHandler([{
bindKey: "Esc",
name: "closeSearchBar",
exec: function (editor) {
editor.searchBox.hide();
}
}]);
this.$searchBarKb = new HashHandler();
this.$searchBarKb.bindKeys({
"Ctrl-f|Command-f": function (sb) {
var isReplace = sb.isReplace = !sb.isReplace;
sb.replaceBox.style.display = isReplace ? "" : "none";
sb.replaceOption.checked = false;
sb.$syncOptions();
sb.searchInput.focus();
},
"Ctrl-H|Command-Option-F": function (sb) {
sb.replaceOption.checked = true;
sb.$syncOptions();
sb.replaceInput.focus();
},
"Ctrl-G|Command-G": function (sb) {
sb.findNext();
},
"Ctrl-Shift-G|Command-Shift-G": function (sb) {
sb.findPrev();
},
"esc": function (sb) {
setTimeout(function () {
sb.hide();
});
},
"Return": function (sb) {
if (sb.activeInput == sb.replaceInput)
sb.replace();
sb.findNext();
},
"Shift-Return": function (sb) {
if (sb.activeInput == sb.replaceInput)
sb.replace();
sb.findPrev();
},
"Alt-Return": function (sb) {
if (sb.activeInput == sb.replaceInput)
sb.replaceAll();
sb.findAll();
},
"Tab": function (sb) {
(sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
}
});
this.$searchBarKb.addCommands([{
name: "toggleRegexpMode",
bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
exec: function (sb) {
sb.regExpOption.checked = !sb.regExpOption.checked;
sb.$syncOptions();
}
}, {
name: "toggleCaseSensitive",
bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
exec: function (sb) {
sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
sb.$syncOptions();
}
}, {
name: "toggleWholeWords",
bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
exec: function (sb) {
sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
sb.$syncOptions();
}
}, {
name: "toggleReplace",
exec: function (sb) {
sb.replaceOption.checked = !sb.replaceOption.checked;
sb.$syncOptions();
}
}, {
name: "searchInSelection",
exec: function (sb) {
sb.searchOption.checked = !sb.searchRange;
sb.setSearchRange(sb.searchOption.checked && sb.editor.getSelectionRange());
sb.$syncOptions();
}
}]);
this.setSearchRange = function (range) {
this.searchRange = range;
if (range) {
this.searchRangeMarker = this.editor.session.addMarker(range, "ace_active-line");
} else if (this.searchRangeMarker) {
this.editor.session.removeMarker(this.searchRangeMarker);
this.searchRangeMarker = null;
}
};
this.$syncOptions = function (preventScroll) {
dom.setCssClass(this.replaceOption, "checked", this.searchRange);
dom.setCssClass(this.searchOption, "checked", this.searchOption.checked);
this.replaceOption.textContent = this.replaceOption.checked ? "-" : "+";
dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
this.replaceBox.style.display = this.replaceOption.checked ? "" : "none";
this.find(false, false, preventScroll);
};
this.highlight = function (re) {
this.editor.session.highlight(re || this.editor.$search.$options.re);
this.editor.renderer.updateBackMarkers();
};
this.find = function (skipCurrent, backwards, preventScroll) {
var range = this.editor.find(this.searchInput.value, {
skipCurrent: skipCurrent,
backwards: backwards,
wrap: true,
regExp: this.regExpOption.checked,
caseSensitive: this.caseSensitiveOption.checked,
wholeWord: this.wholeWordOption.checked,
preventScroll: preventScroll,
range: this.searchRange
});
var noMatch = !range && this.searchInput.value;
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
this.editor._emit("findSearchBox", {match: !noMatch});
this.highlight();
this.updateCounter();
};
this.updateCounter = function () {
var editor = this.editor;
var regex = editor.$search.$options.re;
var all = 0;
var before = 0;
if (regex) {
var value = this.searchRange
? editor.session.getTextRange(this.searchRange)
: editor.getValue();
var offset = editor.session.doc.positionToIndex(editor.selection.anchor);
if (this.searchRange)
offset -= editor.session.doc.positionToIndex(this.searchRange.start);
var last = regex.lastIndex = 0;
var m;
while ((m = regex.exec(value))) {
all++;
last = m.index;
if (last <= offset)
before++;
if (all > MAX_COUNT)
break;
if (!m[0]) {
regex.lastIndex = last += 1;
if (last >= value.length)
break;
}
}
}
this.searchCounter.textContent = before + " of " + (all > MAX_COUNT ? MAX_COUNT + "+" : all);
};
this.findNext = function () {
this.find(true, false);
};
this.findPrev = function () {
this.find(true, true);
};
this.findAll = function () {
var range = this.editor.findAll(this.searchInput.value, {
regExp: this.regExpOption.checked,
caseSensitive: this.caseSensitiveOption.checked,
wholeWord: this.wholeWordOption.checked
});
var noMatch = !range && this.searchInput.value;
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
this.editor._emit("findSearchBox", {match: !noMatch});
this.highlight();
this.hide();
};
this.replace = function () {
if (!this.editor.getReadOnly())
this.editor.replace(this.replaceInput.value);
};
this.replaceAndFindNext = function () {
if (!this.editor.getReadOnly()) {
this.editor.replace(this.replaceInput.value);
this.findNext();
}
};
this.replaceAll = function () {
if (!this.editor.getReadOnly())
this.editor.replaceAll(this.replaceInput.value);
};
this.hide = function () {
this.active = false;
this.setSearchRange(null);
this.editor.off("changeSession", this.setSession);
this.element.style.display = "none";
this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
this.editor.focus();
};
this.show = function (value, isReplace) {
this.active = true;
this.editor.on("changeSession", this.setSession);
this.element.style.display = "";
this.replaceOption.checked = isReplace;
if (value)
this.searchInput.value = value;
this.searchInput.focus();
this.searchInput.select();
this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
this.$syncOptions(true);
};
this.isFocused = function () {
var el = document.activeElement;
return el == this.searchInput || el == this.replaceInput;
};
}).call(SearchBox.prototype);
exports.SearchBox = SearchBox;
exports.Search = function (editor, isReplace) {
var sb = editor.searchBox || new SearchBox(editor);
sb.show(editor.session.getTextRange(), isReplace);
};
});
(function () {
window.require(["ace/ext/searchbox"], function () {
});
})();

View File

@ -0,0 +1,117 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/* This file was autogenerated from Assembly x86.tmLanguage (uuid: ) */
/****************************************************************************************
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
* fileTypes *
****************************************************************************************/
define("ace/mode/mar_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var MarHighlightRules = function () {
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
this.$rules = {
start:
[{
token: 'keyword.function.assembly',
regex: '\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|dw|nop|equ|neg|hwq|not|ror|rol|sal|sar|inc|dec|rcl|xchg|rcr|pushf|popf)\\b',
caseInsensitive: true
},
{
token: 'keyword.operator.assembly',
regex: '\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc|jo|jno|ja|jna)\\b',
caseInsensitive: true
},
{
token: 'variable.predefined.ahk',
regex: '\\b(?:brk|dup)\\b',
caseInsensitive: true
},
{
token: 'variable.parameter.register.assembly',
regex: '\\b(?:A|B|C|D|X|Y|bp|sp)\\b',
caseInsensitive: true
},
{
token: 'constant.character.decimal.assembly',
regex: '\\b[0-9]+\\b'
},
{
token: 'constant.character.hexadecimal.assembly',
regex: '\\b0x[A-F0-9]+\\b',
caseInsensitive: true
},
{token: 'string.assembly', regex: /"([^\\"]|\\.)*"/},
{token: 'comment.assembly', regex: ';.*$'},
{token: 'support.function.directive.assembly', regex: /^\.text|\.data/},
{token: 'entity.name.function.assembly', regex: /\w*:/}]
}
this.normalizeRules();
};
MarHighlightRules.metaData = {
fileTypes: ['asm'],
name: 'Much Assembly Required',
scopeName: 'source.assembly'
};
oop.inherits(MarHighlightRules, TextHighlightRules);
exports.MarHighlightRules = MarHighlightRules;
});
define("ace/mode/mar", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/mar_rules"], function (require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var MarHighlightRules = require("./mar_rules").MarHighlightRules;
var Mode = function () {
this.HighlightRules = MarHighlightRules;
this.$behaviour = this.$defaultBehaviour;
};
oop.inherits(Mode, TextMode);
(function () {
this.lineCommentStart = ";";
this.$id = "ace/mode/mar";
}).call(Mode.prototype);
exports.Mode = Mode;
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,156 @@
define("ace/theme/chaos", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-chaos";
exports.cssText = ".ace-chaos .ace_gutter {\
background: #141414;\
color: #595959;\
border-right: 1px solid #282828;\
}\
.ace-chaos .ace_gutter-cell.ace_warning {\
background-image: none;\
background: #FC0;\
border-left: none;\
padding-left: 0;\
color: #000;\
}\
.ace-chaos .ace_gutter-cell.ace_error {\
background-position: -6px center;\
background-image: none;\
background: #F10;\
border-left: none;\
padding-left: 0;\
color: #000;\
}\
.ace-chaos .ace_print-margin {\
border-left: 1px solid #555;\
right: 0;\
background: #1D1D1D;\
}\
.ace-chaos {\
background-color: #161616;\
color: #E6E1DC;\
}\
.ace-chaos .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
.ace-chaos .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
.ace-chaos .ace_marker-layer .ace_selection {\
background: #494836;\
}\
.ace-chaos .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
.ace-chaos .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #FCE94F;\
}\
.ace-chaos .ace_marker-layer .ace_active-line {\
background: #333;\
}\
.ace-chaos .ace_gutter-active-line {\
background-color: #222;\
}\
.ace-chaos .ace_invisible {\
color: #404040;\
}\
.ace-chaos .ace_keyword {\
color:#00698F;\
}\
.ace-chaos .ace_keyword.ace_operator {\
color:#FF308F;\
}\
.ace-chaos .ace_constant {\
color:#1EDAFB;\
}\
.ace-chaos .ace_constant.ace_language {\
color:#FDC251;\
}\
.ace-chaos .ace_constant.ace_library {\
color:#8DFF0A;\
}\
.ace-chaos .ace_constant.ace_numeric {\
color:#58C554;\
}\
.ace-chaos .ace_invalid {\
color:#FFFFFF;\
background-color:#990000;\
}\
.ace-chaos .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#990000;\
}\
.ace-chaos .ace_support {\
color: #999;\
}\
.ace-chaos .ace_support.ace_function {\
color:#00AEEF;\
}\
.ace-chaos .ace_function {\
color:#00AEEF;\
}\
.ace-chaos .ace_string {\
color:#58C554;\
}\
.ace-chaos .ace_comment {\
color:#555;\
font-style:italic;\
padding-bottom: 0px;\
}\
.ace-chaos .ace_variable {\
color:#997744;\
}\
.ace-chaos .ace_meta.ace_tag {\
color:#BE53E6;\
}\
.ace-chaos .ace_entity.ace_other.ace_attribute-name {\
color:#FFFF89;\
}\
.ace-chaos .ace_markup.ace_underline {\
text-decoration: underline;\
}\
.ace-chaos .ace_fold-widget {\
text-align: center;\
}\
.ace-chaos .ace_fold-widget:hover {\
color: #777;\
}\
.ace-chaos .ace_fold-widget.ace_start,\
.ace-chaos .ace_fold-widget.ace_end,\
.ace-chaos .ace_fold-widget.ace_closed{\
background: none;\
border: none;\
box-shadow: none;\
}\
.ace-chaos .ace_fold-widget.ace_start:after {\
content: '▾'\
}\
.ace-chaos .ace_fold-widget.ace_end:after {\
content: '▴'\
}\
.ace-chaos .ace_fold-widget.ace_closed:after {\
content: '‣'\
}\
.ace-chaos .ace_indent-guide {\
border-right:1px dotted #333;\
margin-right:-1px;\
}\
.ace-chaos .ace_fold { \
background: #222; \
border-radius: 3px; \
color: #7AF; \
border: none; \
}\
.ace-chaos .ace_fold:hover {\
background: #CCC; \
color: #000;\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,128 @@
define("ace/theme/chrome", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-chrome";
exports.cssText = ".ace-chrome .ace_gutter {\
background: #ebebeb;\
color: #333;\
overflow : hidden;\
}\
.ace-chrome .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-chrome {\
background-color: #FFFFFF;\
color: black;\
}\
.ace-chrome .ace_cursor {\
color: black;\
}\
.ace-chrome .ace_invisible {\
color: rgb(191, 191, 191);\
}\
.ace-chrome .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-chrome .ace_constant.ace_language {\
color: rgb(88, 92, 246);\
}\
.ace-chrome .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-chrome .ace_invalid {\
background-color: rgb(153, 0, 0);\
color: white;\
}\
.ace-chrome .ace_fold {\
}\
.ace-chrome .ace_support.ace_function {\
color: rgb(60, 76, 114);\
}\
.ace-chrome .ace_support.ace_constant {\
color: rgb(6, 150, 14);\
}\
.ace-chrome .ace_support.ace_type,\
.ace-chrome .ace_support.ace_class\
.ace-chrome .ace_support.ace_other {\
color: rgb(109, 121, 222);\
}\
.ace-chrome .ace_variable.ace_parameter {\
font-style:italic;\
color:#FD971F;\
}\
.ace-chrome .ace_keyword.ace_operator {\
color: rgb(104, 118, 135);\
}\
.ace-chrome .ace_comment {\
color: #236e24;\
}\
.ace-chrome .ace_comment.ace_doc {\
color: #236e24;\
}\
.ace-chrome .ace_comment.ace_doc.ace_tag {\
color: #236e24;\
}\
.ace-chrome .ace_constant.ace_numeric {\
color: rgb(0, 0, 205);\
}\
.ace-chrome .ace_variable {\
color: rgb(49, 132, 149);\
}\
.ace-chrome .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-chrome .ace_entity.ace_name.ace_function {\
color: #0000A2;\
}\
.ace-chrome .ace_heading {\
color: rgb(12, 7, 255);\
}\
.ace-chrome .ace_list {\
color:rgb(185, 6, 144);\
}\
.ace-chrome .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-chrome .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-chrome .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-chrome .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-chrome .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.07);\
}\
.ace-chrome .ace_gutter-active-line {\
background-color : #dcdcdc;\
}\
.ace-chrome .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-chrome .ace_storage,\
.ace-chrome .ace_keyword,\
.ace-chrome .ace_meta.ace_tag {\
color: rgb(147, 15, 128);\
}\
.ace-chrome .ace_string.ace_regex {\
color: rgb(255, 0, 0)\
}\
.ace-chrome .ace_string {\
color: #1A1AA6;\
}\
.ace-chrome .ace_entity.ace_other.ace_attribute-name {\
color: #994409;\
}\
.ace-chrome .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,95 @@
define("ace/theme/clouds", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-clouds";
exports.cssText = ".ace-clouds .ace_gutter {\
background: #ebebeb;\
color: #333\
}\
.ace-clouds .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-clouds {\
background-color: #FFFFFF;\
color: #000000\
}\
.ace-clouds .ace_cursor {\
color: #000000\
}\
.ace-clouds .ace_marker-layer .ace_selection {\
background: #BDD5FC\
}\
.ace-clouds.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FFFFFF;\
}\
.ace-clouds .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-clouds .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF\
}\
.ace-clouds .ace_marker-layer .ace_active-line {\
background: #FFFBD1\
}\
.ace-clouds .ace_gutter-active-line {\
background-color : #dcdcdc\
}\
.ace-clouds .ace_marker-layer .ace_selected-word {\
border: 1px solid #BDD5FC\
}\
.ace-clouds .ace_invisible {\
color: #BFBFBF\
}\
.ace-clouds .ace_keyword,\
.ace-clouds .ace_meta,\
.ace-clouds .ace_support.ace_constant.ace_property-value {\
color: #AF956F\
}\
.ace-clouds .ace_keyword.ace_operator {\
color: #484848\
}\
.ace-clouds .ace_keyword.ace_other.ace_unit {\
color: #96DC5F\
}\
.ace-clouds .ace_constant.ace_language {\
color: #39946A\
}\
.ace-clouds .ace_constant.ace_numeric {\
color: #46A609\
}\
.ace-clouds .ace_constant.ace_character.ace_entity {\
color: #BF78CC\
}\
.ace-clouds .ace_invalid {\
background-color: #FF002A\
}\
.ace-clouds .ace_fold {\
background-color: #AF956F;\
border-color: #000000\
}\
.ace-clouds .ace_storage,\
.ace-clouds .ace_support.ace_class,\
.ace-clouds .ace_support.ace_function,\
.ace-clouds .ace_support.ace_other,\
.ace-clouds .ace_support.ace_type {\
color: #C52727\
}\
.ace-clouds .ace_string {\
color: #5D90CD\
}\
.ace-clouds .ace_comment {\
color: #BCC8BA\
}\
.ace-clouds .ace_entity.ace_name.ace_tag,\
.ace-clouds .ace_entity.ace_other.ace_attribute-name {\
color: #606060\
}\
.ace-clouds .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,96 @@
define("ace/theme/clouds_midnight", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-clouds-midnight";
exports.cssText = ".ace-clouds-midnight .ace_gutter {\
background: #232323;\
color: #929292\
}\
.ace-clouds-midnight .ace_print-margin {\
width: 1px;\
background: #232323\
}\
.ace-clouds-midnight {\
background-color: #191919;\
color: #929292\
}\
.ace-clouds-midnight .ace_cursor {\
color: #7DA5DC\
}\
.ace-clouds-midnight .ace_marker-layer .ace_selection {\
background: #000000\
}\
.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #191919;\
}\
.ace-clouds-midnight .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-clouds-midnight .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF\
}\
.ace-clouds-midnight .ace_marker-layer .ace_active-line {\
background: rgba(215, 215, 215, 0.031)\
}\
.ace-clouds-midnight .ace_gutter-active-line {\
background-color: rgba(215, 215, 215, 0.031)\
}\
.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\
border: 1px solid #000000\
}\
.ace-clouds-midnight .ace_invisible {\
color: #666\
}\
.ace-clouds-midnight .ace_keyword,\
.ace-clouds-midnight .ace_meta,\
.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\
color: #927C5D\
}\
.ace-clouds-midnight .ace_keyword.ace_operator {\
color: #4B4B4B\
}\
.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\
color: #366F1A\
}\
.ace-clouds-midnight .ace_constant.ace_language {\
color: #39946A\
}\
.ace-clouds-midnight .ace_constant.ace_numeric {\
color: #46A609\
}\
.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\
color: #A165AC\
}\
.ace-clouds-midnight .ace_invalid {\
color: #FFFFFF;\
background-color: #E92E2E\
}\
.ace-clouds-midnight .ace_fold {\
background-color: #927C5D;\
border-color: #929292\
}\
.ace-clouds-midnight .ace_storage,\
.ace-clouds-midnight .ace_support.ace_class,\
.ace-clouds-midnight .ace_support.ace_function,\
.ace-clouds-midnight .ace_support.ace_other,\
.ace-clouds-midnight .ace_support.ace_type {\
color: #E92E2E\
}\
.ace-clouds-midnight .ace_string {\
color: #5D90CD\
}\
.ace-clouds-midnight .ace_comment {\
color: #3C403B\
}\
.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\
.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\
color: #606060\
}\
.ace-clouds-midnight .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,113 @@
define("ace/theme/cobalt", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-cobalt";
exports.cssText = ".ace-cobalt .ace_gutter {\
background: #011e3a;\
color: rgb(128,145,160)\
}\
.ace-cobalt .ace_print-margin {\
width: 1px;\
background: #555555\
}\
.ace-cobalt {\
background-color: #002240;\
color: #FFFFFF\
}\
.ace-cobalt .ace_cursor {\
color: #FFFFFF\
}\
.ace-cobalt .ace_marker-layer .ace_selection {\
background: rgba(179, 101, 57, 0.75)\
}\
.ace-cobalt.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #002240;\
}\
.ace-cobalt .ace_marker-layer .ace_step {\
background: rgb(127, 111, 19)\
}\
.ace-cobalt .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 255, 255, 0.15)\
}\
.ace-cobalt .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.35)\
}\
.ace-cobalt .ace_gutter-active-line {\
background-color: rgba(0, 0, 0, 0.35)\
}\
.ace-cobalt .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(179, 101, 57, 0.75)\
}\
.ace-cobalt .ace_invisible {\
color: rgba(255, 255, 255, 0.15)\
}\
.ace-cobalt .ace_keyword,\
.ace-cobalt .ace_meta {\
color: #FF9D00\
}\
.ace-cobalt .ace_constant,\
.ace-cobalt .ace_constant.ace_character,\
.ace-cobalt .ace_constant.ace_character.ace_escape,\
.ace-cobalt .ace_constant.ace_other {\
color: #FF628C\
}\
.ace-cobalt .ace_invalid {\
color: #F8F8F8;\
background-color: #800F00\
}\
.ace-cobalt .ace_support {\
color: #80FFBB\
}\
.ace-cobalt .ace_support.ace_constant {\
color: #EB939A\
}\
.ace-cobalt .ace_fold {\
background-color: #FF9D00;\
border-color: #FFFFFF\
}\
.ace-cobalt .ace_support.ace_function {\
color: #FFB054\
}\
.ace-cobalt .ace_storage {\
color: #FFEE80\
}\
.ace-cobalt .ace_entity {\
color: #FFDD00\
}\
.ace-cobalt .ace_string {\
color: #3AD900\
}\
.ace-cobalt .ace_string.ace_regexp {\
color: #80FFC2\
}\
.ace-cobalt .ace_comment {\
font-style: italic;\
color: #0088FF\
}\
.ace-cobalt .ace_heading,\
.ace-cobalt .ace_markup.ace_heading {\
color: #C8E4FD;\
background-color: #001221\
}\
.ace-cobalt .ace_list,\
.ace-cobalt .ace_markup.ace_list {\
background-color: #130D26\
}\
.ace-cobalt .ace_variable {\
color: #CCCCCC\
}\
.ace-cobalt .ace_variable.ace_language {\
color: #FF80E1\
}\
.ace-cobalt .ace_meta.ace_tag {\
color: #9EFFFF\
}\
.ace-cobalt .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,118 @@
define("ace/theme/crimson_editor", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssText = ".ace-crimson-editor .ace_gutter {\
background: #ebebeb;\
color: #333;\
overflow : hidden;\
}\
.ace-crimson-editor .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
.ace-crimson-editor .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-crimson-editor {\
background-color: #FFFFFF;\
color: rgb(64, 64, 64);\
}\
.ace-crimson-editor .ace_cursor {\
color: black;\
}\
.ace-crimson-editor .ace_invisible {\
color: rgb(191, 191, 191);\
}\
.ace-crimson-editor .ace_identifier {\
color: black;\
}\
.ace-crimson-editor .ace_keyword {\
color: blue;\
}\
.ace-crimson-editor .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-crimson-editor .ace_constant.ace_language {\
color: rgb(255, 156, 0);\
}\
.ace-crimson-editor .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-crimson-editor .ace_invalid {\
text-decoration: line-through;\
color: rgb(224, 0, 0);\
}\
.ace-crimson-editor .ace_fold {\
}\
.ace-crimson-editor .ace_support.ace_function {\
color: rgb(192, 0, 0);\
}\
.ace-crimson-editor .ace_support.ace_constant {\
color: rgb(6, 150, 14);\
}\
.ace-crimson-editor .ace_support.ace_type,\
.ace-crimson-editor .ace_support.ace_class {\
color: rgb(109, 121, 222);\
}\
.ace-crimson-editor .ace_keyword.ace_operator {\
color: rgb(49, 132, 149);\
}\
.ace-crimson-editor .ace_string {\
color: rgb(128, 0, 128);\
}\
.ace-crimson-editor .ace_comment {\
color: rgb(76, 136, 107);\
}\
.ace-crimson-editor .ace_comment.ace_doc {\
color: rgb(0, 102, 255);\
}\
.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\
color: rgb(128, 159, 191);\
}\
.ace-crimson-editor .ace_constant.ace_numeric {\
color: rgb(0, 0, 64);\
}\
.ace-crimson-editor .ace_variable {\
color: rgb(0, 64, 128);\
}\
.ace-crimson-editor .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-crimson-editor .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-crimson-editor .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-crimson-editor .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-crimson-editor .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-crimson-editor .ace_marker-layer .ace_active-line {\
background: rgb(232, 242, 254);\
}\
.ace-crimson-editor .ace_gutter-active-line {\
background-color : #dcdcdc;\
}\
.ace-crimson-editor .ace_meta.ace_tag {\
color:rgb(28, 2, 255);\
}\
.ace-crimson-editor .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-crimson-editor .ace_string.ace_regex {\
color: rgb(192, 0, 192);\
}\
.ace-crimson-editor .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}";
exports.cssClass = "ace-crimson-editor";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,108 @@
define("ace/theme/dawn", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dawn";
exports.cssText = ".ace-dawn .ace_gutter {\
background: #ebebeb;\
color: #333\
}\
.ace-dawn .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-dawn {\
background-color: #F9F9F9;\
color: #080808\
}\
.ace-dawn .ace_cursor {\
color: #000000\
}\
.ace-dawn .ace_marker-layer .ace_selection {\
background: rgba(39, 95, 255, 0.30)\
}\
.ace-dawn.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #F9F9F9;\
}\
.ace-dawn .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-dawn .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(75, 75, 126, 0.50)\
}\
.ace-dawn .ace_marker-layer .ace_active-line {\
background: rgba(36, 99, 180, 0.12)\
}\
.ace-dawn .ace_gutter-active-line {\
background-color : #dcdcdc\
}\
.ace-dawn .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(39, 95, 255, 0.30)\
}\
.ace-dawn .ace_invisible {\
color: rgba(75, 75, 126, 0.50)\
}\
.ace-dawn .ace_keyword,\
.ace-dawn .ace_meta {\
color: #794938\
}\
.ace-dawn .ace_constant,\
.ace-dawn .ace_constant.ace_character,\
.ace-dawn .ace_constant.ace_character.ace_escape,\
.ace-dawn .ace_constant.ace_other {\
color: #811F24\
}\
.ace-dawn .ace_invalid.ace_illegal {\
text-decoration: underline;\
font-style: italic;\
color: #F8F8F8;\
background-color: #B52A1D\
}\
.ace-dawn .ace_invalid.ace_deprecated {\
text-decoration: underline;\
font-style: italic;\
color: #B52A1D\
}\
.ace-dawn .ace_support {\
color: #691C97\
}\
.ace-dawn .ace_support.ace_constant {\
color: #B4371F\
}\
.ace-dawn .ace_fold {\
background-color: #794938;\
border-color: #080808\
}\
.ace-dawn .ace_list,\
.ace-dawn .ace_markup.ace_list,\
.ace-dawn .ace_support.ace_function {\
color: #693A17\
}\
.ace-dawn .ace_storage {\
font-style: italic;\
color: #A71D5D\
}\
.ace-dawn .ace_string {\
color: #0B6125\
}\
.ace-dawn .ace_string.ace_regexp {\
color: #CF5628\
}\
.ace-dawn .ace_comment {\
font-style: italic;\
color: #5A525F\
}\
.ace-dawn .ace_heading,\
.ace-dawn .ace_markup.ace_heading {\
color: #19356D\
}\
.ace-dawn .ace_variable {\
color: #234A97\
}\
.ace-dawn .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,121 @@
define("ace/theme/dracula", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-dracula";
exports.cssText = "\
ace-dracula .ace_gutter {\
background: #282a36;\
color: rgb(144,145,148)\
}\
.ace-dracula .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-dracula {\
background-color: #282a36;\
color: #f8f8f2\
}\
.ace-dracula .ace_cursor {\
color: #f8f8f0\
}\
.ace-dracula .ace_marker-layer .ace_selection {\
background: #44475a\
}\
.ace-dracula.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #282a36;\
border-radius: 2px\
}\
.ace-dracula .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174)\
}\
.ace-dracula .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #3B3A32\
}\
.ace-dracula .ace_marker-layer .ace_active-line {\
background: #44475a\
}\
.ace-dracula .ace_gutter-active-line {\
background-color: #44475a\
}\
.ace-dracula .ace_marker-layer .ace_selected-word {\
border: 1px solid #44475a\
}\
.ace-dracula .ace_fold {\
background-color: #50fa7b;\
border-color: #f8f8f2\
}\
.ace-dracula .ace_keyword {\
color: #ff79c6\
}\
.ace-dracula .ace_constant.ace_language {\
color: #bd93f9\
}\
.ace-dracula .ace_constant.ace_numeric {\
color: #bd93f9\
}\
.ace-dracula .ace_constant.ace_character {\
color: #bd93f9\
}\
.ace-dracula .ace_constant.ace_character.ace_escape {\
color: #ff79c6\
}\
.ace-dracula .ace_constant.ace_other {\
color: #bd93f9\
}\
.ace-dracula .ace_support.ace_function {\
color: #8be9fd\
}\
.ace-dracula .ace_support.ace_constant {\
color: #6be5fd\
}\
.ace-dracula .ace_support.ace_class {\
font-style: italic;\
color: #66d9ef\
}\
.ace-dracula .ace_support.ace_type {\
font-style: italic;\
color: #66d9ef\
}\
.ace-dracula .ace_storage {\
color: #ff79c6\
}\
.ace-dracula .ace_storage.ace_type {\
font-style: italic;\
color: #8be9fd\
}\
.ace-dracula .ace_invalid {\
color: #F8F8F0;\
background-color: #ff79c6\
}\
.ace-dracula .ace_invalid.ace_deprecated {\
color: #F8F8F0;\
background-color: #bd93f9\
}\
.ace-dracula .ace_string {\
color: #f1fa8c\
}\
.ace-dracula .ace_comment {\
color: #6272a4\
}\
.ace-dracula .ace_variable {\
color: #50fa7b\
}\
.ace-dracula .ace_variable.ace_parameter {\
font-style: italic;\
color: #ffb86c\
}\
.ace-dracula .ace_entity.ace_other.ace_attribute-name {\
color: #50fa7b\
}\
.ace-dracula .ace_entity.ace_name.ace_function {\
color: #50fa7b\
}\
.ace-dracula .ace_entity.ace_name.ace_tag {\
color: #ff79c6\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,141 @@
define("ace/theme/dreamweaver", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dreamweaver";
exports.cssText = ".ace-dreamweaver .ace_gutter {\
background: #e8e8e8;\
color: #333;\
}\
.ace-dreamweaver .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-dreamweaver {\
background-color: #FFFFFF;\
color: black;\
}\
.ace-dreamweaver .ace_fold {\
background-color: #757AD8;\
}\
.ace-dreamweaver .ace_cursor {\
color: black;\
}\
.ace-dreamweaver .ace_invisible {\
color: rgb(191, 191, 191);\
}\
.ace-dreamweaver .ace_storage,\
.ace-dreamweaver .ace_keyword {\
color: blue;\
}\
.ace-dreamweaver .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-dreamweaver .ace_constant.ace_language {\
color: rgb(88, 92, 246);\
}\
.ace-dreamweaver .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-dreamweaver .ace_invalid {\
background-color: rgb(153, 0, 0);\
color: white;\
}\
.ace-dreamweaver .ace_support.ace_function {\
color: rgb(60, 76, 114);\
}\
.ace-dreamweaver .ace_support.ace_constant {\
color: rgb(6, 150, 14);\
}\
.ace-dreamweaver .ace_support.ace_type,\
.ace-dreamweaver .ace_support.ace_class {\
color: #009;\
}\
.ace-dreamweaver .ace_support.ace_php_tag {\
color: #f00;\
}\
.ace-dreamweaver .ace_keyword.ace_operator {\
color: rgb(104, 118, 135);\
}\
.ace-dreamweaver .ace_string {\
color: #00F;\
}\
.ace-dreamweaver .ace_comment {\
color: rgb(76, 136, 107);\
}\
.ace-dreamweaver .ace_comment.ace_doc {\
color: rgb(0, 102, 255);\
}\
.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\
color: rgb(128, 159, 191);\
}\
.ace-dreamweaver .ace_constant.ace_numeric {\
color: rgb(0, 0, 205);\
}\
.ace-dreamweaver .ace_variable {\
color: #06F\
}\
.ace-dreamweaver .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-dreamweaver .ace_entity.ace_name.ace_function {\
color: #00F;\
}\
.ace-dreamweaver .ace_heading {\
color: rgb(12, 7, 255);\
}\
.ace-dreamweaver .ace_list {\
color:rgb(185, 6, 144);\
}\
.ace-dreamweaver .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-dreamweaver .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-dreamweaver .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-dreamweaver .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-dreamweaver .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.07);\
}\
.ace-dreamweaver .ace_gutter-active-line {\
background-color : #DCDCDC;\
}\
.ace-dreamweaver .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-dreamweaver .ace_meta.ace_tag {\
color:#009;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\
color:#060;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_form {\
color:#F90;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_image {\
color:#909;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_script {\
color:#900;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_style {\
color:#909;\
}\
.ace-dreamweaver .ace_meta.ace_tag.ace_table {\
color:#099;\
}\
.ace-dreamweaver .ace_string.ace_regex {\
color: rgb(255, 0, 0)\
}\
.ace-dreamweaver .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,98 @@
define("ace/theme/eclipse", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
"use strict";
exports.isDark = false;
exports.cssText = ".ace-eclipse .ace_gutter {\
background: #ebebeb;\
border-right: 1px solid rgb(159, 159, 159);\
color: rgb(136, 136, 136);\
}\
.ace-eclipse .ace_print-margin {\
width: 1px;\
background: #ebebeb;\
}\
.ace-eclipse {\
background-color: #FFFFFF;\
color: black;\
}\
.ace-eclipse .ace_fold {\
background-color: rgb(60, 76, 114);\
}\
.ace-eclipse .ace_cursor {\
color: black;\
}\
.ace-eclipse .ace_storage,\
.ace-eclipse .ace_keyword,\
.ace-eclipse .ace_variable {\
color: rgb(127, 0, 85);\
}\
.ace-eclipse .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-eclipse .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-eclipse .ace_function {\
color: rgb(60, 76, 114);\
}\
.ace-eclipse .ace_string {\
color: rgb(42, 0, 255);\
}\
.ace-eclipse .ace_comment {\
color: rgb(113, 150, 130);\
}\
.ace-eclipse .ace_comment.ace_doc {\
color: rgb(63, 95, 191);\
}\
.ace-eclipse .ace_comment.ace_doc.ace_tag {\
color: rgb(127, 159, 191);\
}\
.ace-eclipse .ace_constant.ace_numeric {\
color: darkblue;\
}\
.ace-eclipse .ace_tag {\
color: rgb(25, 118, 116);\
}\
.ace-eclipse .ace_type {\
color: rgb(127, 0, 127);\
}\
.ace-eclipse .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-eclipse .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-eclipse .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-eclipse .ace_meta.ace_tag {\
color:rgb(25, 118, 116);\
}\
.ace-eclipse .ace_invisible {\
color: #ddd;\
}\
.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\
color:rgb(127, 0, 127);\
}\
.ace-eclipse .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0);\
}\
.ace-eclipse .ace_active-line {\
background: rgb(232, 242, 254);\
}\
.ace-eclipse .ace_gutter-active-line {\
background-color : #DADADA;\
}\
.ace-eclipse .ace_marker-layer .ace_selected-word {\
border: 1px solid rgb(181, 213, 255);\
}\
.ace-eclipse .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}";
exports.cssClass = "ace-eclipse";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,103 @@
define("ace/theme/github", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-github";
exports.cssText = "\
.ace-github .ace_gutter {\
background: #e8e8e8;\
color: #AAA;\
}\
.ace-github {\
background: #fff;\
color: #000;\
}\
.ace-github .ace_keyword {\
font-weight: bold;\
}\
.ace-github .ace_string {\
color: #D14;\
}\
.ace-github .ace_variable.ace_class {\
color: teal;\
}\
.ace-github .ace_constant.ace_numeric {\
color: #099;\
}\
.ace-github .ace_constant.ace_buildin {\
color: #0086B3;\
}\
.ace-github .ace_support.ace_function {\
color: #0086B3;\
}\
.ace-github .ace_comment {\
color: #998;\
font-style: italic;\
}\
.ace-github .ace_variable.ace_language {\
color: #0086B3;\
}\
.ace-github .ace_paren {\
font-weight: bold;\
}\
.ace-github .ace_boolean {\
font-weight: bold;\
}\
.ace-github .ace_string.ace_regexp {\
color: #009926;\
font-weight: normal;\
}\
.ace-github .ace_variable.ace_instance {\
color: teal;\
}\
.ace-github .ace_constant.ace_language {\
font-weight: bold;\
}\
.ace-github .ace_cursor {\
color: black;\
}\
.ace-github.ace_focus .ace_marker-layer .ace_active-line {\
background: rgb(255, 255, 204);\
}\
.ace-github .ace_marker-layer .ace_active-line {\
background: rgb(245, 245, 245);\
}\
.ace-github .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-github.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px white;\
}\
.ace-github.ace_nobold .ace_line > span {\
font-weight: normal !important;\
}\
.ace-github .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-github .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-github .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-github .ace_gutter-active-line {\
background-color : rgba(0, 0, 0, 0.07);\
}\
.ace-github .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-github .ace_invisible {\
color: #BFBFBF\
}\
.ace-github .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-github .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,112 @@
define("ace/theme/gob", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-gob";
exports.cssText = ".ace-gob .ace_gutter {\
background: #0B1818;\
color: #03EE03\
}\
.ace-gob .ace_print-margin {\
width: 1px;\
background: #131313\
}\
.ace-gob {\
background-color: #0B0B0B;\
color: #00FF00\
}\
.ace-gob .ace_cursor {\
border-color: rgba(16, 248, 255, 0.90);\
background-color: rgba(16, 240, 248, 0.70);\
opacity: 0.4;\
}\
.ace-gob .ace_marker-layer .ace_selection {\
background: rgba(221, 240, 255, 0.20)\
}\
.ace-gob.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #141414;\
}\
.ace-gob .ace_marker-layer .ace_step {\
background: rgb(16, 128, 0)\
}\
.ace-gob .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(64, 255, 255, 0.25)\
}\
.ace-gob .ace_marker-layer .ace_active-line {\
background: rgba(255, 255, 255, 0.04)\
}\
.ace-gob .ace_gutter-active-line {\
background-color: rgba(255, 255, 255, 0.04)\
}\
.ace-gob .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(192, 240, 255, 0.20)\
}\
.ace-gob .ace_invisible {\
color: rgba(255, 255, 255, 0.25)\
}\
.ace-gob .ace_keyword,\
.ace-gob .ace_meta {\
color: #10D8E8\
}\
.ace-gob .ace_constant,\
.ace-gob .ace_constant.ace_character,\
.ace-gob .ace_constant.ace_character.ace_escape,\
.ace-gob .ace_constant.ace_other,\
.ace-gob .ace_heading,\
.ace-gob .ace_markup.ace_heading,\
.ace-gob .ace_support.ace_constant {\
color: #10F0A0\
}\
.ace-gob .ace_invalid.ace_illegal {\
color: #F8F8F8;\
background-color: rgba(86, 45, 86, 0.75)\
}\
.ace-gob .ace_invalid.ace_deprecated {\
text-decoration: underline;\
font-style: italic;\
color: #20F8C0\
}\
.ace-gob .ace_support {\
color: #20E8B0\
}\
.ace-gob .ace_fold {\
background-color: #50B8B8;\
border-color: #70F8F8\
}\
.ace-gob .ace_support.ace_function {\
color: #00F800\
}\
.ace-gob .ace_list,\
.ace-gob .ace_markup.ace_list,\
.ace-gob .ace_storage {\
color: #10FF98\
}\
.ace-gob .ace_entity.ace_name.ace_function,\
.ace-gob .ace_meta.ace_tag,\
.ace-gob .ace_variable {\
color: #00F868\
}\
.ace-gob .ace_string {\
color: #10F060\
}\
.ace-gob .ace_string.ace_regexp {\
color: #20F090;\
}\
.ace-gob .ace_comment {\
font-style: italic;\
color: #00E060;\
}\
.ace-gob .ace_variable {\
color: #00F888;\
}\
.ace-gob .ace_xml-pe {\
color: #488858;\
}\
.ace-gob .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,82 @@
define("ace/theme/gruvbox", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-gruvbox";
exports.cssText = ".ace-gruvbox .ace_gutter-active-line {\
background-color: #3C3836;\
}\
.ace-gruvbox {\
color: #EBDAB4;\
background-color: #1D2021;\
}\
.ace-gruvbox .ace_invisible {\
color: #504945;\
}\
.ace-gruvbox .ace_marker-layer .ace_selection {\
background: rgba(179, 101, 57, 0.75)\
}\
.ace-gruvbox.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #002240;\
}\
.ace-gruvbox .ace_keyword {\
color: #8ec07c;\
}\
.ace-gruvbox .ace_comment {\
font-style: italic;\
color: #928375;\
}\
.ace-gruvbox .ace-statement {\
color: red;\
}\
.ace-gruvbox .ace_variable {\
color: #84A598;\
}\
.ace-gruvbox .ace_variable.ace_language {\
color: #D2879B;\
}\
.ace-gruvbox .ace_constant {\
color: #C2859A;\
}\
.ace-gruvbox .ace_constant.ace_language {\
color: #C2859A;\
}\
.ace-gruvbox .ace_constant.ace_numeric {\
color: #C2859A;\
}\
.ace-gruvbox .ace_string {\
color: #B8BA37;\
}\
.ace-gruvbox .ace_support {\
color: #F9BC41;\
}\
.ace-gruvbox .ace_support.ace_function {\
color: #F84B3C;\
}\
.ace-gruvbox .ace_storage {\
color: #8FBF7F;\
}\
.ace-gruvbox .ace_keyword.ace_operator {\
color: #EBDAB4;\
}\
.ace-gruvbox .ace_punctuation.ace_operator {\
color: yellow;\
}\
.ace-gruvbox .ace_marker-layer .ace_active-line {\
background: #3C3836;\
}\
.ace-gruvbox .ace_marker-layer .ace_selected-word {\
border-radius: 4px;\
border: 8px solid #3f475d;\
}\
.ace-gruvbox .ace_print-margin {\
width: 5px;\
background: #3C3836;\
}\
.ace-gruvbox .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,96 @@
define("ace/theme/idle_fingers", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-idle-fingers";
exports.cssText = ".ace-idle-fingers .ace_gutter {\
background: #3b3b3b;\
color: rgb(153,153,153)\
}\
.ace-idle-fingers .ace_print-margin {\
width: 1px;\
background: #3b3b3b\
}\
.ace-idle-fingers {\
background-color: #323232;\
color: #FFFFFF\
}\
.ace-idle-fingers .ace_cursor {\
color: #91FF00\
}\
.ace-idle-fingers .ace_marker-layer .ace_selection {\
background: rgba(90, 100, 126, 0.88)\
}\
.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #323232;\
}\
.ace-idle-fingers .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-idle-fingers .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404040\
}\
.ace-idle-fingers .ace_marker-layer .ace_active-line {\
background: #353637\
}\
.ace-idle-fingers .ace_gutter-active-line {\
background-color: #353637\
}\
.ace-idle-fingers .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(90, 100, 126, 0.88)\
}\
.ace-idle-fingers .ace_invisible {\
color: #404040\
}\
.ace-idle-fingers .ace_keyword,\
.ace-idle-fingers .ace_meta {\
color: #CC7833\
}\
.ace-idle-fingers .ace_constant,\
.ace-idle-fingers .ace_constant.ace_character,\
.ace-idle-fingers .ace_constant.ace_character.ace_escape,\
.ace-idle-fingers .ace_constant.ace_other,\
.ace-idle-fingers .ace_support.ace_constant {\
color: #6C99BB\
}\
.ace-idle-fingers .ace_invalid {\
color: #FFFFFF;\
background-color: #FF0000\
}\
.ace-idle-fingers .ace_fold {\
background-color: #CC7833;\
border-color: #FFFFFF\
}\
.ace-idle-fingers .ace_support.ace_function {\
color: #B83426\
}\
.ace-idle-fingers .ace_variable.ace_parameter {\
font-style: italic\
}\
.ace-idle-fingers .ace_string {\
color: #A5C261\
}\
.ace-idle-fingers .ace_string.ace_regexp {\
color: #CCCC33\
}\
.ace-idle-fingers .ace_comment {\
font-style: italic;\
color: #BC9458\
}\
.ace-idle-fingers .ace_meta.ace_tag {\
color: #FFE5BB\
}\
.ace-idle-fingers .ace_entity.ace_name {\
color: #FFC66D\
}\
.ace-idle-fingers .ace_collab.ace_user1 {\
color: #323232;\
background-color: #FFF980\
}\
.ace-idle-fingers .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,121 @@
define("ace/theme/iplastic", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-iplastic";
exports.cssText = ".ace-iplastic .ace_gutter {\
background: #dddddd;\
color: #666666\
}\
.ace-iplastic .ace_print-margin {\
width: 1px;\
background: #bbbbbb\
}\
.ace-iplastic {\
background-color: #eeeeee;\
color: #333333\
}\
.ace-iplastic .ace_cursor {\
color: #333\
}\
.ace-iplastic .ace_marker-layer .ace_selection {\
background: #BAD6FD;\
}\
.ace-iplastic.ace_multiselect .ace_selection.ace_start {\
border-radius: 4px\
}\
.ace-iplastic .ace_marker-layer .ace_step {\
background: #444444\
}\
.ace-iplastic .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #49483E;\
background: #FFF799\
}\
.ace-iplastic .ace_marker-layer .ace_active-line {\
background: #e5e5e5\
}\
.ace-iplastic .ace_gutter-active-line {\
background-color: #eeeeee\
}\
.ace-iplastic .ace_marker-layer .ace_selected-word {\
border: 1px solid #555555;\
border-radius:4px\
}\
.ace-iplastic .ace_invisible {\
color: #999999\
}\
.ace-iplastic .ace_entity.ace_name.ace_tag,\
.ace-iplastic .ace_keyword,\
.ace-iplastic .ace_meta.ace_tag,\
.ace-iplastic .ace_storage {\
color: #0000FF\
}\
.ace-iplastic .ace_punctuation,\
.ace-iplastic .ace_punctuation.ace_tag {\
color: #000\
}\
.ace-iplastic .ace_constant {\
color: #333333;\
font-weight: 700\
}\
.ace-iplastic .ace_constant.ace_character,\
.ace-iplastic .ace_constant.ace_language,\
.ace-iplastic .ace_constant.ace_numeric,\
.ace-iplastic .ace_constant.ace_other {\
color: #0066FF;\
font-weight: 700\
}\
.ace-iplastic .ace_constant.ace_numeric{\
font-weight: 100\
}\
.ace-iplastic .ace_invalid {\
color: #F8F8F0;\
background-color: #F92672\
}\
.ace-iplastic .ace_invalid.ace_deprecated {\
color: #F8F8F0;\
background-color: #AE81FF\
}\
.ace-iplastic .ace_support.ace_constant,\
.ace-iplastic .ace_support.ace_function {\
color: #333333;\
font-weight: 700\
}\
.ace-iplastic .ace_fold {\
background-color: #464646;\
border-color: #F8F8F2\
}\
.ace-iplastic .ace_storage.ace_type,\
.ace-iplastic .ace_support.ace_class,\
.ace-iplastic .ace_support.ace_type {\
color: #3333fc;\
font-weight: 700\
}\
.ace-iplastic .ace_entity.ace_name.ace_function,\
.ace-iplastic .ace_entity.ace_other,\
.ace-iplastic .ace_entity.ace_other.ace_attribute-name,\
.ace-iplastic .ace_variable {\
color: #3366cc;\
font-style: italic\
}\
.ace-iplastic .ace_variable.ace_parameter {\
font-style: italic;\
color: #2469E0\
}\
.ace-iplastic .ace_string {\
color: #a55f03\
}\
.ace-iplastic .ace_comment {\
color: #777777;\
font-style: italic\
}\
.ace-iplastic .ace_fold-widget {\
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);\
}\
.ace-iplastic .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABlJREFUeNpi+P//PwMzMzPzfwAAAAD//wMAGRsECSML/RIAAAAASUVORK5CYII=) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,121 @@
define("ace/theme/katzenmilch", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-katzenmilch";
exports.cssText = ".ace-katzenmilch .ace_gutter,\
.ace-katzenmilch .ace_gutter {\
background: #e8e8e8;\
color: #333\
}\
.ace-katzenmilch .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-katzenmilch {\
background-color: #f3f2f3;\
color: rgba(15, 0, 9, 1.0)\
}\
.ace-katzenmilch .ace_cursor {\
border-left: 2px solid #100011\
}\
.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\
border-left: 0px;\
border-bottom: 1px solid #100011\
}\
.ace-katzenmilch .ace_marker-layer .ace_selection {\
background: rgba(100, 5, 208, 0.27)\
}\
.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #f3f2f3;\
}\
.ace-katzenmilch .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174)\
}\
.ace-katzenmilch .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(0, 0, 0, 0.33);\
}\
.ace-katzenmilch .ace_marker-layer .ace_active-line {\
background: rgb(232, 242, 254)\
}\
.ace-katzenmilch .ace_gutter-active-line {\
background-color: rgb(232, 242, 254)\
}\
.ace-katzenmilch .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(100, 5, 208, 0.27)\
}\
.ace-katzenmilch .ace_invisible {\
color: #BFBFBF\
}\
.ace-katzenmilch .ace_fold {\
background-color: rgba(2, 95, 73, 0.97);\
border-color: rgba(15, 0, 9, 1.0)\
}\
.ace-katzenmilch .ace_keyword {\
color: #674Aa8;\
rbackground-color: rgba(163, 170, 216, 0.055)\
}\
.ace-katzenmilch .ace_constant.ace_language {\
color: #7D7e52;\
rbackground-color: rgba(189, 190, 130, 0.059)\
}\
.ace-katzenmilch .ace_constant.ace_numeric {\
color: rgba(79, 130, 123, 0.93);\
rbackground-color: rgba(119, 194, 187, 0.059)\
}\
.ace-katzenmilch .ace_constant.ace_character,\
.ace-katzenmilch .ace_constant.ace_other {\
color: rgba(2, 95, 105, 1.0);\
rbackground-color: rgba(127, 34, 153, 0.063)\
}\
.ace-katzenmilch .ace_support.ace_function {\
color: #9D7e62;\
rbackground-color: rgba(189, 190, 130, 0.039)\
}\
.ace-katzenmilch .ace_support.ace_class {\
color: rgba(239, 106, 167, 1.0);\
rbackground-color: rgba(239, 106, 167, 0.063)\
}\
.ace-katzenmilch .ace_storage {\
color: rgba(123, 92, 191, 1.0);\
rbackground-color: rgba(139, 93, 223, 0.051)\
}\
.ace-katzenmilch .ace_invalid {\
color: #DFDFD5;\
rbackground-color: #CC1B27\
}\
.ace-katzenmilch .ace_string {\
color: #5a5f9b;\
rbackground-color: rgba(170, 175, 219, 0.035)\
}\
.ace-katzenmilch .ace_comment {\
font-style: italic;\
color: rgba(64, 79, 80, 0.67);\
rbackground-color: rgba(95, 15, 255, 0.0078)\
}\
.ace-katzenmilch .ace_entity.ace_name.ace_function,\
.ace-katzenmilch .ace_variable {\
color: rgba(2, 95, 73, 0.97);\
rbackground-color: rgba(34, 255, 73, 0.12)\
}\
.ace-katzenmilch .ace_variable.ace_language {\
color: #316fcf;\
rbackground-color: rgba(58, 175, 255, 0.039)\
}\
.ace-katzenmilch .ace_variable.ace_parameter {\
font-style: italic;\
color: rgba(51, 150, 159, 0.87);\
rbackground-color: rgba(5, 214, 249, 0.043)\
}\
.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\
color: rgba(73, 70, 194, 0.93);\
rbackground-color: rgba(73, 134, 194, 0.035)\
}\
.ace-katzenmilch .ace_entity.ace_name.ace_tag {\
color: #3976a2;\
rbackground-color: rgba(73, 166, 210, 0.039)\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,104 @@
define("ace/theme/kr_theme", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-kr-theme";
exports.cssText = ".ace-kr-theme .ace_gutter {\
background: #1c1917;\
color: #FCFFE0\
}\
.ace-kr-theme .ace_print-margin {\
width: 1px;\
background: #1c1917\
}\
.ace-kr-theme {\
background-color: #0B0A09;\
color: #FCFFE0\
}\
.ace-kr-theme .ace_cursor {\
color: #FF9900\
}\
.ace-kr-theme .ace_marker-layer .ace_selection {\
background: rgba(170, 0, 255, 0.45)\
}\
.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #0B0A09;\
}\
.ace-kr-theme .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-kr-theme .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 177, 111, 0.32)\
}\
.ace-kr-theme .ace_marker-layer .ace_active-line {\
background: #38403D\
}\
.ace-kr-theme .ace_gutter-active-line {\
background-color : #38403D\
}\
.ace-kr-theme .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(170, 0, 255, 0.45)\
}\
.ace-kr-theme .ace_invisible {\
color: rgba(255, 177, 111, 0.32)\
}\
.ace-kr-theme .ace_keyword,\
.ace-kr-theme .ace_meta {\
color: #949C8B\
}\
.ace-kr-theme .ace_constant,\
.ace-kr-theme .ace_constant.ace_character,\
.ace-kr-theme .ace_constant.ace_character.ace_escape,\
.ace-kr-theme .ace_constant.ace_other {\
color: rgba(210, 117, 24, 0.76)\
}\
.ace-kr-theme .ace_invalid {\
color: #F8F8F8;\
background-color: #A41300\
}\
.ace-kr-theme .ace_support {\
color: #9FC28A\
}\
.ace-kr-theme .ace_support.ace_constant {\
color: #C27E66\
}\
.ace-kr-theme .ace_fold {\
background-color: #949C8B;\
border-color: #FCFFE0\
}\
.ace-kr-theme .ace_support.ace_function {\
color: #85873A\
}\
.ace-kr-theme .ace_storage {\
color: #FFEE80\
}\
.ace-kr-theme .ace_string {\
color: rgba(164, 161, 181, 0.8)\
}\
.ace-kr-theme .ace_string.ace_regexp {\
color: rgba(125, 255, 192, 0.65)\
}\
.ace-kr-theme .ace_comment {\
font-style: italic;\
color: #706D5B\
}\
.ace-kr-theme .ace_variable {\
color: #D1A796\
}\
.ace-kr-theme .ace_list,\
.ace-kr-theme .ace_markup.ace_list {\
background-color: #0F0040\
}\
.ace-kr-theme .ace_variable.ace_language {\
color: #FF80E1\
}\
.ace-kr-theme .ace_meta.ace_tag {\
color: #BABD9C\
}\
.ace-kr-theme .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,61 @@
define("ace/theme/kuroir", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-kuroir";
exports.cssText = "\
.ace-kuroir .ace_gutter {\
background: #e8e8e8;\
color: #333;\
}\
.ace-kuroir .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-kuroir {\
background-color: #E8E9E8;\
color: #363636;\
}\
.ace-kuroir .ace_cursor {\
color: #202020;\
}\
.ace-kuroir .ace_marker-layer .ace_selection {\
background: rgba(245, 170, 0, 0.57);\
}\
.ace-kuroir.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #E8E9E8;\
}\
.ace-kuroir .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
.ace-kuroir .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(0, 0, 0, 0.29);\
}\
.ace-kuroir .ace_marker-layer .ace_active-line {\
background: rgba(203, 220, 47, 0.22);\
}\
.ace-kuroir .ace_gutter-active-line {\
background-color: rgba(203, 220, 47, 0.22);\
}\
.ace-kuroir .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(245, 170, 0, 0.57);\
}\
.ace-kuroir .ace_invisible {\
color: #BFBFBF\
}\
.ace-kuroir .ace_fold {\
border-color: #363636;\
}\
.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\
background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\
font-style:italic;\
color:#FD1732;\
background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\
background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\
background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\
background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,95 @@
define("ace/theme/merbivore", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-merbivore";
exports.cssText = ".ace-merbivore .ace_gutter {\
background: #202020;\
color: #E6E1DC\
}\
.ace-merbivore .ace_print-margin {\
width: 1px;\
background: #555651\
}\
.ace-merbivore {\
background-color: #161616;\
color: #E6E1DC\
}\
.ace-merbivore .ace_cursor {\
color: #FFFFFF\
}\
.ace-merbivore .ace_marker-layer .ace_selection {\
background: #454545\
}\
.ace-merbivore.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #161616;\
}\
.ace-merbivore .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-merbivore .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404040\
}\
.ace-merbivore .ace_marker-layer .ace_active-line {\
background: #333435\
}\
.ace-merbivore .ace_gutter-active-line {\
background-color: #333435\
}\
.ace-merbivore .ace_marker-layer .ace_selected-word {\
border: 1px solid #454545\
}\
.ace-merbivore .ace_invisible {\
color: #404040\
}\
.ace-merbivore .ace_entity.ace_name.ace_tag,\
.ace-merbivore .ace_keyword,\
.ace-merbivore .ace_meta,\
.ace-merbivore .ace_meta.ace_tag,\
.ace-merbivore .ace_storage,\
.ace-merbivore .ace_support.ace_function {\
color: #FC6F09\
}\
.ace-merbivore .ace_constant,\
.ace-merbivore .ace_constant.ace_character,\
.ace-merbivore .ace_constant.ace_character.ace_escape,\
.ace-merbivore .ace_constant.ace_other,\
.ace-merbivore .ace_support.ace_type {\
color: #1EDAFB\
}\
.ace-merbivore .ace_constant.ace_character.ace_escape {\
color: #519F50\
}\
.ace-merbivore .ace_constant.ace_language {\
color: #FDC251\
}\
.ace-merbivore .ace_constant.ace_library,\
.ace-merbivore .ace_string,\
.ace-merbivore .ace_support.ace_constant {\
color: #8DFF0A\
}\
.ace-merbivore .ace_constant.ace_numeric {\
color: #58C554\
}\
.ace-merbivore .ace_invalid {\
color: #FFFFFF;\
background-color: #990000\
}\
.ace-merbivore .ace_fold {\
background-color: #FC6F09;\
border-color: #E6E1DC\
}\
.ace-merbivore .ace_comment {\
font-style: italic;\
color: #AD2EA4\
}\
.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\
color: #FFFF89\
}\
.ace-merbivore .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,96 @@
define("ace/theme/merbivore_soft", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-merbivore-soft";
exports.cssText = ".ace-merbivore-soft .ace_gutter {\
background: #262424;\
color: #E6E1DC\
}\
.ace-merbivore-soft .ace_print-margin {\
width: 1px;\
background: #262424\
}\
.ace-merbivore-soft {\
background-color: #1C1C1C;\
color: #E6E1DC\
}\
.ace-merbivore-soft .ace_cursor {\
color: #FFFFFF\
}\
.ace-merbivore-soft .ace_marker-layer .ace_selection {\
background: #494949\
}\
.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #1C1C1C;\
}\
.ace-merbivore-soft .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-merbivore-soft .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404040\
}\
.ace-merbivore-soft .ace_marker-layer .ace_active-line {\
background: #333435\
}\
.ace-merbivore-soft .ace_gutter-active-line {\
background-color: #333435\
}\
.ace-merbivore-soft .ace_marker-layer .ace_selected-word {\
border: 1px solid #494949\
}\
.ace-merbivore-soft .ace_invisible {\
color: #404040\
}\
.ace-merbivore-soft .ace_entity.ace_name.ace_tag,\
.ace-merbivore-soft .ace_keyword,\
.ace-merbivore-soft .ace_meta,\
.ace-merbivore-soft .ace_meta.ace_tag,\
.ace-merbivore-soft .ace_storage {\
color: #FC803A\
}\
.ace-merbivore-soft .ace_constant,\
.ace-merbivore-soft .ace_constant.ace_character,\
.ace-merbivore-soft .ace_constant.ace_character.ace_escape,\
.ace-merbivore-soft .ace_constant.ace_other,\
.ace-merbivore-soft .ace_support.ace_type {\
color: #68C1D8\
}\
.ace-merbivore-soft .ace_constant.ace_character.ace_escape {\
color: #B3E5B4\
}\
.ace-merbivore-soft .ace_constant.ace_language {\
color: #E1C582\
}\
.ace-merbivore-soft .ace_constant.ace_library,\
.ace-merbivore-soft .ace_string,\
.ace-merbivore-soft .ace_support.ace_constant {\
color: #8EC65F\
}\
.ace-merbivore-soft .ace_constant.ace_numeric {\
color: #7FC578\
}\
.ace-merbivore-soft .ace_invalid,\
.ace-merbivore-soft .ace_invalid.ace_deprecated {\
color: #FFFFFF;\
background-color: #FE3838\
}\
.ace-merbivore-soft .ace_fold {\
background-color: #FC803A;\
border-color: #E6E1DC\
}\
.ace-merbivore-soft .ace_comment,\
.ace-merbivore-soft .ace_meta {\
font-style: italic;\
color: #AC4BB8\
}\
.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\
color: #EAF1A3\
}\
.ace-merbivore-soft .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,107 @@
define("ace/theme/mono_industrial", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-mono-industrial";
exports.cssText = ".ace-mono-industrial .ace_gutter {\
background: #1d2521;\
color: #C5C9C9\
}\
.ace-mono-industrial .ace_print-margin {\
width: 1px;\
background: #555651\
}\
.ace-mono-industrial {\
background-color: #222C28;\
color: #FFFFFF\
}\
.ace-mono-industrial .ace_cursor {\
color: #FFFFFF\
}\
.ace-mono-industrial .ace_marker-layer .ace_selection {\
background: rgba(145, 153, 148, 0.40)\
}\
.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #222C28;\
}\
.ace-mono-industrial .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-mono-industrial .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(102, 108, 104, 0.50)\
}\
.ace-mono-industrial .ace_marker-layer .ace_active-line {\
background: rgba(12, 13, 12, 0.25)\
}\
.ace-mono-industrial .ace_gutter-active-line {\
background-color: rgba(12, 13, 12, 0.25)\
}\
.ace-mono-industrial .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(145, 153, 148, 0.40)\
}\
.ace-mono-industrial .ace_invisible {\
color: rgba(102, 108, 104, 0.50)\
}\
.ace-mono-industrial .ace_string {\
background-color: #151C19;\
color: #FFFFFF\
}\
.ace-mono-industrial .ace_keyword,\
.ace-mono-industrial .ace_meta {\
color: #A39E64\
}\
.ace-mono-industrial .ace_constant,\
.ace-mono-industrial .ace_constant.ace_character,\
.ace-mono-industrial .ace_constant.ace_character.ace_escape,\
.ace-mono-industrial .ace_constant.ace_numeric,\
.ace-mono-industrial .ace_constant.ace_other {\
color: #E98800\
}\
.ace-mono-industrial .ace_entity.ace_name.ace_function,\
.ace-mono-industrial .ace_keyword.ace_operator,\
.ace-mono-industrial .ace_variable {\
color: #A8B3AB\
}\
.ace-mono-industrial .ace_invalid {\
color: #FFFFFF;\
background-color: rgba(153, 0, 0, 0.68)\
}\
.ace-mono-industrial .ace_support.ace_constant {\
color: #C87500\
}\
.ace-mono-industrial .ace_fold {\
background-color: #A8B3AB;\
border-color: #FFFFFF\
}\
.ace-mono-industrial .ace_support.ace_function {\
color: #588E60\
}\
.ace-mono-industrial .ace_entity.ace_name,\
.ace-mono-industrial .ace_support.ace_class,\
.ace-mono-industrial .ace_support.ace_type {\
color: #5778B6\
}\
.ace-mono-industrial .ace_storage {\
color: #C23B00\
}\
.ace-mono-industrial .ace_variable.ace_language,\
.ace-mono-industrial .ace_variable.ace_parameter {\
color: #648BD2\
}\
.ace-mono-industrial .ace_comment {\
color: #666C68;\
background-color: #151C19\
}\
.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\
color: #909993\
}\
.ace-mono-industrial .ace_entity.ace_name.ace_tag {\
color: #A65EFF\
}\
.ace-mono-industrial .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,105 @@
define("ace/theme/monokai", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-monokai";
exports.cssText = ".ace-monokai .ace_gutter {\
background: #2F3129;\
color: #8F908A\
}\
.ace-monokai .ace_print-margin {\
width: 1px;\
background: #555651\
}\
.ace-monokai {\
background-color: #272822;\
color: #F8F8F2\
}\
.ace-monokai .ace_cursor {\
color: #F8F8F0\
}\
.ace-monokai .ace_marker-layer .ace_selection {\
background: #49483E\
}\
.ace-monokai.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #272822;\
}\
.ace-monokai .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-monokai .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #49483E\
}\
.ace-monokai .ace_marker-layer .ace_active-line {\
background: #202020\
}\
.ace-monokai .ace_gutter-active-line {\
background-color: #272727\
}\
.ace-monokai .ace_marker-layer .ace_selected-word {\
border: 1px solid #49483E\
}\
.ace-monokai .ace_invisible {\
color: #52524d\
}\
.ace-monokai .ace_entity.ace_name.ace_tag,\
.ace-monokai .ace_keyword,\
.ace-monokai .ace_meta.ace_tag,\
.ace-monokai .ace_storage {\
color: #F92672\
}\
.ace-monokai .ace_punctuation,\
.ace-monokai .ace_punctuation.ace_tag {\
color: #fff\
}\
.ace-monokai .ace_constant.ace_character,\
.ace-monokai .ace_constant.ace_language,\
.ace-monokai .ace_constant.ace_numeric,\
.ace-monokai .ace_constant.ace_other {\
color: #AE81FF\
}\
.ace-monokai .ace_invalid {\
color: #F8F8F0;\
background-color: #F92672\
}\
.ace-monokai .ace_invalid.ace_deprecated {\
color: #F8F8F0;\
background-color: #AE81FF\
}\
.ace-monokai .ace_support.ace_constant,\
.ace-monokai .ace_support.ace_function {\
color: #66D9EF\
}\
.ace-monokai .ace_fold {\
background-color: #A6E22E;\
border-color: #F8F8F2\
}\
.ace-monokai .ace_storage.ace_type,\
.ace-monokai .ace_support.ace_class,\
.ace-monokai .ace_support.ace_type {\
font-style: italic;\
color: #66D9EF\
}\
.ace-monokai .ace_entity.ace_name.ace_function,\
.ace-monokai .ace_entity.ace_other,\
.ace-monokai .ace_entity.ace_other.ace_attribute-name,\
.ace-monokai .ace_variable {\
color: #A6E22E\
}\
.ace-monokai .ace_variable.ace_parameter {\
font-style: italic;\
color: #FD971F\
}\
.ace-monokai .ace_string {\
color: #E6DB74\
}\
.ace-monokai .ace_comment {\
color: #75715E\
}\
.ace-monokai .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,108 @@
define("ace/theme/pastel_on_dark", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-pastel-on-dark";
exports.cssText = ".ace-pastel-on-dark .ace_gutter {\
background: #353030;\
color: #8F938F\
}\
.ace-pastel-on-dark .ace_print-margin {\
width: 1px;\
background: #353030\
}\
.ace-pastel-on-dark {\
background-color: #2C2828;\
color: #8F938F\
}\
.ace-pastel-on-dark .ace_cursor {\
color: #A7A7A7\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_selection {\
background: rgba(221, 240, 255, 0.20)\
}\
.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #2C2828;\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 255, 255, 0.25)\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_active-line {\
background: rgba(255, 255, 255, 0.031)\
}\
.ace-pastel-on-dark .ace_gutter-active-line {\
background-color: rgba(255, 255, 255, 0.031)\
}\
.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(221, 240, 255, 0.20)\
}\
.ace-pastel-on-dark .ace_invisible {\
color: rgba(255, 255, 255, 0.25)\
}\
.ace-pastel-on-dark .ace_keyword,\
.ace-pastel-on-dark .ace_meta {\
color: #757aD8\
}\
.ace-pastel-on-dark .ace_constant,\
.ace-pastel-on-dark .ace_constant.ace_character,\
.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\
.ace-pastel-on-dark .ace_constant.ace_other {\
color: #4FB7C5\
}\
.ace-pastel-on-dark .ace_keyword.ace_operator {\
color: #797878\
}\
.ace-pastel-on-dark .ace_constant.ace_character {\
color: #AFA472\
}\
.ace-pastel-on-dark .ace_constant.ace_language {\
color: #DE8E30\
}\
.ace-pastel-on-dark .ace_constant.ace_numeric {\
color: #CCCCCC\
}\
.ace-pastel-on-dark .ace_invalid,\
.ace-pastel-on-dark .ace_invalid.ace_illegal {\
color: #F8F8F8;\
background-color: rgba(86, 45, 86, 0.75)\
}\
.ace-pastel-on-dark .ace_invalid.ace_deprecated {\
text-decoration: underline;\
font-style: italic;\
color: #D2A8A1\
}\
.ace-pastel-on-dark .ace_fold {\
background-color: #757aD8;\
border-color: #8F938F\
}\
.ace-pastel-on-dark .ace_support.ace_function {\
color: #AEB2F8\
}\
.ace-pastel-on-dark .ace_string {\
color: #66A968\
}\
.ace-pastel-on-dark .ace_string.ace_regexp {\
color: #E9C062\
}\
.ace-pastel-on-dark .ace_comment {\
color: #A6C6FF\
}\
.ace-pastel-on-dark .ace_variable {\
color: #BEBF55\
}\
.ace-pastel-on-dark .ace_variable.ace_language {\
color: #C1C144\
}\
.ace-pastel-on-dark .ace_xml-pe {\
color: #494949\
}\
.ace-pastel-on-dark .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,88 @@
define("ace/theme/solarized_dark", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-solarized-dark";
exports.cssText = ".ace-solarized-dark .ace_gutter {\
background: #01313f;\
color: #d0edf7\
}\
.ace-solarized-dark .ace_print-margin {\
width: 1px;\
background: #33555E\
}\
.ace-solarized-dark {\
background-color: #002B36;\
color: #93A1A1\
}\
.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\
.ace-solarized-dark .ace_storage {\
color: #93A1A1\
}\
.ace-solarized-dark .ace_cursor,\
.ace-solarized-dark .ace_string.ace_regexp {\
color: #D30102\
}\
.ace-solarized-dark .ace_marker-layer .ace_active-line,\
.ace-solarized-dark .ace_marker-layer .ace_selection {\
background: rgba(255, 255, 255, 0.1)\
}\
.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #002B36;\
}\
.ace-solarized-dark .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-solarized-dark .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(147, 161, 161, 0.50)\
}\
.ace-solarized-dark .ace_gutter-active-line {\
background-color: #0d3440\
}\
.ace-solarized-dark .ace_marker-layer .ace_selected-word {\
border: 1px solid #073642\
}\
.ace-solarized-dark .ace_invisible {\
color: rgba(147, 161, 161, 0.50)\
}\
.ace-solarized-dark .ace_keyword,\
.ace-solarized-dark .ace_meta,\
.ace-solarized-dark .ace_support.ace_class,\
.ace-solarized-dark .ace_support.ace_type {\
color: #859900\
}\
.ace-solarized-dark .ace_constant.ace_character,\
.ace-solarized-dark .ace_constant.ace_other {\
color: #CB4B16\
}\
.ace-solarized-dark .ace_constant.ace_language {\
color: #B58900\
}\
.ace-solarized-dark .ace_constant.ace_numeric {\
color: #D33682\
}\
.ace-solarized-dark .ace_fold {\
background-color: #268BD2;\
border-color: #93A1A1\
}\
.ace-solarized-dark .ace_entity.ace_name.ace_function,\
.ace-solarized-dark .ace_entity.ace_name.ace_tag,\
.ace-solarized-dark .ace_support.ace_function,\
.ace-solarized-dark .ace_variable,\
.ace-solarized-dark .ace_variable.ace_language {\
color: #268BD2\
}\
.ace-solarized-dark .ace_string {\
color: #2AA198\
}\
.ace-solarized-dark .ace_comment {\
font-style: italic;\
color: #657B83\
}\
.ace-solarized-dark .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,91 @@
define("ace/theme/solarized_light", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-solarized-light";
exports.cssText = ".ace-solarized-light .ace_gutter {\
background: #fbf1d3;\
color: #333\
}\
.ace-solarized-light .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-solarized-light {\
background-color: #FDF6E3;\
color: #586E75\
}\
.ace-solarized-light .ace_cursor {\
color: #000000\
}\
.ace-solarized-light .ace_marker-layer .ace_selection {\
background: rgba(7, 54, 67, 0.09)\
}\
.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FDF6E3;\
}\
.ace-solarized-light .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-solarized-light .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(147, 161, 161, 0.50)\
}\
.ace-solarized-light .ace_marker-layer .ace_active-line {\
background: #EEE8D5\
}\
.ace-solarized-light .ace_gutter-active-line {\
background-color : #EDE5C1\
}\
.ace-solarized-light .ace_marker-layer .ace_selected-word {\
border: 1px solid #073642\
}\
.ace-solarized-light .ace_invisible {\
color: rgba(147, 161, 161, 0.50)\
}\
.ace-solarized-light .ace_keyword,\
.ace-solarized-light .ace_meta,\
.ace-solarized-light .ace_support.ace_class,\
.ace-solarized-light .ace_support.ace_type {\
color: #859900\
}\
.ace-solarized-light .ace_constant.ace_character,\
.ace-solarized-light .ace_constant.ace_other {\
color: #CB4B16\
}\
.ace-solarized-light .ace_constant.ace_language {\
color: #B58900\
}\
.ace-solarized-light .ace_constant.ace_numeric {\
color: #D33682\
}\
.ace-solarized-light .ace_fold {\
background-color: #268BD2;\
border-color: #586E75\
}\
.ace-solarized-light .ace_entity.ace_name.ace_function,\
.ace-solarized-light .ace_entity.ace_name.ace_tag,\
.ace-solarized-light .ace_support.ace_function,\
.ace-solarized-light .ace_variable,\
.ace-solarized-light .ace_variable.ace_language {\
color: #268BD2\
}\
.ace-solarized-light .ace_storage {\
color: #073642\
}\
.ace-solarized-light .ace_string {\
color: #2AA198\
}\
.ace-solarized-light .ace_string.ace_regexp {\
color: #D30102\
}\
.ace-solarized-light .ace_comment,\
.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\
color: #93A1A1\
}\
.ace-solarized-light .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,138 @@
define("ace/theme/sqlserver", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-sqlserver";
exports.cssText = ".ace-sqlserver .ace_gutter {\
background: #ebebeb;\
color: #333;\
overflow: hidden;\
}\
.ace-sqlserver .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-sqlserver {\
background-color: #FFFFFF;\
color: black;\
}\
.ace-sqlserver .ace_identifier {\
color: black;\
}\
.ace-sqlserver .ace_keyword {\
color: #0000FF;\
}\
.ace-sqlserver .ace_numeric {\
color: black;\
}\
.ace-sqlserver .ace_storage {\
color: #11B7BE;\
}\
.ace-sqlserver .ace_keyword.ace_operator,\
.ace-sqlserver .ace_lparen,\
.ace-sqlserver .ace_rparen,\
.ace-sqlserver .ace_punctuation {\
color: #808080;\
}\
.ace-sqlserver .ace_set.ace_statement {\
color: #0000FF;\
text-decoration: underline;\
}\
.ace-sqlserver .ace_cursor {\
color: black;\
}\
.ace-sqlserver .ace_invisible {\
color: rgb(191, 191, 191);\
}\
.ace-sqlserver .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-sqlserver .ace_constant.ace_language {\
color: #979797;\
}\
.ace-sqlserver .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-sqlserver .ace_invalid {\
background-color: rgb(153, 0, 0);\
color: white;\
}\
.ace-sqlserver .ace_support.ace_function {\
color: #FF00FF;\
}\
.ace-sqlserver .ace_support.ace_constant {\
color: rgb(6, 150, 14);\
}\
.ace-sqlserver .ace_class {\
color: #008080;\
}\
.ace-sqlserver .ace_support.ace_other {\
color: #6D79DE;\
}\
.ace-sqlserver .ace_variable.ace_parameter {\
font-style: italic;\
color: #FD971F;\
}\
.ace-sqlserver .ace_comment {\
color: #008000;\
}\
.ace-sqlserver .ace_constant.ace_numeric {\
color: black;\
}\
.ace-sqlserver .ace_variable {\
color: rgb(49, 132, 149);\
}\
.ace-sqlserver .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-sqlserver .ace_support.ace_storedprocedure {\
color: #800000;\
}\
.ace-sqlserver .ace_heading {\
color: rgb(12, 7, 255);\
}\
.ace-sqlserver .ace_list {\
color: rgb(185, 6, 144);\
}\
.ace-sqlserver .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-sqlserver .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-sqlserver .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-sqlserver .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-sqlserver .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.07);\
}\
.ace-sqlserver .ace_gutter-active-line {\
background-color: #dcdcdc;\
}\
.ace-sqlserver .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-sqlserver .ace_meta.ace_tag {\
color: #0000FF;\
}\
.ace-sqlserver .ace_string.ace_regex {\
color: #FF0000;\
}\
.ace-sqlserver .ace_string {\
color: #FF0000;\
}\
.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\
color: #994409;\
}\
.ace-sqlserver .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,114 @@
define("ace/theme/terminal", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-terminal-theme";
exports.cssText = ".ace-terminal-theme .ace_gutter {\
background: #1a0005;\
color: steelblue\
}\
.ace-terminal-theme .ace_print-margin {\
width: 1px;\
background: #1a1a1a\
}\
.ace-terminal-theme {\
background-color: black;\
color: #DEDEDE\
}\
.ace-terminal-theme .ace_cursor {\
color: #9F9F9F\
}\
.ace-terminal-theme .ace_marker-layer .ace_selection {\
background: #424242\
}\
.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px black;\
}\
.ace-terminal-theme .ace_marker-layer .ace_step {\
background: rgb(0, 0, 0)\
}\
.ace-terminal-theme .ace_marker-layer .ace_bracket {\
background: #090;\
}\
.ace-terminal-theme .ace_marker-layer .ace_bracket-start {\
background: #090;\
}\
.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\
margin: -1px 0 0 -1px;\
border: 1px solid #900\
}\
.ace-terminal-theme .ace_marker-layer .ace_active-line {\
background: #2A2A2A\
}\
.ace-terminal-theme .ace_gutter-active-line {\
background-color: #2A112A\
}\
.ace-terminal-theme .ace_marker-layer .ace_selected-word {\
border: 1px solid #424242\
}\
.ace-terminal-theme .ace_invisible {\
color: #343434\
}\
.ace-terminal-theme .ace_keyword,\
.ace-terminal-theme .ace_meta,\
.ace-terminal-theme .ace_storage,\
.ace-terminal-theme .ace_storage.ace_type,\
.ace-terminal-theme .ace_support.ace_type {\
color: tomato\
}\
.ace-terminal-theme .ace_keyword.ace_operator {\
color: deeppink\
}\
.ace-terminal-theme .ace_constant.ace_character,\
.ace-terminal-theme .ace_constant.ace_language,\
.ace-terminal-theme .ace_constant.ace_numeric,\
.ace-terminal-theme .ace_keyword.ace_other.ace_unit,\
.ace-terminal-theme .ace_support.ace_constant,\
.ace-terminal-theme .ace_variable.ace_parameter {\
color: #E78C45\
}\
.ace-terminal-theme .ace_constant.ace_other {\
color: gold\
}\
.ace-terminal-theme .ace_invalid {\
color: yellow;\
background-color: red\
}\
.ace-terminal-theme .ace_invalid.ace_deprecated {\
color: #CED2CF;\
background-color: #B798BF\
}\
.ace-terminal-theme .ace_fold {\
background-color: #7AA6DA;\
border-color: #DEDEDE\
}\
.ace-terminal-theme .ace_entity.ace_name.ace_function,\
.ace-terminal-theme .ace_support.ace_function,\
.ace-terminal-theme .ace_variable {\
color: #7AA6DA\
}\
.ace-terminal-theme .ace_support.ace_class,\
.ace-terminal-theme .ace_support.ace_type {\
color: #E7C547\
}\
.ace-terminal-theme .ace_heading,\
.ace-terminal-theme .ace_string {\
color: #B9CA4A\
}\
.ace-terminal-theme .ace_entity.ace_name.ace_tag,\
.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\
.ace-terminal-theme .ace_meta.ace_tag,\
.ace-terminal-theme .ace_string.ace_regexp,\
.ace-terminal-theme .ace_variable {\
color: #D54E53\
}\
.ace-terminal-theme .ace_comment {\
color: orangered\
}\
.ace-terminal-theme .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,129 @@
define("ace/theme/textmate", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
"use strict";
exports.isDark = false;
exports.cssClass = "ace-tm";
exports.cssText = ".ace-tm .ace_gutter {\
background: #f0f0f0;\
color: #333;\
}\
.ace-tm .ace_print-margin {\
width: 1px;\
background: #e8e8e8;\
}\
.ace-tm .ace_fold {\
background-color: #6B72E6;\
}\
.ace-tm {\
background-color: #FFFFFF;\
color: black;\
}\
.ace-tm .ace_cursor {\
color: black;\
}\
.ace-tm .ace_invisible {\
color: rgb(191, 191, 191);\
}\
.ace-tm .ace_storage,\
.ace-tm .ace_keyword {\
color: blue;\
}\
.ace-tm .ace_constant {\
color: rgb(197, 6, 11);\
}\
.ace-tm .ace_constant.ace_buildin {\
color: rgb(88, 72, 246);\
}\
.ace-tm .ace_constant.ace_language {\
color: rgb(88, 92, 246);\
}\
.ace-tm .ace_constant.ace_library {\
color: rgb(6, 150, 14);\
}\
.ace-tm .ace_invalid {\
background-color: rgba(255, 0, 0, 0.1);\
color: red;\
}\
.ace-tm .ace_support.ace_function {\
color: rgb(60, 76, 114);\
}\
.ace-tm .ace_support.ace_constant {\
color: rgb(6, 150, 14);\
}\
.ace-tm .ace_support.ace_type,\
.ace-tm .ace_support.ace_class {\
color: rgb(109, 121, 222);\
}\
.ace-tm .ace_keyword.ace_operator {\
color: rgb(104, 118, 135);\
}\
.ace-tm .ace_string {\
color: rgb(3, 106, 7);\
}\
.ace-tm .ace_comment {\
color: rgb(76, 136, 107);\
}\
.ace-tm .ace_comment.ace_doc {\
color: rgb(0, 102, 255);\
}\
.ace-tm .ace_comment.ace_doc.ace_tag {\
color: rgb(128, 159, 191);\
}\
.ace-tm .ace_constant.ace_numeric {\
color: rgb(0, 0, 205);\
}\
.ace-tm .ace_variable {\
color: rgb(49, 132, 149);\
}\
.ace-tm .ace_xml-pe {\
color: rgb(104, 104, 91);\
}\
.ace-tm .ace_entity.ace_name.ace_function {\
color: #0000A2;\
}\
.ace-tm .ace_heading {\
color: rgb(12, 7, 255);\
}\
.ace-tm .ace_list {\
color:rgb(185, 6, 144);\
}\
.ace-tm .ace_meta.ace_tag {\
color:rgb(0, 22, 142);\
}\
.ace-tm .ace_string.ace_regex {\
color: rgb(255, 0, 0)\
}\
.ace-tm .ace_marker-layer .ace_selection {\
background: rgb(181, 213, 255);\
}\
.ace-tm.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px white;\
}\
.ace-tm .ace_marker-layer .ace_step {\
background: rgb(252, 255, 0);\
}\
.ace-tm .ace_marker-layer .ace_stack {\
background: rgb(164, 229, 101);\
}\
.ace-tm .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgb(192, 192, 192);\
}\
.ace-tm .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.07);\
}\
.ace-tm .ace_gutter-active-line {\
background-color : #dcdcdc;\
}\
.ace-tm .ace_marker-layer .ace_selected-word {\
background: rgb(250, 250, 255);\
border: 1px solid rgb(200, 200, 250);\
}\
.ace-tm .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
}\
";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,108 @@
define("ace/theme/tomorrow", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-tomorrow";
exports.cssText = ".ace-tomorrow .ace_gutter {\
background: #f6f6f6;\
color: #4D4D4C\
}\
.ace-tomorrow .ace_print-margin {\
width: 1px;\
background: #f6f6f6\
}\
.ace-tomorrow {\
background-color: #FFFFFF;\
color: #4D4D4C\
}\
.ace-tomorrow .ace_cursor {\
color: #AEAFAD\
}\
.ace-tomorrow .ace_marker-layer .ace_selection {\
background: #D6D6D6\
}\
.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FFFFFF;\
}\
.ace-tomorrow .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-tomorrow .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #D1D1D1\
}\
.ace-tomorrow .ace_marker-layer .ace_active-line {\
background: #EFEFEF\
}\
.ace-tomorrow .ace_gutter-active-line {\
background-color : #dcdcdc\
}\
.ace-tomorrow .ace_marker-layer .ace_selected-word {\
border: 1px solid #D6D6D6\
}\
.ace-tomorrow .ace_invisible {\
color: #D1D1D1\
}\
.ace-tomorrow .ace_keyword,\
.ace-tomorrow .ace_meta,\
.ace-tomorrow .ace_storage,\
.ace-tomorrow .ace_storage.ace_type,\
.ace-tomorrow .ace_support.ace_type {\
color: #8959A8\
}\
.ace-tomorrow .ace_keyword.ace_operator {\
color: #3E999F\
}\
.ace-tomorrow .ace_constant.ace_character,\
.ace-tomorrow .ace_constant.ace_language,\
.ace-tomorrow .ace_constant.ace_numeric,\
.ace-tomorrow .ace_keyword.ace_other.ace_unit,\
.ace-tomorrow .ace_support.ace_constant,\
.ace-tomorrow .ace_variable.ace_parameter {\
color: #F5871F\
}\
.ace-tomorrow .ace_constant.ace_other {\
color: #666969\
}\
.ace-tomorrow .ace_invalid {\
color: #FFFFFF;\
background-color: #C82829\
}\
.ace-tomorrow .ace_invalid.ace_deprecated {\
color: #FFFFFF;\
background-color: #8959A8\
}\
.ace-tomorrow .ace_fold {\
background-color: #4271AE;\
border-color: #4D4D4C\
}\
.ace-tomorrow .ace_entity.ace_name.ace_function,\
.ace-tomorrow .ace_support.ace_function,\
.ace-tomorrow .ace_variable {\
color: #4271AE\
}\
.ace-tomorrow .ace_support.ace_class,\
.ace-tomorrow .ace_support.ace_type {\
color: #C99E00\
}\
.ace-tomorrow .ace_heading,\
.ace-tomorrow .ace_markup.ace_heading,\
.ace-tomorrow .ace_string {\
color: #718C00\
}\
.ace-tomorrow .ace_entity.ace_name.ace_tag,\
.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\
.ace-tomorrow .ace_meta.ace_tag,\
.ace-tomorrow .ace_string.ace_regexp,\
.ace-tomorrow .ace_variable {\
color: #C82829\
}\
.ace-tomorrow .ace_comment {\
color: #8E908C\
}\
.ace-tomorrow .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,108 @@
define("ace/theme/tomorrow_night", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night";
exports.cssText = ".ace-tomorrow-night .ace_gutter {\
background: #25282c;\
color: #C5C8C6\
}\
.ace-tomorrow-night .ace_print-margin {\
width: 1px;\
background: #25282c\
}\
.ace-tomorrow-night {\
background-color: #1D1F21;\
color: #C5C8C6\
}\
.ace-tomorrow-night .ace_cursor {\
color: #AEAFAD\
}\
.ace-tomorrow-night .ace_marker-layer .ace_selection {\
background: #373B41\
}\
.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #1D1F21;\
}\
.ace-tomorrow-night .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-tomorrow-night .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #4B4E55\
}\
.ace-tomorrow-night .ace_marker-layer .ace_active-line {\
background: #282A2E\
}\
.ace-tomorrow-night .ace_gutter-active-line {\
background-color: #282A2E\
}\
.ace-tomorrow-night .ace_marker-layer .ace_selected-word {\
border: 1px solid #373B41\
}\
.ace-tomorrow-night .ace_invisible {\
color: #4B4E55\
}\
.ace-tomorrow-night .ace_keyword,\
.ace-tomorrow-night .ace_meta,\
.ace-tomorrow-night .ace_storage,\
.ace-tomorrow-night .ace_storage.ace_type,\
.ace-tomorrow-night .ace_support.ace_type {\
color: #B294BB\
}\
.ace-tomorrow-night .ace_keyword.ace_operator {\
color: #8ABEB7\
}\
.ace-tomorrow-night .ace_constant.ace_character,\
.ace-tomorrow-night .ace_constant.ace_language,\
.ace-tomorrow-night .ace_constant.ace_numeric,\
.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\
.ace-tomorrow-night .ace_support.ace_constant,\
.ace-tomorrow-night .ace_variable.ace_parameter {\
color: #DE935F\
}\
.ace-tomorrow-night .ace_constant.ace_other {\
color: #CED1CF\
}\
.ace-tomorrow-night .ace_invalid {\
color: #CED2CF;\
background-color: #DF5F5F\
}\
.ace-tomorrow-night .ace_invalid.ace_deprecated {\
color: #CED2CF;\
background-color: #B798BF\
}\
.ace-tomorrow-night .ace_fold {\
background-color: #81A2BE;\
border-color: #C5C8C6\
}\
.ace-tomorrow-night .ace_entity.ace_name.ace_function,\
.ace-tomorrow-night .ace_support.ace_function,\
.ace-tomorrow-night .ace_variable {\
color: #81A2BE\
}\
.ace-tomorrow-night .ace_support.ace_class,\
.ace-tomorrow-night .ace_support.ace_type {\
color: #F0C674\
}\
.ace-tomorrow-night .ace_heading,\
.ace-tomorrow-night .ace_markup.ace_heading,\
.ace-tomorrow-night .ace_string {\
color: #B5BD68\
}\
.ace-tomorrow-night .ace_entity.ace_name.ace_tag,\
.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\
.ace-tomorrow-night .ace_meta.ace_tag,\
.ace-tomorrow-night .ace_string.ace_regexp,\
.ace-tomorrow-night .ace_variable {\
color: #CC6666\
}\
.ace-tomorrow-night .ace_comment {\
color: #969896\
}\
.ace-tomorrow-night .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,106 @@
define("ace/theme/tomorrow_night_blue", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-blue";
exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\
background: #00204b;\
color: #7388b5\
}\
.ace-tomorrow-night-blue .ace_print-margin {\
width: 1px;\
background: #00204b\
}\
.ace-tomorrow-night-blue {\
background-color: #002451;\
color: #FFFFFF\
}\
.ace-tomorrow-night-blue .ace_constant.ace_other,\
.ace-tomorrow-night-blue .ace_cursor {\
color: #FFFFFF\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\
background: #003F8E\
}\
.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #002451;\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\
background: rgb(127, 111, 19)\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404F7D\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\
background: #00346E\
}\
.ace-tomorrow-night-blue .ace_gutter-active-line {\
background-color: #022040\
}\
.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\
border: 1px solid #003F8E\
}\
.ace-tomorrow-night-blue .ace_invisible {\
color: #404F7D\
}\
.ace-tomorrow-night-blue .ace_keyword,\
.ace-tomorrow-night-blue .ace_meta,\
.ace-tomorrow-night-blue .ace_storage,\
.ace-tomorrow-night-blue .ace_storage.ace_type,\
.ace-tomorrow-night-blue .ace_support.ace_type {\
color: #EBBBFF\
}\
.ace-tomorrow-night-blue .ace_keyword.ace_operator {\
color: #99FFFF\
}\
.ace-tomorrow-night-blue .ace_constant.ace_character,\
.ace-tomorrow-night-blue .ace_constant.ace_language,\
.ace-tomorrow-night-blue .ace_constant.ace_numeric,\
.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\
.ace-tomorrow-night-blue .ace_support.ace_constant,\
.ace-tomorrow-night-blue .ace_variable.ace_parameter {\
color: #FFC58F\
}\
.ace-tomorrow-night-blue .ace_invalid {\
color: #FFFFFF;\
background-color: #F99DA5\
}\
.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\
color: #FFFFFF;\
background-color: #EBBBFF\
}\
.ace-tomorrow-night-blue .ace_fold {\
background-color: #BBDAFF;\
border-color: #FFFFFF\
}\
.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\
.ace-tomorrow-night-blue .ace_support.ace_function,\
.ace-tomorrow-night-blue .ace_variable {\
color: #BBDAFF\
}\
.ace-tomorrow-night-blue .ace_support.ace_class,\
.ace-tomorrow-night-blue .ace_support.ace_type {\
color: #FFEEAD\
}\
.ace-tomorrow-night-blue .ace_heading,\
.ace-tomorrow-night-blue .ace_markup.ace_heading,\
.ace-tomorrow-night-blue .ace_string {\
color: #D1F1A9\
}\
.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\
.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\
.ace-tomorrow-night-blue .ace_meta.ace_tag,\
.ace-tomorrow-night-blue .ace_string.ace_regexp,\
.ace-tomorrow-night-blue .ace_variable {\
color: #FF9DA4\
}\
.ace-tomorrow-night-blue .ace_comment {\
color: #7285B7\
}\
.ace-tomorrow-night-blue .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,121 @@
define("ace/theme/tomorrow_night_bright", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-bright";
exports.cssText = ".ace-tomorrow-night-bright .ace_gutter {\
background: #1a1a1a;\
color: #DEDEDE\
}\
.ace-tomorrow-night-bright .ace_print-margin {\
width: 1px;\
background: #1a1a1a\
}\
.ace-tomorrow-night-bright {\
background-color: #000000;\
color: #DEDEDE\
}\
.ace-tomorrow-night-bright .ace_cursor {\
color: #9F9F9F\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\
background: #424242\
}\
.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #000000;\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #888888\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\
border: 1px solid rgb(110, 119, 0);\
border-bottom: 0;\
box-shadow: inset 0 -1px rgb(110, 119, 0);\
margin: -1px 0 0 -1px;\
background: rgba(255, 235, 0, 0.1)\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\
background: #2A2A2A\
}\
.ace-tomorrow-night-bright .ace_gutter-active-line {\
background-color: #2A2A2A\
}\
.ace-tomorrow-night-bright .ace_stack {\
background-color: rgb(66, 90, 44)\
}\
.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\
border: 1px solid #888888\
}\
.ace-tomorrow-night-bright .ace_invisible {\
color: #343434\
}\
.ace-tomorrow-night-bright .ace_keyword,\
.ace-tomorrow-night-bright .ace_meta,\
.ace-tomorrow-night-bright .ace_storage,\
.ace-tomorrow-night-bright .ace_storage.ace_type,\
.ace-tomorrow-night-bright .ace_support.ace_type {\
color: #C397D8\
}\
.ace-tomorrow-night-bright .ace_keyword.ace_operator {\
color: #70C0B1\
}\
.ace-tomorrow-night-bright .ace_constant.ace_character,\
.ace-tomorrow-night-bright .ace_constant.ace_language,\
.ace-tomorrow-night-bright .ace_constant.ace_numeric,\
.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\
.ace-tomorrow-night-bright .ace_support.ace_constant,\
.ace-tomorrow-night-bright .ace_variable.ace_parameter {\
color: #E78C45\
}\
.ace-tomorrow-night-bright .ace_constant.ace_other {\
color: #EEEEEE\
}\
.ace-tomorrow-night-bright .ace_invalid {\
color: #CED2CF;\
background-color: #DF5F5F\
}\
.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\
color: #CED2CF;\
background-color: #B798BF\
}\
.ace-tomorrow-night-bright .ace_fold {\
background-color: #7AA6DA;\
border-color: #DEDEDE\
}\
.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\
.ace-tomorrow-night-bright .ace_support.ace_function,\
.ace-tomorrow-night-bright .ace_variable {\
color: #7AA6DA\
}\
.ace-tomorrow-night-bright .ace_support.ace_class,\
.ace-tomorrow-night-bright .ace_support.ace_type {\
color: #E7C547\
}\
.ace-tomorrow-night-bright .ace_heading,\
.ace-tomorrow-night-bright .ace_markup.ace_heading,\
.ace-tomorrow-night-bright .ace_string {\
color: #B9CA4A\
}\
.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\
.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\
.ace-tomorrow-night-bright .ace_meta.ace_tag,\
.ace-tomorrow-night-bright .ace_string.ace_regexp,\
.ace-tomorrow-night-bright .ace_variable {\
color: #D54E53\
}\
.ace-tomorrow-night-bright .ace_comment {\
color: #969896\
}\
.ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\
color: #C2C280\
}\
.ace-tomorrow-night-bright .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,108 @@
define("ace/theme/tomorrow_night_eighties", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-eighties";
exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\
background: #272727;\
color: #CCC\
}\
.ace-tomorrow-night-eighties .ace_print-margin {\
width: 1px;\
background: #272727\
}\
.ace-tomorrow-night-eighties {\
background-color: #2D2D2D;\
color: #CCCCCC\
}\
.ace-tomorrow-night-eighties .ace_constant.ace_other,\
.ace-tomorrow-night-eighties .ace_cursor {\
color: #CCCCCC\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\
background: #515151\
}\
.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #2D2D2D;\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #6A6A6A\
}\
.ace-tomorrow-night-bright .ace_stack {\
background: rgb(66, 90, 44)\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\
background: #393939\
}\
.ace-tomorrow-night-eighties .ace_gutter-active-line {\
background-color: #393939\
}\
.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\
border: 1px solid #515151\
}\
.ace-tomorrow-night-eighties .ace_invisible {\
color: #6A6A6A\
}\
.ace-tomorrow-night-eighties .ace_keyword,\
.ace-tomorrow-night-eighties .ace_meta,\
.ace-tomorrow-night-eighties .ace_storage,\
.ace-tomorrow-night-eighties .ace_storage.ace_type,\
.ace-tomorrow-night-eighties .ace_support.ace_type {\
color: #CC99CC\
}\
.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\
color: #66CCCC\
}\
.ace-tomorrow-night-eighties .ace_constant.ace_character,\
.ace-tomorrow-night-eighties .ace_constant.ace_language,\
.ace-tomorrow-night-eighties .ace_constant.ace_numeric,\
.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\
.ace-tomorrow-night-eighties .ace_support.ace_constant,\
.ace-tomorrow-night-eighties .ace_variable.ace_parameter {\
color: #F99157\
}\
.ace-tomorrow-night-eighties .ace_invalid {\
color: #CDCDCD;\
background-color: #F2777A\
}\
.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\
color: #CDCDCD;\
background-color: #CC99CC\
}\
.ace-tomorrow-night-eighties .ace_fold {\
background-color: #6699CC;\
border-color: #CCCCCC\
}\
.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\
.ace-tomorrow-night-eighties .ace_support.ace_function,\
.ace-tomorrow-night-eighties .ace_variable {\
color: #6699CC\
}\
.ace-tomorrow-night-eighties .ace_support.ace_class,\
.ace-tomorrow-night-eighties .ace_support.ace_type {\
color: #FFCC66\
}\
.ace-tomorrow-night-eighties .ace_heading,\
.ace-tomorrow-night-eighties .ace_markup.ace_heading,\
.ace-tomorrow-night-eighties .ace_string {\
color: #99CC99\
}\
.ace-tomorrow-night-eighties .ace_comment {\
color: #999999\
}\
.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\
.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\
.ace-tomorrow-night-eighties .ace_meta.ace_tag,\
.ace-tomorrow-night-eighties .ace_variable {\
color: #F2777A\
}\
.ace-tomorrow-night-eighties .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,109 @@
define("ace/theme/twilight", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-twilight";
exports.cssText = ".ace-twilight .ace_gutter {\
background: #232323;\
color: #E2E2E2\
}\
.ace-twilight .ace_print-margin {\
width: 1px;\
background: #232323\
}\
.ace-twilight {\
background-color: #141414;\
color: #F8F8F8\
}\
.ace-twilight .ace_cursor {\
color: #A7A7A7\
}\
.ace-twilight .ace_marker-layer .ace_selection {\
background: rgba(221, 240, 255, 0.20)\
}\
.ace-twilight.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #141414;\
}\
.ace-twilight .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-twilight .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 255, 255, 0.25)\
}\
.ace-twilight .ace_marker-layer .ace_active-line {\
background: rgba(255, 255, 255, 0.031)\
}\
.ace-twilight .ace_gutter-active-line {\
background-color: rgba(255, 255, 255, 0.031)\
}\
.ace-twilight .ace_marker-layer .ace_selected-word {\
border: 1px solid rgba(221, 240, 255, 0.20)\
}\
.ace-twilight .ace_invisible {\
color: rgba(255, 255, 255, 0.25)\
}\
.ace-twilight .ace_keyword,\
.ace-twilight .ace_meta {\
color: #CDA869\
}\
.ace-twilight .ace_constant,\
.ace-twilight .ace_constant.ace_character,\
.ace-twilight .ace_constant.ace_character.ace_escape,\
.ace-twilight .ace_constant.ace_other,\
.ace-twilight .ace_heading,\
.ace-twilight .ace_markup.ace_heading,\
.ace-twilight .ace_support.ace_constant {\
color: #CF6A4C\
}\
.ace-twilight .ace_invalid.ace_illegal {\
color: #F8F8F8;\
background-color: rgba(86, 45, 86, 0.75)\
}\
.ace-twilight .ace_invalid.ace_deprecated {\
text-decoration: underline;\
font-style: italic;\
color: #D2A8A1\
}\
.ace-twilight .ace_support {\
color: #9B859D\
}\
.ace-twilight .ace_fold {\
background-color: #AC885B;\
border-color: #F8F8F8\
}\
.ace-twilight .ace_support.ace_function {\
color: #DAD085\
}\
.ace-twilight .ace_list,\
.ace-twilight .ace_markup.ace_list,\
.ace-twilight .ace_storage {\
color: #F9EE98\
}\
.ace-twilight .ace_entity.ace_name.ace_function,\
.ace-twilight .ace_meta.ace_tag,\
.ace-twilight .ace_variable {\
color: #AC885B\
}\
.ace-twilight .ace_string {\
color: #8F9D6A\
}\
.ace-twilight .ace_string.ace_regexp {\
color: #E9C062\
}\
.ace-twilight .ace_comment {\
font-style: italic;\
color: #5F5A60\
}\
.ace-twilight .ace_variable {\
color: #7587A6\
}\
.ace-twilight .ace_xml-pe {\
color: #494949\
}\
.ace-twilight .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,94 @@
define("ace/theme/vibrant_ink", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-vibrant-ink";
exports.cssText = ".ace-vibrant-ink .ace_gutter {\
background: #1a1a1a;\
color: #BEBEBE\
}\
.ace-vibrant-ink .ace_print-margin {\
width: 1px;\
background: #1a1a1a\
}\
.ace-vibrant-ink {\
background-color: #0F0F0F;\
color: #FFFFFF\
}\
.ace-vibrant-ink .ace_cursor {\
color: #FFFFFF\
}\
.ace-vibrant-ink .ace_marker-layer .ace_selection {\
background: #6699CC\
}\
.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #0F0F0F;\
}\
.ace-vibrant-ink .ace_marker-layer .ace_step {\
background: rgb(102, 82, 0)\
}\
.ace-vibrant-ink .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #404040\
}\
.ace-vibrant-ink .ace_marker-layer .ace_active-line {\
background: #333333\
}\
.ace-vibrant-ink .ace_gutter-active-line {\
background-color: #333333\
}\
.ace-vibrant-ink .ace_marker-layer .ace_selected-word {\
border: 1px solid #6699CC\
}\
.ace-vibrant-ink .ace_invisible {\
color: #404040\
}\
.ace-vibrant-ink .ace_keyword,\
.ace-vibrant-ink .ace_meta {\
color: #FF6600\
}\
.ace-vibrant-ink .ace_constant,\
.ace-vibrant-ink .ace_constant.ace_character,\
.ace-vibrant-ink .ace_constant.ace_character.ace_escape,\
.ace-vibrant-ink .ace_constant.ace_other {\
color: #339999\
}\
.ace-vibrant-ink .ace_constant.ace_numeric {\
color: #99CC99\
}\
.ace-vibrant-ink .ace_invalid,\
.ace-vibrant-ink .ace_invalid.ace_deprecated {\
color: #CCFF33;\
background-color: #000000\
}\
.ace-vibrant-ink .ace_fold {\
background-color: #FFCC00;\
border-color: #FFFFFF\
}\
.ace-vibrant-ink .ace_entity.ace_name.ace_function,\
.ace-vibrant-ink .ace_support.ace_function,\
.ace-vibrant-ink .ace_variable {\
color: #FFCC00\
}\
.ace-vibrant-ink .ace_variable.ace_parameter {\
font-style: italic\
}\
.ace-vibrant-ink .ace_string {\
color: #66FF00\
}\
.ace-vibrant-ink .ace_string.ace_regexp {\
color: #44B4CC\
}\
.ace-vibrant-ink .ace_comment {\
color: #9933CC\
}\
.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\
font-style: italic;\
color: #99CC99\
}\
.ace-vibrant-ink .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

View File

@ -0,0 +1,88 @@
define("ace/theme/xcode", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-xcode";
exports.cssText = "\
.ace-xcode .ace_gutter {\
background: #e8e8e8;\
color: #333\
}\
.ace-xcode .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-xcode {\
background-color: #FFFFFF;\
color: #000000\
}\
.ace-xcode .ace_cursor {\
color: #000000\
}\
.ace-xcode .ace_marker-layer .ace_selection {\
background: #B5D5FF\
}\
.ace-xcode.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FFFFFF;\
}\
.ace-xcode .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174)\
}\
.ace-xcode .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF\
}\
.ace-xcode .ace_marker-layer .ace_active-line {\
background: rgba(0, 0, 0, 0.071)\
}\
.ace-xcode .ace_gutter-active-line {\
background-color: rgba(0, 0, 0, 0.071)\
}\
.ace-xcode .ace_marker-layer .ace_selected-word {\
border: 1px solid #B5D5FF\
}\
.ace-xcode .ace_constant.ace_language,\
.ace-xcode .ace_keyword,\
.ace-xcode .ace_meta,\
.ace-xcode .ace_variable.ace_language {\
color: #C800A4\
}\
.ace-xcode .ace_invisible {\
color: #BFBFBF\
}\
.ace-xcode .ace_constant.ace_character,\
.ace-xcode .ace_constant.ace_other {\
color: #275A5E\
}\
.ace-xcode .ace_constant.ace_numeric {\
color: #3A00DC\
}\
.ace-xcode .ace_entity.ace_other.ace_attribute-name,\
.ace-xcode .ace_support.ace_constant,\
.ace-xcode .ace_support.ace_function {\
color: #450084\
}\
.ace-xcode .ace_fold {\
background-color: #C800A4;\
border-color: #000000\
}\
.ace-xcode .ace_entity.ace_name.ace_tag,\
.ace-xcode .ace_support.ace_class,\
.ace-xcode .ace_support.ace_type {\
color: #790EAD\
}\
.ace-xcode .ace_storage {\
color: #C900A4\
}\
.ace-xcode .ace_string {\
color: #DF0002\
}\
.ace-xcode .ace_comment {\
color: #008E00\
}\
.ace-xcode .ace_indent-guide {\
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,528 @@
OPERAND_INVALID = -1;
OPERAND_REG = 0;
OPERAND_MEM_IMM = 1;
OPERAND_MEM_REG = 2;
OPERAND_IMM = 3;
//Remove default syntax checker
editor = ace.edit("editor");
editor.session.setOption("useWorker", false);
//Remove message
editor.$blockScrolling = Infinity;
function removeComment(line) {
if (line.indexOf(";") !== -1) {
return line.substring(0, line.indexOf(";"));
} else {
return line;
}
}
function checkForLabel(line, result) {
line = removeComment(line);
var match;
if ((match = /\b\w*\b:/.exec(line)) !== null) {
result.labels.push(match[0].substring(0, match[0].length - 1));
}
}
function checkForSegmentDeclaration(line) {
var tokens = getTokens(line);
return tokens[0] !== undefined && (tokens[0].toLowerCase() === ".data" || tokens[0].toLowerCase() === ".text");
}
function checkForEQUInstruction(line, result, currentLine) {
var tokens = getTokens(line);
if (line.toLowerCase().indexOf(" equ ") !== -1 || tokens[1] !== undefined && tokens[1].toLowerCase() === "equ") {
//Save as a label
var num = Number(tokens[2]);
if (!isNaN(num) && num === Math.floor(num)) {
result.labels.push(tokens[0]);
return true;
} else {
result.annotations.push({
row: currentLine,
column: 0,
text: "Usage: constant_name EQU immediate_value",
type: "error"
});
return true;
}
} else {
return false;
}
}
function getTokens(line) {
var tokens = line.split(/\s+/);
for (var i = 0; i < tokens.length; i++) {
if (tokens[i] === "") {
tokens.splice(i, 1);
}
}
return tokens;
}
function removeLabel(line) {
return line.replace(/\b\w*\b:/, "");
}
function checkForORGInstruction(line, result, currentLine) {
line = removeComment(line);
line = removeLabel(line);
//Split string
var tokens = getTokens(line);
var mnemonic = tokens[0];
if (mnemonic !== undefined && mnemonic.toLowerCase() === "org") {
console.log(tokens);
if (tokens.length > 1) {
var num = Number(tokens[1]);
if (!isNaN(num) && num === Math.floor(num)) {
return true;
} else {
result.annotations.push({
row: currentLine,
column: 0,
text: "Invalid operand: " + tokens[1],
type: "error"
});
return true
}
}
} else {
return false;
}
}
function parseDWInstruction(line, result, currentLine) {
line = line.trim();
if (line.substr(0, 2).toLowerCase() === "dw") {
var values = line.substr(2, line.length).split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/, -1);
for (var i = 0; i < values.length; i++) {
values[i] = values[i].trim();
var tokens = getTokens(values[i]);
if (tokens.length === 2 && getOperandType(tokens[0], result) === OPERAND_IMM &&
tokens[1].toLowerCase().startsWith("dup(") && tokens[1].endsWith(")") &&
getOperandType(tokens[1].substring(4, tokens[1].indexOf(")")), result) === OPERAND_IMM) {
// console.log("DUp");
} else if (values[i].startsWith("\"") && values[i].endsWith("\"")) {
//Handle string
} else if (getOperandType(values[i], result) === OPERAND_IMM) {
// console.log("is Imm " + values[i]);
} else {
result.annotations.push({
row: currentLine,
column: 0,
text: "Usage: DW IMM, IMM ...",
type: "error"
});
return true;
}
}
return true;
} else {
return false;
}
}
function getOperandType(text, result) {
text = text.trim();
if (text === "") {
return OPERAND_INVALID;
}
//Check IMM
if (!isNaN(Number(text)) && Number(text) === Math.floor(Number(text)) && text.indexOf("o") === -1
&& text.indexOf("0e") !== 0) {
return OPERAND_IMM;
}
//Check REG
if (new RegExp('^(a|b|c|d|x|y|bp|sp)$').test(text.toLowerCase())) {
return OPERAND_REG;
}
//Check Label
for (i = 0; i < result.labels.length; i++) {
if (text === result.labels[i]) {
return OPERAND_IMM;
}
}
//Check MEM_*
if (text.startsWith("[") && text.endsWith("]")) {
text = text.replace("[", "").replace("]", "");
//Check MEM_IMM
if (!isNaN(Number(text)) && Number(text) === Math.floor(Number(text))) {
return OPERAND_MEM_IMM;
}
//Check MEM_Label
for (var i = 0; i < result.labels.length; i++) {
if (text === result.labels[i]) {
return OPERAND_MEM_IMM;
}
}
//Check for MEM_REG (+ x)
var expr = "";
if (new RegExp('^(bp|sp)$').test(text.toLowerCase().substring(0, 2).toLowerCase())) {
//Starts with 2-char register
expr = text.substring(2);
} else if (new RegExp('^(a|b|c|d|x|y)$').test(text.toLowerCase().substring(0, 1).toLowerCase())) {
//Starts with 1-char register
expr = text.substring(1);
} else {
return OPERAND_INVALID;
}
if (expr.replace(/\s+/g, '') === "") {
//No displacement specified
return OPERAND_MEM_REG;
}
//Remove white space
expr = expr.replace(/\s+/g, '');
//expr should now look like this: '+1' '-3' '+0x02' '+myLabel'
//Check for label
for (i = 0; i < result.labels.length; i++) {
if (expr.substring(1) === result.labels[i]) {
return OPERAND_MEM_REG;
}
}
//Remove either ONE '+' or ONE '-' else the operand is invalid
//Credit: https://github.com/KevinRamharak
expr = expr.replace(/[+-]/, '');
//Check for number
if (!isNaN(Number(expr)) && Number(expr) === Math.floor(Number(expr))) {
return OPERAND_MEM_REG;
}
}
return OPERAND_INVALID;
}
function parseInstruction(line, result, currentLine) {
line = removeComment(line);
line = removeLabel(line);
var tokens = getTokens(line);
var mnemonic = tokens[0];
if (mnemonic === undefined || mnemonic === "") {
return; //Line is empty
}
if (!parseDWInstruction(line, result, currentLine)) {
if (new RegExp('\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|hwi|hwq|nop|neg|' +
'call|ret|jmp|jnz|jg|jl|jge|jle|int|jz|js|jns|brk|not|jc|jnc|ror|rol|sal|sar|jo|jno|inc|dec|rcl|xchg|rcr|pushf|popf|ja|jna)\\b').test(mnemonic.toLowerCase())) {
if (line.indexOf(",") !== -1) {
//2 Operands
var strO1 = line.substring(line.indexOf(mnemonic) + mnemonic.length, line.indexOf(','));
var strO2 = line.substring(line.indexOf(',') + 1).trim();
//Validate operand number
if (!new RegExp('\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|xor|rol|ror|sal|sar|rcl|xchg|rcr)\\b').test(mnemonic.toLowerCase())) {
result.annotations.push({
row: currentLine,
column: 0,
text: mnemonic + " instruction with 2 operands is illegal",
type: "error"
});
return;
}
//Validate operand type
var o1Type = getOperandType(strO1, result);
var o2Type = getOperandType(strO2, result);
if (o1Type === OPERAND_INVALID) {
result.annotations.push({
row: currentLine,
column: 0,
text: "Invalid operand: " + strO1,
type: "error"
});
return;
}
if (o2Type === OPERAND_INVALID) {
result.annotations.push({
row: currentLine,
column: 0,
text: "Invalid operand: " + strO2,
type: "error"
});
return;
}
//Check for illegal operand combos:
if (o1Type === OPERAND_IMM) {
result.annotations.push({
row: currentLine,
column: 0,
text: "Destination operand can't be an immediate value",
type: "error"
});
}
} else if (tokens.length > 1) {
//1 Operand
strO1 = line.substring(line.indexOf(mnemonic) + mnemonic.length).trim();
//Validate operand number
if (!new RegExp('\\b(?:push|mul|pop|div|neg|call|jnz|jg|jl|jge|jle|hwi|hwq|jz|js|jns|ret|jmp|not|jc|jnc|jo|jno|inc|dec|ja|jna)\\b').test(mnemonic.toLowerCase())) {
result.annotations.push({
row: currentLine,
column: 0,
text: mnemonic + " instruction with 1 operand is illegal",
type: "error"
});
return;
}
//Validate operand type
if (getOperandType(strO1, result) === OPERAND_INVALID) {
result.annotations.push({
row: currentLine,
column: 0,
text: "Invalid operand: " + strO1,
type: "error"
});
}
} else {
//No operand
if (!new RegExp('\\b(?:ret|brk|nop|pushf|popf)\\b').test(mnemonic.toLowerCase())) {
//Validate operand number
result.annotations.push({
row: currentLine,
column: 0,
text: mnemonic + " instruction with no operand is illegal",
type: "error"
});
}
}
} else {
result.annotations.push({
row: currentLine,
column: 0,
text: "Unknown mnemonic: " + mnemonic,
type: "error"
});
}
}
}
function parse() {
var text = ace.edit("editor").getValue();
var lines = text.split("\n");
var result = {
labels: [],
annotations: []
};
//Pass 1 of 2: Save label names
for (var currentLine = 0; currentLine < lines.length; currentLine++) {
checkForLabel(lines[currentLine], result);
}
//Pass 2 of 2: Check instructions
for (currentLine = 0; currentLine < lines.length; currentLine++) {
if (!checkForSegmentDeclaration(lines[currentLine]) &&
!checkForEQUInstruction(lines[currentLine], result, currentLine) &&
!checkForORGInstruction(lines[currentLine], result, currentLine)) {
parseInstruction(lines[currentLine], result, currentLine);
}
}
//Set icons
editor.getSession().setAnnotations(result.annotations);
}
function tabWorldClick() {
document.getElementById("tab-world").classList.add("active");
document.getElementById("tab-world-sm").classList.add("active");
document.getElementById("tab-editor").classList.remove("active");
document.getElementById("tab-editor-sm").classList.remove("active");
document.getElementById("tab-console").classList.remove("active");
document.getElementById("tab-console-sm").classList.remove("active");
document.getElementById("world-tab").setAttribute("style", "");
document.getElementById("editor-tab").setAttribute("style", "display: none");
document.getElementById("console-tab").setAttribute("style", "display: none");
}
function tabEditorClick() {
document.getElementById("tab-world").classList.remove("active");
document.getElementById("tab-world-sm").classList.remove("active");
document.getElementById("tab-editor").classList.add("active");
document.getElementById("tab-editor-sm").classList.add("active");
document.getElementById("tab-console").classList.remove("active");
document.getElementById("tab-console-sm").classList.remove("active");
document.getElementById("world-tab").setAttribute("style", "display: none");
document.getElementById("editor-tab").setAttribute("style", "");
document.getElementById("console-tab").setAttribute("style", "display: none");
}
function tabConsoleClick() {
document.getElementById("tab-world").classList.remove("active");
document.getElementById("tab-world-sm").classList.remove("active");
document.getElementById("tab-editor").classList.remove("active");
document.getElementById("tab-editor-sm").classList.remove("active");
document.getElementById("tab-console").classList.add("active");
document.getElementById("tab-console-sm").classList.add("active");
document.getElementById("world-tab").setAttribute("style", "display: none");
document.getElementById("editor-tab").setAttribute("style", "display: none");
document.getElementById("console-tab").setAttribute("style", "");
}
//-----
//Check if browser supports local storage if not than bad luck, use something else than IE7
var editorStorage;
if (typeof window.localStorage !== 'undefined') {
editorStorage = window.localStorage;
} else {
editorStorage = false;
}
//Default should be 'theme/tommorow.js' or loaded from local storage
var editorThemeOptions = {
available: [
"theme/ambiance", "theme/chaos", "theme/chrome",
"theme/clouds", "theme/clouds_midnight", "theme/cobalt",
"theme/crimson_editor", "theme/dawn", "theme/dracula",
"theme/dreamweaver", "theme/eclipse", "theme/github",
"theme/gob", "theme/gruvbox", "theme/idle_fingers",
"theme/iplastic", "theme/katzenmilch", "theme/kr_theme",
"theme/kuroir", "theme/merbivore", "theme/merbivore_soft",
"theme/mono_industrial", "theme/monokai", "theme/pastel_on_dark",
"theme/solarized_dark", "theme/solarized_light", "theme/sqlserver",
"theme/terminal", "theme/textmate", "theme/tomorrow",
"theme/tomorrow_night_blue", "theme/tomorrow_night_bright", "theme/tomorrow_night_eighties",
"theme/tomorrow_night", "theme/twilight", "theme/vibrant_ink", "theme/xcode"
],
defaultTheme: "theme/tomorrow_night_eighties"
};
//Get the stored default theme
if (editorStorage) {
var storedTheme = editorStorage.getItem('editorTheme');
if (storedTheme !== null && editorThemeOptions.available.indexOf(storedTheme) !== -1) {
editorThemeOptions.defaultTheme = storedTheme;
}
}
//Cache element reference
var editorThemeSelectElement = document.getElementById("editorTheme");
//Event handler
function editorOnThemeChange() {
if (editorThemeSelectElement === null) {
console.error("editorOnThemeChange() :: editorThemeSelectElement seems to be 'null'");
return;
}
var select = editorThemeSelectElement;
var option = select.options[select.selectedIndex];
if (editorThemeOptions.available.indexOf(option.value) === -1) {
console.error("editorOnThemeChange() :: user somehow selected an invalid theme : '" + option.value + "' for '" + option.text + "'");
return;
}
//Store locally so it gets remembered
if (editorStorage) {
editorStorage.setItem('editorTheme', option.value);
}
//Set theme
editor.setTheme("ace/" + option.value);
}
//Add handler to listen to event
editorThemeSelectElement.addEventListener('change', editorOnThemeChange);
//Populate select
editorThemeOptions.available.forEach(function (theme) {
var option = document.createElement("option");
option.value = theme;
option.text = theme.substring(6); // "theme/{text}" -> extract text to set as text user sees
//Make sure default is also the one that is selected
if (theme === editorThemeOptions.defaultTheme) {
option.selected = true;
}
editorThemeSelectElement.appendChild(option);
});
//Manually call handler once
editorOnThemeChange();
editor.getSession().setMode("ace/mode/mar");
editor.setFontSize(16);
editor.setDisplayIndentGuides(false);
document.getElementById('editor').style.fontFamily = "fixedsys";
editor.on("change", parse);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,63 @@
<!doctype html>
<html lang="en">
#set ($title = "Login")
#set ($cur_page = "account")
#parse("head.vm")
<body>
#parse("header.vm")
<div class="container">
<div class="card">
<div class="card-header"><h5>Account - login & register</h5></div>
<div class="card-body">
<h5 class="card-title">Login</h5>
<form>
<div class="row">
<div class="col form-group">
<input title="Username" placeholder="Username" name="username" class="form-control">
</div>
<div class="col form-group">
<input title="Password" type="password" placeholder="Password" name="password"
class="form-control">
</div>
</div>
<button type="submit" class="btn btn-primary text-mono">Login</button>
</form>
<hr>
<h5 class="card-title">Register</h5>
<form>
<div class="row">
<div class="col form-group">
<input title="Username" placeholder="Username" name="username" class="form-control">
</div>
<div class="col form-group">
<input title="Password" type="password" placeholder="Password" name="password"
class="form-control">
</div>
</div>
<button type="submit" class="btn btn-outline-primary text-mono">Register</button>
</form>
</div>
</div>
</div>
#parse("footer.vm")
</body>
<script src="js/popper.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</html>

View File

@ -0,0 +1,7 @@
<div class="container">
<span class="text-muted">©2018 Simon Fortier</span>
</div>
<script src="js/popper.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

View File

@ -0,0 +1,12 @@
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'/>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-reboot.min.css">
<link rel="stylesheet" href="css/bootstrap4-neon-glow.min.css">
<link rel="stylesheet" href="css/material-icons.css">
<link rel="stylesheet" href="css/mar.css">
<link rel="stylesheet" href="css/console.css">
<title>$title</title>
</head>

View File

@ -0,0 +1,31 @@
<nav class="navbar navbar-expand-lg bg-primary navbar-light">
<a class="navbar-brand text-mono" href="/">M.A.R.</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto mt-2 mt-md-0">
<li class="nav-item">
<a class="nav-link #if ($cur_page == 'play')active#end" href="/play"><i class="mi">code</i> Play</a>
</li>
<li class="nav-item">
<a class="nav-link #if ($cur_page == 'leaderboarc')active#end" href="/leaderboard"><i class="mi">assessment</i>
Leaderboard</a>
</li>
<li class="nav-item">
<a class="nav-link #if ($cur_page == 'account')active#end" href="/account"><i
class="mi">account_circle</i> Account</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="https://github.com/simon987/Much-Assembly-Required"><img
width="23px" src="images/GitHub-Mark-32px.png"> Contribute</a>
</li>
</ul>
</div>
</nav>

View File

@ -0,0 +1,62 @@
<!doctype html>
<html lang="en">
#set ($title = "Home - Much Assembly Required")
#parse("head.vm")
<body>
#parse("header.vm")
<div class="wrapper">
<div class="container">
<div class="jumbotron">
<h1 class="display-4">Much Assembly Required</h1>
<p class="lead">Program the 8086-like microprocessor of a robot in a grid-based multiplayer world.</p>
<hr class="my-4">
<div class="card-columns">
<div class="card">
<img src="images/code.png" class="feature-image">
<div class="card-body">
<h5 class="card-title">Online code editor</h5>
<p class="card-text">Program an 8086-like virtual microprocessor in the online code editor with
real-time syntax check and highlighting.</p>
</div>
</div>
<div class="card">
<img src="images/cubot.png" class="feature-image">
<div class="card-body">
<h5 class="card-title">Program your robot</h5>
<p class="card-text">Reprogram your robot's microprocessor to make it navigate the game
universe, gather resources and build structures.</p>
</div>
</div>
<div class="card">
<img src="images/world.png" class="feature-image">
<div class="card-body">
<h5 class="card-title">Large game universe</h5>
<p class="card-text">The persistent game universe holds up to 4,294,967,296 procedurally
generated 16x16 Worlds.</p>
</div>
</div>
<div class="card">
<img src="images/github-logo.png" class="feature-image">
<div class="card-body">
<h5 class="card-title">Free and open source</h5>
<p class="card-text">The project's source code and the game's documentation are available on
GitHub.</p>
</div>
</div>
</div>
<a class="btn btn-primary btn-lg btn-shadow text-mono" href="#" role="button">Play now!</a>
</div>
</div>
</div>
#parse("footer.vm")
</body>
</html>

View File

@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
#set ($title = "Leaderboard")
#set ($cur_page = "leaderboarc")
#parse("head.vm")
<body>
#parse("header.vm")
<div class="container">
<div class="card">
<div class="card-header"><h5>Leaderboard</h5></div>
<div class="card-body">
<table class="table table-hover table-striped">
<thead class="thead-dark">
<tr>
<th>Player</th>
<th>Completed vaults</th>
</tr>
</thead>
<tbody>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
<tr>
<td>Test1</td>
<td>Test2</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
#parse("footer.vm")
</body>
<script src="js/popper.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</html>

View File

@ -0,0 +1,159 @@
<!doctype html>
<html lang="en">
#set ($title = "Official game server") ## TODO get from config
#set ($cur_page = "play")
#parse("head.vm")
<body>
#parse("header.vm")
<div class="container">
<div class="card text-center">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<a id="tab-world" class="nav-link active regular-screen" href="#" onclick="tabWorldClick()"><i
class="mi">public</i> World</a>
<a id="tab-world-sm" class="nav-link active small-screen" href="#" onclick="tabWorldClick()"><i
class="mi">public</i></a>
</li>
<li class="nav-item">
<a id="tab-editor" class="nav-link regular-screen" href="#" onclick="tabEditorClick()"><i
class="mi">code</i> Editor</a>
<a id="tab-editor-sm" class="nav-link small-screen" href="#" onclick="tabEditorClick()"><i
class="mi">code</i></a>
</li>
<li class="nav-item">
<a id="tab-console" class="nav-link regular-screen" href="#" onclick="tabConsoleClick()"><i
class="mi">computer</i> Console</a>
<a id="tab-console-sm" class="nav-link small-screen" href="#" onclick="tabConsoleClick()"><i
class="mi">computer</i></a>
</li>
<li class="nav-item">
<a class="nav-link regular-screen" target="_blank"
href="https://github.com/simon987/Much-Assembly-Required/wiki"><i class="mi">launch</i>
Documentation</a>
<a class="nav-link small-screen" target="_blank"
href="https://github.com/simon987/Much-Assembly-Required/wiki"><i class="mi">launch</i></a>
</li>
<li class="nav-item">
<a class="nav-link regular-screen" target="_blank"
href="https://join.slack.com/t/muchassemblyrequired/shared_invite/enQtMjY3Mjc1OTUwNjEwLTkyOTIwOTA5OGY4MDVlMGI4NzM5YzlhMWJiMGY1OWE2NjUxODQ1NWQ1YTcxMTA1NGZkYzNjYzMyM2E1ODdmNzg"><i
class="mi">chat</i> Slack</a>
<a class="nav-link small-screen" target="_blank"
href="https://join.slack.com/t/muchassemblyrequired/shared_invite/enQtMjY3Mjc1OTUwNjEwLTkyOTIwOTA5OGY4MDVlMGI4NzM5YzlhMWJiMGY1OWE2NjUxODQ1NWQ1YTcxMTA1NGZkYzNjYzMyM2E1ODdmNzg"><i
class="mi">chat</i></a>
</li>
</ul>
</div>
<div class="card-body">
## GAME / WORLD
<div id="world-tab">
<div id="game" tabindex="0"></div>
</div>
## EDITOR
<div id="editor-tab" style="display: none">
<div class="row">
<div class="col-sm-4">
<select title="Select Theme" class="form-control" id="editorTheme"></select>
</div>
<div class="col-sm-2">
<button class="btn btn-shadow btn-success text-mono regular-screen" href="#"><i class="mi">file_upload</i>
Upload
</button>
<button class="btn btn-shadow btn-success text-mono small-screen" href="#"><i class="mi">file_upload</i>
</button>
</div>
<div class="col-sm-2">
<button class="btn btn-shadow btn-danger text-mono regular-screen" href="#"><i
class="mi">replay</i> Reload
</button>
<button class="btn btn-shadow btn-danger text-mono small-screen" href="#"><i
class="mi">replay</i></button>
</div>
<div class="col-sm-2">
<button class="btn btn-shadow btn-info text-mono regular-screen" href="#"><i class="mi">file_upload</i>
Floppy
</button>
<button class="btn btn-shadow btn-info text-mono small-screen" href="#"><i class="mi">file_upload</i>
</button>
</div>
<div class="col-sm-2">
<button class="btn btn-shadow btn-info text-mono regular-screen" href="#"><i class="mi">file_download</i>
Floppy
</button>
<button class="btn btn-shadow btn-info text-mono small-screen" href="#"><i class="mi">file_download</i>
</button>
</div>
</div>
<div id="editor"></div>
<script src="js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="js/editor.js"></script>
</div>
## CONSOLE
<div id="console-tab" style="display: none">
<div class="row">
<div class="col-sm-4">
<div class="dropdown">
<button id="widthDial" class="btn btn-secondary btn-shadow dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true">Line width
</button>
<div class="dropdown-menu">
<a href="#" class="dropdown-item">16</a>
<a href="#" class="dropdown-item">24</a>
<a href="#" class="dropdown-item">40</a>
<a href="#" class="dropdown-item">56</a>
<a href="#" class="dropdown-item">64</a>
</div>
</div>
</div>
<div class="col-sm-2">
<button id="colorButton" class="btn btn-outline-info text-mono btn-shadow regular-screen">
Color
</button>
<button onclick="$('#colorButton').click()"
class="btn btn-outline-info text-mono btn-shadow small-screen"><i class="mi">invert_colors_off</i>
</button>
</div>
<div class="col-sm-2">
<button id="scrollButton" class="btn btn-outline-info text-mono btn-shadow regular-screen">
Scroll
</button>
<button onclick="$('#scrollButton').click()"
class="btn btn-outline-info text-mono btn-shadow small-screen"><i
class="mi">swap_vert</i></button>
</div>
<div class="col-sm-2">
<button id="resetButton" class="btn btn-danger text-mono btn-shadow regular-screen">Reset
</button>
<button onclick="$('#resetButton').click()"
class="btn btn-danger text-mono btn-shadow small-screen"><i class="mi">replay</i>
</button>
</div>
</div>
<div id="console-wrapper" class="noisy">
<div id="consoleText" class="piece output noclick ctr-selection ctr-text">test123</div>
<div class="piece scanlines noclick"></div>
<div class="piece glow noclick"></div>
</div>
</div>
</div>
</div>
</div>
#parse("footer.vm")
<script src="js/phaser.js"></script>
<script src="js/phaser-plugin-isometric.js"></script>
<script src="js/mar.js"></script>
</body>
</html>

View File

@ -0,0 +1,223 @@
//todo pull this off the server or something?
let defaultText =
" _______ __ __\n" +
"| _ |.-----.---.-.----.| |--.|__|.----.-----.----.-----.\n" +
"| || _ | _ | __|| || || __| _ | _| _ |\n" +
"|___|___|| __|___._|____||__|__||__||____|_____|__| | __|\n" +
" |__| |__|\n" +
"\n" +
"Version 1.4A, 1985-05-17\n" +
"Initialising Universal Communication Port connection...Done\n" +
"Current date is 2790-03-11\n" +
"Cubot Status: Much Assembly Required";
enum ConsoleMode {
CLEAR,
NORMAL
}
interface ConsoleScreen {
toggleColor(self: ConsoleScreen): void;
toggleScrolling(self: ConsoleScreen): void;
reset(self: ConsoleScreen): void;
handleConsoleBufferUpdate(consoleBuffer: string[], mode: ConsoleMode): void;
}
class PlainTextConsoleMode {
public width: number;
public dialImage: string;
constructor(lineWidth: number, dialImage: string) {
this.width = lineWidth;
this.dialImage = dialImage;
}
}
class PlainTextConsole implements ConsoleScreen {
private txtDiv: HTMLElement;
private colorButton: HTMLButtonElement;
private scrollButton: HTMLButtonElement;
private resetButton: HTMLButtonElement;
private widthDial: HTMLSelectElement;
private colorToggled: boolean = false;
public autoScroll: boolean = true;
private modes: PlainTextConsoleMode[] = [];
private mode: number;
/**
* Contents of the
*/
private consoleText: string;
/**
* Length of the last line
* @type {number}
*/
private lastLineLength: number = 0;
constructor(text: string, id: string, colorId: string, scrollId: string, resetID: string, dialId: string) {
this.txtDiv = document.getElementById(id);
this.colorButton = document.getElementById(colorId) as HTMLButtonElement;
this.scrollButton = document.getElementById(scrollId) as HTMLButtonElement;
this.resetButton = document.getElementById(resetID) as HTMLButtonElement;
this.widthDial = document.getElementById(dialId) as HTMLSelectElement;
let self = this;
this.colorButton.onclick = function () {
self.toggleColor(self)
};
this.scrollButton.onclick = function () {
self.toggleScrolling(self)
};
this.resetButton.onclick = function () {
self.reset(self);
};
this.widthDial.onselect = function (e) {
PlainTextConsole.widthDialSelect(self, e);
};
this.txtDiv.innerHTML = text;
this.consoleText = text;
//Line width modes. Might break if shorter than
this.modes.push(new PlainTextConsoleMode(16, "./images/knob-170.png"));
this.modes.push(new PlainTextConsoleMode(24, "./images/knob-123.png"));
this.modes.push(new PlainTextConsoleMode(40, "./images/knob-90.png"));
this.modes.push(new PlainTextConsoleMode(56, "./images/knob-65.png"));
this.modes.push(new PlainTextConsoleMode(64, "./images/knob-10.png"));
this.mode = 3; //Mode 56
}
/**
* Toggle dark/light theme
*/
public toggleColor(self: PlainTextConsole): void {
if (self.colorToggled) {
self.colorToggled = false;
self.colorButton.classList.remove("btn-info");
self.colorButton.classList.add("btn-outline-info");
self.txtDiv.classList.remove("ctr-selection-inverted");
self.txtDiv.classList.remove("ctr-text-inverted");
self.txtDiv.classList.add("ctr-selection");
self.txtDiv.classList.add("ctr-text");
} else {
self.colorToggled = true;
self.colorButton.classList.remove("btn-outline-info");
self.colorButton.classList.add("btn-info");
self.txtDiv.classList.add("ctr-selection-inverted");
self.txtDiv.classList.add("ctr-text-inverted");
self.txtDiv.classList.remove("ctr-selection");
self.txtDiv.classList.remove("ctr-text");
}
}
/**
* Toggle auto scrolling. Also initially scrolls to bottom on click
*/
public toggleScrolling(self: PlainTextConsole): void {
if (self.autoScroll) {
self.autoScroll = false;
self.scrollButton.classList.remove("btn-outline-info");
self.scrollButton.classList.add("btn-info");
} else {
self.autoScroll = true;
self.scrollButton.classList.remove("btn-info");
self.scrollButton.classList.add("btn-outline-info");
//Scroll to bottom
self.txtDiv.scrollTop = self.txtDiv.scrollHeight;
}
}
/**
* Clears the console screen
*/
public reset(self: PlainTextConsole): void {
self.txtDiv.innerHTML = "";
self.consoleText = "";
self.lastLineLength = 0;
}
/**
* Update dial image and change console mode
*/
private static widthDialSelect(self: PlainTextConsole, e): void {
console.log(e);
if (self.mode < self.modes.length - 1) {
self.mode++;
} else {
self.mode = 0;
}
}
/**
* Handles a consoleBuffer update
* @param {string[]} consoleBuffer A Cubot's internal buffer, as an array of messages
* @param {ConsoleMode} mode mode
*/
handleConsoleBufferUpdate(consoleBuffer: string[], mode: ConsoleMode): void {
//Reset console screen before writing to it (if requested by ComPort)
if (mode == ConsoleMode.CLEAR) {
this.reset(this);
}
//For each MESSAGE-LENGTH - length message
for (let i = 0; i < consoleBuffer.length; i++) {
//Zero-terminate the message
let zeroIndex = consoleBuffer[i].indexOf("\0");
let message = consoleBuffer[i].substring(0, zeroIndex == -1 ? undefined : zeroIndex);
for (let j = 0; j < message.length; j++) {
if (message[j] == "\n") {
this.consoleText += "\n";
this.lastLineLength = 0;
} else {
if (this.lastLineLength < this.modes[this.mode].width) {
this.consoleText += message[j];
this.lastLineLength++;
} else {
this.consoleText += "\n";
this.consoleText += message[j];
this.lastLineLength = 1;
}
}
}
}
this.txtDiv.innerText = this.consoleText;
//Scroll to bottom is autoScroll switch is flipped
if (this.autoScroll) {
this.txtDiv.scrollTop = this.txtDiv.scrollHeight;
}
}
}

View File

@ -0,0 +1,525 @@
declare function saveAs(any, message: string): void;
declare var ace: any;
/**
* Client-side keyboard buffer. It is overwritten by the server at the end of tick.
*/
class KeyboardBuffer extends DebugMessage {
/**
* Array of key codes. Updated on keypress
* @type {Array}
*/
public keys: number[] = [];
/**
* @returns {string} Message written on the screen
*/
public getMessage(): string {
let str = "KB: ";
for (let i = 0; i < 16; i++) {
if (this.keys[i] !== undefined) {
str += this.keys[i].toString(16).toUpperCase() + " ";
} else {
str += "__ ";
}
}
return str;
}
}
/**
* Listens for server messages
*/
interface MessageListener {
handle(message): void;
getListenedMessageType(): string
}
/**
* Listens for object list
*/
class ObjectsListener implements MessageListener {
getListenedMessageType(): string {
return "object";
}
handle(message): void {
if (DEBUG) {
console.log("[MAR] Received " + message.objects.length + " objects")
}
if (mar.world != undefined) {
mar.world.handleObjectsUpdate(message.objects)
}
}
}
class TickListener implements MessageListener {
getListenedMessageType() {
return "tick";
}
handle(message): void {
mar.client.requestObjects();
//Update key buffer display
if (message.keys !== undefined) {
mar.client.keyboardBuffer.keys = message.keys;
}
//Update console screen
if (message.c != undefined) {
mar.client.consoleScreen.handleConsoleBufferUpdate(message.c, message.cm as ConsoleMode);
if (DEBUG) {
console.log("[MAR] Received " + message.c.length + " console message(s)")
}
}
}
}
class UserInfoListener implements MessageListener {
getListenedMessageType() {
return "userInfo";
}
handle(message) {
if (DEBUG) {
console.log("[MAR] Received user info message")
}
mar.client.worldX = message.worldX;
mar.client.worldY = message.worldY;
mar.client.dimension = message.dimension;
//Maximum Universe width
mar.client.maxWidth = message.maxWidth;
mar.client.requestTerrain();
}
}
class AuthListener implements MessageListener {
getListenedMessageType() {
return "auth";
}
handle(message) {
if (DEBUG) {
console.log("[MAR] Received auth response")
}
if (message.m === "ok") {
if (DEBUG) {
console.log("[MAR] Auth successful");
}
mar.client.requestUserInfo();
} else {
alert("Authentication failed. Please make sure you are logged in and reload the page.");
}
}
}
class TerrainListener implements MessageListener {
getListenedMessageType() {
return "terrain";
}
handle(message) {
if (DEBUG) {
console.log("[MAR] Received terrain");
}
if (mar.world) {
mar.world.removeBigMessage();
}
if (message.ok) {
let worldSize = message.size;
if (worldSize == undefined) {
worldSize = config.defaultWorldSize;
}
if (DEBUG) {
console.log("[MAR] World is available");
}
if (mar.world != null) {
if (DEBUG) {
console.log("[MAR] Updating World terrain");
}
mar.world.updateTerrain(message.terrain, worldSize);
} else {
if (DEBUG) {
console.log("[MAR] Creating new World");
}
mar.world = new World(message.terrain, worldSize);
}
} else {
if (DEBUG) {
console.log("[MAR] World is not available");
}
if (mar.world != null) {
if (DEBUG) {
console.log("[MAR] Updating World terrain");
}
mar.world.updateTerrain([], config.defaultWorldSize);
} else {
if (DEBUG) {
console.log("[MAR] Creating new World");
}
mar.world = new World([], config.defaultWorldSize);
}
if (mar.world) {
mar.world.setBigMessage("[Uncharted World]")
}
}
}
}
class CodeListener implements MessageListener {
getListenedMessageType(): string {
return "code";
}
handle(message): void {
ace.edit("editor").setValue(message.code);
}
}
class CodeResponseListener implements MessageListener {
getListenedMessageType(): string {
return "codeResponse";
}
handle(message): void {
alert("Uploaded and assembled " + message.bytes + " bytes (" + message.exceptions + " errors)");
}
}
class DebugResponseListener implements MessageListener {
getListenedMessageType(): string {
return "debug";
}
handle(message): void {
console.log("> " + message.message)
}
}
class GameClient {
keyboardBuffer: KeyboardBuffer;
/**
* Max width of the game universe, set by server
*/
public maxWidth: number;
private listeners: MessageListener[] = [];
private socket: WebSocket;
public username: string;
private tickLength: number;
private serverName: string;
public worldX: number;
public worldY: number;
public dimension: string;
public consoleScreen: PlainTextConsole;
constructor() {
this.getServerInfo();
this.consoleScreen = new PlainTextConsole(defaultText, "consoleText", "colorButton", "scrollButton", "resetButton", "widthDial");
}
public requestUserInfo(): void {
if (DEBUG) {
console.log("[MAR] Requesting user info");
}
this.socket.send(JSON.stringify({t: "userInfo"}));
}
public requestTerrain() {
if (DEBUG) {
console.log("[MAR] Requesting terrain for world (" + this.worldX + ", " + this.worldY + ")");
}
this.socket.send(JSON.stringify({t: "terrain", x: this.worldX, y: this.worldY, dimension: this.dimension}));
this.requestObjects();
}
public uploadCode(code: string): void {
if (DEBUG) {
console.log("[MAR] Uploaded code");
}
this.socket.send(JSON.stringify({t: "uploadCode", code: code}))
}
public reloadCode(): void {
if (DEBUG) {
console.log("[MAR] Reloading code");
}
this.socket.send(JSON.stringify({t: "codeRequest"}))
}
public sendKeyPress(key: number): void {
if (DEBUG) {
console.log("[MAR] Sent KeyPress: " + key);
}
if (key !== 0) {
this.socket.send(JSON.stringify({t: "k", k: key}));
}
}
public requestFloppy(): void {
//Start loading animation
document.getElementById("floppyDown").innerHTML = "<i class=\"fa fa-cog fa-spin fa-fw\"></i>";
if (DEBUG) {
console.log("[MAR] Requesting floppy");
}
this.socket.send(JSON.stringify({t: "floppyDown"}));
}
public notifyFloppyUp(): void {
if (DEBUG) {
console.log("[MAR] Notifying the game server of floppy upload");
}
this.socket.send(JSON.stringify({t: "floppyUp"}));
}
public requestObjects(): void {
if (DEBUG) {
console.log("[MAR] Requesting game objects");
}
this.socket.send(JSON.stringify({t: "object", x: this.worldX, y: this.worldY, dimension: this.dimension}));
}
public sendDebugCommand(json): void {
this.socket.send(JSON.stringify(json));
}
/**
* Get server info from game website
*/
private getServerInfo() {
let self = this;
if (DEBUG) {
console.log("[MAR] Getting server info... ");
}
let xhr = new XMLHttpRequest();
xhr.open("GET", "./getServerInfo.php", true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
if (DEBUG) {
console.log("[MAR] Received server info " + xhr.responseText);
}
setTimeout(self.connectToGameServer(JSON.parse(xhr.responseText)), 100);
}
};
xhr.send(null);
}
/**
* Connect to the game server
* @param info JSON fetched from /getServerInfo.php
*/
private connectToGameServer(info: any) {
let self = this;
if (DEBUG) {
console.log("[MAR] Connecting to " + info.address);
}
this.socket = new WebSocket(info.address);
this.username = info.username;
this.tickLength = info.tickLength;
this.serverName = info.serverName;
this.socket.binaryType = 'arraybuffer';
this.socket.onopen = function () {
if (DEBUG) {
console.log("[MAR] Connected. Sent auth request");
}
//Send auth request
self.socket.send(info.token);
self.listeners.push(new UserInfoListener());
self.listeners.push(new AuthListener());
self.listeners.push(new TickListener());
self.listeners.push(new TerrainListener());
self.listeners.push(new ObjectsListener());
self.listeners.push(new CodeResponseListener());
self.listeners.push(new CodeListener());
self.listeners.push(new DebugResponseListener());
self.socket.onmessage = function (received) {
let message;
try {
message = JSON.parse(received.data);
if (DEBUG) {
console.log("[MAR] Received: " + received.data)
}
for (let i = 0; i < self.listeners.length; i++) {
if (self.listeners[i].getListenedMessageType() === message.t) {
self.listeners[i].handle(message)
}
}
} catch (e) {
if (DEBUG) {
console.log("[MAR] Received invalid message, assuming floppy data");
}
document.getElementById("floppyDown").innerHTML = "<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i> <i class=\"fa fa-floppy-o\" aria-hidden=\"true\"></i>";
let blob = new Blob([received.data], {type: "application/octet-stream"});
saveAs(blob, "floppy.bin");
}
};
self.reloadCode();
};
this.socket.onerror = function (e) {
alert("Can't connect to game server at address " + info.address);
console.log(e);
};
this.socket.onclose = function (e) {
mar.world.setBigMessage("Disconnected from server :(");
console.log(e);
};
this.initGame();
}
/**
* Called after the connection has been made to the server
*/
public initGame() {
//Setup keyboard buffer display, don't if guest
if (this.username != "guest") {
let self = this;
this.keyboardBuffer = new KeyboardBuffer(config.kbBufferX, config.kbBufferY);
mar.addDebugMessage(this.keyboardBuffer);
//Handle keypresses
mar.game.input.keyboard.onDownCallback = function (event) {
//If the game has focus
if (document.activeElement === document.getElementById("game")) {
if ((event.keyCode >= 37 && event.keyCode <= 40) || event.keyCode === 116 || event.keyCode === 32) {
event.preventDefault();
}
if (self.username !== "guest" && self.keyboardBuffer.keys.length <= 16) {
self.sendKeyPress(event.keyCode);
//Locally update the buffer
self.keyboardBuffer.keys.push(event.keyCode);
}
}
};
}
}
/**
* Requests user info, which will trigger a terrain request with the world X,Y of
* the player's robot
*/
public findMyRobot() {
if (this.username == "guest") {
alert("You are not logged in!");
} else {
this.requestUserInfo()
}
}
}

View File

@ -0,0 +1,860 @@
enum ObjectType {
CUBOT = 1,
BIOMASS = 2,
HARVESTER_NPC = 10,
FACTORY = 3,
RADIO_TOWER = 4,
VAULT_DOOR = 5,
OBSTACLE = 6,
ELECTRIC_BOX = 7,
PORTAL = 8
}
enum ItemType {
BIOMASS = 1,
IRON = 3,
COPPER = 4
}
enum Action {
IDLE,
DIGGING,
WALKING,
WITHDRAWING,
DEPOSITING,
LISTENING,
JUMPING,
ATTACKING
}
abstract class GameObject extends Phaser.Plugin.Isometric.IsoSprite {
public tileX: number;
public tileY: number;
id: number;
protected direction: Direction;
protected action: Action;
protected shield: number;
public updated: boolean;
protected text: Phaser.Text;
constructor(x: number, y: number, z: number, key: any, frame: any) {
super(mar.game, x, y, z, key, frame);
}
public abstract updateObject(json): void;
public abstract onTileHover(): void;
public abstract onTileExit(): void;
/**
* Factory method for GameObjects
*/
public static createObject(json): GameObject {
switch (json.t) {
case ObjectType.CUBOT:
return new Cubot(json);
case ObjectType.BIOMASS:
return new BiomassBlob(json);
case ObjectType.HARVESTER_NPC:
return new HarvesterNPC(json);
case ObjectType.FACTORY:
return new Factory(json);
case ObjectType.RADIO_TOWER:
return new RadioTower(json);
case ObjectType.VAULT_DOOR:
return new VaultDoor(json);
case ObjectType.OBSTACLE:
return null;
case ObjectType.ELECTRIC_BOX:
return new ElectricBox(json);
case ObjectType.PORTAL:
return new Portal(json);
default:
return null;
}
}
/**
* Set text that will appear on top of the object. Usually used for hover text
*/
protected setText(text: string): void {
this.text = mar.game.make.text(0, 0, text, {
fontSize: 22,
fill: config.textFill,
stroke: config.textStroke,
strokeThickness: 2,
font: "fixedsys"
});
this.text.anchor.set(0.5, 0);
this.addChild(this.text);
}
/**
* Tested to trigger onTileHover and onTileExit
*/
public isAt(x: number, y: number): boolean {
return x == this.tileX && y == this.tileY;
}
}
enum HologramMode {
CLEARED,
HEX,
STRING,
DEC
}
class Cubot extends GameObject {
laserEmitter: Phaser.Particles.Arcade.Emitter;
username: string;
heldItem: ItemType;
energy: number;
inventory: Phaser.Group;
private hologram: Phaser.Text;
/**
* List of animation functions queued for execution.
*/
queuedAnimations = [];
private hovered: boolean = false;
protected cubotSprite: Phaser.Sprite;
private shieldBackSprite: Phaser.Sprite;
private shieldFrontSprite: Phaser.Sprite;
constructor(json) {
//workaround for topological sort, needs sprite dimensions
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/blankCubot");
this.anchor.setTo(0.5, 0);
if (DEBUG) {
console.log("Creating Cubot object");
}
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
this.username = json.parent;
this.heldItem = json.heldItem;
this.direction = json.direction;
this.action = json.action;
this.energy = json.energy;
this.cubotSprite = mar.game.make.sprite(0, 0, "sheet", null);
this.cubotSprite.anchor.set(0.5, 0);
this.addChild(this.cubotSprite);
this.cubotSprite.animations.add("walk_w", mar.animationFrames.walk_w);
this.cubotSprite.animations.add("walk_s", mar.animationFrames.walk_s,);
this.cubotSprite.animations.add("walk_e", mar.animationFrames.walk_e);
this.cubotSprite.animations.add("walk_n", mar.animationFrames.walk_n);
this.cubotSprite.animations.add("dig_w", mar.animationFrames.dig_w);
this.cubotSprite.animations.add("dig_s", mar.animationFrames.dig_s);
this.cubotSprite.animations.add("dig_e", mar.animationFrames.dig_e);
this.cubotSprite.animations.add("dig_n", mar.animationFrames.dig_n);
this.createUsername();
this.updateDirection();
this.tint = this.getTint();
//Laser particles
this.laserEmitter = mar.game.make.emitter(0, 20, 100);
this.addChild(this.laserEmitter);
this.laserEmitter.makeParticles("sheet", ["effects/beam"], 100);
this.laserEmitter.gravity = new Phaser.Point(0, 0);
//Shield
this.shieldBackSprite = mar.game.add.sprite(0, 0, "sheet", "objects/shieldBack");
this.shieldBackSprite.anchor.setTo(0.5, 0.1);
this.shieldBackSprite.alpha = 0.4;
mar.game.add.tween(this.shieldBackSprite).to({alpha: 0.8}, 1500, Phaser.Easing.Linear.None, true, 0, -1, true);
this.addChildAt(this.shieldBackSprite, 0);
this.shieldFrontSprite = mar.game.add.sprite(0, 0, "sheet", "objects/shieldFront");
this.shieldFrontSprite.anchor.setTo(0.5, 0.1);
this.shieldFrontSprite.alpha = 0.4;
mar.game.add.tween(this.shieldFrontSprite).to({alpha: 0.8}, 1500, Phaser.Easing.Linear.None, true, 0, -1, true);
this.addChild(this.shieldFrontSprite);
this.setShield(false);
}
public setShield(shield: boolean) {
this.shieldBackSprite.visible = shield;
this.shieldFrontSprite.visible = shield;
}
onTileHover(): void {
mar.game.add.tween(this).to({isoZ: 45}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.2, y: 1.2}, 200, Phaser.Easing.Linear.None, true);
this.cubotSprite.tint = config.cubotHoverTint;
if (this.text !== undefined) {
this.text.visible = true;
}
this.hovered = true;
}
onTileExit(): void {
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
if (this.text !== undefined) {
this.text.visible = false;
}
this.hovered = false;
this.cubotSprite.tint = this.getTint();
}
public makeLaserAttack() {
let dX, dY, angle;
switch (this.direction) {
case Direction.NORTH:
angle = 333.4;
break;
case Direction.SOUTH:
angle = 153.4;
break;
case Direction.WEST:
angle = 206.6;
break;
case Direction.EAST:
angle = 26.6;
break;
}
this.laserEmitter.minParticleSpeed.setTo(1000, 1000);
this.laserEmitter.maxParticleSpeed.setTo(1700, 1700);
this.laserEmitter.minAngle = angle;
this.laserEmitter.maxAngle = angle;
this.laserEmitter.maxRotation = 0;
this.laserEmitter.start(true, 1000, null, 3);
}
public getTint(): number {
if (!this.hovered) {
if (this.energy <= config.lowEnergy) {
return config.lowEnergyTint;
} else {
return config.cubotTint;
}
} else {
return config.cubotHoverTint;
}
}
updateObject(json): void {
if (DEBUG) {
console.log("Updating Cubot object")
}
this.action = json.action;
this.energy = json.energy;
this.direction = json.direction;
this.shield = json.shield;
//Update Inventory
this.createInventory([json.heldItem]);
this.heldItem = json.heldItem;
//Update color
this.cubotSprite.tint = this.getTint();
//Update Location
if (!this.isAt(json.x, json.y)) {
//Location changed
if (this.action == Action.WALKING) {
//Walking..
this.tileX = json.x;
this.tileY = json.y;
this.walk();
}
// else if (this.action == Action.JUMPING) {
// //TODO
// }
}
if (this.action == Action.DIGGING) {
switch (this.direction) {
case Direction.NORTH:
this.cubotSprite.animations.play("dig_n", 60);
break;
case Direction.SOUTH:
this.cubotSprite.animations.play("dig_s", 60);
break;
case Direction.EAST:
this.cubotSprite.animations.play("dig_e", 60);
break;
case Direction.WEST:
this.cubotSprite.animations.play("dig_w", 60);
break;
}
} else if (this.action == Action.ATTACKING) {
this.makeLaserAttack()
}
this.updateDirection();
this.updateHologram(json.holoMode, json.holoC, json.holo, json.holoStr);
//Update shield
this.setShield(this.shield > 0)
}
private updateHologram(holoMode: HologramMode, holoColor: number, holoValue: number, holoStr: string): void {
let fillColor: string = (holoColor & 0xFFFFFF).toString(16);
fillColor = "#" + ("000000".substr(fillColor.length) + fillColor);
//Create hologram if not exist, set style
if (this.hologram == undefined) {
this.hologram = mar.game.make.text(0, 32, "");
this.hologram.anchor.set(0.5, 0);
this.addChild(this.hologram);
this.hologram.setStyle(config.holoStyle(fillColor));
} else {
this.hologram.setStyle(config.holoStyle(fillColor));
}
switch (holoMode) {
case HologramMode.CLEARED:
this.hologram.text = "";
break;
case HologramMode.DEC:
this.hologram.text = Number(holoValue).toString();
break;
case HologramMode.HEX:
this.hologram.text = "0x" + ("0000" + Number(holoValue).toString(16).toUpperCase()).slice(-4);
break;
case HologramMode.STRING:
this.hologram.text = holoStr.replace(/[\n|\t]/g, '');
break;
}
}
/**
* Set appropriate frame based on direction
*/
public updateDirection() {
switch (this.direction) {
case Direction.NORTH:
this.cubotSprite.animations.frameName = "cubot/walk_n/0001";
break;
case Direction.EAST:
this.cubotSprite.animations.frameName = "cubot/walk_e/0001";
break;
case Direction.SOUTH:
this.cubotSprite.animations.frameName = "cubot/walk_s/0001";
break;
case Direction.WEST:
this.cubotSprite.animations.frameName = "cubot/walk_w/0001";
break;
}
}
/**
* Initiate the walk animation. Handles multiple calls of this function even if the previous animations
* were not completed
*/
public walk() {
let self = this;
let walkAnimation = function (duration) {
//Move the Cubot to desired tile
let tween = mar.game.add.tween(self).to({isoX: Util.getIsoX(self.tileX), isoY: Util.getIsoY(self.tileY)},
duration, Phaser.Easing.Linear.None, true);
//Play appropriate animation
switch (self.direction) {
case Direction.NORTH:
self.cubotSprite.animations.play("walk_n", 60, true);
break;
case Direction.SOUTH:
self.cubotSprite.animations.play("walk_s", 60, true);
break;
case Direction.EAST:
self.cubotSprite.animations.play("walk_e", 60, true);
break;
case Direction.WEST:
self.cubotSprite.animations.play("walk_w", 60, true);
break;
}
//When moved to destination,
tween.onComplete.add(function () {
self.cubotSprite.animations.stop();
self.updateDirection();
//Resync position
self.isoX = Util.getIsoX(self.tileX);
self.isoY = Util.getIsoY(self.tileY);
self.onTileExit();
//Execute all the queued walk animations at a faster pace
for (let i = 0; i < self.queuedAnimations.length; i++) {
self.queuedAnimations[i](config.walkDuration / 2);
self.queuedAnimations.splice(i, 1)
}
});
};
if (this.cubotSprite.animations.currentAnim.isPlaying) {
//Queue up the animation
this.queuedAnimations.push(walkAnimation);
} else {
walkAnimation(config.walkDuration);
}
}
/**
* Create the username text that will appear on top of the Cubot. Text will have alternate
* color when current username matches. This function is also responsable for setting the
* reduced transparency of other Cubots
*/
public createUsername() {
let username = mar.game.make.text(0, -24, this.username, {
fontSize: 22,
fill: config.textFill,
stroke: config.textStroke,
strokeThickness: 2,
font: "fixedsys"
});
username.alpha = 0.85;
username.anchor.set(0.5, 0);
//Color own username
if (this.username === mar.client.username) {
username.tint = config.selfUsernameColor;
} else {
this.alpha = config.otherCubotAlpha;
}
this.addChild(username);
}
public createInventory(items: number[]): void {
//Remove old inventory
if (this.inventory != undefined) {
this.inventory.destroy();
}
let inventory = mar.game.make.group();
switch (items.length) {
case 0:
this.inventory = inventory;
this.addChild(inventory);
break;
case 1:
if (items[0] !== 0) {
let shadow = mar.game.make.sprite(0, 0, "sheet", "inventory/inv1x1");
shadow.anchor.set(0.5, 0.1);
shadow.alpha = 0.5;
let item = mar.game.make.sprite(0, 0, "sheet", "inventory/item");
item.anchor.set(0.5, 0.1);
item.tint = Util.itemColor(items[0]);
inventory.addChild(shadow);
inventory.addChild(item);
}
this.inventory = inventory;
this.addChild(inventory);
break;
}
}
}
class HarvesterNPC extends Cubot {
constructor(json) {
super(json);
//Overwrite Cubot's animations
this.cubotSprite.animations.add("walk_w", mar.animationFrames.harvester_walk_w);
this.cubotSprite.animations.add("walk_s", mar.animationFrames.harvester_walk_s);
this.cubotSprite.animations.add("walk_e", mar.animationFrames.harvester_walk_e);
this.cubotSprite.animations.add("walk_n", mar.animationFrames.harvester_walk_n);
this.updateDirection();
this.setText("Harvester NPC");
this.text.visible = false;
}
/**
* Needs to be overridden because Cubot() calls getTint() when initialised
*/
public getTint() {
return config.cubotTint;
}
public updateDirection() {
switch (this.direction) {
case Direction.NORTH:
this.cubotSprite.animations.frameName = "harvester/walk_n/0001";
break;
case Direction.EAST:
this.cubotSprite.animations.frameName = "harvester/walk_e/0001";
break;
case Direction.SOUTH:
this.cubotSprite.animations.frameName = "harvester/walk_s/0001";
break;
case Direction.WEST:
this.cubotSprite.animations.frameName = "harvester/walk_w/0001";
break;
}
}
updateObject(json) {
if (DEBUG) {
console.log("Updating Harvester NPC object")
}
this.action = json.action;
this.direction = json.direction;
//Update Location
if (!this.isAt(json.x, json.y)) {
//Location changed
if (this.action == Action.WALKING) {
//Walking..
this.tileX = json.x;
this.tileY = json.y;
this.walk();
}
}
//Update Direction
this.updateDirection();
}
public createUsername() {
//No-op
}
}
class BiomassBlob extends GameObject {
onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 45}, 200, Phaser.Easing.Quadratic.InOut, true);
this.tint = config.biomassHoverTint;
mar.game.add.tween(this.scale).to({x: 1.2, y: 1.2}, 200, Phaser.Easing.Linear.None, true);
this.text.visible = true;
}
onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.biomassTint;
this.text.visible = false;
}
updateObject(json) {
if (DEBUG) {
console.log("Updating Biomass object")
}
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 10, "sheet", 1);
if (DEBUG) {
console.log("Creating Biomass object")
}
this.anchor.set(0.5, 0);
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
this.tint = config.biomassTint;
this.animations.add("idle", mar.animationFrames.biomassIdle);
this.animations.play("idle", 45, true);
this.setText("Biomass");
this.text.visible = false;
}
}
class Factory extends GameObject {
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 25}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotHoverTint;
this.text.visible = true;
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotTint;
this.text.visible = false;
}
public updateObject(json) {
//No op
}
public isAt(x: number, y: number) {
//Factory is 2x2
return (this.tileX === x || this.tileX + 1 === x) && (this.tileY + 1 === y || this.tileY === y);
};
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/factory");
this.anchor.set(0.5, .25);
this.setText("Factory");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
}
}
class RadioTower extends GameObject {
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 25}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotHoverTint;
this.text.visible = true;
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotTint;
this.text.visible = false;
}
public updateObject(json) {
//No op
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/RadioTower");
this.anchor.set(0.48, 0.65);
this.setText("Radio Tower");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
}
}
class VaultDoor extends GameObject {
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotHoverTint;
this.text.visible = true;
document.body.style.cursor = 'pointer';
document.body.setAttribute("title", "Click to visit Vault")
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 0}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotTint;
this.text.visible = false;
document.body.style.cursor = 'default';
document.body.setAttribute("title", "")
}
public updateObject(json) {
//No op
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 0, "sheet", "objects/VaultDoor1");
this.anchor.set(0.55, 0.55);
this.inputEnabled = true;
this.events.onInputDown.add(function (self: VaultDoor) {
Debug.goToHex("7FFF", "7FFF", "v" + self.id + "-");
document.body.style.cursor = 'default';
document.body.setAttribute("title", "")
}, this);
this.setText("Vault");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
//Vault door screen animation
let screen = mar.game.make.sprite(-76, 4, "sheet", "objects/VaultDoorScreen/1");
screen.animations.add("idle", mar.animationFrames.vaultDoorScreen);
screen.animations.play("idle", 11, true);
this.addChild(screen);
}
}
class ElectricBox extends GameObject {
private sparkEmitter: Phaser.Particles.Arcade.Emitter;
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 25}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotHoverTint;
this.text.visible = true;
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotTint;
this.text.visible = false;
}
public makeSparks(self: ElectricBox) {
self.sparkEmitter.start(true, 450, null, 10);
window.setTimeout(self.makeSparks, mar.game.rnd.between(5000, 25000), self)
}
public updateObject(json) {
//No op
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/ElectricBox");
this.anchor.set(0.5, 0.3);
this.setText("Electric Box");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
//Spark particles
this.sparkEmitter = mar.game.make.emitter(0, 0, 10);
this.addChild(this.sparkEmitter);
this.sparkEmitter.makeParticles("sheet", ["effects/spark"], 10);
this.sparkEmitter.minParticleSpeed.setTo(-250, -200);
this.sparkEmitter.maxParticleSpeed.setTo(250, 0);
this.sparkEmitter.gravity = new Phaser.Point(0, 500);
window.setTimeout(this.makeSparks, mar.game.rnd.between(5000, 25000), this)
}
}
class Portal extends GameObject {
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 25}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.cubotHoverTint;
this.text.visible = true;
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
this.tint = config.portalTint;
this.text.visible = false;
}
public updateObject(json) {
//No op
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/Portal");
this.anchor.set(0.5, 0.3);
this.tint = config.portalTint;
this.setText("Portal");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;
}
}

View File

@ -0,0 +1,346 @@
class MarGame {
isoGroup: Phaser.Group;
textGroup: Phaser.Group;
hudGroup: Phaser.Group;
game: Phaser.Game;
cursorPos: Phaser.Plugin.Isometric.Point3 = new Phaser.Plugin.Isometric.Point3();
bootState;
client: GameClient;
debugMessages: DebugMessage[] = [];
world: World;
animationFrames: any = {};
tileIndicator: TileIndicator;
constructor() {
let self = this;
this.game = new Phaser.Game(RENDERER_WIDTH, RENDERER_HEIGHT, Phaser.AUTO, 'game', null, true, false);
this.bootState = {
preload: function () {
if (DEBUG) {
console.log("[MAR] Loading sprites.png as JSONHash");
}
this.game.load.atlasJSONHash("sheet", "./images/sprites.png", "./images/sprites.json").onLoadComplete.add(function () {
self.game.time.advancedTiming = true;
//Add and enable the isometric plug-in.
if (DEBUG) {
console.log("[MAR] Enabling isometric plugin");
}
self.game.plugins.add(new Phaser.Plugin.Isometric(self.game));
//This is used to set a game canvas-based offset for the 0, 0, 0 isometric coordinate - by default
//this point would be at screen coordinates 0, 0 (top left) which is usually undesirable.
self.game.iso.anchor.setTo(0.5, 0);
//Bounds will be overwritten to fit world when changing world
self.game.world.setBounds(0, 0, 2200, 1100);
//Make camera more or less centered (tested on 1080 screen)
self.game.camera.x = 280;
self.game.camera.y = 90;
self.game.scale.scaleMode = Phaser.ScaleManager.RESIZE;
self.game.scale.pageAlignHorizontally = true;
self.game.scale.pageAlignVertically = true;
self.game.stage.disableVisibilityChange = true;
self.client = new GameClient();
//Grab focus when clicked (For chrome, Opera)
self.game.input.onDown.add(function () {
document.getElementById("game").focus();
if (DEBUG) {
console.log("Grabbed focus of #game");
}
});
self.isoGroup = mar.game.add.group();
self.textGroup = mar.game.add.group();
self.hudGroup = mar.game.add.group();
self.hudGroup.fixedToCamera = true;
});
},
create: function () {
if (DEBUG) {
console.log("[MAR] create");
}
self.initialiseAnimations();
self.initialiseStaticHud();
},
update: function () {
self.game.scale.refresh();
//Update the cursor position.
self.game.iso.unproject(self.game.input.activePointer.position, self.cursorPos);
//Loop through all tiles and test to see if the 3D position from above intersects with the automatically generated IsoSprite tile bounds.
self.isoGroup.forEach(function (tile: Tile) {
if (tile instanceof Tile) {
let inBounds = tile.isoBounds.containsXY(self.cursorPos.x, self.cursorPos.y);
//If it does, do a little animation and tint change.
if (!tile.selected && inBounds) {
tile.selected = true;
tile.onHover();
//Dispatch tile over for objects
self.isoGroup.forEach(function (obj: GameObject) {
if (obj instanceof GameObject && obj.onTileHover != undefined && obj.isAt(tile.tileX, tile.tileY)) {
obj.onTileHover();
}
}, 1);
}
//If not, revert back to how it was.
else if (tile.selected && !inBounds) {
tile.selected = false;
tile.onExit();
//Dispatch tile exit objects
self.isoGroup.forEach(function (obj: GameObject) {
if (obj.onTileExit != undefined && obj.isAt(tile.tileX, tile.tileY)) {
obj.onTileExit();
}
}, 0);
}
}
}, 0);
//Enable dragging the camera
if (this.game.input.activePointer.isDown) {
if (this.game.origDragPoint) {
// move the camera by the amount the mouse has moved since last update
this.game.camera.x += this.game.origDragPoint.x - this.game.input.activePointer.position.x;
this.game.camera.y += this.game.origDragPoint.y - this.game.input.activePointer.position.y;
}
// set new drag origin to current position
this.game.origDragPoint = this.game.input.activePointer.position.clone();
} else {
this.game.origDragPoint = null;
}
self.game.iso.topologicalSort(self.isoGroup);
},
render: function () {
for (let i = 0; i < self.debugMessages.length; i++) {
self.game.debug.text(self.debugMessages[i].getMessage(), self.debugMessages[i].x,
self.debugMessages[i].y)
}
}
};
this.game.state.add('Boot', this.bootState);
this.game.state.start('Boot');
}
public addDebugMessage(debugMsg: DebugMessage) {
this.debugMessages.push(debugMsg)
}
private initialiseAnimations() {
//Walk =-------------------------------------------------------
//East
this.animationFrames.walk_e_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.walk_e_start.push("cubot/walk_e/" + ("0000" + i).slice(-4));
}
this.animationFrames.walk_e = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.walk_e.push("cubot/walk_e/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_e_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.harvester_walk_e_start.push("harvester/walk_e/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_e = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.harvester_walk_e.push("harvester/walk_e/" + ("0000" + i).slice(-4));
}
//North
this.animationFrames.walk_n_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.walk_n_start.push("cubot/walk_n/" + ("0000" + i).slice(-4));
}
this.animationFrames.walk_n = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.walk_n.push("cubot/walk_n/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_n_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.harvester_walk_n_start.push("harvester/walk_n/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_n = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.harvester_walk_n.push("harvester/walk_n/" + ("0000" + i).slice(-4));
}
//South
this.animationFrames.walk_s_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.walk_s_start.push("cubot/walk_s/" + ("0000" + i).slice(-4));
}
this.animationFrames.walk_s = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.walk_s.push("cubot/walk_s/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_s_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.harvester_walk_s_start.push("harvester/walk_s/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_s = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.harvester_walk_s.push("harvester/walk_s/" + ("0000" + i).slice(-4));
}
//West
this.animationFrames.walk_w_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.walk_w_start.push("cubot/walk_w/" + ("0000" + i).slice(-4));
}
this.animationFrames.walk_w = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.walk_w.push("cubot/walk_w/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_w_start = [];
for (let i = 0; i < 10; i++) {
this.animationFrames.harvester_walk_w_start.push("harvester/walk_w/" + ("0000" + i).slice(-4));
}
this.animationFrames.harvester_walk_w = [];
for (let i = 10; i < 30; i++) {
this.animationFrames.harvester_walk_w.push("harvester/walk_w/" + ("0000" + i).slice(-4));
}
//Dig =-------------------------------------------------------
this.animationFrames.dig_e = [];
for (let i = 1; i <= 41; i++) {
this.animationFrames.dig_e.push("cubot/dig_e/" + ("0000" + i).slice(-4));
}
this.animationFrames.dig_n = [];
for (let i = 1; i <= 41; i++) {
this.animationFrames.dig_n.push("cubot/dig_n/" + ("0000" + i).slice(-4));
}
this.animationFrames.dig_s = [];
for (let i = 1; i <= 41; i++) {
this.animationFrames.dig_s.push("cubot/dig_s/" + ("0000" + i).slice(-4));
}
this.animationFrames.dig_w = [];
for (let i = 1; i <= 41; i++) {
this.animationFrames.dig_w.push("cubot/dig_w/" + ("0000" + i).slice(-4));
}
//Biomass =-------------------------------------------------------
this.animationFrames.biomassIdle = [];
for (let i = 1; i < 60; i++) {
this.animationFrames.biomassIdle.push("objects/biomass/idle/" + ("0000" + i).slice(-4));
}
//Vault screen
this.animationFrames.vaultDoorScreen = [];
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/2");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/3");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/4");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/5");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/6");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
this.animationFrames.vaultDoorScreen.push("objects/VaultDoorScreen/1");
}
private initialiseStaticHud() {
//todo fix the compass sprite so the Y axis is facing the other way
//this.game.add.sprite(0, this.game.camera.height - 150, "sheet", "ui/compass", this.hudGroup);
this.addDebugMessage(new WorldIndicator(10, 20));
this.tileIndicator = new TileIndicator(10, 40);
this.addDebugMessage(this.tileIndicator);
}
}
abstract class DebugMessage {
public x: number;
public y: number;
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
abstract getMessage(): string;
}
/**
* Indicates hovered tile
*/
class TileIndicator extends DebugMessage {
public tileType: string;
public tileX: number;
public tileY: number;
getMessage(): string {
if (this.tileType != undefined) {
return this.tileX + ", " + this.tileY + " : " + this.tileType;
} else {
return "";
}
}
}
/**
* Indicates current World
*/
class WorldIndicator extends DebugMessage {
getMessage(): string {
if (mar.world != undefined) {
return "World: " + mar.client.dimension + "(" + Number(mar.client.worldX).toString(16).toUpperCase() + ", " +
Number(mar.client.worldY).toString(16).toUpperCase() + ")";
} else {
return "Loading..."
}
}
}

View File

@ -0,0 +1,458 @@
///<reference path="phaser.d.ts"/>
///<reference path="phaser.plugin.isometric.d.ts"/>
enum Direction {
NORTH,
EAST,
SOUTH,
WEST
}
enum TileType {
PLAIN,
WALL,
IRON,
COPPER,
VAULT_FLOOR,
VAULT_WALL,
FLUID
}
class Tile extends Phaser.Plugin.Isometric.IsoSprite {
/**
* Text displayed on the tile
*/
textSprite: Phaser.Text;
baseTint: number;
tileX: number;
tileY: number;
/**
* Displayed on the screen
*/
tileType: string;
/**
* Based z coordinate of the tile
*/
protected baseZ: number;
public selected: boolean;
protected constructor(x: number, y: number, sprite: string, anchorY: number) {
super(mar.game, Util.getIsoX(x), Util.getIsoY(y), 0, 'sheet', sprite);
this.baseZ = 0; //Base height of the tile
this.tileX = x;
this.tileY = y;
this.anchor.set(0.5, anchorY);
}
/**
* Factory method to create a Tile
*/
public static createTile(type: TileType, x: number, y: number) {
switch (type) {
case TileType.WALL:
return new WallTile(x, y);
case TileType.IRON:
return new IronTile(x, y);
case TileType.COPPER:
return new CopperTile(x, y);
case TileType.VAULT_FLOOR:
return new VaultFloorTile(x, y);
case TileType.VAULT_WALL:
return new VaultWallTile(x, y);
case -1:
return new VoidTile(x, y);
case TileType.FLUID:
return new FluidTile(x, y);
case TileType.PLAIN:
default:
return new PlainTile(x, y);
}
}
public onHover() {
this.tint = config.tileHoverTint;
mar.game.add.tween(this).to({isoZ: this.baseZ + 8}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.tileIndicator.tileX = this.tileX;
mar.tileIndicator.tileY = this.tileY;
mar.tileIndicator.tileType = this.tileType;
}
public onExit() {
this.tint = this.baseTint;
mar.game.add.tween(this).to({isoZ: this.baseZ}, 200, Phaser.Easing.Quadratic.InOut, true);
}
public setText(text: string, fillColor: string): void {
//Remove previous text
if (this.textSprite !== undefined) {
this.textSprite.destroy();
}
this.textSprite = mar.game.make.text(0, 16, text, {
fontSize: 22,
fill: fillColor,
stroke: "#FFFFFF",
strokeThickness: 1,
font: "fixedsys"
});
this.textSprite.alpha = 0.6;
this.textSprite.anchor.set(0.5, 0);
this.addChild(this.textSprite);
}
}
class PlainTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = config.tileTint;
this.tint = this.baseTint;
this.tileType = "plain";
}
}
class WallTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.wallSprite, 0.2);
this.baseTint = config.wallTint;
this.tint = this.baseTint;
this.tileType = "wall";
}
}
class VaultWallTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.wallSprite2, 0.29);
this.baseTint = config.vaultWallTint;
this.tint = this.baseTint;
this.tileType = "vault wall";
}
}
class VaultFloorTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = config.vaultFloorTint;
this.tint = this.baseTint;
this.tileType = "vault floor";
}
}
class VoidTile extends Tile {
public onHover() {
mar.tileIndicator.tileX = this.tileX;
mar.tileIndicator.tileY = this.tileY;
mar.tileIndicator.tileType = this.tileType;
}
public onExit() {
}
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = config.vaultFloorTint;
this.tileType = "void";
this.alpha = 0;
}
}
class FluidTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = 0x0ACED6;
this.tint = this.baseTint;
this.alpha = 0.6;
this.baseZ = -15;
this.isoZ = this.baseZ;
this.tileType = "fluid";
}
}
class IronTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = config.oreTint;
this.tint = this.baseTint;
this.setText("Iron", config.textIron);
this.tileType = "iron";
}
}
class CopperTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = config.oreTint;
this.tint = this.baseTint;
this.setText("Copper", config.textCopper);
this.tileType = "copper";
}
}
class World {
private tiles: Tile[] = [];
private objects: GameObject[] = [];
private northArrow: WorldArrow;
private eastArrow: WorldArrow;
private southArrow: WorldArrow;
private westArrow: WorldArrow;
/**
* Message displayed in the middle of the World
*/
private bigMessage: Phaser.Text;
constructor(terrain, size) {
//Setup World Arrows
this.northArrow = new WorldArrow(528, -20, "ui/arrow_north", Direction.NORTH);
mar.isoGroup.add(this.northArrow);
this.eastArrow = new WorldArrow(1115, 587, "ui/arrow_east", Direction.EAST);
mar.isoGroup.add(this.eastArrow);
this.southArrow = new WorldArrow(0, 0, "ui/arrow_south", Direction.SOUTH);
mar.isoGroup.add(this.southArrow);
this.westArrow = new WorldArrow(-70, 587, "ui/arrow_west", Direction.WEST);
mar.isoGroup.add(this.westArrow);
//Create tilemap
this.setTerrain(terrain, size);
}
/**
* Load terrain data from array and create Tiles
* @param terrain
* @param size Size of a side of the World
*/
private setTerrain(terrain: number[], size: number) {
if (DEBUG) {
console.log("[MAR] Creating tilemap of size " + size);
}
for (let x = 0; x < size; x++) {
for (let y = 0; y < size; y++) {
let tile: Tile = Tile.createTile(terrain[y * size + x], x, y);
this.tiles.push(tile);
mar.isoGroup.add(tile);
}
}
//Update World arrows location
this.eastArrow.isoX = 72.5 * (size) - 20;
this.eastArrow.isoY = 32 * (size + 2);
this.southArrow.isoX = 32 * (size + 1);
this.southArrow.isoY = 72.5 * (size) + 20;
this.northArrow.isoX = 32 * (size + 1);
this.northArrow.isoY = -20;
this.westArrow.isoX = -70;
this.westArrow.isoY = 32 * (size + 2);
//Update Phaser World size
mar.game.world.width = (size + 2) * 128;
mar.game.world.height = (size + 2) * 64;
}
public setBigMessage(msg: string) {
this.bigMessage = mar.game.add.text(908, 450, msg, {
fontSize: 46,
fill: config.bigMessageFill,
stroke: config.textStroke,
strokeThickness: 2,
font: "fixedsys"
}, mar.textGroup);
}
public removeBigMessage() {
if (this.bigMessage != undefined) {
this.bigMessage.destroy();
if (DEBUG) {
console.log("[MAR] Destroyed big message")
}
}
}
/**
* Get object by id
*/
private getObject(id: number): GameObject {
for (let i = 0; i < this.objects.length; i++) {
if (this.objects[i].id === id) {
return this.objects[i];
}
}
return null;
}
/**
* Update, create or delete the current objects based on a list received from the server
* @param objects json list of objects
*/
public handleObjectsUpdate(objects: any) {
//Mark objects as not updated
for (let i = 0; i < this.objects.length; i++) {
this.objects[i].updated = false;
}
for (let i = 0; i < objects.length; i++) {
//Update/Create the object
let existingObject = this.getObject(objects[i].i);
if (existingObject !== null) {
//Object already exists
existingObject.updated = true;
existingObject.updateObject(objects[i]);
} else {
//Object is new
let newObj = GameObject.createObject(objects[i]);
if (newObj != null) {
newObj.updated = true;
this.objects.push(newObj);
mar.isoGroup.add(newObj);
} else {
if (DEBUG) {
console.log("Couldn't create object with objType " + objects[i].t)
}
}
}
}
//Delete not updated objects (see above comments)
for (let i = 0; i < this.objects.length; i++) {
if (!this.objects[i].updated) {
//Check if the object we are removing is our controlledUnit, if so, follow it
if (mar.client.username !== "guest") {
if (this.objects[i] instanceof Cubot && (this.objects[i] as Cubot).username === mar.client.username) {
mar.client.findMyRobot();
if (DEBUG) {
console.log("[MAR] Following Cubot " + mar.client.username)
}
}
}
this.objects[i].destroy();
this.objects.splice(i, 1);
}
}
}
/**
* Delete current ojects and tiles and replace them with provided terrain
* @param terrain
* @param size
*/
public updateTerrain(terrain: number[], size: number) {
for (let i = 0; i < this.objects.length; i++) {
this.objects[i].destroy();
}
for (let i = 0; i < this.tiles.length; i++) {
this.tiles[i].destroy();
}
this.objects = [];
this.tiles = [];
this.setTerrain(terrain, size);
mar.game.iso.topologicalSort(mar.isoGroup);
}
}
/**
* Represents a 'button' sprite that changes world in a direction
*/
class WorldArrow extends Phaser.Plugin.Isometric.IsoSprite {
private hoverText: Phaser.Text;
constructor(x: number, y: number, frame: string, direction: Direction) {
super(mar.game, x, y, 10, "sheet", frame);
let self = this;
this.hoverText = mar.game.make.text(10, 10, Direction[direction], config.arrowTextStyle);
this.addChild(this.hoverText);
this.hoverText.visible = false;
this.hoverText.anchor.set(0, 0);
this.inputEnabled = true;
this.events.onInputDown.add(function () {
let newX = mar.client.worldX + Util.getDeltaX(direction);
let newY = mar.client.worldY + Util.getDeltaY(direction);
//Wrapping coordinates around cyclically
mar.client.worldX = newX % mar.client.maxWidth;
mar.client.worldY = newY % mar.client.maxWidth;
mar.client.requestTerrain();
});
this.events.onInputOver.add(function () {
self.tint = config.arrowHoverTint;
self.hoverText.visible = true;
document.body.style.cursor = "pointer";
});
this.events.onInputOut.add(function () {
self.tint = config.arrowTint;
self.hoverText.visible = false;
document.body.style.cursor = "default";
});
}
}

View File

@ -0,0 +1,224 @@
// Typescript V2.4.1
let RENDERER_WIDTH = document.getElementById("game").clientWidth * window.devicePixelRatio;
let RENDERER_HEIGHT = (window.innerHeight / 1.40) * window.devicePixelRatio;
let DEBUG: boolean = true;
let config = {
portalTint: 0xff43c8,
tileTint: 0xFFFFFF,
wallTint: 0xDDDDDD,
vaultWallTint: 0x3F2D2A,
vaultFloorTint: 0x2B1E1C,
oreTint: 0xF3F3F3,
cubotHoverTint: 0x00FF00,
cubotTint: 0xFFFFFF,
textFill: "#FFFFFF",
textStroke: "#9298a8",
biomassTint: 0x63B85F,
biomassHoverTint: 0x00FF00,
tileHoverTint: 0x00FF00,
itemIron: 0x434341,
textIron: "#434341",
itemCopper: 0xC87D38,
textCopper: "#C87D38",
hologramFill: "#0aced6",
hologramStroke: "#12FFB0",
copperFill: "#C87D38",
plainSprite: "tiles/tile",
wallSprite: "tiles/bigTile",
wallSprite2: "tiles/bigTile2",
walkDuration: 800, //walk animation duration in ms
holoStyle: (fill: string) => {
return {
fontSize: 32,
fill: fill ? fill : config.hologramFill,
stroke: config.hologramStroke,
strokeThickness: 1,
font: "fixedsys"
}
},
kbBufferX: 350, ///Position of the keyboard buffer fill on screen
kbBufferY: 20,
arrowTextStyle: {
fontSize: 32,
fill: "#ffffff",
stroke: "#9298a8",
strokeThickness: 1,
font: "fixedsys"
},
lowEnergy: 100, //Low energy threshold to change color
lowEnergyTint: 0xCC0000,
bigMessageFill: "#ff803d",
arrowTint: 0xFFFFFF,
arrowHoverTint: 0x00FF00,
selfUsernameColor: 0xFB4D0A, //Color of own Cubot's username.
otherCubotAlpha: 0.6,
defaultWorldSize: 16 //Will fallback to this when server does not provide world width
};
class Util {
//todo: find a more elegant way of doing this. Maybe this is related: https://github.com/lewster32/phaser-plugin-isometric/issues/7
static getIsoY(y: number) {
return Util.getIsoX(y);
}
static getIsoX(x: number) {
return (x * 71.5)
}
static getDeltaX(direction: Direction) {
switch (direction) {
case Direction.NORTH:
case Direction.SOUTH:
return 0;
case Direction.EAST:
return 1;
case Direction.WEST:
return -1;
}
}
static getDeltaY(direction: Direction) {
switch (direction) {
case Direction.EAST:
case Direction.WEST:
return 0;
case Direction.NORTH:
return -1;
case Direction.SOUTH:
return 1;
}
}
static itemColor(item) {
switch (item) {
case 1:
return config.biomassTint;
case 3:
return config.itemIron;
case 4:
return config.itemCopper;
}
}
}
class Debug {
public static setTileAt(x, y, newTile) {
mar.client.sendDebugCommand({
t: "debug", command: "setTileAt", x: x, y: y, newTile: newTile,
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension
});
mar.client.requestTerrain(); //Reload terrain
}
public static createWorld(x, y, dimension) {
mar.client.sendDebugCommand({t: "debug", command: "createWorld", worldX: x, worldY: y, dimension: dimension});
window.setTimeout(mar.client.requestTerrain, 250)
}
public static createWorldHex(x, y, dimension) {
mar.client.sendDebugCommand({
t: "debug", command: "createWorld",
worldX: parseInt(x, 16), worldY: parseInt(y, 16), dimension: dimension
});
}
public static goTo(worldX, worldY, dimension) {
mar.client.worldX = worldX;
mar.client.worldY = worldY;
mar.client.dimension = dimension;
mar.client.requestTerrain(); //Reload terrain
}
public static goToHex(worldX, worldY, dimension) {
mar.client.worldX = parseInt(worldX, 16);
mar.client.worldY = parseInt(worldY, 16);
mar.client.dimension = dimension;
mar.client.requestTerrain();
}
public static killAll(x, y) {
mar.client.sendDebugCommand({
t: "debug", command: "killAll", x: x, y: y,
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension
});
}
public static objInfo(x, y) {
mar.client.sendDebugCommand({
t: "debug", command: "objInfo", x: x, y: y,
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension
});
}
public static userInfo(username) {
mar.client.sendDebugCommand({t: "debug", command: "userInfo", username: username});
}
public static moveObj(objectId, x, y) {
mar.client.sendDebugCommand({t: "debug", command: "moveObj", objectId: objectId, x: x, y: y});
mar.client.requestObjects();
}
public static tpObj(objectId, x, y, worldX, worldY, dimension) {
mar.client.sendDebugCommand({
t: "debug", command: "tpObj", objectId: objectId, x: x, y: y, worldX: worldX,
worldY: worldY, dimension: dimension
});
mar.client.requestObjects();
}
public static tpObjHex(objectId, x, y, worldX, worldY, dimension) {
mar.client.sendDebugCommand({
t: "debug", command: "tpObj", objectId: objectId, x: x, y: y, worldX: parseInt(worldX, 16),
worldY: parseInt(worldY, 16), dimension: dimension
});
mar.client.requestObjects();
}
public static spawnObj(data) {
mar.client.sendDebugCommand({
t: "debug", command: "spawnObj", data: data,
worldX: mar.client.worldX, worldY: mar.client.worldY, dimension: mar.client.dimension
});
}
public static comPortMsg(objectId, message) {
mar.client.sendDebugCommand({t: "debug", command: "comPortMsg", objectId: objectId, message: message});
}
public static healObj(objectId, amount) {
mar.client.sendDebugCommand({t: "debug", command: "healObj", objectId: objectId, amount: amount});
}
public static damageObj(objectId, amount) {
mar.client.sendDebugCommand({t: "debug", command: "damageObj", objectId: objectId, amount: amount});
}
public static chargeShield(objectId, amount) {
mar.client.sendDebugCommand({t: "debug", command: "chargeShield", objectId: objectId, amount: amount});
}
public static setEnergy(objectId, amount) {
mar.client.sendDebugCommand({t: "debug", command: "setEnergy", objectId: objectId, amount: amount});
}
}
DEBUG = false; // todo remove
let mar = new MarGame();

1108
Server/src/main/typescript/p2.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

7685
Server/src/main/typescript/phaser.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,398 @@
//debug octreee is missing - Octree
//debug isoSprite is missing - IsoSprite
//gameobjectcreator isoSprite missing - IsoSprite
//gameobjectfactory isoSprite missing - IsoSprite
//debug body missing - Body
//debug bodyInfo missing -Body
declare module Phaser {
interface Physics {
isoArcade: Phaser.Plugin.Isometric.Arcade;
}
}
declare module Phaser.Plugin {
class Isometric extends Phaser.Plugin {
static CLASSIC: number;
static ISOMETRIC: number;
static MILITARY: number;
static VERSION: string;
static UP: number;
static DOWN: number;
static FORWARDX: number;
static FORWARDY: number;
static BACKWARDX: number;
static BACKWARDY: number;
static ISOSPRITE: number;
static ISOARCADE: number;
projector: Phaser.Plugin.Isometric.Projector;
constructor(game: Phaser.Game, parent?: any);
addIsoSprite(x: number, y: number, z: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Plugin.Isometric.IsoSprite;
}
module Isometric {
class Projector {
game: Phaser.Game;
anchor: Phaser.Point;
projectionAngle: number;
project(point3: Phaser.Plugin.Isometric.Point3, out?: Phaser.Point): Phaser.Point;
projectXY(point3: Phaser.Plugin.Isometric.Point3, out?: Phaser.Point): Phaser.Point;
unproject(point: Phaser.Point, out?: Phaser.Plugin.Isometric.Point3, z?: number): Phaser.Plugin.Isometric.Point3;
simpleSort(group: Phaser.Group): void;
topologicalSort(group: Phaser.Group, padding?: number, prop?: string): void;
}
class Point3 {
static add(a: Phaser.Plugin.Isometric.Point3, b: Phaser.Plugin.Isometric.Point3, out?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
static subtract(a: Phaser.Plugin.Isometric.Point3, b: Phaser.Plugin.Isometric.Point3, out?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
static multiply(a: Phaser.Plugin.Isometric.Point3, b: Phaser.Plugin.Isometric.Point3, out?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
static divide(a: Phaser.Plugin.Isometric.Point3, b: Phaser.Plugin.Isometric.Point3, out?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
static equals(a: Phaser.Plugin.Isometric.Point3, b: Phaser.Plugin.Isometric.Point3): boolean;
x: number;
y: number;
z: number;
constructor(x?: number, y?: number, z?: number);
copyFrom(source: any): Phaser.Plugin.Isometric.Point3;
copyto(dest: any): any;
equals(a: any): boolean;
set(x?: number, y?: number, z?: number): Phaser.Plugin.Isometric.Point3;
setTo(x?: number, y?: number, z?: number): Phaser.Plugin.Isometric.Point3;
add(x?: number, y?: number): Phaser.Plugin.Isometric.Point3;
subtract(x?: number, y?: number, z?: number): Phaser.Plugin.Isometric.Point3;
multiply(x?: number, y?: number, z?: number): Phaser.Plugin.Isometric.Point3;
divide(x?: number, y?: number, z?: number): Phaser.Plugin.Isometric.Point3;
containsXY(x?: number, y?: number);
}
class Octree {
maxObjects: number;
maxLevels: number;
level: number;
bounds: any;
objects: any[];
nodes: any[];
constructor(x: number, y: number, z: number, widthX: number, widthY: number, height: number, maxObject?: number, maxLevels?: number, level?: number);
reset(x: number, y: number, z: number, widthX: number, widthY: number, height: number, maxObject?: number, maxLevels?: number, level?: number): void;
populate(group: Phaser.Group): void;
populateHandler(sprite: Phaser.Plugin.Isometric.IsoSprite): void;
populateHandler(sprite: any): void;
split(): void;
insert(body: Phaser.Plugin.Isometric.Body): void;
insert(body: Phaser.Plugin.Isometric.Cube): void;
insert(body: any): void;
getIndex(cube: Phaser.Plugin.Isometric.Cube): number;
getIndex(cube: any): number;
retrieve(source: Phaser.Plugin.Isometric.IsoSprite): any[];
retrieve(source: Phaser.Plugin.Isometric.Cube): any[];
clear(): void;
}
class IsoSprite extends Phaser.Sprite {
snap: number;
isoX: number;
isoY: number;
isoZ: number;
isoPosition: Phaser.Plugin.Isometric.Point3;
isoBounds: Phaser.Plugin.Isometric.Point3;
depth: number;
constructor(game: Phaser.Game, x: number, y: number, z: number, key?: any, frame?: any);
resetIsoBounds(): void;
}
class Cube {
static size(a: Phaser.Plugin.Isometric.Cube, output?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
static clone(a: Phaser.Plugin.Isometric.Cube, output?: Phaser.Plugin.Isometric.Cube): Phaser.Plugin.Isometric.Cube;
static contains(a: Phaser.Plugin.Isometric.Cube, x: number, y: number, z: number): boolean;
static containsXY(a: Phaser.Plugin.Isometric.Cube, x: number, y: number): boolean;
static containsPoint3(a: Phaser.Plugin.Isometric.Cube, point3: Phaser.Plugin.Isometric.Point3): boolean;
static containsCube(a: Phaser.Plugin.Isometric.Cube, b: Phaser.Plugin.Isometric.Cube): boolean;
static intersects(a: Phaser.Plugin.Isometric.Cube, b: Phaser.Plugin.Isometric.Cube): boolean;
x: number;
y: number;
z: number;
widthX: number;
widthY: number;
height: number;
halfWidthX: number;
halfWidthY: number;
halfHeight: number;
bottom: number;
top: number;
backX: number;
backY: number;
frontX: number;
frontY: number;
volume: number;
centerX: number;
centerY: number;
centerZ: number;
randomX: number;
randomY: number;
randomZ: number;
empty: boolean;
constructor(x?: number, y?: number, z?: number, widthX?: number, widthY?: number, height?: number);
setTo(x?: number, y?: number, z?: number, widthX?: number, widthY?: number, height?: number): Phaser.Plugin.Isometric.Cube;
copyFrom(source: any): Phaser.Plugin.Isometric.Cube;
copyTo(dest: any): Phaser.Plugin.Isometric.Cube;
size(output?: Phaser.Plugin.Isometric.Point3): Phaser.Plugin.Isometric.Point3;
contains(x: number, y: number, z: number): boolean;
containsXY(x: number, y: number): boolean;
clone(output?: Phaser.Plugin.Isometric.Cube): Phaser.Plugin.Isometric.Cube;
intersects(b: Phaser.Plugin.Isometric.Cube): boolean;
getCorners(): Phaser.Plugin.Isometric.Point3[];
toString(): string;
}
class Body {
static render(context: any, body: Phaser.Plugin.Isometric.Body, color?: string, filled?: boolean): void;
static renderBodyInfo(debug: any, body: Phaser.Plugin.Isometric.Body): void; //togo debug?
sprite: Phaser.Plugin.Isometric.IsoSprite;
game: Phaser.Game;
type: number;
enable: boolean;
offset: Phaser.Plugin.Isometric.Point3;
position: Phaser.Plugin.Isometric.Point3;
prev: Phaser.Plugin.Isometric.Point3;
allowRotation: boolean;
rotation: number;
preRotation: number;
sourceWidthX: number;
sourceWidthY: number;
sourceHeight: number;
widthX: number;
widthY: number;
height: number;
halfWidthX: number;
halfWidthY: number;
halfHeight: number;
center: Phaser.Plugin.Isometric.Point3;
velocity: Phaser.Plugin.Isometric.Point3;
newVelocity: Phaser.Plugin.Isometric.Point3;
deltaMax: Phaser.Plugin.Isometric.Point3;
acceleration: Phaser.Plugin.Isometric.Point3;
drag: Phaser.Plugin.Isometric.Point3;
allowGravity: boolean;
gravity: Phaser.Plugin.Isometric.Point3;
bounce: Phaser.Plugin.Isometric.Point3;
maxVelocity: Phaser.Plugin.Isometric.Point3;
angularVelocity: number;
angularAcceleration: number;
angularDrag: number;
maxAngular: number;
mass: number;
angle: number;
speed: number;
facing: number;
immovable: boolean;
moves: boolean;
customSeparateX: boolean;
customSeparateY: boolean;
customSeparateZ: boolean;
overlapX: number;
overlapY: number;
overlayZ: number;
embedded: boolean;
collideWorldBounds: boolean;
checkCollision: {
none: boolean;
any: boolean;
up: boolean;
down: boolean;
frontX: number;
frontY: number;
backX: number;
backY: number;
};
touching: {
none: boolean;
up: boolean;
down: boolean;
frontX: number;
frontY: number;
backX: number;
backY: number;
};
wasTouching: {
none: boolean;
up: boolean;
down: boolean;
frontX: number;
frontY: number;
backX: number;
backY: number;
};
blocked: {
up: boolean;
down: boolean;
frontX: number;
frontY: number;
backX: number;
backY: number;
};
phase: number;
skipTree: boolean;
top: number;
frontX: number;
right: number;
frontY: number;
bottom: number;
x: number;
y: number;
z: number;
constructor(sprite: Phaser.Plugin.Isometric.IsoSprite);
destroy(): void;
setSize(widthX: number, widthY: number, height: number, offsetX?: number, offsetY?: number, offsetZ?: number): void;
reset(x: number, y: number, z: number): void;
hitText(x: number, y: number, z: number): boolean;
onFloor(): boolean;
onWall(): boolean;
deltaAbsX(): number;
deltaAbsY(): number;
deltaAbsZ(): number;
deltaX(): number;
deltaY(): number;
deltaZ(): number;
deltaR(): number;
getCorners(): Phaser.Plugin.Isometric.Point3[];
}
class Arcade {
game: Phaser.Game;
gravity: Phaser.Plugin.Isometric.Point3;
bounds: Phaser.Plugin.Isometric.Cube;
checkCollision: {
up: boolean;
down: boolean;
frontX: boolean;
frontY: boolean;
backX: boolean;
backY: boolean;
};
maxObjects: number;
maxLevels: number;
OVERLAP_BIAS: number;
forceXY: boolean;
skipTree: boolean;
useQuadTree: boolean;
quadTree: Phaser.QuadTree;
octree: Phaser.Plugin.Isometric.Octree;
constructor(game: Phaser.Game);
setBounds(x: number, y: number, z: number, widthX: number, widthY: number, height: number): void;
setBoundsToWorld(): void;
enable(object: any, children?: boolean): void;
enableBody(object: any): void;
updateMotion(body: Phaser.Plugin.Isometric.Body): void;
computeVelocity(axis: number, body: Phaser.Plugin.Isometric.Body, velocity: number, acceleration: number, drag: number, max?: number): number;
overlap(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
collide(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
intersects(body1: Phaser.Plugin.Isometric.Body): boolean;
distanceBetween(source: any, target: any): number;
distanceToXY(displayObject: any, x: number, y: number): number;
distanceToXYZ(displayObject: any, x: number, y: number, z: number): number;
}
}
}

1060
Server/src/main/typescript/pixi.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"outFile": "../resources/static/js/mar.js",
"removeComments": true
},
"exclude": [
"node_modules"
],
"files": [
"phaser.d.ts",
"phaser.plugin.isometric.d.ts",
"MarGame.ts",
"mar.ts",
"GameClient.ts",
"GameObject.ts",
"World.ts",
"Console.ts"
]
}

46
pom.xml
View File

@ -7,7 +7,7 @@
<groupId>net.simon987.server</groupId>
<artifactId>server_root</artifactId>
<version>1.4a</version>
<packaging>pom</packaging>
<packaging>pom</packaging>
<build>
@ -22,30 +22,30 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<outputDirectory>../target/plugins</outputDirectory>
<archive>
<manifest>
<addClasspath>false</addClasspath>
<mainClass>net.simon987.server.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<outputDirectory>../target/plugins</outputDirectory>
<archive>
<manifest>
<addClasspath>false</addClasspath>
<mainClass>net.simon987.server.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>Server</module>
<module>Plugin Plant</module>
<module>Plugin NPC</module>
<module>Plugin Misc HW</module>
<module>Plugin Cubot</module>
<module>Plugin Radioactive Cloud</module>
</modules>
<modules>
<module>Server</module>
<module>Plugin Plant</module>
<module>Plugin NPC</module>
<module>Plugin Misc HW</module>
<module>Plugin Cubot</module>
<module>Plugin Radioactive Cloud</module>
</modules>
<properties>
<!-- explicitly set build encoding so not altered by build platform defaults -->