Finish features for easy mode in services page + start adding actions to services page
|
|
@ -13,4 +13,5 @@ README.md
|
|||
SECURITY.md
|
||||
src/ui/app/templates/*
|
||||
src/common/core/*/ui/*
|
||||
src/ui/app/static/libs/*
|
||||
examples/
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ from re import match
|
|||
from threading import Thread
|
||||
from time import time
|
||||
from typing import Dict, List
|
||||
from flask import Blueprint, Response, redirect, render_template, request, url_for
|
||||
from flask import Blueprint, redirect, render_template, request, url_for
|
||||
from flask_login import login_required
|
||||
|
||||
from app.dependencies import BW_CONFIG, DATA, DB
|
||||
|
||||
from app.routes.utils import handle_error, manage_bunkerweb, verify_data_in_form, wait_applying
|
||||
from app.routes.utils import CUSTOM_CONF_RX, handle_error, verify_data_in_form, wait_applying
|
||||
|
||||
services = Blueprint("services", __name__)
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ def services_service_page(service: str):
|
|||
service_exists = service in services
|
||||
|
||||
if service != "new" and not service_exists:
|
||||
return Response("Service not found", status=404)
|
||||
return redirect(url_for("services.services_page"))
|
||||
|
||||
if request.method == "POST":
|
||||
if DB.readonly:
|
||||
|
|
@ -187,32 +187,94 @@ def services_service_page(service: str):
|
|||
mode = request.args.get("mode", "easy")
|
||||
is_draft = variables.pop("IS_DRAFT", "no") == "yes"
|
||||
|
||||
def update_service(service: str, variables: Dict[str, str], is_draft: bool, mode: str): # TODO: handle easy mode
|
||||
def update_service(service: str, variables: Dict[str, str], is_draft: bool, mode: str):
|
||||
wait_applying()
|
||||
|
||||
# Edit check fields and remove already existing ones
|
||||
if service != "new":
|
||||
config = DB.get_config(methods=True, with_drafts=True, filtered_settings=list(variables.keys()), service=service)
|
||||
db_config = DB.get_config(methods=True, with_drafts=True, service=service)
|
||||
else:
|
||||
config = DB.get_config(global_only=True, methods=True, filtered_settings=list(variables.keys()))
|
||||
was_draft = config.get("IS_DRAFT", {"value": "no"})["value"] == "yes"
|
||||
db_config = DB.get_config(global_only=True, methods=True, filtered_settings=list(variables.keys()))
|
||||
|
||||
was_draft = db_config.get("IS_DRAFT", {"value": "no"})["value"] == "yes"
|
||||
|
||||
old_server_name = variables.pop("OLD_SERVER_NAME", "")
|
||||
ignored_multiples = set()
|
||||
db_custom_configs = {}
|
||||
new_configs = set()
|
||||
configs_changed = False
|
||||
|
||||
if mode == "easy":
|
||||
db_templates = DB.get_templates()
|
||||
db_custom_configs = DB.get_custom_configs(as_dict=True)
|
||||
|
||||
# Edit check fields and remove already existing ones
|
||||
if mode != "easy":
|
||||
for variable, value in variables.copy().items():
|
||||
if (mode == "raw" or variable != "SERVER_NAME") and value == config.get(variable, {"value": None})["value"]:
|
||||
conf_match = CUSTOM_CONF_RX.match(variable)
|
||||
if conf_match:
|
||||
del variables[variable]
|
||||
key = f"{conf_match['type'].lower()}_{conf_match['name']}"
|
||||
if value == db_templates.get(f"{key}.conf"):
|
||||
if db_custom_configs.pop(f"{service}_{key}", None):
|
||||
configs_changed = True
|
||||
continue
|
||||
value = value.replace("\r\n", "\n").strip().encode("utf-8")
|
||||
|
||||
new_configs.add(key)
|
||||
db_custom_config = db_custom_configs.get(f"{service}_{key}", {"data": None, "method": "ui"})
|
||||
|
||||
if db_custom_config["method"] != "ui" and db_custom_config["template"] != variables.get("USE_TEMPLATE", ""):
|
||||
DATA["TO_FLASH"].append(
|
||||
{"content": f"The template Custom config {key} cannot be edited because it has not been created with the UI.", "type": "error"}
|
||||
)
|
||||
continue
|
||||
elif value == db_custom_config["data"].strip():
|
||||
continue
|
||||
|
||||
configs_changed = True
|
||||
db_custom_configs[f"{service}_{key}"] = {
|
||||
"service_id": variables.get("SERVER_NAME", old_server_name).split(" ")[0],
|
||||
"type": conf_match["type"].lower(),
|
||||
"name": conf_match["name"],
|
||||
"data": value,
|
||||
"method": "ui",
|
||||
}
|
||||
|
||||
for db_custom_config, data in db_custom_configs.copy().items():
|
||||
if data["method"] == "default" and data["template"]:
|
||||
del db_custom_configs[db_custom_config]
|
||||
continue
|
||||
|
||||
if db_custom_config.startswith(f"{service}_") and db_custom_config.replace(f"{service}_", "", 1) not in new_configs:
|
||||
configs_changed = True
|
||||
del db_custom_configs[db_custom_config]
|
||||
continue
|
||||
db_custom_configs[db_custom_config] = {
|
||||
"service_id": data["service_id"],
|
||||
"type": data["type"],
|
||||
"name": data["name"],
|
||||
"data": data["data"],
|
||||
"method": data["method"],
|
||||
}
|
||||
if "checksum" in data:
|
||||
db_custom_configs[db_custom_config]["checksum"] = data["checksum"]
|
||||
|
||||
if mode != "easy" or service != "new":
|
||||
# Remove already existing fields
|
||||
for variable, value in variables.copy().items():
|
||||
if (mode != "advanced" or variable != "SERVER_NAME") and value == db_config.get(variable, {"value": None})["value"]:
|
||||
if match(r"^.+_\d+$", variable):
|
||||
ignored_multiples.add(variable)
|
||||
del variables[variable]
|
||||
|
||||
variables = BW_CONFIG.check_variables(variables, config, ignored_multiples=ignored_multiples, new=service == "new", threaded=True)
|
||||
variables = BW_CONFIG.check_variables(variables, db_config, ignored_multiples=ignored_multiples, new=service == "new", threaded=True)
|
||||
|
||||
if service != "new" and was_draft == is_draft and not variables:
|
||||
content = f"The service {service} was not edited because no values were changed."
|
||||
DATA["TO_FLASH"].append({"content": content, "type": "warning"})
|
||||
if service != "new" and was_draft == is_draft and not variables and not configs_changed:
|
||||
DATA["TO_FLASH"].append(
|
||||
{
|
||||
"content": f"The service {service} was not edited because no values{' or custom configs' if mode == 'easy' else ''} were changed.",
|
||||
"type": "warning",
|
||||
}
|
||||
)
|
||||
DATA.update({"RELOADING": False, "CONFIG_CHANGED": False})
|
||||
return
|
||||
|
||||
|
|
@ -223,23 +285,40 @@ def services_service_page(service: str):
|
|||
return
|
||||
variables["SERVER_NAME"] = old_server_name
|
||||
|
||||
operation = None
|
||||
error = None
|
||||
|
||||
if new_configs or configs_changed:
|
||||
error = DB.save_custom_configs(db_custom_configs.values(), "ui", changed=service != "new" and (was_draft != is_draft or not is_draft))
|
||||
if error:
|
||||
DATA["TO_FLASH"].append({"content": f"An error occurred while saving the custom configs: {error}", "type": "error"})
|
||||
|
||||
if service == "new":
|
||||
old_server_name = variables["SERVER_NAME"]
|
||||
operation, error = BW_CONFIG.new_service(variables, is_draft=is_draft)
|
||||
else:
|
||||
operation, error = BW_CONFIG.edit_service(old_server_name, variables, check_changes=(was_draft != is_draft or not is_draft), is_draft=is_draft)
|
||||
|
||||
manage_bunkerweb(
|
||||
"services",
|
||||
variables,
|
||||
old_server_name,
|
||||
operation="edit" if service != "new" else "new",
|
||||
is_draft=is_draft,
|
||||
was_draft=was_draft,
|
||||
threaded=True,
|
||||
)
|
||||
if operation.endswith("already exists."):
|
||||
DATA["TO_FLASH"].append({"content": operation, "type": "warning"})
|
||||
operation = None
|
||||
elif not error:
|
||||
operation = f"Configuration successfully {'created' if service == 'new' else 'saved'} for service {variables['SERVER_NAME'].split(' ')[0]}, the Scheduler will be in charge of applying the changes."
|
||||
|
||||
if operation:
|
||||
if operation.startswith(("Can't", "The database is read-only")):
|
||||
DATA["TO_FLASH"].append({"content": operation, "type": "error"})
|
||||
else:
|
||||
DATA["TO_FLASH"].append({"content": operation, "type": "success"})
|
||||
|
||||
DATA["RELOADING"] = False
|
||||
|
||||
DATA.update({"RELOADING": True, "LAST_RELOAD": time(), "CONFIG_CHANGED": True})
|
||||
Thread(target=update_service, args=(service, variables, is_draft, mode)).start()
|
||||
|
||||
if service == "new":
|
||||
if "SERVER_NAME" not in variables:
|
||||
return redirect(url_for("loading", next=url_for("services.services_page")))
|
||||
service = variables["SERVER_NAME"].split(" ")[0]
|
||||
|
||||
arguments = {}
|
||||
|
|
@ -264,35 +343,24 @@ def services_service_page(service: str):
|
|||
search_type = request.args.get("type", "all")
|
||||
template = request.args.get("template", "high")
|
||||
db_templates = DB.get_templates()
|
||||
db_custom_configs = DB.get_custom_configs(as_dict=True)
|
||||
clone = None
|
||||
if service == "new":
|
||||
clone = request.args.get("clone", "")
|
||||
if clone:
|
||||
db_config = DB.get_config(methods=True, with_drafts=True, service=clone)
|
||||
db_config["SERVER_NAME"]["value"] = ""
|
||||
return render_template(
|
||||
"service_settings.html",
|
||||
config=db_config,
|
||||
templates=db_templates,
|
||||
mode=mode,
|
||||
type=search_type,
|
||||
current_template=template,
|
||||
)
|
||||
else:
|
||||
db_config = DB.get_config(global_only=True, methods=True)
|
||||
else:
|
||||
db_config = DB.get_config(methods=True, with_drafts=True, service=service)
|
||||
|
||||
db_config = DB.get_config(global_only=True, methods=True)
|
||||
return render_template(
|
||||
"service_settings.html",
|
||||
config=db_config,
|
||||
templates=db_templates,
|
||||
mode=mode,
|
||||
type=search_type,
|
||||
current_template=template,
|
||||
)
|
||||
|
||||
db_config = DB.get_config(methods=True, with_drafts=True, service=service)
|
||||
return render_template(
|
||||
"service_settings.html",
|
||||
config=db_config,
|
||||
templates=db_templates,
|
||||
configs=db_custom_configs,
|
||||
clone=clone,
|
||||
mode=mode,
|
||||
type=search_type,
|
||||
current_template=template,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ LOG_RX = re_compile(r"^(?P<date>\d+/\d+/\d+\s\d+:\d+:\d+)\s\[(?P<level>[a-z]+)\]
|
|||
REVERSE_PROXY_PATH = re_compile(r"^(?P<host>https?://.{1,255}(:((6553[0-5])|(655[0-2]\d)|(65[0-4]\d{2})|(6[0-4]\d{3})|([1-5]\d{4})|([0-5]{0,5})|(\d{1,4})))?)$")
|
||||
PLUGIN_KEYS = ["id", "name", "description", "version", "stream", "settings"]
|
||||
PLUGIN_ID_RX = re_compile(r"^[\w_-]{1,64}$")
|
||||
CUSTOM_CONF_RX = re_compile(
|
||||
r"^CUSTOM_CONF_(?P<type>HTTP|SERVER_STREAM|STREAM|DEFAULT_SERVER_HTTP|SERVER_HTTP|MODSEC_CRS|MODSEC|CRS_PLUGINS_BEFORE|CRS_PLUGINS_AFTER)_(?P<name>.+)$"
|
||||
)
|
||||
|
||||
|
||||
def wait_applying():
|
||||
|
|
@ -50,9 +53,6 @@ def manage_bunkerweb(method: str, *args, operation: str = "reloads", is_draft: b
|
|||
error = 0
|
||||
DATA.load_from_file()
|
||||
|
||||
if "TO_FLASH" not in DATA:
|
||||
DATA["TO_FLASH"] = []
|
||||
|
||||
if method == "services":
|
||||
if operation == "new":
|
||||
operation, error = BW_CONFIG.new_service(args[0], is_draft=is_draft)
|
||||
|
|
|
|||
|
|
@ -461,3 +461,151 @@ a.badge:hover {
|
|||
.template-steps-container .breadcrumb-item + .breadcrumb-item::before {
|
||||
padding: 0 1rem 0 1rem;
|
||||
}
|
||||
|
||||
.h-vh-40 {
|
||||
height: 40vh;
|
||||
}
|
||||
|
||||
/* Base styles for the ModSecurity mode */
|
||||
.ace-modsecurity .ace_editor {
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Comments */
|
||||
.ace-modsecurity .ace_comment {
|
||||
color: #6a9955; /* Green color for comments */
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Strings */
|
||||
.ace-modsecurity .ace_string {
|
||||
color: #ce9178; /* Orange color for strings */
|
||||
}
|
||||
|
||||
/* Keywords */
|
||||
.ace-modsecurity .ace_keyword {
|
||||
color: #569cd6; /* Blue color for keywords */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Constants (numbers, IP addresses) */
|
||||
.ace-modsecurity .ace_constant {
|
||||
color: #b5cea8; /* Light green color for constants */
|
||||
}
|
||||
|
||||
/* Variables */
|
||||
.ace-modsecurity .ace_variable {
|
||||
color: #9cdcfe; /* Light blue color for variables */
|
||||
}
|
||||
|
||||
/* Operators */
|
||||
.ace-modsecurity .ace_keyword.ace_operator {
|
||||
color: #c586c0; /* Purple color for operators */
|
||||
}
|
||||
|
||||
/* Functions (actions) */
|
||||
.ace-modsecurity .ace_support.ace_function {
|
||||
color: #dcdcaa; /* Yellow color for functions */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Invalid or illegal syntax */
|
||||
.ace-modsecurity .ace_invalid {
|
||||
color: #ffffff;
|
||||
background-color: #e51400; /* Red background for errors */
|
||||
}
|
||||
|
||||
/* Text */
|
||||
.ace-modsecurity .ace_text {
|
||||
color: #d4d4d4; /* Default text color */
|
||||
}
|
||||
|
||||
/* Specific token styles based on the highlight rules */
|
||||
|
||||
/* ModSecurity directives */
|
||||
.ace-modsecurity .ace_keyword\.headers\.modsecurity\.directive,
|
||||
.ace-modsecurity .ace_keyword\.headers\.modsecurity\.directive\.marker {
|
||||
color: #569cd6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ModSecurity variables */
|
||||
.ace-modsecurity .ace_variable\.parameter\.modsecurity,
|
||||
.ace-modsecurity .ace_keyword\.macro\.modsecurity {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
/* ModSecurity actions */
|
||||
.ace-modsecurity .ace_keyword\.operator\.modsecurity\.action,
|
||||
.ace-modsecurity .ace_keyword\.operator\.modsecurity\.action\.ctl,
|
||||
.ace-modsecurity .ace_keyword\.operator\.modsecurity\.action\.phase,
|
||||
.ace-modsecurity .ace_keyword\.operator\.modsecurity\.action\.severity {
|
||||
color: #c586c0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ModSecurity action parameters */
|
||||
.ace-modsecurity .ace_string\.modsecurity\.action_parameter,
|
||||
.ace-modsecurity .ace_constant\.numeric\.modsecurity\.action\.phase_name,
|
||||
.ace-modsecurity .ace_constant\.numeric\.modsecurity\.action\.severity_name,
|
||||
.ace-modsecurity .ace_constant\.numeric\.modsecurity\.action\.ctl\.parameter,
|
||||
.ace-modsecurity .ace_constant\.numeric\.modsecurity\.action\.transform_name {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
/* Disruptive actions */
|
||||
.ace-modsecurity
|
||||
.ace_entity\.name\.function\.modsecurity\.action\.disruptive_pass {
|
||||
color: #d16969; /* Light red color for disruptive actions */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Regular expressions and strings */
|
||||
.ace-modsecurity .ace_string\.regexp\.modsecurity,
|
||||
.ace-modsecurity .ace_string\.unquoted\.modsecurity,
|
||||
.ace-modsecurity .ace_string\.quoted\.modsecurity {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
/* Operators */
|
||||
.ace-modsecurity .ace_keyword\.control\.modsecurity {
|
||||
color: #c586c0;
|
||||
}
|
||||
|
||||
/* IP addresses */
|
||||
.ace-modsecurity .ace_constant\.other\.modsecurity\.ip {
|
||||
color: #b5cea8;
|
||||
}
|
||||
|
||||
/* Numbers */
|
||||
.ace-modsecurity .ace_constant\.numeric\.modsecurity {
|
||||
color: #b5cea8;
|
||||
}
|
||||
|
||||
/* Invalid syntax */
|
||||
.ace-modsecurity .ace_invalid\.illegal\.modsecurity {
|
||||
color: #ffffff;
|
||||
background-color: #e51400;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Punctuation */
|
||||
.ace-modsecurity .ace_punctuation\.definition\.tag\.apacheconf,
|
||||
.ace-modsecurity .ace_punctuation\.colon\.modsecurity,
|
||||
.ace-modsecurity .ace_punctuation\.equals\.modsecurity {
|
||||
color: #d4d4d4;
|
||||
}
|
||||
|
||||
/* Apache configuration tags */
|
||||
.ace-modsecurity .ace_entity\.tag\.apacheconf {
|
||||
color: #569cd6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Comments in Apache configuration */
|
||||
.ace-modsecurity .ace_punctuation\.definition\.comment\.apacheconf,
|
||||
.ace-modsecurity .ace_comment\.line\.hash\.ini {
|
||||
color: #6a9955;
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
|
|||
223
src/ui/app/static/js/mode-modsecurity.js
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
ace.define(
|
||||
"ace/mode/modsecurity_highlight_rules",
|
||||
[
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"ace/lib/oop",
|
||||
"ace/mode/text_highlight_rules",
|
||||
],
|
||||
function (acequire, exports, module) {
|
||||
"use strict";
|
||||
var oop = acequire("ace/lib/oop");
|
||||
var TextHighlightRules = acequire(
|
||||
"ace/mode/text_highlight_rules",
|
||||
).TextHighlightRules;
|
||||
|
||||
var ModSecurityHighlightRules = function () {
|
||||
// Define all regex patterns from the JSON object
|
||||
this.$rules = {
|
||||
start: [
|
||||
// Comment line starting with #
|
||||
{
|
||||
token: "comment.line.hash.ini",
|
||||
regex: /^(?:\s)*(#).*$\n?/,
|
||||
},
|
||||
// SecMarker directive
|
||||
{
|
||||
token: ["keyword.headers.modsecurity.directive.marker", "text"],
|
||||
regex:
|
||||
/^\s*(SecMarker)\s+("(?:[\w:\.\-_/]+)"|(?:[\w:\.\-_/]+)|'(?:[\w:\.\-_/]+)')\s*$/,
|
||||
},
|
||||
// ModSecurity directives
|
||||
{
|
||||
token: "keyword.headers.modsecurity.directive",
|
||||
regex:
|
||||
/^\s*(?:SecAction|SecArgumentSeparator|SecAuditEngine|SecAuditLog|SecAuditLog2|SecAuditLogDirMode|SecAuditLogFormat|SecAuditLogFileMode|SecAuditLogParts|SecAuditLogRelevantStatus|SecAuditLogStorageDir|SecAuditLogType|SecCacheTransformations|SecChrootDir|SecCollectionTimeout|SecComponentSignature|SecConnEngine|SecContentInjection|SecCookieFormat|SecCookieV0Separator|SecDataDir|SecDebugLog|SecDebugLogLevel|SecDefaultAction|SecDisableBackendCompression|SecHashEngine|SecHashKey|SecHashParam|SecHashMethodRx|SecHashMethodPm|SecGeoLookupDb|SecGsbLookupDb|SecGuardianLog|SecHttpBlKey|SecInterceptOnError|SecMarker|SecPcreMatchLimit|SecPcreMatchLimitRecursion|SecPdfProtect|SecPdfProtectMethod|SecPdfProtectSecret|SecPdfProtectTimeout|SecPdfProtectTokenName|SecReadStateLimit|SecConnReadStateLimit|SecSensorId|SecWriteStateLimit|SecConnWriteStateLimit|SecRemoteRules|SecRemoteRulesFailAction|SecRequestBodyAccess|SecRequestBodyInMemoryLimit|SecRequestBodyLimit|SecRequestBodyNoFilesLimit|SecRequestBodyLimitAction|SecResponseBodyLimit|SecResponseBodyLimitAction|SecResponseBodyMimeType|SecResponseBodyMimeTypesClear|SecResponseBodyAccess|SecRule|SecRuleInheritance|SecRuleEngine|SecRulePerfTime|SecRuleRemoveById|SecRuleRemoveByMsg|SecRuleRemoveByTag|SecRuleScript|SecRuleUpdateActionById|SecRuleUpdateTargetById|SecRuleUpdateTargetByMsg|SecRuleUpdateTargetByTag|SecServerSignature|SecStatusEngine|SecStreamInBodyInspection|SecStreamOutBodyInspection|SecTmpDir|SecUnicodeMapFile|SecUnicodeCodePage|SecUploadDir|SecUploadFileLimit|SecUploadFileMode|SecUploadKeepFiles|SecWebAppId|SecXmlExternalEntity)\b/i,
|
||||
},
|
||||
// Common typos
|
||||
{
|
||||
token: "invalid.illegal.modsecurity",
|
||||
regex: /(?:^|\s)(ARGS[:\.]ARGS[:\.]|TX[:\.]TX[:\.])/i,
|
||||
},
|
||||
// Bare variables
|
||||
{
|
||||
token: "variable.parameter.modsecurity",
|
||||
regex:
|
||||
/(?:^|\s)(!?\b(?:XML|WEBSERVER_ERROR_LOG|WEBAPPID|USERAGENT_IP|USERID|URLENCODED_ERROR|UNIQUE_ID|TX|TIME_YEAR|TIME_WDAY|TIME_SEC|TIME_MON|TIME_MIN|TIME_HOUR|TIME_EPOCH|TIME_DAY|TIME|STREAM_OUTPUT_BODY|STREAM_INPUT_BODY|SESSIONID|STATUS_LINE|SESSION|SERVER_PORT|SERVER_NAME|SERVER_ADDR|SDBM_DELETE_ERROR|SCRIPT_USERNAME|SCRIPT_UID|SCRIPT_MODE|SCRIPT_GROUPNAME|SCRIPT_GID|SCRIPT_FILENAME|SCRIPT_BASENAME|RULE|RESPONSE_STATUS|RESPONSE_PROTOCOL|RESPONSE_HEADERS_NAMES|RESPONSE_HEADERS|RESPONSE_CONTENT_TYPE|RESPONSE_CONTENT_LENGTH|RESPONSE_BODY|REQUEST_URI_RAW|REQUEST_URI|REQUEST_PROTOCOL|REQUEST_METHOD|REQUEST_LINE|REQUEST_HEADERS_NAMES|REQUEST_HEADERS|REQUEST_FILENAME|REQUEST_COOKIES_NAMES|REQUEST_COOKIES|REQUEST_BODY_LENGTH|REQUEST_BODY|REQUEST_BASENAME|REQBODY_PROCESSOR|REQBODY_ERROR_MSG|REQBODY_ERROR|REMOTE_USER|REMOTE_PORT|REMOTE_HOST|REMOTE_ADDR|QUERY_STRING|PERF_SWRITE|PERF_SREAD|PERF_RULES|PERF_PHASE5|PERF_PHASE4|PERF_PHASE3|PERF_PHASE2|PERF_PHASE1|PERF_LOGGING|PERF_GC|PERF_COMBINED|PERF_ALL|PATH_INFO|OUTBOUND_DATA_ERROR|MULTIPART_UNMATCHED_BOUNDARY|MULTIPART_STRICT_ERROR|MULTIPART_NAME|MULTIPART_FILENAME|MULTIPART_CRLF_LF_LINES|MODSEC_BUILD|MATCHED_VARS_NAMES|MATCHED_VAR_NAME|MATCHED_VARS|MATCHED_VAR|INBOUND_DATA_ERROR|HIGHEST_SEVERITY|GEO|FILES_TMP_CONTENT|FILES_TMPNAMES|FILES_SIZES|FULL_REQUEST_LENGTH|FULL_REQUEST|FILES_NAMES|FILES_COMBINED_SIZE|FILES|ENV|DURATION|AUTH_TYPE|ARGS_POST_NAMES|ARGS_POST|ARGS_NAMES|ARGS_GET_NAMES|ARGS_GET|ARGS_COMBINED_SIZE|ARGS)(?:[:\.][A-Za-z0-9\/\-\_\[\]\*]+|\b))/i,
|
||||
},
|
||||
// Macro expanded variables
|
||||
{
|
||||
token: [
|
||||
"keyword.macro.modsecurity",
|
||||
"variable.parameter.modsecurity",
|
||||
"text",
|
||||
],
|
||||
regex: /(%\{)([^\}]*)(\})/,
|
||||
},
|
||||
// Rule action - runtime configuration (ctl)
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.ctl",
|
||||
"keyword.operator.modsecurity.action.ctl.name",
|
||||
"punctuation.equals.modsecurity",
|
||||
"constant.numeric.modsecurity.action.ctl.parameter",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(ctl:)(auditEngine|auditLogParts|debugLogLevel|forceRequestBodyVariable|requestBodyAccess|requestBodyLimit|requestBodyProcessor|responseBodyAccess|responseBodyLimit|ruleEngine|ruleRemoveById|ruleRemoveByMsg|ruleRemoveByTag|ruleRemoveTargetById|ruleRemoveTargetByMsg|ruleRemoveTargetByTag|hashEngine|hashEnforcement)(=)((?:\d+)|(?:[\w\s:\.\-_/+]+))/i,
|
||||
},
|
||||
// Rule action - transform (t)
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.transform",
|
||||
"constant.numeric.modsecurity.action.transform_name",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(t):'?(base64DecodeExt|base64Decode|sqlHexDecode|base64Encode|cmdLine|compressWhitespace|cssDecode|escapeSeqDecode|hexDecode|hexEncode|htmlEntityDecode|jsDecode|length|lowercase|md5|none|normalisePathWin|normalisePath|normalizePathWin|normalizePath|parityEven7bit|parityOdd7bit|parityZero7bit|removeNulls|removeWhitespace|replaceComments|removeCommentsChar|removeComments|replaceNulls|urlDecodeUni|urlDecode|uppercase|urlEncode|utf8toUnicode|sha1|trimLeft|trimRight|trim)'?/i,
|
||||
},
|
||||
// Rule action - phase
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.phase",
|
||||
"punctuation.colon.modsecurity",
|
||||
"constant.numeric.modsecurity.action.phase_name",
|
||||
],
|
||||
regex: /(^|,|\s)(phase)(:)'?(response|request|1|2|3|4|5)'?/i,
|
||||
},
|
||||
// Rule action - severity
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.severity",
|
||||
"punctuation.colon.modsecurity",
|
||||
"constant.numeric.modsecurity.action.severity_name",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(severity)(:)'?(NOTICE|WARNING|ERROR|CRITICAL|1|2|3|4|5)'?/i,
|
||||
},
|
||||
// Rule action - with parameter
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action",
|
||||
"punctuation.colon.modsecurity",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(accuracy|append|deprecatevar|exec|expirevar|id|initcol|logdata|maturity|msg|pause|prepend|rev|sanitiseArg|sanitiseMatched|sanitiseMatchedBytes|sanitiseRequestHeader|sanitiseResponseHeader|setuid|setrsc|setsid|setenv|setvar|skip|skipAfter|status|tag|ver|xmlns)(:)(?:'?(?:\d+)'?|(?:\d+)|'(?:[\w\s:\.\-_/(),]+)'|[\w\s:\.\-_/(),]+)/i,
|
||||
},
|
||||
// Rule action - without parameters
|
||||
{
|
||||
token: "keyword.operator.modsecurity.action",
|
||||
regex:
|
||||
/(^|,|\s)(auditlog|capture|log|multiMatch|noauditlog|nolog)\b/i,
|
||||
},
|
||||
// Rule action - disruptive actions without parameters
|
||||
{
|
||||
token: "entity.name.function.modsecurity.action.disruptive_pass",
|
||||
regex: /(^|,|\s)(allow|block|deny|drop|pass|chain)\b/i,
|
||||
},
|
||||
// Regexp operator and operand, e.g., "@rx foo"
|
||||
{
|
||||
token: ["keyword.control.modsecurity", "string.regexp.modsecurity"],
|
||||
regex: /"(!?@rx)\s+((?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// pm operator and operand, e.g., "@pm foo"
|
||||
{
|
||||
token: [
|
||||
"keyword.control.modsecurity",
|
||||
"string.unquoted.modsecurity",
|
||||
],
|
||||
regex: /"(!?@pm)\s+((?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// Operator, e.g., @contains
|
||||
{
|
||||
token: "keyword.control.modsecurity",
|
||||
regex:
|
||||
/@(?:beginsWith|contains|containsWord|detectSQLi|detectXSS|endsWith|fuzzyHash|eq|ge|geoLookup|gsbLookup|gt|inspectFile|ipMatch|ipMatchF|ipMatchFromFile|le|lt|noMatch|pmf|pmFromFile|rbl|rsub|streq|strmatch|unconditionalMatch|validateByteRange|validateDTD|validateHash|validateSchema|validateUrlEncoding|validateUtf8Encoding|verifyCC|verifyCPF|verifySSN|within)\b/i,
|
||||
},
|
||||
// Implicit regexp operator by double-quoted string
|
||||
{
|
||||
token: "string.regexp.modsecurity",
|
||||
regex: /"([^@](?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// IP address/network
|
||||
{
|
||||
token: "constant.other.modsecurity.ip",
|
||||
regex: /\b\d+\.\d+\.\d+\.\d+(?:\/\d+)?\b/,
|
||||
},
|
||||
// Numbers, e.g., rule IDs
|
||||
{
|
||||
token: "constant.numeric.modsecurity",
|
||||
regex: /\b\d+(\.\d+)?/,
|
||||
},
|
||||
// Apache configuration directives and tags
|
||||
{
|
||||
token: [
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
"entity.tag.apacheconf",
|
||||
"text",
|
||||
"string.value.apacheconf",
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
],
|
||||
regex:
|
||||
/(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(\s(.+?))?(>)/,
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
"entity.tag.apacheconf",
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
],
|
||||
regex:
|
||||
/(<\/)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(>)/,
|
||||
},
|
||||
// Additional Apache configuration directives
|
||||
// ... (You can include more rules here as per your JSON patterns)
|
||||
],
|
||||
};
|
||||
|
||||
// Normalize the rules to ensure proper functionality
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(ModSecurityHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ModSecurityHighlightRules = ModSecurityHighlightRules;
|
||||
},
|
||||
);
|
||||
|
||||
ace.define(
|
||||
"ace/mode/modsecurity",
|
||||
[
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"ace/lib/oop",
|
||||
"ace/mode/text",
|
||||
"ace/mode/modsecurity_highlight_rules",
|
||||
],
|
||||
function (acequire, exports, module) {
|
||||
"use strict";
|
||||
var oop = acequire("ace/lib/oop");
|
||||
var TextMode = acequire("ace/mode/text").Mode;
|
||||
|
||||
var ModSecurityHighlightRules = acequire(
|
||||
"ace/mode/modsecurity_highlight_rules",
|
||||
).ModSecurityHighlightRules;
|
||||
|
||||
var Mode = function () {
|
||||
this.HighlightRules = ModSecurityHighlightRules;
|
||||
this.lineCommentStart = "#";
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function () {
|
||||
this.$id = "ace/mode/modsecurity";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
},
|
||||
);
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
$(document).ready(() => {
|
||||
var toastNum = 0;
|
||||
let currentPlugin = "general";
|
||||
let usedTemplate = $("#used-template").val();
|
||||
let currentStep = 1;
|
||||
let usedTemplate = $("#used-template").val().trim();
|
||||
let currentTemplate = $("#selected-template").val();
|
||||
let currentMode = $("#selected-mode").val();
|
||||
let currentType = $("#selected-type").val();
|
||||
|
|
@ -225,8 +226,11 @@ $(document).ready(() => {
|
|||
const addChildrenToForm = (form, elem, isEasy = false) => {
|
||||
elem.find("input, select").each(function () {
|
||||
const $this = $(this);
|
||||
const settingName = $this.attr("name");
|
||||
const settingType = $this.attr("type");
|
||||
|
||||
if (settingType === "hidden") return;
|
||||
|
||||
const settingName = $this.attr("name");
|
||||
const originalValue = $this.data("original");
|
||||
let settingValue = $this.val();
|
||||
|
||||
|
|
@ -236,7 +240,12 @@ $(document).ready(() => {
|
|||
settingValue = $this.is(":checked") ? "yes" : "no";
|
||||
}
|
||||
|
||||
if (!isEasy && settingValue == originalValue) return;
|
||||
if (
|
||||
!isEasy &&
|
||||
settingName !== "SERVER_NAME" &&
|
||||
settingValue == originalValue
|
||||
)
|
||||
return;
|
||||
|
||||
appendHiddenInput(form, settingName, settingValue);
|
||||
});
|
||||
|
|
@ -247,9 +256,18 @@ $(document).ready(() => {
|
|||
appendHiddenInput(form, "csrf_token", csrfToken);
|
||||
|
||||
if (currentMode === "easy") {
|
||||
const template = elem.data("template");
|
||||
appendHiddenInput(form, "USE_TEMPLATE", template);
|
||||
addChildrenToForm(form, $(`#navs-templates-${template}`), true);
|
||||
appendHiddenInput(form, "USE_TEMPLATE", currentTemplate);
|
||||
|
||||
const templateContainer = $(`#navs-templates-${currentTemplate}`);
|
||||
addChildrenToForm(form, templateContainer, true);
|
||||
|
||||
templateContainer.find(".ace-editor").each(function () {
|
||||
const editor = ace.edit(this);
|
||||
const editorValue = editor.getValue().trim();
|
||||
const editorDefault = $(`#${this.id}-default`).val().trim();
|
||||
if (editorValue !== editorDefault)
|
||||
appendHiddenInput(form, $(this).data("name"), editorValue);
|
||||
});
|
||||
|
||||
// Append 'IS_DRAFT' if it exists
|
||||
const $draftInput = $("#is-draft");
|
||||
|
|
@ -502,9 +520,13 @@ $(document).ready(() => {
|
|||
const matchingSettings = $plugin
|
||||
.find("input, select")
|
||||
.filter(function () {
|
||||
const $input = $(this);
|
||||
const settingName = ($input.attr("name") || "").toLowerCase();
|
||||
const label = $input.next("label");
|
||||
const $this = $(this);
|
||||
const settingType = $this.attr("type");
|
||||
|
||||
if (settingType === "hidden") return false;
|
||||
|
||||
const settingName = ($this.attr("name") || "").toLowerCase();
|
||||
const label = $this.next("label");
|
||||
const labelText = (label.text() || "").toLowerCase();
|
||||
|
||||
// Match either the label text or the input/select name
|
||||
|
|
@ -732,9 +754,7 @@ $(document).ready(() => {
|
|||
$(".save-settings").on("click", function () {
|
||||
const form = getFormFromSettings($(this));
|
||||
if (currentMode === "easy") {
|
||||
const currentStep = parseInt($(this).data("current-step"));
|
||||
const template = $(this).data("template");
|
||||
const currentStepId = `navs-steps-${template}-${currentStep}`;
|
||||
const currentStepId = `navs-steps-${currentTemplate}-${currentStep}`;
|
||||
const currentStepContainer = $(`#${currentStepId}`);
|
||||
const isStepValid = validateCurrentStepInputs(currentStepContainer);
|
||||
if (!isStepValid) return;
|
||||
|
|
@ -791,18 +811,15 @@ $(document).ready(() => {
|
|||
});
|
||||
|
||||
$(document).on("click", ".next-step, .previous-step", function () {
|
||||
const template = $(this).data("template");
|
||||
let currentStep = parseInt($(this).data("current-step"));
|
||||
const isNext = $(this).hasClass("next-step");
|
||||
|
||||
// Determine the new step
|
||||
const newStep = isNext ? currentStep + 1 : currentStep - 1;
|
||||
const currentStepId = `navs-steps-${template}-${currentStep}`;
|
||||
const newStepId = `navs-steps-${template}-${newStep}`;
|
||||
const currentStepId = `navs-steps-${currentTemplate}-${currentStep}`;
|
||||
const newStepId = `navs-steps-${currentTemplate}-${newStep}`;
|
||||
|
||||
const currentStepContainer = $(`#${currentStepId}`);
|
||||
const newTabTrigger = $(`button[data-bs-target="#${newStepId}"]`);
|
||||
const currentTabTrigger = $(`button[data-bs-target="#${currentStepId}"]`);
|
||||
|
||||
if (newTabTrigger.length) {
|
||||
if (isNext) {
|
||||
|
|
@ -812,14 +829,18 @@ $(document).ready(() => {
|
|||
// Prevent proceeding to the next step
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentStep++;
|
||||
} else currentStep--;
|
||||
|
||||
currentTabTrigger
|
||||
.parent()
|
||||
.find("div.text-primary")
|
||||
.removeClass("text-primary")
|
||||
.addClass("text-muted");
|
||||
currentTabTrigger.addClass("disabled");
|
||||
$(`#navs-templates-${currentTemplate}`)
|
||||
.find(".template-steps-container .breadcrumb-item")
|
||||
.each(function () {
|
||||
$(this)
|
||||
.find("div.text-primary")
|
||||
.removeClass("text-primary")
|
||||
.addClass("text-muted");
|
||||
$(this).find("button").addClass("disabled");
|
||||
});
|
||||
|
||||
// Activate the new tab
|
||||
const newTab = new bootstrap.Tab(newTabTrigger[0]);
|
||||
|
|
@ -838,6 +859,52 @@ $(document).ready(() => {
|
|||
}
|
||||
});
|
||||
|
||||
$("#reset-template-config").on("click", function () {
|
||||
const reset_modal = $("#modal-reset-template-config");
|
||||
reset_modal.modal("show");
|
||||
});
|
||||
|
||||
$("#confirm-reset-template-config").on("click", function () {
|
||||
const templateContainer = $(`#navs-templates-${currentTemplate}`);
|
||||
templateContainer.find("input, select").each(function () {
|
||||
const type = $(this).attr("type");
|
||||
const templateValue = $(`#${this.id}-template`).val();
|
||||
if ($(this).prop("disabled") || type === "hidden") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for select element
|
||||
if ($(this).is("select")) {
|
||||
$(this)
|
||||
.find("option")
|
||||
.each(function () {
|
||||
$(this).prop("selected", $(this).val() == templateValue);
|
||||
});
|
||||
} else if (type === "checkbox") {
|
||||
$(this).prop("checked", templateValue === "yes");
|
||||
} else {
|
||||
$(this).val(templateValue);
|
||||
}
|
||||
});
|
||||
|
||||
templateContainer.find(".ace-editor").each(function () {
|
||||
const editor = ace.edit(this);
|
||||
const editorValue = $(`#${this.id}-default`).val().trim();
|
||||
editor.setValue(editorValue);
|
||||
editor.session.setValue(editorValue);
|
||||
editor.gotoLine(0);
|
||||
});
|
||||
|
||||
if (currentStep > 1) {
|
||||
setTimeout(() => {
|
||||
currentStep = 2;
|
||||
$(`#navs-steps-${currentTemplate}-2`)
|
||||
.find(".previous-step")
|
||||
.trigger("click");
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
$('div[id^="multiple-"]')
|
||||
.filter(function () {
|
||||
return /^multiple-.*-\d+$/.test($(this).attr("id"));
|
||||
|
|
@ -982,6 +1049,32 @@ $(document).ready(() => {
|
|||
}
|
||||
}
|
||||
|
||||
$(".ace-editor").each(function () {
|
||||
const initialContent = $(this).text().trim();
|
||||
const editor = ace.edit(this);
|
||||
editor.setTheme("ace/theme/cloud9_day"); // cloud9_night when dark mode is supported
|
||||
|
||||
const language = $(this).data("language"); // TODO: Support ModSecurity
|
||||
if (language === "NGINX") {
|
||||
editor.session.setMode("ace/mode/nginx");
|
||||
} else {
|
||||
editor.session.setMode("ace/mode/text"); // Default mode if language is unrecognized
|
||||
}
|
||||
|
||||
// Set the editor's initial content
|
||||
editor.setValue(initialContent, -1); // The second parameter moves the cursor to the start
|
||||
|
||||
editor.setOptions({
|
||||
fontSize: "14px",
|
||||
showPrintMargin: false,
|
||||
tabSize: 2,
|
||||
useSoftTabs: true,
|
||||
wrap: true,
|
||||
});
|
||||
|
||||
editor.renderer.setScrollMargin(10, 10);
|
||||
});
|
||||
|
||||
$(window).on("beforeunload", function (e) {
|
||||
const form = getFormFromSettings($(this));
|
||||
if (currentMode !== "easy") {
|
||||
|
|
|
|||
1329
src/ui/app/static/libs/ace/css/ace.css
Normal file
BIN
src/ui/app/static/libs/ace/css/cloud9_day-1.png
Normal file
|
After Width: | Height: | Size: 76 B |
BIN
src/ui/app/static/libs/ace/css/cloud9_day-2.png
Normal file
|
After Width: | Height: | Size: 147 B |
BIN
src/ui/app/static/libs/ace/css/cloud9_night-1.png
Normal file
|
After Width: | Height: | Size: 75 B |
BIN
src/ui/app/static/libs/ace/css/cloud9_night-2.png
Normal file
|
After Width: | Height: | Size: 75 B |
BIN
src/ui/app/static/libs/ace/css/cloud9_night_low_color-1.png
Normal file
|
After Width: | Height: | Size: 75 B |
BIN
src/ui/app/static/libs/ace/css/cloud9_night_low_color-2.png
Normal file
|
After Width: | Height: | Size: 75 B |
BIN
src/ui/app/static/libs/ace/css/main-1.png
Normal file
|
After Width: | Height: | Size: 694 B |
4
src/ui/app/static/libs/ace/css/main-10.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16" fill="none">
|
||||
<path d="m 18.929851,7.8298076 c 0.146353,6.3374604 -6.323147,7.7778444 -7.477912,7.7778444 -2.1072726,-0.12875 5.117678,0.356249 5.051698,-7.8700618 -0.604672,-8.00397349 -7.0772706,-7.5631189 -4.8573,-7.43039556 1.606,-0.11514225 6.897485,1.26254596 7.283514,7.52261296 z" fill="crimson" stroke-width="2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="m 8.1147562,2.0529828 c 3.3491698,0 6.0641328,2.6768627 6.0641328,5.978953 0,3.3021122 -2.714963,5.9789202 -6.0641328,5.9789202 -3.3491473,0 -6.0641772,-2.676808 -6.0641772,-5.9789202 0.00539,-3.2998861 2.7172656,-5.9736408 6.0641772,-5.978953 z m 0,-1.73582719 c -4.3214836,0 -7.82474038,3.45401849 -7.82474038,7.71478019 0,4.2607282 3.50325678,7.7147452 7.82474038,7.7147452 4.3214498,0 7.8246998,-3.454017 7.8246998,-7.7147452 0,-2.0460914 -0.824392,-4.0083672 -2.291756,-5.4551746 C 12.180225,1.1299648 10.190013,0.31715561 8.1147562,0.31715561 Z M 6.9374563,8.2405985 4.6718685,10.485852 6.0086814,11.876728 8.3170035,9.6007911 10.625337,11.876728 11.962138,10.485852 9.6965508,8.2405985 11.962138,6.0068066 10.573246,4.6374335 8.3170035,6.8734297 6.0607607,4.6374335 4.6718685,6.0068066 Z" fill="crimson" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
5
src/ui/app/static/libs/ace/css/main-11.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 14" fill="none">
|
||||
<path d="M10.0001 13.6992C10.0001 13.6992 11.9241 13.4763 13 12.6992C14.4139 11.6781 16 10.5 16.1251 6.81126V2.58987C16.1251 2.54768 16.1221 2.50619 16.1164 2.46559V1.71485H15.2414L15.2307 1.71484L14.6251 1.69922V6.81123C14.6251 8.51061 14.6251 9.46461 12.7824 11.721C12.1586 12.4848 10.0001 13.6992 10.0001 13.6992Z" fill="crimson" stroke-width="2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.33609 0.367475C7.03214 0.152652 6.62548 0.153614 6.32253 0.369997L6.30869 0.379554C6.29553 0.388588 6.27388 0.403266 6.24417 0.422789C6.18471 0.46186 6.09321 0.520171 5.97313 0.591373C5.73251 0.734059 5.3799 0.926864 4.94279 1.12009C4.06144 1.5097 2.87541 1.88377 1.58984 1.88377H0.714844V2.75877V6.98015C0.714844 9.49374 2.28866 11.1973 3.70254 12.2185C4.41845 12.7355 5.12874 13.1053 5.65733 13.3457C5.92284 13.4664 6.14566 13.5559 6.30465 13.6161C6.38423 13.6462 6.44805 13.669 6.49349 13.6848C6.51622 13.6927 6.53438 13.6989 6.54764 13.7033L6.56382 13.7087L6.56908 13.7104L6.57099 13.711L6.83984 13.7533L6.57242 13.7115C6.74633 13.7673 6.93335 13.7673 7.10727 13.7115L7.1087 13.711L7.11061 13.7104L7.11587 13.7087L7.13205 13.7033C7.14531 13.6989 7.16346 13.6927 7.18619 13.6848C7.23164 13.669 7.29546 13.6462 7.37503 13.6161C7.53403 13.5559 7.75685 13.4664 8.02236 13.3457C8.55095 13.1053 9.26123 12.7355 9.97715 12.2185C11.391 11.1973 12.9648 9.49377 12.9648 6.98018V2.7588C12.9648 2.7166 12.9619 2.67511 12.9561 2.63451V1.88377H12.0811C12.0775 1.88377 12.074 1.88377 12.0704 1.88377C10.7979 1.88004 9.61962 1.51102 8.73894 1.12486C8.73534 1.12327 8.73174 1.12168 8.72814 1.12009C8.29103 0.926864 7.93842 0.734059 7.69779 0.591373C7.57772 0.520171 7.48622 0.46186 7.42676 0.422789C7.39705 0.403266 7.37539 0.388588 7.36224 0.379554L7.34896 0.37035C7.34896 0.37035 7.34847 0.37002 7.34563 0.374054L7.33779 0.368659L7.33609 0.367475ZM8.03471 2.72691C8.8604 3.09063 9.96066 3.46309 11.2061 3.58907V6.98015H11.2148C11.2148 8.67953 10.1637 9.92507 8.95254 10.7998C8.35595 11.2306 7.75374 11.5454 7.29796 11.7527C7.11671 11.8351 6.96062 11.8996 6.83984 11.9469C6.71906 11.8996 6.56297 11.8351 6.38173 11.7527C5.92595 11.5454 5.32373 11.2306 4.72715 10.7998C3.51603 9.92507 2.46484 8.67955 2.46484 6.98018V3.58909C3.71738 3.46239 4.82308 3.08639 5.65033 2.72071C6.14228 2.50324 6.54485 2.28537 6.83254 2.11624C7.12181 2.28535 7.527 2.50352 8.02196 2.72131C8.0262 2.72317 8.03045 2.72504 8.03471 2.72691ZM5.96484 3.40147V7.77647H7.71484V3.40147H5.96484ZM5.96484 10.4015V8.65147H7.71484V10.4015H5.96484Z" fill="crimson" stroke-width="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
4
src/ui/app/static/libs/ace/css/main-12.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.7769 14.7337L8.65192 2.48369C8.32946 1.83877 7.40913 1.83877 7.08667 2.48369L0.961669 14.7337C0.670775 15.3155 1.09383 16 1.74429 16H13.9943C14.6448 16 15.0678 15.3155 14.7769 14.7337ZM3.16007 14.25L7.86929 4.83156L12.5785 14.25H3.16007ZM8.74429 11.625V13.375H6.99429V11.625H8.74429ZM6.99429 10.75V7.25H8.74429V10.75H6.99429Z" fill="#EC7211"/>
|
||||
<path d="M11.1991 2.95238C10.8809 2.31467 10.3537 1.80526 9.7055 1.509L11.041 1.06978C11.6883 0.949814 12.337 1.27263 12.6317 1.86141L17.6136 11.8161C18.3527 13.2929 17.5938 15.0804 16.018 15.5745C16.4044 14.4507 16.3231 13.2188 15.7924 12.1555L11.1991 2.95238Z" fill="#EC7211"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 779 B |
BIN
src/ui/app/static/libs/ace/css/main-13.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
src/ui/app/static/libs/ace/css/main-14.png
Normal file
|
After Width: | Height: | Size: 128 B |
BIN
src/ui/app/static/libs/ace/css/main-15.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
src/ui/app/static/libs/ace/css/main-16.png
Normal file
|
After Width: | Height: | Size: 126 B |
BIN
src/ui/app/static/libs/ace/css/main-17.png
Normal file
|
After Width: | Height: | Size: 109 B |
BIN
src/ui/app/static/libs/ace/css/main-18.png
Normal file
|
After Width: | Height: | Size: 109 B |
BIN
src/ui/app/static/libs/ace/css/main-19.png
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
src/ui/app/static/libs/ace/css/main-2.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
src/ui/app/static/libs/ace/css/main-20.png
Normal file
|
After Width: | Height: | Size: 87 B |
BIN
src/ui/app/static/libs/ace/css/main-21.png
Normal file
|
After Width: | Height: | Size: 88 B |
BIN
src/ui/app/static/libs/ace/css/main-22.png
Normal file
|
After Width: | Height: | Size: 85 B |
BIN
src/ui/app/static/libs/ace/css/main-23.png
Normal file
|
After Width: | Height: | Size: 76 B |
BIN
src/ui/app/static/libs/ace/css/main-24.png
Normal file
|
After Width: | Height: | Size: 147 B |
1
src/ui/app/static/libs/ace/css/main-25.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.83701 15L4.58751 13.7155L10.1468 8L4.58751 2.28446L5.83701 1L12.6465 8L5.83701 15Z" fill="black"/></svg>
|
||||
|
After Width: | Height: | Size: 251 B |
BIN
src/ui/app/static/libs/ace/css/main-26.png
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
src/ui/app/static/libs/ace/css/main-3.png
Normal file
|
After Width: | Height: | Size: 170 B |
BIN
src/ui/app/static/libs/ace/css/main-4.png
Normal file
|
After Width: | Height: | Size: 159 B |
7
src/ui/app/static/libs/ace/css/main-5.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16">
|
||||
<g stroke-width="2" stroke="red" shape-rendering="geometricPrecision">
|
||||
<circle fill="none" cx="8" cy="8" r="7" stroke-linejoin="round"/>
|
||||
<line x1="11" y1="5" x2="5" y2="11"/>
|
||||
<line x1="11" y1="11" x2="5" y2="5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 285 B |
9
src/ui/app/static/libs/ace/css/main-6.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg viewBox="0 0 20 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<g stroke-width="2" stroke="darkorange" fill="none" shape-rendering="geometricPrecision">
|
||||
<path class="stroke-linejoin-round" d="M8 14.8307C8 14.8307 2 12.9047 2 8.08992V3.26548C5.31 3.26548 7.98999 1.34918 7.98999 1.34918C7.98999 1.34918 10.69 3.26548 14 3.26548V8.08992C14 12.9047 8 14.8307 8 14.8307Z"/>
|
||||
<path d="M2 8.08992V3.26548C5.31 3.26548 7.98999 1.34918 7.98999 1.34918"/>
|
||||
<path d="M13.99 8.08992V3.26548C10.68 3.26548 8 1.34918 8 1.34918"/>
|
||||
<path class="stroke-linejoin-round" d="M8 4V9"/>
|
||||
<path class="stroke-linejoin-round" d="M8 10V12"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 672 B |
7
src/ui/app/static/libs/ace/css/main-7.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16">
|
||||
<g stroke-width="2" stroke="darkorange" shape-rendering="geometricPrecision">
|
||||
<polygon stroke-linejoin="round" fill="none" points="8 1 15 15 1 15 8 1"/>
|
||||
<rect x="8" y="12" width="0.01" height="0.01"/>
|
||||
<line x1="8" y1="6" x2="8" y2="10"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 310 B |
9
src/ui/app/static/libs/ace/css/main-8.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16">
|
||||
<g stroke-width="2" stroke="blue" shape-rendering="geometricPrecision">
|
||||
<circle fill="none" cx="8" cy="8" r="7" stroke-linejoin="round"/>
|
||||
<polyline points="8 11 8 8"/>
|
||||
<polyline points="9 8 6 8"/>
|
||||
<line x1="10" y1="11" x2="6" y2="11"/>
|
||||
<rect x="8" y="5" width="0.01" height="0.01"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 355 B |
6
src/ui/app/static/libs/ace/css/main-9.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg viewBox="0 0 20 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<g stroke-width="2" stroke="silver" fill="none" shape-rendering="geometricPrecision">
|
||||
<path class="stroke-linejoin-round" d="M6 14H10"/>
|
||||
<path d="M8 11H9C9 9.47002 12 8.54002 12 5.76002C12.02 4.40002 11.39 3.36002 10.43 2.67002C9 1.64002 7.00001 1.64002 5.57001 2.67002C4.61001 3.36002 3.98 4.40002 4 5.76002C4 8.54002 7.00001 9.47002 7.00001 11H8Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 448 B |
160
src/ui/app/static/libs/ace/css/theme/cloud9_day.css
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
.ace-cloud9-day .ace_gutter {
|
||||
background: #ECECEC;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_print-margin {
|
||||
width: 1px;
|
||||
background: #e8e8e8;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_fold {
|
||||
background-color: #6B72E6;
|
||||
}
|
||||
|
||||
.ace-cloud9-day {
|
||||
background-color: #FBFBFB;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_cursor {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_invisible {
|
||||
color: rgb(191, 191, 191);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_storage,
|
||||
.ace-cloud9-day .ace_keyword {
|
||||
color: rgb(24, 122, 234);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_constant {
|
||||
color: rgb(197, 6, 11);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_constant.ace_buildin {
|
||||
color: rgb(88, 72, 246);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_constant.ace_language {
|
||||
color: rgb(88, 92, 246);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_constant.ace_library {
|
||||
color: rgb(6, 150, 14);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_invalid {
|
||||
background-color: rgba(255, 0, 0, 0.1);
|
||||
color: red;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_support.ace_function {
|
||||
color: rgb(60, 76, 114);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_support.ace_constant {
|
||||
color: rgb(6, 150, 14);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_support.ace_type,
|
||||
.ace-cloud9-day .ace_support.ace_class {
|
||||
color: rgb(109, 121, 222);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_keyword.ace_operator {
|
||||
color: rgb(104, 118, 135);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_string {
|
||||
color: rgb(3, 106, 7);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_comment {
|
||||
color: rgb(76, 136, 107);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_comment.ace_doc {
|
||||
color: rgb(0, 102, 255);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_comment.ace_doc.ace_tag {
|
||||
color: rgb(128, 159, 191);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_constant.ace_numeric {
|
||||
color: rgb(0, 0, 205);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_variable {
|
||||
color: rgb(49, 132, 149);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_xml-pe {
|
||||
color: rgb(104, 104, 91);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_entity.ace_name.ace_function {
|
||||
color: #0000A2;
|
||||
}
|
||||
|
||||
|
||||
.ace-cloud9-day .ace_heading {
|
||||
color: rgb(12, 7, 255);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_list {
|
||||
color: rgb(185, 6, 144);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_meta.ace_tag {
|
||||
color: rgb(0, 22, 142);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_string.ace_regex {
|
||||
color: rgb(255, 0, 0)
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_selection {
|
||||
background: rgb(181, 213, 255);
|
||||
}
|
||||
|
||||
.ace-cloud9-day.ace_multiselect .ace_selection.ace_start {
|
||||
box-shadow: 0 0 3px 0px white;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_step {
|
||||
background: rgb(247, 237, 137);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_stack {
|
||||
background: #BAE0A0;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_bracket {
|
||||
margin: -1px 0 0 -1px;
|
||||
border: 1px solid rgb(192, 192, 192);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_active-line {
|
||||
background: rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_gutter-active-line {
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_marker-layer .ace_selected-word {
|
||||
background: rgb(250, 250, 255);
|
||||
border: 1px solid rgb(200, 200, 250);
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_indent-guide {
|
||||
background: url("../cloud9_day-1.png") right repeat-y;
|
||||
}
|
||||
|
||||
.ace-cloud9-day .ace_indent-guide-active {
|
||||
background: url("../cloud9_day-2.png") right repeat-y;
|
||||
}
|
||||
146
src/ui/app/static/libs/ace/css/theme/cloud9_night.css
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
.ace-cloud9-night .ace_gutter {
|
||||
background: #303130;
|
||||
color: #eee
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_print-margin {
|
||||
width: 1px;
|
||||
background: #222
|
||||
}
|
||||
|
||||
.ace-cloud9-night {
|
||||
background-color: #181818;
|
||||
color: #EBEBEB
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_cursor {
|
||||
color: #9F9F9F
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_marker-layer .ace_selection {
|
||||
background: #424242
|
||||
}
|
||||
|
||||
.ace-cloud9-night.ace_multiselect .ace_selection.ace_start {
|
||||
box-shadow: 0 0 3px 0px #000000;
|
||||
border-radius: 2px
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_marker-layer .ace_step {
|
||||
background: rgb(102, 82, 0)
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_marker-layer .ace_bracket {
|
||||
margin: -1px 0 0 -1px;
|
||||
border: 1px solid #888888
|
||||
}
|
||||
|
||||
.ace-cloud9-night .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-cloud9-night .ace_marker-layer .ace_active-line {
|
||||
background: #292929
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_gutter-active-line {
|
||||
background-color: #3D3D3D
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_stack {
|
||||
background-color: rgb(66, 90, 44)
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_marker-layer .ace_selected-word {
|
||||
border: 1px solid #888888
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_invisible {
|
||||
color: #343434
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_keyword,
|
||||
.ace-cloud9-night .ace_meta,
|
||||
.ace-cloud9-night .ace_storage,
|
||||
.ace-cloud9-night .ace_storage.ace_type,
|
||||
.ace-cloud9-night .ace_support.ace_type {
|
||||
color: #C397D8
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_keyword.ace_operator {
|
||||
color: #70C0B1
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_constant.ace_character,
|
||||
.ace-cloud9-night .ace_constant.ace_language,
|
||||
.ace-cloud9-night .ace_constant.ace_numeric,
|
||||
.ace-cloud9-night .ace_keyword.ace_other.ace_unit,
|
||||
.ace-cloud9-night .ace_support.ace_constant,
|
||||
.ace-cloud9-night .ace_variable.ace_parameter {
|
||||
color: #E78C45
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_constant.ace_other {
|
||||
color: #EEEEEE
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_invalid {
|
||||
color: #CED2CF;
|
||||
background-color: #DF5F5F
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_invalid.ace_deprecated {
|
||||
color: #CED2CF;
|
||||
background-color: #B798BF
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_fold {
|
||||
background-color: #7AA6DA;
|
||||
border-color: #DEDEDE
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_entity.ace_name.ace_function,
|
||||
.ace-cloud9-night .ace_support.ace_function,
|
||||
.ace-cloud9-night .ace_variable:not(.ace_parameter),
|
||||
.ace-cloud9-night .ace_constant:not(.ace_numeric) {
|
||||
color: #7AA6DA
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_support.ace_class,
|
||||
.ace-cloud9-night .ace_support.ace_type {
|
||||
color: #E7C547
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_heading,
|
||||
.ace-cloud9-night .ace_markup.ace_heading,
|
||||
.ace-cloud9-night .ace_string {
|
||||
color: #B9CA4A
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_entity.ace_name.ace_tag,
|
||||
.ace-cloud9-night .ace_entity.ace_other.ace_attribute-name,
|
||||
.ace-cloud9-night .ace_meta.ace_tag,
|
||||
.ace-cloud9-night .ace_string.ace_regexp,
|
||||
.ace-cloud9-night .ace_variable {
|
||||
color: #D54E53
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_comment {
|
||||
color: #969896
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_c9searchresults.ace_keyword {
|
||||
color: #C2C280;
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_indent-guide {
|
||||
background: url("../cloud9_night-1.png") right repeat-y
|
||||
}
|
||||
|
||||
.ace-cloud9-night .ace_indent-guide-active {
|
||||
background: url("../cloud9_night-2.png") right repeat-y;
|
||||
}
|
||||
134
src/ui/app/static/libs/ace/css/theme/cloud9_night_low_color.css
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
.ace-cloud9-night-low-color .ace_gutter {
|
||||
background: #303130;
|
||||
color: #eee
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_print-margin {
|
||||
width: 1px;
|
||||
background: #222
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color {
|
||||
background-color: #181818;
|
||||
color: #EBEBEB
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_cursor {
|
||||
color: #9F9F9F
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_marker-layer .ace_selection {
|
||||
background: #424242
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color.ace_multiselect .ace_selection.ace_start {
|
||||
box-shadow: 0 0 3px 0px #000000;
|
||||
border-radius: 2px
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_marker-layer .ace_step {
|
||||
background: rgb(102, 82, 0)
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_marker-layer .ace_bracket {
|
||||
margin: -1px 0 0 -1px;
|
||||
border: 1px solid #888888
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .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-cloud9-night-low-color .ace_marker-layer .ace_active-line {
|
||||
background: #292929
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_gutter-active-line {
|
||||
background-color: #3D3D3D
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_stack {
|
||||
background-color: rgb(66, 90, 44)
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_marker-layer .ace_selected-word {
|
||||
border: 1px solid #888888
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_invisible {
|
||||
color: #343434
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_keyword,
|
||||
.ace-cloud9-night-low-color .ace_meta,
|
||||
.ace-cloud9-night-low-color .ace_storage {
|
||||
color: #C397D8
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_keyword.ace_operator {
|
||||
color: #70C0B1
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_constant.ace_character,
|
||||
.ace-cloud9-night-low-color .ace_constant.ace_language,
|
||||
.ace-cloud9-night-low-color .ace_constant.ace_numeric,
|
||||
.ace-cloud9-night-low-color .ace_keyword.ace_other.ace_unit {
|
||||
color: #DAA637
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_constant.ace_other {
|
||||
color: #EEEEEE
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_invalid {
|
||||
color: #CED2CF;
|
||||
background-color: #DF5F5F
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_invalid.ace_deprecated {
|
||||
color: #CED2CF;
|
||||
background-color: #B798BF
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_fold {
|
||||
background-color: #7AA6DA;
|
||||
border-color: #DEDEDE
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_entity.ace_name.ace_function,
|
||||
.ace-cloud9-night-low-color .ace_support.ace_function,
|
||||
.ace-cloud9-night-low-color .ace_variable:not(.ace_parameter),
|
||||
.ace-cloud9-night-low-color .ace_constant:not(.ace_numeric) {
|
||||
color: #7AA6DA
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_support.ace_class,
|
||||
.ace-cloud9-night-low-color .ace_support.ace_type {
|
||||
color: #E7C547
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_heading,
|
||||
.ace-cloud9-night-low-color .ace_markup.ace_heading,
|
||||
.ace-cloud9-night-low-color .ace_string {
|
||||
color: #B9CA4A
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_comment {
|
||||
color: #969896
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_c9searchresults.ace_keyword {
|
||||
color: #C2C280;
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_indent-guide {
|
||||
background: url("../cloud9_night_low_color-1.png") right repeat-y
|
||||
}
|
||||
|
||||
.ace-cloud9-night-low-color .ace_indent-guide-active {
|
||||
background: url("../cloud9_night_low_color-2.png") right repeat-y;
|
||||
}
|
||||
22
src/ui/app/static/libs/ace/src-min/ace.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-beautify.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f=t.formatOptions||{},l,c=!1,h=!1,p=!1,d="",v="",m="",g=0,y=0,b=0,w=0,E=0,S=0,x=0,T,N=0,C=0,k=[],L=!1,A,O=!1,M=!1,_=!1,D=!1,P={0:0},H=[],B=!1,j=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},F=function(){var e=d.length-1;for(;;){if(e==0)break;if(d[e]!==" ")break;e-=1}d=d.slice(0,e+1)},I=function(){d=d.trimRight(),c=!1};while(s!==null){N=n.getCurrentTokenRow(),k=n.$rowTokens,l=n.stepForward();if(typeof s!="undefined"){v=s.value,E=0,_=m==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(M=!0,l&&(D=a.indexOf(l.value)!==-1),v==="</"&&(D&&!c&&C<1&&C++,_&&(C=1),E=1,D=!1)):i(s,"tag-close")?M=!1:i(s,"comment.start")?D=!0:i(s,"comment.end")&&(D=!1),!M&&!C&&s.type==="paren.rparen"&&s.value.substr(0,1)==="}"&&C++,N!==T&&(C=N,T&&(C-=T));if(C){I();for(;C>0;C--)d+="\n";c=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(v=v.trimLeft())}if(v){s.type==="keyword"&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(H[g]=v,j(),p=!0,v.match(/^(else|elseif)$/)&&d.match(/\}[\s]*$/)&&(I(),h=!0)):s.type==="paren.lparen"?(j(),v.substr(-1)==="{"&&(p=!0,O=!1,M||(C=1)),v.substr(0,1)==="{"&&(h=!0,d.substr(-1)!=="["&&d.trimRight().substr(-1)==="["?(I(),h=!1):d.trimRight().substr(-1)===")"?I():F())):s.type==="paren.rparen"?(E=1,v.substr(0,1)==="}"&&(H[g-1]==="case"&&E++,d.trimRight().substr(-1)==="{"?I():(h=!0,_&&(C+=2))),v.substr(0,1)==="]"&&d.substr(-1)!=="}"&&d.trimRight().substr(-1)==="}"&&(h=!1,w++,I()),v.substr(0,1)===")"&&d.substr(-1)!=="("&&d.trimRight().substr(-1)==="("&&(h=!1,w++,I()),F()):s.type!=="keyword.operator"&&s.type!=="keyword"||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&v===";"?(I(),j(),p=!0,_&&C++):s.type==="punctuation.operator"&&v.match(/^(:|,)$/)?(I(),j(),v.match(/^(,)$/)&&x>0&&S===0&&f.lineBreaksAfterCommasInCurlyBlock?C++:(p=!0,c=!1)):s.type==="support.php_tag"&&v==="?>"&&!c?(I(),h=!0):i(s,"attribute-name")&&d.substr(-1).match(/^\s$/)?h=!0:i(s,"attribute-equals")?(F(),j()):i(s,"tag-close")?(F(),v==="/>"&&(h=!0)):s.type==="keyword"&&v.match(/^(case|default)$/)&&B&&(E=1):(I(),j(),h=!0,p=!0);if(c&&(!s.type.match(/^(comment)$/)||!!v.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!v.substr(0,1).match(/^['"@]$/))){w=b;if(g>y){w++;for(A=g;A>y;A--)P[A]=w}else g<y&&(w=P[g]);y=g,b=w,E&&(w-=E),O&&!S&&(w++,O=!1);for(A=0;A<w;A++)d+=o}s.type==="keyword"&&v.match(/^(case|default)$/)?B===!1&&(H[g]=v,g++,B=!0):s.type==="keyword"&&v.match(/^(break)$/)&&H[g-1]&&H[g-1].match(/^(case|default)$/)&&(g--,B=!1),s.type==="paren.lparen"&&(S+=(v.match(/\(/g)||[]).length,x+=(v.match(/\{/g)||[]).length,g+=v.length),s.type==="keyword"&&v.match(/^(if|else|elseif|for|while)$/)?(O=!0,S=0):!S&&v.trim()&&s.type!=="comment"&&(O=!1);if(s.type==="paren.rparen"){S-=(v.match(/\)/g)||[]).length,x-=(v.match(/\}/g)||[]).length;for(A=0;A<v.length;A++)g--,v.substr(A,1)==="}"&&H[g]==="case"&&g--}s.type=="text"&&(v=v.replace(/\s+$/," ")),h&&!c&&(F(),d.substr(-1)!=="\n"&&(d+=" ")),d+=v,p&&(d+=" "),c=!1,h=!1,p=!1;if(i(s,"tag-close")&&(D||a.indexOf(m)!==-1)||i(s,"doctype")&&v===">")D&&l&&l.value==="</"?C=-1:C=1;l&&u.indexOf(l.value)===-1&&(i(s,"tag-open")&&v==="</"?g--:i(s,"tag-open")&&v==="<"?g++:i(s,"tag-close")&&v==="/>"&&g--),i(s,"tag-name")&&(m=v),T=N}}s=l}d=d.trim(),e.doc.setValue(d)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); (function() {
|
||||
window.require(["ace/ext/beautify"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-code_lens.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function u(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function a(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,s=t.$textLayer,a=s.$lenses;if(!i){a&&u(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=s.$lenses=[]);var h=0;for(var p=0;p<f.length;p++){var d=f[p].row,v=i[d],m=v&&v.lenses;if(!m||!m.length)continue;var g=a[h];g||(g=a[h]=o.buildDom(["div",{"class":"ace_codeLens"}],t.container)),g.style.height=l.lineHeight+"px",h++;for(var y=0;y<m.length;y++){var b=g.childNodes[2*y];b||(y!=0&&g.appendChild(o.createTextNode("\u00a0|\u00a0")),b=o.buildDom(["a"],g)),b.textContent=m[y].title,b.lensCommand=m[y]}while(g.childNodes.length>2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,g.style.paddingLeft=c+E+"px"}while(h<a.length)a.pop().remove()}function f(e){if(!e.lineWidgets)return;var t=e.widgetManager;e.lineWidgets.forEach(function(e){e&&e.lenses&&t.removeLineWidget(e)})}function l(e){e.codeLensProviders=[],e.renderer.on("afterRender",a),e.$codeLensClickHandler||(e.$codeLensClickHandler=function(t){var n=t.target.lensCommand;if(!n)return;e.execCommand(n.id,n.arguments),e._emit("codeLensClick",t)},i.addListener(e.container,"click",e.$codeLensClickHandler,e)),e.$updateLenses=function(){function o(){var r=n.selection.cursor,i=n.documentToScreenRow(r),o=n.getScrollTop(),u=t.setLenses(n,s),a=n.$undoManager&&n.$undoManager.$lastDelta;if(a&&a.action=="remove"&&a.lines.length>1)return;var f=n.documentToScreenRow(r),l=e.renderer.layerConfig.lineHeight,c=n.getScrollTop()+(f-i)*l;u==0&&o<l/4&&o>-l/4&&(c=-l),n.setScrollTop(c)}var n=e.session;if(!n)return;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var i=e.codeLensProviders.length,s=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){s.push(e)}),i--,i==0&&o()})})};var n=s.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function c(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",a),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../line_widgets").LineWidgets,i=e("../lib/event"),s=e("../lib/lang"),o=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;return f(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r<n&&(n=r)}),e._emit("changeFold",{data:{start:{row:n}}}),n},t.registerCodeLensProvider=function(e,t){e.setOption("enableCodeLens",!0),e.codeLensProviders.push(t),e.$updateLensesOnInput()},t.clear=function(e){t.setLenses(e,null)};var h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{enableCodeLens:{set:function(e){e?l(this):c(this)}}}),o.importCssString("\n.ace_codeLens {\n position: absolute;\n color: #aaa;\n font-size: 88%;\n background: inherit;\n width: 100%;\n display: flex;\n align-items: flex-end;\n pointer-events: none;\n}\n.ace_codeLens > a {\n cursor: pointer;\n pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n color: #0000ff;\n text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n color: #4e94ce;\n}\n","codelense.css",!1)}); (function() {
|
||||
window.require(["ace/ext/code_lens"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-command_bar.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(){function e(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}}return e.prototype.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},e.prototype.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},e.prototype.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},e.prototype.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},e.prototype.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},e.prototype.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},e.prototype.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},e.prototype.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},e.prototype.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},e.prototype.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r},e}();t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}); (function() {
|
||||
window.require(["ace/ext/elastic_tabstops_lite"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-emmet.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-error_marker.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/ext/error_marker"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-hardwrap.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.length<t)return;var r=e.slice(0,t),i=e.slice(t),s=/^(?:(\s+)|(\S+)(\s+))/.exec(i),o=/(?:(\s+)|(\s+)(\S+))$/.exec(r),u=0,a=0;o&&!o[2]&&(u=t-o[1].length,a=t),s&&!s[2]&&(u||(u=t),a=t+s[1].length);if(u)return{start:u,end:a};if(o&&o[2]&&o.index>n)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length<n){var v=new r(s,h.length,s+1,c.length-p.length);u.replace(v," "),s--,o--}else h.length<a.length&&u.remove(new r(s,h.length,s,a.length))}}s++}}function s(e){if(e.command.name=="insertstring"&&/\S/.test(e.args)){var t=e.editor,n=t.selection.cursor;if(n.column<=t.renderer.$printMarginColumn)return;var r=t.session.$undoManager.$lastDelta;i(t,{startRow:n.row,endRow:n.row,allowMerge:!1}),r!=t.session.$undoManager.$lastDelta&&t.session.markUndoGroup()}}var r=e("../range").Range,o=e("../editor").Editor;e("../config").defineOptions(o.prototype,"editor",{hardWrap:{set:function(e){e?this.commands.on("afterExec",s):this.commands.off("afterExec",s)},value:!1}}),t.hardWrap=i}); (function() {
|
||||
window.require(["ace/ext/hardwrap"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.exports="#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"}),define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); (function() {
|
||||
window.require(["ace/ext/keybinding_menu"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-language_tools.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-linking.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() {
|
||||
window.require(["ace/ext/linking"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-modelist.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(){function e(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="^.*\\.("+n+")$",this.extRe=new RegExp(r,"gi")}return e.prototype.supportsFile=function(e){return e.match(this.extRe)},e}(),o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_ARM32:["s"],Assembly_x86:["asm|a"],Astro:["astro"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],Cuttlefish:["conf"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Django:["djt|html.djt|dj.html|djhtml"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Flix:["flix"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nasal:["nas"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],PRQL:["prql"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|mts|cts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Vue:["vue"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Zig:["zig"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}); (function() {
|
||||
window.require(["ace/ext/modelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-options.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-prompt.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-rtl.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;r<e.end.row;r++)n.getLine(r+1).charAt(0)!==n.$bidiHandler.RLE&&(n.doc.$lines[r+1]=n.$bidiHandler.RLE+n.getLine(r+1))}function a(e,t){var n=t.session,r=n.$bidiHandler,i=t.$textLayer.$lines.cells,s=t.layerConfig.width-t.layerConfig.padding+"px";i.forEach(function(e){var t=e.element.style;r&&r.isRtlLine(e.row)?(t.direction="rtl",t.textAlign="right",t.width=s):(t.direction="",t.textAlign="",t.width="")})}function f(e){function n(e){var t=e.element.style;t.direction=t.textAlign=t.width=""}var t=e.$textLayer.$lines;t.cells.forEach(n),t.cellCache.forEach(n)}var r=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{rtlText:{set:function(e){e?(this.on("change",u),this.on("changeSelection",s),this.renderer.on("afterRender",a),this.commands.on("exec",o),this.commands.addCommands(r)):(this.off("change",u),this.off("changeSelection",s),this.renderer.off("afterRender",a),this.commands.off("exec",o),this.commands.removeCommands(r),f(this.renderer)),this.renderer.updateFull()}},rtl:{set:function(e){this.session.$bidiHandler.$isRtl=e,e?(this.setOption("rtlText",!1),this.renderer.on("afterRender",a),this.session.$bidiHandler.seenBidi=!0):(this.renderer.off("afterRender",a),f(this.renderer)),this.renderer.updateFull()}}})}); (function() {
|
||||
window.require(["ace/ext/rtl"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-searchbox.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-settings_menu.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/simple_tokenizer",["require","exports","module","ace/tokenizer","ace/layer/text_util"],function(e,t,n){"use strict";function o(e,t){var n=new s(e,new r(t.getRules())),o=[];for(var u=0;u<n.getLength();u++){var a=n.getTokens(u);o.push(a.map(function(e){return{className:i(e.type)?undefined:"ace_"+e.type.replace(/\./g," ace_"),value:e.value}}))}return o}var r=e("../tokenizer").Tokenizer,i=e("../layer/text_util").isTextToken,s=function(){function e(e,t){this._lines=e.split(/\r\n|\r|\n/),this._states=[],this._tokenizer=t}return e.prototype.getTokens=function(e){var t=this._lines[e],n=this._states[e-1],r=this._tokenizer.getLineTokens(t,n);return this._states[e]=r.state,r.tokens},e.prototype.getLength=function(){return this._lines.length},e}();n.exports={tokenize:o}}); (function() {
|
||||
window.require(["ace/ext/simple_tokenizer"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-spellcheck.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); (function() {
|
||||
window.require(["ace/ext/spellcheck"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-split.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f;f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))},function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}.call(f.prototype),t.Split=f}),define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}); (function() {
|
||||
window.require(["ace/ext/split"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/static-css",["require","exports","module"],function(e,t,n){n.exports=".ace_static_highlight {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', 'Droid Sans Mono', monospace;\n font-size: 12px;\n white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n width: 2em;\n text-align: right;\n padding: 0 3px 0 0;\n margin-right: 3px;\n contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n top: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n content: counter(ace_line, decimal);\n counter-increment: ace_line;\n}\n.ace_static_highlight {\n counter-reset: ace_line;\n}\n"}),define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static-css","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=e("./static-css"),o=e("../config"),u=e("../lib/dom"),a=e("../lib/lang").escapeHTML,f=function(){function e(e){this.className,this.type=e,this.style={},this.textContent=""}return e.prototype.cloneNode=function(){return this},e.prototype.appendChild=function(e){this.textContent+=e.toString()},e.prototype.toString=function(){var e=[];if(this.type!="fragment"){e.push("<",this.type),this.className&&e.push(" class='",this.className,"'");var t=[];for(var n in this.style)t.push(n,":",this.style[n]);t.length&&e.push(" style='",t.join(""),"'"),e.push(">")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push("</",this.type,">"),e.join("")},e}(),l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l<e.childNodes.length;l++){var c=e.childNodes[l];c.nodeType==3?(f+=c.data.length,o+=c.data):a.push(f,c)}}else o=e.textContent,t.trim&&(o=o.trim());h.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight",!0),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};h.render=function(e,t,n,i,s,u){function c(){var r=h.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,f=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||c()}));var l;return t&&typeof t=="object"&&!t.getTokenizer&&(l=t,t=l.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!f[t]||l)f[t]=new e.Mode(l);t=f[t],--a||c()})),--a||c()},h.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var a=new c;a.setSession(u),Object.keys(a.$tabStrings).forEach(function(e){if(typeof a.$tabStrings[e]=="string"){var t=l.createFragment();t.textContent=a.$tabStrings[e],a.$tabStrings[e]=t}}),u.setValue(e);var f=u.getLength(),h=l.createElement("div");h.className=n.cssClass;var p=l.createElement("div");p.className="ace_static_highlight"+(o?"":" ace_show_gutter"),p.style["counter-reset"]="ace_line "+(i-1);for(var d=0;d<f;d++){var v=l.createElement("div");v.className="ace_line";if(!o){var m=l.createElement("span");m.className="ace_gutter ace_gutter-cell",m.textContent="",v.appendChild(m)}a.$renderLine(v,d,!1),v.textContent+="\n",p.appendChild(v)}return h.appendChild(p),{css:s+n.cssText,html:h.toString(),session:u}},n.exports=h,n.exports.highlight=h}); (function() {
|
||||
window.require(["ace/ext/static_highlight"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-statusbar.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)}return e.prototype.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")},e}();t.StatusBar=s}); (function() {
|
||||
window.require(["ace/ext/statusbar"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-textarea.js
Normal file
7
src/ui/app/static/libs/ace/src-min/ext-themelist.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/themelist",["require","exports","module"],function(e,t,n){"use strict";var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub Light Default"],["GitHub (Legacy)","github","light"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["CloudEditor","cloud_editor","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["One Dark","one_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"],["GitHub Dark","github_dark","dark"],["CloudEditor Dark","cloud_editor_dark","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); (function() {
|
||||
window.require(["ace/ext/themelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/ext-whitespace.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]==" ")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:" ",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;a<f;a++){var l=r[a],c=l.search(/\s+$/);a==u&&(c<s[o].column&&c>i&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}); (function() {
|
||||
window.require(["ace/ext/whitespace"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/keybinding-emacs.js
Normal file
7
src/ui/app/static/libs/ace/src-min/keybinding-sublime.js
Normal file
7
src/ui/app/static/libs/ace/src-min/keybinding-vim.js
Normal file
7
src/ui/app/static/libs/ace/src-min/keybinding-vscode.js
Normal file
223
src/ui/app/static/libs/ace/src-min/mode-modsecurity.js
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
ace.define(
|
||||
"ace/mode/modsecurity_highlight_rules",
|
||||
[
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"ace/lib/oop",
|
||||
"ace/mode/text_highlight_rules",
|
||||
],
|
||||
function (acequire, exports, module) {
|
||||
"use strict";
|
||||
var oop = acequire("ace/lib/oop");
|
||||
var TextHighlightRules = acequire(
|
||||
"ace/mode/text_highlight_rules"
|
||||
).TextHighlightRules;
|
||||
|
||||
var ModSecurityHighlightRules = function () {
|
||||
// Define all regex patterns from the JSON object
|
||||
this.$rules = {
|
||||
start: [
|
||||
// Comment line starting with #
|
||||
{
|
||||
token: "comment.line.hash.ini",
|
||||
regex: /^(?:\s)*(#).*$\n?/,
|
||||
},
|
||||
// SecMarker directive
|
||||
{
|
||||
token: ["keyword.headers.modsecurity.directive.marker", "text"],
|
||||
regex:
|
||||
/^\s*(SecMarker)\s+("(?:[\w:\.\-_/]+)"|(?:[\w:\.\-_/]+)|'(?:[\w:\.\-_/]+)')\s*$/,
|
||||
},
|
||||
// ModSecurity directives
|
||||
{
|
||||
token: "keyword.headers.modsecurity.directive",
|
||||
regex:
|
||||
/^\s*(?:SecAction|SecArgumentSeparator|SecAuditEngine|SecAuditLog|SecAuditLog2|SecAuditLogDirMode|SecAuditLogFormat|SecAuditLogFileMode|SecAuditLogParts|SecAuditLogRelevantStatus|SecAuditLogStorageDir|SecAuditLogType|SecCacheTransformations|SecChrootDir|SecCollectionTimeout|SecComponentSignature|SecConnEngine|SecContentInjection|SecCookieFormat|SecCookieV0Separator|SecDataDir|SecDebugLog|SecDebugLogLevel|SecDefaultAction|SecDisableBackendCompression|SecHashEngine|SecHashKey|SecHashParam|SecHashMethodRx|SecHashMethodPm|SecGeoLookupDb|SecGsbLookupDb|SecGuardianLog|SecHttpBlKey|SecInterceptOnError|SecMarker|SecPcreMatchLimit|SecPcreMatchLimitRecursion|SecPdfProtect|SecPdfProtectMethod|SecPdfProtectSecret|SecPdfProtectTimeout|SecPdfProtectTokenName|SecReadStateLimit|SecConnReadStateLimit|SecSensorId|SecWriteStateLimit|SecConnWriteStateLimit|SecRemoteRules|SecRemoteRulesFailAction|SecRequestBodyAccess|SecRequestBodyInMemoryLimit|SecRequestBodyLimit|SecRequestBodyNoFilesLimit|SecRequestBodyLimitAction|SecResponseBodyLimit|SecResponseBodyLimitAction|SecResponseBodyMimeType|SecResponseBodyMimeTypesClear|SecResponseBodyAccess|SecRule|SecRuleInheritance|SecRuleEngine|SecRulePerfTime|SecRuleRemoveById|SecRuleRemoveByMsg|SecRuleRemoveByTag|SecRuleScript|SecRuleUpdateActionById|SecRuleUpdateTargetById|SecRuleUpdateTargetByMsg|SecRuleUpdateTargetByTag|SecServerSignature|SecStatusEngine|SecStreamInBodyInspection|SecStreamOutBodyInspection|SecTmpDir|SecUnicodeMapFile|SecUnicodeCodePage|SecUploadDir|SecUploadFileLimit|SecUploadFileMode|SecUploadKeepFiles|SecWebAppId|SecXmlExternalEntity)\b/i,
|
||||
},
|
||||
// Common typos
|
||||
{
|
||||
token: "invalid.illegal.modsecurity",
|
||||
regex: /(?:^|\s)(ARGS[:\.]ARGS[:\.]|TX[:\.]TX[:\.])/i,
|
||||
},
|
||||
// Bare variables
|
||||
{
|
||||
token: "variable.parameter.modsecurity",
|
||||
regex:
|
||||
/(?:^|\s)(!?\b(?:XML|WEBSERVER_ERROR_LOG|WEBAPPID|USERAGENT_IP|USERID|URLENCODED_ERROR|UNIQUE_ID|TX|TIME_YEAR|TIME_WDAY|TIME_SEC|TIME_MON|TIME_MIN|TIME_HOUR|TIME_EPOCH|TIME_DAY|TIME|STREAM_OUTPUT_BODY|STREAM_INPUT_BODY|SESSIONID|STATUS_LINE|SESSION|SERVER_PORT|SERVER_NAME|SERVER_ADDR|SDBM_DELETE_ERROR|SCRIPT_USERNAME|SCRIPT_UID|SCRIPT_MODE|SCRIPT_GROUPNAME|SCRIPT_GID|SCRIPT_FILENAME|SCRIPT_BASENAME|RULE|RESPONSE_STATUS|RESPONSE_PROTOCOL|RESPONSE_HEADERS_NAMES|RESPONSE_HEADERS|RESPONSE_CONTENT_TYPE|RESPONSE_CONTENT_LENGTH|RESPONSE_BODY|REQUEST_URI_RAW|REQUEST_URI|REQUEST_PROTOCOL|REQUEST_METHOD|REQUEST_LINE|REQUEST_HEADERS_NAMES|REQUEST_HEADERS|REQUEST_FILENAME|REQUEST_COOKIES_NAMES|REQUEST_COOKIES|REQUEST_BODY_LENGTH|REQUEST_BODY|REQUEST_BASENAME|REQBODY_PROCESSOR|REQBODY_ERROR_MSG|REQBODY_ERROR|REMOTE_USER|REMOTE_PORT|REMOTE_HOST|REMOTE_ADDR|QUERY_STRING|PERF_SWRITE|PERF_SREAD|PERF_RULES|PERF_PHASE5|PERF_PHASE4|PERF_PHASE3|PERF_PHASE2|PERF_PHASE1|PERF_LOGGING|PERF_GC|PERF_COMBINED|PERF_ALL|PATH_INFO|OUTBOUND_DATA_ERROR|MULTIPART_UNMATCHED_BOUNDARY|MULTIPART_STRICT_ERROR|MULTIPART_NAME|MULTIPART_FILENAME|MULTIPART_CRLF_LF_LINES|MODSEC_BUILD|MATCHED_VARS_NAMES|MATCHED_VAR_NAME|MATCHED_VARS|MATCHED_VAR|INBOUND_DATA_ERROR|HIGHEST_SEVERITY|GEO|FILES_TMP_CONTENT|FILES_TMPNAMES|FILES_SIZES|FULL_REQUEST_LENGTH|FULL_REQUEST|FILES_NAMES|FILES_COMBINED_SIZE|FILES|ENV|DURATION|AUTH_TYPE|ARGS_POST_NAMES|ARGS_POST|ARGS_NAMES|ARGS_GET_NAMES|ARGS_GET|ARGS_COMBINED_SIZE|ARGS)(?:[:\.][A-Za-z0-9\/\-\_\[\]\*]+|\b))/i,
|
||||
},
|
||||
// Macro expanded variables
|
||||
{
|
||||
token: [
|
||||
"keyword.macro.modsecurity",
|
||||
"variable.parameter.modsecurity",
|
||||
"text",
|
||||
],
|
||||
regex: /(%\{)([^\}]*)(\})/,
|
||||
},
|
||||
// Rule action - runtime configuration (ctl)
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.ctl",
|
||||
"keyword.operator.modsecurity.action.ctl.name",
|
||||
"punctuation.equals.modsecurity",
|
||||
"constant.numeric.modsecurity.action.ctl.parameter",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(ctl:)(auditEngine|auditLogParts|debugLogLevel|forceRequestBodyVariable|requestBodyAccess|requestBodyLimit|requestBodyProcessor|responseBodyAccess|responseBodyLimit|ruleEngine|ruleRemoveById|ruleRemoveByMsg|ruleRemoveByTag|ruleRemoveTargetById|ruleRemoveTargetByMsg|ruleRemoveTargetByTag|hashEngine|hashEnforcement)(=)((?:\d+)|(?:[\w\s:\.\-_/+]+))/i,
|
||||
},
|
||||
// Rule action - transform (t)
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.transform",
|
||||
"constant.numeric.modsecurity.action.transform_name",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(t):'?(base64DecodeExt|base64Decode|sqlHexDecode|base64Encode|cmdLine|compressWhitespace|cssDecode|escapeSeqDecode|hexDecode|hexEncode|htmlEntityDecode|jsDecode|length|lowercase|md5|none|normalisePathWin|normalisePath|normalizePathWin|normalizePath|parityEven7bit|parityOdd7bit|parityZero7bit|removeNulls|removeWhitespace|replaceComments|removeCommentsChar|removeComments|replaceNulls|urlDecodeUni|urlDecode|uppercase|urlEncode|utf8toUnicode|sha1|trimLeft|trimRight|trim)'?/i,
|
||||
},
|
||||
// Rule action - phase
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.phase",
|
||||
"punctuation.colon.modsecurity",
|
||||
"constant.numeric.modsecurity.action.phase_name",
|
||||
],
|
||||
regex: /(^|,|\s)(phase)(:)'?(response|request|1|2|3|4|5)'?/i,
|
||||
},
|
||||
// Rule action - severity
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action.severity",
|
||||
"punctuation.colon.modsecurity",
|
||||
"constant.numeric.modsecurity.action.severity_name",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(severity)(:)'?(NOTICE|WARNING|ERROR|CRITICAL|1|2|3|4|5)'?/i,
|
||||
},
|
||||
// Rule action - with parameter
|
||||
{
|
||||
token: [
|
||||
"text",
|
||||
"keyword.operator.modsecurity.action",
|
||||
"punctuation.colon.modsecurity",
|
||||
],
|
||||
regex:
|
||||
/(^|,|\s)(accuracy|append|deprecatevar|exec|expirevar|id|initcol|logdata|maturity|msg|pause|prepend|rev|sanitiseArg|sanitiseMatched|sanitiseMatchedBytes|sanitiseRequestHeader|sanitiseResponseHeader|setuid|setrsc|setsid|setenv|setvar|skip|skipAfter|status|tag|ver|xmlns)(:)(?:'?(?:\d+)'?|(?:\d+)|'(?:[\w\s:\.\-_/(),]+)'|[\w\s:\.\-_/(),]+)/i,
|
||||
},
|
||||
// Rule action - without parameters
|
||||
{
|
||||
token: "keyword.operator.modsecurity.action",
|
||||
regex:
|
||||
/(^|,|\s)(auditlog|capture|log|multiMatch|noauditlog|nolog)\b/i,
|
||||
},
|
||||
// Rule action - disruptive actions without parameters
|
||||
{
|
||||
token: "entity.name.function.modsecurity.action.disruptive_pass",
|
||||
regex: /(^|,|\s)(allow|block|deny|drop|pass|chain)\b/i,
|
||||
},
|
||||
// Regexp operator and operand, e.g., "@rx foo"
|
||||
{
|
||||
token: ["keyword.control.modsecurity", "string.regexp.modsecurity"],
|
||||
regex: /"(!?@rx)\s+((?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// pm operator and operand, e.g., "@pm foo"
|
||||
{
|
||||
token: [
|
||||
"keyword.control.modsecurity",
|
||||
"string.unquoted.modsecurity",
|
||||
],
|
||||
regex: /"(!?@pm)\s+((?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// Operator, e.g., @contains
|
||||
{
|
||||
token: "keyword.control.modsecurity",
|
||||
regex:
|
||||
/@(?:beginsWith|contains|containsWord|detectSQLi|detectXSS|endsWith|fuzzyHash|eq|ge|geoLookup|gsbLookup|gt|inspectFile|ipMatch|ipMatchF|ipMatchFromFile|le|lt|noMatch|pmf|pmFromFile|rbl|rsub|streq|strmatch|unconditionalMatch|validateByteRange|validateDTD|validateHash|validateSchema|validateUrlEncoding|validateUtf8Encoding|verifyCC|verifyCPF|verifySSN|within)\b/i,
|
||||
},
|
||||
// Implicit regexp operator by double-quoted string
|
||||
{
|
||||
token: "string.regexp.modsecurity",
|
||||
regex: /"([^@](?:[^"\\]|\\.)*)"/i,
|
||||
},
|
||||
// IP address/network
|
||||
{
|
||||
token: "constant.other.modsecurity.ip",
|
||||
regex: /\b\d+\.\d+\.\d+\.\d+(?:\/\d+)?\b/,
|
||||
},
|
||||
// Numbers, e.g., rule IDs
|
||||
{
|
||||
token: "constant.numeric.modsecurity",
|
||||
regex: /\b\d+(\.\d+)?/,
|
||||
},
|
||||
// Apache configuration directives and tags
|
||||
{
|
||||
token: [
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
"entity.tag.apacheconf",
|
||||
"text",
|
||||
"string.value.apacheconf",
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
],
|
||||
regex:
|
||||
/(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(\s(.+?))?(>)/,
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
"entity.tag.apacheconf",
|
||||
"punctuation.definition.tag.apacheconf",
|
||||
],
|
||||
regex:
|
||||
/(<\/)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(>)/,
|
||||
},
|
||||
// Additional Apache configuration directives
|
||||
// ... (You can include more rules here as per your JSON patterns)
|
||||
],
|
||||
};
|
||||
|
||||
// Normalize the rules to ensure proper functionality
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(ModSecurityHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ModSecurityHighlightRules = ModSecurityHighlightRules;
|
||||
}
|
||||
);
|
||||
|
||||
ace.define(
|
||||
"ace/mode/modsecurity",
|
||||
[
|
||||
"require",
|
||||
"exports",
|
||||
"module",
|
||||
"ace/lib/oop",
|
||||
"ace/mode/text",
|
||||
"ace/mode/modsecurity_highlight_rules",
|
||||
],
|
||||
function (acequire, exports, module) {
|
||||
"use strict";
|
||||
var oop = acequire("ace/lib/oop");
|
||||
var TextMode = acequire("ace/mode/text").Mode;
|
||||
|
||||
var ModSecurityHighlightRules = acequire(
|
||||
"ace/mode/modsecurity_highlight_rules"
|
||||
).ModSecurityHighlightRules;
|
||||
|
||||
var Mode = function () {
|
||||
this.HighlightRules = ModSecurityHighlightRules;
|
||||
this.lineCommentStart = "#";
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function () {
|
||||
this.$id = "ace/mode/modsecurity";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}
|
||||
);
|
||||
7
src/ui/app/static/libs/ace/src-min/mode-nginx.js
Normal file
7
src/ui/app/static/libs/ace/src-min/mode-text.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/mode/text"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/abap.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/abap"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/abc.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/snippets/abc.snippets",["require","exports","module"],function(e,t,n){n.exports='\nsnippet zupfnoter.print\n %%%%hn.print {"startpos": ${1:pos_y}, "t":"${2:title}", "v":[${3:voices}], "s":[[${4:syncvoices}1,2]], "f":[${5:flowlines}], "sf":[${6:subflowlines}], "j":[${7:jumplines}]}\n\nsnippet zupfnoter.note\n %%%%hn.note {"pos": [${1:pos_x},${2:pos_y}], "text": "${3:text}", "style": "${4:style}"}\n\nsnippet zupfnoter.annotation\n %%%%hn.annotation {"id": "${1:id}", "pos": [${2:pos}], "text": "${3:text}"}\n\nsnippet zupfnoter.lyrics\n %%%%hn.lyrics {"pos": [${1:x_pos},${2:y_pos}]}\n\nsnippet zupfnoter.legend\n %%%%hn.legend {"pos": [${1:x_pos},${2:y_pos}]}\n\n\n\nsnippet zupfnoter.target\n "^:${1:target}"\n\nsnippet zupfnoter.goto\n "^@${1:target}@${2:distance}"\n\nsnippet zupfnoter.annotationref\n "^#${1:target}"\n\nsnippet zupfnoter.annotation\n "^!${1:text}@${2:x_offset},${3:y_offset}"\n\n\n'}),define("ace/snippets/abc",["require","exports","module","ace/snippets/abc.snippets"],function(e,t,n){"use strict";t.snippetText=e("./abc.snippets"),t.scope="abc"}); (function() {
|
||||
window.require(["ace/snippets/abc"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/snippets/actionscript.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet main\n package {\n import flash.display.*;\n import flash.Events.*;\n \n public class Main extends Sprite {\n public function Main ( ) {\n trace("start");\n stage.scaleMode = StageScaleMode.NO_SCALE;\n stage.addEventListener(Event.RESIZE, resizeListener);\n }\n \n private function resizeListener (e:Event):void {\n trace("The application window changed size!");\n trace("New width: " + stage.stageWidth);\n trace("New height: " + stage.stageHeight);\n }\n \n }\n \n }\nsnippet class\n ${1:public|internal} class ${2:name} ${3:extends } {\n public function $2 ( ) {\n ("start");\n }\n }\nsnippet all\n package name {\n\n ${1:public|internal|final} class ${2:name} ${3:extends } {\n private|public| static const FOO = "abc";\n private|public| static var BAR = "abc";\n\n // class initializer - no JIT !! one time setup\n if Cababilities.os == "Linux|MacOS" {\n FOO = "other";\n }\n\n // constructor:\n public function $2 ( ){\n super2();\n trace("start");\n }\n public function name (a, b...){\n super.name(..);\n lable:break\n }\n }\n }\n\n function A(){\n // A can only be accessed within this file\n }\nsnippet switch\n switch(${1}){\n case ${2}:\n ${3}\n break;\n default:\n }\nsnippet case\n case ${1}:\n ${2}\n break;\nsnippet package\n package ${1:package}{\n ${2}\n }\nsnippet wh\n while ${1:cond}{\n ${2}\n }\nsnippet do\n do {\n ${2}\n } while (${1:cond})\nsnippet while\n while ${1:cond}{\n ${2}\n }\nsnippet for enumerate names\n for (${1:var} in ${2:object}){\n ${3}\n }\nsnippet for enumerate values\n for each (${1:var} in ${2:object}){\n ${3}\n }\nsnippet get_set\n function get ${1:name} {\n return ${2}\n }\n function set $1 (newValue) {\n ${3}\n }\nsnippet interface\n interface name {\n function method(${1}):${2:returntype};\n }\nsnippet try\n try {\n ${1}\n } catch (error:ErrorType) {\n ${2}\n } finally {\n ${3}\n }\n# For Loop (same as c.snippet)\nsnippet for for (..) {..}\n for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }\n# Custom For Loop\nsnippet forr\n for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {\n ${5:/* code */}\n }\n# If Condition\nsnippet if\n if (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet el\n else {\n ${1}\n }\n# Ternary conditional\nsnippet t\n ${1:/* condition */} ? ${2:a} : ${3:b}\nsnippet fun\n function ${1:function_name}(${2})${3}\n {\n ${4:/* code */}\n }\n# FlxSprite (usefull when using the flixel library)\nsnippet FlxSprite\n package\n {\n import org.flixel.*\n\n public class ${1:ClassName} extends ${2:FlxSprite}\n {\n public function $1(${3: X:Number, Y:Number}):void\n {\n super(X,Y);\n ${4: //code...}\n }\n\n override public function update():void\n {\n super.update();\n ${5: //code...}\n }\n }\n }\n\n'}),define("ace/snippets/actionscript",["require","exports","module","ace/snippets/actionscript.snippets"],function(e,t,n){"use strict";t.snippetText=e("./actionscript.snippets"),t.scope="actionscript"}); (function() {
|
||||
window.require(["ace/snippets/actionscript"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/ada.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/ada"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/alda.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/alda"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/apache_conf"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/apex.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/apex"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/applescript"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/aql.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/aql"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/asciidoc.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/asciidoc"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/asl.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/asl"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/assembly_arm32"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/assembly_x86"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/astro.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/astro"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/autohotkey"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/batchfile.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/batchfile"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/bibtex.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/bibtex"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/c9search.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/c9search"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/c_cpp.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/snippets/c_cpp.snippets",["require","exports","module"],function(e,t,n){n.exports="## STL Collections\n# std::array\nsnippet array\n std::array<${1:T}, ${2:N}> ${3};${4}\n# std::vector\nsnippet vector\n std::vector<${1:T}> ${2};${3}\n# std::deque\nsnippet deque\n std::deque<${1:T}> ${2};${3}\n# std::forward_list\nsnippet flist\n std::forward_list<${1:T}> ${2};${3}\n# std::list\nsnippet list\n std::list<${1:T}> ${2};${3}\n# std::set\nsnippet set\n std::set<${1:T}> ${2};${3}\n# std::map\nsnippet map\n std::map<${1:Key}, ${2:T}> ${3};${4}\n# std::multiset\nsnippet mset\n std::multiset<${1:T}> ${2};${3}\n# std::multimap\nsnippet mmap\n std::multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_set\nsnippet uset\n std::unordered_set<${1:T}> ${2};${3}\n# std::unordered_map\nsnippet umap\n std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_multiset\nsnippet umset\n std::unordered_multiset<${1:T}> ${2};${3}\n# std::unordered_multimap\nsnippet ummap\n std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::stack\nsnippet stack\n std::stack<${1:T}> ${2};${3}\n# std::queue\nsnippet queue\n std::queue<${1:T}> ${2};${3}\n# std::priority_queue\nsnippet pqueue\n std::priority_queue<${1:T}> ${2};${3}\n##\n## Access Modifiers\n# private\nsnippet pri\n private\n# protected\nsnippet pro\n protected\n# public\nsnippet pub\n public\n# friend\nsnippet fr\n friend\n# mutable\nsnippet mu\n mutable\n## \n## Class\n# class\nsnippet cl\n class ${1:`Filename('$1', 'name')`} \n {\n public:\n $1(${2});\n ~$1();\n\n private:\n ${3:/* data */}\n };\n# member function implementation\nsnippet mfun\n ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n ${5:/* code */}\n }\n# namespace\nsnippet ns\n namespace ${1:`Filename('', 'my')`} {\n ${2}\n } /* namespace $1 */\n##\n## Input/Output\n# std::cout\nsnippet cout\n std::cout << ${1} << std::endl;${2}\n# std::cin\nsnippet cin\n std::cin >> ${1};${2}\n##\n## Iteration\n# for i \nsnippet fori\n for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }${5}\n\n# foreach\nsnippet fore\n for (${1:auto} ${2:i} : ${3:container}) {\n ${4:/* code */}\n }${5}\n# iterator\nsnippet iter\n for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n ${6}\n }${7}\n\n# auto iterator\nsnippet itera\n for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n ${2:std::cout << *$1 << std::endl;}\n }${3}\n##\n## Lambdas\n# lamda (one line)\nsnippet ld\n [${1}](${2}){${3:/* code */}}${4}\n# lambda (multi-line)\nsnippet lld\n [${1}](${2}){\n ${3:/* code */}\n }${4}\n"}),define("ace/snippets/c_cpp",["require","exports","module","ace/snippets/c_cpp.snippets"],function(e,t,n){"use strict";t.snippetText=e("./c_cpp.snippets"),t.scope="c_cpp"}); (function() {
|
||||
window.require(["ace/snippets/c_cpp"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/cirru.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/cirru"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/clojure.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/snippets/clojure.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet comm\n (comment\n ${1}\n )\nsnippet condp\n (condp ${1:pred} ${2:expr}\n ${3})\nsnippet def\n (def ${1})\nsnippet defm\n (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n ${5})\nsnippet defmm\n (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n (defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n ${4})\nsnippet defp\n (defprotocol ${1:name}\n ${2})\nsnippet defr\n (defrecord ${1:name} [${2:fields}]\n ${3:protocol}\n ${4})\nsnippet deft\n (deftest ${1:name}\n (is (= ${2:assertion})))\n ${3})\nsnippet is\n (is (= ${1} ${2}))\nsnippet defty\n (deftype ${1:Name} [${2:fields}]\n ${3:Protocol}\n ${4})\nsnippet doseq\n (doseq [${1:elem} ${2:coll}]\n ${3})\nsnippet fn\n (fn [${1:arg-list}] ${2})\nsnippet if\n (if ${1:test-expr}\n ${2:then-expr}\n ${3:else-expr})\nsnippet if-let \n (if-let [${1:result} ${2:test-expr}]\n (${3:then-expr} $1)\n (${4:else-expr}))\nsnippet imp\n (:import [${1:package}])\n & {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n (let [${1:name} ${2:expr}]\n ${3})\nsnippet letfn\n (letfn [(${1:name) [${2:args}]\n ${3})])\nsnippet map\n (map ${1:func} ${2:coll})\nsnippet mapl\n (map #(${1:lambda}) ${2:coll})\nsnippet met\n (${1:name} [${2:this} ${3:args}]\n ${4})\nsnippet ns\n (ns ${1:name}\n ${2})\nsnippet dotimes\n (dotimes [_ 10]\n (time\n (dotimes [_ ${1:times}]\n ${2})))\nsnippet pmethod\n (${1:name} [${2:this} ${3:args}])\nsnippet refer\n (:refer-clojure :exclude [${1}])\nsnippet require\n (:require [${1:namespace} :as [${2}]])\nsnippet use\n (:use [${1:namespace} :only [${2}]])\nsnippet print\n (println ${1})\nsnippet reduce\n (reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n (when ${1:test} ${2:body})\nsnippet when-let\n (when-let [${1:result} ${2:test}]\n ${3:body})\n'}),define("ace/snippets/clojure",["require","exports","module","ace/snippets/clojure.snippets"],function(e,t,n){"use strict";t.snippetText=e("./clojure.snippets"),t.scope="clojure"}); (function() {
|
||||
window.require(["ace/snippets/clojure"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/cobol.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/cobol"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/coffee.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define("ace/snippets/coffee.snippets",["require","exports","module"],function(e,t,n){n.exports="# Closure loop\nsnippet forindo\n for ${1:name} in ${2:array}\n do ($1) ->\n ${3:// body}\n# Array comprehension\nsnippet fora\n for ${1:name} in ${2:array}\n ${3:// body...}\n# Object comprehension\nsnippet foro\n for ${1:key}, ${2:value} of ${3:object}\n ${4:// body...}\n# Range comprehension (inclusive)\nsnippet forr\n for ${1:name} in [${2:start}..${3:finish}]\n ${4:// body...}\nsnippet forrb\n for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n ${5:// body...}\n# Range comprehension (exclusive)\nsnippet forrex\n for ${1:name} in [${2:start}...${3:finish}]\n ${4:// body...}\nsnippet forrexb\n for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n ${5:// body...}\n# Function\nsnippet fun\n (${1:args}) ->\n ${2:// body...}\n# Function (bound)\nsnippet bfun\n (${1:args}) =>\n ${2:// body...}\n# Class\nsnippet cla class ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n ${2}\nsnippet cla class .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n constructor: (${2:args}) ->\n ${3}\n\n ${4}\nsnippet cla class .. extends ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n ${3}\nsnippet cla class .. extends .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n constructor: (${3:args}) ->\n ${4}\n\n ${5}\n# If\nsnippet if\n if ${1:condition}\n ${2:// body...}\n# If __ Else\nsnippet ife\n if ${1:condition}\n ${2:// body...}\n else\n ${3:// body...}\n# Else if\nsnippet elif\n else if ${1:condition}\n ${2:// body...}\n# Ternary If\nsnippet ifte\n if ${1:condition} then ${2:value} else ${3:other}\n# Unless\nsnippet unl\n ${1:action} unless ${2:condition}\n# Switch\nsnippet swi\n switch ${1:object}\n when ${2:value}\n ${3:// body...}\n\n# Log\nsnippet log\n console.log ${1}\n# Try __ Catch\nsnippet try\n try\n ${1}\n catch ${2:error}\n ${3}\n# Require\nsnippet req\n ${2:$1} = require '${1:sys}'${3}\n# Export\nsnippet exp\n ${1:root} = exports ? this\n"}),define("ace/snippets/coffee",["require","exports","module","ace/snippets/coffee.snippets"],function(e,t,n){"use strict";t.snippetText=e("./coffee.snippets"),t.scope="coffee"}); (function() {
|
||||
window.require(["ace/snippets/coffee"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/coldfusion"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
7
src/ui/app/static/libs/ace/src-min/snippets/crystal.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; (function() {
|
||||
window.require(["ace/snippets/crystal"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||