From 09763dbf6a6f24263cdff535a3aca64da35a0abb Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 13 Jun 2018 22:14:05 -0700 Subject: Initial commit --- README.md | 83 ++++++++++++++++++- app.css | 130 +++++++++++++++++++++++++++++ app.css.map | 7 ++ app.js | 58 +++++++++++++ app.scss | 204 ++++++++++++++++++++++++++++++++++++++++++++++ assets/favicon.png | Bin 0 -> 49200 bytes assets/homer.png | Bin 0 -> 49200 bytes assets/tools/elastic.png | Bin 0 -> 1208 bytes assets/tools/grafana.png | Bin 0 -> 13832 bytes assets/tools/jenkins.png | Bin 0 -> 6453 bytes assets/tools/kibana.png | Bin 0 -> 8839 bytes assets/tools/monit.png | Bin 0 -> 16823 bytes assets/tools/pingdom.png | Bin 0 -> 22125 bytes assets/tools/rabbitmq.png | Bin 0 -> 31047 bytes config.yml | 63 ++++++++++++++ index.html | 107 ++++++++++++++++++++++++ screenshot.png | Bin 0 -> 123174 bytes vendors/js-yaml.min.js | 1 + 18 files changed, 651 insertions(+), 2 deletions(-) create mode 100644 app.css create mode 100644 app.css.map create mode 100644 app.js create mode 100644 app.scss create mode 100644 assets/favicon.png create mode 100644 assets/homer.png create mode 100644 assets/tools/elastic.png create mode 100644 assets/tools/grafana.png create mode 100644 assets/tools/jenkins.png create mode 100644 assets/tools/kibana.png create mode 100644 assets/tools/monit.png create mode 100644 assets/tools/pingdom.png create mode 100644 assets/tools/rabbitmq.png create mode 100644 config.yml create mode 100644 index.html create mode 100644 screenshot.png create mode 100644 vendors/js-yaml.min.js diff --git a/README.md b/README.md index c98564a..12a2940 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,81 @@ -# homer -A very simple static homepage for your server. +# Homer +A very simple static HOMepage for your servER. +Add all your useful service, external links, notes... or anything. + +If you need authentication support, you're on your own (it can be secured using a web server auth module or exposing it only through a VPN network / SSH tunneling, ...) + +![screenshot](https://github.com/bastienwirtz/homer/blob/master/screenshot.png) + +**How to build / install it? Where is the webpack config?** +There is no build system (😱), use it like that! It'meant to be stupid simple & zero maintenance required. just copy the static files somewhere, and visit the `index.html`. + + +## configuration + +Title, icons, links, colors, and services can be configured in the `config.yml` file, using [yaml](http://yaml.org/) format. + + +```yaml +--- +# Homepage configuration +# See https://fontawesome.com/v4.7.0/icons/ for icons options + +title: "Simple homepage" +subtitle: "Homer" +logo: "assets/homer.png" + +# Optional message +message: + title: "Optional message!" + content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula." + +# Optional navbar +links: + - name: "ansible" + icon: "fa-github" + url: "https://github.com/xxxxx/ansible/" + - name: "Wiki" + icon: "fa-book" + url: "https://wiki.xxxxxx.com/" + +# Services +# First level array represent a group. +# Leave only a "items" key if not using group (group name & icon are optional, section separation will not be displayed). +services: + - name: "DevOps" + icon: "fa-code-fork" + items: + - name: "Jenkins" + logo: "/assets/tools/jenkins.png" + subtitle: "Continuous integration server" + tag: "CI" + url: "#" + - name: "RabbitMQ Management" + logo: "/assets/tools/rabbitmq.png" + subtitle: "Manage & monitor RabbitMQ server" + tag: "haproxy" + url: "#" + - name: "Monitoring" + icon: "fa-heartbeat" + items: + - name: "M/Monit" + logo: "/assets/tools/monit.png" + subtitle: "Monitor & manage all monit enabled hosts" + tag: "monit" + url: "#" + - name: "Grafana" + logo: "/assets/tools/grafana.png" + subtitle: "Metric analytics & dashboards" + url: "#" + - name: "Kibana" + logo: "/assets/tools/elastic.png" + subtitle: "Explore & visualize logs" + tag: "elk" + url: "#" + - name: "Website monitoring" + logo: "/assets/tools/pingdom.png" + subtitle: "Pingdom public reports overview" + tag: "CI" + url: "#" + +``` \ No newline at end of file diff --git a/app.css b/app.css new file mode 100644 index 0000000..7a4c255 --- /dev/null +++ b/app.css @@ -0,0 +1,130 @@ +body { + font-family: 'Raleway', sans-serif; + background-color: #F5F5F5; + height: 100%; } + body h1, body h2, body h3, body h4, body h5, body h6 { + font-family: 'Lato', sans-serif; } + body h1 { + font-size: 2rem; } + body h2 { + font-size: 1.7rem; + margin-top: 3rem; + margin-bottom: 1rem; } + body h2 .fa { + margin-right: 10px; + color: #4285f4; } + body h2 span { + font-weight: bold; + color: #4285f4; } + body [v-cloak] { + display: none; } + body #bighead { + color: #ffffff; } + body #bighead .dashboard-title { + padding: 6px 0 0 80px; } + body #bighead .first-line { + height: 100px; + vertical-align: center; + background-color: #3367d6; } + body #bighead .first-line h1 { + margin-top: -12px; + font-size: 2rem; } + body #bighead .first-line .headline { + margin-top: 5px; + font-size: 0.9rem; } + body #bighead .first-line .container { + height: 80px; + padding: 10px 0; } + body #bighead .first-line img { + float: left; + max-height: 70px; + max-width: 70px; + padding: 10px; } + body #bighead .navbar { + background-color: #4285f4; } + body #bighead .navbar a { + color: #152138; } + body #bighead .navbar a:hover { + background-color: #5a95f5; } + body #main-section { + margin-bottom: 3rem; + padding: 0; } + body #main-section h2 { + border-bottom: 1px dashed #ccc; + padding-bottom: 10px; } + body #main-section .title { + font-size: 1.1em; } + body #main-section .subtitle { + font-size: .9em; } + body #main-section .column { + padding: 1.2rem .75rem; } + body #main-section .message { + margin-top: 45px; + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); } + body #main-section .message .message-header { + font-weight: bold; } + body #main-section .message .message-body { + border: none; } + body .media-content { + overflow: inherit; } + body .tag { + color: #4285f4; + background-color: #4285f4; + position: absolute; + top: 1rem; + right: -0.3rem; + width: 3px; + overflow: hidden; + transition: all 0.2s ease-out; + padding: 0; } + body .card { + border-radius: 5px; + border: none; + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); + transition: cubic-bezier(0.165, 0.84, 0.44, 1) 300ms; } + body .card:hover { + background-color: #FFFFFF; + transform: translate(0, -3px); } + body .card:hover .tag { + width: auto; + color: #ffffff; + padding: 0 0.75em; } + body .card-content { + height: 110px; } + body .footer { + position: fixed; + left: 0; + right: 0; + bottom: 0; + padding: 1rem 0.5rem; + text-align: left; + background-color: #fafafa; + border-top: 1px solid #F5F5F5; } + body .search-bar { + position: relative; } + body .search-bar #search { + border: none; + background-color: #5f98f6; + border-radius: 5px; + padding: 2px 12px 2px 30px; + margin: 10px 0; + transition: all 100ms linear; + color: #ffffff; + height: 30px; + width: 100px; } + body .search-bar #search:focus { + color: #000000; + width: 250px; + background-color: #ffffff; } + body .search-bar .search-label::before { + font-family: 'FontAwesome'; + position: absolute; + top: 12px; + left: 8px; + content: "\f002"; + width: 20px; + height: 20px; } + body .search-bar:focus-within .search-label::before { + color: #4a4a4a; } + +/*# sourceMappingURL=app.css.map */ diff --git a/app.css.map b/app.css.map new file mode 100644 index 0000000..9e5dc0c --- /dev/null +++ b/app.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "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", +"sources": ["app.scss"], +"names": [], +"file": "app.css" +} \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..2697975 --- /dev/null +++ b/app.js @@ -0,0 +1,58 @@ +var app = new Vue({ + el: '#app', + data: { + config: null, + filter: '' + }, + beforeCreate () { + var that = this; + return getConfig().then(function (config) { + // Splice services list into groups of 3 for flex column display + var size = 3; + config.services.forEach(function(service) { + service.rows = []; + items = service.items; + while (items.length) { + service.rows.push(items.splice(0, size)); + } + + if (service.rows.length) { + var last = service.rows.length-1; + service.rows[last] = service.rows[last].concat(Array(size - service.rows[last].length)); + } + }); + that.config = config; + }); + } +}); + + +function getConfig() { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'config.yml'); + xhr.onload = function () { + if (this.status >= 200 && this.status < 300) { + try { + var data = jsyaml.load(xhr.response); + resolve(data); + } catch (e) { + console.error('fail to parse config file'); + reject(); + } + } else { + reject({ + status: this.status, + statusText: xhr.statusText + }); + } + }; + xhr.onerror = function () { + reject({ + status: this.status, + statusText: xhr.statusText + }); + }; + xhr.send(); + }); +} \ No newline at end of file diff --git a/app.scss b/app.scss new file mode 100644 index 0000000..6391c2d --- /dev/null +++ b/app.scss @@ -0,0 +1,204 @@ +$primary-color: #3367d6; +$secondary-color: #4285f4; + +body { + font-family: 'Raleway', sans-serif; + background-color: #F5F5F5; + height: 100%; + + h1, h2, h3, h4, h5, h6 { + font-family: 'Lato', sans-serif; + } + + h1 { + font-size: 2rem; + } + + h2 { + font-size: 1.7rem; + margin-top: 3rem; + margin-bottom: 1rem; + + .fa { + margin-right: 10px; + color: $secondary-color; + } + + span { + font-weight: bold; + color: $secondary-color; + } + } + + [v-cloak] { + display: none + } + + #bighead { + color: #ffffff; + + .dashboard-title { + padding: 6px 0 0 80px; + } + + .first-line { + height: 100px; + vertical-align: center; + background-color: $primary-color; + + h1 { + margin-top: -12px; + font-size: 2rem; + } + + .headline { + margin-top: 5px; + font-size: 0.9rem; + } + + .container { + height: 80px; + padding: 10px 0; + } + + img { + float: left; + max-height: 70px; + max-width: 70px; + padding: 10px; + } + } + .navbar { + background-color: $secondary-color; + + a { + color: #152138; + + &:hover { + background-color: lighten( $secondary-color, 5% ); + } + } + } + } + + #main-section { + margin-bottom: 3rem; + padding: 0; + + h2 { + border-bottom: 1px dashed #ccc; + padding-bottom: 10px; + } + + .title { + font-size: 1.1em; + } + + .subtitle { + font-size: .9em; + } + + .column { + padding: 1.2rem .75rem; + } + + .message { + margin-top: 45px; + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); + + .message-header { + font-weight: bold; + } + + .message-body { + border: none; + } + } + } + + .media-content { + overflow: inherit; + } + + .tag { + color: $secondary-color; + background-color: $secondary-color; + position: absolute; + top: 1rem; + right: -0.3rem; + width: 3px; + overflow: hidden; + transition: all 0.2s ease-out; + padding: 0; + } + + .card { + border-radius: 5px; + border: none; + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.1); + transition: cubic-bezier(0.165, 0.84, 0.44, 1) 300ms + } + + .card:hover { + background-color: #FFFFFF; + transform: translate(0, -3px); + + .tag { + width: auto; + color: #ffffff; + padding: 0 0.75em; + } + } + + .card-content { + height: 110px; + } + + .footer { + position: fixed; + left: 0; + right: 0; + bottom: 0; + padding: 1rem 0.5rem; + text-align: left; + background-color: #fafafa; + border-top: 1px solid #F5F5F5; + } + + .search-bar { + position: relative; + #search { + border: none; + background-color: lighten( $secondary-color, 6% ); + border-radius: 5px; + padding: 2px 12px 2px 30px; + margin: 10px 0; + transition: all 100ms linear; + color: #ffffff; + height: 30px; + width: 100px; + + + &:focus { + color: #000000; + width: 250px; + background-color: #ffffff; + } + } + + .search-label::before { + font-family: 'FontAwesome'; + position: absolute; + top: 12px; + left: 8px; + content: "\f002"; + width: 20px; + height: 20px; + } + + &:focus-within .search-label::before { + color: #4a4a4a; + } + } + +} diff --git a/assets/favicon.png b/assets/favicon.png new file mode 100644 index 0000000..6fa8ee8 Binary files /dev/null and b/assets/favicon.png differ diff --git a/assets/homer.png b/assets/homer.png new file mode 100644 index 0000000..6fa8ee8 Binary files /dev/null and b/assets/homer.png differ diff --git a/assets/tools/elastic.png b/assets/tools/elastic.png new file mode 100644 index 0000000..11d655f Binary files /dev/null and b/assets/tools/elastic.png differ diff --git a/assets/tools/grafana.png b/assets/tools/grafana.png new file mode 100644 index 0000000..65de946 Binary files /dev/null and b/assets/tools/grafana.png differ diff --git a/assets/tools/jenkins.png b/assets/tools/jenkins.png new file mode 100644 index 0000000..6afeb65 Binary files /dev/null and b/assets/tools/jenkins.png differ diff --git a/assets/tools/kibana.png b/assets/tools/kibana.png new file mode 100644 index 0000000..c38b32b Binary files /dev/null and b/assets/tools/kibana.png differ diff --git a/assets/tools/monit.png b/assets/tools/monit.png new file mode 100644 index 0000000..1aa8c95 Binary files /dev/null and b/assets/tools/monit.png differ diff --git a/assets/tools/pingdom.png b/assets/tools/pingdom.png new file mode 100644 index 0000000..ec290ed Binary files /dev/null and b/assets/tools/pingdom.png differ diff --git a/assets/tools/rabbitmq.png b/assets/tools/rabbitmq.png new file mode 100644 index 0000000..90e2178 Binary files /dev/null and b/assets/tools/rabbitmq.png differ diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..09dd14e --- /dev/null +++ b/config.yml @@ -0,0 +1,63 @@ +--- +# Homepage configuration +# See https://fontawesome.com/v4.7.0/icons/ for icons options + +title: "Simple homepage" +subtitle: "Homer" +logo: "assets/homer.png" + +# Optional message +# See https://bulma.io/documentation/components/message/#colors for styling options. +message: + style: "is-warning" + title: "Optional message!" + content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula." + +# Optional navbar +links: + - name: "ansible" + icon: "fa-github" + url: "https://github.com/xxxxx/ansible/" + - name: "Wiki" + icon: "fa-book" + url: "https://wiki.xxxxxx.com/" + +# Services +# First level array represent a group. +# Leave only a "items" key if not using group (group name & icon are optional, section separation will not be displayed). +services: + - name: "DevOps" + icon: "fa-code-fork" + items: + - name: "Jenkins" + logo: "/assets/tools/jenkins.png" + subtitle: "Continuous integration server" + tag: "CI" + url: "#" + - name: "RabbitMQ Management" + logo: "/assets/tools/rabbitmq.png" + subtitle: "Manage & monitor RabbitMQ server" + tag: "haproxy" + url: "#" + - name: "Monitoring" + icon: "fa-heartbeat" + items: + - name: "M/Monit" + logo: "/assets/tools/monit.png" + subtitle: "Monitor & manage all monit enabled hosts" + tag: "monit" + url: "#" + - name: "Grafana" + logo: "/assets/tools/grafana.png" + subtitle: "Metric analytics & dashboards" + url: "#" + - name: "Kibana" + logo: "/assets/tools/elastic.png" + subtitle: "Explore & visualize logs" + tag: "elk" + url: "#" + - name: "Website monitoring" + logo: "/assets/tools/pingdom.png" + subtitle: "Pingdom public reports overview" + tag: "CI" + url: "#" diff --git a/index.html b/index.html new file mode 100644 index 0000000..9e946bf --- /dev/null +++ b/index.html @@ -0,0 +1,107 @@ + + + + + + + + Homer + + + + + + +
+
+
+
+ +
+ {{ config.subtitle }} +

{{ config.title }}

+
+
+
+
+ +
+
+ +
+
+ +
+
+

{{ config.message.title }}

+
+
+ {{ config.message.content }} +
+
+ +

Search

+ +
+

# {{ group.name }}

+ +
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..d45ecbc Binary files /dev/null and b/screenshot.png differ diff --git a/vendors/js-yaml.min.js b/vendors/js-yaml.min.js new file mode 100644 index 0000000..0dcb7ba --- /dev/null +++ b/vendors/js-yaml.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}}(function(){return function o(a,s,c){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[t]={exports:{}};a[t][0].call(r.exports,function(e){return u(a[t][1][e]||e)},r,r.exports,o,a,s,c)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e=i.flowLevel;switch(H(r,n,i.indent,t,function(e){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+V(r,i.indent)+Z(L(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,r.lastIndex=s,z(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;i=r.exec(e);){var c=i[1],u=i[2];n=" "===u[0],o+=c+(a||n||""===u?"":"\n")+z(u,t),a=n}return o}(r,t),e));case $:return'"'+function(e){for(var t,n,i,r="",o=0;ot&&o tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function Q(e,t,n,i,r,o){e.tag=null,e.dump=n,J(e,n,!1)||J(e,n,!0);var a=l.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0 "+e.dump)}return!0}function X(e,t){var n,i,r=[],o=[];for(function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;ot)&&0!==i)_(e,"bad indentation of a sequence entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt)&&(K(e,t,b,!0,r)&&(m?d=e.result:h=e.result),m||(D(e,l,p,f,d,h,o,a),f=d=h=null),q(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)_(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),j(o))p++;else{if(e.lineIndent>10),56320+(c-65536&1023)),e.position++}else _(e,"unknown escape sequence");n=i=e.position}else j(s)?(T(e,n,i,!0),R(e,q(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Y(e)?_(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}_(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?m=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!I(i)&&!E(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&_(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||_(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],q(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,s,c,u,l,p=e.kind,f=e.result;if(I(l=e.input.charCodeAt(e.position))||E(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(I(i=e.input.charCodeAt(e.position+1))||n&&E(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==l;){if(58===l){if(I(i=e.input.charCodeAt(e.position+1))||n&&E(i))break}else if(35===l){if(I(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Y(e)||n&&E(l))break;if(j(l)){if(s=e.line,c=e.lineStart,u=e.lineIndent,q(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(T(e,r,o,!1),R(e,e.line-s),r=o=e.position,a=!1),S(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return T(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,p,x===n)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||_(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(m=s&&B(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;c tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):_(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):_(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function $(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(q(e,!0,-1),r=e.input.charCodeAt(e.position),!(0t/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;ot/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var i=e("./common"),r=e("./exception"),o=e("./type");function a(e,t,i){var r=[];return e.include.forEach(function(e){i=a(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0==(n=r%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===n?(s.push(a>>10&255),s.push(a>>2&255)):12===n&&s.push(a>>4&255),c?c.from?c.from(s):new c(s):s},predicate:function(e){return c&&c.isBuffer(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=u;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type");t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a