diff --git a/_embed b/_embed deleted file mode 160000 index 9393fcac..00000000 --- a/_embed +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9393fcac3548131e8e7f621d56710943d5c3fdcf diff --git a/assss/public/css/fonts.css b/assss/public/css/fonts.css new file mode 100644 index 00000000..1911d377 --- /dev/null +++ b/assss/public/css/fonts.css @@ -0,0 +1,137 @@ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-cyrillic-ext.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-cyrillic.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-greek-ext.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-greek.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-vietnamese.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-latin-ext.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url(roboto/normal-latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-cyrillic-ext.woff2) format('woff2'); + unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-cyrillic.woff2) format('woff2'); + unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-greek-ext.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-greek.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-vietnamese.woff2) format('woff2'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-latin-ext.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 500; + src: local('Roboto Medium'), local('Roboto-Medium'), url(roboto/medium-latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; +} + +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: local('Material Icons'), local('MaterialIcons-Regular'), url(material/icons.woff2) format('woff2'); +} + +.prompt .file-list ul li:before, +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + font-feature-settings: 'liga'; +} diff --git a/assss/public/css/material/icons.woff2 b/assss/public/css/material/icons.woff2 new file mode 100644 index 00000000..9fa21125 Binary files /dev/null and b/assss/public/css/material/icons.woff2 differ diff --git a/assss/public/css/normalize.css b/assss/public/css/normalize.css new file mode 100644 index 00000000..9b77e0eb --- /dev/null +++ b/assss/public/css/normalize.css @@ -0,0 +1,461 @@ +/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ + +/** + * 1. Change the default font family in all browsers (opinionated). + * 2. Correct the line height in all browsers. + * 3. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + +/* Document + ========================================================================== */ + +html { + font-family: sans-serif; /* 1 */ + line-height: 1.15; /* 2 */ + -ms-text-size-adjust: 100%; /* 3 */ + -webkit-text-size-adjust: 100%; /* 3 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers (opinionated). + */ + +body { + margin: 0; +} + +/** + * Add the correct display in IE 9-. + */ + +article, +aside, +footer, +header, +nav, +section { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + +figcaption, +figure, +main { /* 1 */ + display: block; +} + +/** + * Add the correct margin in IE 8. + */ + +figure { + margin: 1em 40px; +} + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + +a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ +} + +/** + * Remove the outline on focused links when they are also active or hovered + * in all browsers (opinionated). + */ + +a:active, +a:hover { + outline-width: 0; +} + +/** + * 1. Remove the bottom border in Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + +b, +strong { + font-weight: inherit; +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font style in Android 4.3-. + */ + +dfn { + font-style: italic; +} + +/** + * Add the correct background and color in IE 9-. + */ + +mark { + background-color: #ff0; + color: #000; +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +audio, +video { + display: inline-block; +} + +/** + * Add the correct display in iOS 4-7. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Remove the border on images inside links in IE 10-. + */ + +img { + border-style: none; +} + +/** + * Hide the overflow in IE. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + +button, +html [type="button"], /* 1 */ +[type="reset"], +[type="submit"] { + -webkit-appearance: button; /* 2 */ +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Change the border, margin, and padding in all browsers (opinionated). + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Remove the default vertical scrollbar in IE. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + +details, /* 1 */ +menu { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Scripting + ========================================================================== */ + +/** + * Add the correct display in IE 9-. + */ + +canvas { + display: inline-block; +} + +/** + * Add the correct display in IE. + */ + +template { + display: none; +} + +/* Hidden + ========================================================================== */ + +/** + * Add the correct display in IE 10-. + */ + +[hidden] { + display: none; +} diff --git a/assss/public/css/roboto/medium-cyrillic-ext.woff2 b/assss/public/css/roboto/medium-cyrillic-ext.woff2 new file mode 100644 index 00000000..f63bc9a1 Binary files /dev/null and b/assss/public/css/roboto/medium-cyrillic-ext.woff2 differ diff --git a/assss/public/css/roboto/medium-cyrillic.woff2 b/assss/public/css/roboto/medium-cyrillic.woff2 new file mode 100644 index 00000000..b3ca824d Binary files /dev/null and b/assss/public/css/roboto/medium-cyrillic.woff2 differ diff --git a/assss/public/css/roboto/medium-greek-ext.woff2 b/assss/public/css/roboto/medium-greek-ext.woff2 new file mode 100644 index 00000000..7e1a8078 Binary files /dev/null and b/assss/public/css/roboto/medium-greek-ext.woff2 differ diff --git a/assss/public/css/roboto/medium-greek.woff2 b/assss/public/css/roboto/medium-greek.woff2 new file mode 100644 index 00000000..314cf3f8 Binary files /dev/null and b/assss/public/css/roboto/medium-greek.woff2 differ diff --git a/assss/public/css/roboto/medium-latin-ext.woff2 b/assss/public/css/roboto/medium-latin-ext.woff2 new file mode 100644 index 00000000..604b8935 Binary files /dev/null and b/assss/public/css/roboto/medium-latin-ext.woff2 differ diff --git a/assss/public/css/roboto/medium-latin.woff2 b/assss/public/css/roboto/medium-latin.woff2 new file mode 100644 index 00000000..5f96609d Binary files /dev/null and b/assss/public/css/roboto/medium-latin.woff2 differ diff --git a/assss/public/css/roboto/medium-vietnamese.woff2 b/assss/public/css/roboto/medium-vietnamese.woff2 new file mode 100644 index 00000000..d92b7125 Binary files /dev/null and b/assss/public/css/roboto/medium-vietnamese.woff2 differ diff --git a/assss/public/css/roboto/normal-cyrillic-ext.woff2 b/assss/public/css/roboto/normal-cyrillic-ext.woff2 new file mode 100644 index 00000000..e4546e49 Binary files /dev/null and b/assss/public/css/roboto/normal-cyrillic-ext.woff2 differ diff --git a/assss/public/css/roboto/normal-cyrillic.woff2 b/assss/public/css/roboto/normal-cyrillic.woff2 new file mode 100644 index 00000000..d08397f7 Binary files /dev/null and b/assss/public/css/roboto/normal-cyrillic.woff2 differ diff --git a/assss/public/css/roboto/normal-greek-ext.woff2 b/assss/public/css/roboto/normal-greek-ext.woff2 new file mode 100644 index 00000000..ed0b13ca Binary files /dev/null and b/assss/public/css/roboto/normal-greek-ext.woff2 differ diff --git a/assss/public/css/roboto/normal-greek.woff2 b/assss/public/css/roboto/normal-greek.woff2 new file mode 100644 index 00000000..f630772d Binary files /dev/null and b/assss/public/css/roboto/normal-greek.woff2 differ diff --git a/assss/public/css/roboto/normal-latin-ext.woff2 b/assss/public/css/roboto/normal-latin-ext.woff2 new file mode 100644 index 00000000..0c7aec28 Binary files /dev/null and b/assss/public/css/roboto/normal-latin-ext.woff2 differ diff --git a/assss/public/css/roboto/normal-latin.woff2 b/assss/public/css/roboto/normal-latin.woff2 new file mode 100644 index 00000000..120796bb Binary files /dev/null and b/assss/public/css/roboto/normal-latin.woff2 differ diff --git a/assss/public/css/roboto/normal-vietnamese.woff2 b/assss/public/css/roboto/normal-vietnamese.woff2 new file mode 100644 index 00000000..7936b665 Binary files /dev/null and b/assss/public/css/roboto/normal-vietnamese.woff2 differ diff --git a/assss/public/css/styles.css b/assss/public/css/styles.css new file mode 100644 index 00000000..01f2ee86 --- /dev/null +++ b/assss/public/css/styles.css @@ -0,0 +1,1208 @@ +body { + font-family: 'Roboto', sans-serif; + padding-top: 7.8em; + background-color: #f8f8f8; +} + +* { + box-sizing: border-box; +} + +*, +*:hover, +*:active, +*:focus { + outline: 0 +} + +a { + text-decoration: none; +} + +img { + max-width: 100%; +} + +audio, +video { + width: 100%; +} + +pre { + padding: 1em; + border: 1px solid #e6e6e6; + border-radius: 0.5em; + background-color: #f5f5f5; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; +} + +button { + border: 0; + padding: .5em 1em; + margin-left: .5em; + border-radius: .1em; + background-color; + cursor: pointer; + background: #2196f3; + color: #fff; + border: 1px solid rgba(0, 0, 0, 0.05); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.05); + transition: .1s ease all; +} + +button:hover { + background-color: #1E88E5; +} + +.mobile-only { + display: none !important; +} + +.container { + width: 95%; + max-width: 960px; + margin: 1em auto 0; +} + +i.spin { + animation: 1s spin linear infinite; +} + +.pdf { + width: 100%; + height: calc(100vh - 13em); +} + + +/* * * * * * * * * * * * * * * * + * EDITOR * + * * * * * * * * * * * * * * * */ + +#editor .source { + display: none; +} + +#editor .content { + background: #fff; + padding: 1em 0; +} + +#editor #ace, +#editor h2, +#editor .frontmatter { + width: 95%; + max-width: 960px; + margin: 1em auto 0; +} + +#editor h2 { + margin: 1.5em auto 1em; + color: rgba(0, 0, 0, 0.3); + font-weight: 500; +} + +#editor .ace_gutter { + background-color: #fff; +} + + +/* * * * * * * * * * * * * * * * + * EDITOR - MARKDOWN * + * * * * * * * * * * * * * * * */ + +.frontmatter { + column-count: 3; + column-gap: 1em; + column-fill: balance; + /* display: flex; */ + /* flex-wrap: wrap; */ + /* justify-content: space-between; */ + /* flex-grow: 1; */ +} + +.frontmatter label { + display: block; + width: calc(100% - 1em); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +.frontmatter label, +.frontmatter h3 { + font-weight: 500; + margin: 0 0; + color: rgba(0, 0, 0, 0.6); +} + +.frontmatter input, +.frontmatter textarea { + display: block; + width: 100%; + border: 0; + margin-top: .5em; + padding: 0; + line-height: 1; +} + +.frontmatter .block, +.frontmatter fieldset[data-type="array"], +.button { + position: relative; + background: #fff; + border-radius: .2em; + border: 1px solid rgba(0, 0, 0, 0.075); + padding: .5em; + break-inside: avoid; + margin: 0 0 1em; + width: 100%; + display: inline-block; +} + +.frontmatter fieldset[data-type="object"] { + position: relative; + margin: 0; +} + +.frontmatter .button { + background-color: #2196f3; + color: #fff; + cursor: pointer; + text-align: center; +} + +[data-type="array-item"] { + position: relative; +} + +[data-type="array-item"] .action { + top: 0; + right: 0; +} + +.frontmatter textarea { + resize: none; +} + +[data-type="array-item"] input { + width: calc(100% - 1em); +} + +.block .action, +fieldset .action { + position: absolute; + top: .5em; + right: .5em; +} + +.block>.action, +fieldset>.action { + opacity: 0; +} + +.block:hover>.action, +fieldset:hover>.action { + opacity: 1; +} + +.block .action.add, +fieldset .action.add { + right: 1.5em; +} + +.frontmatter .action i { + padding: 0; + font-size: 1em; +} + +fieldset { + border: 0; + padding: 0; +} + +.frontmatter>fieldset h3, +.frontmatter>.group h3 { + font-size: 1.5em; + margin-bottom: .5em; +} + +fieldset h3, +.group h3 { + font-size: 0.9em; +} + + +/* * * * * * * * * * * * * * * * + * ACTION * + * * * * * * * * * * * * * * * */ + +.action { + display: inline-block; + cursor: pointer; + -webkit-transition: 0.2s ease all; + transition: 0.2s ease all; + border: 0; + margin: 0; + color: #546E7A; + border-radius: 50%; +} + +.action.disabled { + opacity: 0.2; + cursor: not-allowed; +} + +.action i { + padding: 0.4em; + -webkit-transition: 0.2s ease-in-out all; + transition: 0.2s ease-in-out all; + border-radius: 50%; +} + +.action:hover i { + background-color: rgba(0, 0, 0, .1); +} + +.action ul { + position: absolute; + top: 0; + color: #7d7d7d; + list-style: none; + margin: 0; + padding: 0; + flex-direction: column; + display: flex; +} + +.action ul li { + line-height: 1; + padding: .7em; + transition: .1s ease background-color; +} + +.action ul li:hover { + background-color: rgba(0, 0, 0, 0.04); +} + + +/* * * * * * * * * * * * * * * * + * NEW FILE/DIR * + * * * * * * * * * * * * * * * */ + +.floating { + position: fixed; + bottom: 1em; + right: 1em; +} + +.floating .action { + background-color: #2196f3 !important; + color: #fff; + box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .12); +} + +#newdir { + position: fixed; + bottom: 1.3em; + right: 5em; + transition: .2s ease all; + opacity: 0; + border: 0; + box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); + padding: .5em; + width: 22em; + border-radius: .2em; +} + +#newdir.enabled { + opacity: 1; +} + + +/* * * * * * * * * * * * * * * * + * HEADER * + * * * * * * * * * * * * * * * */ + +header { + z-index: 1000; + background-color: #fff; + border-bottom: 1px solid rgba(0, 0, 0, 0.075); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + position: fixed; + top: 0; + left: 0; + width: 100%; + padding: 0; +} + +header a, +header a:hover { + color: inherit; +} + +header p i { + font-size: 1em !important; + color: rgba(255, 255, 255, .31); +} + +header>div { + display: flex; + width: 100%; + padding: 0.5em 0.5em 0.5em 1em; + align-items: center; +} + +header p { + display: inline-block; + margin: 0; + vertical-align: middle; +} + +header p a, +header p a:hover { + color: inherit; +} + +header .action span { + display: none; +} + +header>div div { + vertical-align: middle; + position: relative; +} + +header .actions { + /* margin-left: auto; */ +} + +#logout { + border-radius: 0; + margin-left: auto; + padding: .15em; +} + +#click-overlay { + display: none; + position: fixed; + cursor: pointer; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +#click-overlay.active { + display: block; +} + + +/* * * * * * * * * * * * * * * * + * TOP BAR * + * * * * * * * * * * * * * * * */ + +#top-bar { + height: 4em; +} + +#top-bar>div:nth-child(1) { + margin-right: 1em; + font-weight: 500; + font-size: 1.5em; + line-height: 2; +} + + +/* * * * * * * * * * * * * * * * + * SEARCH BAR * + * * * * * * * * * * * * * * * */ + +#search { + position: relative; + display: flex; + height: 100%; + padding: 0.75em; + vertical-align: middle; + border-radius: 0.3em; + background-color: #f5f5f5; + transition: .1s ease all; + width: 100%; + max-width: 25em; +} + +#search.active { + background-color: #fff; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .12); +} + +#search.active i, +#search.active input { + color: #212121; +} + +#search i, +#search input { + vertical-align: middle; +} + +#search i { + margin-right: 0.3em; + user-select: none; +} + +#search input { + width: 100%; + border: 0; + outline: 0; + background-color: transparent; +} + +#search.active div { + visibility: visible; + opacity: 1; + top: 100%; +} + +#search ul { + padding: 0; + margin: 0; + list-style: none; +} + +#search li { + margin-bottom: .5em; +} + +#search>div { + position: absolute; + top: 0; + width: 100%; + left: 0; + z-index: 999999; + background-color: #fff; + text-align: left; + color: #ccc; + box-shadow: 0 2px 3px rgba(0, 0, 0, .06), 0 2px 2px rgba(0, 0, 0, .12); + padding: .5em; + border-bottom-left-radius: .3em; + border-bottom-right-radius: .3em; + transition: .1s ease all; + visibility: hidden; + opacity: 0; + overflow-x: hidden; + overflow-y: auto; + max-height: 50vh; +} + +#search>div div { + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; +} + +#search>div p { + width: 100%; + text-align: center; + display: none; + margin: 0; + max-width: none; +} + +#search.ongoing p { + display: block; +} + +#search.active div i, +#sidebar #search.active div i { + color: #ccc; + text-align: center; + margin: 0 auto; + display: table; +} + +#search::-webkit-input-placeholder { + color: rgba(255, 255, 255, .5); +} + +#search:-moz-placeholder { + opacity: 1; + color: rgba(255, 255, 255, .5); +} + +#search::-moz-placeholder { + opacity: 1; + color: rgba(255, 255, 255, .5); +} + +#search:-ms-input-placeholder { + color: rgba(255, 255, 255, .5); +} + + +/* * * * * * * * * * * * * * * * + * BOTTOM BAR * + * * * * * * * * * * * * * * * */ + +#bottom-bar { + background-color: #fafafa; + border-top: 1px solid rgba(0, 0, 0, 0.075); + border-bottom: 1px solid rgba(0, 0, 0, 0.075); + height: 3.8em; +} + +#bottom-bar>div:first-child>* { + display: inline-block; + vertical-align: middle; +} + +#bottom-bar>div:first-child>i { + margin-right: .3em; +} + +#bottom-bar>*:first-child { + margin-right: auto; + max-width: calc(100% - 25em); + width: 100%; +} + +#bottom-bar p { + text-overflow: ellipsis; + overflow: hidden; + width: calc(100% - 3em); + white-space: nowrap; +} + +#more { + display: none; +} + +#file-only { + display: inline-block; + border-right: 1px solid rgba(0, 0, 0, 0.075); + padding-right: .3em; + margin-right: .3em; + transition: .2s ease opacity, visibility; + visibility: visible; +} + +#file-only.disabled { + opacity: 0; + visibility: hidden; +} + +#download ul.active { + top: 0; + right: 0; +} + +#more ul.active { + right: .5em; + top: 4.5em; +} + + +/* * * * * * * * * * * * * * * * + * DROPDOWN * + * * * * * * * * * * * * * * * */ + +.dropdown { + position: fixed; + top: -100%; + right: -100%; + visibility: hidden; + display: flex; + flex-direction: column; + border-radius: .1em; + border-top-left-radius: 0; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + background: #fff; + z-index: 9999999; +} + +.dropdown.active { + visibility: visible; +} + +.dropdown .action { + padding: .7em; +} + +.dropdown i { + padding: 0; + vertical-align: middle; +} + +.dropdown span { + display: inline-block; + margin-left: .5em; + font-size: .9em; +} + + +/* * * * * * * * * * * * * * * * + * BREADCRUMBS * + * * * * * * * * * * * * * * * */ + +#previous { + margin-left: -.5em; +} + +#breadcrumbs { + min-width: 7em; +} + +#breadcrumbs.active { + top: 0; + left: 0; + right: auto; +} + + +/* * * * * * * * * * * * * * * * + * LISTING * + * * * * * * * * * * * * * * * */ + +#listing { + max-width: calc(100% - 1.2em); + width: 100%; +} + +#listing h2 { + margin: 0 0 0 0.5em; + font-size: 1em; + color: rgba(0, 0, 0, 0.2); + font-weight: 500; +} + +#listing .item div:last-of-type * { + text-overflow: ellipsis; + overflow: hidden; +} + +#listing>div { + display: flex; + padding: 0; + flex-wrap: wrap; + justify-content: flex-start; + position: relative; +} + +#listing .item { + background-color: #fff; + position: relative; + display: flex; + flex-wrap: nowrap; + color: #6f6f6f; + transition: .1s ease all; + align-items: center; + cursor: pointer; +} + +#listing .item div:last-of-type { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +#listing .item p { + margin: 0; +} + +#listing .item .size, +#listing .item .modified { + font-size: 0.9em; +} + +#listing .item .name { + font-weight: bold; +} + +#listing .item i { + font-size: 4em; + margin-right: 0.1em; + vertical-align: bottom; +} + +#listing h2.message, +.message { + text-align: center; + font-size: 3em; + margin: 1em auto; + display: block !important; + width: 95%; + color: rgba(0, 0, 0, 0.2); + font-weight: 500; +} + +.message i { + font-size: inherit; + vertical-align: middle; +} + + +/* * * * * * * * * * * * * * * * + * LISTING - MOSAIC * + * * * * * * * * * * * * * * * */ + +#listing.mosaic { + margin-top: 1em; +} + +#listing.mosaic .item { + width: calc(33% - 1em); + margin: .5em; + padding: 0.5em; + border-radius: 0.2em; + box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .12); +} + +#listing.mosaic .item:hover { + box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24) !important; +} + +#listing.mosaic .header { + display: none; +} + +#listing.mosaic .item div:first-of-type { + width: 5em; +} + +#listing.mosaic .item div:last-of-type { + width: calc(100% - 5vw); +} + + +/* * * * * * * * * * * * * * * * + * LISTING - DETAIL * + * * * * * * * * * * * * * * * */ + +#listing.list { + flex-direction: column; + padding-top: 3.25em; + width: 100%; + max-width: 100%; + margin: 0; +} + +#listing.list .item { + width: 100%; + margin: 0; + border: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding: 1em; +} + +#listing.list h2 { + display: none; +} + +#listing .item[aria-selected=true] { + background: #2196f3 !important; + color: #fff !important; +} + +#listing.list .item div:first-of-type { + width: 3em; +} + +#listing.list .item div:first-of-type i { + font-size: 2em; +} + +#listing.list .item div:last-of-type { + width: calc(100% - 3em); + display: flex; + align-items: center; +} + +#listing.list .item .name { + width: 50%; +} + +#listing.list .item .size { + width: 25%; +} + +#listing .item.header { + display: none !important; + background-color: #ccc; +} + +#listing.list .header i { + font-size: 1.5em; + vertical-align: middle; + margin-left: .2em; +} + +#listing.list .item.header { + display: flex !important; + background: #fafafa; + position: fixed; + width: 100%; + top: 7.8em; + left: 0; + z-index: 999; + padding: .85em; +} + +#listing.list .item.header>div:first-child { + width: 0; +} + +#listing.list .item.header .name { + margin-right: 3em; +} + +#listing.list .header { + display: flex; + background: #fafafa; + position: fixed; + width: 100%; + top: 7.8em; + left: 0; + z-index: 999; +} + +#listing.list .header a { + color: inherit; +} + +#listing.list .item.header>div:first-child { + width: 0; +} + +#listing.list .name { + font-weight: normal; +} + +#listing.list .item.header .name { + margin-right: 3em; +} + +#listing.list .header span { + vertical-align: middle; +} + +#listing.list .header i { + opacity: 0; + transition: .1s ease all; +} + +#listing.list .header p:hover i, +#listing.list .header .active i { + opacity: 1; +} + +#listing.list .item.header .active { + font-weight: bold; +} + + +/* * * * * * * * * * * * * * * * + * MULTIPLE SELECTION DIALOG * + * * * * * * * * * * * * * * * */ + +#multiple-selection { + position: fixed; + bottom: -4em; + left: 0; + z-index: 99999999; + width: 100%; + background-color: #2196f3; + height: 4em; + display: flex !important; + padding: 0.5em 0.5em 0.5em 1em; + justify-content: space-between; + align-items: center; + transition: .2s ease all; +} + +#multiple-selection.active { + bottom: 0; +} + +#multiple-selection * { + margin: 0; +} + +#multiple-selection p, +#multiple-selection i { + color: #fff; +} + + +/* * * * * * * * * * * * * * * * + * PROMPT * + * * * * * * * * * * * * * * * */ + +.overlay, +.prompt, +.help { + opacity: 0; + z-index: -1; + transition: .1s ease opacity, z-index; +} + +.overlay.active, +.prompt.active, +.help.active { + z-index: 9999999; + opacity: 1; +} + +.overlay { + background-color: rgba(0, 0, 0, 0.5); + position: fixed; + top: 0; + left: 0; + height: 0; + width: 0; +} + +.overlay.active { + height: 100%; + width: 100%; +} + +.prompt, +.help { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 99999999; + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.075); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + padding: 2em; + max-width: 25em; + width: 90%; + max-height: 95%; +} + +.prompt h3, +.help h3 { + margin: 0; + font-weight: 500; + font-size: 1.5em; +} + +.prompt p, +.help p { + font-size: .9em; + color: rgba(0, 0, 0, 0.8); + margin: .5em 0 1em; +} + +.prompt input { + width: 100%; + border: 1px solid #dadada; + line-height: 1; + padding: .3em; +} + +.prompt div, +.help div { + margin-top: 1em; + display: flex; + justify-content: flex-start; + flex-direction: row-reverse; +} + +.prompt .cancel { + background-color: #ECEFF1; + color: #37474F; +} + +.prompt .cancel:hover { + background-color: #e9eaeb; +} + + +/* * * * * * * * * * * * * * * * + * PROMPT - MOVE * + * * * * * * * * * * * * * * * */ + +.prompt .file-list { + flex-direction: initial; + max-height: 50vh; + overflow: auto; +} + +.prompt .file-list ul { + list-style: none; + margin: 0; + padding: 0; + width: 100%; +} + +.prompt .file-list ul li { + width: 100%; + user-select: none; +} + +.prompt .file-list ul li[aria-selected=true] { + background: #2196f3 !important; + color: #fff !important; + transition: .1s ease all; +} + +.prompt .file-list ul li:hover { + background-color: #e9eaeb; + cursor: pointer; +} + +.prompt .file-list ul li:before { + content: "folder"; + color: #6f6f6f; + vertical-align: middle; + padding: 0 .25em; + line-height: 2em; +} + +.prompt .file-list ul li[aria-selected=true]:before { + color: white; +} + + +/* * * * * * * * * * * * * * * * + * HELP * + * * * * * * * * * * * * * * * */ + +.help { + max-width: 24em; + visibility: hidden; + top: -100%; + left: -100%; +} + +.help.active { + visibility: visible; + top: 50%; + left: 50%; +} + +.help ul { + padding: 0; + margin: 1em 0; + list-style: none; +} + + +/* * * * * * * * * * * * * * * * + * FOOTER * + * * * * * * * * * * * * * * * */ + +footer { + font-size: 0.6em; + margin: 2em 0 2em; + text-align: center; + color: grey; +} + +footer a, +footer a:hover { + color: inherit; +} + + +/* * * * * * * * * * * * * * * * + * MEDIA QUERIES * + * * * * * * * * * * * * * * * */ + +@media screen and (max-width: 850px) { + .frontmatter { + column-count: 2; + } +} + +@media screen and (max-width: 650px) { + body { + transition: .2s ease padding; + } + .mobile-only { + display: inherit !important; + } + #top-bar>div:nth-child(1) { + display: none; + } + #bottom-bar>*:first-child { + max-width: calc(100% - 16em) !important; + } + #main-actions { + position: fixed; + top: -100%; + right: -100%; + visibility: hidden; + display: flex; + flex-direction: column; + border-radius: .1em; + border-top-left-radius: 0; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + background: #fff; + z-index: 9999999; + } + #main-actions.active { + right: .5em; + top: 4.5em; + visibility: visible; + } + #main-actions .action { + padding: .7em; + border-radius: 0; + align-items: center; + } + #main-actions .action:hover { + background-color: rgba(0, 0, 0, 0.04); + } + #main-actions i { + padding: 0; + vertical-align: middle; + } + #main-actions .action:hover i { + padding: 0; + background-color: transparent; + } + #main-actions span { + display: inline-block; + margin-left: .5em; + font-size: .9em; + } + #listing.list .item .size, + #listing.list .item .modified { + display: none; + } + #listing.list .item .name { + width: 100%; + } + .frontmatter { + column-count: 1; + } +} + +@media screen and (max-width: 450px) { + #bottom-bar p { + display: none !important; + } +} + + +/* * * * * * * * * * * * * * * * + * ANIMATIONS * + * * * * * * * * * * * * * * * */ + +@keyframes spin { + 100% { + -webkit-transform: rotate(-360deg); + transform: rotate(-360deg); + } +} diff --git a/assss/public/js/common.js b/assss/public/js/common.js new file mode 100644 index 00000000..603bbfa9 --- /dev/null +++ b/assss/public/js/common.js @@ -0,0 +1,572 @@ +'use strict'; + +var tempID = "_fm_internal_temporary_id", + ssl = (location.protocol === 'https:'), + templates = {}, + selectedItems = [], + overlay, + clickOverlay; + +// Removes an element, if exists, from an array +Array.prototype.removeElement = function (element) { + var i = this.indexOf(element); + if(i != -1) + this.splice(i, 1); +} + +// Replaces an element inside an array by another +Array.prototype.replaceElement = function (oldElement, newElement) { + var i = this.indexOf(oldElement); + if(i != -1) + this[i] = newElement; +} + +// Sends a costum event to itself +Document.prototype.sendCostumEvent = function (text) { + this.dispatchEvent(new CustomEvent(text)); +} + +// Gets the content of a cookie +Document.prototype.getCookie = function (name) { + var re = new RegExp("(?:(?:^|.*;\\s*)" + name + "\\s*\\=\\s*([^;]*).*$)|^.*$"); + return document.cookie.replace(re, "$1"); +} + +// Remove the last directory of an url +var removeLastDirectoryPartOf = function (url) { + var arr = url.split('/'); + if(arr.pop() === "") { + arr.pop(); + } + return(arr.join('/')); +} + +function getCSSRule(rules) { + for(let i = 0; i < rules.length; i++) { + rules[i] = rules[i].toLowerCase(); + } + + var result = null, + find = Array.prototype.find; + + find.call(document.styleSheets, styleSheet => { + result = find.call(styleSheet.cssRules, cssRule => { + let found = false; + + if(cssRule instanceof CSSStyleRule) { + for(let i = 0; i < rules.length; i++) { + if(cssRule.selectorText.toLowerCase() == rules[i]) + found = true; + } + } + + return found; + }); + + return result != null; + }); + + return result; +} + +/* * * * * * * * * * * * * * * * + * * + * BUTTONS * + * * + * * * * * * * * * * * * * * * */ +var buttons = { + previousState: {}, +}; + +buttons.setLoading = function (name) { + if(typeof this[name] === 'undefined') return; + let i = this[name].querySelector('i'); + + this.previousState[name] = i.innerHTML; + i.style.opacity = 0; + + setTimeout(function () { + i.classList.add('spin'); + i.innerHTML = 'autorenew'; + i.style.opacity = 1; + }, 200); +} + +// Changes an element to done animation +buttons.setDone = function (name, success = true) { + let i = this[name].querySelector('i'); + + i.style.opacity = 0; + + let thirdStep = () => { + i.innerHTML = this.previousState[name]; + i.style.opacity = null; + + if(selectedItems.length == 0 && document.getElementById('listing')) + document.sendCostumEvent('changed-selected'); + } + + let secondStep = () => { + i.style.opacity = 0; + setTimeout(thirdStep, 200); + } + + let firstStep = () => { + i.classList.remove('spin'); + i.innerHTML = success ? + 'done' : + 'close'; + i.style.opacity = 1; + setTimeout(secondStep, 1000); + } + + setTimeout(firstStep, 200); + return false; +} + +/* * * * * * * * * * * * * * * * + * * + * WEBDAV * + * * + * * * * * * * * * * * * * * * */ +var webdav = {}; + +webdav.convertURL = function (url) { + return window.location.origin + url.replace(baseURL + "/", webdavURL + "/"); +} + +webdav.move = function (oldLink, newLink) { + return new Promise((resolve, reject) => { + let request = new XMLHttpRequest(), + destination = newLink.replace(baseURL + "/", webdavURL + "/"); + + destination = window.location.origin + destination.substring(prefixURL.length); + + request.open('MOVE', webdav.convertURL(oldLink), true); + request.setRequestHeader('Destination', destination); + request.onload = () => { + if(request.status == 201 || request.status == 204) { + resolve(); + } else { + reject(request.statusText); + } + } + request.onerror = () => reject(request.statusText); + request.send(); + }); +} + +webdav.put = function (link, body, headers = {}) { + return new Promise((resolve, reject) => { + let request = new XMLHttpRequest(); + request.open('PUT', webdav.convertURL(link), true); + + for(let key in headers) { + request.setRequestHeader(key, headers[key]); + } + + request.onload = () => { + if(request.status == 201) { + resolve(); + } else { + reject(request.statusText); + } + } + request.onerror = () => reject(request.statusText); + request.send(body); + }); +} + +webdav.delete = function (link) { + return new Promise((resolve, reject) => { + let request = new XMLHttpRequest(); + request.open('DELETE', webdav.convertURL(link), true); + request.onload = () => { + if(request.status == 204) { + resolve(); + } else { + reject(request.statusText); + } + } + request.onerror = () => reject(request.statusText); + request.send(); + }); +} + +webdav.new = function (link) { + return new Promise((resolve, reject) => { + let request = new XMLHttpRequest(); + request.open((link.endsWith("/") ? "MKCOL" : "PUT"), webdav.convertURL(link), true); + request.onload = () => { + if(request.status == 201) { + resolve(); + } else { + reject(request.statusText); + } + } + request.onerror = () => reject(request.statusText); + request.send(); + }); +} + +/* * * * * * * * * * * * * * * * + * * + * EVENTS * + * * + * * * * * * * * * * * * * * * */ +function closePrompt(event) { + let prompt = document.querySelector('.prompt'); + + if(!prompt) + return; + + if(typeof event != 'undefined') { + event.preventDefault(); + } + + document.querySelector('.overlay').classList.remove('active'); + prompt.classList.remove('active'); + + setTimeout(() => { + prompt.remove(); + }, 100); +} + +function notImplemented(event) { + event.preventDefault(); + clickOverlay.click(); + + let clone = document.importNode(templates.info.content, true); + clone.querySelector('h3').innerHTML = 'Not implemented'; + clone.querySelector('p').innerHTML = "Sorry, but this feature wasn't implemented yet."; + + document.querySelector('body').appendChild(clone) + document.querySelector('.overlay').classList.add('active'); + document.querySelector('.prompt').classList.add('active'); +} + +// Prevent Default event +var preventDefault = function (event) { + event.preventDefault(); +} + +function logoutEvent(event) { + let request = new XMLHttpRequest(); + request.open('GET', window.location.pathname, true, "username", "password"); + request.send(); + request.onreadystatechange = function () { + if(request.readyState == 4) { + window.location = "/"; + } + } +} + +function openEvent(event) { + if(event.currentTarget.classList.contains('disabled')) + return false; + + let link = '?raw=true'; + + if(selectedItems.length) { + link = document.getElementById(selectedItems[0]).dataset.url + link; + } else { + link = window.location.pathname + link; + } + + window.open(link); + return false; +} + +function deleteOnSingleFile() { + closePrompt(); + buttons.setLoading('delete'); + + let promises = []; + + webdav.delete(window.location.pathname) + .then(() => { + window.location.pathname = removeLastDirectoryPartOf(window.location.pathname); + }) + .catch(e => { + buttons.setDone('delete', false); + console.log(e) + }) +} + +function deleteOnListing() { + closePrompt(); + buttons.setLoading('delete'); + + let promises = []; + + for(let id of selectedItems) { + promises.push(webdav.delete(document.getElementById(id).dataset.url)); + } + + Promise.all(promises) + .then(() => { + listing.reload(); + buttons.setDone('delete'); + }) + .catch(e => { + console.log(e); + buttons.setDone('delete', false); + }) +} + +// Handles the delete button event +function deleteEvent(event) { + let single = false; + + if(!selectedItems.length) { + selectedItems = ["placeholder"]; + single = true; + } + + let clone = document.importNode(templates.question.content, true); + clone.querySelector('h3').innerHTML = 'Delete files'; + + if(single) { + clone.querySelector('form').addEventListener('submit', deleteOnSingleFile); + clone.querySelector('p').innerHTML = `Are you sure you want to delete this file/folder?`; + } else { + clone.querySelector('form').addEventListener('submit', deleteOnListing); + clone.querySelector('p').innerHTML = `Are you sure you want to delete ${selectedItems.length} file(s)?`; + } + + clone.querySelector('input').remove(); + clone.querySelector('.ok').innerHTML = 'Delete'; + + document.body.appendChild(clone); + document.querySelector('.overlay').classList.add('active'); + document.querySelector('.prompt').classList.add('active'); + + return false; +} + +function resetSearchText() { + let box = document.querySelector('#search > div div'); + + if(user.AllowCommands) { + box.innerHTML = `Search or use one of your supported commands: ${user.Commands.join(", ")}.`; + } else { + box.innerHTML = "Type and press enter to search."; + } +} + +function searchEvent(event) { + if(this.value.length == 0) { + resetSearchText(); + return; + } + + let value = this.value, + search = document.getElementById('search'), + scrollable = document.querySelector('#search > div'), + box = document.querySelector('#search > div div'), + pieces = value.split(' '), + supported = false; + + user.Commands.forEach(function (cmd) { + if(cmd == pieces[0]) { + supported = true; + } + }); + + if(!supported || !user.AllowCommands) { + box.innerHTML = "Press enter to search." + } else { + box.innerHTML = "Press enter to execute." + } + + if(event.keyCode == 13) { + box.innerHTML = ''; + search.classList.add('ongoing'); + + let url = window.location.host + window.location.pathname; + + if(document.getElementById("editor")) { + url = removeLastDirectoryPartOf(url); + } + + let protocol = ssl ? 'wss:' : 'ws:'; + + if(supported && user.AllowCommands) { + let conn = new WebSocket(`${protocol}//${url}?command=true`); + + conn.onopen = function () { + conn.send(value); + }; + + conn.onmessage = function (event) { + box.innerHTML = event.data; + scrollable.scrollTop = scrollable.scrollHeight; + } + + conn.onclose = function (event) { + search.classList.remove('ongoing'); + listing.reload(); + } + + return; + } + + box.innerHTML = '
:array
or :object.
';
+ clone.querySelector('.ok').innerHTML = 'Create';
+ clone.querySelector('form').addEventListener('submit', addFrontMatterItemPrompt(parent));
+ clone.querySelector('form').classList.add('active')
+ document.querySelector('body').appendChild(clone);
+
+ document.querySelector('.overlay').classList.add('active');
+ document.getElementById(tempID).classList.add('active');
+ }
+
+ return false;
+}
+
+document.addEventListener("DOMContentLoaded", (event) => {
+ if(!document.getElementById('editor')) return;
+
+ editor.textareaAutoGrow();
+
+ templates.arrayItem = document.getElementById("array-item-template");
+ templates.base = document.getElementById('base-template');
+ templates.objectItem = document.getElementById("object-item-template");
+ templates.temporary = document.getElementById('temporary-template');
+
+ buttons.save = document.querySelector('#save');
+ buttons.editSource = document.querySelector('#edit-source');
+
+ if(buttons.editSource) {
+ buttons.editSource.addEventListener('click', editor.toggleSourceEditor)
+ }
+
+ let container = document.getElementById('editor'),
+ kind = container.dataset.kind,
+ rune = container.dataset.rune;
+
+ if(kind != 'frontmatter-only') {
+ let editor = document.querySelector('.content #ace'),
+ mode = editor.dataset.mode,
+ textarea = document.querySelector('textarea[name="content"]'),
+ aceEditor = ace.edit('ace'),
+ options = {
+ wrap: true,
+ maxLines: Infinity,
+ theme: "ace/theme/github",
+ showPrintMargin: false,
+ fontSize: "1em",
+ minLines: 20
+ };
+
+ aceEditor.getSession().setMode("ace/mode/" + mode);
+ aceEditor.getSession().setValue(textarea.value);
+ aceEditor.getSession().on('change', function () {
+ textarea.value = aceEditor.getSession().getValue();
+ });
+
+ if(mode == "markdown") options.showGutter = false;
+ aceEditor.setOptions(options);
+ }
+
+ let deleteFrontMatterItemButtons = document.getElementsByClassName('delete');
+ Array.from(deleteFrontMatterItemButtons).forEach(button => {
+ button.addEventListener('click', deleteFrontMatterItem);
+ });
+
+ let addFrontMatterItemButtons = document.getElementsByClassName('add');
+ Array.from(addFrontMatterItemButtons).forEach(button => {
+ button.addEventListener('click', addFrontMatterItem);
+ });
+
+ let saveContent = function () {
+ let data = form2js(document.querySelector('form'));
+
+ if(typeof data.content === "undefined" && kind != 'frontmatter-only') {
+ data.content = "";
+ }
+
+ if(typeof data.content === "number") {
+ data.content = data.content.toString();
+ }
+
+ let request = new XMLHttpRequest();
+
+ buttons.setLoading('save')
+
+ webdav.put(window.location.pathname, JSON.stringify(data), {
+ 'Kind': kind,
+ 'Rune': rune
+ })
+ .then(() => {
+ buttons.setDone('save')
+ })
+ .catch(e => {
+ console.log(e);
+ buttons.setDone('save', false)
+ })
+ }
+
+ document.querySelector('#save').addEventListener('click', event => {
+ event.preventDefault();
+ saveContent();
+ });
+
+ document.querySelector('form').addEventListener('submit', (event) => {
+ event.preventDefault();
+ saveContent();
+ });
+
+ window.addEventListener('keydown', (event) => {
+ if(event.ctrlKey || event.metaKey) {
+ switch(String.fromCharCode(event.which).toLowerCase()) {
+ case 's':
+ event.preventDefault();
+ saveContent();
+ break;
+ }
+ }
+ });
+
+ return false;
+});
diff --git a/assss/public/js/listing.js b/assss/public/js/listing.js
new file mode 100644
index 00000000..d1f339bf
--- /dev/null
+++ b/assss/public/js/listing.js
@@ -0,0 +1,579 @@
+'use strict';
+
+var listing = {
+ selectMultiple: false
+};
+
+listing.reload = function (callback) {
+ let request = new XMLHttpRequest();
+
+ request.open('GET', window.location);
+ request.setRequestHeader('Minimal', 'true');
+ request.send();
+ request.onreadystatechange = function () {
+ if(request.readyState == 4) {
+ if(request.status == 200) {
+ document.querySelector('body main').innerHTML = request.responseText;
+ listing.addDoubleTapEvent();
+
+ if(typeof callback == 'function') {
+ callback();
+ }
+ }
+ }
+ }
+}
+
+listing.itemDragStart = function (event) {
+ let el = event.target;
+
+ for(let i = 0; i < 5; i++) {
+ if(!el.classList.contains('item')) {
+ el = el.parentElement;
+ }
+ }
+
+ event.dataTransfer.setData("id", el.id);
+ event.dataTransfer.setData("name", el.querySelector('.name').innerHTML);
+}
+
+listing.itemDragOver = function (event) {
+ event.preventDefault();
+ let el = event.target;
+
+ for(let i = 0; i < 5; i++) {
+ if(!el.classList.contains('item')) {
+ el = el.parentElement;
+ }
+ }
+
+ el.style.opacity = 1;
+}
+
+listing.itemDrop = function (e) {
+ e.preventDefault();
+
+ let el = e.target,
+ id = e.dataTransfer.getData("id"),
+ name = e.dataTransfer.getData("name");
+
+ if(id == "" || name == "") return;
+
+ for(let i = 0; i < 5; i++) {
+ if(!el.classList.contains('item')) {
+ el = el.parentElement;
+ }
+ }
+
+ if(el.id === id) return;
+
+ let oldLink = document.getElementById(id).dataset.url,
+ newLink = el.dataset.url + name;
+
+ webdav.move(oldLink, newLink)
+ .then(() => listing.reload())
+ .catch(e => console.log(e));
+}
+
+listing.documentDrop = function (event) {
+ event.preventDefault();
+ let dt = event.dataTransfer,
+ files = dt.files,
+ el = event.target,
+ items = document.getElementsByClassName('item');
+
+ for(let i = 0; i < 5; i++) {
+ if(el != null && !el.classList.contains('item')) {
+ el = el.parentElement;
+ }
+ }
+
+ if(files.length > 0) {
+ if(el != null && el.classList.contains('item') && el.dataset.dir == "true") {
+ listing.handleFiles(files, el.querySelector('.name').innerHTML + "/");
+ return;
+ }
+
+ listing.handleFiles(files, "");
+ } else {
+ Array.from(items).forEach(file => {
+ file.style.opacity = 1;
+ });
+ }
+}
+
+listing.rename = function (event) {
+ if(!selectedItems.length || selectedItems.length > 1) {
+ return false;
+ }
+
+ let item = document.getElementById(selectedItems[0]);
+
+ if(item.classList.contains('disabled')) {
+ return false;
+ }
+
+ let link = item.dataset.url,
+ field = item.querySelector('.name'),
+ name = field.innerHTML;
+
+ let submit = (event) => {
+ event.preventDefault();
+
+ let newName = event.currentTarget.querySelector('input').value,
+ newLink = removeLastDirectoryPartOf(link) + "/" + newName;
+
+ closePrompt(event);
+ buttons.setLoading('rename');
+
+ webdav.move(link, newLink).then(() => {
+ listing.reload(() => {
+ newName = btoa(newName);
+ selectedItems = [newName];
+ document.getElementById(newName).setAttribute("aria-selected", true);
+ listing.handleSelectionChange();
+ });
+
+ buttons.setDone('rename');
+ }).catch(error => {
+ field.innerHTML = name;
+ buttons.setDone('rename', false);
+ console.log(error);
+ });
+
+ return false;
+ }
+
+ let clone = document.importNode(templates.question.content, true);
+ clone.querySelector('h3').innerHTML = 'Rename';
+ clone.querySelector('input').value = name;
+ clone.querySelector('.ok').innerHTML = 'Rename';
+ clone.querySelector('form').addEventListener('submit', submit);
+
+ document.querySelector('body').appendChild(clone)
+ document.querySelector('.overlay').classList.add('active');
+ document.querySelector('.prompt').classList.add('active');
+
+ return false;
+}
+
+listing.handleFiles = function (files, base) {
+ buttons.setLoading('upload');
+
+ let promises = [];
+
+ for(let file of files) {
+ promises.push(webdav.put(window.location.pathname + base + file.name, file));
+ }
+
+ Promise.all(promises)
+ .then(() => {
+ listing.reload();
+ buttons.setDone('upload');
+ })
+ .catch(e => {
+ console.log(e);
+ buttons.setDone('upload', false);
+ })
+
+ return false;
+}
+
+listing.unselectAll = function () {
+ let items = document.getElementsByClassName('item');
+ Array.from(items).forEach(link => {
+ link.setAttribute("aria-selected", false);
+ });
+
+ selectedItems = [];
+
+ listing.handleSelectionChange();
+ return false;
+}
+
+listing.handleSelectionChange = function (event) {
+ listing.redefineDownloadURLs();
+
+ let selectedNumber = selectedItems.length,
+ fileAction = document.getElementById("file-only");
+
+ if(selectedNumber) {
+ fileAction.classList.remove("disabled");
+
+ if(selectedNumber > 1) {
+ buttons.open.classList.add("disabled");
+ buttons.rename.classList.add("disabled");
+ }
+
+ if(selectedNumber == 1) {
+ if(document.getElementById(selectedItems[0]).dataset.dir == "true") {
+ buttons.open.classList.add("disabled");
+ } else {
+ buttons.open.classList.remove("disabled");
+ }
+
+ buttons.rename.classList.remove("disabled");
+ }
+
+ return false;
+ }
+
+ fileAction.classList.add("disabled");
+ return false;
+}
+
+listing.redefineDownloadURLs = function () {
+ let files = "";
+
+ for(let i = 0; i < selectedItems.length; i++) {
+ let url = document.getElementById(selectedItems[i]).dataset.url;
+ files += url.replace(window.location.pathname, "") + ",";
+ }
+
+ files = files.substring(0, files.length - 1);
+ files = encodeURIComponent(files);
+
+ let links = document.querySelectorAll("#download ul a");
+ Array.from(links).forEach(link => {
+ link.href = "?download=" + link.dataset.format + "&files=" + files;
+ });
+}
+
+listing.openItem = function (event) {
+ window.location = event.currentTarget.dataset.url;
+}
+
+listing.selectItem = function (event) {
+ let el = event.currentTarget;
+
+ if(selectedItems.length != 0) event.preventDefault();
+ if(selectedItems.indexOf(el.id) == -1) {
+ if(!event.ctrlKey && !listing.selectMultiple) listing.unselectAll();
+
+ el.setAttribute("aria-selected", true);
+ selectedItems.push(el.id);
+ } else {
+ el.setAttribute("aria-selected", false);
+ selectedItems.removeElement(el.id);
+ }
+
+ listing.handleSelectionChange();
+ return false;
+}
+
+listing.newFileButton = function (event) {
+ event.preventDefault();
+
+ let clone = document.importNode(templates.question.content, true);
+ clone.querySelector('h3').innerHTML = 'New file';
+ clone.querySelector('p').innerHTML = 'End with a trailing slash to create a dir.';
+ clone.querySelector('.ok').innerHTML = 'Create';
+ clone.querySelector('form').addEventListener('submit', listing.newFilePrompt);
+
+ document.querySelector('body').appendChild(clone)
+ document.querySelector('.overlay').classList.add('active');
+ document.querySelector('.prompt').classList.add('active');
+}
+
+listing.newFilePrompt = function (event) {
+ event.preventDefault();
+ buttons.setLoading('new');
+
+ let name = event.currentTarget.querySelector('input').value;
+
+ webdav.new(window.location.pathname + name)
+ .then(() => {
+ buttons.setDone('new');
+ listing.reload();
+ })
+ .catch(e => {
+ console.log(e);
+ buttons.setDone('new', false);
+ });
+
+ closePrompt(event);
+ return false;
+}
+
+listing.updateColumns = function (event) {
+ let columns = Math.floor(document.getElementById('listing').offsetWidth / 300),
+ items = getCSSRule(['#listing.mosaic .item', '.mosaic#listing .item']);
+
+ items.style.width = `calc(${100/columns}% - 1em)`;
+}
+
+listing.addDoubleTapEvent = function () {
+ let items = document.getElementsByClassName('item'),
+ touches = {
+ id: '',
+ count: 0
+ };
+
+ Array.from(items).forEach(file => {
+ file.addEventListener('touchstart', event => {
+ if(touches.id != file.id) {
+ touches.id = file.id;
+ touches.count = 1;
+
+ setTimeout(() => {
+ touches.count = 0;
+ }, 300)
+
+ return;
+ }
+
+ touches.count++;
+
+ if(touches.count > 1) {
+ window.location = file.dataset.url;
+ }
+ });
+ });
+}
+
+// Keydown events
+window.addEventListener('keydown', (event) => {
+ if(event.keyCode == 27) {
+ listing.unselectAll();
+
+ if(document.querySelectorAll('.prompt').length) {
+ closePrompt(event);
+ }
+ }
+
+ if(event.keyCode == 113) {
+ listing.rename();
+ }
+
+ if(event.ctrlKey || event.metaKey) {
+ switch(String.fromCharCode(event.which).toLowerCase()) {
+ case 's':
+ event.preventDefault();
+ window.location = "?download=true"
+ }
+ }
+});
+
+window.addEventListener("resize", () => {
+ listing.updateColumns();
+});
+
+listing.selectMoveFolder = function (event) {
+ if(event.target.getAttribute("aria-selected") === "true") {
+ event.target.setAttribute("aria-selected", false);
+ return;
+ } else {
+ if(document.querySelector(".file-list li[aria-selected=true]")) {
+ document.querySelector(".file-list li[aria-selected=true]").setAttribute("aria-selected", false);
+ }
+ event.target.setAttribute("aria-selected", true);
+ return;
+ }
+}
+
+listing.getJSON = function (link) {
+ return new Promise((resolve, reject) => {
+ let request = new XMLHttpRequest();
+ request.open("GET", link);
+ request.setRequestHeader("Accept", "application/json");
+ request.onload = () => {
+ if(request.status == 200) {
+ resolve(request.responseText);
+ } else {
+ reject(request.statusText);
+ }
+ }
+ request.onerror = () => reject(request.statusText);
+ request.send();
+ });
+}
+
+listing.moveMakeItem = function (url, name) {
+ let node = document.createElement("li"),
+ count = 0;
+
+ node.dataset.url = url;
+ node.innerHTML = name;
+ node.setAttribute("aria-selected", false);
+
+ node.addEventListener("dblclick", listing.moveDialogNext);
+ node.addEventListener("click", listing.selectMoveFolder);
+ node.addEventListener('touchstart', event => {
+ count++;
+
+ setTimeout(() => {
+ count = 0;
+ }, 300)
+
+ if(count > 1) {
+ listing.moveDialogNext(event);
+ }
+ });
+
+ return node;
+}
+
+listing.moveDialogNext = function (event) {
+ let request = new XMLHttpRequest(),
+ prompt = document.querySelector("form.prompt.active"),
+ list = prompt.querySelector("div.file-list ul");
+
+ prompt.addEventListener("submit", listing.moveSelected);
+
+ listing.getJSON(event.target.dataset.url)
+ .then((data) => {
+ let dirs = 0;
+
+ prompt.querySelector("ul").innerHTML = "";
+ prompt.querySelector('code').innerHTML = event.target.dataset.url;
+
+ if(event.target.dataset.url != baseURL + "/") {
+ let node = listing.moveMakeItem(removeLastDirectoryPartOf(event.target.dataset.url) + "/", "..")
+ list.appendChild(node);
+ }
+
+ if(JSON.parse(data) == null) {
+ prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`;
+ return;
+ }
+
+ for(let f of JSON.parse(data)) {
+ if(f.IsDir === true) {
+ dirs++;
+ list.appendChild(listing.moveMakeItem(f.URL, f.Name));
+ }
+ }
+
+ if(dirs === 0)
+ prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`;
+ })
+ .catch(e => console.log(e));
+}
+
+listing.moveSelected = function (event) {
+ event.preventDefault();
+
+ let promises = [];
+ buttons.setLoading("move");
+
+ for(let file of selectedItems) {
+ let fileElement = document.getElementById(file),
+ destFolder = event.target.querySelector("p code").innerHTML;
+
+ if(event.currentTarget.querySelector("li[aria-selected=true]") != null) {
+ destFolder = event.currentTarget.querySelector("li[aria-selected=true]").dataset.url;
+ }
+
+ let destPath = "/" + destFolder + "/" + fileElement.querySelector(".name").innerHTML;
+ destPath = destPath.replace('//', '/');
+
+ promises.push(webdav.move(fileElement.dataset.url, destPath));
+ }
+
+ Promise.all(promises)
+ .then(() => {
+ closePrompt(event);
+ buttons.setDone("move");
+ listing.reload();
+ })
+ .catch(e => {
+ console.log(e);
+ })
+}
+
+listing.moveEvent = function (event) {
+ if(event.currentTarget.classList.contains("disabled"))
+ return;
+
+ listing.getJSON(window.location.pathname)
+ .then((data) => {
+ let prompt = document.importNode(templates.move.content, true),
+ list = prompt.querySelector("div.file-list ul"),
+ dirs = 0;
+
+ prompt.querySelector("form").addEventListener("submit", listing.moveSelected);
+ prompt.querySelector('code').innerHTML = window.location.pathname;
+
+ if(window.location.pathname !== baseURL + "/") {
+ list.appendChild(listing.moveMakeItem(removeLastDirectoryPartOf(window.location.pathname) + "/", ".."));
+ }
+
+ for(let f of JSON.parse(data)) {
+ if(f.IsDir === true) {
+ dirs++;
+ list.appendChild(listing.moveMakeItem(f.URL, f.Name));
+ }
+ }
+
+ if(dirs === 0) {
+ prompt.querySelector("p").innerHTML = `There aren't any folders in this directory.`;
+ }
+
+ document.body.appendChild(prompt);
+ document.querySelector(".overlay").classList.add("active");
+ document.querySelector(".prompt").classList.add("active");
+ })
+ .catch(e => console.log(e));
+}
+
+document.addEventListener('DOMContentLoaded', event => {
+ listing.updateColumns();
+ listing.addDoubleTapEvent();
+
+ buttons.rename = document.getElementById("rename");
+ buttons.upload = document.getElementById("upload");
+ buttons.new = document.getElementById('new');
+ buttons.download = document.getElementById('download');
+ buttons.move = document.getElementById("move");
+
+ buttons.move.addEventListener("click", listing.moveEvent);
+
+ document.getElementById('multiple-selection-activate').addEventListener('click', event => {
+ listing.selectMultiple = true;
+ clickOverlay.click();
+
+ document.getElementById('multiple-selection').classList.add('active');
+ document.querySelector('body').style.paddingBottom = "4em";
+ })
+
+ document.getElementById('multiple-selection-cancel').addEventListener('click', event => {
+ listing.selectMultiple = false;
+
+ document.querySelector('body').style.paddingBottom = "0";
+ document.getElementById('multiple-selection').classList.remove('active');
+ })
+
+ if(user.AllowEdit) {
+ buttons.rename.addEventListener("click", listing.rename);
+ }
+
+ let items = document.getElementsByClassName('item');
+
+ if(user.AllowNew) {
+ buttons.upload.addEventListener("click", (event) => {
+ document.getElementById("upload-input").click();
+ });
+
+ buttons.new.addEventListener('click', listing.newFileButton);
+
+ // Drag and Drop
+ document.addEventListener("dragover", function (event) {
+ event.preventDefault();
+ }, false);
+
+ document.addEventListener("dragenter", (event) => {
+ Array.from(items).forEach(file => {
+ file.style.opacity = 0.5;
+ });
+ }, false);
+
+ document.addEventListener("dragend", (event) => {
+ Array.from(items).forEach(file => {
+ file.style.opacity = 1;
+ });
+ }, false);
+
+ document.addEventListener("drop", listing.documentDrop, false);
+ }
+
+});
diff --git a/assss/public/js/vendor/ace/ace.js b/assss/public/js/vendor/ace/ace.js
new file mode 100644
index 00000000..b4b7a55c
--- /dev/null
+++ b/assss/public/js/vendor/ace/ace.js
@@ -0,0 +1,14 @@
+(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMESPACE="",e=function(){return this}();!e&&typeof window!="undefined"&&(e=window);if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if(typeof t=="string"){var i=s(e,t);if(i!=undefined)return n&&n(),i}else if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(var u=0,a=t.length;u1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;eE){y(++w);continue}w=a+r,e[w]==t&&w--,y(w-b)}return s},this.$getDisplayTokens=function(n,r){var i=[],s;r=r||0;for(var o=0;o 0&&s&&V(s);s=i.pop())n.line--,n.ch=0;s?(n.line--,n.ch=Pt(e,n.line)):n.ch=0}}function Kt(e,t,n){t.ch=0,n.ch=0,n.line++}function Qt(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function Gt(e,t,n,r,i){var s=Vt(e),o=e.getLine(s.line),u=s.ch,a=i?D[0]:P[0];while(!a(o.charAt(u))){u++;if(u>=o.length)return null}r?a=P[0]:(a=D[0],a(o.charAt(u))||(a=D[1]));var f=u,l=u;while(a(o.charAt(f))&&fi?(i0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(o.prototype),t.LineWidgets=o}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("../line_widgets").LineWidgets,i=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("
"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,typeof define=="function"&&(t.define=define),t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var o="";if(e&&/input|textarea/i.test(e.tagName)){var u=e;o=u.value,e=r.createElement("pre"),u.parentNode.replaceChild(e,u)}else e&&(o=r.getInnerText(e),e.innerHTML="");var f=t.createEditSession(o),l=new s(new a(e));l.setSession(f);var c={document:f,editor:l,onResize:l.resize.bind(l,null)};return u&&(c.textarea=u),i.addListener(window,"resize",c.onResize),l.on("destroy",function(){i.removeListener(window,"resize",c.onResize),c.editor.container.env=null}),l.container.env=l.env=c,l},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u,t.version="1.2.6"});
+ (function() {
+ window.require(["ace/ace"], function(a) {
+ if (a) {
+ a.config.init(true);
+ a.define = window.define;
+ }
+ if (!window.ace)
+ window.ace = a;
+ for (var key in a) if (a.hasOwnProperty(key))
+ window.ace[key] = a[key];
+ });
+ })();
+
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/ext-beautify.js b/assss/public/js/vendor/ace/ext-beautify.js
new file mode 100644
index 00000000..4f3fe5d7
--- /dev/null
+++ b/assss/public/js/vendor/ace/ext-beautify.js
@@ -0,0 +1,5 @@
+define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;yKeyboard Shortcuts
"+o+"",n(t,s,"0","0","0",null)}}var r=e("ace/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() {});
+ })();
+
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/ext-language_tools.js b/assss/public/js/vendor/ace/ext-language_tools.js
new file mode 100644
index 00000000..1addfcb1
--- /dev/null
+++ b/assss/public/js/vendor/ace/ext-language_tools.js
@@ -0,0 +1,5 @@
+define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r
",o.escapeHTML(e.snippet)].join(""))}},c=[l,a,f];t.setCompleters=function(e){c.length=0,e&&c.push.apply(c,e)},t.addCompleter=function(e){c.push(e)},t.textCompleter=a,t.keyWordCompleter=f,t.snippetCompleter=l;var h={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){d(t.session.$mode)},d=function(e){var t=e.$id;r.files||(r.files={}),v(t),e.modes&&e.modes.forEach(d)},v=function(e){if(!e||r.files[e])return;var t=e.replace("mode","snippets");r.files[e]={},s.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){v("ace/mode/"+e)})))})},m=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"){var r=u.getCompletionPrefix(t);r&&!n&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},g=e("../editor").Editor;e("../config").defineOptions(g.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:c),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})});
+ (function() {
+ window.require(["ace/ext/language_tools"], function() {});
+ })();
+
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/ext-linking.js b/assss/public/js/vendor/ace/ext-linking.js
new file mode 100644
index 00000000..17b2a2c6
--- /dev/null
+++ b/assss/public/js/vendor/ace/ext-linking.js
@@ -0,0 +1,5 @@
+define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}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("ace/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}})});
+ (function() {
+ window.require(["ace/ext/linking"], function() {});
+ })();
+
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/ext-modelist.js b/assss/public/js/vendor/ace/ext-modelist.js
new file mode 100644
index 00000000..dbaacf61
--- /dev/null
+++ b/assss/public/js/vendor/ace/ext-modelist.js
@@ -0,0 +1,5 @@
+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
"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d ");for(var l in t.defaultOptions)a.push("Setting Value ");a.push("",o[l]," "),a.push(""),f(a,l,u[l],i.getOption(l)),a.push("
";if(!n)for(var s in r){var o=r[s].toString();o.length&&(i+='"'+s+" "+o+"
")}else{var s;n=n.join("");for(var u=0;uo)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/abc"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-actionscript.js b/assss/public/js/vendor/ace/mode-actionscript.js
new file mode 100644
index 00000000..d5e7fbda
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-actionscript.js
@@ -0,0 +1 @@
+define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"support.class.actionscript.2",regex:"\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b"},{token:"support.function.actionscript.2",regex:"\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b"},{token:"support.constant.actionscript.2",regex:"\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b"},{token:"keyword.control.actionscript.2",regex:"\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b"},{token:"storage.type.actionscript.2",regex:"\\b(?:Boolean|Number|String|Void)\\b"},{token:"constant.language.actionscript.2",regex:"\\b(?:null|undefined|true|false)\\b"},{token:"constant.numeric.actionscript.2",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.actionscript.2",regex:'"',push:[{token:"punctuation.definition.string.end.actionscript.2",regex:'"',next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.double.actionscript.2"}]},{token:"punctuation.definition.string.begin.actionscript.2",regex:"'",push:[{token:"punctuation.definition.string.end.actionscript.2",regex:"'",next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.single.actionscript.2"}]},{token:"support.constant.actionscript.2",regex:"\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b"},{token:"punctuation.definition.comment.actionscript.2",regex:"/\\*",push:[{token:"punctuation.definition.comment.actionscript.2",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.actionscript.2"}]},{token:"punctuation.definition.comment.actionscript.2",regex:"//.*$",push_:[{token:"comment.line.double-slash.actionscript.2",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.actionscript.2"}]},{token:"keyword.operator.actionscript.2",regex:"\\binstanceof\\b"},{token:"keyword.operator.symbolic.actionscript.2",regex:"[-!%&*+=/?:]"},{token:["meta.preprocessor.actionscript.2","punctuation.definition.preprocessor.actionscript.2","meta.preprocessor.actionscript.2"],regex:"^([ \\t]*)(#)([a-zA-Z]+)"},{token:["storage.type.function.actionscript.2","meta.function.actionscript.2","entity.name.function.actionscript.2","meta.function.actionscript.2","punctuation.definition.parameters.begin.actionscript.2"],regex:"\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()",push:[{token:"punctuation.definition.parameters.end.actionscript.2",regex:"\\)",next:"pop"},{token:"variable.parameter.function.actionscript.2",regex:"[^,)$]+"},{defaultToken:"meta.function.actionscript.2"}]},{token:["storage.type.class.actionscript.2","meta.class.actionscript.2","entity.name.type.class.actionscript.2","meta.class.actionscript.2","storage.modifier.extends.actionscript.2","meta.class.actionscript.2","entity.other.inherited-class.actionscript.2"],regex:"\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?"}]},this.normalizeRules()};s.metaData={fileTypes:["as"],keyEquivalent:"^~A",name:"ActionScript",scopeName:"source.actionscript.2"},r.inherits(s,i),t.ActionScriptHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./actionscript_highlight_rules").ActionScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-ada.js b/assss/public/js/vendor/ace/mode-ada.js
new file mode 100644
index 00000000..ba518500
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-ada.js
@@ -0,0 +1 @@
+define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-apache_conf.js b/assss/public/js/vendor/ace/mode-apache_conf.js
new file mode 100644
index 00000000..ff86524e
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-apache_conf.js
@@ -0,0 +1 @@
+define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["punctuation.definition.comment.apacheconf","comment.line.hash.ini","comment.line.hash.ini"],regex:"^((?:\\s)*)(#)(.*$)"},{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)(?:(\\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)(>)"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.replacement.apacheconf","text"],regex:"(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?"},{token:["keyword.alias.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:"keyword.core.apacheconf",regex:"\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b"},{token:"keyword.mpm.apacheconf",regex:"\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b"},{token:"keyword.access.apacheconf",regex:"\\b(?:Allow|Deny|Order)\\b"},{token:"keyword.actions.apacheconf",regex:"\\b(?:Action|Script)\\b"},{token:"keyword.alias.apacheconf",regex:"\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b"},{token:"keyword.auth.apacheconf",regex:"\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b"},{token:"keyword.auth_anon.apacheconf",regex:"\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b"},{token:"keyword.auth_dbm.apacheconf",regex:"\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b"},{token:"keyword.auth_digest.apacheconf",regex:"\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b"},{token:"keyword.auth_ldap.apacheconf",regex:"\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b"},{token:"keyword.autoindex.apacheconf",regex:"\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b"},{token:"keyword.cache.apacheconf",regex:"\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b"},{token:"keyword.cern_meta.apacheconf",regex:"\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b"},{token:"keyword.cgi.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b"},{token:"keyword.cgid.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b"},{token:"keyword.charset_lite.apacheconf",regex:"\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b"},{token:"keyword.dav.apacheconf",regex:"\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b"},{token:"keyword.deflate.apacheconf",regex:"\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b"},{token:"keyword.dir.apacheconf",regex:"\\b(?:DirectoryIndex|DirectorySlash)\\b"},{token:"keyword.disk_cache.apacheconf",regex:"\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b"},{token:"keyword.dumpio.apacheconf",regex:"\\b(?:DumpIOInput|DumpIOOutput)\\b"},{token:"keyword.env.apacheconf",regex:"\\b(?:PassEnv|SetEnv|UnsetEnv)\\b"},{token:"keyword.expires.apacheconf",regex:"\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b"},{token:"keyword.ext_filter.apacheconf",regex:"\\b(?:ExtFilterDefine|ExtFilterOptions)\\b"},{token:"keyword.file_cache.apacheconf",regex:"\\b(?:CacheFile|MMapFile)\\b"},{token:"keyword.headers.apacheconf",regex:"\\b(?:Header|RequestHeader)\\b"},{token:"keyword.imap.apacheconf",regex:"\\b(?:ImapBase|ImapDefault|ImapMenu)\\b"},{token:"keyword.include.apacheconf",regex:"\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b"},{token:"keyword.isapi.apacheconf",regex:"\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b"},{token:"keyword.ldap.apacheconf",regex:"\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b"},{token:"keyword.log.apacheconf",regex:"\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b"},{token:"keyword.mem_cache.apacheconf",regex:"\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b"},{token:"keyword.mime.apacheconf",regex:"\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b"},{token:"keyword.misc.apacheconf",regex:"\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b"},{token:"keyword.negotiation.apacheconf",regex:"\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b"},{token:"keyword.nw_ssl.apacheconf",regex:"\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b"},{token:"keyword.proxy.apacheconf",regex:"\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b"},{token:"keyword.rewrite.apacheconf",regex:"\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b"},{token:"keyword.setenvif.apacheconf",regex:"\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b"},{token:"keyword.so.apacheconf",regex:"\\b(?:LoadFile|LoadModule)\\b"},{token:"keyword.ssl.apacheconf",regex:"\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b"},{token:"keyword.usertrack.apacheconf",regex:"\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b"},{token:"keyword.vhost_alias.apacheconf",regex:"\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b"},{token:["keyword.php.apacheconf","text","entity.property.apacheconf","text","string.value.apacheconf","text"],regex:"\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)"},{token:["punctuation.variable.apacheconf","variable.env.apacheconf","variable.misc.apacheconf","punctuation.variable.apacheconf"],regex:"(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})"},{token:["entity.mime-type.apacheconf","text"],regex:"\\b((?:text|image|application|video|audio)/.+?)(\\s)"},{token:"entity.helper.apacheconf",regex:"\\b(?:from|unset|set|on|off)\\b",caseInsensitive:!0},{token:"constant.integer.apacheconf",regex:"\\b\\d+\\b"},{token:["text","punctuation.definition.flag.apacheconf","string.flag.apacheconf","punctuation.definition.flag.apacheconf","text"],regex:"(\\s)(\\[)(.*?)(\\])(\\s)"}]},this.normalizeRules()};s.metaData={fileTypes:["conf","CONF","htaccess","HTACCESS","htgroups","HTGROUPS","htpasswd","HTPASSWD",".htaccess",".HTACCESS",".htgroups",".HTGROUPS",".htpasswd",".HTPASSWD"],name:"Apache Conf",scopeName:"source.apacheconf"},r.inherits(s,i),t.ApacheConfHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-applescript.js b/assss/public/js/vendor/ace/mode-applescript.js
new file mode 100644
index 00000000..e611dc33
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-applescript.js
@@ -0,0 +1 @@
+define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="about|above|after|against|and|around|as|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|try|until|where|while|whose|with|without",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",n="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="alias|application|boolean|class|constant|date|file|integer|list|number|real|record|string|text|character|characters|contents|day|frontmost|id|item|length|month|name|paragraph|paragraphs|rest|reverse|running|time|version|weekday|word|words|year",i=this.createKeywordMapper({"support.function":n,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"string",regex:'".*?"'},{token:"support.type",regex:"\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{token:"support.function",regex:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{token:"constant.language",regex:"\\b(text item delimiters|current application|missing value)\\b"},{token:"keyword",regex:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{token:i,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.AppleScriptHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./applescript_highlight_rules").AppleScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"},this.$id="ace/mode/applescript"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-asciidoc.js b/assss/public/js/vendor/ace/mode-asciidoc.js
new file mode 100644
index 00000000..217da813
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-asciidoc.js
@@ -0,0 +1 @@
+define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){function t(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var e="[a-zA-Z\u00a1-\uffff]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:e},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:t("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:t("\\*")},{token:"literal",regex:t("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:t("`")},{token:"keyword",regex:t("^")},{token:"keyword",regex:t("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var r in this.$rules){var i=this.$rules[r];for(var s=i.length;s--;){var o=i[s];if(o.include||typeof o=="string"){var u=[s,1].concat(this.$rules[o.include||o]);o.noEscape&&(u=u.filter(function(e){return!e.next})),i.splice.apply(i,u)}else o.token in n&&(o.token=n[o.token])}}};r.inherits(s,i),t.AsciidocHighlightRules=s}),define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="="?this.singleLineHeadingRe.test(r)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":e.bgTokenizer.getState(n)=="dissallowDelimitedBlock"?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type}function d(){var t=f.value.match(p);if(t)return t[0].length;var r=c.indexOf(f.value[0])+1;return r==1&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:r}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;var f,c=["=","-","~","^","+"],h="markup.heading",p=this.singleLineHeadingRe;if(l(n)==h){var v=d();while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-batchfile.js b/assss/public/js/vendor/ace/mode-batchfile.js
new file mode 100644
index 00000000..db4a4a9b
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-batchfile.js
@@ -0,0 +1 @@
+define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-bro.js b/assss/public/js/vendor/ace/mode-bro.js
new file mode 100644
index 00000000..a95ae788
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-bro.js
@@ -0,0 +1 @@
+define("ace/mode/bro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.bro",regex:/#/,push:[{token:"comment.line.number-sign.bro",regex:/$/,next:"pop"},{defaultToken:"comment.line.number-sign.bro"}]},{token:"keyword.control.bro",regex:/\b(?:break|case|continue|else|for|if|return|switch|next|when|timeout|schedule)\b/},{token:["meta.function.bro","meta.function.bro","storage.type.bro","meta.function.bro","entity.name.function.bro","meta.function.bro"],regex:/^(\s*)(?:function|hook|event)(\s*)(.*)(\s*\()(.*)(\).*$)/},{token:"storage.type.bro",regex:/\b(?:bool|enum|double|int|count|port|addr|subnet|any|file|interval|time|string|table|vector|set|record|pattern|hook)\b/},{token:"storage.modifier.bro",regex:/\b(?:global|const|redef|local|&(?:optional|rotate_interval|rotate_size|add_func|del_func|expire_func|expire_create|expire_read|expire_write|persistent|synchronized|encrypt|mergeable|priority|group|type_column|log|error_handler))\b/},{token:"keyword.operator.bro",regex:/\s*(?:\||&&|(?:>|<|!)=?|==)\s*|\b!?in\b/},{token:"constant.language.bro",regex:/\b(?:T|F)\b/},{token:"constant.numeric.bro",regex:/\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:\/(?:tcp|udp|icmp)|\s*(?:u?sec|min|hr|day)s?)?\b/},{token:"punctuation.definition.string.begin.bro",regex:/"/,push:[{token:"punctuation.definition.string.end.bro",regex:/"/,next:"pop"},{include:"#string_escaped_char"},{include:"#string_placeholder"},{defaultToken:"string.quoted.double.bro"}]},{token:"punctuation.definition.string.begin.bro",regex:/\//,push:[{token:"punctuation.definition.string.end.bro",regex:/\//,next:"pop"},{include:"#string_escaped_char"},{include:"#string_placeholder"},{defaultToken:"string.quoted.regex.bro"}]},{token:["meta.preprocessor.bro.load","keyword.other.special-method.bro"],regex:/^(\s*)(\@load(?:-sigs)?)\b/,push:[{token:[],regex:/(?=\#)|$/,next:"pop"},{defaultToken:"meta.preprocessor.bro.load"}]},{token:["meta.preprocessor.bro.if","keyword.other.special-method.bro","meta.preprocessor.bro.if"],regex:/^(\s*)(\@endif|\@if(?:n?def)?)(.*$)/,push:[{token:[],regex:/$/,next:"pop"},{defaultToken:"meta.preprocessor.bro.if"}]}],"#disabled":[{token:"text",regex:/^\s*\@if(?:n?def)?\b.*$/,push:[{token:"text",regex:/^\s*\@endif\b.*$/,next:"pop"},{include:"#disabled"},{include:"#pragma-mark"}],comment:"eat nested preprocessor ifdefs"}],"#preprocessor-rule-other":[{token:["text","meta.preprocessor.bro","meta.preprocessor.bro","text"],regex:/^(\s*)(@if)((?:n?def)?)\b(.*?)(?:(?=)|$)/,push:[{token:["text","meta.preprocessor.bro","text"],regex:/^(\s*)(@endif)\b(.*$)/,next:"pop"},{include:"$base"}]}],"#string_escaped_char":[{token:"constant.character.escape.bro",regex:/\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})/},{token:"invalid.illegal.unknown-escape.bro",regex:/\\./}],"#string_placeholder":[{token:"constant.other.placeholder.bro",regex:/%(?:\d+\$)?[#0\- +']*[,;:_]?(?:-?\d+|\*(?:-?\d+\$)?)?(?:\.(?:-?\d+|\*(?:-?\d+\$)?)?)?(?:hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]/},{token:"invalid.illegal.placeholder.bro",regex:/%/}]},this.normalizeRules()};s.metaData={fileTypes:["bro"],foldingStartMarker:"^(\\@if(n?def)?)",foldingStopMarker:"^\\@endif",keyEquivalent:"@B",name:"Bro",scopeName:"source.bro"},r.inherits(s,i),t.BroHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./bro_highlight_rules").BroHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/bro"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/assss/public/js/vendor/ace/mode-c9search.js b/assss/public/js/vendor/ace/mode-c9search.js
new file mode 100644
index 00000000..69705c4f
--- /dev/null
+++ b/assss/public/js/vendor/ace/mode-c9search.js
@@ -0,0 +1 @@
+define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f