├── Dockerfile ├── README.md ├── assets ├── css │ ├── custom.css │ ├── jquery.filer.css │ └── listr.pack.css ├── fonts │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── jquery.filer-icons │ │ ├── jquery-filer-preview.html │ │ ├── jquery-filer.css │ │ ├── jquery-filer.eot │ │ ├── jquery-filer.svg │ │ ├── jquery-filer.ttf │ │ └── jquery-filer.woff └── js │ ├── bootstrap.min.js │ ├── custom.js │ ├── jquery.base64.min.js │ ├── jquery.filer.min.js │ ├── jquery.min.js │ ├── listr.pack.js │ └── tether.min.js ├── file_server.py ├── requirements.txt ├── screenshot.jpg └── templates └── index.html /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:2.7 2 | 3 | COPY requirements.txt ./ 4 | RUN pip install --no-cache-dir -r requirements.txt 5 | 6 | COPY . . 7 | 8 | CMD [ "python", "./file_server.py" ] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #flask-file-server 2 | 3 | A flask file server with an elegant frontend for browsing, uploading and streaming files 4 | 5 | ![screenshot](https://raw.githubusercontent.com/Wildog/flask-file-server/master/screenshot.jpg) 6 | 7 | ## Build 8 | ```docker build --rm -t maaydin/flask-file-server:latest .``` 9 | 10 | ## Run 11 | ```docker run -p 8000:8000 maaydin/flask-file-server``` 12 | 13 | ## Params 14 | FS_BIND = Param for bind address, default 0.0.0.0 15 | FS_PORT = Param for server port, default 8000 16 | FS_PATH = Param for serve path, default /tmp 17 | FS_KEY = Param for authentication key as base64 encoded username:password, default none 18 | 19 | ```docker run -p 8000:8000 -e FS_BIND=0.0.0.0 -e FS_PORT=8000 -e FS_PATH=/tmp -e FS_KEY=dGVzdDp0ZXN0 maaydin/flask-file-server``` 20 | 21 | -------------------------------------------------------------------------------- /assets/css/custom.css: -------------------------------------------------------------------------------- 1 | .session { 2 | float:right; 3 | margin: 5px 10px 0 0; 4 | } 5 | 6 | .login { 7 | float:right 8 | } 9 | -------------------------------------------------------------------------------- /assets/css/jquery.filer.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * CSS jQuery.filer 3 | * Copyright (c) 2016 CreativeDream 4 | * Version: 1.2 (22-Aug-2016) 5 | */ 6 | @import url('../fonts/jquery.filer-icons/jquery-filer.css'); 7 | 8 | /*------------------------- 9 | Basic configurations 10 | -------------------------*/ 11 | .jFiler * { 12 | -webkit-box-sizing: border-box; 13 | -moz-box-sizing: border-box; 14 | box-sizing: border-box; 15 | } 16 | 17 | .jFiler { 18 | font-family: sans-serif; 19 | font-size: 14px; 20 | color: #494949; 21 | } 22 | 23 | /* Helpers */ 24 | .jFiler ul.list-inline li { 25 | display: inline-block; 26 | padding-right: 5px; 27 | padding-left: 5px; 28 | } 29 | 30 | .jFiler .pull-left { 31 | float: left; 32 | } 33 | 34 | .jFiler .pull-right { 35 | float: right; 36 | } 37 | 38 | /* File Icons */ 39 | span.jFiler-icon-file { 40 | position: relative; 41 | display: block; 42 | background: #e1e1e1 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMQAAAEACAYAAADsqNl9AAAD5klEQVR42u3azUqUURjA8bHAEpIK+9hlRBGC0QfVustI+oAo2nQJgYGFFEUhJF1NUVAXEC6iSyhIDCoX5js9Z5xpXmxsRjOdmfP7wfPqwtWZ589xhqlUN2Y5Zi5mJmYi5lzMgZhdFbpavEb32sxsURSfq5mqrPPv52MexYxZrb4NIusoOgoiDudb/JiMGbZSWQSRbRSdBPEqZtQqZRdEllFU2rxPuB8zYI2yDSK7KNYKYinmlvURRG5RVNa4GW5aHUHkGEWrIKasjSByjWJ1EC+tjCByjqKy6qPVI1ZGEDlHUb4h7loXQeQeRSOILzF7rIsgco+iEcS0VRGEKFaCSB+znrQqghDFShDvrYkgRNEM4pk1EYQomkFctiaCEEUziDPWRBCiaAYxYk0EIYpmEIPWRBCiqAeBIEQhCEGIQhBsWxA9E4UNEYQoBCEIUQiC7giiq6OwIYIQhSAEIQpB0H1BdF0UNkQQohCEIEQhCLo7iFoUMZ8EgSC6JAobIghRCEIQohAEvRXEtkRhQwQhCkEIQhSCoHeD2LIobIggRCEIQYhCEPRHEP81ChsiCFEIQhCiEAT9F8SmR2FDBCEKQQhCFIKgv4PYlChsiCD6bZ7/SxQ2RBCiEIQgRCEI8gpiQ1HYEEGIQhCCEIUgyDeIjqOwIYIQhSAEIQpBsBLEKVGsHYUNcUuIQhCCMK2jsB2CEEUpCtshClOKwmYIwpSisBn5BjEqgj+jsBluCVMaWyEKIQiCUhCXhCAI3BKC4K9RXBeEIHBbCALvKwTBRuO4IQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyEi1Wh10ClBrYXd6jDgKqAVxMD3OOgqoBXE+PSYcBdSCuJIeM44CakHMpseco4BKpSiKDymI5Zgxx0Hmt8N4TDX9kjx0JGQexONyEPMxw46FTGPYF7NQDiKZdDRkGsSDRgTlIL7HHHU8ZBbD8ZjFVkEkr2MGHBOZxLAj5m05gNVBJNOOipzeSLcLIn0Me9tx0ecx3KnvetsgkiVR0Ocx/Gy1+GsF0bgppr2noI9C2BnzpNXN0EkQDW9ijjlOejyGEzHv2i17J0EkP2KmYvY6WnoshP31/3QWO1n0ToNoWKhfOeOOmi4P4XTM06Iovq5nwdcbxG/pm4Hp67IxV2MuxByKGfJSsMWLPxRzOOZizLWYF7GbHze6178AQI59RSRyAJkAAAAASUVORK5CYII=') no-repeat; 43 | background-size: cover; 44 | width: 57px; 45 | height: 74px; 46 | line-height: 90px; 47 | text-align: center; 48 | margin: 0 auto; 49 | color: #fff; 50 | font-size: 14px; 51 | font-weight: bold; 52 | overflow: hidden; 53 | } 54 | 55 | span.jFiler-icon-file i[class*="icon-jfi-"] { 56 | font-size: 24px; 57 | } 58 | 59 | span.jFiler-icon-file.f-image { 60 | background-color: #e15955; 61 | } 62 | 63 | span.jFiler-icon-file.f-video { 64 | background-color: #4183d7; 65 | } 66 | 67 | span.jFiler-icon-file.f-audio { 68 | background-color: #5bab6e; 69 | } 70 | 71 | /* Progress Bar */ 72 | .jFiler-jProgressBar { 73 | height: 8px; 74 | background: #f1f1f1; 75 | margin-top: 3px; 76 | margin-bottom: 0; 77 | overflow: hidden; 78 | -webkit-border-radius: 4px; 79 | -moz-border-radius: 4px; 80 | border-radius: 4px; 81 | } 82 | 83 | .jFiler-jProgressBar .bar { 84 | float: left; 85 | width: 0; 86 | height: 100%; 87 | font-size: 12px; 88 | color: #ffffff; 89 | text-align: center; 90 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 91 | background-color: #50A1E9; 92 | box-sizing: border-box; 93 | -webkit-border-radius: 4px; 94 | -moz-border-radius: 4px; 95 | border-radius: 4px; 96 | -webkit-transition: width 0.3s ease; 97 | -moz-transition: width 0.3s ease; 98 | -o-transition: width 0.3s ease; 99 | transition: width 0.3s ease; 100 | } 101 | 102 | .jFiler-jProgressBar .bar.dark { 103 | background-color: #555; 104 | } 105 | 106 | .jFiler-jProgressBar .bar.blue { 107 | background-color: #428bca; 108 | } 109 | 110 | .jFiler-jProgressBar .bar.green { 111 | background-color: #5cb85c; 112 | } 113 | 114 | .jFiler-jProgressBar .bar.orange { 115 | background-color: #f7a923; 116 | } 117 | 118 | .jFiler-jProgressBar .bar.red { 119 | background-color: #d9534f; 120 | } 121 | 122 | /* Thumbs */ 123 | .jFiler-row:after, 124 | .jFiler-item:after { 125 | display: table; 126 | line-height: 0; 127 | content: ""; 128 | clear: both; 129 | } 130 | 131 | .jFiler-items ul { 132 | margin: 0; 133 | padding: 0; 134 | list-style: none; 135 | } 136 | 137 | /*------------------------- 138 | Default Theme 139 | -------------------------*/ 140 | .jFiler-theme-default .jFiler-input { 141 | position: relative; 142 | display: block; 143 | width: 400px; 144 | height: 35px; 145 | margin: 0 0 15px 0; 146 | background: #fefefe; 147 | border: 1px solid #cecece; 148 | font-size: 12px; 149 | font-family: sans-serif; 150 | color: #888; 151 | border-radius: 4px; 152 | cursor: pointer; 153 | overflow: hidden; 154 | -webkit-box-shadow: rgba(0,0,0,.25) 0 4px 5px -5px inset; 155 | -moz-box-shadow: rgba(0,0,0,.25) 0 4px 5px -5px inset; 156 | box-shadow: rgba(0,0,0,.25) 0 4px 5px -5px inset; 157 | } 158 | 159 | .jFiler-theme-default .jFiler-input.focused { 160 | outline: none; 161 | -webkit-box-shadow: 0 0 7px rgba(0,0,0,0.1); 162 | -moz-box-shadow: 0 0 7px rgba(0,0,0,0.1); 163 | box-shadow: 0 0 7px rgba(0,0,0,0.1); 164 | } 165 | 166 | .jFiler-theme-default .jFiler.dragged .jFiler-input { 167 | border: 1px dashed #aaaaaa; 168 | background: #f9f9f9; 169 | } 170 | 171 | .jFiler-theme-default .jFiler.dragged .jFiler-input:hover { 172 | background: #FFF8D0; 173 | } 174 | 175 | .jFiler-theme-default .jFiler.dragged .jFiler-input * { 176 | pointer-events: none; 177 | } 178 | 179 | .jFiler-theme-default .jFiler.dragged .jFiler-input .jFiler-input-caption { 180 | width: 100%; 181 | text-align: center; 182 | } 183 | 184 | .jFiler-theme-default .jFiler.dragged .jFiler-input .jFiler-input-button { 185 | display: none; 186 | } 187 | 188 | .jFiler-theme-default .jFiler-input-caption { 189 | display: block; 190 | float: left; 191 | height: 100%; 192 | padding-top: 8px; 193 | padding-left: 10px; 194 | text-overflow: ellipsis; 195 | overflow: hidden; 196 | } 197 | 198 | .jFiler-theme-default .jFiler-input-button { 199 | display: block; 200 | float: right; 201 | height: 100%; 202 | padding-top: 8px; 203 | padding-left: 15px; 204 | padding-right: 15px; 205 | border-left: 1px solid #ccc; 206 | color: #666666; 207 | text-align: center; 208 | background-color: #fefefe; 209 | background-image: -webkit-gradient(linear,0 0,0 100%,from(#fefefe),to(#f1f1f1)); 210 | background-image: -webkit-linear-gradient(top,#fefefe,#f1f1f1); 211 | background-image: -o-linear-gradient(top,#fefefe,#f1f1f1); 212 | background-image: linear-gradient(to bottom,#fefefe,#f1f1f1); 213 | background-image: -moz-linear-gradient(top,#fefefe,#f1f1f1); 214 | -webkit-transition: all .1s ease-out; 215 | -moz-transition: all .1s ease-out; 216 | -o-transition: all .1s ease-out; 217 | transition: all .1s ease-out; 218 | } 219 | 220 | .jFiler-theme-default .jFiler-input-button:hover { 221 | -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.07); 222 | -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.07); 223 | box-shadow: inset 0 0 10px rgba(0,0,0,0.07); 224 | } 225 | 226 | .jFiler-theme-default .jFiler-input-button:active { 227 | background-image: -webkit-gradient(linear,0 0,0 100%,from(#f1f1f1),to(#fefefe)); 228 | background-image: -webkit-linear-gradient(top,#f1f1f1,#fefefe); 229 | background-image: -o-linear-gradient(top,#f1f1f1,#fefefe); 230 | background-image: linear-gradient(to bottom,#f1f1f1,#fefefe); 231 | background-image: -moz-linear-gradient(top,#f1f1f1,#fefefe); 232 | } 233 | 234 | /*------------------------- 235 | Thumbnails 236 | -------------------------*/ 237 | .jFiler-items-default .jFiler-items { 238 | 239 | } 240 | 241 | .jFiler-items-default .jFiler-item { 242 | position: relative; 243 | padding: 16px; 244 | margin-bottom: 16px; 245 | background: #f7f7f7; 246 | color: #4d4d4c; 247 | } 248 | 249 | 250 | .jFiler-items-default .jFiler-item .jFiler-item-icon { 251 | font-size: 32px; 252 | color: #48A0DC; 253 | 254 | margin-right: 15px; 255 | margin-top: -3px; 256 | } 257 | 258 | .jFiler-items-default .jFiler-item .jFiler-item-title { 259 | font-weight: bold; 260 | } 261 | 262 | .jFiler-items-default .jFiler-item .jFiler-item-others { 263 | font-size: 12px; 264 | color: #777; 265 | margin-left: -5px; 266 | margin-right: -5px; 267 | } 268 | 269 | .jFiler-items-default .jFiler-item .jFiler-item-others span { 270 | padding-left: 5px; 271 | padding-right: 5px; 272 | } 273 | 274 | .jFiler-items-default .jFiler-item-assets { 275 | position: absolute; 276 | display: block; 277 | right: 16px; 278 | top: 50%; 279 | margin-top: -10px; 280 | } 281 | 282 | .jFiler-items-default .jFiler-item-assets a { 283 | padding: 8px 9px 8px 12px; 284 | cursor: pointer; 285 | background: #fafafa; 286 | color: #777; 287 | border-radius: 4px; 288 | border: 1px solid #e3e3e3 289 | } 290 | 291 | .jFiler-items-default .jFiler-item-assets .jFiler-item-trash-action:hover, 292 | .jFiler-items-default .jFiler-item-assets .jFiler-item-trash-action:active { 293 | color: #d9534f; 294 | } 295 | 296 | .jFiler-items-default .jFiler-item-assets .jFiler-item-trash-action:active { 297 | background: transparent; 298 | } 299 | 300 | /* Thumbnails: Grid */ 301 | .jFiler-items-grid .jFiler-item { 302 | float: left; 303 | } 304 | 305 | .jFiler-items-grid .jFiler-item .jFiler-item-container { 306 | position: relative; 307 | margin: 0 20px 30px 0; 308 | padding: 10px; 309 | border: 1px solid #e1e1e1; 310 | border-radius: 3px; 311 | background: #fff; 312 | -webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.06); 313 | -moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.06); 314 | box-shadow: 0px 0px 3px rgba(0,0,0,0.06); 315 | } 316 | 317 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-thumb { 318 | position: relative; 319 | width: 190px; 320 | height: 145px; 321 | min-height: 115px; 322 | border: 1px solid #e1e1e1; 323 | overflow: hidden; 324 | } 325 | 326 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-thumb .jFiler-item-thumb-image { 327 | width: 100%; 328 | height: 100%; 329 | text-align: center; 330 | } 331 | 332 | .jFiler-item .jFiler-item-container .jFiler-item-thumb img { 333 | max-width: none; 334 | max-height: 100%; 335 | } 336 | 337 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-thumb span.jFiler-icon-file { 338 | margin-top: 32px; 339 | } 340 | 341 | .jFiler-items-grid .jFiler-item-thumb-image.f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ExMSgSSdKmQvBAgIOqwoAgeKkDopBgMiMbOutCgGSLe8IlIeSKbBI1LAKCEAIfkEBQQAHgAsAAAAAAEAAQAABQOgFwIAIfkEBQQAHgAsAAAAAAEAAQAABQOgFwIAIfkECQQAHgAsAAAAACMAIwAABbWgJ45kaZ5oqq5s675wLM90baPBvS6MTgoKgqjxEBEihZuAsRAxHKJHJXk7NAwBB8RzsPRqBYFo4RgkFALKxMhAxAiKBdXtAXgah4Eis2nIBgcLCSgVGxMKNYAoD4MzAgI5KgQHCAhULQUKmgmRJgUaIhwWLwIEBQQDKQEKDxEQCXYxnSUBcjapKAIcHUg+JgkUHRx+YB6zIw4YEMc2QiMBzDB0HgbGvifR19rb3N3e3+Dh4ikhADs=') no-repeat center; 343 | width: 100%; 344 | height: 100%; 345 | } 346 | 347 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-thumb-overlay { 348 | position: absolute; 349 | top: 0; 350 | left: 0; 351 | width: 100%; 352 | height: 100%; 353 | color: #fff; 354 | background: rgba(76, 76, 77, 0.8); 355 | opacity: 0; 356 | filter: alpha(opacity=0); 357 | z-index: 10; 358 | overflow-y: auto; 359 | -webkit-transition: all 0.12s; 360 | -moz-transition: all 0.12s; 361 | transition: all 0.12s; 362 | } 363 | 364 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-thumb:hover .jFiler-item-thumb-overlay { 365 | opacity: 1; 366 | filter: aplpha(opacity(100)); 367 | } 368 | 369 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-info { 370 | display: table; 371 | padding: 0 10px; 372 | overflow: auto; 373 | width: 100%; 374 | height: 100%; 375 | text-align: center; 376 | } 377 | 378 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-info .jFiler-item-title { 379 | display: block; 380 | font-weight: bold; 381 | word-break: break-all; 382 | line-height: 1; 383 | } 384 | 385 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-info .jFiler-item-others { 386 | display: inline-block; 387 | font-size: 10px; 388 | } 389 | 390 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-assets { 391 | margin-top: 10px; 392 | color: #999; 393 | } 394 | 395 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-assets .text-success { 396 | color: #3C763D 397 | } 398 | 399 | .jFiler-items-grid .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-assets .text-error { 400 | color: #A94442 401 | } 402 | 403 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-assets .jFiler-jProgressBar { 404 | width: 120px; 405 | margin-left: -5px; 406 | } 407 | 408 | .jFiler-items-grid .jFiler-item .jFiler-item-container .jFiler-item-assets .jFiler-item-others { 409 | font-size: 12px; 410 | } 411 | 412 | div .jFiler-item-others .text-error { 413 | color: #ff2b2b !important; 414 | } 415 | 416 | .jFiler-items-grid .jFiler-item-trash-action:hover { 417 | cursor: pointer; 418 | color: #d9534f; 419 | } 420 | -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/jquery.filer-icons/jquery-filer.css: -------------------------------------------------------------------------------- 1 | /* 2 | Icon Font: jquery-filer 3 | */ 4 | 5 | @font-face { 6 | font-family: "jquery-filer"; 7 | src: url("./jquery-filer.eot"); 8 | src: url("./jquery-filer.eot?#iefix") format("embedded-opentype"), 9 | url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABY8AA0AAAAAJGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAWIAAAABoAAAAcbgWsnk9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Tm45mDjKoziE9XOuePt450H1s4harx2Dpvt4Mb581iB3ul1E6M9dt9PRLcT/Ygqq2QQs6TQU2y+q2Bo0g65E91XlNl/Daz3sbaY20ArLDHcbTP/Gom51X2x0XZOzDnhr71RifVyTMsLXG/lbiHdm0oleW3zxYeDXO7MOJHPs8Zb5V5NzQnluktpIp3uSXP/CyLCXdEAeNqNkc1qwkAUhc/4By1S2lVdztKCiZOAm2wFxV1X7lOdaCQkmkwQX0P6GKX7PkuhT9AH6LIncSh20WKGmfudMzd37jAAbvAKgdM3w7NlgS6+LDfQFneWm+iL2HILXfFiuY1b8W65g26jw0zRuqI61n9VLNDDh+UGrkXbchOP4t5yCz1xtNyGFG+WO/Q/MUYOjRCG6xISTzhwnaFEgph+SjVlTLCgLrkO6iGxpzZYkybImGfqmGPFShI+XCjGPjMMxxYBhhyRzY1+cl0UVC5dTf8BGOc6NHopnw5yViZxmMppmCzicjEYDOQ+Nms5yVIzyfKVlr6rZH9tzDYYDiO6UeW6ReSm2rDUBjv2rHnSAQ5PiXmPSmGzK3V+cKI40VRnG9b570oB51+FT7s+8xx4nBV5GLHgr5YDed4Apa8cz/GVN7q453ltFtzO6kdS9UluHasuMdd5EWepVMpzlVLy0srfppZ9qgAAeNpdzkdSw1AUBVG1CCbnZJLJOUj/fWwzxID2woQZ+2NnQIlmgianStKrvkVZtM/XZ9H9geL/E+3bkpIxxplgkg5TTDPDLHPMs8AiSyyzwiprrLPBJlt02WaHXfbYp8cBhxxxzAmnnHHOBZdccc0Nt9xxT0Xd+Xh/a1LT14EOdaRNa1SVhg50pM/68mtda9K+elcP9e//V7WX/J4e9UntJXvJ++R98j7cG+4Id4T7I+uDui/cF/bDftgP+2E/7If9sJ/tZ/vZfraf8zcFz3IYAAAAAAH//wACeNpjYGBgZACCM7aLzoPoC09YnsNoAFB9B7oAAA==), 10 | url("./jquery-filer.woff") format("woff"), 11 | url("./jquery-filer.ttf") format("truetype"), 12 | url("./jquery-filer.svg#jquery-filer") format("svg"); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | @media screen and (-webkit-min-device-pixel-ratio:0) { 18 | @font-face { 19 | font-family: "jquery-filer"; 20 | src: url("./jquery-filer.svg#jquery-filer") format("svg"); 21 | } 22 | } 23 | 24 | [data-icon]:before { content: attr(data-icon); } 25 | 26 | [data-icon]:before, 27 | .icon-jfi-ban:before, 28 | .icon-jfi-calendar:before, 29 | .icon-jfi-check:before, 30 | .icon-jfi-check-circle:before, 31 | .icon-jfi-cloud-o:before, 32 | .icon-jfi-cloud-up-o:before, 33 | .icon-jfi-comment:before, 34 | .icon-jfi-comment-o:before, 35 | .icon-jfi-download-o:before, 36 | .icon-jfi-exclamation:before, 37 | .icon-jfi-exclamation-circle:before, 38 | .icon-jfi-exclamation-triangle:before, 39 | .icon-jfi-external-link:before, 40 | .icon-jfi-eye:before, 41 | .icon-jfi-file:before, 42 | .icon-jfi-file-audio:before, 43 | .icon-jfi-file-image:before, 44 | .icon-jfi-file-o:before, 45 | .icon-jfi-file-text:before, 46 | .icon-jfi-file-video:before, 47 | .icon-jfi-files-o:before, 48 | .icon-jfi-folder:before, 49 | .icon-jfi-heart:before, 50 | .icon-jfi-heart-o:before, 51 | .icon-jfi-history:before, 52 | .icon-jfi-infinite:before, 53 | .icon-jfi-info:before, 54 | .icon-jfi-info-circle:before, 55 | .icon-jfi-minus:before, 56 | .icon-jfi-minus-circle:before, 57 | .icon-jfi-paperclip:before, 58 | .icon-jfi-pencil:before, 59 | .icon-jfi-plus:before, 60 | .icon-jfi-plus-circle:before, 61 | .icon-jfi-power-off:before, 62 | .icon-jfi-question:before, 63 | .icon-jfi-question-circle:before, 64 | .icon-jfi-reload:before, 65 | .icon-jfi-settings:before, 66 | .icon-jfi-sort:before, 67 | .icon-jfi-times:before, 68 | .icon-jfi-times-circle:before, 69 | .icon-jfi-trash:before, 70 | .icon-jfi-upload-o:before, 71 | .icon-jfi-user:before, 72 | .icon-jfi-view-grid:before, 73 | .icon-jfi-view-list:before, 74 | .icon-jfi-zip:before { 75 | display: inline-block; 76 | font-family: "jquery-filer"; 77 | font-style: normal; 78 | font-weight: normal; 79 | font-variant: normal; 80 | text-decoration: inherit; 81 | text-rendering: optimizeLegibility; 82 | text-transform: none; 83 | -moz-osx-font-smoothing: grayscale; 84 | -webkit-font-smoothing: antialiased; 85 | font-smoothing: antialiased; 86 | } 87 | 88 | .icon-jfi-ban:before { content: "\f328"; } 89 | .icon-jfi-calendar:before { content: "\f30b"; } 90 | .icon-jfi-check:before { content: "\f2f6"; } 91 | .icon-jfi-check-circle:before { content: "\f30c"; } 92 | .icon-jfi-cloud-o:before { content: "\f329"; } 93 | .icon-jfi-cloud-up-o:before { content: "\f32a"; } 94 | .icon-jfi-comment:before { content: "\f32b"; } 95 | .icon-jfi-comment-o:before { content: "\f30d"; } 96 | .icon-jfi-download-o:before { content: "\f32c"; } 97 | .icon-jfi-exclamation:before { content: "\f32d"; } 98 | .icon-jfi-exclamation-circle:before { content: "\f32e"; } 99 | .icon-jfi-exclamation-triangle:before { content: "\f32f"; } 100 | .icon-jfi-external-link:before { content: "\f330"; } 101 | .icon-jfi-eye:before { content: "\f2f7"; } 102 | .icon-jfi-file:before { content: "\f31f"; } 103 | .icon-jfi-file-audio:before { content: "\f331"; } 104 | .icon-jfi-file-image:before { content: "\f332"; } 105 | .icon-jfi-file-o:before { content: "\f31d"; } 106 | .icon-jfi-file-text:before { content: "\f333"; } 107 | .icon-jfi-file-video:before { content: "\f334"; } 108 | .icon-jfi-files-o:before { content: "\f335"; } 109 | .icon-jfi-folder:before { content: "\f31e"; } 110 | .icon-jfi-heart:before { content: "\f2f8"; } 111 | .icon-jfi-heart-o:before { content: "\f336"; } 112 | .icon-jfi-history:before { content: "\f337"; } 113 | .icon-jfi-infinite:before { content: "\f2fb"; } 114 | .icon-jfi-info:before { content: "\f338"; } 115 | .icon-jfi-info-circle:before { content: "\f339"; } 116 | .icon-jfi-minus:before { content: "\f33a"; } 117 | .icon-jfi-minus-circle:before { content: "\f33b"; } 118 | .icon-jfi-paperclip:before { content: "\f33c"; } 119 | .icon-jfi-pencil:before { content: "\f2ff"; } 120 | .icon-jfi-plus:before { content: "\f311"; } 121 | .icon-jfi-plus-circle:before { content: "\f312"; } 122 | .icon-jfi-power-off:before { content: "\f33d"; } 123 | .icon-jfi-question:before { content: "\f33e"; } 124 | .icon-jfi-question-circle:before { content: "\f33f"; } 125 | .icon-jfi-reload:before { content: "\f300"; } 126 | .icon-jfi-settings:before { content: "\f340"; } 127 | .icon-jfi-sort:before { content: "\f303"; } 128 | .icon-jfi-times:before { content: "\f316"; } 129 | .icon-jfi-times-circle:before { content: "\f317"; } 130 | .icon-jfi-trash:before { content: "\f318"; } 131 | .icon-jfi-upload-o:before { content: "\f341"; } 132 | .icon-jfi-user:before { content: "\f307"; } 133 | .icon-jfi-view-grid:before { content: "\f342"; } 134 | .icon-jfi-view-list:before { content: "\f343"; } 135 | .icon-jfi-zip:before { content: "\f344"; } 136 | -------------------------------------------------------------------------------- /assets/fonts/jquery.filer-icons/jquery-filer.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/assets/fonts/jquery.filer-icons/jquery-filer.eot -------------------------------------------------------------------------------- /assets/fonts/jquery.filer-icons/jquery-filer.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/assets/fonts/jquery.filer-icons/jquery-filer.ttf -------------------------------------------------------------------------------- /assets/fonts/jquery.filer-icons/jquery-filer.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/assets/fonts/jquery.filer-icons/jquery-filer.woff -------------------------------------------------------------------------------- /assets/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-alpha.3 (http://getbootstrap.com) 3 | * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(a){"use strict";function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},e=function(){function a(a,b){for(var c=0;cthis._items.length-1||b<0)){if(this._isSliding)return void a(this._element).one(q.SLID,function(){return c.to(b)});if(d===b)return this.pause(),void this.cycle();var e=b>d?p.NEXT:p.PREVIOUS;this._slide(e,this._items[b])}}},{key:"dispose",value:function(){a(this._element).off(h),a.removeData(this._element,g),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}},{key:"_getConfig",value:function(c){return c=a.extend({},n,c),f.typeCheckConfig(b,c,o),c}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on(q.KEYDOWN,a.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(q.MOUSEENTER,a.proxy(this.pause,this)).on(q.MOUSELEAVE,a.proxy(this.cycle,this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case l:this.prev();break;case m:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(s.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===p.NEXT,d=a===p.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e===f;if(g&&!this._config.wrap)return b;var h=a===p.PREVIOUS?-1:1,i=(e+h)%this._items.length;return i===-1?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(q.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(s.ACTIVE).removeClass(r.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(r.ACTIVE)}}},{key:"_slide",value:function(b,c){var d=this,e=a(this._element).find(s.ACTIVE_ITEM)[0],g=c||e&&this._getItemByDirection(b,e),h=Boolean(this._interval),i=b===p.NEXT?r.LEFT:r.RIGHT;if(g&&a(g).hasClass(r.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&e&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var l=a.Event(q.SLID,{relatedTarget:g,direction:i});f.supportsTransitionEnd()&&a(this._element).hasClass(r.SLIDE)?(a(g).addClass(b),f.reflow(g),a(e).addClass(i),a(g).addClass(i),a(e).one(f.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(r.ACTIVE),a(e).removeClass(r.ACTIVE).removeClass(b).removeClass(i),d._isSliding=!1,setTimeout(function(){return a(d._element).trigger(l)},0)}).emulateTransitionEnd(k)):(a(e).removeClass(r.ACTIVE),a(g).addClass(r.ACTIVE),this._isSliding=!1,a(this._element).trigger(l)),h&&this.cycle()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},n,a(this).data());"object"==typeof b&&a.extend(d,b);var e="string"==typeof b?b:d.slide;if(c||(c=new i(this,d),a(this).data(g,c)),"number"==typeof b)c.to(b);else if("string"==typeof e){if(void 0===c[e])throw new Error('No method named "'+e+'"');c[e]()}else d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=f.getSelectorFromElement(this);if(c){var d=a(c)[0];if(d&&a(d).hasClass(r.CAROUSEL)){var e=a.extend({},a(d).data(),a(this).data()),h=this.getAttribute("data-slide-to");h&&(e.interval=!1),i._jQueryInterface.call(a(d),e),h&&a(d).data(g).to(h),b.preventDefault()}}}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return n}}]),i}();return a(document).on(q.CLICK_DATA_API,s.DATA_SLIDE,t._dataApiClickHandler),a(window).on(q.LOAD_DATA_API,function(){a(s.DATA_RIDE).each(function(){var b=a(this);t._jQueryInterface.call(b,b.data())})}),a.fn[b]=t._jQueryInterface,a.fn[b].Constructor=t,a.fn[b].noConflict=function(){return a.fn[b]=j,t._jQueryInterface},t}(jQuery),function(a){var b="collapse",d="4.0.0-alpha.3",g="bs.collapse",h="."+g,i=".data-api",j=a.fn[b],k=600,l={toggle:!0,parent:""},m={toggle:"boolean",parent:"string"},n={SHOW:"show"+h,SHOWN:"shown"+h,HIDE:"hide"+h,HIDDEN:"hidden"+h,CLICK_DATA_API:"click"+h+i},o={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},q={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},r=function(){function h(b,d){c(this,h),this._isTransitioning=!1,this._element=b,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+b.id+'"],'+('[data-toggle="collapse"][data-target="#'+b.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return e(h,[{key:"toggle",value:function(){a(this._element).hasClass(o.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(o.IN)){var c=void 0,d=void 0;if(this._parent&&(c=a.makeArray(a(q.ACTIVES)),c.length||(c=null)),!(c&&(d=a(c).data(g),d&&d._isTransitioning))){var e=a.Event(n.SHOW);if(a(this._element).trigger(e),!e.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c),"hide"),d||a(c).data(g,null));var i=this._getDimension();a(this._element).removeClass(o.COLLAPSE).addClass(o.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(o.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).addClass(o.IN),b._element.style[i]="",b.setTransitioning(!1),a(b._element).trigger(n.SHOWN)};if(!f.supportsTransitionEnd())return void j();var l=i[0].toUpperCase()+i.slice(1),m="scroll"+l;a(this._element).one(f.TRANSITION_END,j).emulateTransitionEnd(k),this._element.style[i]=this._element[m]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(o.IN)){var c=a.Event(n.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension(),e=d===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[d]=this._element[e]+"px",f.reflow(this._element),a(this._element).addClass(o.COLLAPSING).removeClass(o.COLLAPSE).removeClass(o.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(o.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).trigger(n.HIDDEN)};return this._element.style[d]=0,f.supportsTransitionEnd()?void a(this._element).one(f.TRANSITION_END,g).emulateTransitionEnd(k):void g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"dispose",value:function(){a.removeData(this._element,g),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(c){return c=a.extend({},l,c),c.toggle=Boolean(c.toggle),f.typeCheckConfig(b,c,m),c}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(p.WIDTH);return b?p.WIDTH:p.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(h._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(o.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(o.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"_getTargetFromElement",value:function(b){var c=f.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),e=a.extend({},l,c.data(),"object"==typeof b&&b);if(!d&&e.toggle&&/show|hide/.test(b)&&(e.toggle=!1),d||(d=new h(this,e),c.data(g,d)),"string"==typeof b){if(void 0===d[b])throw new Error('No method named "'+b+'"');d[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}}]),h}();return a(document).on(n.CLICK_DATA_API,q.DATA_TOGGLE,function(b){b.preventDefault();var c=r._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();r._jQueryInterface.call(a(c),e)}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="dropdown",d="4.0.0-alpha.3",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[b],k=27,l=38,m=40,n=3,o={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},p={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},q={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},r=function(){function b(a){c(this,b),this._element=a,this._addEventListeners()}return e(b,[{key:"toggle",value:function(){if(this.disabled||a(this).hasClass(p.DISABLED))return!1;var c=b._getParentFromElement(this),d=a(c).hasClass(p.OPEN);if(b._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(c).closest(q.NAVBAR_NAV).length){var e=document.createElement("div");e.className=p.BACKDROP,a(e).insertBefore(this),a(e).on("click",b._clearMenus)}var f={relatedTarget:this},g=a.Event(o.SHOW,f);return a(c).trigger(g),!g.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),a(c).toggleClass(p.OPEN),a(c).trigger(a.Event(o.SHOWN,f)),!1)}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(o.CLICK,this.toggle)}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(g);if(d||a(this).data(g,d=new b(this)),"string"==typeof c){if(void 0===d[c])throw new Error('No method named "'+c+'"');d[c].call(this)}})}},{key:"_clearMenus",value:function(c){if(!c||c.which!==n){var d=a(q.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(q.DATA_TOGGLE)),f=0;f0&&h--,c.which===m&&hdocument.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){this._isBodyOverflowing=document.body.clientWidth=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a=this._offsets[e]&&(void 0===this._offsets[e+1]||a .nav-item .fade, > .fade", 7 | ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},o=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,e=a(this._element).closest(n.UL)[0],g=f.getSelectorFromElement(this._element);e&&(d=a.makeArray(a(e).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,e);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var e=a(c).find(n.ACTIVE_CHILD)[0],g=d&&f.supportsTransitionEnd()&&(e&&a(e).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,e,g,d);e&&g?a(e).one(f.TRANSITION_END,h).emulateTransitionEnd(k):h(),e&&a(e).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,e){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(f.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}e&&e()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)");var b="tooltip",d="4.0.0-alpha.3",g="bs.tooltip",h="."+g,i=a.fn[b],j=150,k="bs-tether",l={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},m={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},n={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},o={IN:"in",OUT:"out"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},q={FADE:"fade",IN:"in"},r={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},s={element:!1,enabled:!1},t={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},u=function(){function i(a,b){c(this,i),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(b),this.tip=null,this._setListeners()}return e(i,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){if(b){var c=this.constructor.DATA_KEY,d=a(b.currentTarget).data(c);d||(d=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(c,d)),d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(a(this.getTipElement()).hasClass(q.IN))return void this._leave(null,this);this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var d=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!d)return;var e=this.getTipElement(),g=f.getUID(this.constructor.NAME);e.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(e).addClass(q.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,j=this._getAttachment(h);a(e).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:j,element:e,target:this.element,classes:s,classPrefix:k,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),f.reflow(e),this._tether.position(),a(e).addClass(q.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===o.OUT&&b._leave(null,b)};if(f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE))return void a(this.tip).one(f.TRANSITION_END,l).emulateTransitionEnd(i._TRANSITION_DURATION);l()}}},{key:"hide",value:function(b){var c=this,d=this.getTipElement(),e=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==o.IN&&d.parentNode&&d.parentNode.removeChild(d),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(e),e.isDefaultPrevented()||(a(d).removeClass(q.IN),f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(d).one(f.TRANSITION_END,g).emulateTransitionEnd(j):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return Boolean(this.getTitle())}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(r.TOOLTIP_INNER),this.getTitle()),b.removeClass(q.FADE).removeClass(q.IN),this.cleanupTether()}},{key:"setElementContent",value:function(b,c){var d=this.config.html;"object"==typeof c&&(c.nodeType||c.jquery)?d?a(c).parent().is(b)||b.empty().append(c):b.text(a(c).text()):b[d?"html":"text"](c)}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&this._tether.destroy()}},{key:"_getAttachment",value:function(a){return n[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==t.MANUAL){var d=c===t.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===t.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"===b.type?t.FOCUS:t.HOVER]=!0),a(c.getTipElement()).hasClass(q.IN)||c._hoverState===o.IN?void(c._hoverState=o.IN):(clearTimeout(c._timeout),c._hoverState=o.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===o.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;if(c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"===b.type?t.FOCUS:t.HOVER]=!1),!c._isWithActiveTrigger())return clearTimeout(c._timeout),c._hoverState=o.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===o.OUT&&c.hide()},c.config.delay.hide)):void c.hide()}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(c){return c=a.extend({},this.constructor.Default,a(this.element).data(),c),c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay}),f.typeCheckConfig(b,c,this.constructor.DefaultType),c}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config)this.constructor.Default[b]!==this.config[b]&&(a[b]=this.config[b]);return a}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return h}},{key:"DefaultType",get:function(){return m}}]),i}();return a.fn[b]=u._jQueryInterface,a.fn[b].Constructor=u,a.fn[b].noConflict=function(){return a.fn[b]=i,u._jQueryInterface},u}(jQuery));(function(a){var f="popover",h="4.0.0-alpha.3",i="bs.popover",j="."+i,k=a.fn[f],l=a.extend({},g.Default,{placement:"right",trigger:"click",content:"",template:''}),m=a.extend({},g.DefaultType,{content:"(string|element|function)"}),n={FADE:"fade",IN:"in"},o={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},p={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},q=function(g){function k(){c(this,k),d(Object.getPrototypeOf(k.prototype),"constructor",this).apply(this,arguments)}return b(k,g),e(k,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(o.TITLE),this.getTitle()),this.setElementContent(b.find(o.CONTENT),this._getContent()),b.removeClass(n.FADE).removeClass(n.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(i),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new k(this,d),a(this).data(i,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return h}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return j}},{key:"DefaultType",get:function(){return m}}]),k}(g);return a.fn[f]=q._jQueryInterface,a.fn[f].Constructor=q,a.fn[f].noConflict=function(){return a.fn[f]=k,q._jQueryInterface},q})(jQuery)}(jQuery); -------------------------------------------------------------------------------- /assets/js/custom.js: -------------------------------------------------------------------------------- 1 | function getCookie(cname) { 2 | var name = cname + "="; 3 | var decodedCookie = decodeURIComponent(document.cookie); 4 | var ca = decodedCookie.split(';'); 5 | for(var i = 0; i ', 34 | item: '
  • {{fi-icon}}
    {{fi-name | limitTo:30}}
    size: {{fi-size2}}type: {{fi-extension}}{{fi-progressBar}}
  • ', 35 | itemAppend: '
  • {{fi-icon}}
    {{fi-name | limitTo:35}}
    size: {{fi-size2}}type: {{fi-extension}}
  • ', 36 | progressBar: '
    ', 37 | itemAppendToEnd: false, 38 | removeConfirmation: true, 39 | canvasImage: true, 40 | _selectors: { 41 | list: '.jFiler-items-list', 42 | item: '.jFiler-item', 43 | progressBar: '.bar', 44 | remove: '.jFiler-item-trash-action' 45 | } 46 | }, 47 | uploadFile: { 48 | url: "#", 49 | data: {}, 50 | type: 'POST', 51 | enctype: 'multipart/form-data', 52 | beforeSend: function(){}, 53 | success: function(data, el){ 54 | var parent = el.find(".jFiler-jProgressBar").parent(); 55 | data = JSON.parse(data) 56 | if (data.status == 'success') { 57 | el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ 58 | $("
    Success
    ").hide().appendTo(parent).fadeIn("slow"); 59 | }); 60 | } else { 61 | el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ 62 | $("
    Error: " + data.msg + "
    ").hide().appendTo(parent).fadeIn("slow"); 63 | }); 64 | } 65 | }, 66 | error: function(el,i,g,h,e,d,jqxhr,c,f){ 67 | data = JSON.parse(jqxhr.responseText) 68 | var parent = el.find(".jFiler-jProgressBar").parent(); 69 | el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ 70 | $("
    Error: " + data.msg + "
    ").hide().appendTo(parent).fadeIn("slow"); 71 | }); 72 | }, 73 | statusCode: null, 74 | onProgress: null, 75 | onComplete: null 76 | }, 77 | captions: { 78 | button: "Add Files", 79 | feedback: "Choose files To Upload", 80 | feedback2: "files were chosen", 81 | drop: "Drop file here to Upload", 82 | removeConfirmation: "Are you sure you want to remove this file?", 83 | errors: { 84 | filesLimit: "Only {{fi-limit}} files are allowed to be uploaded.", 85 | filesType: "Only Images are allowed to be uploaded.", 86 | filesSize: "{{fi-name}} is too large! Please upload file up to {{fi-fileMaxSize}} MB.", 87 | filesSizeAll: "Files you've choosed are too large! Please upload files up to {{fi-maxSize}} MB.", 88 | folderUpload: "You are not allowed to upload folders." 89 | } 90 | } 91 | }); 92 | $('#close-uploader').click(function() { 93 | $('#filer_input').prop("jFiler").reset() 94 | }); 95 | }); 96 | -------------------------------------------------------------------------------- /assets/js/jquery.base64.min.js: -------------------------------------------------------------------------------- 1 | "use strict";jQuery.base64=(function($){var _PADCHAR="=",_ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_VERSION="1.0";function _getbyte64(s,i){var idx=_ALPHA.indexOf(s.charAt(i));if(idx===-1){throw"Cannot decode base64"}return idx}function _decode(s){var pads=0,i,b10,imax=s.length,x=[];s=String(s);if(imax===0){return s}if(imax%4!==0){throw"Cannot decode base64"}if(s.charAt(imax-1)===_PADCHAR){pads=1;if(s.charAt(imax-2)===_PADCHAR){pads=2}imax-=4}for(i=0;i>16,(b10>>8)&255,b10&255))}switch(pads){case 1:b10=(_getbyte64(s,i)<<18)|(_getbyte64(s,i+1)<<12)|(_getbyte64(s,i+2)<<6);x.push(String.fromCharCode(b10>>16,(b10>>8)&255));break;case 2:b10=(_getbyte64(s,i)<<18)|(_getbyte64(s,i+1)<<12);x.push(String.fromCharCode(b10>>16));break}return x.join("")}function _getbyte(s,i){var x=s.charCodeAt(i);if(x>255){throw"INVALID_CHARACTER_ERR: DOM Exception 5"}return x}function _encode(s){if(arguments.length!==1){throw"SyntaxError: exactly one argument required"}s=String(s);var i,b10,x=[],imax=s.length-s.length%3;if(s.length===0){return s}for(i=0;i>18));x.push(_ALPHA.charAt((b10>>12)&63));x.push(_ALPHA.charAt((b10>>6)&63));x.push(_ALPHA.charAt(b10&63))}switch(s.length-imax){case 1:b10=_getbyte(s,i)<<16;x.push(_ALPHA.charAt(b10>>18)+_ALPHA.charAt((b10>>12)&63)+_PADCHAR+_PADCHAR);break;case 2:b10=(_getbyte(s,i)<<16)|(_getbyte(s,i+1)<<8);x.push(_ALPHA.charAt(b10>>18)+_ALPHA.charAt((b10>>12)&63)+_ALPHA.charAt((b10>>6)&63)+_PADCHAR);break}return x.join("")}return{decode:_decode,encode:_encode,VERSION:_VERSION}}(jQuery)); -------------------------------------------------------------------------------- /assets/js/jquery.filer.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery.filer minified 3 | * Copyright (c) 2016 CreativeDream 4 | * Website: https://github.com/CreativeDream/jquery.filer 5 | * Version: 1.2 (22-Aug-2016) 6 | * Requires: jQuery v1.7.1 or later 7 | */ 8 | !function(a){"use strict";a.fn.filer=function(b){return this.each(function(c,d){var e=a(d),f=".jFiler",g=a(),h=a(),i=a(),j=[],k=a.isFunction(b)?b(e,a.fn.filer.defaults):b,l=k&&a.isPlainObject(k)?a.extend(!0,{},a.fn.filer.defaults,k):a.fn.filer.defaults,m={init:function(){e.wrap('
    '),m._set("props"),e.prop("jFiler").boxEl=g=e.closest(f),m._changeInput()},_bindInput:function(){l.changeInput&&h.length>0&&h.on("click",m._clickHandler),e.on({focus:function(){h.addClass("focused")},blur:function(){h.removeClass("focused")},change:function(){m._onChange()}}),l.dragDrop&&(h.on("drag dragstart dragend dragover dragenter dragleave drop",function(a){a.preventDefault(),a.stopPropagation()}),h.on("drop",m._dragDrop.drop),h.on("dragover",m._dragDrop.dragEnter),h.on("dragleave",m._dragDrop.dragLeave)),l.uploadFile&&l.clipBoardPaste&&a(window).on("paste",m._clipboardPaste)},_unbindInput:function(){l.changeInput&&h.length>0&&h.off("click",m._clickHandler)},_clickHandler:function(){e.click()},_applyAttrSettings:function(){var a=["name","limit","maxSize","extensions","changeInput","showThumbs","appendTo","theme","addMore","excludeName","files","uploadUrl","uploadData","options"];for(var b in a){var c="data-jfiler-"+a[b];if(m._assets.hasAttr(c)){switch(a[b]){case"changeInput":case"showThumbs":case"addMore":l[a[b]]=["true","false"].indexOf(e.attr(c))>-1?"true"==e.attr(c):e.attr(c);break;case"extensions":l[a[b]]=e.attr(c).replace(/ /g,"").split(",");break;case"uploadUrl":l.uploadFile&&(l.uploadFile.url=e.attr(c));break;case"uploadData":l.uploadFile&&(l.uploadFile.data=JSON.parse(e.attr(c)));break;case"files":case"options":l[a[b]]=JSON.parse(e.attr(c));break;default:l[a[b]]=e.attr(c)}e.removeAttr(c)}}},_changeInput:function(){if(m._applyAttrSettings(),null!=l.beforeRender&&"function"==typeof l.beforeRender?l.beforeRender(g,e):null,l.theme&&g.addClass("jFiler-theme-"+l.theme),"input"!=e.get(0).tagName.toLowerCase()&&"file"!=e.get(0).type)h=e,e=a(''),e.css({position:"absolute",left:"-9999px",top:"-9999px","z-index":"-9999"}),g.prepend(e),m._isGn=e;else if(l.changeInput){switch(typeof l.changeInput){case"boolean":h=a('
    '+l.captions.feedback+'
    '+l.captions.button+'
    "');break;case"string":case"object":h=a(l.changeInput);break;case"function":h=a(l.changeInput(g,e,l))}e.after(h),e.css({position:"absolute",left:"-9999px",top:"-9999px","z-index":"-9999"})}e.prop("jFiler").newInputEl=h,(!l.limit||l.limit&&l.limit>=2)&&(e.attr("multiple","multiple"),"[]"!=e.attr("name").slice(-2)?e.attr("name",e.attr("name")+"[]"):null),m._bindInput(),l.files&&m._append(!1,{files:l.files}),null!=l.afterRender&&"function"==typeof l.afterRender?l.afterRender(i,g,h,e):null},_clear:function(){m.files=null,e.prop("jFiler").files=null,l.uploadFile||l.addMore||m._reset(),m._set("feedback",m._itFl&&m._itFl.length>0?m._itFl.length+" "+l.captions.feedback2:l.captions.feedback),null!=l.onEmpty&&"function"==typeof l.onEmpty?l.onEmpty(g,h,e):null},_reset:function(b){if(!b){if(!l.uploadFile&&l.addMore){for(var c=0;c0&&h.find(".jFiler-input-caption span").html(b);break;case"props":e.prop("jFiler")||e.prop("jFiler",{options:l,listEl:i,boxEl:g,newInputEl:h,inputEl:e,files:m.files,files_list:m._itFl,current_file:m._itFc,append:function(a){return m._append(!1,{files:[a]})},remove:function(a){return m._remove(null,{binded:!0,data:{id:a}}),!0},reset:function(){return m._reset(),m._clear(),!0},retry:function(a){return m._retryUpload(a)}})}},_filesCheck:function(){var b=0;if(l.limit&&m.files.length+m._itFl.length>l.limit)return l.dialogs.alert(m._assets.textParse(l.captions.errors.filesLimit)),!1;for(var c=0;c1048576*l.maxSize||null!=l.fileMaxSize&&m.files[c].size>1048576*l.fileMaxSize)return l.dialogs.alert(m._assets.textParse(l.captions.errors.filesSize,f)),!1;if(4096==d.size&&0==d.type.length)return l.dialogs.alert(m._assets.textParse(l.captions.errors.folderUpload,f)),!1;if(null!=l.onFileCheck&&"function"==typeof l.onFileCheck?l.onFileCheck(f,l,m._assets.textParse)===!1:null)return!1;b+=m.files[c].size}if(null!=l.maxSize&&b>=Math.round(1048576*l.maxSize))return l.dialogs.alert(m._assets.textParse(l.captions.errors.filesSizeAll)),!1;if(l.addMore||l.uploadFile){var f=m._itFl.filter(function(a,b){if(a.file.name==d.name&&a.file.size==d.size&&a.file.type==d.type&&(!d.lastModified||a.file.lastModified==d.lastModified))return!0});if(f.length>0)return!1}return!0},_thumbCreator:{create:function(b){var c=m.files[b],d=m._itFc?m._itFc.id:b,e=c.name,f=c.size,g=c.file,h=c.type?c.type.split("/",1):"".toString().toLowerCase(),j=e.indexOf(".")!=-1?e.split(".").pop().toLowerCase():"",k=l.uploadFile?'
    '+l.templates.progressBar+"
    ":"",n={id:d,name:e,size:f,size2:m._assets.bytesToSize(f),url:g,type:h,extension:j,icon:m._assets.getIcon(j,h),icon2:m._thumbCreator.generateIcon({type:h,extension:j}),image:'
    ',progressBar:k,_appended:c._appended},o="";return c.opts&&(n=a.extend({},c.opts,n)),o=a(m._thumbCreator.renderContent(n)).attr("data-jfiler-index",d),o.get(0).jfiler_id=d,m._thumbCreator.renderFile(c,o,n),c.forList?o:(m._itFc.html=o,o.hide()[l.templates.itemAppendToEnd?"appendTo":"prependTo"](i.find(l.templates._selectors.list)).show(),void(c._appended||m._onSelect(b)))},renderContent:function(a){return m._assets.textParse(a._appended?l.templates.itemAppend:l.templates.item,a)},renderFile:function(b,c,d){if(0==c.find(".jFiler-item-thumb-image").length)return!1;if(b.file&&"image"==d.type){var e='',f=c.find(".jFiler-item-thumb-image.fi-loading");return a(e).error(function(){e=m._thumbCreator.generateIcon(d),c.addClass("jFiler-no-thumbnail"),f.removeClass("fi-loading").html(e)}).load(function(){f.removeClass("fi-loading").html(e)}),!0}if(window.File&&window.FileList&&window.FileReader&&"image"==d.type&&d.size<1e7){var g=new FileReader;g.onload=function(a){var b=c.find(".jFiler-item-thumb-image.fi-loading");if(l.templates.canvasImage){var e=document.createElement("canvas"),f=e.getContext("2d"),g=new Image;g.onload=function(){var a=b.height(),c=b.width(),d=g.height/a,h=g.width/c,i=de.width?-(g.width-e.width)/2:0,n=g.heighte.width?k-e.width:0,0,.5*o.width,.5*o.height,0,0,k,j)}b.removeClass("fi-loading").html('')},g.onerror=function(){c.addClass("jFiler-no-thumbnail"),b.removeClass("fi-loading").html(m._thumbCreator.generateIcon(d))},g.src=a.target.result}else b.removeClass("fi-loading").html('')},g.readAsDataURL(b)}else{var e=m._thumbCreator.generateIcon(d),f=c.find(".jFiler-item-thumb-image.fi-loading");c.addClass("jFiler-no-thumbnail"),f.removeClass("fi-loading").html(e)}},generateIcon:function(b){var c=new Array(3);if(b&&b.type&&b.type[0]&&b.extension)switch(b.type[0]){case"image":c[0]="f-image",c[1]='';break;case"video":c[0]="f-video",c[1]='';break;case"audio":c[0]="f-audio",c[1]='';break;default:c[0]="f-file f-file-ext-"+b.extension,c[1]=b.extension.length>0?"."+b.extension:"",c[2]=1}else c[0]="f-file",c[1]=b.extension&&b.extension.length>0?"."+b.extension:"",c[2]=1;var d=''+c[1]+"";if(1==c[2]){var e=m._assets.text2Color(b.extension);if(e){var f=a(d).appendTo("body");f.css("background-color",m._assets.text2Color(b.extension)),d=f.prop("outerHTML"),f.remove()}}return d},_box:function(b){if(null!=l.beforeShow&&"function"==typeof l.beforeShow&&!l.beforeShow(m.files,i,g,h,e))return!1;if(i.length<1){if(l.appendTo)var c=a(l.appendTo);else var c=g;c.find(".jFiler-items").remove(),i=a('
    '),e.prop("jFiler").listEl=i,i.append(m._assets.textParse(l.templates.box)).appendTo(c),i.on("click",l.templates._selectors.remove,function(c){c.preventDefault();var d=[b?b.remove.event:c,b?b.remove.el:a(this).closest(l.templates._selectors.item)],e=function(a){m._remove(d[0],d[1])};l.templates.removeConfirmation?l.dialogs.confirm(l.captions.removeConfirmation,e):e()})}for(var d=0;d=m.files.length&&(m._ajFc=0,e.get(0).value="",null!=l.uploadFile.onComplete&&"function"==typeof l.uploadFile.onComplete?l.uploadFile.onComplete(i,g,h,e,a,b):null)},beforeSend:function(a,c){return null==l.uploadFile.beforeSend||"function"!=typeof l.uploadFile.beforeSend||l.uploadFile.beforeSend(b,i,g,h,e,d.id,a,c)},success:function(a,c,f){d.uploaded=!0,null!=l.uploadFile.success&&"function"==typeof l.uploadFile.success?l.uploadFile.success(a,b,i,g,h,e,d.id,c,f):null},error:function(a,c,f){d.uploaded=!1,null!=l.uploadFile.error&&"function"==typeof l.uploadFile.error?l.uploadFile.error(b,i,g,h,e,d.id,a,c,f):null},statusCode:l.uploadFile.statusCode,cache:!1,contentType:!1,processData:!1}),d.ajax},progressHandling:function(a,b){if(a.lengthComputable){var c=Math.round(100*a.loaded/a.total).toString();null!=l.uploadFile.onProgress&&"function"==typeof l.uploadFile.onProgress?l.uploadFile.onProgress(c,b,i,g,h,e):null,b.find(".jFiler-jProgressBar").find(l.templates._selectors.progressBar).css("width",c+"%")}}},_dragDrop:{dragEnter:function(a){clearTimeout(m._dragDrop._drt),g.addClass("dragged"),m._set("feedback",l.captions.drop),null!=l.dragDrop.dragEnter&&"function"==typeof l.dragDrop.dragEnter?l.dragDrop.dragEnter(a,h,e,g):null},dragLeave:function(a){clearTimeout(m._dragDrop._drt),m._dragDrop._drt=setTimeout(function(a){return m._dragDrop._dragLeaveCheck(a)?(g.removeClass("dragged"),m._set("feedback",l.captions.feedback),void(null!=l.dragDrop.dragLeave&&"function"==typeof l.dragDrop.dragLeave?l.dragDrop.dragLeave(a,h,e,g):null)):(m._dragDrop.dragLeave(a),!1)},100,a)},drop:function(a){clearTimeout(m._dragDrop._drt),g.removeClass("dragged"),m._set("feedback",l.captions.feedback),a&&a.originalEvent&&a.originalEvent.dataTransfer&&a.originalEvent.dataTransfer.files&&a.originalEvent.dataTransfer.files.length>0&&m._onChange(a,a.originalEvent.dataTransfer.files),null!=l.dragDrop.drop&&"function"==typeof l.dragDrop.drop?l.dragDrop.drop(a.originalEvent.dataTransfer.files,a,h,e,g):null},_dragLeaveCheck:function(b){var c=a(b.currentTarget),d=0;return!(!c.is(h)&&(d=h.find(c).length,d>0))}},_clipboardPaste:function(a,b){if((b||a.originalEvent.clipboardData||a.originalEvent.clipboardData.items)&&(!b||a.originalEvent.dataTransfer||a.originalEvent.dataTransfer.items)&&!m._clPsePre){var c=b?a.originalEvent.dataTransfer.items:a.originalEvent.clipboardData.items,d=function(a,b,c){b=b||"",c=c||512;for(var d=atob(a),e=[],f=0;f=m.files.length&&(null!=l.afterShow&&"function"==typeof l.afterShow?l.afterShow(i,g,h,e):null)},_onChange:function(b,c){if(c){if(!c||0==c.length)return m._set("input",""),m._clear(),!1;m.files=c}else{if(!e.get(0).files||"undefined"==typeof e.get(0).files||0==e.get(0).files.length)return l.uploadFile||l.addMore||(m._set("input",""),m._clear()),!1;m.files=e.get(0).files}if(l.uploadFile||l.addMore||m._reset(!0),e.prop("jFiler").files=m.files,!m._filesCheck()||null!=l.beforeSelect&&"function"==typeof l.beforeSelect&&!l.beforeSelect(m.files,i,g,h,e))return m._set("input",""),m._clear(),!1;if(m._set("feedback",m.files.length+m._itFl.length+" "+l.captions.feedback2),l.showThumbs)m._thumbCreator._box();else for(var d=0;d'),k=e.prop("attributes");a.each(k,function(){f.attr(this.name,this.value)}),e.after(f),m._unbindInput(),j.push(f),e=f,m._bindInput(),m._set("props")}},_append:function(a,b){var c=!!b&&b.files;if(c&&!(c.length<=0)&&(m.files=c,e.prop("jFiler").files=m.files,l.showThumbs)){for(var d=0;d0&&(!l.uploadFile||a.isEmptyObject(l.uploadFile)||f[0].uploaded?void 0:(m._itFc=f[0],e.prop("jFiler").current_file=m._itFc,m._upload(d),!0))},_remove:function(b,d){if(d.binded){if("undefined"!=typeof d.data.id&&(d=i.find(l.templates._selectors.item+"[data-jfiler-index='"+d.data.id+"']"),0==d.length))return!1;d.data.el&&(d=d.data.el)}var f=d.get(0).jfiler_id||d.attr("data-jfiler-index"),j=null,k=function(b){var d=g.find("input[name^='jfiler-items-exclude-']:hidden").first(),f=m._itFl[b],h=[];if(0==d.length&&(d=a(''),d.appendTo(g)),f.file._choosed||f.file._appended||f.uploaded){m._prEr=!0,m._itFr.push(f);for(var i=0;i-1?'':''},textParse:function(b,c){switch(c=a.extend({},{limit:l.limit,maxSize:l.maxSize,fileMaxSize:l.fileMaxSize,extensions:l.extensions?l.extensions.join(","):null},c&&a.isPlainObject(c)?c:{},l.options),typeof b){case"string":return b.replace(/\{\{fi-(.*?)\}\}/g,function(a,b){return b=b.replace(/ /g,""),b.match(/(.*?)\|limitTo\:(\d+)/)?b.replace(/(.*?)\|limitTo\:(\d+)/,function(a,b,d){var b=c[b]?c[b]:"",e=b.substring(0,d);return e=b.length>e.length?e.substring(0,e.length-3)+"...":e}):c[b]?c[b]:""});case"function":return b(c);default:return b}},text2Color:function(a){if(!a||0==a.length)return!1;for(var b=0,c=0;b>2*b++&255).toString(16)).slice(-2));return d}},files:null,_itFl:[],_itFc:null,_itFr:[],_itPl:[],_ajFc:0,_prEr:!1};return e.on("filer.append",function(a,b){m._append(a,b)}).on("filer.remove",function(a,b){b.binded=!0,m._remove(a,b)}).on("filer.reset",function(a){return m._reset(),m._clear(),!0}).on("filer.generateList",function(a,b){return m._getList(a,b)}).on("filer.retry",function(a,b){return m._retryUpload(a,b)}),m.init(),this})},a.fn.filer.defaults={limit:null,maxSize:null,fileMaxSize:null,extensions:null,changeInput:!0,showThumbs:!1,appendTo:null,theme:"default",templates:{box:'
      ',item:'
    • {{fi-icon}}
      {{fi-name | limitTo:30}}
      size: {{fi-size2}}type: {{fi-extension}}{{fi-progressBar}}
    • ',itemAppend:'
    • {{fi-icon}}
      {{fi-name | limitTo:35}}
      size: {{fi-size2}}type: {{fi-extension}}
    • ',progressBar:'
      ',itemAppendToEnd:!1,removeConfirmation:!0,canvasImage:!0,_selectors:{list:".jFiler-items-list",item:".jFiler-item",progressBar:".bar",remove:".jFiler-item-trash-action"}},files:null,uploadFile:null,dragDrop:null,addMore:!1,clipBoardPaste:!0,excludeName:null,beforeRender:null,afterRender:null,beforeShow:null,beforeSelect:null,onSelect:null,onFileCheck:null,afterShow:null,onRemove:null,onEmpty:null,options:null,dialogs:{alert:function(a){return alert(a)},confirm:function(a,b){confirm(a)?b():null}},captions:{button:"Choose Files",feedback:"Choose files To Upload",feedback2:"files were chosen",drop:"Drop file here to Upload",removeConfirmation:"Are you sure you want to remove this file?",errors:{filesLimit:"Only {{fi-limit}} files are allowed to be uploaded.",filesType:"Only Images are allowed to be uploaded.",filesSize:"{{fi-name}} is too large! Please upload file up to {{fi-fileMaxSize}} MB.",filesSizeAll:"Files you've choosed are too large! Please upload files up to {{fi-maxSize}} MB.",folderUpload:"You are not allowed to upload folders."}}}}(jQuery); 9 | -------------------------------------------------------------------------------- /assets/js/listr.pack.js: -------------------------------------------------------------------------------- 1 | !function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/[&<>]/gm,function(e){return z[e]})}function r(e){return e.nodeName.toLowerCase()}function i(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return _.test(e)}function a(e){var t,r,i,a,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",r=C.exec(o))return w(r[1])?r[1]:"no-highlight";for(o=o.split(/\s+/),t=0,i=o.length;i>t;t++)if(a=o[t],n(a)||w(a))return a}function o(e,t){var r,i={};for(r in e)i[r]=e[r];if(t)for(r in t)i[r]=t[r];return i}function s(e){var t=[];return function e(i,n){for(var a=i.firstChild;a;a=a.nextSibling)3===a.nodeType?n+=a.nodeValue.length:1===a.nodeType&&(t.push({event:"start",offset:n,node:a}),n=e(a,n),r(a).match(/br|hr|img|input/)||t.push({event:"stop",offset:n,node:a}));return n}(e,0),t}function l(e,i,n){function a(){return e.length&&i.length?e[0].offset!==i[0].offset?e[0].offset"}function s(e){d+=""}function l(e){("start"===e.event?o:s)(e.node)}for(var c=0,d="",u=[];e.length||i.length;){var b=a();if(d+=t(n.substr(c,b[0].offset-c)),c=b[0].offset,b===e){u.reverse().forEach(s);do l(b.splice(0,1)[0]),b=a();while(b===e&&b.length&&b[0].offset===c);u.reverse().forEach(o)}else"start"===b[0].event?u.push(b[0].node):u.pop(),l(b.splice(0,1)[0])}return d+t(n.substr(c))}function c(e){function t(e){return e&&e.source||e}function r(r,i){return new RegExp(t(r),"m"+(e.cI?"i":"")+(i?"g":""))}function i(n,a){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var s={},l=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");s[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof n.k?l("keyword",n.k):M(n.k).forEach(function(e){l(e,n.k[e])}),n.k=s}n.lR=r(n.l||/\w+/,!0),a&&(n.bK&&(n.b="\\b("+n.bK.split(" ").join("|")+")\\b"),n.b||(n.b=/\B|\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||"",n.eW&&a.tE&&(n.tE+=(n.e?"|":"")+a.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]);var c=[];n.c.forEach(function(e){e.v?e.v.forEach(function(t){c.push(o(e,t))}):c.push("self"===e?n:e)}),n.c=c,n.c.forEach(function(e){i(e,n)}),n.starts&&i(n.starts,a);var d=n.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=d.length?r(d.join("|"),!0):{exec:function(){return null}}}}i(e)}function d(e,r,n,a){function o(e,t){for(var r=0;r',a+t+o}function f(){var e,r,i,n;if(!M.k)return t(C);for(n="",r=0,M.lR.lastIndex=0,i=M.lR.exec(C);i;)n+=t(C.substr(r,i.index-r)),e=b(M,i),e?($+=e[1],n+=p(e[0],t(i[0]))):n+=t(i[0]),r=M.lR.lastIndex,i=M.lR.exec(C);return n+t(C.substr(r))}function m(){var e="string"==typeof M.sL;if(e&&!k[M.sL])return t(C);var r=e?d(M.sL,C,!0,x[M.sL]):u(C,M.sL.length?M.sL:void 0);return M.r>0&&($+=r.r),e&&(x[M.sL]=r.top),p(r.language,r.value,!1,!0)}function h(){_+=null!=M.sL?m():f(),C=""}function g(e){_+=e.cN?p(e.cN,"",!0):"",M=Object.create(e,{parent:{value:M}})}function v(e,t){if(C+=e,null==t)return h(),0;var r=o(t,M);if(r)return r.skip?C+=t:(r.eB&&(C+=t),h(),r.rB||r.eB||(C=t)),g(r,t),r.rB?0:t.length;var i=s(M,t);if(i){var n=M;n.skip?C+=t:(n.rE||n.eE||(C+=t),h(),n.eE&&(C=t));do M.cN&&(_+=E),M.skip||($+=M.r),M=M.parent;while(M!==i.parent);return i.starts&&g(i.starts,""),n.rE?0:t.length}if(l(t,M))throw new Error('Illegal lexeme "'+t+'" for mode "'+(M.cN||"")+'"');return C+=t,t.length||1}var y=w(e);if(!y)throw new Error('Unknown language: "'+e+'"');c(y);var N,M=a||y,x={},_="";for(N=M;N!==y;N=N.parent)N.cN&&(_=p(N.cN,"",!0)+_);var C="",$=0;try{for(var z,A,B=0;M.t.lastIndex=B,z=M.t.exec(r);)A=v(r.substr(B,z.index-B),z[0]),B=z.index+A;for(v(r.substr(B)),N=M;N.parent;N=N.parent)N.cN&&(_+=E);return{r:$,value:_,language:e,top:M}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{r:0,value:t(r)};throw e}}function u(e,r){r=r||S.languages||M(k);var i={r:0,value:t(e)},n=i;return r.filter(w).forEach(function(t){var r=d(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>i.r&&(n=i,i=r)}),n.language&&(i.second_best=n),i}function b(e){return S.tabReplace||S.useBR?e.replace($,function(e,t){return S.useBR&&"\n"===e?"
      ":S.tabReplace?t.replace(/\t/g,S.tabReplace):void 0}):e}function p(e,t,r){var i=t?x[t]:r,n=[e.trim()];return e.match(/\bhljs\b/)||n.push("hljs"),-1===e.indexOf(i)&&n.push(i),n.join(" ").trim()}function f(e){var t,r,i,o,c,f=a(e);n(f)||(S.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,c=t.textContent,i=f?d(f,c,!0):u(c),r=s(t),r.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=i.value,i.value=l(r,s(o),c)),i.value=b(i.value),e.innerHTML=i.value,e.className=p(e.className,f,i.language),e.result={language:i.language,re:i.r},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.r}))}function m(e){S=o(S,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");N.forEach.call(e,f)}}function g(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function v(t,r){var i=k[t]=r(e);i.aliases&&i.aliases.forEach(function(e){x[e]=t})}function y(){return M(k)}function w(e){return e=(e||"").toLowerCase(),k[e]||k[x[e]]}var N=[],M=Object.keys,k={},x={},_=/^(no-?highlight|plain|text)$/i,C=/\blang(?:uage)?-([\w-]+)\b/i,$=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,E="",S={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},z={"&":"&","<":"<",">":">"};return e.highlight=d,e.highlightAuto=u,e.fixMarkup=b,e.highlightBlock=f,e.configure=m,e.initHighlighting=h,e.initHighlightingOnLoad=g,e.registerLanguage=v,e.listLanguages=y,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(t,r,i){var n=e.inherit({cN:"comment",b:t,e:r,c:[]},i||{});return n.c.push(e.PWM),n.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),n},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),r={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},i=e.C("--","$"),n=e.C("\\(\\*","\\*\\)",{c:["self",i]}),a=[i,n,e.HCM];return{aliases:["osascript"],k:{keyword:"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|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"built_in",b:"\\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"},{cN:"literal",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\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)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{bK:"on",i:"[${=;\\n]",c:[e.UTM,r]}].concat(a),i:"//|->|=>|\\[\\["}}),e.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},i={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,r,i,t]}}),e.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",i={cN:"subst",b:/#\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,i]},{b:/"/,e:/"/,c:[e.BE,i]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[i,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+r},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];i.c=n;var a=e.inherit(e.TM,{b:r}),o="(\\(.*\\))?\\s*\\B[-=]>",s={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(n)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:n.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+o,e:"[-=]>",rB:!0,c:[a,s]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:o,e:"[-=]>",rB:!0,c:[s]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[a]},a]},{b:r+":",e:":",rB:!0,rE:!0,r:0}])}}),e.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:t,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}}),e.registerLanguage("dos",function(e){var t=e.C(/^\s*@?rem\b/,/$/,{r:10}),r={cN:"symbol",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0};return{aliases:["bat","cmd"],cI:!0,i:/\/\*/,k:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},c:[{cN:"variable",b:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{cN:"function",b:r.b,e:"goto:eof",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{cN:"number",b:"\\b\\d+",r:0},t]}}),e.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},i={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},a=[e.C("#","$",{c:[i]}),e.C("^\\=begin","^\\=end",{c:[i],r:10}),e.C("^__END__","\\n$")],o={cN:"subst",b:"#\\{",e:"}",k:r},s={cN:"string",c:[e.BE,o],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},l={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},c=[s,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(a)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),l].concat(a)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[s,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+")\\s*",c:[n,{cN:"regexp",c:[e.BE,o],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(a),r:0}].concat(a);o.c=c,l.c=c;var d="[>?]>",u="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:c}},{cN:"meta",b:"^("+d+"|"+u+"|"+b+")",starts:{e:"$",c:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:a.concat(p).concat(c)}}),e.registerLanguage("haml",function(e){return{cI:!0,c:[{cN:"meta",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},e.C("^\\s*(!=#|=#|-#|/).*$",!1,{r:0}),{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"selector-tag",b:"\\w+"},{cN:"selector-id",b:"#[\\w-]+"},{cN:"selector-class",b:"\\.[\\w-]+"},{b:"{\\s*",e:"\\s*}",c:[{b:":\\w+\\s*=>",e:",\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:":\\w+"},e.ASM,e.QSM,{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:!0,c:[{b:"\\w+\\s*=",e:"\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:"\\w+",r:0},e.ASM,e.QSM,{b:"\\w+",r:0}]}]}]},{b:"^\\s*[=~]\\s*"},{b:"#{",starts:{e:"}",sL:"ruby"}}]}}),e.registerLanguage("javascript",function(e){return{aliases:["js","jsx"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:["self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}),e.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],i={e:",",eW:!0,eE:!0,c:r,k:t},n={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(i,{b:/:/})],i:"\\S"},a={b:"\\[",e:"\\]",c:[e.inherit(i)],i:"\\S"};return r.splice(r.length,0,n,a),{c:r,k:t,i:"\\S"}}),e.registerLanguage("less",function(e){var t="[\\w-]+",r="("+t+"|@{"+t+"})",i=[],n=[],a=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},o=function(e,t,r){return{cN:e,b:t,r:r}},s={b:"\\(",e:"\\)",c:n,r:0};n.push(e.CLCM,e.CBCM,a("'"),a('"'),e.CSSNM,{b:"(url|data-uri)\\(",starts:{cN:"string",e:"[\\)\\n]",eE:!0}},o("number","#[0-9A-Fa-f]+\\b"),s,o("variable","@@?"+t,10),o("variable","@{"+t+"}"),o("built_in","~?`[^`]*?`"),{cN:"attribute",b:t+"\\s*:",e:":",rB:!0,eE:!0},{cN:"meta",b:"!important"});var l=n.concat({b:"{",e:"}",c:i}),c={bK:"when",eW:!0,c:[{bK:"and not"}].concat(n)},d={b:r+"\\s*:",rB:!0,e:"[;}]",r:0,c:[{cN:"attribute",b:r,e:":",eE:!0,starts:{eW:!0,i:"[<=$]",r:0,c:n}}]},u={cN:"keyword",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:n,r:0}},b={cN:"variable",v:[{b:"@"+t+"\\s*:",r:15},{b:"@"+t}],starts:{e:"[;}]",rE:!0,c:l}},p={v:[{b:"[\\.#:&\\[>]",e:"[;{}]"},{b:r+"[^;]*{",e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",c:[e.CLCM,e.CBCM,c,o("keyword","all\\b"),o("variable","@{"+t+"}"),o("selector-tag",r+"%?",0),o("selector-id","#"+r),o("selector-class","\\."+r,0),o("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"\\(",e:"\\)",c:l},{b:"!important"}]};return i.push(e.CLCM,e.CBCM,u,b,d,p),{cI:!0,i:"[=>'/<($\"]",c:i}}),e.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[r],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}}),e.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},i={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},a=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),i,{cN:"string",c:a,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,i.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}}),e.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"meta",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[r]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},r,{cN:"keyword",b:/\$this\b/},t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,i,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,n]}}),e.registerLanguage("python",function(e){var t={cN:"meta",b:/^(>>>|\.\.\.) /},r={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},i={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},n={cN:"params",b:/\(/,e:/\)/,c:["self",t,i,r]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,i,r,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,n,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),e.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"variable",b:"(\\$"+t+")\\b"},i={cN:"number",b:"#[0-9A-Fa-f]+"};return{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[i,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}},{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},r,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" 2 | },{b:":",e:";",c:[r,i,e.CSSNM,e.QSM,e.ASM,{cN:"meta",b:"!important"}]},{b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[r,e.QSM,e.ASM,i,e.CSSNM,{b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}}),e.registerLanguage("typescript",function(e){var t={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],k:t,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:t,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/%/,r:0},{bK:"constructor",e:/\{/,eE:!0},{b:/module\./,k:{built_in:"module"},r:0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}}),e.registerLanguage("yaml",function(e){var t={literal:"{ } true false yes no Yes No True False null"},r="^[ \\-]*",i="[a-zA-Z_][\\w\\-]*",n={cN:"attr",v:[{b:r+i+":"},{b:r+'"'+i+'":'},{b:r+"'"+i+"':"}]},a={cN:"template-variable",v:[{b:"{{",e:"}}"},{b:"%{",e:"}"}]},o={cN:"string",r:0,v:[{b:/'/,e:/'/},{b:/"/,e:/"/}],c:[e.BE,a]};return{cI:!0,aliases:["yml","YAML","yaml"],c:[n,{cN:"meta",b:"^---s*$",r:10},{cN:"string",b:"[\\|>] *$",rE:!0,c:o.c,e:n.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},o,e.HCM,e.CNM],k:t}}),e}),function(){"use strict";function e(e){function t(t,r){this.element=t,this.options=e.extend({},a,r),this._create()}function r(e){return e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}var i="searcher",n="plugin_"+i,a={itemSelector:"tbody > tr",textSelector:"td",inputSelector:"",caseSensitive:!1,toggle:function(t,r){e(t).toggle(r)}};t.prototype={dispose:function(){this._$input.unbind("."+i);var e=this.options,t=e.toggle||a.toggle;this._$element.find(e.itemSelector).each(function(){t(this,!0)})},filter:function(t){this._lastValue=t;var i=this.options,n=i.textSelector,o=i.toggle||a.toggle,s="gm"+(i.caseSensitive?"":"i"),l=new RegExp("("+r(t)+")",s);this._$element.find(i.itemSelector).each(function(){var t=e(this),r=n?t.find(n):t,i=!1;r=r.each(function(){return i=i||!!e(this).text().match(l),!i}),o(this,i)})},_create:function(){var t=this.options;this._$element=e(this.element),this._fn=e.proxy(this._onValueChange,this);var r="input."+i+" change."+i+" keyup."+i;this._$input=e(t.inputSelector).bind(r,this._fn),this._lastValue=null;var n=t.toggle||a.toggle;this._$element.find(t.itemSelector).each(function(){n(this,!0)})},_onValueChange:function(){var e=this._$input.val();e!==this._lastValue&&this.filter(e)}},e.fn[i]=function(r){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.data(this,n),o=typeof r;"string"===o&&a?(a[r].apply(a,i),"dispose"===r&&e.removeData(this,n)):"object"===o&&(a?e.extend(a.options,r):e.data(this,n,new t(this,r)))})}}"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}.call(this),function(e){e.fn.stupidtable=function(t){return this.each(function(){var r=e(this);t=t||{},t=e.extend({},e.fn.stupidtable.default_sort_fns,t),r.data("sortFns",t),r.on("click.stupidtable","thead th",function(){e(this).stupidsort()})})},e.fn.stupidsort=function(t){var r=e(this),i=0,n=e.fn.stupidtable.dir,a=r.closest("table"),o=r.data("sort")||null;if(null!==o){r.parents("tr").find("th").slice(0,e(this).index()).each(function(){var t=e(this).attr("colspan")||1;i+=parseInt(t,10)});var s;return 1==arguments.length?s=t:(s=t||r.data("sort-default")||n.ASC,r.data("sort-dir")&&(s=r.data("sort-dir")===n.ASC?n.DESC:n.ASC)),a.trigger("beforetablesort",{column:i,direction:s}),a.css("display"),setTimeout(function(){var t=[],l=a.data("sortFns")[o],c=a.children("tbody").children("tr");c.each(function(r,n){var a=e(n).children().eq(i),o=a.data("sort-value");"undefined"==typeof o&&(o=a.text(),a.data("sort-value",o)),t.push([o,n])}),t.sort(function(e,t){return l(e[0],t[0])}),s!=n.ASC&&t.reverse(),c=e.map(t,function(e){return e[1]}),a.children("tbody").append(c),a.find("th").data("sort-dir",null).removeClass("sorting-desc sorting-asc"),r.data("sort-dir",s).addClass("sorting-"+s),a.trigger("aftertablesort",{column:i,direction:s}),a.css("display")},10),r}},e.fn.updateSortVal=function(t){var r=e(this);return r.is("[data-sort-value]")&&r.attr("data-sort-value",t),r.data("sort-value",t),r},e.fn.stupidtable.dir={ASC:"asc",DESC:"desc"},e.fn.stupidtable.default_sort_fns={int:function(e,t){return parseInt(e,10)-parseInt(t,10)},float:function(e,t){return parseFloat(e)-parseFloat(t)},string:function(e,t){return e.localeCompare(t)},"string-ins":function(e,t){return e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase(),e.localeCompare(t)}}}(jQuery);var column=$("#file-count").index(),striped_bg=$(".table-striped > tbody > tr:nth-of-type(odd)").css("background-color"),hover_bg,stripedRows=function(){$("#listr-table").has(".table-striped")&&($("tbody tr").css("background-color","inherit"),$("tbody tr:not(.hidden-xs-up):even").css("background-color",striped_bg))};stripedRows(),$(".table-hover>tbody>tr").bind({mouseenter:function(e){hover_bg||($(this).removeAttr("style"),hover_bg=$(this).css("background-color")),$(this).css("background-color",hover_bg)},mouseleave:function(e){stripedRows()}});var decodeFile=function(e){try{return decodeURIComponent(e)}catch(t){return e}};"undefined"!=typeof Dropbox&&$(".save-dropbox").click(function(e){e.preventDefault();var t=$(this).get(0).href;Dropbox.save(t)});var K,Keyboard={elements:{hidden:$("tr.hidden-xs-up"),keyboard:$("#viewer-modal"),search:$("#listr-search"),viewer:$("#viewer-modal")},init:function(){K=this.elements,this.events()},events:function(){$(document).bind("keydown",function(e){Keyboard.revealFiles()}).bind("keyup",function(){Keyboard.hideFiles()}),$(document).bind("keyup",function(e){Keyboard.playerControls()}),$(document).bind("keyup",function(e){Keyboard.focusSearch()})},revealFiles:function(){event.altKey&&($(K.hidden).addClass("reveal").removeClass("hidden-xs-up"),stripedRows())},hideFiles:function(){$(K.hidden).removeClass("reveal").addClass("hidden-xs-up"),stripedRows()},focusSearch:function(){K.viewer.hasClass("in")||70===event.which&&($(K.search).focus(),$(document).scrollTop(0))},playerControls:function(){K.viewer.hasClass("in")&&"undefined"!=typeof player&&(70===event.which&&(player.requestFullscreen?player.requestFullscreen():player.msRequestFullscreen?player.msRequestFullscreen():player.mozRequestFullScreen?player.mozRequestFullScreen():player.webkitRequestFullscreen&&player.webkitRequestFullscreen()),32===event.which&&(event.preventDefault(),player.paused===!1?player.pause():player.play()),playerEnd=player.seekable.end(0),37===event.which&&player.currentTime>=1&&(player.currentTime-=1),39===event.which&&player.currentTime<=playerEnd-1&&(player.currentTime+=1),37===event.which&&event.shiftKey&&(player.currentTime=0),38===event.which&&player.volume<1&&(player.volume+=.1),38===event.which&&event.shiftKey&&(player.volume=1),40===event.which&&player.volume>0&&(player.volume-=.1),40===event.which&&event.shiftKey&&(player.volume=0))}},M,Modal={elements:{viewer:$("#viewer-modal"),modal_body:$(".modal-body"),modal_title:$(".modal-title"),file_meta:$("#file-meta"),full_view:$(".fullview"),button:$(".fullview").data("button"),dropbox:$(".save-dropbox"),email:$(".email-link"),twitter:$(".twitter-link"),facebook:$(".facebook-link"),google:$(".google-link")},init:function(){M=this.elements,this.events()},events:function(){$("#viewer-modal").on("show.bs.modal",function(e){var t=$(e.relatedTarget),r=t.data("type");"text"===r?Modal.setTextModal(t):"source"===r?Modal.setSourceModal(t):"audio"===r?Modal.setAudioModal(t):"video"===r?Modal.setVideoModal(t):"image"===r?Modal.setImageModal(t):"website"===r?Modal.setWebModal(t):"pdf"===r?Modal.setPdfModal(t):"virtual"===r?Modal.setVirtualModal(t):"flash"===r?Modal.setFlashModal(t):"quicktime"===r&&Modal.setQuicktimeModal(t)}),$(M.viewer).on("hide.bs.modal",function(){Modal.stopPlayer()}),$(M.viewer).on("hidden.bs.modal",function(){Modal.reset()})},setAudioModal:function(e){var t={open:null,close:null,file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(M.modal_body.html(''),Modal.setMeta(t),M.viewer.modal("show"))},setVideoModal:function(e){var t={open:null,close:null,file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(M.modal_body.html(''),Modal.setMeta(t),M.viewer.modal("show"))},setImageModal:function(e){var t={open:null,close:null,file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(M.modal_body.html(''),Modal.setMeta(t),M.viewer.modal("show"))},setWebModal:function(e){var t={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(t.html='',M.modal_body.html(t.open+t.html+t.close),Modal.setMeta(t),M.viewer.modal("show"))},setPdfModal:function(e){var t={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(t.html='',M.modal_body.html(t.open+t.html+t.close),Modal.setMeta(t),M.viewer.modal("show"))},setFlashModal:function(e){var t={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&(t.html='',M.modal_body.html(t.open+t.html+t.close),Modal.setMeta(t),M.viewer.modal("show"))},setQuicktimeModal:function(e){var t={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.html='',close:"",file:e.attr("href"),uri:e.data("url"),size:e.data("url"),id:e.data("id")};t.file.endsWith(".soundcloud")?(t.open='
      ',t.html=''):t.file.endsWith(".flickr")?(t.open='
      ',t.html=''):t.file.endsWith("vimeo")?(t.open='
      ',t.html=''):t.file.endsWith("youtube")&&(t.open='
      ',t.html=''),M.modal_body.html(t.open+t.html+t.close),Modal.setMeta(t),M.viewer.modal("show")},setTextModal:function(e){var t={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size")};t.file&&$.ajax(t.file,{dataType:"text",success:function(e){M.modal_body.html(t.open,t.close),$("#text").text(decodeFile(e)),Modal.setMeta(t)}}).done(function(){$(M.viewer).modal("show")})},setSourceModal:function(e){var t=e.attr("href")[0].split(".").pop(),r={open:'
      ',close:"
      ",file:e.attr("href"),uri:e.get(0).href,size:e.data("size"),highlight:e.data("highlight")};r.file&&$.ajax(r.file,{dataType:"text",success:function(e){M.modal_body.html(r.open,r.close),$("#source").text(decodeFile(e)),Modal.setMeta(r),$("#source").each(function(e,t){"undefined"!=typeof hljs&&hljs.highlightBlock(t);var r=$("code").css("background-color");$("pre").css("background-color",r)})}}).done(function(){M.viewer.modal("show")})},setMeta:function(e){M.full_view.attr("href",e.file),M.modal_title.text(decodeFile(e.file)),meta="undefined"!=typeof e.size?e.size:null,M.file_meta.text(meta),M.dropbox.attr("href",e.file),M.email.attr("href","mailto:?body="+e.uri),M.twitter.attr("href","http://twitter.com/share?url="+e.uri),M.facebook.attr("href","http://www.facebook.com/sharer/sharer.php?u="+e.uri),M.google.attr("href","https://plus.google.com/share?url="+e.uri)},stopPlayer:function(){var e=document.getElementById("player");e&&(e.pause(),e.src="")},reset:function(){$(".highlight").addClass("hidden-xs-up"),M.modal_body.empty()}},S,Search={elements:{input:$("#listr-search"),table:$("#listr-table")},init:function(){S=this.elements,this.events(),$(S.table).searcher({inputSelector:"#listr-search"})},events:function(){$(S.input).keyup(function(e){Search.clearInput()})},clearInput:function(){27==event.keyCode&&(""===S.input.val()?S.input.blur():S.input.val(""))}};if(jQuery().stupidtable)var table=$("#listr-table").stupidtable();$(function(){Keyboard.init(),Modal.init(),jQuery().searcher&&Search.init()}); -------------------------------------------------------------------------------- /assets/js/tether.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),o={};for(var n in e)o[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=i(r);o.top+=s.top,o.bottom+=s.top,o.left+=s.left,o.right+=s.left}}return o}function r(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function s(){A&&document.body.removeChild(A),A=null}function a(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n=i(t),r=P();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function f(t){return t.offsetParent||document.documentElement}function l(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");h(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return{width:i,height:i}}function h(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function u(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=c(t).replace(o," ");g(t,n)}}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{u(t,e);var o=c(t)+(" "+e);g(t,o)}}function p(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function g(t,e){t.setAttribute("class",e)}function m(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&p(t,o)&&u(t,o)}),e.forEach(function(e){p(t,e)||d(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function C(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function O(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=a(e),n=o,i=getComputedStyle(e);if(e=[n.left,n.top,o.width+n.left,o.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}$.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var E=function(){function t(t,e){for(var o=0;o1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&b()-t<10||(null!=o&&(clearTimeout(o),o=null),t=b(),D(),e=b()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var X={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=X[e.left]),"auto"===n&&(n=F[e.top]),{left:o,top:n}},U=function(t){var e=t.left,o=t.top;return"undefined"!=typeof H[t.left]&&(e=H[t.left]),"undefined"!=typeof H[t.top]&&(o=H[t.top]),{left:e,top:o}},V=function(t){var e=t.split(" "),o=B(e,2),n=o[0],i=o[1];return{top:n,left:i}},R=V,q=function(t){function e(t){var o=this;n(this,e),z(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return v(e,t),E(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=h(n,t);var i=this.options,s=i.element,a=i.target,f=i.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=R(this.options.targetAttachment),this.attachment=R(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return a(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=a(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>s&&this.target===document.body&&(f=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-s);return e.top=l*(s-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,o){e===t&&L.splice(o,1)}),0===L.length&&s()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),M(function(){"undefined"!=typeof o._addAttachClasses&&(m(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&m(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return a(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var s=this.lastSize;i=s.width,r=s.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),u=h,d=C(U(this.attachment),{width:i,height:r}),p=C(U(o),u),c=C(this.offset,{width:i,height:r}),g=C(this.targetOffset,u);d=w(d,c),p=w(p,g);for(var m=h.left+p.left-d.left,v=h.top+p.top-d.top,y=0;yT.innerWidth&&(S=this.cache("scrollbar-size",l),E.viewport.bottom-=S.height),A.body.scrollHeight>T.innerHeight&&(S=this.cache("scrollbar-size",l),E.viewport.right-=S.width),(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position))&&(E.page.bottom=A.body.scrollHeight-v-r,E.page.right=A.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return f(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return a(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-i.width+r.right,o.bottom=A.body.scrollHeight-o.top-i.height+r.bottom,E.page.top>=o.top+r.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+r.left&&E.page.right>=o.right){var s=e.scrollTop,l=e.scrollLeft;E.offset={top:E.page.top-o.top+s-r.top,left:E.page.left-o.left+l-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),e&&_(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s=0){var c=a.split(" "),m=B(c,2);u=m[0],h=m[1]}else h=u=a;var b=O(e,r);("target"===u||"both"===u)&&(ob[3]&&"bottom"===v.top&&(o-=d,v.top="top")),"together"===u&&("top"===v.top&&("bottom"===y.top&&ob[3]&&o-(s-d)>=b[1]&&(o-=s-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+s>b[3]?(o-=d,v.top="top",o-=s,y.top="bottom"):"bottom"===y.top&&ob[3]&&"top"===y.top?(o-=s,y.top="bottom"):ob[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(nb[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):nb[3]&&"top"===y.top&&(o-=s,y.top="bottom")),("element"===h||"both"===h)&&(nb[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],C=[];o=0?(o=b[1],w.push("top")):C.push("top")),o+s>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-s,w.push("bottom")):C.push("bottom")),n=0?(n=b[0],w.push("left")):C.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):C.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),g.push(t),w.forEach(function(e){g.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),g.push(t),C.forEach(function(e){g.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,g,c),m(e.element,g,c)}),{top:o,left:n}}});var j=x.Utils,a=j.getBounds,m=j.updateClasses,M=j.defer;x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return a(e.element)}),r=i.height,s=i.width,f=this.getTargetBounds(),l=o+r,h=n+s,u=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&u.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&u.push(t)});var d=[],p=[],c=["left","top","right","bottom"];return d.push(this.getClass("abutted")),c.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&p.push(this.getClass("abutted")),u.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,p,d),m(e.element,p,d)}),!0}});var B=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=B(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),I}); -------------------------------------------------------------------------------- /file_server.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, make_response, request, session, render_template, send_file, Response 2 | from flask.views import MethodView 3 | from werkzeug import secure_filename 4 | from datetime import datetime 5 | import humanize 6 | import os 7 | import re 8 | import stat 9 | import json 10 | import mimetypes 11 | import sys 12 | from pathlib2 import Path 13 | 14 | app = Flask(__name__, static_url_path='/assets', static_folder='assets') 15 | root = os.path.normpath("/tmp") 16 | key = "" 17 | 18 | ignored = ['.bzr', '$RECYCLE.BIN', '.DAV', '.DS_Store', '.git', '.hg', '.htaccess', '.htpasswd', '.Spotlight-V100', '.svn', '__MACOSX', 'ehthumbs.db', 'robots.txt', 'Thumbs.db', 'thumbs.tps'] 19 | datatypes = {'audio': 'm4a,mp3,oga,ogg,webma,wav', 'archive': '7z,zip,rar,gz,tar', 'image': 'gif,ico,jpe,jpeg,jpg,png,svg,webp', 'pdf': 'pdf', 'quicktime': '3g2,3gp,3gp2,3gpp,mov,qt', 'source': 'atom,bat,bash,c,cmd,coffee,css,hml,js,json,java,less,markdown,md,php,pl,py,rb,rss,sass,scpt,swift,scss,sh,xml,yml,plist', 'text': 'txt', 'video': 'mp4,m4v,ogv,webm', 'website': 'htm,html,mhtm,mhtml,xhtm,xhtml'} 20 | icontypes = {'fa-music': 'm4a,mp3,oga,ogg,webma,wav', 'fa-archive': '7z,zip,rar,gz,tar', 'fa-picture-o': 'gif,ico,jpe,jpeg,jpg,png,svg,webp', 'fa-file-text': 'pdf', 'fa-film': '3g2,3gp,3gp2,3gpp,mov,qt', 'fa-code': 'atom,plist,bat,bash,c,cmd,coffee,css,hml,js,json,java,less,markdown,md,php,pl,py,rb,rss,sass,scpt,swift,scss,sh,xml,yml', 'fa-file-text-o': 'txt', 'fa-film': 'mp4,m4v,ogv,webm', 'fa-globe': 'htm,html,mhtm,mhtml,xhtm,xhtml'} 21 | 22 | @app.template_filter('size_fmt') 23 | def size_fmt(size): 24 | return humanize.naturalsize(size) 25 | 26 | @app.template_filter('time_fmt') 27 | def time_desc(timestamp): 28 | mdate = datetime.fromtimestamp(timestamp) 29 | str = mdate.strftime('%Y-%m-%d %H:%M:%S') 30 | return str 31 | 32 | @app.template_filter('data_fmt') 33 | def data_fmt(filename): 34 | t = 'unknown' 35 | for type, exts in datatypes.items(): 36 | if filename.split('.')[-1] in exts: 37 | t = type 38 | return t 39 | 40 | @app.template_filter('icon_fmt') 41 | def icon_fmt(filename): 42 | i = 'fa-file-o' 43 | for icon, exts in icontypes.items(): 44 | if filename.split('.')[-1] in exts: 45 | i = icon 46 | return i 47 | 48 | @app.template_filter('humanize') 49 | def time_humanize(timestamp): 50 | mdate = datetime.utcfromtimestamp(timestamp) 51 | return humanize.naturaltime(mdate) 52 | 53 | def get_type(mode): 54 | if stat.S_ISDIR(mode) or stat.S_ISLNK(mode): 55 | type = 'dir' 56 | else: 57 | type = 'file' 58 | return type 59 | 60 | def partial_response(path, start, end=None): 61 | file_size = os.path.getsize(path) 62 | 63 | if end is None: 64 | end = file_size - start - 1 65 | end = min(end, file_size - 1) 66 | length = end - start + 1 67 | 68 | with open(path, 'rb') as fd: 69 | fd.seek(start) 70 | bytes = fd.read(length) 71 | assert len(bytes) == length 72 | 73 | response = Response( 74 | bytes, 75 | 206, 76 | mimetype=mimetypes.guess_type(path)[0], 77 | direct_passthrough=True, 78 | ) 79 | response.headers.add( 80 | 'Content-Range', 'bytes {0}-{1}/{2}'.format( 81 | start, end, file_size, 82 | ), 83 | ) 84 | response.headers.add( 85 | 'Accept-Ranges', 'bytes' 86 | ) 87 | return response 88 | 89 | def get_range(request): 90 | range = request.headers.get('Range') 91 | m = re.match('bytes=(?P\d+)-(?P\d+)?', range) 92 | if m: 93 | start = m.group('start') 94 | end = m.group('end') 95 | start = int(start) 96 | if end is not None: 97 | end = int(end) 98 | return start, end 99 | else: 100 | return 0, None 101 | 102 | class PathView(MethodView): 103 | def get(self, p=''): 104 | hide_dotfile = request.args.get('hide-dotfile', request.cookies.get('hide-dotfile', 'no')) 105 | 106 | path = os.path.join(root, p) 107 | 108 | if os.path.isdir(path): 109 | contents = [] 110 | total = {'size': 0, 'dir': 0, 'file': 0} 111 | for filename in os.listdir(path): 112 | if filename in ignored: 113 | continue 114 | if hide_dotfile == 'yes' and filename[0] == '.': 115 | continue 116 | filepath = os.path.join(path, filename) 117 | stat_res = os.stat(filepath) 118 | info = {} 119 | info['name'] = filename 120 | info['mtime'] = stat_res.st_mtime 121 | ft = get_type(stat_res.st_mode) 122 | info['type'] = ft 123 | total[ft] += 1 124 | sz = stat_res.st_size 125 | info['size'] = sz 126 | total['size'] += sz 127 | contents.append(info) 128 | page = render_template('index.html', path=p, contents=contents, total=total, hide_dotfile=hide_dotfile) 129 | res = make_response(page, 200) 130 | res.set_cookie('hide-dotfile', hide_dotfile, max_age=16070400) 131 | elif os.path.isfile(path): 132 | if 'Range' in request.headers: 133 | start, end = get_range(request) 134 | res = partial_response(path, start, end) 135 | else: 136 | res = send_file(path) 137 | res.headers.add('Content-Disposition', 'attachment') 138 | else: 139 | res = make_response('Not found', 404) 140 | return res 141 | 142 | def put(self, p=''): 143 | if request.cookies.get('auth_cookie') == key: 144 | path = os.path.join(root, p) 145 | dir_path = os.path.dirname(path) 146 | Path(dir_path).mkdir(parents=True, exist_ok=True) 147 | 148 | info = {} 149 | if os.path.isdir(dir_path): 150 | try: 151 | filename = secure_filename(os.path.basename(path)) 152 | with open(os.path.join(dir_path, filename), 'wb') as f: 153 | f.write(request.stream.read()) 154 | except Exception as e: 155 | info['status'] = 'error' 156 | info['msg'] = str(e) 157 | else: 158 | info['status'] = 'success' 159 | info['msg'] = 'File Saved' 160 | else: 161 | info['status'] = 'error' 162 | info['msg'] = 'Invalid Operation' 163 | res = make_response(json.JSONEncoder().encode(info), 201) 164 | res.headers.add('Content-type', 'application/json') 165 | else: 166 | info = {} 167 | info['status'] = 'error' 168 | info['msg'] = 'Authentication failed' 169 | res = make_response(json.JSONEncoder().encode(info), 401) 170 | res.headers.add('Content-type', 'application/json') 171 | return res 172 | 173 | def post(self, p=''): 174 | if request.cookies.get('auth_cookie') == key: 175 | path = os.path.join(root, p) 176 | Path(path).mkdir(parents=True, exist_ok=True) 177 | 178 | info = {} 179 | if os.path.isdir(path): 180 | files = request.files.getlist('files[]') 181 | for file in files: 182 | try: 183 | filename = secure_filename(file.filename) 184 | file.save(os.path.join(path, filename)) 185 | except Exception as e: 186 | info['status'] = 'error' 187 | info['msg'] = str(e) 188 | else: 189 | info['status'] = 'success' 190 | info['msg'] = 'File Saved' 191 | else: 192 | info['status'] = 'error' 193 | info['msg'] = 'Invalid Operation' 194 | res = make_response(json.JSONEncoder().encode(info), 200) 195 | res.headers.add('Content-type', 'application/json') 196 | else: 197 | info = {} 198 | info['status'] = 'error' 199 | info['msg'] = 'Authentication failed' 200 | res = make_response(json.JSONEncoder().encode(info), 401) 201 | res.headers.add('Content-type', 'application/json') 202 | return res 203 | 204 | def delete(self, p=''): 205 | if request.cookies.get('auth_cookie') == key: 206 | path = os.path.join(root, p) 207 | dir_path = os.path.dirname(path) 208 | Path(dir_path).mkdir(parents=True, exist_ok=True) 209 | 210 | info = {} 211 | if os.path.isdir(dir_path): 212 | try: 213 | filename = secure_filename(os.path.basename(path)) 214 | os.remove(os.path.join(dir_path, filename)) 215 | os.rmdir(dir_path) 216 | except Exception as e: 217 | info['status'] = 'error' 218 | info['msg'] = str(e) 219 | else: 220 | info['status'] = 'success' 221 | info['msg'] = 'File Deleted' 222 | else: 223 | info['status'] = 'error' 224 | info['msg'] = 'Invalid Operation' 225 | res = make_response(json.JSONEncoder().encode(info), 204) 226 | res.headers.add('Content-type', 'application/json') 227 | else: 228 | info = {} 229 | info['status'] = 'error' 230 | info['msg'] = 'Authentication failed' 231 | res = make_response(json.JSONEncoder().encode(info), 401) 232 | res.headers.add('Content-type', 'application/json') 233 | return res 234 | 235 | path_view = PathView.as_view('path_view') 236 | app.add_url_rule('/', view_func=path_view) 237 | app.add_url_rule('/', view_func=path_view) 238 | 239 | if __name__ == '__main__': 240 | bind = os.getenv('FS_BIND', '0.0.0.0') 241 | port = os.getenv('FS_PORT', '8000') 242 | root = os.path.normpath(os.getenv('FS_PATH', '/tmp')) 243 | key = os.getenv('FS_KEY') 244 | app.run(bind, port, threaded=True, debug=False) 245 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | humanize 3 | pathlib2 4 | -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wildog/flask-file-server/59f1d19e7970799efa186b641d9ca3b0834b2f96/screenshot.jpg -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | File System 9 | 10 | 11 | 12 | 13 | 14 |
      15 |
      16 |
      17 | 24 |
      25 |
      26 |
      27 | 28 | 29 |
      30 |
      31 |
      32 |
      33 | Upload 34 | {% if hide_dotfile == 'yes' %} 35 | Show Dotfiles 36 | {% else %} 37 | Hide Dotfiles 38 | {% endif %} 39 |
      40 |
      41 |
      42 |
      43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | {% for entry in contents if entry.type == 'dir' %} 60 | 61 | 62 | 63 | 64 | 65 | {% endfor %} 66 | {% for entry in contents if entry.type == 'file' %} 67 | 68 | 71 | 72 | 73 | 74 | {% endfor %} 75 | 76 |
      NameSizeModified
      54 | {{total.dir}} folders and {{total.file}} files, {{total.size | size_fmt}} in total 55 |
       {{entry.name}}{{entry.mtime | humanize}}
        69 | {{entry.name}} 70 | {{entry.size | size_fmt}}{{entry.mtime | humanize}}
      77 |
      78 | 102 |
      103 | 119 | 144 |
      145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | --------------------------------------------------------------------------------