diff --git a/www/cfg.js.example b/www/cfg.js.example deleted file mode 100644 index 39d5a48..0000000 --- a/www/cfg.js.example +++ /dev/null @@ -1,13 +0,0 @@ -const CFG = { - API: { - HOST: "127.0.0.1", - PORT: 3000, - ROUTE: "/www" - }, - GMAPS: { - API_KEY: "XXXXX", - BASE_ZOOM: 20, - BASE_LAT: 39.18875480450959, - BASE_LNG: -96.58109955489635 - } -}; \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css deleted file mode 100644 index b55220e..0000000 --- a/www/css/main.css +++ /dev/null @@ -1,262 +0,0 @@ -html { - -webkit-animation: fadein 1s; - -moz-animation: fadein 1s; - -ms-animation: fadein 1s; - -o-animation: fadein 1s; - animation: fadein 1s; -} - -body { - overflow-x: hidden; - overflow-y: scroll !important; -} - -#map { - position: absolute; - left: calc(50% - 400px); - width: 800px !important; - height: 400px !important; -} - -#map_manager { - padding-bottom: 500px; - margin-top: -100px; - display: none; -} - -.view { - letter-spacing: 0px; - padding: 5px 25px !important; - margin-top: -35px; -} - -.area { - font-family: "Andale Mono", AndaleMono, monospace; - text-align: center; - font-style: normal; - font-variant: normal; - -webkit-font-smoothing: antialiased; - font-size: 75px; - letter-spacing: -5px; - color: #fff; - position: relative; - margin-top: 5px; - text-transform: uppercase; -} - -.Codemirror { - text-align: left; -} - -.ping { - position: absolute; - top: 0px; - left: 10px; - font-size: 18px; - letter-spacing: 0px; -} - -.version { - font-size: 15px; - letter-spacing: 0px; - margin-top: -75px; - margin-bottom: -25px; - text-transform: none; -} - -.btn { - text-transform: uppercase; -} - -.centered { - text-align: center; - position: relative; - top: 40%; - transform: translateY(-40%); - margin-top: -175px; - -webkit-transform: translateY(-40%); - -moz-transform: translateY(0%); -} - -@-moz-document url-prefix() { - .centered { - margin-top: 0px; - } -} - -.body { - background: #2d2d2d; - background-color: #2d2d2d; -} - -.star { - position: absolute; - width: 2px; - height: 2px; - background: rgba(255, 255, 255, 0.45); - opacity: 1; -} - -.btn { - font-family: "Andale Mono", AndaleMono, monospace; - display: inline-block; - padding: 5px; - border: 1px solid rgba(255, 255, 255, .35); - border-radius: 4px; - color: rgba(255, 255, 255, .75); - text-decoration: none; - transition: border .35s, background .35s; - min-width: 100px; - text-align: center; - font-size: 15px; - font-style: normal; - font-variant: normal; - font-weight: 500; - line-height: 25px; - cursor: pointer; -} - -.input { - background: rgba(0,0,0,0); - cursor: auto; -} - -input:focus { - outline: none; -} - -button:focus { - outline: none; -} - -.label { - background: rgba(255, 255, 255, .05); - border: 1px solid rgba(255, 255, 255, .5); - color: #79a2b7; -} - -.info { - padding-bottom: 45px; - margin-top: -45px; - font-size: 18px; - letter-spacing: 0px; -} - -.cmd_label { - border: none; - background: rgba(255,255,255,0.05); - color: white; - cursor: auto; - text-transform: none; -} - -.submit { - background: rgba(165, 165, 165, 0.15); -} - -.with_label { - margin-left: 25px; - width: 120px; -} - -#connection_status { - text-transform: uppercase; -} - -.login_area { - font-size: 25px; - letter-spacing: 0px; - text-transform: none; - margin: -25px; - padding: 0px; -} - -.login_input { - text-transform: none; - background: rgba(0,0,0,0); -} - -.noselect { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.btn:hover { - background: rgba(255, 255, 255, .05); - border: 1px solid rgba(255, 255, 255, .5); -} - -.txt { - margin-left: calc(20%); - margin-right: calc(20%); - left: auto; - width: auto; - min-height: 300px; - background: rgba(255, 255, 255, 0.0) !important; - border: 1px solid rgba(255, 255, 255, 0.0) !important; - border-radius: 4px !important; - padding: 10px 15px !important; - color: rgba(255, 255, 255, .75) !important; - resize: none; - transition: color .35s !important; -} - -.txt:focus { - outline: none; - color: rgba(255, 255, 255, .85); -} - -::-moz-selection { - color: rgba(255, 255, 255, .85); - background: rgba(255, 255, 255, .075); -} -::selection { - color: rgba(255, 255, 255, .85); - background: rgba(255, 255, 255, .075); -} - -::-webkit-scrollbar{ - width: 10px; - height: 0px; - background: transparent; -} -::-webkit-scrollbar-thumb{ - background: rgba(255, 255, 255, .15); - border-radius: 5px; -} -::-webkit-scrollbar-corner{ - background: transparent; -} - -@keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} -@-webkit-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} -@-moz-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes pulsate { - 0% {transform: scale(0.1, 0.1); opacity: 0.0;} - 50% {opacity: 1.0;} - 100% {transform: scale(1.2, 1.2); opacity: 0.0;} -} -@-webkit-keyframes pulsate { - 0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;} - 50% {opacity: 1.0;} - 100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;} -} -@-moz-keyframes pulsate { - 0% {transform: scale(0.1, 0.1); opacity: 0.0;} - 50% {opacity: 1.0;} - 100% {transform: scale(1.2, 1.2); opacity: 0.0;} -} \ No newline at end of file diff --git a/www/css/pure.min.css b/www/css/pure.min.css deleted file mode 100644 index 9730346..0000000 --- a/www/css/pure.min.css +++ /dev/null @@ -1,23 +0,0 @@ -/*! -Pure v0.6.0 -Copyright 2014 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -https://github.com/yahoo/pure/blob/master/LICENSE.md -*/ -/*! -normalize.css v^3.0 | MIT License | git.io/normalize -Copyright (c) Nicolas Gallagher and Jonathan Neal -*/ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}/*! -Pure v0.6.0 -Copyright 2014 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -https://github.com/yahoo/pure/blob/master/LICENSE.md -*/ -.pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}/*! -Pure v0.6.0 -Copyright 2014 Yahoo! Inc. All rights reserved. -Licensed under the BSD License. -https://github.com/yahoo/pure/blob/master/LICENSE.md -*/ -@media screen and (min-width:35.5em){.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-1-2,.pure-u-sm-1-3,.pure-u-sm-2-3,.pure-u-sm-1-4,.pure-u-sm-3-4,.pure-u-sm-1-5,.pure-u-sm-2-5,.pure-u-sm-3-5,.pure-u-sm-4-5,.pure-u-sm-5-5,.pure-u-sm-1-6,.pure-u-sm-5-6,.pure-u-sm-1-8,.pure-u-sm-3-8,.pure-u-sm-5-8,.pure-u-sm-7-8,.pure-u-sm-1-12,.pure-u-sm-5-12,.pure-u-sm-7-12,.pure-u-sm-11-12,.pure-u-sm-1-24,.pure-u-sm-2-24,.pure-u-sm-3-24,.pure-u-sm-4-24,.pure-u-sm-5-24,.pure-u-sm-6-24,.pure-u-sm-7-24,.pure-u-sm-8-24,.pure-u-sm-9-24,.pure-u-sm-10-24,.pure-u-sm-11-24,.pure-u-sm-12-24,.pure-u-sm-13-24,.pure-u-sm-14-24,.pure-u-sm-15-24,.pure-u-sm-16-24,.pure-u-sm-17-24,.pure-u-sm-18-24,.pure-u-sm-19-24,.pure-u-sm-20-24,.pure-u-sm-21-24,.pure-u-sm-22-24,.pure-u-sm-23-24,.pure-u-sm-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-sm-1-24{width:4.1667%;*width:4.1357%}.pure-u-sm-1-12,.pure-u-sm-2-24{width:8.3333%;*width:8.3023%}.pure-u-sm-1-8,.pure-u-sm-3-24{width:12.5%;*width:12.469%}.pure-u-sm-1-6,.pure-u-sm-4-24{width:16.6667%;*width:16.6357%}.pure-u-sm-1-5{width:20%;*width:19.969%}.pure-u-sm-5-24{width:20.8333%;*width:20.8023%}.pure-u-sm-1-4,.pure-u-sm-6-24{width:25%;*width:24.969%}.pure-u-sm-7-24{width:29.1667%;*width:29.1357%}.pure-u-sm-1-3,.pure-u-sm-8-24{width:33.3333%;*width:33.3023%}.pure-u-sm-3-8,.pure-u-sm-9-24{width:37.5%;*width:37.469%}.pure-u-sm-2-5{width:40%;*width:39.969%}.pure-u-sm-5-12,.pure-u-sm-10-24{width:41.6667%;*width:41.6357%}.pure-u-sm-11-24{width:45.8333%;*width:45.8023%}.pure-u-sm-1-2,.pure-u-sm-12-24{width:50%;*width:49.969%}.pure-u-sm-13-24{width:54.1667%;*width:54.1357%}.pure-u-sm-7-12,.pure-u-sm-14-24{width:58.3333%;*width:58.3023%}.pure-u-sm-3-5{width:60%;*width:59.969%}.pure-u-sm-5-8,.pure-u-sm-15-24{width:62.5%;*width:62.469%}.pure-u-sm-2-3,.pure-u-sm-16-24{width:66.6667%;*width:66.6357%}.pure-u-sm-17-24{width:70.8333%;*width:70.8023%}.pure-u-sm-3-4,.pure-u-sm-18-24{width:75%;*width:74.969%}.pure-u-sm-19-24{width:79.1667%;*width:79.1357%}.pure-u-sm-4-5{width:80%;*width:79.969%}.pure-u-sm-5-6,.pure-u-sm-20-24{width:83.3333%;*width:83.3023%}.pure-u-sm-7-8,.pure-u-sm-21-24{width:87.5%;*width:87.469%}.pure-u-sm-11-12,.pure-u-sm-22-24{width:91.6667%;*width:91.6357%}.pure-u-sm-23-24{width:95.8333%;*width:95.8023%}.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-5-5,.pure-u-sm-24-24{width:100%}}@media screen and (min-width:48em){.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-1-2,.pure-u-md-1-3,.pure-u-md-2-3,.pure-u-md-1-4,.pure-u-md-3-4,.pure-u-md-1-5,.pure-u-md-2-5,.pure-u-md-3-5,.pure-u-md-4-5,.pure-u-md-5-5,.pure-u-md-1-6,.pure-u-md-5-6,.pure-u-md-1-8,.pure-u-md-3-8,.pure-u-md-5-8,.pure-u-md-7-8,.pure-u-md-1-12,.pure-u-md-5-12,.pure-u-md-7-12,.pure-u-md-11-12,.pure-u-md-1-24,.pure-u-md-2-24,.pure-u-md-3-24,.pure-u-md-4-24,.pure-u-md-5-24,.pure-u-md-6-24,.pure-u-md-7-24,.pure-u-md-8-24,.pure-u-md-9-24,.pure-u-md-10-24,.pure-u-md-11-24,.pure-u-md-12-24,.pure-u-md-13-24,.pure-u-md-14-24,.pure-u-md-15-24,.pure-u-md-16-24,.pure-u-md-17-24,.pure-u-md-18-24,.pure-u-md-19-24,.pure-u-md-20-24,.pure-u-md-21-24,.pure-u-md-22-24,.pure-u-md-23-24,.pure-u-md-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-md-1-24{width:4.1667%;*width:4.1357%}.pure-u-md-1-12,.pure-u-md-2-24{width:8.3333%;*width:8.3023%}.pure-u-md-1-8,.pure-u-md-3-24{width:12.5%;*width:12.469%}.pure-u-md-1-6,.pure-u-md-4-24{width:16.6667%;*width:16.6357%}.pure-u-md-1-5{width:20%;*width:19.969%}.pure-u-md-5-24{width:20.8333%;*width:20.8023%}.pure-u-md-1-4,.pure-u-md-6-24{width:25%;*width:24.969%}.pure-u-md-7-24{width:29.1667%;*width:29.1357%}.pure-u-md-1-3,.pure-u-md-8-24{width:33.3333%;*width:33.3023%}.pure-u-md-3-8,.pure-u-md-9-24{width:37.5%;*width:37.469%}.pure-u-md-2-5{width:40%;*width:39.969%}.pure-u-md-5-12,.pure-u-md-10-24{width:41.6667%;*width:41.6357%}.pure-u-md-11-24{width:45.8333%;*width:45.8023%}.pure-u-md-1-2,.pure-u-md-12-24{width:50%;*width:49.969%}.pure-u-md-13-24{width:54.1667%;*width:54.1357%}.pure-u-md-7-12,.pure-u-md-14-24{width:58.3333%;*width:58.3023%}.pure-u-md-3-5{width:60%;*width:59.969%}.pure-u-md-5-8,.pure-u-md-15-24{width:62.5%;*width:62.469%}.pure-u-md-2-3,.pure-u-md-16-24{width:66.6667%;*width:66.6357%}.pure-u-md-17-24{width:70.8333%;*width:70.8023%}.pure-u-md-3-4,.pure-u-md-18-24{width:75%;*width:74.969%}.pure-u-md-19-24{width:79.1667%;*width:79.1357%}.pure-u-md-4-5{width:80%;*width:79.969%}.pure-u-md-5-6,.pure-u-md-20-24{width:83.3333%;*width:83.3023%}.pure-u-md-7-8,.pure-u-md-21-24{width:87.5%;*width:87.469%}.pure-u-md-11-12,.pure-u-md-22-24{width:91.6667%;*width:91.6357%}.pure-u-md-23-24{width:95.8333%;*width:95.8023%}.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-5-5,.pure-u-md-24-24{width:100%}}@media screen and (min-width:64em){.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-1-2,.pure-u-lg-1-3,.pure-u-lg-2-3,.pure-u-lg-1-4,.pure-u-lg-3-4,.pure-u-lg-1-5,.pure-u-lg-2-5,.pure-u-lg-3-5,.pure-u-lg-4-5,.pure-u-lg-5-5,.pure-u-lg-1-6,.pure-u-lg-5-6,.pure-u-lg-1-8,.pure-u-lg-3-8,.pure-u-lg-5-8,.pure-u-lg-7-8,.pure-u-lg-1-12,.pure-u-lg-5-12,.pure-u-lg-7-12,.pure-u-lg-11-12,.pure-u-lg-1-24,.pure-u-lg-2-24,.pure-u-lg-3-24,.pure-u-lg-4-24,.pure-u-lg-5-24,.pure-u-lg-6-24,.pure-u-lg-7-24,.pure-u-lg-8-24,.pure-u-lg-9-24,.pure-u-lg-10-24,.pure-u-lg-11-24,.pure-u-lg-12-24,.pure-u-lg-13-24,.pure-u-lg-14-24,.pure-u-lg-15-24,.pure-u-lg-16-24,.pure-u-lg-17-24,.pure-u-lg-18-24,.pure-u-lg-19-24,.pure-u-lg-20-24,.pure-u-lg-21-24,.pure-u-lg-22-24,.pure-u-lg-23-24,.pure-u-lg-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-lg-1-24{width:4.1667%;*width:4.1357%}.pure-u-lg-1-12,.pure-u-lg-2-24{width:8.3333%;*width:8.3023%}.pure-u-lg-1-8,.pure-u-lg-3-24{width:12.5%;*width:12.469%}.pure-u-lg-1-6,.pure-u-lg-4-24{width:16.6667%;*width:16.6357%}.pure-u-lg-1-5{width:20%;*width:19.969%}.pure-u-lg-5-24{width:20.8333%;*width:20.8023%}.pure-u-lg-1-4,.pure-u-lg-6-24{width:25%;*width:24.969%}.pure-u-lg-7-24{width:29.1667%;*width:29.1357%}.pure-u-lg-1-3,.pure-u-lg-8-24{width:33.3333%;*width:33.3023%}.pure-u-lg-3-8,.pure-u-lg-9-24{width:37.5%;*width:37.469%}.pure-u-lg-2-5{width:40%;*width:39.969%}.pure-u-lg-5-12,.pure-u-lg-10-24{width:41.6667%;*width:41.6357%}.pure-u-lg-11-24{width:45.8333%;*width:45.8023%}.pure-u-lg-1-2,.pure-u-lg-12-24{width:50%;*width:49.969%}.pure-u-lg-13-24{width:54.1667%;*width:54.1357%}.pure-u-lg-7-12,.pure-u-lg-14-24{width:58.3333%;*width:58.3023%}.pure-u-lg-3-5{width:60%;*width:59.969%}.pure-u-lg-5-8,.pure-u-lg-15-24{width:62.5%;*width:62.469%}.pure-u-lg-2-3,.pure-u-lg-16-24{width:66.6667%;*width:66.6357%}.pure-u-lg-17-24{width:70.8333%;*width:70.8023%}.pure-u-lg-3-4,.pure-u-lg-18-24{width:75%;*width:74.969%}.pure-u-lg-19-24{width:79.1667%;*width:79.1357%}.pure-u-lg-4-5{width:80%;*width:79.969%}.pure-u-lg-5-6,.pure-u-lg-20-24{width:83.3333%;*width:83.3023%}.pure-u-lg-7-8,.pure-u-lg-21-24{width:87.5%;*width:87.469%}.pure-u-lg-11-12,.pure-u-lg-22-24{width:91.6667%;*width:91.6357%}.pure-u-lg-23-24{width:95.8333%;*width:95.8023%}.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-5-5,.pure-u-lg-24-24{width:100%}}@media screen and (min-width:80em){.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-1-2,.pure-u-xl-1-3,.pure-u-xl-2-3,.pure-u-xl-1-4,.pure-u-xl-3-4,.pure-u-xl-1-5,.pure-u-xl-2-5,.pure-u-xl-3-5,.pure-u-xl-4-5,.pure-u-xl-5-5,.pure-u-xl-1-6,.pure-u-xl-5-6,.pure-u-xl-1-8,.pure-u-xl-3-8,.pure-u-xl-5-8,.pure-u-xl-7-8,.pure-u-xl-1-12,.pure-u-xl-5-12,.pure-u-xl-7-12,.pure-u-xl-11-12,.pure-u-xl-1-24,.pure-u-xl-2-24,.pure-u-xl-3-24,.pure-u-xl-4-24,.pure-u-xl-5-24,.pure-u-xl-6-24,.pure-u-xl-7-24,.pure-u-xl-8-24,.pure-u-xl-9-24,.pure-u-xl-10-24,.pure-u-xl-11-24,.pure-u-xl-12-24,.pure-u-xl-13-24,.pure-u-xl-14-24,.pure-u-xl-15-24,.pure-u-xl-16-24,.pure-u-xl-17-24,.pure-u-xl-18-24,.pure-u-xl-19-24,.pure-u-xl-20-24,.pure-u-xl-21-24,.pure-u-xl-22-24,.pure-u-xl-23-24,.pure-u-xl-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-xl-1-24{width:4.1667%;*width:4.1357%}.pure-u-xl-1-12,.pure-u-xl-2-24{width:8.3333%;*width:8.3023%}.pure-u-xl-1-8,.pure-u-xl-3-24{width:12.5%;*width:12.469%}.pure-u-xl-1-6,.pure-u-xl-4-24{width:16.6667%;*width:16.6357%}.pure-u-xl-1-5{width:20%;*width:19.969%}.pure-u-xl-5-24{width:20.8333%;*width:20.8023%}.pure-u-xl-1-4,.pure-u-xl-6-24{width:25%;*width:24.969%}.pure-u-xl-7-24{width:29.1667%;*width:29.1357%}.pure-u-xl-1-3,.pure-u-xl-8-24{width:33.3333%;*width:33.3023%}.pure-u-xl-3-8,.pure-u-xl-9-24{width:37.5%;*width:37.469%}.pure-u-xl-2-5{width:40%;*width:39.969%}.pure-u-xl-5-12,.pure-u-xl-10-24{width:41.6667%;*width:41.6357%}.pure-u-xl-11-24{width:45.8333%;*width:45.8023%}.pure-u-xl-1-2,.pure-u-xl-12-24{width:50%;*width:49.969%}.pure-u-xl-13-24{width:54.1667%;*width:54.1357%}.pure-u-xl-7-12,.pure-u-xl-14-24{width:58.3333%;*width:58.3023%}.pure-u-xl-3-5{width:60%;*width:59.969%}.pure-u-xl-5-8,.pure-u-xl-15-24{width:62.5%;*width:62.469%}.pure-u-xl-2-3,.pure-u-xl-16-24{width:66.6667%;*width:66.6357%}.pure-u-xl-17-24{width:70.8333%;*width:70.8023%}.pure-u-xl-3-4,.pure-u-xl-18-24{width:75%;*width:74.969%}.pure-u-xl-19-24{width:79.1667%;*width:79.1357%}.pure-u-xl-4-5{width:80%;*width:79.969%}.pure-u-xl-5-6,.pure-u-xl-20-24{width:83.3333%;*width:83.3023%}.pure-u-xl-7-8,.pure-u-xl-21-24{width:87.5%;*width:87.469%}.pure-u-xl-11-12,.pure-u-xl-22-24{width:91.6667%;*width:91.6357%}.pure-u-xl-23-24{width:95.8333%;*width:95.8023%}.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-5-5,.pure-u-xl-24-24{width:100%}} \ No newline at end of file diff --git a/www/css/vex.css b/www/css/vex.css deleted file mode 100644 index afee49d..0000000 --- a/www/css/vex.css +++ /dev/null @@ -1,208 +0,0 @@ -@keyframes vex-fadein { - 0% { - opacity: 0; } - 100% { - opacity: 1; } } - -@-webkit-keyframes vex-fadein { - 0% { - opacity: 0; } - 100% { - opacity: 1; } } - -@-moz-keyframes vex-fadein { - 0% { - opacity: 0; } - 100% { - opacity: 1; } } - -@-ms-keyframes vex-fadein { - 0% { - opacity: 0; } - 100% { - opacity: 1; } } - -@-o-keyframes vex-fadein { - 0% { - opacity: 0; } - 100% { - opacity: 1; } } - -@keyframes vex-fadeout { - 0% { - opacity: 1; } - 100% { - opacity: 0; } } - -@-webkit-keyframes vex-fadeout { - 0% { - opacity: 1; } - 100% { - opacity: 0; } } - -@-moz-keyframes vex-fadeout { - 0% { - opacity: 1; } - 100% { - opacity: 0; } } - -@-ms-keyframes vex-fadeout { - 0% { - opacity: 1; } - 100% { - opacity: 0; } } - -@-o-keyframes vex-fadeout { - 0% { - opacity: 1; } - 100% { - opacity: 0; } } - -@keyframes vex-rotation { - 0% { - transform: rotate(0deg); - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); } - 100% { - transform: rotate(359deg); - -webkit-transform: rotate(359deg); - -moz-transform: rotate(359deg); - -ms-transform: rotate(359deg); - -o-transform: rotate(359deg); } } - -@-webkit-keyframes vex-rotation { - 0% { - transform: rotate(0deg); - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); } - 100% { - transform: rotate(359deg); - -webkit-transform: rotate(359deg); - -moz-transform: rotate(359deg); - -ms-transform: rotate(359deg); - -o-transform: rotate(359deg); } } - -@-moz-keyframes vex-rotation { - 0% { - transform: rotate(0deg); - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); } - 100% { - transform: rotate(359deg); - -webkit-transform: rotate(359deg); - -moz-transform: rotate(359deg); - -ms-transform: rotate(359deg); - -o-transform: rotate(359deg); } } - -@-ms-keyframes vex-rotation { - 0% { - transform: rotate(0deg); - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); } - 100% { - transform: rotate(359deg); - -webkit-transform: rotate(359deg); - -moz-transform: rotate(359deg); - -ms-transform: rotate(359deg); - -o-transform: rotate(359deg); } } - -@-o-keyframes vex-rotation { - 0% { - transform: rotate(0deg); - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -ms-transform: rotate(0deg); - -o-transform: rotate(0deg); } - 100% { - transform: rotate(359deg); - -webkit-transform: rotate(359deg); - -moz-transform: rotate(359deg); - -ms-transform: rotate(359deg); - -o-transform: rotate(359deg); } } - -.vex, .vex *, .vex *:before, .vex *:after { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; } - -.vex { - position: fixed; - overflow: auto; - -webkit-overflow-scrolling: touch; - z-index: 1111; - top: 0; - right: 0; - bottom: 0; - left: 0; } - -.vex-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; } - -.vex-overlay { - background: #000; - filter: alpha(opacity=40); - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; } - -.vex-overlay { - animation: vex-fadein 0.5s; - -webkit-animation: vex-fadein 0.5s; - -moz-animation: vex-fadein 0.5s; - -ms-animation: vex-fadein 0.5s; - -o-animation: vex-fadein 0.5s; - -webkit-backface-visibility: hidden; - position: fixed; - background: rgba(0, 0, 0, 0.4); - top: 0; - right: 0; - bottom: 0; - left: 0; } - -.vex-close:before { - font-family: Arial, sans-serif; - content: "\00D7"; } - -.vex-dialog-form { - margin: 0; } - -.vex-dialog-button { - text-rendering: optimizeLegibility; - -moz-appearance: none; - -webkit-appearance: none; - cursor: pointer; - -webkit-tap-highlight-color: transparent; } - -.vex-loading-spinner { - animation: vex-rotation 0.7s linear infinite; - -webkit-animation: vex-rotation 0.7s linear infinite; - -moz-animation: vex-rotation 0.7s linear infinite; - -ms-animation: vex-rotation 0.7s linear infinite; - -o-animation: vex-rotation 0.7s linear infinite; - -webkit-backface-visibility: hidden; - -moz-box-shadow: 0 0 1em rgba(0, 0, 0, 0.1); - -webkit-box-shadow: 0 0 1em rgba(0, 0, 0, 0.1); - box-shadow: 0 0 1em rgba(0, 0, 0, 0.1); - position: fixed; - z-index: 1112; - margin: auto; - top: 0; - right: 0; - bottom: 0; - left: 0; - height: 2em; - width: 2em; - background: #fff; } - -body.vex-open { - overflow: hidden; } diff --git a/www/img/gym_NEUTRAL.png b/www/img/gym_NEUTRAL.png deleted file mode 100644 index 0f9f1a6..0000000 Binary files a/www/img/gym_NEUTRAL.png and /dev/null differ diff --git a/www/img/gym_blue.png b/www/img/gym_blue.png deleted file mode 100644 index 66c2b61..0000000 Binary files a/www/img/gym_blue.png and /dev/null differ diff --git a/www/img/gym_red.png b/www/img/gym_red.png deleted file mode 100644 index ee25f97..0000000 Binary files a/www/img/gym_red.png and /dev/null differ diff --git a/www/img/gym_yellow.png b/www/img/gym_yellow.png deleted file mode 100644 index c8137fe..0000000 Binary files a/www/img/gym_yellow.png and /dev/null differ diff --git a/www/img/license.txt b/www/img/license.txt deleted file mode 100644 index 0fbb1d3..0000000 --- a/www/img/license.txt +++ /dev/null @@ -1 +0,0 @@ -https://shareicon.net/license/cc-3-0-by \ No newline at end of file diff --git a/www/img/pokestop_blue.png b/www/img/pokestop_blue.png deleted file mode 100644 index aba9866..0000000 Binary files a/www/img/pokestop_blue.png and /dev/null differ diff --git a/www/img/pokestop_lure.png b/www/img/pokestop_lure.png deleted file mode 100644 index 336c418..0000000 Binary files a/www/img/pokestop_lure.png and /dev/null differ diff --git a/www/img/pokestop_puple.png b/www/img/pokestop_puple.png deleted file mode 100644 index 4d00049..0000000 Binary files a/www/img/pokestop_puple.png and /dev/null differ diff --git a/www/img/spawn_point.png b/www/img/spawn_point.png deleted file mode 100644 index 18552b5..0000000 Binary files a/www/img/spawn_point.png and /dev/null differ diff --git a/www/index.html b/www/index.html deleted file mode 100644 index d043257..0000000 --- a/www/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - POGOserver api - - - - - - - - - - - - - -
-

POGOserver

-

 

-

-
- -
-

Login

-

-

-

-
- - - -
-
-
- - - - - - \ No newline at end of file diff --git a/www/index.js b/www/index.js deleted file mode 100644 index 59a3a8e..0000000 --- a/www/index.js +++ /dev/null @@ -1,36 +0,0 @@ -import http from "http"; -import url from "url"; -import path from "path"; -import fs from "fs"; -const port = process.argv[2] || 9000; - -http.createServer((request, response) => { - const uri = url.parse(request.url).pathname; - let filename = path.join(process.cwd(), uri); - - fs.exists(filename, exists => { - if(!exists) { - response.writeHead(404, {"Content-Type": "text/plain"}); - response.write("404 Not Found\n"); - response.end(); - return; - } - - if (fs.statSync(filename).isDirectory()) filename += '/api/index.html'; - - fs.readFile(filename, "binary", (err, file) => { - if(err) { - response.writeHead(500, {"Content-Type": "text/plain"}); - response.write(`${err}\n`); - response.end(); - return; - } - - response.writeHead(200); - response.write(file, "binary"); - response.end(); - }); - }); -}).listen(parseInt(port, 10)); - -console.log(`Web-API for POGOserver running at => http://localhost:${port}/\nCTRL + C to shutdown`); \ No newline at end of file diff --git a/www/js/ajax.js b/www/js/ajax.js deleted file mode 100644 index a9fcba0..0000000 --- a/www/js/ajax.js +++ /dev/null @@ -1,22 +0,0 @@ -function send(data, resolve) { - const xhr = new XMLHttpRequest(); - const protocol = window.location.protocol; - xhr.open("POST", `${protocol}//${CFG.API.HOST}:${CFG.API.PORT}${CFG.API.ROUTE}`, true); - xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); - xhr.onreadystatechange = () => { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - if (typeof resolve === "function") { - try { - resolve(JSON.parse(xhr.responseText)); - } catch (e) { - resolve(void 0); - } - } - } else { - resolve(xhr.statusText); - } - } - }; - xhr.send(JSON.stringify(data)); -} \ No newline at end of file diff --git a/www/js/gmaps.js b/www/js/gmaps.js deleted file mode 100644 index df8940c..0000000 --- a/www/js/gmaps.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(["jquery","googlemaps!"],b):a.GMaps=b()}(this,function(){var a=function(a,b){var c;if(a===b)return a;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a},b=function(a,b){var c,d=Array.prototype.slice.call(arguments,2),e=[],f=a.length;if(Array.prototype.map&&a.map===Array.prototype.map)e=Array.prototype.map.call(a,function(a){var c=d.slice(0);return c.splice(0,0,a),b.apply(this,c)});else for(c=0;f>c;c++)callback_params=d,callback_params.splice(0,0,a[c]),e.push(b.apply(this,callback_params));return e},c=function(a){var b,c=[];for(b=0;b0&&"object"==typeof a[c][0]?a[c]=f(a[c],b):a[c]=d(a[c],b));return a},g=function(a,b){var c,d=a.replace(".","");return c="jQuery"in this&&b?$("."+d,b)[0]:document.getElementsByClassName(d)[0]},h=function(a,b){var c,a=a.replace("#","");return c="jQuery"in window&&b?$("#"+a,b)[0]:document.getElementById(a)},i=function(a){var b=0,c=0;if(a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return[b,c]},j=function(b){var c=document,d=function(b){if("object"!=typeof window.google||!window.google.maps)return"object"==typeof window.console&&window.console.error&&console.error("Google Maps API is required. Please register the following JavaScript library https://maps.googleapis.com/maps/api/js."),function(){};if(!this)return new d(b);b.zoom=b.zoom||15,b.mapType=b.mapType||"roadmap";var e,f=function(a,b){return void 0===a?b:a},j=this,k=["bounds_changed","center_changed","click","dblclick","drag","dragend","dragstart","idle","maptypeid_changed","projection_changed","resize","tilesloaded","zoom_changed"],l=["mousemove","mouseout","mouseover"],m=["el","lat","lng","mapType","width","height","markerClusterer","enableNewStyle"],n=b.el||b.div,o=b.markerClusterer,p=google.maps.MapTypeId[b.mapType.toUpperCase()],q=new google.maps.LatLng(b.lat,b.lng),r=f(b.zoomControl,!0),s=b.zoomControlOpt||{style:"DEFAULT",position:"TOP_LEFT"},t=s.style||"DEFAULT",u=s.position||"TOP_LEFT",v=f(b.panControl,!0),w=f(b.mapTypeControl,!0),x=f(b.scaleControl,!0),y=f(b.streetViewControl,!0),z=f(z,!0),A={},B={zoom:this.zoom,center:q,mapTypeId:p},C={panControl:v,zoomControl:r,zoomControlOptions:{style:google.maps.ZoomControlStyle[t],position:google.maps.ControlPosition[u]},mapTypeControl:w,scaleControl:x,streetViewControl:y,overviewMapControl:z};if("string"==typeof b.el||"string"==typeof b.div?n.indexOf("#")>-1?this.el=h(n,b.context):this.el=g.apply(this,[n,b.context]):this.el=n,"undefined"==typeof this.el||null===this.el)throw"No element defined.";for(window.context_menu=window.context_menu||{},window.context_menu[j.el.id]={},this.controls=[],this.overlays=[],this.layers=[],this.singleLayers={},this.markers=[],this.polylines=[],this.routes=[],this.polygons=[],this.infoWindow=null,this.overlay_el=null,this.zoom=b.zoom,this.registered_events={},this.el.style.width=b.width||this.el.scrollWidth||this.el.offsetWidth,this.el.style.height=b.height||this.el.scrollHeight||this.el.offsetHeight,google.maps.visualRefresh=b.enableNewStyle,e=0;e'+f.title+""}if(h("gmaps_context_menu")){var g=h("gmaps_context_menu");g.innerHTML=c;var e,k=g.getElementsByTagName("a"),l=k.length;for(e=0;l>e;e++){var m=k[e],n=function(c){c.preventDefault(),d[this.id.replace(a+"_","")].action.apply(j,[b]),j.hideContextMenu()};google.maps.event.clearListeners(m,"click"),google.maps.event.addDomListenerOnce(m,"click",n,!1)}var o=i.apply(this,[j.el]),p=o[0]+b.pixel.x-15,q=o[1]+b.pixel.y-15;g.style.left=p+"px",g.style.top=q+"px"}};this.buildContextMenu=function(a,b){if("marker"===a){b.pixel={};var c=new google.maps.OverlayView;c.setMap(j.map),c.draw=function(){var d=c.getProjection(),e=b.marker.getPosition();b.pixel=d.fromLatLngToContainerPixel(e),D(a,b)}}else D(a,b);var d=h("gmaps_context_menu");setTimeout(function(){d.style.display="block"},0)},this.setContextMenu=function(a){window.context_menu[j.el.id][a.control]={};var b,d=c.createElement("ul");for(b in a.options)if(a.options.hasOwnProperty(b)){var e=a.options[b];window.context_menu[j.el.id][a.control][e.name]={title:e.title,action:e.action}}d.id="gmaps_context_menu",d.style.display="none",d.style.position="absolute",d.style.minWidth="100px",d.style.background="white",d.style.listStyle="none",d.style.padding="8px",d.style.boxShadow="2px 2px 6px #ccc",h("gmaps_context_menu")||c.body.appendChild(d);var f=h("gmaps_context_menu");google.maps.event.addDomListener(f,"mouseout",function(a){a.relatedTarget&&this.contains(a.relatedTarget)||window.setTimeout(function(){f.style.display="none"},400)},!1)},this.hideContextMenu=function(){var a=h("gmaps_context_menu");a&&(a.style.display="none")};var E=function(a,c){google.maps.event.addListener(a,c,function(a){void 0==a&&(a=this),b[c].apply(this,[a]),j.hideContextMenu()})};google.maps.event.addListener(this.map,"zoom_changed",this.hideContextMenu);for(var F=0;Fa;a++)"boolean"==typeof this.markers[a].visible&&this.markers[a].visible&&b.push(this.markers[a].getPosition());this.fitLatLngBounds(b)},this.fitLatLngBounds=function(a){var b,c=a.length,d=new google.maps.LatLngBounds;for(b=0;c>b;b++)d.extend(a[b]);this.map.fitBounds(d)},this.setCenter=function(a,b,c){this.map.panTo(new google.maps.LatLng(a,b)),c&&c()},this.getElement=function(){return this.el},this.zoomIn=function(a){a=a||1,this.zoom=this.map.getZoom()+a,this.map.setZoom(this.zoom)},this.zoomOut=function(a){a=a||1,this.zoom=this.map.getZoom()-a,this.map.setZoom(this.zoom)};var H,I=[];for(H in this.map)"function"!=typeof this.map[H]||this[H]||I.push(H);for(e=0;e-1){var d=this.markers[e];d.setMap(null),this.markerClusterer&&this.markerClusterer.removeMarker(d),j.fire("marker_removed",d,this)}}for(var c=0;c0&&d.paths[0].length>0&&(d.paths=c(b(d.paths,f,e)));for(var g=new google.maps.Polygon(d),h=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],i=0;i0&&d.locations[0].length>0&&(d.locations=c(b([d.locations],f,!1)));var e=d.callback;delete d.callback;var g=new google.maps.ElevationService;if(d.path){var h={path:d.locations,samples:d.samples};g.getElevationAlongPath(h,function(a,b){e&&"function"==typeof e&&e(a,b)})}else delete d.path,delete d.samples,g.getElevationForLocations(d,function(a,b){e&&"function"==typeof e&&e(a,b)})},j.prototype.cleanRoute=j.prototype.removePolylines,j.prototype.renderRoute=function(b,c){var d,e="string"==typeof c.panel?document.getElementById(c.panel.replace("#","")):c.panel;c.panel=e,c=a({map:this.map},c),d=new google.maps.DirectionsRenderer(c),this.getRoutes({origin:b.origin,destination:b.destination,travelMode:b.travelMode,waypoints:b.waypoints,unitSystem:b.unitSystem,error:b.error,avoidHighways:b.avoidHighways,avoidTolls:b.avoidTolls,optimizeWaypoints:b.optimizeWaypoints,callback:function(a,b,c){c===google.maps.DirectionsStatus.OK&&d.setDirections(b)}})},j.prototype.drawRoute=function(a){var b=this;this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,unitSystem:a.unitSystem,error:a.error,avoidHighways:a.avoidHighways,avoidTolls:a.avoidTolls,optimizeWaypoints:a.optimizeWaypoints,callback:function(c){if(c.length>0){var d={path:c[c.length-1].overview_path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty("icons")&&(d.icons=a.icons),b.drawPolyline(d),a.callback&&a.callback(c[c.length-1])}}})},j.prototype.travelRoute=function(a){if(a.origin&&a.destination)this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,unitSystem:a.unitSystem,error:a.error,callback:function(b){if(b.length>0&&a.start&&a.start(b[b.length-1]),b.length>0&&a.step){var c=b[b.length-1];if(c.legs.length>0)for(var d,e=c.legs[0].steps,f=0;d=e[f];f++)d.step_number=f,a.step(d,c.legs[0].steps.length-1)}b.length>0&&a.end&&a.end(b[b.length-1])}});else if(a.route&&a.route.legs.length>0)for(var b,c=a.route.legs[0].steps,d=0;b=c[d];d++)b.step_number=d,a.step(b)},j.prototype.drawSteppedRoute=function(a){var b=this;if(a.origin&&a.destination)this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,error:a.error,callback:function(c){if(c.length>0&&a.start&&a.start(c[c.length-1]),c.length>0&&a.step){var d=c[c.length-1];if(d.legs.length>0)for(var e,f=d.legs[0].steps,g=0;e=f[g];g++){e.step_number=g;var h={path:e.path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty("icons")&&(h.icons=a.icons),b.drawPolyline(h),a.step(e,d.legs[0].steps.length-1)}}c.length>0&&a.end&&a.end(c[c.length-1])}});else if(a.route&&a.route.legs.length>0)for(var c,d=a.route.legs[0].steps,e=0;c=d[e];e++){c.step_number=e;var f={path:c.path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty("icons")&&(f.icons=a.icons),b.drawPolyline(f),a.step(c)}},j.Route=function(a){this.origin=a.origin,this.destination=a.destination,this.waypoints=a.waypoints,this.map=a.map,this.route=a.route,this.step_count=0,this.steps=this.route.legs[0].steps,this.steps_length=this.steps.length;var b={path:new google.maps.MVCArray,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty("icons")&&(b.icons=a.icons),this.polyline=this.map.drawPolyline(b).getPath()},j.Route.prototype.getRoute=function(a){var b=this;this.map.getRoutes({origin:this.origin,destination:this.destination,travelMode:a.travelMode,waypoints:this.waypoints||[],error:a.error,callback:function(){b.route=e[0],a.callback&&a.callback.call(b)}})},j.Route.prototype.back=function(){if(this.step_count>0){this.step_count--;var a=this.route.legs[0].steps[this.step_count].path;for(var b in a)a.hasOwnProperty(b)&&this.polyline.pop()}},j.Route.prototype.forward=function(){if(this.step_count0){b.markers=[];for(var c=0;c0){var d=this.polylines[0];b.polyline={},b.polyline.path=google.maps.geometry.encoding.encodePath(d.getPath()),b.polyline.strokeColor=d.strokeColor,b.polyline.strokeOpacity=d.strokeOpacity,b.polyline.strokeWeight=d.strokeWeight}return j.staticMapURL(b)},j.staticMapURL=function(a){function b(a,b){if("#"===a[0]&&(a=a.replace("#","0x"),b)){if(b=parseFloat(b),b=Math.min(1,Math.max(b,0)),0===b)return"0x00000000";b=(255*b).toString(16),1===b.length&&(b+=b),a=a.slice(0,8)+b}return a}var c,d=[],e=("file:"===location.protocol?"http:":location.protocol)+"//maps.googleapis.com/maps/api/staticmap";a.url&&(e=a.url,delete a.url),e+="?";var f=a.markers;delete a.markers,!f&&a.marker&&(f=[a.marker],delete a.marker);var g=a.styles;delete a.styles;var h=a.polyline;if(delete a.polyline,a.center)d.push("center="+a.center),delete a.center;else if(a.address)d.push("center="+a.address),delete a.address;else if(a.lat)d.push(["center=",a.lat,",",a.lng].join("")),delete a.lat,delete a.lng;else if(a.visible){var i=encodeURI(a.visible.join("|"));d.push("visible="+i)}var j=a.size;j?(j.join&&(j=j.join("x")),delete a.size):j="630x300",d.push("size="+j),a.zoom||a.zoom===!1||(a.zoom=15);var k=a.hasOwnProperty("sensor")?!!a.sensor:!0;delete a.sensor,d.push("sensor="+k);for(var l in a)a.hasOwnProperty(l)&&d.push(l+"="+a[l]);if(f)for(var m,n,o=0;c=f[o];o++){m=[],c.size&&"normal"!==c.size?(m.push("size:"+c.size),delete c.size):c.icon&&(m.push("icon:"+encodeURI(c.icon)),delete c.icon),c.color&&(m.push("color:"+c.color.replace("#","0x")),delete c.color),c.label&&(m.push("label:"+c.label[0].toUpperCase()),delete c.label),n=c.address?c.address:c.lat+","+c.lng,delete c.address,delete c.lat,delete c.lng;for(var l in c)c.hasOwnProperty(l)&&m.push(l+":"+c[l]);m.length||0===o?(m.push(n),m=m.join("|"),d.push("markers="+encodeURI(m))):(m=d.pop()+encodeURI("|"+n),d.push(m))}if(g)for(var o=0;oe;e++)for(var f=this.getPaths().getAt(e),g=f.getLength(),h=g-1,i=0;g>i;i++){var j=f.getAt(i),k=f.getAt(h);(j.lng()=a.lng()||k.lng()=a.lng())&&j.lat()+(a.lng()-j.lng())/(k.lng()-j.lng())*(k.lat()-j.lat())>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),j}); -//# sourceMappingURL=gmaps.min.js.map \ No newline at end of file diff --git a/www/js/init.js b/www/js/init.js deleted file mode 100644 index 92abc8b..0000000 --- a/www/js/init.js +++ /dev/null @@ -1,17 +0,0 @@ -((() => { - - function loadScriptDefered(src) { - let js = null; - js = document.createElement("script"); - js.type = "text/javascript"; - js.src = src; - js.async = false; - document.body.appendChild(js); - }; - - loadScriptDefered(`http://maps.google.com/maps/api/js?key=${CFG.GMAPS.API_KEY}`); - loadScriptDefered("/api/js/gmaps.js"); - loadScriptDefered("/api/js/ajax.js"); - loadScriptDefered("/api/js/main.js"); - -}))(); \ No newline at end of file diff --git a/www/js/main.js b/www/js/main.js deleted file mode 100644 index 86b4f67..0000000 --- a/www/js/main.js +++ /dev/null @@ -1,299 +0,0 @@ -((() => { - - let loggedIn = false; - let loginTimeout = null; - - let heartInterval = null; - let heartTimeout = null; - let heartTimedOut = true; - - const header = ` -
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- - - - - `; - - const gmap = new GMaps({ - el: "#map", - disableDoubleClickZoom: true, - lat: 0, - lng: 0, - disableDefaultUI: true, - dblclick(e) { - vex.dialog.open({ - message: "", - input: header, - buttons: [ - $.extend({}, vex.dialog.buttons.YES, { - text: "Submit" - }), - $.extend({}, vex.dialog.buttons.NO, { - text: "Abort" - }) - ], - callback(data) { - if (data !== false && Object.keys(data).length) { - const ed = e.data = {}; - if (data.type === "SPAWN") { - ed.interval = data.interval; - ed.encounters = data.encounters; - } - else if (data.type === "CHECKPOINT") { - ed.name = data.name; - ed.description = data.description; - ed.imageUrl = data.image_url; - ed.experience = data.experience; - } - else if (data.type === "GYM") { - ed.team = data.team; - } - e.type = data.type; - addFort(e, ed); - } - } - }) - } - }); - - function addFort(e, data) { - let lat = e.latLng.lat(); - let lng = e.latLng.lng(); - let obj = { - action: "addFortToPosition", - latitude: lat, - longitude: lng, - zoom: gmap.zoom, - type: e.type - }; - Object.assign(obj, data); - send(obj, res => { - console.log(res); - refreshMapForts(); - }); - } - - function setStatus(txt, color) { - connection_status.innerHTML = txt; - connection_status.style.color = color; - } - - setStatus("Connecting", "yellow"); - - send({ - action: "init" - }, res => { - if (res.success) { - setStatus("Connected!", "green"); - } - else { - if (res.reason !== void 0) { - setStatus(res.reason); - } else { - setStatus("Connection failed!", "red"); - } - return void 0; - } - }); - - login_attempt.addEventListener("click", login); - - submit_spawn.addEventListener("click", () => { - send({ - action: "spawnPkmnToPlayer", - player: spawn_user.value, - pkmn: spawn_pkmn.value - }, res => { - console.log(res); - }); - }); - - function login() { - - const username = login_username.value; - const password = login_password.value; - - send({ - action: "login", - username, - password - }, res => { - if (res.success) { - afterLogin(); - } - else { - setStatus("Login failed!", "red"); - clearTimeout(loginTimeout); - loginTimeout = setTimeout(() => { - if (loggedIn) { - setStatus("Connected!", "green"); - } - }, 3e3); - } - }); - - } - - function afterLogin() { - loggedIn = true; - login_area.style.display = "none"; - setStatus("Logged in!", "green"); - world_manager.style.display = "block"; - server_ping.style.display = "block"; - map_manager.style.display = "block"; - gmap.refresh(); - gmap.setCenter({ - lat: CFG.GMAPS.BASE_LAT, - lng: CFG.GMAPS.BASE_LNG - }); - gmap.setZoom(CFG.GMAPS.BASE_ZOOM); - initHeartBeat(); - refreshMapForts(); - refreshConnectedPlayers(); - getServerVersion(); - } - - function refreshConnectedPlayers() { - send({ - action: "getConnectedPlayers" - }, res => { - connected_players.innerHTML = `Connected players: ${res.connected_players}`; - }); - } - - function getServerVersion() { - send({ - action: "getServerVersion" - }, res => { - server_version.innerHTML = `Server version: v${res.version}`; - }); - } - - function getFortIcon(fort) { - if (fort.type === "CHECKPOINT") return ("/api/img/pokestop_blue.png"); - else if (fort.uid[fort.uid.length - 1] === "S") return ("/api/img/spawn_point.png"); - else return (`/api/img/gym_${fort.owned_by_team}.png`); - } - - function refreshMapForts() { - let center = gmap.getCenter(); - let lat = center.lat(); - let lng = center.lng(); - send({ - action: "getFortsByPosition", - latitude: lat, - longitude: lng, - zoom: gmap.zoom - }, result => { - gmap.removeMarkers(); - result.forts.map((fort) => { - let icon = getFortIcon(fort); - gmap.addMarker({ - lat: fort.latitude, - lng: fort.longitude, - title: fort.name, - icon, - rightclick: function(e) { - vex.dialog.confirm({ - message: `

Delete this fort?
`, - callback: function(value) { - if (value) removeFort(this); - }.bind(fort) - }) - }.bind(fort) - }); - }); - }); - } - - function removeFort(fort) { - send({ - action: "deleteFortById", - uid: fort.uid, - latitude: fort.latitude, - longitude: fort.longitude, - zoom: gmap.zoom - }, res => { - console.log(res); - refreshMapForts(); - }); - } - - function initHeartBeat() { - clearInterval(heartInterval); - heartInterval = setInterval(() => { - heartTimedOut = true; - const now = +new Date(); - heartTimeout = setTimeout(() => { - if (heartTimedOut) { - console.error("Heartbeat timeout!"); - loggedIn = false; - setStatus("Reconnecting..", "yellow"); - login(); - } - }, 5e3); - send({ - action: "heartBeat", - timestamp: now - }, res => { - if (res.timestamp) { - heartTimedOut = false; - clearTimeout(heartTimeout); - const ping = res.timestamp - now; - server_ping.innerHTML = `Ping: ${ping}ms`; - refreshConnectedPlayers(); - refreshMapForts(); - } - }); - }, 3e3); - } - -}))(); \ No newline at end of file