diff --git a/.gitignore b/.gitignore index 5666883d..5ae79525 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ config.rb !/usr/plugins/HelloWorld /usr/themes/ !/usr/themes/default +node_modules/ diff --git a/admin/css/grid.css b/admin/css/grid.css index 6303d21f..c0c8f250 100644 --- a/admin/css/grid.css +++ b/admin/css/grid.css @@ -1,748 +1,211 @@ -/* - * Bento Grid System - * Source: https://github.com/fenbox/bento - * Version: 1.2.8 - * Update: 2013.11.25 - */ -/* line 23, ../scss/grid.scss */ -.container, .row [class*="col-"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } - -/* line 31, ../scss/grid.scss */ -.container { - margin-left: auto; - margin-right: auto; - padding-left: 10px; - padding-right: 10px; } - -/* line 40, ../scss/grid.scss */ -.row { - margin-right: -10px; - margin-left: -10px; } - -/* line 46, ../scss/grid.scss */ -.row [class*="col-"] { - float: left; - min-height: 1px; - padding-right: 10px; - padding-left: 10px; } - -/* line 54, ../scss/grid.scss */ -.row [class*="-push-"], -.row [class*="-pull-"] { - position: relative; } - -/* - * Mobile and up - */ -/* line 65, ../scss/grid.scss */ -.col-mb-1 { - width: 8.33333%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-2 { - width: 16.66667%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-3 { - width: 25%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-4 { - width: 33.33333%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-5 { - width: 41.66667%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-6 { - width: 50%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-7 { - width: 58.33333%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-8 { - width: 66.66667%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-9 { - width: 75%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-10 { - width: 83.33333%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-11 { - width: 91.66667%; } - -/* line 65, ../scss/grid.scss */ -.col-mb-12 { - width: 100%; } - -/* - * Tablet and up - */ -@media (min-width: 768px) { - /* line 76, ../scss/grid.scss */ - .container { - max-width: 728px; } - - /* line 82, ../scss/grid.scss */ - .col-tb-1 { - width: 8.33333%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-2 { - width: 16.66667%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-3 { - width: 25%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-4 { - width: 33.33333%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-5 { - width: 41.66667%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-6 { - width: 50%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-7 { - width: 58.33333%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-8 { - width: 66.66667%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-9 { - width: 75%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-10 { - width: 83.33333%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-11 { - width: 91.66667%; } - - /* line 82, ../scss/grid.scss */ - .col-tb-12 { - width: 100%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-0 { - margin-left: 0%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-1 { - margin-left: 8.33333%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-2 { - margin-left: 16.66667%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-3 { - margin-left: 25%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-4 { - margin-left: 33.33333%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-5 { - margin-left: 41.66667%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-6 { - margin-left: 50%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-7 { - margin-left: 58.33333%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-8 { - margin-left: 66.66667%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-9 { - margin-left: 75%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-10 { - margin-left: 83.33333%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-11 { - margin-left: 91.66667%; } - - /* line 89, ../scss/grid.scss */ - .col-tb-offset-12 { - margin-left: 100%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-0 { - right: 0%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-1 { - right: 8.33333%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-2 { - right: 16.66667%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-3 { - right: 25%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-4 { - right: 33.33333%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-5 { - right: 41.66667%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-6 { - right: 50%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-7 { - right: 58.33333%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-8 { - right: 66.66667%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-9 { - right: 75%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-10 { - right: 83.33333%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-11 { - right: 91.66667%; } - - /* line 96, ../scss/grid.scss */ - .col-tb-pull-12 { - right: 100%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-0 { - left: 0%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-1 { - left: 8.33333%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-2 { - left: 16.66667%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-3 { - left: 25%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-4 { - left: 33.33333%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-5 { - left: 41.66667%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-6 { - left: 50%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-7 { - left: 58.33333%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-8 { - left: 66.66667%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-9 { - left: 75%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-10 { - left: 83.33333%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-11 { - left: 91.66667%; } - - /* line 103, ../scss/grid.scss */ - .col-tb-push-12 { - left: 100%; } } -/* - * Desktop and up - */ -@media (min-width: 992px) { - /* line 115, ../scss/grid.scss */ - .container { - max-width: 952px; } - - /* line 121, ../scss/grid.scss */ - .col-1 { - width: 8.33333%; } - - /* line 121, ../scss/grid.scss */ - .col-2 { - width: 16.66667%; } - - /* line 121, ../scss/grid.scss */ - .col-3 { - width: 25%; } - - /* line 121, ../scss/grid.scss */ - .col-4 { - width: 33.33333%; } - - /* line 121, ../scss/grid.scss */ - .col-5 { - width: 41.66667%; } - - /* line 121, ../scss/grid.scss */ - .col-6 { - width: 50%; } - - /* line 121, ../scss/grid.scss */ - .col-7 { - width: 58.33333%; } - - /* line 121, ../scss/grid.scss */ - .col-8 { - width: 66.66667%; } - - /* line 121, ../scss/grid.scss */ - .col-9 { - width: 75%; } - - /* line 121, ../scss/grid.scss */ - .col-10 { - width: 83.33333%; } - - /* line 121, ../scss/grid.scss */ - .col-11 { - width: 91.66667%; } - - /* line 121, ../scss/grid.scss */ - .col-12 { - width: 100%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-0 { - margin-left: 0%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-1 { - margin-left: 8.33333%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-2 { - margin-left: 16.66667%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-3 { - margin-left: 25%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-4 { - margin-left: 33.33333%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-5 { - margin-left: 41.66667%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-6 { - margin-left: 50%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-7 { - margin-left: 58.33333%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-8 { - margin-left: 66.66667%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-9 { - margin-left: 75%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-10 { - margin-left: 83.33333%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-11 { - margin-left: 91.66667%; } - - /* line 128, ../scss/grid.scss */ - .col-offset-12 { - margin-left: 100%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-0 { - right: 0%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-1 { - right: 8.33333%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-2 { - right: 16.66667%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-3 { - right: 25%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-4 { - right: 33.33333%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-5 { - right: 41.66667%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-6 { - right: 50%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-7 { - right: 58.33333%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-8 { - right: 66.66667%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-9 { - right: 75%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-10 { - right: 83.33333%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-11 { - right: 91.66667%; } - - /* line 135, ../scss/grid.scss */ - .col-pull-12 { - right: 100%; } - - /* line 142, ../scss/grid.scss */ - .col-push-0 { - left: 0%; } - - /* line 142, ../scss/grid.scss */ - .col-push-1 { - left: 8.33333%; } - - /* line 142, ../scss/grid.scss */ - .col-push-2 { - left: 16.66667%; } - - /* line 142, ../scss/grid.scss */ - .col-push-3 { - left: 25%; } - - /* line 142, ../scss/grid.scss */ - .col-push-4 { - left: 33.33333%; } - - /* line 142, ../scss/grid.scss */ - .col-push-5 { - left: 41.66667%; } - - /* line 142, ../scss/grid.scss */ - .col-push-6 { - left: 50%; } - - /* line 142, ../scss/grid.scss */ - .col-push-7 { - left: 58.33333%; } - - /* line 142, ../scss/grid.scss */ - .col-push-8 { - left: 66.66667%; } - - /* line 142, ../scss/grid.scss */ - .col-push-9 { - left: 75%; } - - /* line 142, ../scss/grid.scss */ - .col-push-10 { - left: 83.33333%; } - - /* line 142, ../scss/grid.scss */ - .col-push-11 { - left: 91.66667%; } - - /* line 142, ../scss/grid.scss */ - .col-push-12 { - left: 100%; } } -/* - * Widescreen and up - */ -@media (min-width: 1200px) { - /* line 154, ../scss/grid.scss */ - .container { - max-width: 1160px; } - - /* line 160, ../scss/grid.scss */ - .col-wd-1 { - width: 8.33333%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-2 { - width: 16.66667%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-3 { - width: 25%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-4 { - width: 33.33333%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-5 { - width: 41.66667%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-6 { - width: 50%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-7 { - width: 58.33333%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-8 { - width: 66.66667%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-9 { - width: 75%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-10 { - width: 83.33333%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-11 { - width: 91.66667%; } - - /* line 160, ../scss/grid.scss */ - .col-wd-12 { - width: 100%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-0 { - margin-left: 0%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-1 { - margin-left: 8.33333%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-2 { - margin-left: 16.66667%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-3 { - margin-left: 25%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-4 { - margin-left: 33.33333%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-5 { - margin-left: 41.66667%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-6 { - margin-left: 50%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-7 { - margin-left: 58.33333%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-8 { - margin-left: 66.66667%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-9 { - margin-left: 75%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-10 { - margin-left: 83.33333%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-11 { - margin-left: 91.66667%; } - - /* line 167, ../scss/grid.scss */ - .col-wd-offset-12 { - margin-left: 100%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-0 { - right: 0%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-1 { - right: 8.33333%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-2 { - right: 16.66667%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-3 { - right: 25%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-4 { - right: 33.33333%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-5 { - right: 41.66667%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-6 { - right: 50%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-7 { - right: 58.33333%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-8 { - right: 66.66667%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-9 { - right: 75%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-10 { - right: 83.33333%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-11 { - right: 91.66667%; } - - /* line 174, ../scss/grid.scss */ - .col-wd-pull-12 { - right: 100%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-0 { - left: 0%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-1 { - left: 8.33333%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-2 { - left: 16.66667%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-3 { - left: 25%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-4 { - left: 33.33333%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-5 { - left: 41.66667%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-6 { - left: 50%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-7 { - left: 58.33333%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-8 { - left: 66.66667%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-9 { - left: 75%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-10 { - left: 83.33333%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-11 { - left: 91.66667%; } - - /* line 181, ../scss/grid.scss */ - .col-wd-push-12 { - left: 100%; } } -/* - * Responsive kit - */ -@media (max-width: 767px) { - /* line 194, ../scss/grid.scss */ - .kit-hidden-mb { - display: none; } } -@media (max-width: 991px) { - /* line 201, ../scss/grid.scss */ - .kit-hidden-tb { - display: none; } } -@media (max-width: 1199px) { - /* line 208, ../scss/grid.scss */ - .kit-hidden { - display: none; } } -/* - * Clearfix - */ -/* line 217, ../scss/grid.scss */ -.clearfix, .row { - zoom: 1; } - /* line 219, ../scss/grid.scss */ - .clearfix:before, .row:before, .clearfix:after, .row:after { - content: " "; - display: table; } - /* line 223, ../scss/grid.scss */ - .clearfix:after, .row:after { - clear: both; } +/* Bento Grid System Source: https://github.com/fenbox/bento Version: 1.2.8 Update: 2013.11.25 */ +.container, .row [class*="col-"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } + +.container { margin-left: auto; margin-right: auto; padding-left: 10px; padding-right: 10px; } + +.row { margin-right: -10px; margin-left: -10px; } + +.row [class*="col-"] { float: left; min-height: 1px; padding-right: 10px; padding-left: 10px; } + +.row [class*="-push-"], .row [class*="-pull-"] { position: relative; } + +/* Mobile and up */ +.col-mb-1 { width: 8.33333%; } + +.col-mb-2 { width: 16.66667%; } + +.col-mb-3 { width: 25%; } + +.col-mb-4 { width: 33.33333%; } + +.col-mb-5 { width: 41.66667%; } + +.col-mb-6 { width: 50%; } + +.col-mb-7 { width: 58.33333%; } + +.col-mb-8 { width: 66.66667%; } + +.col-mb-9 { width: 75%; } + +.col-mb-10 { width: 83.33333%; } + +.col-mb-11 { width: 91.66667%; } + +.col-mb-12 { width: 100%; } + +/* Tablet and up */ +@media (min-width: 768px) { .container { max-width: 728px; } + .col-tb-1 { width: 8.33333%; } + .col-tb-2 { width: 16.66667%; } + .col-tb-3 { width: 25%; } + .col-tb-4 { width: 33.33333%; } + .col-tb-5 { width: 41.66667%; } + .col-tb-6 { width: 50%; } + .col-tb-7 { width: 58.33333%; } + .col-tb-8 { width: 66.66667%; } + .col-tb-9 { width: 75%; } + .col-tb-10 { width: 83.33333%; } + .col-tb-11 { width: 91.66667%; } + .col-tb-12 { width: 100%; } + .col-tb-offset-0 { margin-left: 0%; } + .col-tb-offset-1 { margin-left: 8.33333%; } + .col-tb-offset-2 { margin-left: 16.66667%; } + .col-tb-offset-3 { margin-left: 25%; } + .col-tb-offset-4 { margin-left: 33.33333%; } + .col-tb-offset-5 { margin-left: 41.66667%; } + .col-tb-offset-6 { margin-left: 50%; } + .col-tb-offset-7 { margin-left: 58.33333%; } + .col-tb-offset-8 { margin-left: 66.66667%; } + .col-tb-offset-9 { margin-left: 75%; } + .col-tb-offset-10 { margin-left: 83.33333%; } + .col-tb-offset-11 { margin-left: 91.66667%; } + .col-tb-offset-12 { margin-left: 100%; } + .col-tb-pull-0 { right: 0%; } + .col-tb-pull-1 { right: 8.33333%; } + .col-tb-pull-2 { right: 16.66667%; } + .col-tb-pull-3 { right: 25%; } + .col-tb-pull-4 { right: 33.33333%; } + .col-tb-pull-5 { right: 41.66667%; } + .col-tb-pull-6 { right: 50%; } + .col-tb-pull-7 { right: 58.33333%; } + .col-tb-pull-8 { right: 66.66667%; } + .col-tb-pull-9 { right: 75%; } + .col-tb-pull-10 { right: 83.33333%; } + .col-tb-pull-11 { right: 91.66667%; } + .col-tb-pull-12 { right: 100%; } + .col-tb-push-0 { left: 0%; } + .col-tb-push-1 { left: 8.33333%; } + .col-tb-push-2 { left: 16.66667%; } + .col-tb-push-3 { left: 25%; } + .col-tb-push-4 { left: 33.33333%; } + .col-tb-push-5 { left: 41.66667%; } + .col-tb-push-6 { left: 50%; } + .col-tb-push-7 { left: 58.33333%; } + .col-tb-push-8 { left: 66.66667%; } + .col-tb-push-9 { left: 75%; } + .col-tb-push-10 { left: 83.33333%; } + .col-tb-push-11 { left: 91.66667%; } + .col-tb-push-12 { left: 100%; } } + +/* Desktop and up */ +@media (min-width: 992px) { .container { max-width: 952px; } + .col-1 { width: 8.33333%; } + .col-2 { width: 16.66667%; } + .col-3 { width: 25%; } + .col-4 { width: 33.33333%; } + .col-5 { width: 41.66667%; } + .col-6 { width: 50%; } + .col-7 { width: 58.33333%; } + .col-8 { width: 66.66667%; } + .col-9 { width: 75%; } + .col-10 { width: 83.33333%; } + .col-11 { width: 91.66667%; } + .col-12 { width: 100%; } + .col-offset-0 { margin-left: 0%; } + .col-offset-1 { margin-left: 8.33333%; } + .col-offset-2 { margin-left: 16.66667%; } + .col-offset-3 { margin-left: 25%; } + .col-offset-4 { margin-left: 33.33333%; } + .col-offset-5 { margin-left: 41.66667%; } + .col-offset-6 { margin-left: 50%; } + .col-offset-7 { margin-left: 58.33333%; } + .col-offset-8 { margin-left: 66.66667%; } + .col-offset-9 { margin-left: 75%; } + .col-offset-10 { margin-left: 83.33333%; } + .col-offset-11 { margin-left: 91.66667%; } + .col-offset-12 { margin-left: 100%; } + .col-pull-0 { right: 0%; } + .col-pull-1 { right: 8.33333%; } + .col-pull-2 { right: 16.66667%; } + .col-pull-3 { right: 25%; } + .col-pull-4 { right: 33.33333%; } + .col-pull-5 { right: 41.66667%; } + .col-pull-6 { right: 50%; } + .col-pull-7 { right: 58.33333%; } + .col-pull-8 { right: 66.66667%; } + .col-pull-9 { right: 75%; } + .col-pull-10 { right: 83.33333%; } + .col-pull-11 { right: 91.66667%; } + .col-pull-12 { right: 100%; } + .col-push-0 { left: 0%; } + .col-push-1 { left: 8.33333%; } + .col-push-2 { left: 16.66667%; } + .col-push-3 { left: 25%; } + .col-push-4 { left: 33.33333%; } + .col-push-5 { left: 41.66667%; } + .col-push-6 { left: 50%; } + .col-push-7 { left: 58.33333%; } + .col-push-8 { left: 66.66667%; } + .col-push-9 { left: 75%; } + .col-push-10 { left: 83.33333%; } + .col-push-11 { left: 91.66667%; } + .col-push-12 { left: 100%; } } + +/* Widescreen and up */ +@media (min-width: 1200px) { .container { max-width: 1160px; } + .col-wd-1 { width: 8.33333%; } + .col-wd-2 { width: 16.66667%; } + .col-wd-3 { width: 25%; } + .col-wd-4 { width: 33.33333%; } + .col-wd-5 { width: 41.66667%; } + .col-wd-6 { width: 50%; } + .col-wd-7 { width: 58.33333%; } + .col-wd-8 { width: 66.66667%; } + .col-wd-9 { width: 75%; } + .col-wd-10 { width: 83.33333%; } + .col-wd-11 { width: 91.66667%; } + .col-wd-12 { width: 100%; } + .col-wd-offset-0 { margin-left: 0%; } + .col-wd-offset-1 { margin-left: 8.33333%; } + .col-wd-offset-2 { margin-left: 16.66667%; } + .col-wd-offset-3 { margin-left: 25%; } + .col-wd-offset-4 { margin-left: 33.33333%; } + .col-wd-offset-5 { margin-left: 41.66667%; } + .col-wd-offset-6 { margin-left: 50%; } + .col-wd-offset-7 { margin-left: 58.33333%; } + .col-wd-offset-8 { margin-left: 66.66667%; } + .col-wd-offset-9 { margin-left: 75%; } + .col-wd-offset-10 { margin-left: 83.33333%; } + .col-wd-offset-11 { margin-left: 91.66667%; } + .col-wd-offset-12 { margin-left: 100%; } + .col-wd-pull-0 { right: 0%; } + .col-wd-pull-1 { right: 8.33333%; } + .col-wd-pull-2 { right: 16.66667%; } + .col-wd-pull-3 { right: 25%; } + .col-wd-pull-4 { right: 33.33333%; } + .col-wd-pull-5 { right: 41.66667%; } + .col-wd-pull-6 { right: 50%; } + .col-wd-pull-7 { right: 58.33333%; } + .col-wd-pull-8 { right: 66.66667%; } + .col-wd-pull-9 { right: 75%; } + .col-wd-pull-10 { right: 83.33333%; } + .col-wd-pull-11 { right: 91.66667%; } + .col-wd-pull-12 { right: 100%; } + .col-wd-push-0 { left: 0%; } + .col-wd-push-1 { left: 8.33333%; } + .col-wd-push-2 { left: 16.66667%; } + .col-wd-push-3 { left: 25%; } + .col-wd-push-4 { left: 33.33333%; } + .col-wd-push-5 { left: 41.66667%; } + .col-wd-push-6 { left: 50%; } + .col-wd-push-7 { left: 58.33333%; } + .col-wd-push-8 { left: 66.66667%; } + .col-wd-push-9 { left: 75%; } + .col-wd-push-10 { left: 83.33333%; } + .col-wd-push-11 { left: 91.66667%; } + .col-wd-push-12 { left: 100%; } } + +/* Responsive kit */ +@media (max-width: 767px) { .kit-hidden-mb { display: none; } } + +@media (max-width: 991px) { .kit-hidden-tb { display: none; } } + +@media (max-width: 1199px) { .kit-hidden { display: none; } } + +/* Clearfix */ +.clearfix, .row { zoom: 1; } + +.clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; } + +.clearfix:after, .row:after { clear: both; } diff --git a/admin/css/style.css b/admin/css/style.css index 45f1ba4e..22b56e59 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -1,2178 +1,837 @@ @charset "UTF-8"; /* vim: set et sw=2 ts=2 sts=2 fdm=marker ff=unix fenc=utf8 */ -/** -* Typecho 后台样式 -* -* @author Typecho Team -* @since 2008-09-26 -* @update 2013-11-02 -* @link http://www.typecho.org/ -* @version 0.9 -*/ -/** -* Typecho 全局样式 -*/ -/* line 18, ../scss/style.scss */ -html { - height: 100%; } +/** Typecho 后台样式 @author Typecho Team @since 2008-09-26 @update 2013-11-02 @link http://www.typecho.org/ @version 0.9 */ +/** Typecho 全局样式 */ +html { height: 100%; } -/* line 22, ../scss/style.scss */ -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - background: #F6F6F3; - color: #444; - font-size: 87.5%; - line-height: 1.5; } +body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; background: #F6F6F3; color: #444; font-size: 87.5%; line-height: 1.5; } -/* line 30, ../scss/style.scss */ -a { - color: #467B96; - text-decoration: none; } - /* line 33, ../scss/style.scss */ - a:hover { - color: #499BC3; - text-decoration: underline; } +a { color: #467B96; text-decoration: none; } -/* line 39, ../scss/style.scss */ -code, pre, .mono { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } +a:hover { color: #499BC3; text-decoration: underline; } -/* line 43, ../scss/style.scss */ -.p { - margin: 1em 0; } +code, pre, .mono { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } -/* line 45, ../scss/style.scss */ -.body-100 { - height: 100%; } +.p { margin: 1em 0; } -/* line 49, ../scss/style.scss */ -a.balloon-button { - display: inline-block; - padding: 0 6px; - min-width: 12px; - height: 18px; - line-height: 18px; - background: #D8E7EE; - font-size: .85714em; - text-align: center; - text-decoration: none; - /** 修正ie中文不对齐 */ - zoom: 1; - -moz-border-radius: 30px; - -webkit-border-radius: 30px; - border-radius: 30px; - white-space: nowrap; } +.body-100 { height: 100%; } -/* line 69, ../scss/style.scss */ -a.button:hover, a.balloon-button:hover { - background-color: #A5CADC; - color: #FFF; - text-decoration: none; } +a.balloon-button { display: inline-block; padding: 0 6px; min-width: 12px; height: 18px; line-height: 18px; background: #D8E7EE; font-size: .85714em; text-align: center; text-decoration: none; /** 修正ie中文不对齐 */ zoom: 1; -moz-border-radius: 30px; -webkit-border-radius: 30px; border-radius: 30px; white-space: nowrap; } -/** -* Forms -*/ -/* line 5, ../scss/_forms.scss */ -input[type=text], input[type=password], input[type=email], -textarea { - background: #FFF; - border: 1px solid #D9D9D6; - padding: 7px; - border-radius: 2px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } +a.button:hover, a.balloon-button:hover { background-color: #A5CADC; color: #FFF; text-decoration: none; } -/* line 18, ../scss/_forms.scss */ -textarea { - resize: vertical; - line-height: 1.5; } +/** Forms */ +input[type=text], input[type=password], input[type=email], textarea { background: #FFF; border: 1px solid #D9D9D6; padding: 7px; border-radius: 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -/* line 23, ../scss/_forms.scss */ -input[type="radio"], input[type="checkbox"] { - margin-right: 3px; } +textarea { resize: vertical; line-height: 1.5; } -/* line 26, ../scss/_forms.scss */ -input.text-s, textarea.text-s { - padding: 5px; } -/* line 27, ../scss/_forms.scss */ -input.text-l, textarea.text-l { - padding: 10px; - font-size: 1.14286em; } +input[type="radio"], input[type="checkbox"] { margin-right: 3px; } -/* line 33, ../scss/_forms.scss */ -.w-10 { - width: 10%; } +input.text-s, textarea.text-s { padding: 5px; } -/* line 34, ../scss/_forms.scss */ -.w-20 { - width: 20%; } +input.text-l, textarea.text-l { padding: 10px; font-size: 1.14286em; } -/* line 35, ../scss/_forms.scss */ -.w-30 { - width: 30%; } +.w-10 { width: 10%; } -/* line 36, ../scss/_forms.scss */ -.w-40 { - width: 40%; } +.w-20 { width: 20%; } -/* line 37, ../scss/_forms.scss */ -.w-50 { - width: 50%; } +.w-30 { width: 30%; } -/* line 38, ../scss/_forms.scss */ -.w-60 { - width: 60%; } +.w-40 { width: 40%; } -/* line 39, ../scss/_forms.scss */ -.w-70 { - width: 70%; } +.w-50 { width: 50%; } -/* line 40, ../scss/_forms.scss */ -.w-80 { - width: 80%; } +.w-60 { width: 60%; } -/* line 41, ../scss/_forms.scss */ -.w-90 { - width: 90%; } +.w-70 { width: 70%; } -/* line 42, ../scss/_forms.scss */ -.w-100 { - width: 100%; } +.w-80 { width: 80%; } -/* line 44, ../scss/_forms.scss */ -select { - border: 1px solid #CCC; - height: 28px; } +.w-90 { width: 90%; } -/** -* Buttons -*/ -/* line 28, ../scss/_buttons.scss */ -.btn, #ui-datepicker-div .ui-datepicker-current, -#ui-datepicker-div .ui-datepicker-close { - border: none; - background-color: #E9E9E6; - cursor: pointer; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - display: inline-block; - padding: 0 12px; - height: 32px; - color: #666; - vertical-align: middle; - zoom: 1; } - /* line 15, ../scss/_buttons.scss */ - .btn:hover, #ui-datepicker-div .ui-datepicker-current:hover, - #ui-datepicker-div .ui-datepicker-close:hover { - -moz-transition-duration: 0.4s; - -o-transition-duration: 0.4s; - -webkit-transition-duration: 0.4s; - transition-duration: 0.4s; - background-color: #dbdbd6; } - /* line 19, ../scss/_buttons.scss */ - .btn:active, #ui-datepicker-div .ui-datepicker-current:active, - #ui-datepicker-div .ui-datepicker-close:active, .btn.active, #ui-datepicker-div .active.ui-datepicker-current, - #ui-datepicker-div .active.ui-datepicker-close { - background-color: #d6d6d0; } - /* line 22, ../scss/_buttons.scss */ - .btn:disabled, #ui-datepicker-div .ui-datepicker-current:disabled, - #ui-datepicker-div .ui-datepicker-close:disabled { - background-color: #f7f7f6; - cursor: default; } - /* line 38, ../scss/_buttons.scss */ - .btn:disabled, #ui-datepicker-div .ui-datepicker-current:disabled, - #ui-datepicker-div .ui-datepicker-close:disabled { - color: #999; } +.w-100 { width: 100%; } -/* line 43, ../scss/_buttons.scss */ -.btn-xs, #ui-datepicker-div .ui-datepicker-current, -#ui-datepicker-div .ui-datepicker-close { - padding: 0 10px; - height: 25px; - font-size: 13px; } +select { border: 1px solid #CCC; height: 28px; } -/* line 48, ../scss/_buttons.scss */ -.btn-s { - height: 28px; } +/** Buttons */ +.btn, #ui-datepicker-div .ui-datepicker-current, #ui-datepicker-div .ui-datepicker-close { border: none; background-color: #E9E9E6; cursor: pointer; border-radius: 2px; display: inline-block; padding: 0 12px; height: 32px; color: #666; vertical-align: middle; zoom: 1; } -/* line 49, ../scss/_buttons.scss */ -.btn-l { - height: 40px; - font-size: 1.14286em; - font-weight: bold; } +.btn:hover, #ui-datepicker-div .ui-datepicker-current:hover, #ui-datepicker-div .ui-datepicker-close:hover { transition-duration: .4s; background-color: #dbdbd6; } -/* line 55, ../scss/_buttons.scss */ -.primary { - border: none; - background-color: #467B96; - cursor: pointer; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - color: #FFF; } - /* line 15, ../scss/_buttons.scss */ - .primary:hover { - -moz-transition-duration: 0.4s; - -o-transition-duration: 0.4s; - -webkit-transition-duration: 0.4s; - transition-duration: 0.4s; - background-color: #3c6a81; } - /* line 19, ../scss/_buttons.scss */ - .primary:active, .primary.active { - background-color: #39647a; } - /* line 22, ../scss/_buttons.scss */ - .primary:disabled { - background-color: #508cab; - cursor: default; } +.btn:active, #ui-datepicker-div .ui-datepicker-current:active, #ui-datepicker-div .ui-datepicker-close:active, .btn.active, #ui-datepicker-div .active.ui-datepicker-current, #ui-datepicker-div .active.ui-datepicker-close { background-color: #d6d6d0; } -/* line 60, ../scss/_buttons.scss */ -.btn-group { - display: inline-block; } +.btn:disabled, #ui-datepicker-div .ui-datepicker-current:disabled, #ui-datepicker-div .ui-datepicker-close:disabled { background-color: #f7f7f6; cursor: default; } -/* line 64, ../scss/_buttons.scss */ -.btn-warn { - border: none; - background-color: #B94A48; - cursor: pointer; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - color: #FFF; } - /* line 15, ../scss/_buttons.scss */ - .btn-warn:hover { - -moz-transition-duration: 0.4s; - -o-transition-duration: 0.4s; - -webkit-transition-duration: 0.4s; - transition-duration: 0.4s; - background-color: #a4403f; } - /* line 19, ../scss/_buttons.scss */ - .btn-warn:active, .btn-warn.active { - background-color: #9c3e3c; } - /* line 22, ../scss/_buttons.scss */ - .btn-warn:disabled { - background-color: #c1605e; - cursor: default; } +.btn:disabled, #ui-datepicker-div .ui-datepicker-current:disabled, #ui-datepicker-div .ui-datepicker-close:disabled { color: #999; } -/* line 69, ../scss/_buttons.scss */ -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active, -.btn-link.active { - background-color: transparent; } +.btn-xs, #ui-datepicker-div .ui-datepicker-current, #ui-datepicker-div .ui-datepicker-close { padding: 0 10px; height: 25px; font-size: 13px; } + +.btn-s { height: 28px; } + +.btn-l { height: 40px; font-size: 1.14286em; font-weight: bold; } + +.primary { border: none; background-color: #467B96; cursor: pointer; border-radius: 2px; color: #FFF; } + +.primary:hover { transition-duration: .4s; background-color: #3c6a81; } + +.primary:active, .primary.active { background-color: #39647a; } + +.primary:disabled { background-color: #508cab; cursor: default; } + +.btn-group { display: inline-block; } + +.btn-warn { border: none; background-color: #B94A48; cursor: pointer; border-radius: 2px; color: #FFF; } + +.btn-warn:hover { transition-duration: .4s; background-color: #a4403f; } + +.btn-warn:active, .btn-warn.active { background-color: #9c3e3c; } + +.btn-warn:disabled { background-color: #c1605e; cursor: default; } + +.btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active, .btn-link.active { background-color: transparent; } /* 下拉菜单 */ -/* line 78, ../scss/_buttons.scss */ -.btn-drop { - position: relative; } +.btn-drop { position: relative; } -/* line 81, ../scss/_buttons.scss */ -.dropdown-toggle { - padding-right: 8px; } +.dropdown-toggle { padding-right: 8px; } -/* line 84, ../scss/_buttons.scss */ -.dropdown-menu { - list-style: none; - position: absolute; - z-index: 2; - left: 0; - margin: 0; - padding: 0; - border: 1px solid #D9D9D6; - background: #FFF; - text-align: left; - min-width: 108px; - display: none; } - /* line 97, ../scss/_buttons.scss */ - .dropdown-menu li { - white-space: nowrap; } - /* line 99, ../scss/_buttons.scss */ - .dropdown-menu li.multiline { - padding: 5px 12px 12px; } - /* line 104, ../scss/_buttons.scss */ - .dropdown-menu a { - display: block; - padding: 5px 12px; - color: #666; } - /* line 108, ../scss/_buttons.scss */ - .dropdown-menu a:hover { - background: #F6F6F3; - text-decoration: none !important; } +.dropdown-menu { list-style: none; position: absolute; z-index: 2; left: 0; margin: 0; padding: 0; border: 1px solid #D9D9D6; background: #FFF; text-align: left; min-width: 108px; display: none; } -/** -* 提示信息框 -*/ -/* line 6, ../scss/_messages.scss */ -.message { - padding: 8px 10px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; } +.dropdown-menu li { white-space: nowrap; } -/* line 11, ../scss/_messages.scss */ -.message a { - font-weight: bold; - text-decoration: underline; } +.dropdown-menu li.multiline { padding: 5px 12px 12px; } -/* line 16, ../scss/_messages.scss */ -.error { - background: #FBE3E4; - color: #8A1F11; } +.dropdown-menu a { display: block; padding: 5px 12px; color: #666; } -/* line 20, ../scss/_messages.scss */ -.error a { - color: #8A1F11; } +.dropdown-menu a:hover { background: #F6F6F3; text-decoration: none !important; } -/* line 22, ../scss/_messages.scss */ -.notice { - background: #FFF6BF; - color: #8A6D3B; } +/** 提示信息框 */ +.message { padding: 8px 10px; border-radius: 2px; } -/* line 26, ../scss/_messages.scss */ -.notice a { - color: #8A6D3B; } +.message a { font-weight: bold; text-decoration: underline; } -/* line 28, ../scss/_messages.scss */ -.success { - background: #E6EFC2; - color: #264409; } +.error { background: #FBE3E4; color: #8A1F11; } -/* line 32, ../scss/_messages.scss */ -.success a { - color: #264409; } +.error a { color: #8A1F11; } -/* line 36, ../scss/_messages.scss */ -.balloon { - display: inline-block; - padding: 0 4px; - min-width: 10px; - height: 14px; - line-height: 14px; - background: #B9B9B6; - vertical-align: text-top; - text-align: center; - font-size: 12px; - color: #FFF; - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; } +.notice { background: #FFF6BF; color: #8A6D3B; } -/** -* 后台分页 -*/ -/* line 5, ../scss/_pagenavi.scss */ -.typecho-pager { - list-style: none; - float: right; - margin: 0; - padding: 0; - line-height: 1; - text-align: center; - zoom: 1; } +.notice a { color: #8A6D3B; } -/* line 15, ../scss/_pagenavi.scss */ -.typecho-pager li { - display: inline-block; - margin: 0 3px; - height: 28px; - line-height: 28px; } +.success { background: #E6EFC2; color: #264409; } -/* line 22, ../scss/_pagenavi.scss */ -.typecho-pager a { - display: block; - padding: 0 10px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; } +.success a { color: #264409; } -/* line 28, ../scss/_pagenavi.scss */ -.typecho-pager a:hover { - text-decoration: none; - background: #E9E9E6; } +.balloon { display: inline-block; padding: 0 4px; min-width: 10px; height: 14px; line-height: 14px; background: #B9B9B6; vertical-align: text-top; text-align: center; font-size: 12px; color: #FFF; border-radius: 20px; } -/* line 33, ../scss/_pagenavi.scss */ -.typecho-pager li.current a { - background: #E9E9E6; - color: #444; } +/** 后台分页 */ +.typecho-pager { list-style: none; float: right; margin: 0; padding: 0; line-height: 1; text-align: center; zoom: 1; } -/** -* 后台头部导航 -*/ -/* line 4, ../scss/_header.scss */ -.typecho-head-nav { - padding: 0 10px; - background: #292D33; } +.typecho-pager li { display: inline-block; margin: 0 3px; height: 28px; line-height: 28px; } -/* line 9, ../scss/_header.scss */ -.typecho-head-nav a { - color: #BBB; } +.typecho-pager a { display: block; padding: 0 10px; border-radius: 2px; } -/* line 12, ../scss/_header.scss */ -.typecho-head-nav a:hover, -.typecho-head-nav a:focus { - color: #FFF; - text-decoration: none; } +.typecho-pager a:hover { text-decoration: none; background: #E9E9E6; } -/* line 18, ../scss/_header.scss */ -#typecho-nav-list { - float: left; } - /* line 20, ../scss/_header.scss */ - #typecho-nav-list ul { - list-style: none; - margin: 0; - padding: 0; } +.typecho-pager li.current a { background: #E9E9E6; color: #444; } -/* line 27, ../scss/_header.scss */ -#typecho-nav-list ul:first-child { - border-left: 1px solid #383D45; } +/** 后台头部导航 */ +.typecho-head-nav { padding: 0 10px; background: #292D33; } -/* line 31, ../scss/_header.scss */ -#typecho-nav-list .root { - position: relative; - float: left; } +.typecho-head-nav a { color: #BBB; } -/* line 36, ../scss/_header.scss */ -#typecho-nav-list .parent a { - display: block; - float: left; - padding: 0 20px; - border-right: 1px solid #383D45; - height: 36px; - line-height: 36px; - color: #BBB; } +.typecho-head-nav a:hover, .typecho-head-nav a:focus { color: #FFF; text-decoration: none; } -/* line 46, ../scss/_header.scss */ -#typecho-nav-list .parent a:hover, -#typecho-nav-list .focus .parent a, -#typecho-nav-list .root:hover .parent a { - background: #202328; - color: #FFF; - text-decoration: none; } +#typecho-nav-list { float: left; } -/* line 54, ../scss/_header.scss */ -#typecho-nav-list .focus .parent a { - font-weight: bold; } +#typecho-nav-list ul { list-style: none; margin: 0; padding: 0; } -/* line 58, ../scss/_header.scss */ -#typecho-nav-list .child { - position: absolute; - top: 36px; - display: none; - margin: 0; - min-width: 160px; - max-width: 240px; - background: #202328; - z-index: 250; } +#typecho-nav-list ul:first-child { border-left: 1px solid #383D45; } -/* line 69, ../scss/_header.scss */ -#typecho-nav-list .root:hover .child { - display: block; } +#typecho-nav-list .root { position: relative; float: left; } -/* line 73, ../scss/_header.scss */ -#typecho-nav-list .child li a { - color: #BBB; - display: block; - padding: 0 20px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - height: 36px; - line-height: 36px; } +#typecho-nav-list .parent a { display: block; float: left; padding: 0 20px; border-right: 1px solid #383D45; height: 36px; line-height: 36px; color: #BBB; } -/* line 84, ../scss/_header.scss */ -#typecho-nav-list .child li a:hover, -#typecho-nav-list .child li a:focus { - background: #292D33; - color: #FFF; } +#typecho-nav-list .parent a:hover, #typecho-nav-list .focus .parent a, #typecho-nav-list .root:hover .parent a { background: #202328; color: #FFF; text-decoration: none; } -/* line 89, ../scss/_header.scss */ -#typecho-nav-list .child li.focus a { - color: #6DA1BB; - font-weight: bold; } +#typecho-nav-list .focus .parent a { font-weight: bold; } -/* line 94, ../scss/_header.scss */ -.typecho-head-nav .operate { - float: right; } +#typecho-nav-list .child { position: absolute; top: 36px; display: none; margin: 0; min-width: 160px; max-width: 240px; background: #202328; z-index: 250; } -/* line 97, ../scss/_header.scss */ -.typecho-head-nav .operate a { - display: inline-block; - margin-left: -1px; - padding: 0 20px; - border: 1px solid #383D45; - border-width: 0 1px; - line-height: 36px; - color: #BBB; } +#typecho-nav-list .root:hover .child { display: block; } -/* line 106, ../scss/_header.scss */ -.typecho-head-nav .operate a:hover { - background-color: #202328; - color: #FFF; } +#typecho-nav-list .child li a { color: #BBB; display: block; padding: 0 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 36px; line-height: 36px; } -/** -* 注脚 -*/ -/* line 4, ../scss/_footer.scss */ -.typecho-foot { - padding: 4em 0 3em; - color: #999; - line-height: 1.8; - text-align: center; } - /* line 10, ../scss/_footer.scss */ - .typecho-foot .copyright p { - margin: 10px 0 0; } - /* line 13, ../scss/_footer.scss */ - .typecho-foot .resource { - color: #CCC; } - /* line 16, ../scss/_footer.scss */ - .typecho-foot .resource a { - margin: 0 3px; - color: #999; } +#typecho-nav-list .child li a:hover, #typecho-nav-list .child li a:focus { background: #292D33; color: #FFF; } + +#typecho-nav-list .child li.focus a { color: #6DA1BB; font-weight: bold; } + +.typecho-head-nav .operate { float: right; } + +.typecho-head-nav .operate a { display: inline-block; margin-left: -1px; padding: 0 20px; border: 1px solid #383D45; border-width: 0 1px; line-height: 36px; color: #BBB; } + +.typecho-head-nav .operate a:hover { background-color: #202328; color: #FFF; } + +/** 注脚 */ +.typecho-foot { padding: 4em 0 3em; color: #999; line-height: 1.8; text-align: center; } + +.typecho-foot .copyright p { margin: 10px 0 0; } + +.typecho-foot .resource { color: #CCC; } + +.typecho-foot .resource a { margin: 0 3px; color: #999; } /* 低版本浏览器升级提示 */ -/* line 85, ../scss/style.scss */ -.browsehappy { - border: none; - text-align: center; } +.browsehappy { border: none; text-align: center; } /** 顶部消息样式 by 70 */ -/* line 91, ../scss/style.scss */ -.popup { - display: none; - position: absolute; - top: 0; - left: 0; - margin: 0; - padding: 8px 0; - border: none; - width: 100%; - z-index: 10; - text-align: center; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; } +.popup { display: none; position: absolute; top: 0; left: 0; margin: 0; padding: 8px 0; border: none; width: 100%; z-index: 10; text-align: center; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } -/* line 108, ../scss/style.scss */ -.popup ul { - list-style: none; - margin: 0; - padding: 0; - text-align: center; } +.popup ul { list-style: none; margin: 0; padding: 0; text-align: center; } -/* line 115, ../scss/style.scss */ -.popup ul li { - display: inline-block; - margin-right: 10px; } +.popup ul li { display: inline-block; margin-right: 10px; } -/** -* logo 的样式 -*/ -/** -* 载入状态 -*/ -/* line 129, ../scss/style.scss */ -.loading { - padding-left: 20px !important; - background: transparent url(../img/ajax-loader.gif) no-repeat left center; } +/** logo 的样式 */ +/** 载入状态 */ +.loading { padding-left: 20px !important; background: transparent url(../img/ajax-loader.gif) no-repeat left center; } -/** -* 典型配置选项 -*/ -/* line 138, ../scss/style.scss */ -.typecho-option { - list-style: none; - margin: 1em 0; - padding: 0; } +/** 典型配置选项 */ +.typecho-option { list-style: none; margin: 1em 0; padding: 0; } -/* line 147, ../scss/style.scss */ -.typecho-option-submit li { - border-bottom: none; } +.typecho-option-submit li { border-bottom: none; } -/* line 151, ../scss/style.scss */ -.typecho-option label.typecho-label { - display: block; - margin-bottom: .5em; - font-weight: bold; } +.typecho-option label.typecho-label { display: block; margin-bottom: .5em; font-weight: bold; } -/* line 156, ../scss/style.scss */ -.typecho-option label.required:after { - content: " *"; - color: #B94A48; } +.typecho-option label.required:after { content: " *"; color: #B94A48; } -/* line 162, ../scss/style.scss */ -.typecho-option span { - margin-right: 15px; } +.typecho-option span { margin-right: 15px; } -/* line 163, ../scss/style.scss */ -.typecho-option .description { - margin: .5em 0 0; - color: #999; - font-size: .92857em; } +.typecho-option .description { margin: .5em 0 0; color: #999; font-size: .92857em; } -/* line 169, ../scss/style.scss */ -.typecho-option input.file { - width: 100%; - margin: .7em 0; } +.typecho-option input.file { width: 100%; margin: .7em 0; } -/* line 174, ../scss/style.scss */ -.front-archive { - padding-left: 1.5em; } +.front-archive { padding-left: 1.5em; } -/* line 178, ../scss/style.scss */ -.profile-avatar { - border: 1px dashed #D9D9D6; - max-width: 100%; } +.profile-avatar { border: 1px dashed #D9D9D6; max-width: 100%; } /** 增加配置面板内部的错误样式 by 70 */ -/** -* 安装样式 -* -* @author mingcheng -* @date 2008-09-06 -*/ -/** -* 安装向导 -*/ -/* line 196, ../scss/style.scss */ -.typecho-install { - padding-bottom: 2em; } +/** 安装样式 @author mingcheng @date 2008-09-06 */ +/** 安装向导 */ +.typecho-install { padding-bottom: 2em; } -/* line 199, ../scss/style.scss */ -.typecho-install-patch { - margin-bottom: 2em; - padding: 2em 0; - background-color: #292D33; - color: #FFF; - text-align: center; } +.typecho-install-patch { margin-bottom: 2em; padding: 2em 0; background-color: #292D33; color: #FFF; text-align: center; } -/* line 207, ../scss/style.scss */ -.typecho-install-patch ol { - list-style: none; - margin: 3em 0 1em; - padding: 0; - color: #999; } +.typecho-install-patch ol { list-style: none; margin: 3em 0 1em; padding: 0; color: #999; } -/* line 213, ../scss/style.scss */ -.typecho-install-patch li { - display: inline-block; - margin: 0 .8em; } +.typecho-install-patch li { display: inline-block; margin: 0 .8em; } -/* line 217, ../scss/style.scss */ -.typecho-install-patch span { - display: inline-block; - margin-right: 5px; - width: 20px; - height: 20px; - line-height: 20px; - border: 2px solid #999; - text-align: center; - border-radius: 2em; } +.typecho-install-patch span { display: inline-block; margin-right: 5px; width: 20px; height: 20px; line-height: 20px; border: 2px solid #999; text-align: center; border-radius: 2em; } -/* line 227, ../scss/style.scss */ -.typecho-install-patch li.current { - color: #FFF; - font-weight: bold; } +.typecho-install-patch li.current { color: #FFF; font-weight: bold; } -/* line 231, ../scss/style.scss */ -.typecho-install-patch li.current span { - border-color: #FFF; } +.typecho-install-patch li.current span { border-color: #FFF; } -/** -* 安装主体内容 -*/ -/* line 240, ../scss/style.scss */ -.typecho-install .typecho-install-body input { - width: 100%; } +/** 安装主体内容 */ +.typecho-install .typecho-install-body input { width: 100%; } -/* line 243, ../scss/style.scss */ -.typecho-install-body .typecho-option li { - margin: 1em 0; } +.typecho-install-body .typecho-option li { margin: 1em 0; } -/** -* 欢迎界面 -*/ -/* line 252, ../scss/style.scss */ -#typecho-welcome { - margin: 1em 0; - padding: 1em 2em; - background-color: #E9E9E6; } +/** 欢迎界面 */ +#typecho-welcome { margin: 1em 0; padding: 1em 2em; background-color: #E9E9E6; } -/* line 258, ../scss/style.scss */ -.welcome-board { - color: #999; - font-size: 1.15em; } - /* line 261, ../scss/style.scss */ - .welcome-board em { - color: #444; - font-size: 2em; - font-style: normal; - font-family: Georgia, serif; } +.welcome-board { color: #999; font-size: 1.15em; } -/* line 269, ../scss/style.scss */ -#start-link { - margin-bottom: 25px; - padding: 0 0 35px; - border-bottom: 1px solid #ECECEC; } - /* line 273, ../scss/style.scss */ - #start-link li { - float: left; - margin-right: 1.5em; } - /* line 277, ../scss/style.scss */ - #start-link .balloon { - margin-top: 2px; } +.welcome-board em { color: #444; font-size: 2em; font-style: normal; font-family: Georgia, serif; } -/* line 283, ../scss/style.scss */ -.latest-link li { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; } -/* line 288, ../scss/style.scss */ -.latest-link span { - display: inline-block; - margin-right: 4px; - padding-right: 8px; - border-right: 1px solid #ECECEC; - width: 37px; - text-align: right; - color: #999; } +#start-link { margin-bottom: 25px; padding: 0 0 35px; border-bottom: 1px solid #ECECEC; } -/* line 299, ../scss/style.scss */ -.update-check { - font-size: 14px; } +#start-link li { float: left; margin-right: 1.5em; } -/** -* 登录框 -*/ -/* line 306, ../scss/style.scss */ -.typecho-login-wrap { - display: table; - margin: 0 auto; - height: 100%; } +#start-link .balloon { margin-top: 2px; } -/* line 311, ../scss/style.scss */ -.typecho-login { - display: table-cell; - padding: 30px 0 100px; - width: 280px; - text-align: center; - vertical-align: middle; } - /* line 317, ../scss/style.scss */ - .typecho-login h1 { - margin: 0 0 1em; } +.latest-link li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -/* line 322, ../scss/style.scss */ -.typecho-login .more-link { - margin-top: 2em; - color: #CCC; } +.latest-link span { display: inline-block; margin-right: 4px; padding-right: 8px; border-right: 1px solid #ECECEC; width: 37px; text-align: right; color: #999; } -/* line 326, ../scss/style.scss */ -.typecho-login .more-link a { - margin: 0 3px; } +.update-check { font-size: 14px; } -/** -* 标题 -*/ -/* line 333, ../scss/style.scss */ -.typecho-page-title h2 { - margin: 25px 0 10px; - font-size: 1.28571em; } +/** 登录框 */ +.typecho-login-wrap { display: table; margin: 0 auto; height: 100%; } -/* line 337, ../scss/style.scss */ -.typecho-page-title h2 a { - margin-left: 10px; - padding: 3px 8px; - background: #E9E9E6; - font-size: .8em; - border-radius: 2px; } +.typecho-login { display: table-cell; padding: 30px 0 100px; width: 280px; text-align: center; vertical-align: middle; } -/* line 345, ../scss/style.scss */ -.typecho-page-title h2 a:hover { - text-decoration: none; } +.typecho-login h1 { margin: 0 0 1em; } -/** -* 后台页面主体 -*/ -/** -* 主页主体 -*/ -/* line 359, ../scss/style.scss */ -.typecho-dashboard ul { - list-style: none; - padding: 0; } +.typecho-login .more-link { margin-top: 2em; color: #CCC; } -/* line 363, ../scss/style.scss */ -.typecho-dashboard li { - margin-bottom: 5px; } +.typecho-login .more-link a { margin: 0 3px; } -/** -* 标签页 -*/ -/* line 371, ../scss/style.scss */ -.typecho-option-tabs { - list-style: none; - margin: 1em 0 0; - padding: 0; - font-size: 13px; - text-align: center; } - /* line 377, ../scss/style.scss */ - .typecho-option-tabs.fix-tabs { - margin-bottom: 1em; } +/** 标题 */ +.typecho-page-title h2 { margin: 25px 0 10px; font-size: 1.28571em; } -/* line 382, ../scss/style.scss */ -.typecho-option-tabs a { - display: block; - margin-right: -1px; - border: 1px solid #D9D9D6; - padding: 0 15px; - height: 26px; - line-height: 26px; - color: #666; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; } +.typecho-page-title h2 a { margin-left: 10px; padding: 3px 8px; background: #E9E9E6; font-size: .8em; border-radius: 2px; } -/* line 393, ../scss/style.scss */ -.typecho-option-tabs a:hover { - background-color: #E9E9E6; - color: #666; - text-decoration: none; } +.typecho-page-title h2 a:hover { text-decoration: none; } -/* line 399, ../scss/style.scss */ -.typecho-option-tabs li { - float: left; } - /* line 401, ../scss/style.scss */ - .typecho-option-tabs li:first-child a { - -moz-border-radius: 2px 0 0 2px; - -webkit-border-radius: 2px; - border-radius: 2px 0 0 2px; } - /* line 404, ../scss/style.scss */ - .typecho-option-tabs li:last-child a { - -moz-border-radius: 0 2px 2px 0; - -webkit-border-radius: 0; - border-radius: 0 2px 2px 0; } +/** 后台页面主体 */ +/** 主页主体 */ +.typecho-dashboard ul { list-style: none; padding: 0; } -/* line 409, ../scss/style.scss */ -.typecho-option-tabs.right { - float: right; } +.typecho-dashboard li { margin-bottom: 5px; } -/* line 413, ../scss/style.scss */ -.typecho-option-tabs li.current a, -.typecho-option-tabs li.active a { - background-color: #E9E9E6; } +/** 标签页 */ +.typecho-option-tabs { list-style: none; margin: 1em 0 0; padding: 0; font-size: 13px; text-align: center; } -/** -* 表格列表页 -*/ -/** -* 列表页选项 -*/ -/* line 429, ../scss/style.scss */ -.typecho-list-operate { - margin: 1em 0; } +.typecho-option-tabs.fix-tabs { margin-bottom: 1em; } -/* line 433, ../scss/style.scss */ -.typecho-list-operate input, -.typecho-list-operate button, -.typecho-list-operate select { - vertical-align: bottom; } +.typecho-option-tabs a { display: block; margin-right: -1px; border: 1px solid #D9D9D6; padding: 0 15px; height: 26px; line-height: 26px; color: #666; box-sizing: border-box; } -/* line 439, ../scss/style.scss */ -.typecho-list-operate input[type="checkbox"] { - vertical-align: text-top; } +.typecho-option-tabs a:hover { background-color: #E9E9E6; color: #666; text-decoration: none; } -/* line 443, ../scss/style.scss */ -.typecho-list-operate .operate { - float: left; } +.typecho-option-tabs li { float: left; } -/* line 447, ../scss/style.scss */ -.typecho-list-operate .search { - float: right; } +.typecho-option-tabs li:first-child a { border-radius: 2px 0 0 2px; } -/* line 451, ../scss/style.scss */ -.typecho-list-operate span.operate-delete, a.operate-delete, -.typecho-list-operate span.operate-button-delete, a.operate-button-delete { - color: #B94A48; } +.typecho-option-tabs li:last-child a { border-radius: 0 2px 2px 0; } -/* line 456, ../scss/style.scss */ -a.operate-edit { - color: #007700; } +.typecho-option-tabs.right { float: right; } -/* line 460, ../scss/style.scss */ -a.operate-reply { - color: #545c30; } +.typecho-option-tabs li.current a, .typecho-option-tabs li.active a { background-color: #E9E9E6; } -/* line 464, ../scss/style.scss */ -.typecho-list-operate a:hover { - text-decoration: none; } +/** 表格列表页 */ +/** 列表页选项 */ +.typecho-list-operate { margin: 1em 0; } -/** -* 列表表格 -*/ +.typecho-list-operate input, .typecho-list-operate button, .typecho-list-operate select { vertical-align: bottom; } + +.typecho-list-operate input[type="checkbox"] { vertical-align: text-top; } + +.typecho-list-operate .operate { float: left; } + +.typecho-list-operate .search { float: right; } + +.typecho-list-operate span.operate-delete, a.operate-delete, .typecho-list-operate span.operate-button-delete, a.operate-button-delete { color: #B94A48; } + +a.operate-edit { color: #007700; } + +a.operate-reply { color: #545c30; } + +.typecho-list-operate a:hover { text-decoration: none; } + +/** 列表表格 */ /** 增加表格标题 by 70 */ -/* line 472, ../scss/style.scss */ -.typecho-list-table-title { - margin: 1em 0; - color: #999; - text-align: center; } - -/* line 477, ../scss/style.scss */ -.typecho-table-wrap { - padding: 30px; - background: #FFF; } - -/* line 481, ../scss/style.scss */ -.typecho-list-table { - width: 100%; - border-collapse: collapse; } - -/* line 486, ../scss/style.scss */ -.typecho-list-table.deactivate { - color: #999; } - -/* line 490, ../scss/style.scss */ -.typecho-list-table .right { - text-align: right; } - -/* line 494, ../scss/style.scss */ -.typecho-list-table th { - padding: 0 10px 10px; - border-bottom: 2px solid #F0F0EC; - text-align: left; } - -/* line 500, ../scss/style.scss */ -.typecho-list-table td { - padding: 10px; - border-top: 1px solid #F0F0EC; - word-break: break-all; } - -/* line 505, ../scss/style.scss */ -.typecho-list-table .status { - margin-left: 5px; - color: #999; - font-size: .92857em; - font-style: normal; } - -/* line 511, ../scss/style.scss */ -.typecho-list-table tbody tr:hover td { - background-color: #F6F6F3; } - -/* line 515, ../scss/style.scss */ -.typecho-list-table tbody tr.checked td { - background-color: #FFF9E8; } - -/* line 519, ../scss/style.scss */ -.warning { - color: #B94A48; } - -/* line 524, ../scss/style.scss */ -.typecho-list-table tr td .hidden-by-mouse { - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); - opacity: 0; } - -/* line 528, ../scss/style.scss */ -.typecho-list-table tr:hover td .hidden-by-mouse { - filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false); - opacity: 1; } - -/** -* 评论管理 -*/ -/* line 537, ../scss/style.scss */ -.comment-reply-content { - position: relative; - margin: 1em 0; - padding: 0 1em; - border: 1px solid transparent; - background-color: #F0F0EC; } - -/* line 544, ../scss/style.scss */ -.comment-reply-content:after { - position: absolute; - right: 1em; - border: 8px solid #F0F0EC; - border-color: #F0F0EC #F0F0EC transparent transparent; - content: " "; } - -/* line 552, ../scss/style.scss */ -.comment-meta span, -.comment-date { - font-size: .92857em; - color: #999; } - -/* line 558, ../scss/style.scss */ -.comment-action a, .comment-action span { - margin-right: 4px; } - -/* line 560, ../scss/style.scss */ -.comment-edit label { - display: block; } - -/* line 564, ../scss/style.scss */ -.comment-content img { - max-width: 100%; } - -/** -* 评论回复 -*/ -/* line 572, ../scss/style.scss */ -#typecho-respond { - padding: 10px; - display: none; } - -/** -* 模板列表 -*/ -/* line 590, ../scss/style.scss */ -.typecho-theme-list img { - margin: 1em 0; - max-width: 100%; - max-height: 240px; } - -/* line 596, ../scss/style.scss */ -.typecho-theme-list cite { - font-style: normal; - color: #999; } - -/* line 601, ../scss/style.scss */ -.typecho-theme-list tbody tr.current td { - background-color: #FFF9E8; } - -/** -* 后台配置项 -*/ -/* line 610, ../scss/style.scss */ -.typecho-page-main .typecho-option input.text { - width: 100%; } - -/* line 614, ../scss/style.scss */ -.typecho-page-main .typecho-option input.num { - width: 40px; } - -/* line 618, ../scss/style.scss */ -.typecho-page-main .typecho-option textarea { - width: 100%; - height: 100px; } - -/* line 623, ../scss/style.scss */ -.typecho-page-main .typecho-option .multiline { - display: block; - margin: .3em 0; } - /* line 626, ../scss/style.scss */ - .typecho-page-main .typecho-option .multiline.hidden { - display: none; } - -/** -* 编辑模板 -*/ -/* line 635, ../scss/style.scss */ -.typecho-select-theme { - height: 25px; - line-height: 25px; - margin: 15px 0px; } - -/* line 641, ../scss/style.scss */ -.typecho-select-theme h5 { - color: #E47E00; - font-weight: bold; - float: left; - font-size: 14px; - width: 120px; - margin-right: 10px; } - -/* line 650, ../scss/style.scss */ -.typecho-select-theme select { - width: 150px; } - -/** -* 编辑模板(编辑详情) -*/ -/* line 658, ../scss/style.scss */ -.typecho-edit-theme ul { - list-style: none; - margin: 0; - padding: 0; } - -/* line 664, ../scss/style.scss */ -.typecho-edit-theme li { - padding: 3px 10px; } - -/* line 668, ../scss/style.scss */ -.typecho-edit-theme .current { - background-color: #E6E6E3; } - -/* line 671, ../scss/style.scss */ -.typecho-edit-theme .current a { - color: #444; } - -/* line 675, ../scss/style.scss */ -.typecho-edit-theme textarea { - font-size: .92857em; - line-height: 1.2; - height: 500px; } - -/** -* 编写页面 -*/ -/* line 685, ../scss/style.scss */ -.typecho-post-area .edit-draft-notice { - color: #999; - font-size: .92857em; } - -/* line 689, ../scss/style.scss */ -.typecho-post-area .edit-draft-notice a { - color: #B94A48; } - -/* line 691, ../scss/style.scss */ -.typecho-post-area .typecho-label { - display: block; - margin: 1em 0 -0.5em; - font-weight: bold; } - -/* line 697, ../scss/style.scss */ -.typecho-post-area #auto-save-message { - display: block; - margin-top: 0.5em; - color: #999; - font-size: .92857em; } - -/* line 704, ../scss/style.scss */ -.typecho-post-area .submit .right button { - margin-left: 5px; } - -/* line 708, ../scss/style.scss */ -.typecho-post-area .right { - float: right; - padding-left: 24px; } - -/* line 713, ../scss/style.scss */ -.typecho-post-area .left { - float: left; } - -/* line 720, ../scss/style.scss */ -.typecho-post-area .out-date { - border: 1px solid #D3DBB3; - padding: 3px; - background: #fff; } - -/* line 726, ../scss/style.scss */ -.typecho-post-area input.title { - font-size: 1.17em; - font-weight: bold; } - -/* line 730, ../scss/style.scss */ -.typecho-post-area .url-slug { - margin-top: -0.5em; - color: #AAA; - font-size: .92857em; - word-break: break-word; } - -/* line 736, ../scss/style.scss */ -.typecho-post-area #slug { - padding: 2px; - border: none; - background: #FFFBCC; - color: #666; } - -/* line 743, ../scss/style.scss */ -.typecho-post-area #text { - resize: none; } - -/* line 747, ../scss/style.scss */ -#advance-panel { - display: none; } - -/* line 751, ../scss/style.scss */ -#custom-field { - margin: 1em 0; - padding: 10px 15px; - background: #FFF; } - /* line 756, ../scss/style.scss */ - #custom-field.fold table, #custom-field.fold .description { - display: none; } - /* line 759, ../scss/style.scss */ - #custom-field .description { - margin-top: 10px; - text-align: right; } - /* line 762, ../scss/style.scss */ - #custom-field .description button { - float: left; } - /* line 767, ../scss/style.scss */ - #custom-field p.description { - text-align: left; } - /* line 771, ../scss/style.scss */ - #custom-field .typecho-label { - margin: 0; } - /* line 773, ../scss/style.scss */ - #custom-field .typecho-label a { - display: block; - color: #444; } - /* line 776, ../scss/style.scss */ - #custom-field .typecho-label a:hover { - color: #467B96; - text-decoration: none; } - /* line 782, ../scss/style.scss */ - #custom-field table { - margin-top: 10px; } - /* line 785, ../scss/style.scss */ - #custom-field td { - padding: 10px 5px; - font-size: .92857em; - border-bottom: 1px solid #F0F0EC; - vertical-align: top; } - /* line 790, ../scss/style.scss */ - #custom-field td label { - font-size: 1em; - font-weight: normal; } - /* line 795, ../scss/style.scss */ - #custom-field select { - height: 27px; } - -/* line 798, ../scss/style.scss */ -.typecho-post-area .is-draft { - background: #FFF1A8; } - -/* line 802, ../scss/style.scss */ -.typecho-post-option .description { - margin-top: -0.5em; - color: #999; - font-size: .92857em; } - -/* line 808, ../scss/style.scss */ -.category-option ul { - list-style: none; - border: 1px solid #D9D9D6; - padding: 6px 12px; - max-height: 240px; - overflow: auto; - background-color: #FFF; - border-radius: 2px; } - -/* line 817, ../scss/style.scss */ -.category-option li { - margin: 3px 0; } - -/* line 821, ../scss/style.scss */ -.visibility-option ul, -.allow-option ul { - list-style: none; - padding: 0; } - -/** -* 标签列表 -*/ -/* line 832, ../scss/style.scss */ -.typecho-page-main ul.tag-list { - list-style: none; - margin: 0; - padding: 20px; - background-color: #FFF; } - -/* line 839, ../scss/style.scss */ -.typecho-page-main ul.tag-list li { - display: inline-block; - margin: 0 0 5px 0; - padding: 5px 5px 5px 10px; - cursor: pointer; } - -/* line 845, ../scss/style.scss */ -.typecho-page-main ul.tag-list li:hover { - background-color: #E9E9E6; } - -/* line 849, ../scss/style.scss */ -.typecho-page-main ul.tag-list li input { - display: none; } - -/* line 854, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.checked { - background-color: #FFFBCC; } - -/* line 858, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.size-5 { - font-size: 1em; } - -/* line 859, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.size-10 { - font-size: 1.2em; } - -/* line 860, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.size-20 { - font-size: 1.4em; } - -/* line 861, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.size-30 { - font-size: 1.6em; } - -/* line 862, ../scss/style.scss */ -.typecho-page-main ul.tag-list li.size-0 { - font-size: 1.8em; } - -/* line 864, ../scss/style.scss */ -.typecho-page-main .tag-edit-link { - visibility: hidden; } - -/* line 865, ../scss/style.scss */ -.typecho-page-main li:hover .tag-edit-link { - visibility: visible; } - -/* line 867, ../scss/style.scss */ -.typecho-attachment-photo { - border: 1px solid #E6E6E3; - max-width: 100%; } - -/* -* Upload -*/ -/* line 876, ../scss/style.scss */ -#upload-panel { - border: 1px dashed #D9D9D6; - background-color: #FFF; - color: #999; - font-size: .92857em; } - /* line 881, ../scss/style.scss */ - #upload-panel.drag { - background-color: #FFFBCC; } - -/* line 886, ../scss/style.scss */ -.upload-area { - padding: 15px; - text-align: center; } - -/* line 891, ../scss/style.scss */ -#file-list { - list-style: none; - margin: 0 10px; - padding: 0; - max-height: 450px; - overflow: auto; - word-break: break-all; } - /* line 898, ../scss/style.scss */ - #file-list li, - #file-list .insert { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; } - /* line 904, ../scss/style.scss */ - #file-list li { - padding: 8px 0; - border-top: 1px dashed #D9D9D6; } - /* line 908, ../scss/style.scss */ - #file-list .insert { - display: block; - max-width: 100%; } - /* line 912, ../scss/style.scss */ - #file-list .file { - margin-left: 5px; } - /* line 915, ../scss/style.scss */ - #file-list .info { - text-transform: uppercase; } - -/* line 920, ../scss/style.scss */ -#btn-fullscreen-upload { - visibility: hidden; } - -/** -* 附件管理 -*/ -/* line 928, ../scss/style.scss */ -.edit-media button { - margin-right: 6px; } +.typecho-list-table-title { margin: 1em 0; color: #999; text-align: center; } + +.typecho-table-wrap { padding: 30px; background: #FFF; } + +.typecho-list-table { width: 100%; border-collapse: collapse; table-layout: fixed; } + +.typecho-list-table.deactivate { color: #999; } + +.typecho-list-table .right { text-align: right; } + +.typecho-list-table th { padding: 0 10px 10px; border-bottom: 2px solid #F0F0EC; text-align: left; } + +.typecho-list-table td { padding: 10px; border-top: 1px solid #F0F0EC; word-break: break-all; } + +.typecho-list-table td pre { overflow: auto; } + +.typecho-list-table .status { margin-left: 5px; color: #999; font-size: .92857em; font-style: normal; } + +.typecho-list-table tbody tr:hover td { background-color: #F6F6F3; } + +.typecho-list-table tbody tr.checked td { background-color: #FFF9E8; } + +.typecho-list-table tr td .hidden-by-mouse { opacity: 0; } + +.typecho-list-table tr:hover td .hidden-by-mouse { opacity: 1; } + +.warning { color: #B94A48; } + +/** 评论管理 */ +.comment-reply-content { position: relative; margin: 1em 0; padding: 0 1em; border: 1px solid transparent; background-color: #F0F0EC; } + +.comment-reply-content:after { position: absolute; right: 1em; border: 8px solid #F0F0EC; border-color: #F0F0EC #F0F0EC transparent transparent; content: " "; } + +.comment-meta span, .comment-date { font-size: .92857em; color: #999; } + +.comment-action a, .comment-action span { margin-right: 4px; } + +.comment-edit label { display: block; } + +.comment-content img { max-width: 100%; } + +/** 评论回复 */ +#typecho-respond { padding: 10px; display: none; } + +/** 模板列表 */ +.typecho-theme-list img { margin: 1em 0; max-width: 100%; max-height: 240px; } + +.typecho-theme-list cite { font-style: normal; color: #999; } + +.typecho-theme-list tbody tr.current td { background-color: #FFF9E8; } + +/** 后台配置项 */ +.typecho-page-main .typecho-option input.text { width: 100%; } + +.typecho-page-main .typecho-option input.num { width: 40px; } + +.typecho-page-main .typecho-option textarea { width: 100%; height: 100px; } + +.typecho-page-main .typecho-option .multiline { display: block; margin: .3em 0; } + +.typecho-page-main .typecho-option .multiline.hidden { display: none; } + +/** 编辑模板 */ +.typecho-select-theme { height: 25px; line-height: 25px; margin: 15px 0px; } + +.typecho-select-theme h5 { color: #E47E00; font-weight: bold; float: left; font-size: 14px; width: 120px; margin-right: 10px; } + +.typecho-select-theme select { width: 150px; } + +/** 编辑模板(编辑详情) */ +.typecho-edit-theme ul { list-style: none; margin: 0; padding: 0; } + +.typecho-edit-theme li { padding: 3px 10px; } + +.typecho-edit-theme .current { background-color: #E6E6E3; } + +.typecho-edit-theme .current a { color: #444; } + +.typecho-edit-theme textarea { font-size: .92857em; line-height: 1.2; height: 500px; } + +/** 编写页面 */ +.typecho-post-area .edit-draft-notice { color: #999; font-size: .92857em; } + +.typecho-post-area .edit-draft-notice a { color: #B94A48; } + +.typecho-post-area .typecho-label { display: block; margin: 1em 0 -0.5em; font-weight: bold; } + +.typecho-post-area #auto-save-message { display: block; margin-top: 0.5em; color: #999; font-size: .92857em; } + +.typecho-post-area .submit .right button { margin-left: 5px; } + +.typecho-post-area .right { float: right; padding-left: 24px; } + +.typecho-post-area .left { float: left; } + +.typecho-post-area .out-date { border: 1px solid #D3DBB3; padding: 3px; background: #fff; } + +.typecho-post-area input.title { font-size: 1.17em; font-weight: bold; } + +.typecho-post-area .url-slug { margin-top: -0.5em; color: #AAA; font-size: .92857em; word-break: break-word; } + +.typecho-post-area #slug { padding: 2px; border: none; background: #FFFBCC; color: #666; } + +.typecho-post-area #text { resize: none; } + +#advance-panel { display: none; } + +#custom-field { margin: 1em 0; padding: 10px 15px; background: #FFF; } + +#custom-field.fold table, #custom-field.fold .description { display: none; } + +#custom-field .description { margin-top: 10px; text-align: right; } + +#custom-field .description button { float: left; } + +#custom-field p.description { text-align: left; } + +#custom-field .typecho-label { margin: 0; } + +#custom-field .typecho-label a { display: block; color: #444; } + +#custom-field .typecho-label a:hover { color: #467B96; text-decoration: none; } + +#custom-field table { margin-top: 10px; } + +#custom-field td { padding: 10px 5px; font-size: .92857em; border-bottom: 1px solid #F0F0EC; vertical-align: top; } + +#custom-field td label { font-size: 1em; font-weight: normal; } + +#custom-field select { height: 27px; } + +.typecho-post-area .is-draft { background: #FFF1A8; } + +.typecho-post-option .description { margin-top: -0.5em; color: #999; font-size: .92857em; } + +.category-option ul { list-style: none; border: 1px solid #D9D9D6; padding: 6px 12px; max-height: 240px; overflow: auto; background-color: #FFF; border-radius: 2px; } + +.category-option li { margin: 3px 0; } + +.visibility-option ul, .allow-option ul { list-style: none; padding: 0; } + +/** 标签列表 */ +.typecho-page-main ul.tag-list { list-style: none; margin: 0; padding: 20px; background-color: #FFF; } + +.typecho-page-main ul.tag-list li { display: inline-block; margin: 0 0 5px 0; padding: 5px 5px 5px 10px; cursor: pointer; } + +.typecho-page-main ul.tag-list li:hover { background-color: #E9E9E6; } + +.typecho-page-main ul.tag-list li input { display: none; } + +.typecho-page-main ul.tag-list li.checked { background-color: #FFFBCC; } + +.typecho-page-main ul.tag-list li.size-5 { font-size: 1em; } + +.typecho-page-main ul.tag-list li.size-10 { font-size: 1.2em; } + +.typecho-page-main ul.tag-list li.size-20 { font-size: 1.4em; } + +.typecho-page-main ul.tag-list li.size-30 { font-size: 1.6em; } + +.typecho-page-main ul.tag-list li.size-0 { font-size: 1.8em; } + +.typecho-page-main .tag-edit-link { visibility: hidden; } + +.typecho-page-main li:hover .tag-edit-link { visibility: visible; } + +.typecho-attachment-photo { border: 1px solid #E6E6E3; max-width: 100%; } + +/* Upload */ +#upload-panel { border: 1px dashed #D9D9D6; background-color: #FFF; color: #999; font-size: .92857em; } + +#upload-panel.drag { background-color: #FFFBCC; } + +.upload-area { padding: 15px; text-align: center; } + +#file-list { list-style: none; margin: 0 10px; padding: 0; max-height: 450px; overflow: auto; word-break: break-all; } + +#file-list li, #file-list .insert { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + +#file-list li { padding: 8px 0; border-top: 1px dashed #D9D9D6; } + +#file-list .insert { display: block; max-width: 100%; } + +#file-list .file { margin-left: 5px; } + +#file-list .info { text-transform: uppercase; } + +#btn-fullscreen-upload { visibility: hidden; } + +/** 附件管理 */ +.edit-media button { margin-right: 6px; } /* 拖动调整 textarea 大小 */ -/* line 931, ../scss/style.scss */ -.resize { - display: block; - margin: 2px auto 0; - padding: 2px 0; - border: 1px solid #D9D9D6; - border-width: 1px 0; - width: 60px; - cursor: row-resize; } - /* line 939, ../scss/style.scss */ - .resize i { - display: block; - height: 1px; - background-color: #D9D9D6; } +.resize { display: block; margin: 2px auto 0; padding: 2px 0; border: 1px solid #D9D9D6; border-width: 1px 0; width: 60px; cursor: row-resize; } + +.resize i { display: block; height: 1px; background-color: #D9D9D6; } /* 拖动排序 */ -/* line 947, ../scss/style.scss */ -.tDnD_whileDrag { - background-color: #FFFBCC; } +.tDnD_whileDrag { background-color: #FFFBCC; } -/** -* 导入扩展样式 -*/ -/** - * icons - */ -/* line 29, ../scss/_icons.scss */ -.i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow, .i-upload, .i-upload-active { - display: inline-block; - vertical-align: text-bottom; - text-indent: -9999em; - background-image: url('../img/icons-s0c4f1c5ae6.png'); - background-repeat: no-repeat; } - /* line 35, ../scss/_icons.scss */ - .i-edit:hover, .i-delete:hover, .i-exlink:hover, .mime-office:hover, .mime-text:hover, .mime-image:hover, .mime-html:hover, .mime-archive:hover, .mime-application:hover, .mime-audio:hover, .mime-script:hover, .mime-video:hover, .mime-unknow:hover, .i-upload:hover, .i-upload-active:hover { - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75); - opacity: 0.75; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 29, ../scss/_icons.scss */ - .i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow, .i-upload, .i-upload-active { - -moz-background-size: auto 256px; - -o-background-size: auto 256px; - -webkit-background-size: auto 256px; - background-size: auto 256px; - background-image: url('../img/icons-2x-s481937020b.png'); } } +/** 导入扩展样式 */ +/** icons */ +.icons-sprite, .icons-icon-delete, .icons-icon-edit, .icons-icon-exlink, .icons-icon-upload-active, .icons-icon-upload, .icons-mime-application, .icons-mime-archive, .icons-mime-audio, .icons-mime-html, .icons-mime-image, .icons-mime-office, .icons-mime-script, .icons-mime-text, .icons-mime-unknow, .icons-mime-video, .i-edit, .i-delete, .i-upload, .i-upload-active, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow { background-image: url("../img/icons.png?_=01c3ae1"); background-repeat: no-repeat; } -/* line 47, ../scss/_icons.scss */ -.i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow { - width: 16px; - height: 16px; } +.icons-icon-delete { background-position: 0 -16px; width: 16px; height: 16px; } -/* line 53, ../scss/_icons.scss */ -.i-upload, .i-upload-active { - width: 24px; - height: 24px; } +.icons-icon-edit { background-position: 0 -112px; width: 16px; height: 16px; } -/* line 59, ../scss/_icons.scss */ -.i-edit { - background-position: 0 -16px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 59, ../scss/_icons.scss */ - .i-edit { - background-position: 0 -16px; } } +.icons-icon-exlink { background-position: 0 -32px; width: 16px; height: 16px; } -/* line 63, ../scss/_icons.scss */ -.i-delete { - background-position: 0 0; } +.icons-icon-upload-active { background-position: 0 -232px; width: 24px; height: 24px; } -/* line 71, ../scss/_icons.scss */ -.i-upload { - background-position: 0 -72px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 71, ../scss/_icons.scss */ - .i-upload { - background-position: 0 -72px; } } +.icons-icon-upload { background-position: 0 -208px; width: 24px; height: 24px; } -/* line 76, ../scss/_icons.scss */ -.i-upload-active { - background-position: 0 -48px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 76, ../scss/_icons.scss */ - .i-upload-active { - background-position: 0 -48px; } } +.icons-icon-upload:active, .icons-icon-upload.icon-upload-active { background-position: 0 -232px; } -/* line 82, ../scss/_icons.scss */ -.i-caret-up, .i-caret-down, .i-caret-left, .i-caret-right { - display: inline-block; - border-style: solid; - border-color: transparent transparent #BBB transparent; - border-width: 3px 4px 5px; } +.icons-mime-application { background-position: 0 -80px; width: 16px; height: 16px; } -/* line 88, ../scss/_icons.scss */ -.i-caret-down { - border-color: #BBB transparent transparent transparent; - border-width: 5px 4px 3px; } +.icons-mime-archive { background-position: 0 -96px; width: 16px; height: 16px; } -/* line 92, ../scss/_icons.scss */ -.i-caret-left { - border-color: transparent #BBB transparent transparent; - border-width: 4px 5px 4px 3px; } +.icons-mime-audio { background-position: 0 0; width: 16px; height: 16px; } -/* line 96, ../scss/_icons.scss */ -.i-caret-right { - border-color: transparent transparent transparent #BBB; - border-width: 4px 3px 4px 5px; } +.icons-mime-html { background-position: 0 -128px; width: 16px; height: 16px; } -/* line 101, ../scss/_icons.scss */ -.i-exlink { - background-position: 0 -32px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 101, ../scss/_icons.scss */ - .i-exlink { - background-position: 0 -32px; } } +.icons-mime-image { background-position: 0 -144px; width: 16px; height: 16px; } + +.icons-mime-office { background-position: 0 -160px; width: 16px; height: 16px; } + +.icons-mime-script { background-position: 0 -176px; width: 16px; height: 16px; } + +.icons-mime-text { background-position: 0 -64px; width: 16px; height: 16px; } + +.icons-mime-unknow { background-position: 0 -48px; width: 16px; height: 16px; } + +.icons-mime-video { background-position: 0 -192px; width: 16px; height: 16px; } + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .icons-sprite, .icons-icon-delete, .icons-icon-edit, .icons-icon-exlink, .icons-icon-upload-active, .icons-icon-upload, .icons-mime-application, .icons-mime-archive, .icons-mime-audio, .icons-mime-html, .icons-mime-image, .icons-mime-office, .icons-mime-script, .icons-mime-text, .icons-mime-unknow, .icons-mime-video { background-image: url("../img/icons-2x.png?_=dffe302"); background-repeat: no-repeat; } + .icons-icon-delete { background-position: 0 -32px; } + .icons-icon-edit { background-position: 0 -224px; } + .icons-icon-exlink { background-position: 0 -64px; } + .icons-icon-upload-active { background-position: 0 -464px; } + .icons-icon-upload { background-position: 0 -416px; } + .icons-icon-upload:active, .icons-icon-upload.icon-upload-active { background-position: 0 -464px; } + .icons-mime-application { background-position: 0 -160px; } + .icons-mime-archive { background-position: 0 -192px; } + .icons-mime-audio { background-position: 0 0; } + .icons-mime-html { background-position: 0 -256px; } + .icons-mime-image { background-position: 0 -288px; } + .icons-mime-office { background-position: 0 -320px; } + .icons-mime-script { background-position: 0 -352px; } + .icons-mime-text { background-position: 0 -128px; } + .icons-mime-unknow { background-position: 0 -96px; } + .icons-mime-video { background-position: 0 -384px; } } + +/* @mixin sprite-background($name) { // background-image: sprite-url($sprites); // background-position: sprite-position($sprites, $name); @include icons-sprite($name); // background-repeat: no-repeat; // display: block; // height: image-height(sprite-file($sprites, $name)); // width: image-width(sprite-file($sprites, $name)); @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { @include icons-2x-sprite($name); // Workaround for https://gist.github.com/2140082 //@if (sprite-position($sprites, $name) != sprite-position($sprites-retina, $name)) { // $ypos: round(nth(sprite-position($sprites-retina, $name), 2) / 2); // background-position: 0 $ypos; //} // Hard coded width of the normal sprite image. There must be a smarter way to do this. // @include background-size(auto 256px); // background-image: sprite-url($sprites-retina); } } */ +.i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow, .i-upload, .i-upload-active { display: inline-block; vertical-align: text-bottom; text-indent: -9999em; } + +.i-edit:hover, .i-delete:hover, .i-exlink:hover, .mime-office:hover, .mime-text:hover, .mime-image:hover, .mime-html:hover, .mime-archive:hover, .mime-application:hover, .mime-audio:hover, .mime-script:hover, .mime-video:hover, .mime-unknow:hover, .i-upload:hover, .i-upload-active:hover { opacity: 0.75; } + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow, .i-upload, .i-upload-active { background-size: auto 256px; } } + +.i-edit, .i-delete, .i-exlink, .mime-office, .mime-text, .mime-image, .mime-html, .mime-archive, .mime-application, .mime-audio, .mime-script, .mime-video, .mime-unknow { width: 16px; height: 16px; } + +.i-upload, .i-upload-active { width: 24px; height: 24px; } + +.i-edit { background-position: 0 -112px; } + +.i-delete { background-position: 0 -16px; } + +.i-upload { background-position: 0 -208px; } + +.i-upload:active, .i-upload.icon-upload-active { background-position: 0 -232px; } + +.i-upload-active { background-position: 0 -232px; } + +.i-caret-up, .i-caret-down, .i-caret-left, .i-caret-right { display: inline-block; border-style: solid; border-color: transparent transparent #BBB transparent; border-width: 3px 4px 5px; } + +.i-caret-down { border-color: #BBB transparent transparent transparent; border-width: 5px 4px 3px; } + +.i-caret-left { border-color: transparent #BBB transparent transparent; border-width: 4px 5px 4px 3px; } + +.i-caret-right { border-color: transparent transparent transparent #BBB; border-width: 4px 3px 4px 5px; } + +.i-exlink { background-position: 0 -32px; } /* 文件类型图标 */ -/* line 109, ../scss/_icons.scss */ -.mime-office { - background-position: 0 -176px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 109, ../scss/_icons.scss */ - .mime-office { - background-position: 0 -176px; } } +.mime-office { background-position: 0 -160px; } -/* line 114, ../scss/_icons.scss */ -.mime-text { - background-position: 0 -208px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 114, ../scss/_icons.scss */ - .mime-text { - background-position: 0 -208px; } } +.mime-text { background-position: 0 -64px; } -/* line 119, ../scss/_icons.scss */ -.mime-image { - background-position: 0 -160px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 119, ../scss/_icons.scss */ - .mime-image { - background-position: 0 -160px; } } +.mime-image { background-position: 0 -144px; } -/* line 124, ../scss/_icons.scss */ -.mime-html { - background-position: 0 -144px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 124, ../scss/_icons.scss */ - .mime-html { - background-position: 0 -144px; } } +.mime-html { background-position: 0 -128px; } -/* line 129, ../scss/_icons.scss */ -.mime-archive { - background-position: 0 -112px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 129, ../scss/_icons.scss */ - .mime-archive { - background-position: 0 -112px; } } +.mime-archive { background-position: 0 -96px; } -/* line 134, ../scss/_icons.scss */ -.mime-application { - background-position: 0 -96px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 134, ../scss/_icons.scss */ - .mime-application { - background-position: 0 -96px; } } +.mime-application { background-position: 0 -80px; } -/* line 139, ../scss/_icons.scss */ -.mime-audio { - background-position: 0 -128px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 139, ../scss/_icons.scss */ - .mime-audio { - background-position: 0 -128px; } } +.mime-audio { background-position: 0 0; } -/* line 144, ../scss/_icons.scss */ -.mime-script { - background-position: 0 -192px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 144, ../scss/_icons.scss */ - .mime-script { - background-position: 0 -192px; } } +.mime-script { background-position: 0 -176px; } -/* line 149, ../scss/_icons.scss */ -.mime-video { - background-position: 0 -240px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 149, ../scss/_icons.scss */ - .mime-video { - background-position: 0 -240px; } } +.mime-video { background-position: 0 -192px; } -/* line 154, ../scss/_icons.scss */ -.mime-unknow { - background-position: 0 -224px; } - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 154, ../scss/_icons.scss */ - .mime-unknow { - background-position: 0 -224px; } } +.mime-unknow { background-position: 0 -48px; } /* Logo 图标 */ -/* line 161, ../scss/_icons.scss */ -.i-logo, .i-logo-s { - width: 169px; - height: 40px; - display: inline-block; - background: url("../img/typecho-logo.svg") no-repeat; - text-indent: -9999em; - -moz-background-size: auto 40px; - -o-background-size: auto 40px; - -webkit-background-size: auto 40px; - background-size: auto 40px; - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=15); - opacity: 0.15; } - /* line 169, ../scss/_icons.scss */ - .i-logo:hover, .i-logo-s:hover { - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20); - opacity: 0.2; } +.i-logo, .i-logo-s { width: 169px; height: 40px; display: inline-block; background: url("../img/typecho-logo.svg") no-repeat; text-indent: -9999em; background-size: auto 40px; opacity: .15; } -/* line 173, ../scss/_icons.scss */ -.i-logo-s { - width: 26px; - height: 26px; - -moz-background-size: auto 26px; - -o-background-size: auto 26px; - -webkit-background-size: auto 26px; - background-size: auto 26px; } +.i-logo:hover, .i-logo-s:hover { opacity: .2; } -/* -* Editor -*/ -/* line 4, ../scss/components/_editor.scss */ -.editor { - margin-bottom: -0.5em; } +.i-logo-s { width: 26px; height: 26px; background-size: auto 26px; } -/* line 8, ../scss/components/_editor.scss */ -.wmd-button-row { - list-style: none; - margin: 0; - padding: 0; - height: 26px; - line-height: 1; } - /* line 15, ../scss/components/_editor.scss */ - .wmd-button-row li { - display: inline-block; - margin-right: 4px; - padding: 3px; - cursor: pointer; - vertical-align: middle; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; } - /* line 22, ../scss/components/_editor.scss */ - .wmd-button-row li:hover { - background-color: #E9E9E6; } - /* line 25, ../scss/components/_editor.scss */ - .wmd-button-row li.wmd-spacer { - height: 20px; - margin: 0 10px 0 6px; - padding: 0; - width: 1px; - background: #E9E9E6; - cursor: default; } +/* Editor */ +.editor { margin-bottom: -0.5em; } -/* line 36, ../scss/components/_editor.scss */ -#wmd-button-row span { - display: block; - width: 20px; - height: 20px; - background: transparent url(../img/editor.png) no-repeat; } +.wmd-button-row { list-style: none; margin: 0; padding: 0; height: 26px; line-height: 1; } -/* line 43, ../scss/components/_editor.scss */ -#btn-cancel-preview { - display: none; } +.wmd-button-row li { display: inline-block; margin-right: 4px; padding: 3px; cursor: pointer; vertical-align: middle; border-radius: 2px; } -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - /* line 48, ../scss/components/_editor.scss */ - #wmd-button-row span { - background-image: url(../img/editor@2x.png); - -moz-background-size: 320px auto; - -o-background-size: 320px auto; - -webkit-background-size: 320px auto; - background-size: 320px auto; } } -/* line 55, ../scss/components/_editor.scss */ -.wmd-edittab { - float: right; - margin-top: 3px; - font-size: .92857em; } - /* line 59, ../scss/components/_editor.scss */ - .wmd-edittab a { - display: inline-block; - padding: 0 8px; - margin-left: 5px; - height: 20px; - line-height: 20px; } - /* line 65, ../scss/components/_editor.scss */ - .wmd-edittab a:hover { - text-decoration: none; } - /* line 68, ../scss/components/_editor.scss */ - .wmd-edittab a.active { - background: #E9E9E6; - color: #999; } +.wmd-button-row li:hover { background-color: #E9E9E6; } -/* line 76, ../scss/components/_editor.scss */ -.wmd-hidetab { - display: none; } +.wmd-button-row li.wmd-spacer { height: 20px; margin: 0 10px 0 6px; padding: 0; width: 1px; background: #E9E9E6; cursor: default; } -/* line 80, ../scss/components/_editor.scss */ -.wmd-visualhide { - visibility: hidden; } +#wmd-button-row span { display: block; width: 20px; height: 20px; background: transparent url(../img/editor.png) no-repeat; } + +#btn-cancel-preview { display: none; } + +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { #wmd-button-row span { background-image: url(../img/editor@2x.png); background-size: 320px auto; } } + +.wmd-edittab { float: right; margin-top: 3px; font-size: .92857em; } + +.wmd-edittab a { display: inline-block; padding: 0 8px; margin-left: 5px; height: 20px; line-height: 20px; } + +.wmd-edittab a:hover { text-decoration: none; } + +.wmd-edittab a.active { background: #E9E9E6; color: #999; } + +.wmd-hidetab { display: none; } + +.wmd-visualhide { visibility: hidden; } /* 对话框 */ -/* line 85, ../scss/components/_editor.scss */ -.wmd-prompt-background { - background-color: #000; } +.wmd-prompt-background { background-color: #000; } -/* line 88, ../scss/components/_editor.scss */ -.wmd-prompt-dialog { - position: fixed; - z-index: 1001; - top: 50%; - left: 50%; - margin-top: -95px; - margin-left: -200px; - padding: 20px; - width: 360px; - background: #F6F6F3; } - /* line 99, ../scss/components/_editor.scss */ - .wmd-prompt-dialog p { - margin: 0 0 5px; } - /* line 100, ../scss/components/_editor.scss */ - .wmd-prompt-dialog form { - margin-top: 10px; } - /* line 101, ../scss/components/_editor.scss */ - .wmd-prompt-dialog input[type="text"] { - margin-bottom: 10px; - width: 100%; } - /* line 105, ../scss/components/_editor.scss */ - .wmd-prompt-dialog button { - margin-right: 10px; } +.wmd-prompt-dialog { position: fixed; z-index: 1001; top: 50%; left: 50%; margin-top: -95px; margin-left: -200px; padding: 20px; width: 360px; background: #F6F6F3; } + +.wmd-prompt-dialog p { margin: 0 0 5px; } + +.wmd-prompt-dialog form { margin-top: 10px; } + +.wmd-prompt-dialog input[type="text"] { margin-bottom: 10px; width: 100%; } + +.wmd-prompt-dialog button { margin-right: 10px; } /* 预览 */ -/* line 109, ../scss/components/_editor.scss */ -#wmd-preview { - background: #FFF; - margin: 1em 0; - padding: 0 15px; - word-wrap: break-word; - overflow: auto; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; } - /* line 116, ../scss/components/_editor.scss */ - #wmd-preview img { - max-width: 100%; } - /* line 117, ../scss/components/_editor.scss */ - #wmd-preview code, #wmd-preview pre { - padding: 2px 4px; - background: #DDD; - font-size: 14px; } - /* line 122, ../scss/components/_editor.scss */ - #wmd-preview code { - color: #C13; } - /* line 123, ../scss/components/_editor.scss */ - #wmd-preview pre { - padding: 1em; } - /* line 125, ../scss/components/_editor.scss */ - #wmd-preview pre code { - padding: 0; - color: #444; - white-space: pre-wrap;} - /* line 130, ../scss/components/_editor.scss */ - #wmd-preview blockquote { - margin: 1em 1.5em; - padding-left: 1.5em; - border-left: 4px solid #E9E9E6; - color: #777; } - /* line 136, ../scss/components/_editor.scss */ - #wmd-preview hr { - margin: 2em auto; - width: 100px; - border: 1px solid #E9E9E6; - border-width: 2px 0 0 0; } - /* line 142, ../scss/components/_editor.scss */ - #wmd-preview .summary:after { - display: block; - margin: 2em 0; - background: #FFF9E8; - color: #cf9900; - font-size: .85714em; - text-align: center; - content: "- more -"; } - /* line 152, ../scss/components/_editor.scss */ - #wmd-preview table { - width: 100%; } - /* line 156, ../scss/components/_editor.scss */ - #wmd-preview table th, #wmd-preview table td { - border: 1px solid #DDD; - padding: 5px 8px; - word-break: break-all; } - /* line 162, ../scss/components/_editor.scss */ - #wmd-preview table th { - background: #EEE; } - /* line 165, ../scss/components/_editor.scss */ - #wmd-preview span.line { - display: inline; - height: 1px; - line-height: 1px; - position: absolute; } - /* line 172, ../scss/components/_editor.scss */ - #wmd-preview .focus, #wmd-preview .focus * { - background-color: rgba(255, 230, 0, 0.5) !important; } +#wmd-preview { background: #FFF; margin: 1em 0; padding: 0 15px; word-wrap: break-word; overflow: auto; border-radius: 2px; } + +#wmd-preview img { max-width: 100%; } + +#wmd-preview code, #wmd-preview pre { padding: 2px 4px; background: #DDD; font-size: 14px; } + +#wmd-preview code { color: #C13; } + +#wmd-preview pre { padding: 1em; } + +#wmd-preview pre code { padding: 0; color: #444; } + +#wmd-preview blockquote { margin: 1em 1.5em; padding-left: 1.5em; border-left: 4px solid #E9E9E6; color: #777; } + +#wmd-preview hr { margin: 2em auto; width: 100px; border: 1px solid #E9E9E6; border-width: 2px 0 0 0; } + +#wmd-preview .summary:after { display: block; margin: 2em 0; background: #FFF9E8; color: #cf9900; font-size: .85714em; text-align: center; content: "- more -"; } + +#wmd-preview table { width: 100%; } + +#wmd-preview table th, #wmd-preview table td { border: 1px solid #DDD; padding: 5px 8px; word-break: break-all; } + +#wmd-preview table th { background: #EEE; } + +#wmd-preview span.line { display: inline; height: 1px; line-height: 1px; position: absolute; } + +#wmd-preview .focus, #wmd-preview .focus * { background-color: rgba(255, 230, 0, 0.5) !important; } /* 上传面板动画效果 */ -@keyframes fullscreen-upload { - 0% { - right: -280px; } - 100% { - right: -1px; } } -@-moz-keyframes fullscreen-upload { - 0% { - right: -280px; } - 100% { - right: -1px; } } -@-webkit-keyframes fullscreen-upload { - 0% { - right: -280px; } - 100% { - right: -1px; } } -@-o-keyframes fullscreen-upload { - 0% { - right: -280px; } - 100% { - right: -1px; } } +@keyframes fullscreen-upload { 0% { right: -280px; } + 100% { right: -1px; } } + +@-moz-keyframes fullscreen-upload { 0% { right: -280px; } + 100% { right: -1px; } } + +@-webkit-keyframes fullscreen-upload { 0% { right: -280px; } + 100% { right: -1px; } } + +@-o-keyframes fullscreen-upload { 0% { right: -280px; } + 100% { right: -1px; } } + /* 编辑器全屏 */ -/* line 200, ../scss/components/_editor.scss */ -.fullscreen #wmd-button-bar, .fullscreen #text, .fullscreen #wmd-preview, .fullscreen .submit { - position: absolute; - top: 0; - width: 50%; - background: #FFF; - z-index: 999; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; } -/* line 210, ../scss/components/_editor.scss */ -.fullscreen #wmd-button-bar { - left: 0; - padding: 13px 20px; - border-bottom: 1px solid #F3F3F0; - z-index: 1000; } -/* line 216, ../scss/components/_editor.scss */ -.fullscreen #text { - top: 53px; - left: 0; - padding: 20px; - border: none; - outline: none; } -/* line 223, ../scss/components/_editor.scss */ -.fullscreen #wmd-preview { - top: 53px; - right: 0; - margin: 0; - padding: 5px 20px; - border: none; - border-left: 1px solid #F3F3F0; - background: #F6F6F3; - overflow: auto; } -/* line 233, ../scss/components/_editor.scss */ -.fullscreen .submit { - right: 0; - margin: 0; - padding: 10px 20px; - border-bottom: 1px solid #F3F3F0; } -/* line 239, ../scss/components/_editor.scss */ -.fullscreen #upload-panel { - -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.225); - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.225); - border-style: solid; } -/* line 246, ../scss/components/_editor.scss */ -.fullscreen #tab-files { - position: absolute; - top: 52px; - right: -1px; - width: 280px; - z-index: 1001; - animation: fullscreen-upload 0.5s; - -moz-animation: fullscreen-upload 0.5s; - -webkit-animation: fullscreen-upload 0.5s; - -o-animation: fullscreen-upload 0.5s; } -/* line 259, ../scss/components/_editor.scss */ -.fullscreen .wmd-edittab, -.fullscreen .typecho-post-option, -.fullscreen .title, -.fullscreen .url-slug, -.fullscreen .typecho-page-title, -.fullscreen .typecho-head-nav, -.fullscreen .message { - display: none; } -/* line 266, ../scss/components/_editor.scss */ -.fullscreen .wmd-hidetab { - display: block; } -/* line 267, ../scss/components/_editor.scss */ -.fullscreen .wmd-visualhide, -.fullscreen #btn-fullscreen-upload { - visibility: visible; } +.fullscreen #wmd-button-bar, .fullscreen #text, .fullscreen #wmd-preview, .fullscreen .submit { position: absolute; top: 0; width: 50%; background: #FFF; z-index: 999; box-sizing: border-box; border-radius: 0; } -/* line 274, ../scss/components/_editor.scss */ -.preview .submit { - width: 100%; - background: #FFFFDD; } -/* line 275, ../scss/components/_editor.scss */ -.preview #wmd-button-bar, .preview #wmd-preview, .preview #text, .preview #upload-panel, .preview #tab-files, .preview #btn-preview, .preview #btn-fullscreen-upload, .preview #auto-save-message { - display: none; } -/* line 276, ../scss/components/_editor.scss */ -.preview .preview-frame { - width: 100%; - border: 0; - padding: 0; - margin: 0; - background: #fff; - z-index: 999; - position: absolute; - top: 53px; - left: 0; } -/* line 279, ../scss/components/_editor.scss */ -.preview .preview-loading { - background-image: url(../img/ajax-loader.gif); - background-position: center; - background-repeat: no-repeat; } -/* line 280, ../scss/components/_editor.scss */ -.preview #btn-cancel-preview { - display: inline-block; } +.fullscreen #wmd-button-bar { left: 0; padding: 13px 20px; border-bottom: 1px solid #F3F3F0; z-index: 1000; } -/** -* Jquery Timepicker -*/ -/* line 5, ../scss/components/_timepicker.scss */ -#ui-datepicker-div { - display: none; - margin-top: -1px; - padding: 10px; - border: 1px solid #D9D9D6; - background: #FFF; } +.fullscreen #text { top: 53px; left: 0; padding: 20px; border: none; outline: none; } -/* line 12, ../scss/components/_timepicker.scss */ -.ui-timepicker-div .ui-widget-header { - margin-bottom: 8px; } +.fullscreen #wmd-preview { top: 53px; right: 0; margin: 0; padding: 5px 20px; border: none; border-left: 1px solid #F3F3F0; background: #F6F6F3; overflow: auto; } -/* line 13, ../scss/components/_timepicker.scss */ -.ui-timepicker-div dl { - text-align: left; } +.fullscreen .submit { right: 0; margin: 0; padding: 10px 20px; border-bottom: 1px solid #F3F3F0; } -/* line 14, ../scss/components/_timepicker.scss */ -.ui-timepicker-div dl dt { - float: left; - clear: left; } +.fullscreen #upload-panel { -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.225); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.225); border-style: solid; } -/* line 15, ../scss/components/_timepicker.scss */ -.ui-timepicker-div dl dd { - margin: 0 0 10px 40%; } +.fullscreen #tab-files { position: absolute; top: 52px; right: -1px; width: 280px; z-index: 1001; animation: fullscreen-upload 0.5s; -moz-animation: fullscreen-upload 0.5s; -webkit-animation: fullscreen-upload 0.5s; -o-animation: fullscreen-upload 0.5s; } -/* line 16, ../scss/components/_timepicker.scss */ -.ui-tpicker-grid-label { - background: none; - border: none; - margin: 0; - padding: 0; } +.fullscreen .wmd-edittab, .fullscreen .typecho-post-option, .fullscreen .title, .fullscreen .url-slug, .fullscreen .typecho-page-title, .fullscreen .typecho-head-nav, .fullscreen .message { display: none; } -/* line 18, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-header { - margin-bottom: 10px; - padding-bottom: 10px; - border-bottom: 1px solid #EEE; } +.fullscreen .wmd-hidetab { display: block; } -/* line 23, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-prev { - float: left; - cursor: pointer; } +.fullscreen .wmd-visualhide, .fullscreen #btn-fullscreen-upload { visibility: visible; } -/* line 24, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-next { - float: right; - cursor: pointer; } +.preview .submit { width: 100%; background: #FFFFDD; } -/* line 25, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-title { - font-weight: bold; - text-align: center; } +.preview #wmd-button-bar, .preview #wmd-preview, .preview #text, .preview #upload-panel, .preview #tab-files, .preview #btn-preview, .preview #btn-fullscreen-upload, .preview #auto-save-message { display: none; } -/* line 29, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-calendar th { - line-height: 24px; } +.preview .preview-frame { width: 100%; border: 0; padding: 0; margin: 0; background: #fff; z-index: 999; position: absolute; top: 53px; left: 0; } -/* line 30, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-calendar a { - display: block; - width: 30px; - background-color: #F3F3F0; - line-height: 24px; - text-align: center; } +.preview .preview-loading { background-image: url(../img/ajax-loader.gif); background-position: center; background-repeat: no-repeat; } -/* line 37, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-calendar a:hover { - background-color: #E9E9E6; - text-decoration: none; } +.preview #btn-cancel-preview { display: inline-block; } -/* line 41, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-today a { - background-color: #E9E9E6; - color: #444; } +/** Jquery Timepicker */ +#ui-datepicker-div { display: none; margin-top: -1px; padding: 10px; border: 1px solid #D9D9D6; background: #FFF; } -/* line 45, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-current-day a { - background-color: #467B96 !important; - color: #FFF; } +.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } -/* line 49, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-timepicker-div { - margin-top: 20px; - border-top: 1px solid #EEE; } +.ui-timepicker-div dl { text-align: left; } -/* line 53, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-slider { - position: relative; - margin-top: 18px; - border: 1px solid #E9E9E6; - background-color: #F6F6F3; - height: 4px; } +.ui-timepicker-div dl dt { float: left; clear: left; } -/* line 60, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-slider .ui-slider-handle { - position: absolute; - top: -7px; - margin-left: -5px; - z-index: 2; - width: 10px; - height: 16px; - background-color: #467B96; } +.ui-timepicker-div dl dd { margin: 0 0 10px 40%; } -/* line 70, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-buttonpane { - padding-top: 10px; - border-top: 1px solid #EEE; } +.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } -/* line 74, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-current, -#ui-datepicker-div .ui-datepicker-close { - float: left; } +#ui-datepicker-div .ui-datepicker-header { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #EEE; } -/* line 80, ../scss/components/_timepicker.scss */ -#ui-datepicker-div .ui-datepicker-close { - float: right; } +#ui-datepicker-div .ui-datepicker-prev { float: left; cursor: pointer; } -/* line 84, ../scss/components/_timepicker.scss */ -.ui-effects-transfer { - border: 2px dotted #ccc; } +#ui-datepicker-div .ui-datepicker-next { float: right; cursor: pointer; } -/** -* Jquery Tokeninput -*/ -/* line 5, ../scss/components/_tokeninput.scss */ -ul.token-input-list { - list-style: none; - margin: 0; - padding: 0 4px; - min-height: 32px; - border: 1px solid #D9D9D6; - cursor: text; - z-index: 999; - background-color: #FFF; - clear: left; - border-radius: 2px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } - /* line 22, ../scss/components/_tokeninput.scss */ - ul.token-input-list li { - margin: 4px 0; } +#ui-datepicker-div .ui-datepicker-title { font-weight: bold; text-align: center; } -/* line 28, ../scss/components/_tokeninput.scss */ -ul.token-input-list li input { - padding: 0; - border: 0; - width: 100%; - -webkit-appearance: caret; } +#ui-datepicker-div .ui-datepicker-calendar th { line-height: 24px; } -/* line 35, ../scss/components/_tokeninput.scss */ -li.token-input-token { - padding: 0 6px; - height: 27px; - line-height: 27px; - background-color: #F3F3F0; - cursor: default; - font-size: .92857em; - text-align: right; - white-space: nowrap; } - /* line 44, ../scss/components/_tokeninput.scss */ - li.token-input-token p { - float: left; - display: inline; - margin: 0; } - /* line 49, ../scss/components/_tokeninput.scss */ - li.token-input-token span { - color: #BBB; - font-weight: bold; - cursor: pointer; } +#ui-datepicker-div .ui-datepicker-calendar a { display: block; width: 30px; background-color: #F3F3F0; line-height: 24px; text-align: center; } -/* line 58, ../scss/components/_tokeninput.scss */ -li.token-input-selected-token { - background-color: #E9E9E6; } +#ui-datepicker-div .ui-datepicker-calendar a:hover { background-color: #E9E9E6; text-decoration: none; } -/* line 62, ../scss/components/_tokeninput.scss */ -li.token-input-input-token { - padding: 0 4px; } +#ui-datepicker-div .ui-datepicker-today a { background-color: #E9E9E6; color: #444; } -/* line 66, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown { - position: absolute; - background-color: #FFF; - overflow: hidden; - border: 1px solid #D9D9D6; - border-top-width: 0; - cursor: default; - z-index: 1; - font-size: .92857em; } +#ui-datepicker-div .ui-datepicker-current-day a { background-color: #467B96 !important; color: #FFF; } -/* line 77, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown p { - margin: 0; - padding: 5px 10px; - color: #777; - font-weight: bold; } +#ui-datepicker-div .ui-timepicker-div { margin-top: 20px; border-top: 1px solid #EEE; } -/* line 84, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown ul { - list-style: none; - margin: 0; - padding: 0; } +#ui-datepicker-div .ui-slider { position: relative; margin-top: 18px; border: 1px solid #E9E9E6; background-color: #F6F6F3; height: 4px; } -/* line 90, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown ul li { - padding: 4px 10px; - background-color: #FFF; } +#ui-datepicker-div .ui-slider .ui-slider-handle { position: absolute; top: -7px; margin-left: -5px; z-index: 2; width: 10px; height: 16px; background-color: #467B96; } -/* line 95, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown ul li.token-input-dropdown-item { - background-color: #FFF; } +#ui-datepicker-div .ui-datepicker-buttonpane { padding-top: 10px; border-top: 1px solid #EEE; } -/* line 99, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown ul li em { - font-style: normal; } +#ui-datepicker-div .ui-datepicker-current, #ui-datepicker-div .ui-datepicker-close { float: left; } -/* line 103, ../scss/components/_tokeninput.scss */ -div.token-input-dropdown ul li.token-input-selected-dropdown-item { - background-color: #467B96; - color: #FFF; } +#ui-datepicker-div .ui-datepicker-close { float: right; } -/* -* Hide from both screenreaders and browsers: h5bp.com/u -*/ -/* line 5, ../scss/_hidden.scss */ -.hidden { - display: none; } +.ui-effects-transfer { border: 2px dotted #ccc; } -/* -* Hide only visually, but have it available for screenreaders: h5bp.com/v -*/ -/* line 15, ../scss/_hidden.scss */ -.sr-only { - border: 0; - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; } +/** Jquery Tokeninput */ +ul.token-input-list { list-style: none; margin: 0; padding: 0 4px; min-height: 32px; border: 1px solid #D9D9D6; cursor: text; z-index: 999; background-color: #FFF; clear: left; border-radius: 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -/* -* Extends the .sr-only class to allow the element to be focusable -* when navigated to via the keyboard: h5bp.com/p -*/ -/* line 30, ../scss/_hidden.scss */ -.sr-only.focusable:active, -.sr-only.focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - width: auto; } +ul.token-input-list li { margin: 4px 0; } -/* -* Hide visually and from screenreaders, but maintain layout -*/ -/* line 44, ../scss/_hidden.scss */ -.invisible { - visibility: hidden; } +ul.token-input-list li input { padding: 0; border: 0; width: 100%; -webkit-appearance: caret; } + +li.token-input-token { padding: 0 6px; height: 27px; line-height: 27px; background-color: #F3F3F0; cursor: default; font-size: .92857em; text-align: right; white-space: nowrap; } + +li.token-input-token p { float: left; display: inline; margin: 0; } + +li.token-input-token span { color: #BBB; font-weight: bold; cursor: pointer; } + +li.token-input-selected-token { background-color: #E9E9E6; } + +li.token-input-input-token { padding: 0 4px; } + +div.token-input-dropdown { position: absolute; background-color: #FFF; overflow: hidden; border: 1px solid #D9D9D6; border-top-width: 0; cursor: default; z-index: 1; font-size: .92857em; } + +div.token-input-dropdown p { margin: 0; padding: 5px 10px; color: #777; font-weight: bold; } + +div.token-input-dropdown ul { list-style: none; margin: 0; padding: 0; } + +div.token-input-dropdown ul li { padding: 4px 10px; background-color: #FFF; } + +div.token-input-dropdown ul li.token-input-dropdown-item { background-color: #FFF; } + +div.token-input-dropdown ul li em { font-style: normal; } + +div.token-input-dropdown ul li.token-input-selected-dropdown-item { background-color: #467B96; color: #FFF; } + +/* Hide from both screenreaders and browsers: h5bp.com/u */ +.hidden { display: none; } + +/* Hide only visually, but have it available for screenreaders: h5bp.com/v */ +.sr-only { border: 0; height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } + +/* Extends the .sr-only class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */ +.sr-only.focusable:active, .sr-only.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } + +/* Hide visually and from screenreaders, but maintain layout */ +.invisible { visibility: hidden; } diff --git a/admin/img/icons-2x-s481937020b.png b/admin/img/icons-2x-s481937020b.png deleted file mode 100644 index f887f62a..00000000 Binary files a/admin/img/icons-2x-s481937020b.png and /dev/null differ diff --git a/admin/img/icons-2x.png b/admin/img/icons-2x.png new file mode 100644 index 00000000..642f712f Binary files /dev/null and b/admin/img/icons-2x.png differ diff --git a/admin/img/icons-s0c4f1c5ae6.png b/admin/img/icons-s0c4f1c5ae6.png deleted file mode 100644 index b82a6daa..00000000 Binary files a/admin/img/icons-s0c4f1c5ae6.png and /dev/null differ diff --git a/admin/img/icons.png b/admin/img/icons.png new file mode 100644 index 00000000..12038ecd Binary files /dev/null and b/admin/img/icons.png differ diff --git a/admin/js/html5shiv.js b/admin/js/html5shiv.js index d074da78..1ba2909d 100644 --- a/admin/js/html5shiv.js +++ b/admin/js/html5shiv.js @@ -1,301 +1 @@ -/** -* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed -*/ -;(function(window, document) { -/*jshint evil:true */ - /** version */ - var version = '3.7.0'; - - /** Preset options */ - var options = window.html5 || {}; - - /** Used to skip problem elements */ - var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; - - /** Not all elements can be cloned in IE **/ - var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; - - /** Detect whether the browser supports default html5 styles */ - var supportsHtml5Styles; - - /** Name of the expando, to work with multiple documents or to re-shiv one document */ - var expando = '_html5shiv'; - - /** The id for the the documents expando */ - var expanID = 0; - - /** Cached data for each document */ - var expandoData = {}; - - /** Detect whether the browser supports unknown elements */ - var supportsUnknownElements; - - (function() { - try { - var a = document.createElement('a'); - a.innerHTML = ''; - //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles - supportsHtml5Styles = ('hidden' in a); - - supportsUnknownElements = a.childNodes.length == 1 || (function() { - // assign a false positive if unable to shiv - (document.createElement)('a'); - var frag = document.createDocumentFragment(); - return ( - typeof frag.cloneNode == 'undefined' || - typeof frag.createDocumentFragment == 'undefined' || - typeof frag.createElement == 'undefined' - ); - }()); - } catch(e) { - // assign a false positive if detection fails => unable to shiv - supportsHtml5Styles = true; - supportsUnknownElements = true; - } - - }()); - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a style sheet with the given CSS text and adds it to the document. - * @private - * @param {Document} ownerDocument The document. - * @param {String} cssText The CSS text. - * @returns {StyleSheet} The style element. - */ - function addStyleSheet(ownerDocument, cssText) { - var p = ownerDocument.createElement('p'), - parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; - - p.innerHTML = 'x'; - return parent.insertBefore(p.lastChild, parent.firstChild); - } - - /** - * Returns the value of `html5.elements` as an array. - * @private - * @returns {Array} An array of shived element node names. - */ - function getElements() { - var elements = html5.elements; - return typeof elements == 'string' ? elements.split(' ') : elements; - } - - /** - * Returns the data associated to the given document - * @private - * @param {Document} ownerDocument The document. - * @returns {Object} An object of data. - */ - function getExpandoData(ownerDocument) { - var data = expandoData[ownerDocument[expando]]; - if (!data) { - data = {}; - expanID++; - ownerDocument[expando] = expanID; - expandoData[expanID] = data; - } - return data; - } - - /** - * returns a shived element for the given nodeName and document - * @memberOf html5 - * @param {String} nodeName name of the element - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived element. - */ - function createElement(nodeName, ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createElement(nodeName); - } - if (!data) { - data = getExpandoData(ownerDocument); - } - var node; - - if (data.cache[nodeName]) { - node = data.cache[nodeName].cloneNode(); - } else if (saveClones.test(nodeName)) { - node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); - } else { - node = data.createElem(nodeName); - } - - // Avoid adding some elements to fragments in IE < 9 because - // * Attributes like `name` or `type` cannot be set/changed once an element - // is inserted into a document/fragment - // * Link elements with `src` attributes that are inaccessible, as with - // a 403 response, will cause the tab/window to crash - // * Script elements appended to fragments will execute when their `src` - // or `text` property is set - return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node; - } - - /** - * returns a shived DocumentFragment for the given document - * @memberOf html5 - * @param {Document} ownerDocument The context document. - * @returns {Object} The shived DocumentFragment. - */ - function createDocumentFragment(ownerDocument, data){ - if (!ownerDocument) { - ownerDocument = document; - } - if(supportsUnknownElements){ - return ownerDocument.createDocumentFragment(); - } - data = data || getExpandoData(ownerDocument); - var clone = data.frag.cloneNode(), - i = 0, - elems = getElements(), - l = elems.length; - for(;i"+n+"",!!r.insertBefore(a.lastChild,r.firstChild))),s||(c=e,(o=i).cache||(o.cache={},o.createElem=c.createElement,o.createFrag=c.createDocumentFragment,o.frag=o.createFrag()),c.createElement=function(e){return f.shivMethods?d(e,c,o):o.createElem(e)},c.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/[\w\-]+/g,function(e){return o.createElem(e),o.frag.createElement(e),'c("'+e+'")'})+");return n}")(f,o.frag)),e}!function(){try{var e=l.createElement("a");e.innerHTML="",m="hidden"in e,s=1==e.childNodes.length||function(){l.createElement("a");var e=l.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){s=m=!0}}();var f={elements:t.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==t.shivCSS,supportsUnknownElements:s,shivMethods:!1!==t.shivMethods,type:"default",shivDocument:i,createElement:d,createDocumentFragment:function(e,t){if(e=e||l,s)return e.createDocumentFragment();for(var n=(t=t||u(e)).frag.cloneNode(),a=0,r=h(),c=r.length;a/g, '>').replace(/"/g, '"'); - }; - - trim = function(str, ch) { - var c, i, j, ref, search; - if (ch == null) { - ch = null; - } - if (ch != null) { - search = ''; - for (i = j = 0, ref = ch.length - 1; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) { - c = ch[i]; - c = preg_quote(c); - search += c; - } - search = '[' + search + ']*'; - return str.replace(new RegExp('^' + search), '').replace(new RegExp(search + '$'), ''); - } else { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); - } - }; - - array_keys = function(arr) { - var _, j, k, len, result; - result = []; - if (arr instanceof Array) { - for (k = j = 0, len = arr.length; j < len; k = ++j) { - _ = arr[k]; - result.push(k); - } - } else { - for (k in arr) { - result.push(k); - } - } - return result; - }; - - array_values = function(arr) { - var _, j, len, result, v; - result = []; - if (arr instanceof Array) { - for (j = 0, len = arr.length; j < len; j++) { - v = arr[j]; - result.push(v); - } - } else { - for (_ in arr) { - v = arr[_]; - result.push(v); - } - } - return result; - }; - - function Parser() { - this.commonWhiteList = 'kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small'; - this.blockHtmlTags = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript'; - this.specialWhiteList = { - table: 'table|tbody|thead|tfoot|tr|td|th' - }; - this.hooks = {}; - this.html = false; - this.line = false; - this.blockParsers = [['code', 10], ['shtml', 20], ['pre', 30], ['ahtml', 40], ['shr', 50], ['list', 60], ['math', 70], ['html', 80], ['footnote', 90], ['definition', 100], ['quote', 110], ['table', 120], ['sh', 130], ['mh', 140], ['dhr', 150], ['default', 9999]]; - this.parsers = {}; - } - - Parser.prototype.makeHtml = function(text) { - var html, j, len, name, parser, ref; - this.footnotes = []; - this.definitions = {}; - this.holders = {}; - this.uniqid = (Math.ceil(Math.random() * 10000000)) + (Math.ceil(Math.random() * 10000000)); - this.id = 0; - this.blockParsers.sort(function(a, b) { - if (a[1] < b[1]) { - return -1; - } else { - return 1; - } - }); - ref = this.blockParsers; - for (j = 0, len = ref.length; j < len; j++) { - parser = ref[j]; - name = parser[0]; - if (parser[2] !== void 0) { - this.parsers[name] = parser[2]; - } else { - this.parsers[name] = this['parseBlock' + (ucfirst(name))].bind(this); - } - } - text = this.initText(text); - html = this.parse(text); - html = this.makeFootnotes(html); - html = this.optimizeLines(html); - return this.call('makeHtml', html); - }; - - Parser.prototype.enableHtml = function(html1) { - this.html = html1 != null ? html1 : true; - }; - - Parser.prototype.enableLine = function(line1) { - this.line = line1 != null ? line1 : true; - }; - - Parser.prototype.hook = function(type, cb) { - if (this.hooks[type] == null) { - this.hooks[type] = []; - } - return this.hooks[type].push(cb); - }; - - Parser.prototype.makeHolder = function(str) { - var key; - key = "|\r" + this.uniqid + this.id + "\r|"; - this.id += 1; - this.holders[key] = str; - return key; - }; - - Parser.prototype.initText = function(text) { - return text.replace(/\t/g, ' ').replace(/\r/g, '').replace(/(\u000A|\u000D|\u2028|\u2029)/g, "\n"); - }; - - Parser.prototype.makeFootnotes = function(html) { - var index, val; - if (this.footnotes.length > 0) { - html += '

    '; - index = 1; - while (val = this.footnotes.shift()) { - if (typeof val === 'string') { - val += " "; - } else { - val[val.length - 1] += " "; - val = val.length > 1 ? this.parse(val.join("\n")) : this.parseInline(val[0]); - } - html += "
  1. " + val + "
  2. "; - index += 1; - } - html += '
'; - } - return html; - }; - - Parser.prototype.parse = function(text, inline, offset) { - var block, blocks, end, extract, html, j, len, lines, method, result, start, type, value; - if (inline == null) { - inline = false; - } - if (offset == null) { - offset = 0; - } - lines = []; - blocks = this.parseBlock(text, lines); - html = ''; - if (inline && blocks.length === 1 && blocks[0][0] === 'normal') { - blocks[0][3] = true; - } - for (j = 0, len = blocks.length; j < len; j++) { - block = blocks[j]; - type = block[0], start = block[1], end = block[2], value = block[3]; - extract = lines.slice(start, end + 1); - method = 'parse' + ucfirst(type); - extract = this.call('before' + ucfirst(method), extract, value); - result = this[method](extract, value, start + offset, end + offset); - result = this.call('after' + ucfirst(method), result, value); - html += result; - } - return html; - }; - - Parser.prototype.call = function() { - var args, callback, j, len, ref, type, value; - type = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : []; - value = args[0]; - if (this.hooks[type] == null) { - return value; - } - ref = this.hooks[type]; - for (j = 0, len = ref.length; j < len; j++) { - callback = ref[j]; - value = callback.apply(this, args); - args[0] = value; - } - return value; - }; - - Parser.prototype.releaseHolder = function(text, clearHolders) { - var deep; - if (clearHolders == null) { - clearHolders = true; - } - deep = 0; - while ((text.indexOf("\r")) >= 0 && deep < 10) { - text = str_replace(array_keys(this.holders), array_values(this.holders), text); - deep += 1; - } - if (clearHolders) { - this.holders = {}; - } - return text; - }; - - Parser.prototype.markLine = function(start, end) { - if (end == null) { - end = -1; - } - if (this.line) { - end = end < 0 ? start : end; - return ''; - } - return ''; - }; - - Parser.prototype.markLines = function(lines, start) { - var i; - i = -1; - if (this.line) { - return lines.map((function(_this) { - return function(line) { - i += 1; - return (_this.markLine(start + i)) + line; - }; - })(this)); - } else { - return lines; - } - }; - - Parser.prototype.optimizeLines = function(html) { - var last, regex; - last = 0; - regex = new RegExp("class=\"line\" data\\-start=\"([0-9]+)\" data\\-end=\"([0-9]+)\" (data\\-id=\"" + this.uniqid + "\")", 'g'); - if (this.line) { - return html.replace(regex, function() { - var matches, replace; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - if (last !== parseInt(matches[1])) { - replace = 'class="line" data-start="' + last + '" data-start-original="' + matches[1] + '" data-end="' + matches[2] + '" ' + matches[3]; - } else { - replace = matches[0]; - } - last = 1 + parseInt(matches[2]); - return replace; - }); - } else { - return html; - } - }; - - Parser.prototype.parseInline = function(text, whiteList, clearHolders, enableAutoLink) { - var regex; - if (whiteList == null) { - whiteList = ''; - } - if (clearHolders == null) { - clearHolders = true; - } - if (enableAutoLink == null) { - enableAutoLink = true; - } - text = this.call('beforeParseInline', text); - text = text.replace(/(^|[^\\])(`+)(.+?)\2/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return matches[1] + _this.makeHolder('' + (htmlspecialchars(matches[3])) + ''); - }; - })(this)); - text = text.replace(/(^|[^\\])(\$+)(.+?)\2/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return matches[1] + _this.makeHolder(matches[2] + (htmlspecialchars(matches[3])) + matches[2]); - }; - })(this)); - text = text.replace(/\\(.)/g, (function(_this) { - return function() { - var escaped, matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - escaped = htmlspecialchars(matches[1]); - escaped = escaped.replace(/\$/g, '$'); - return _this.makeHolder(escaped); - }; - })(this)); - text = text.replace(/<(https?:\/\/.+)>/ig, (function(_this) { - return function() { - var link, matches, url; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - url = _this.cleanUrl(matches[1]); - link = _this.call('parseLink', matches[1]); - return _this.makeHolder("" + link + ""); - }; - })(this)); - text = text.replace(/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/ig, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - if (_this.html || (('|' + _this.commonWhiteList + '|' + whiteList + '|').indexOf('|' + matches[2].toLowerCase() + '|')) >= 0) { - return _this.makeHolder(matches[0]); - } else { - return htmlspecialchars(matches[0]); - } - }; - })(this)); - if (this.html) { - text = text.replace(//g, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return _this.makeHolder(matches[0]); - }; - })(this)); - } - text = str_replace(['<', '>'], ['<', '>'], text); - text = text.replace(/\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g, (function(_this) { - return function() { - var id, matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - id = _this.footnotes.indexOf(matches[1]); - if (id < 0) { - id = _this.footnotes.length + 1; - _this.footnotes.push(_this.parseInline(matches[1], '', false)); - } - return _this.makeHolder("" + id + ""); - }; - })(this)); - text = text.replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g, (function(_this) { - return function() { - var escaped, matches, url; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - escaped = htmlspecialchars(_this.escapeBracket(matches[1])); - url = _this.escapeBracket(matches[2]); - url = _this.cleanUrl(url); - return _this.makeHolder("\"""); - }; - })(this)); - text = text.replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g, (function(_this) { - return function() { - var escaped, matches, result; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - escaped = htmlspecialchars(_this.escapeBracket(matches[1])); - result = _this.definitions[matches[2]] != null ? "\""" : escaped; - return _this.makeHolder(result); - }; - })(this)); - text = text.replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g, (function(_this) { - return function() { - var escaped, matches, url; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false); - url = _this.escapeBracket(matches[2]); - url = _this.cleanUrl(url); - return _this.makeHolder("" + escaped + ""); - }; - })(this)); - text = text.replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g, (function(_this) { - return function() { - var escaped, matches, result; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false); - result = _this.definitions[matches[2]] != null ? "" + escaped + "" : escaped; - return _this.makeHolder(result); - }; - })(this)); - text = this.parseInlineCallback(text); - text = text.replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/ig, '$1'); - if (enableAutoLink) { - regex = new RegExp("(^|[^\"])((https?):[" + pL + "_0-9-\\./%#!@\\?\\+=~\\|\\,&\\(\\)]+)($|[^\"])", 'ig'); - text = text.replace(regex, (function(_this) { - return function() { - var link, matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - link = _this.call('parseLink', matches[2]); - return matches[1] + "" + link + "" + matches[4]; - }; - })(this)); - } - text = this.call('afterParseInlineBeforeRelease', text); - text = this.releaseHolder(text, clearHolders); - text = this.call('afterParseInline', text); - return text; - }; - - Parser.prototype.parseInlineCallback = function(text) { - text = text.replace(/(\*{3})((?:.|\r)+?)\1/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return '' + (_this.parseInlineCallback(matches[2])) + ''; - }; - })(this)); - text = text.replace(/(\*{2})((?:.|\r)+?)\1/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return '' + (_this.parseInlineCallback(matches[2])) + ''; - }; - })(this)); - text = text.replace(/(\*)((?:.|\r)+?)\1/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return '' + (_this.parseInlineCallback(matches[2])) + ''; - }; - })(this)); - text = text.replace(/(\s+|^)(_{3})((?:.|\r)+?)\2(\s+|$)/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return matches[1] + '' + (_this.parseInlineCallback(matches[3])) + '' + matches[4]; - }; - })(this)); - text = text.replace(/(\s+|^)(_{2})((?:.|\r)+?)\2(\s+|$)/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return matches[1] + '' + (_this.parseInlineCallback(matches[3])) + '' + matches[4]; - }; - })(this)); - text = text.replace(/(\s+|^)(_)((?:.|\r)+?)\2(\s+|$)/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return matches[1] + '' + (_this.parseInlineCallback(matches[3])) + '' + matches[4]; - }; - })(this)); - text = text.replace(/(~{2})((?:.|\r)+?)\1/mg, (function(_this) { - return function() { - var matches; - matches = 1 <= arguments.length ? slice.call(arguments, 0) : []; - return '' + (_this.parseInlineCallback(matches[2])) + ''; - }; - })(this)); - return text; - }; - - Parser.prototype.parseBlock = function(text, lines) { - var block, j, key, l, len, len1, line, name, parser, pass, ref, ref1, state; - ref = text.split("\n"); - for (j = 0, len = ref.length; j < len; j++) { - line = ref[j]; - lines.push(line); - } - this.blocks = []; - this.current = 'normal'; - this.pos = -1; - state = { - special: (array_keys(this.specialWhiteList)).join('|'), - empty: 0, - html: false - }; - for (key = l = 0, len1 = lines.length; l < len1; key = ++l) { - line = lines[key]; - block = this.getBlock(); - if (block != null) { - block = block.slice(0); - } - if (this.current !== 'normal') { - pass = this.parsers[this.current](block, key, line, state, lines); - if (!pass) { - continue; - } - } - ref1 = this.parsers; - for (name in ref1) { - parser = ref1[name]; - if (name !== this.current) { - pass = parser(block, key, line, state, lines); - if (!pass) { - break; - } - } - } - } - return this.optimizeBlocks(this.blocks, lines); - }; - - Parser.prototype.parseBlockList = function(block, key, line, state) { - var matches, space; - if (!!(matches = line.match(/^(\s*)((?:[0-9]+\.)|\-|\+|\*)\s+/i))) { - space = matches[1].length; - state.empty = 0; - if (this.isBlock('list')) { - this.setBlock(key, space); - } else { - this.startBlock('list', key, space); - } - return false; - } else if ((this.isBlock('list')) && !line.match(/^\s*\[((?:[^\]]|\\\]|\\\[)+?)\]:\s*(.+)$/)) { - if ((state.empty <= 1) && !!(matches = line.match(/^(\s+)/)) && matches[1].length > block[3]) { - state.empty = 0; - this.setBlock(key); - return false; - } else if ((line.match(/^\s*$/)) && state.empty === 0) { - state.empty += 1; - this.setBlock(key); - return false; - } - } - return true; - }; - - Parser.prototype.parseBlockCode = function(block, key, line) { - var isAfterList, matches, space; - if (!!(matches = line.match(/^(\s*)(~{3,}|`{3,})([^`~]*)$/i))) { - if (this.isBlock('code')) { - isAfterList = block[3][2]; - if (isAfterList) { - this.combineBlock().setBlock(key); - } else { - (this.setBlock(key)).endBlock(); - } - } else { - isAfterList = false; - if (this.isBlock('list')) { - space = block[3]; - isAfterList = (space > 0 && matches[1].length >= space) || matches[1].length > space; - } - this.startBlock('code', key, [matches[1], matches[3], isAfterList]); - } - return false; - } else if (this.isBlock('code')) { - this.setBlock(key); - return false; - } - return true; - }; - - Parser.prototype.parseBlockShtml = function(block, key, line, state) { - var matches; - if (this.html) { - if (!!(matches = line.match(/^(\s*)!!!(\s*)$/))) { - if (this.isBlock('shtml')) { - this.setBlock(key).endBlock(); - } else { - this.startBlock('shtml', key); - } - return false; - } else if (this.isBlock('shtml')) { - this.setBlock(key); - return false; - } - } - return true; - }; - - Parser.prototype.parseBlockAhtml = function(block, key, line, state) { - var htmlTagAllRegExp, htmlTagRegExp, lastMatch, m, matches; - if (this.html) { - htmlTagRegExp = new RegExp("^\\s*<(" + this.blockHtmlTags + ")(\\s+[^>]*)?>", 'i'); - if (matches = line.match(htmlTagRegExp)) { - if (this.isBlock('ahtml')) { - this.setBlock(key); - return false; - } else if (matches[2] === void 0 || matches[2] !== '/') { - this.startBlock('ahtml', key); - htmlTagAllRegExp = new RegExp("\\s*<(" + this.blockHtmlTags + ")(\\s+[^>]*)?>", 'ig'); - while (true) { - m = htmlTagAllRegExp.exec(line); - if (!m) { - break; - } - lastMatch = m[1]; - } - if (0 <= line.indexOf("")) { - this.endBlock(); - } else { - state.html = lastMatch; - } - return false; - } - } else if (!!state.html && 0 <= line.indexOf("")) { - this.setBlock(key).endBlock(); - state.html = false; - return false; - } else if (this.isBlock('ahtml')) { - this.setBlock(key); - return false; - } else if (!!(matches = line.match(/^\s*\s*$/))) { - this.startBlock('ahtml', key).endBlock(); - return false; - } - } - return true; - }; - - Parser.prototype.parseBlockMath = function(block, key, line) { - var matches; - if (!!(matches = line.match(/^(\s*)\$\$(\s*)$/))) { - if (this.isBlock('math')) { - this.setBlock(key).endBlock(); - } else { - this.startBlock('math', key); - } - return false; - } else if (this.isBlock('math')) { - this.setBlock(key); - return false; - } - return true; - }; - - Parser.prototype.parseBlockPre = function(block, key, line, state) { - if (!!(line.match(/^ {4}/))) { - if (this.isBlock('pre')) { - this.setBlock(key); - } else { - this.startBlock('pre', key); - } - return false; - } else if ((this.isBlock('pre')) && line.match(/^\s*$/)) { - this.setBlock(key); - return false; - } - return true; - }; - - Parser.prototype.parseBlockHtml = function(block, key, line, state) { - var matches, tag; - if (!!(matches = line.match(new RegExp("^\\s*<(" + state.special + ")(\\s+[^>]*)?>", 'i')))) { - tag = matches[1].toLowerCase(); - if (!(this.isBlock('html', tag)) && !(this.isBlock('pre'))) { - this.startBlock('html', key, tag); - } - return false; - } else if (!!(matches = line.match(new RegExp("\\s*$", 'i')))) { - tag = matches[1].toLowerCase(); - if (this.isBlock('html', tag)) { - this.setBlock(key).endBlock(); - } - return false; - } else if (this.isBlock('html')) { - this.setBlock(key); - return false; - } - return true; - }; - - Parser.prototype.parseBlockFootnote = function(block, key, line) { - var matches, space; - if (!!(matches = line.match(/^\[\^((?:[^\]]|\\\]|\\\[)+?)\]:/))) { - space = matches[0].length - 1; - this.startBlock('footnote', key, [space, matches[1]]); - return false; - } - return true; - }; - - Parser.prototype.parseBlockDefinition = function(block, key, line) { - var matches; - if (!!(matches = line.match(/^\s*\[((?:[^\]]|\\\]|\\\[)+?)\]:\s*(.+)$/))) { - this.definitions[matches[1]] = this.cleanUrl(matches[2]); - this.startBlock('definition', key).endBlock(); - return false; - } - return true; - }; - - Parser.prototype.parseBlockQuote = function(block, key, line) { - var matches; - if (!!(matches = line.match(/^(\s*)>/))) { - if ((this.isBlock('list')) && matches[1].length > 0) { - this.setBlock(key); - } else if (this.isBlock('quote')) { - this.setBlock(key); - } else { - this.startBlock('quote', key); - } - return false; - } - return true; - }; - - Parser.prototype.parseBlockTable = function(block, key, line, state, lines) { - var align, aligns, head, j, len, matches, row, rows; - if (!!(matches = line.match(/^((?:(?:(?:\||\+)(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:[ :]*\-+[ :]*)(?:\||\+)(?:[ :]*\-+[ :]*))|(?:(?:[ :]*\-+[ :]*)(?:\||\+))|(?:(?:\||\+)(?:[ :]*\-+[ :]*)))+)$/))) { - if (this.isBlock('table')) { - block[3][0].push(block[3][2]); - block[3][2] += 1; - this.setBlock(key, block[3]); - } else { - head = 0; - if ((block == null) || block[0] !== 'normal' || lines[block[2]].match(/^\s*$/)) { - this.startBlock('table', key); - } else { - head = 1; - this.backBlock(1, 'table'); - } - if (matches[1][0] === '|') { - matches[1] = matches[1].substring(1); - if (matches[1][matches[1].length - 1] === '|') { - matches[1] = matches[1].substring(0, matches[1].length - 1); - } - } - rows = matches[1].split(/\+|\|/); - aligns = []; - for (j = 0, len = rows.length; j < len; j++) { - row = rows[j]; - align = 'none'; - if (!!(matches = row.match(/^\s*(:?)\-+(:?)\s*$/))) { - if (!!matches[1] && !!matches[2]) { - align = 'center'; - } else if (!!matches[1]) { - align = 'left'; - } else if (!!matches[2]) { - align = 'right'; - } - } - aligns.push(align); - } - this.setBlock(key, [[head], aligns, head + 1]); - } - return false; - } - return true; - }; - - Parser.prototype.parseBlockSh = function(block, key, line) { - var matches, num; - if (!!(matches = line.match(/^(#+)(.*)$/))) { - num = Math.min(matches[1].length, 6); - this.startBlock('sh', key, num).endBlock(); - return false; - } - return true; - }; - - Parser.prototype.parseBlockMh = function(block, key, line, state, lines) { - var matches; - if (!!(matches = line.match(/^\s*((=|-){2,})\s*$/)) && ((block != null) && block[0] === 'normal' && !lines[block[2]].match(/^\s*$/))) { - if (this.isBlock('normal')) { - this.backBlock(1, 'mh', matches[1][0] === '=' ? 1 : 2).setBlock(key).endBlock(); - } else { - this.startBlock('normal', key); - } - return false; - } - return true; - }; - - Parser.prototype.parseBlockShr = function(block, key, line) { - if (!!(line.match(/^(\* *){3,}\s*$/))) { - this.startBlock('hr', key).endBlock(); - return false; - } - return true; - }; - - Parser.prototype.parseBlockDhr = function(block, key, line) { - if (!!(line.match(/^(- *){3,}\s*$/))) { - this.startBlock('hr', key).endBlock(); - return false; - } - return true; - }; - - Parser.prototype.parseBlockDefault = function(block, key, line, state) { - var matches; - if (this.isBlock('footnote')) { - matches = line.match(/^(\s*)/); - if (matches[1].length >= block[3][0]) { - this.setBlock(key); - } else { - this.startBlock('normal', key); - } - } else if (this.isBlock('table')) { - if (0 <= line.indexOf('|')) { - block[3][2] += 1; - this.setBlock(key, block[3]); - } else { - this.startBlock('normal', key); - } - } else if (this.isBlock('quote')) { - if (!line.match(/^(\s*)$/)) { - this.setBlock(key); - } else { - this.startBlock('normal', key); - } - } else { - if ((block == null) || block[0] !== 'normal') { - this.startBlock('normal', key); - } else { - this.setBlock(key); - } - } - return true; - }; - - Parser.prototype.optimizeBlocks = function(_blocks, _lines) { - var block, blocks, from, isEmpty, key, lines, moved, nextBlock, prevBlock, to, type, types; - blocks = _blocks.slice(0); - lines = _lines.slice(0); - blocks = this.call('beforeOptimizeBlocks', blocks, lines); - key = 0; - while (blocks[key] != null) { - moved = false; - block = blocks[key]; - prevBlock = blocks[key - 1] != null ? blocks[key - 1] : null; - nextBlock = blocks[key + 1] != null ? blocks[key + 1] : null; - type = block[0], from = block[1], to = block[2]; - if ('pre' === type) { - isEmpty = (lines.slice(block[1], block[2] + 1)).reduce(function(result, line) { - return (line.match(/^\s*$/)) && result; - }, true); - if (isEmpty) { - block[0] = type = 'normal'; - } - } - if ('normal' === type) { - types = ['list', 'quote']; - if (from === to && (lines[from].match(/^\s*$/)) && (prevBlock != null) && (nextBlock != null)) { - if (prevBlock[0] === nextBlock[0] && (types.indexOf(prevBlock[0])) >= 0) { - blocks[key - 1] = [prevBlock[0], prevBlock[1], nextBlock[2], null]; - blocks.splice(key, 2); - moved = true; - } - } - } - if (!moved) { - key += 1; - } - } - return this.call('afterOptimizeBlocks', blocks, lines); - }; - - Parser.prototype.parseCode = function(lines, parts, start) { - var blank, count, isEmpty, lang, rel, str; - blank = parts[0], lang = parts[1]; - lang = trim(lang); - count = blank.length; - if (!lang.match(/^[_a-z0-9-\+\#\:\.]+$/i)) { - lang = null; - } else { - parts = lang.split(':'); - if (parts.length > 1) { - lang = parts[0], rel = parts[1]; - lang = trim(lang); - rel = trim(rel); - } - } - isEmpty = true; - lines = lines.slice(1, -1).map(function(line) { - line = line.replace(new RegExp("/^[ ]{" + count + "}/"), ''); - if (isEmpty && !line.match(/^\s*$/)) { - isEmpty = false; - } - return htmlspecialchars(line); - }); - str = (this.markLines(lines, start + 1)).join("\n"); - if (isEmpty) { - return ''; - } else { - return '
' + str + '
'; - } - }; - - Parser.prototype.parsePre = function(lines, value, start) { - var str; - lines = lines.map(function(line) { - return htmlspecialchars(line.substring(4)); - }); - str = (this.markLines(lines, start)).join("\n"); - if (str.match(/^\s*$/)) { - return ''; - } else { - return '
' + str + '
'; - } - }; - - Parser.prototype.parseAhtml = function(lines, value, start) { - return trim((this.markLines(lines, start)).join("\n")); - }; - - Parser.prototype.parseShtml = function(lines, value, start) { - return trim((this.markLines(lines.slice(1, -1), start + 1)).join("\n")); - }; - - Parser.prototype.parseMath = function(lines, value, start, end) { - return '

' + (this.markLine(start, end)) + (htmlspecialchars(lines.join("\n"))) + '

'; - }; - - Parser.prototype.parseSh = function(lines, num, start, end) { - var line; - line = (this.markLine(start, end)) + this.parseInline(trim(lines[0], '# ')); - if (line.match(/^\s*$/)) { - return ''; - } else { - return "" + line + ""; - } - }; - - Parser.prototype.parseMh = function(lines, num, start, end) { - return this.parseSh(lines, num, start, end); - }; - - Parser.prototype.parseQuote = function(lines, value, start) { - var str; - lines = lines.map(function(line) { - return line.replace(/^\s*> ?/, ''); - }); - str = lines.join("\n"); - if (str.match(/^\s*$/)) { - return ''; - } else { - return '
' + (this.parse(str, true, start)) + '
'; - } - }; - - Parser.prototype.parseList = function(lines, value, start) { - var found, html, j, key, l, lastType, leftLines, leftStart, len, len1, line, matches, minSpace, row, rows, secondFound, secondMinSpace, space, text, type; - html = ''; - minSpace = 99999; - secondMinSpace = 99999; - found = false; - secondFound = false; - rows = []; - for (key = j = 0, len = lines.length; j < len; key = ++j) { - line = lines[key]; - if (matches = line.match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i)) { - space = matches[1].length; - type = 0 <= '+-*'.indexOf(matches[2]) ? 'ul' : 'ol'; - minSpace = Math.min(space, minSpace); - found = true; - if (space > 0) { - secondMinSpace = Math.min(space, secondMinSpace); - secondFound = true; - } - rows.push([space, type, line, matches[4]]); - } else { - rows.push(line); - if (!!(matches = line.match(/^(\s*)/))) { - space = matches[1].length; - if (space > 0) { - secondMinSpace = Math.min(space, secondMinSpace); - secondFound = true; - } - } - } - } - minSpace = found ? minSpace : 0; - secondMinSpace = secondFound ? secondMinSpace : minSpace; - lastType = ''; - leftLines = []; - leftStart = 0; - for (key = l = 0, len1 = rows.length; l < len1; key = ++l) { - row = rows[key]; - if (row instanceof Array) { - space = row[0], type = row[1], line = row[2], text = row[3]; - if (space !== minSpace) { - leftLines.push(line.replace(new RegExp("^\\s{" + secondMinSpace + "}"), '')); - } else { - if (leftLines.length > 0) { - html += '
  • ' + (this.parse(leftLines.join("\n"), true, start + leftStart)) + '
  • '; - } - if (lastType !== type) { - if (!!lastType) { - html += ""; - } - html += "<" + type + ">"; - } - leftStart = key; - leftLines = [text]; - lastType = type; - } - } else { - leftLines.push(row.replace(new RegExp("^\\s{" + secondMinSpace + "}"), '')); - } - } - if (leftLines.length > 0) { - html += '
  • ' + (this.parse(leftLines.join("\n"), true, start + leftStart)) + ("
  • "); - } - return html; - }; - - Parser.prototype.parseTable = function(lines, value, start) { - var aligns, body, column, columns, head, html, ignores, j, key, l, last, len, len1, line, num, output, row, rows, tag, text; - ignores = value[0], aligns = value[1]; - head = ignores.length > 0 && (ignores.reduce(function(prev, curr) { - return curr + prev; - })) > 0; - html = ''; - body = head ? null : true; - output = false; - for (key = j = 0, len = lines.length; j < len; key = ++j) { - line = lines[key]; - if (0 <= ignores.indexOf(key)) { - if (head && output) { - head = false; - body = true; - } - continue; - } - line = trim(line); - output = true; - if (line[0] === '|') { - line = line.substring(1); - if (line[line.length - 1] === '|') { - line = line.substring(0, line.length - 1); - } - } - rows = line.split('|').map(function(row) { - if (row.match(/^\s*$/)) { - return ' '; - } else { - return trim(row); - } - }); - columns = {}; - last = -1; - for (l = 0, len1 = rows.length; l < len1; l++) { - row = rows[l]; - if (row.length > 0) { - last += 1; - columns[last] = [(columns[last] != null ? columns[last][0] + 1 : 1), row]; - } else if (columns[last] != null) { - columns[last][0] += 1; - } else { - columns[0] = [1, row]; - } - } - if (head) { - html += ''; - } else if (body) { - html += ''; - } - html += ' 1) { - html += " colspan=\"" + num + "\""; - } - if ((aligns[key] != null) && aligns[key] !== 'none') { - html += " align=\"" + aligns[key] + "\""; - } - html += '>' + (this.parseInline(text)) + (""); - } - html += ''; - if (head) { - html += ''; - } else if (body) { - body = false; - } - } - if (body !== null) { - html += ''; - } - return html += '
    '; - }; - - Parser.prototype.parseHr = function(lines, value, start) { - if (this.line) { - return '
    '; - } else { - return '
    '; - } - }; - - Parser.prototype.parseNormal = function(lines, inline, start) { - var key, str; - if (inline == null) { - inline = false; - } - key = 0; - lines = lines.map((function(_this) { - return function(line) { - line = _this.parseInline(line); - if (!line.match(/^\s*$/)) { - line = (_this.markLine(start + key)) + line; - } - key += 1; - return line; - }; - })(this)); - str = trim(lines.join("\n")); - str = str.replace(/(\n\s*){2,}/g, '

    '); - str = str.replace(/\n/g, '
    '); - if (str.match(/^\s*$/)) { - return ''; - } else { - if (inline) { - return str; - } else { - return "

    " + str + "

    "; - } - } - }; - - Parser.prototype.parseFootnote = function(lines, value) { - var index, note, space; - space = value[0], note = value[1]; - index = this.footnotes.indexOf(note); - if (index >= 0) { - lines = lines.slice(0); - lines[0] = lines[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/, ''); - this.footnotes[index] = lines; - } - return ''; - }; - - Parser.prototype.parseDefinition = function() { - return ''; - }; - - Parser.prototype.parseHtml = function(lines, type, start) { - lines = lines.map((function(_this) { - return function(line) { - return _this.parseInline(line, _this.specialWhiteList[type] != null ? _this.specialWhiteList[type] : ''); - }; - })(this)); - return (this.markLines(lines, start)).join("\n"); - }; - - Parser.prototype.cleanUrl = function(url) { - var matches, regexUrl, regexWord; - regexUrl = new RegExp("^\\s*((http|https|ftp|mailto):[" + pL + "_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&\\(\\)]+)", 'i'); - regexWord = new RegExp("^\\s*([" + pL + "_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)", 'i'); - if (!!(matches = url.match(regexUrl))) { - return matches[1]; - } else if (!!(matches = url.match(regexWord))) { - return matches[1]; - } else { - return '#'; - } - }; - - Parser.prototype.escapeBracket = function(str) { - return str_replace(['\\[', '\\]', '\\(', '\\)'], ['[', ']', '(', ')'], str); - }; - - Parser.prototype.startBlock = function(type, start, value) { - if (value == null) { - value = null; - } - this.pos += 1; - this.current = type; - this.blocks.push([type, start, start, value]); - return this; - }; - - Parser.prototype.endBlock = function() { - this.current = 'normal'; - return this; - }; - - Parser.prototype.isBlock = function(type, value) { - if (value == null) { - value = null; - } - return this.current === type && (null === value ? true : this.blocks[this.pos][3] === value); - }; - - Parser.prototype.getBlock = function() { - if (this.blocks[this.pos] != null) { - return this.blocks[this.pos]; - } else { - return null; - } - }; - - Parser.prototype.setBlock = function(to, value) { - if (to == null) { - to = null; - } - if (value == null) { - value = null; - } - if (to !== null) { - this.blocks[this.pos][2] = to; - } - if (value !== null) { - this.blocks[this.pos][3] = value; - } - return this; - }; - - Parser.prototype.backBlock = function(step, type, value) { - var item, last; - if (value == null) { - value = null; - } - if (this.pos < 0) { - return this.startBlock(type, 0, value); - } - last = this.blocks[this.pos][2]; - this.blocks[this.pos][2] = last - step; - item = [type, last - step + 1, last, value]; - if (this.blocks[this.pos][1] <= this.blocks[this.pos][2]) { - this.pos += 1; - this.blocks.push(item); - } else { - this.blocks[this.pos] = item; - } - this.current = type; - return this; - }; - - Parser.prototype.combineBlock = function() { - var current, prev; - if (this.pos < 1) { - return this; - } - prev = this.blocks[this.pos - 1].slice(0); - current = this.blocks[this.pos].slice(0); - prev[2] = current[2]; - this.blocks[this.pos - 1] = prev; - this.current = prev[0]; - this.blocks = this.blocks.slice(0, -1); - this.pos -= 1; - return this; - }; - - return Parser; - - })(); - - if (typeof module !== "undefined" && module !== null) { - module.exports = Parser; - } else if (typeof window !== "undefined" && window !== null) { - window.HyperDown = Parser; - } - -}).call(this); +(function(){var t,k,n,d,B,c,b,x,g,y=[].slice;function e(){this.commonWhiteList="kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small",this.blockHtmlTags="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript",this.specialWhiteList={table:"table|tbody|thead|tfoot|tr|td|th"},this.hooks={},this.html=!1,this.line=!1,this.blockParsers=[["code",10],["shtml",20],["pre",30],["ahtml",40],["shr",50],["list",60],["math",70],["html",80],["footnote",90],["definition",100],["quote",110],["table",120],["sh",130],["mh",140],["dhr",150],["default",9999]],this.parsers={}}g=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},c=function(t){return t.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},B="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b=function(t,e,r){var n,s,l,i,o,a;if(t instanceof Array)if(e instanceof Array)for(n=s=0,i=t.length;s/g,">").replace(/"/g,""")},x=function(t,e){var r,n,s,l,i;if(null==e&&(e=null),null==e)return t.replace(/^\s*/,"").replace(/\s*$/,"");for(i="",n=s=0,l=e.length-1;0<=l?s<=l:l<=s;n=0<=l?++s:--s)r=e[n],i+=r=c(r);return i="["+i+"]*",t.replace(new RegExp("^"+i),"").replace(new RegExp(i+"$"),"")},k=function(t){var e,r,n,s=[];if(t instanceof Array)for(r=e=0,n=t.length;e↩':(r[r.length-1]+=' ',r=1'+r+"",e+=1;t+=""}return t},e.prototype.parse=function(t,e,r){var n,s,l,i,o,a,c,h,p,u,f,k,m;for(null==e&&(e=!1),null==r&&(r=0),h=[],s=this.parseBlock(t,h),o="",e&&1===s.length&&"normal"===s[0][0]&&(s[0][3]=!0),a=0,c=s.length;a':""},e.prototype.markLines=function(t,e){var r,n=-1;return this.line?t.map((r=this,function(t){return n+=1,r.markLine(e+n)+t})):t},e.prototype.optimizeLines=function(t){var r=0,e=new RegExp('class="line" data\\-start="([0-9]+)" data\\-end="([0-9]+)" (data\\-id="'+this.uniqid+'")',"g");return this.line?t.replace(e,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=r!==parseInt(t[1])?'class="line" data-start="'+r+'" data-start-original="'+t[1]+'" data-end="'+t[2]+'" '+t[3]:t[0];return r=1+parseInt(t[2]),e}):t},e.prototype.parseInline=function(t,e,r,n){var s,l,i,o,a,c,h,p,u,f,k,m,g;return null==e&&(e=""),null==r&&(r=!0),null==n&&(n=!0),t=(t=(t=(t=(t=(t=this.call("beforeParseInline",t)).replace(/(^|[^\\])(`+)(.+?)\2/gm,(l=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return t[1]+l.makeHolder(""+d(t[3])+"")}))).replace(/(^|[^\\])(\$+)(.+?)\2/gm,(i=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return t[1]+i.makeHolder(t[2]+d(t[3])+t[2])}))).replace(/\\(.)/g,(o=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=d(t[1]);return e=e.replace(/\$/g,"$"),o.makeHolder(e)}))).replace(/<(https?:\/\/.+)>/gi,(a=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=a.cleanUrl(t[1]),r=a.call("parseLink",t[1]);return a.makeHolder(''+r+"")}))).replace(/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/gi,(c=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return c.html||0<=("|"+c.commonWhiteList+"|"+e+"|").indexOf("|"+t[2].toLowerCase()+"|")?c.makeHolder(t[0]):d(t[0])})),this.html&&(t=t.replace(//g,(h=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return h.makeHolder(t[0])}))),t=(t=(t=(t=(t=(t=b(["<",">"],["<",">"],t)).replace(/\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,(p=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=p.footnotes.indexOf(t[1]);return e<0&&(e=p.footnotes.length+1,p.footnotes.push(p.parseInline(t[1],"",!1))),p.makeHolder(''+e+"")}))).replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(u=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=d(u.escapeBracket(t[1])),r=u.escapeBracket(t[2]);return r=u.cleanUrl(r),u.makeHolder(''+e+'')}))).replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,(f=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=d(f.escapeBracket(t[1])),r=null!=f.definitions[t[2]]?''+e+'':e;return f.makeHolder(r)}))).replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(k=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=k.parseInline(k.escapeBracket(t[1]),"",!1,!1),r=k.escapeBracket(t[2]);return r=k.cleanUrl(r),k.makeHolder(''+e+"")}))).replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,(m=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=m.parseInline(m.escapeBracket(t[1]),"",!1,!1),r=null!=m.definitions[t[2]]?''+e+"":e;return m.makeHolder(r)})),t=(t=this.parseInlineCallback(t)).replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/gi,'$1'),n&&(s=new RegExp('(^|[^"])((https?):['+B+'_0-9-\\./%#!@\\?\\+=~\\|\\,&\\(\\)]+)($|[^"])',"ig"),t=t.replace(s,(g=this,function(){var t=1<=arguments.length?y.call(arguments,0):[],e=g.call("parseLink",t[2]);return t[1]+''+e+""+t[4]}))),t=this.call("afterParseInlineBeforeRelease",t),t=this.releaseHolder(t,r),t=this.call("afterParseInline",t)},e.prototype.parseInlineCallback=function(t){var e,r,n,s,l,i,o;return t=(t=(t=(t=(t=(t=(t=t.replace(/(\*{3})((?:.|\r)+?)\1/gm,(e=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return""+e.parseInlineCallback(t[2])+""}))).replace(/(\*{2})((?:.|\r)+?)\1/gm,(r=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return""+r.parseInlineCallback(t[2])+""}))).replace(/(\*)((?:.|\r)+?)\1/gm,(n=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return""+n.parseInlineCallback(t[2])+""}))).replace(/(\s+|^)(_{3})((?:.|\r)+?)\2(\s+|$)/gm,(s=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return t[1]+""+s.parseInlineCallback(t[3])+""+t[4]}))).replace(/(\s+|^)(_{2})((?:.|\r)+?)\2(\s+|$)/gm,(l=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return t[1]+""+l.parseInlineCallback(t[3])+""+t[4]}))).replace(/(\s+|^)(_)((?:.|\r)+?)\2(\s+|$)/gm,(i=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return t[1]+""+i.parseInlineCallback(t[3])+""+t[4]}))).replace(/(~{2})((?:.|\r)+?)\1/gm,(o=this,function(){var t=1<=arguments.length?y.call(arguments,0):[];return""+o.parseInlineCallback(t[2])+""}))},e.prototype.parseBlock=function(t,e){for(var r,n,s,l,i,o,a,c,h,p=t.split("\n"),u=0,f=p.length;ut[3])return n.empty=0,this.setBlock(e),!1;if(r.match(/^\s*$/)&&0===n.empty)return n.empty+=1,this.setBlock(e),!1}return!0},e.prototype.parseBlockCode=function(t,e,r){var n,s,l;return(s=r.match(/^(\s*)(~{3,}|`{3,})([^`~]*)$/i))?(this.isBlock("code")?(n=t[3][2])?this.combineBlock().setBlock(e):this.setBlock(e).endBlock():(n=!1,this.isBlock("list")&&(n=0<(l=t[3])&&s[1].length>=l||s[1].length>l),this.startBlock("code",e,[s[1],s[3],n])),!1):!this.isBlock("code")||(this.setBlock(e),!1)},e.prototype.parseBlockShtml=function(t,e,r,n){if(this.html){if(r.match(/^(\s*)!!!(\s*)$/))return this.isBlock("shtml")?this.setBlock(e).endBlock():this.startBlock("shtml",e),!1;if(this.isBlock("shtml"))return this.setBlock(e),!1}return!0},e.prototype.parseBlockAhtml=function(t,e,r,n){var s,l,i,o,a;if(this.html)if(l=new RegExp("^\\s*<("+this.blockHtmlTags+")(\\s+[^>]*)?>","i"),a=r.match(l)){if(this.isBlock("ahtml"))return this.setBlock(e),!1;if(void 0===a[2]||"/"!==a[2]){for(this.startBlock("ahtml",e),s=new RegExp("\\s*<("+this.blockHtmlTags+")(\\s+[^>]*)?>","ig");o=s.exec(r);)i=o[1];return 0<=r.indexOf("")?this.endBlock():n.html=i,!1}}else{if(n.html&&0<=r.indexOf(""))return this.setBlock(e).endBlock(),n.html=!1;if(this.isBlock("ahtml"))return this.setBlock(e),!1;if(a=r.match(/^\s*\s*$/))return this.startBlock("ahtml",e).endBlock(),!1}return!0},e.prototype.parseBlockMath=function(t,e,r){return r.match(/^(\s*)\$\$(\s*)$/)?(this.isBlock("math")?this.setBlock(e).endBlock():this.startBlock("math",e),!1):!this.isBlock("math")||(this.setBlock(e),!1)},e.prototype.parseBlockPre=function(t,e,r,n){return r.match(/^ {4}/)?(this.isBlock("pre")?this.setBlock(e):this.startBlock("pre",e),!1):!this.isBlock("pre")||!r.match(/^\s*$/)||(this.setBlock(e),!1)},e.prototype.parseBlockHtml=function(t,e,r,n){var s,l;return(s=r.match(new RegExp("^\\s*<("+n.special+")(\\s+[^>]*)?>","i")))?(l=s[1].toLowerCase(),this.isBlock("html",l)||this.isBlock("pre")||this.startBlock("html",e,l),!1):(s=r.match(new RegExp("\\s*$","i")))?(l=s[1].toLowerCase(),this.isBlock("html",l)&&this.setBlock(e).endBlock(),!1):!this.isBlock("html")||(this.setBlock(e),!1)},e.prototype.parseBlockFootnote=function(t,e,r){var n,s;return!(n=r.match(/^\[\^((?:[^\]]|\\\]|\\\[)+?)\]:/))||(s=n[0].length-1,this.startBlock("footnote",e,[s,n[1]]),!1)},e.prototype.parseBlockDefinition=function(t,e,r){var n;return!(n=r.match(/^\s*\[((?:[^\]]|\\\]|\\\[)+?)\]:\s*(.+)$/))||(this.definitions[n[1]]=this.cleanUrl(n[2]),this.startBlock("definition",e).endBlock(),!1)},e.prototype.parseBlockQuote=function(t,e,r){var n;return!(n=r.match(/^(\s*)>/))||(this.isBlock("list")&&0=t[3][0]?this.setBlock(e):this.startBlock("normal",e):this.isBlock("table")?0<=r.indexOf("|")?(t[3][2]+=1,this.setBlock(e,t[3])):this.startBlock("normal",e):this.isBlock("quote")?r.match(/^(\s*)$/)?this.startBlock("normal",e):this.setBlock(e):null==t||"normal"!==t[0]?this.startBlock("normal",e):this.setBlock(e),!0},e.prototype.optimizeBlocks=function(t,e){var r,n,s,l,i,o,a,c,h,p=t.slice(0),u=e.slice(0);for(p=this.call("beforeOptimizeBlocks",p,u),s=0;null!=p[s];)l=!1,r=p[s],o=null!=p[s-1]?p[s-1]:null,i=null!=p[s+1]?p[s+1]:null,c=r[0],n=r[1],a=r[2],"pre"===c&&u.slice(r[1],r[2]+1).reduce(function(t,e){return e.match(/^\s*$/)&&t},!0)&&(r[0]=c="normal"),"normal"===c&&(h=["list","quote"],n===a&&u[n].match(/^\s*$/)&&null!=o&&null!=i&&o[0]===i[0]&&0<=h.indexOf(o[0])&&(p[s-1]=[o[0],o[1],i[2],null],p.splice(s,2),l=!0)),l||(s+=1);return this.call("afterOptimizeBlocks",p,u)},e.prototype.parseCode=function(t,e,r){var n,s,l,i,o=e[0],a=e[1];return a=x(a),n=o.length,a.match(/^[_a-z0-9-\+\#\:\.]+$/i)?1<(e=a.split(":")).length&&(a=e[0],l=e[1],a=x(a),l=x(l)):a=null,s=!0,t=t.slice(1,-1).map(function(t){return t=t.replace(new RegExp("/^[ ]{"+n+"}/"),""),s&&!t.match(/^\s*$/)&&(s=!1),d(t)}),i=this.markLines(t,r+1).join("\n"),s?"":"
    "+i+"
    "},e.prototype.parsePre=function(t,e,r){var n;return t=t.map(function(t){return d(t.substring(4))}),(n=this.markLines(t,r).join("\n")).match(/^\s*$/)?"":"
    "+n+"
    "},e.prototype.parseAhtml=function(t,e,r){return x(this.markLines(t,r).join("\n"))},e.prototype.parseShtml=function(t,e,r){return x(this.markLines(t.slice(1,-1),r+1).join("\n"))},e.prototype.parseMath=function(t,e,r,n){return"

    "+this.markLine(r,n)+d(t.join("\n"))+"

    "},e.prototype.parseSh=function(t,e,r,n){var s=this.markLine(r,n)+this.parseInline(x(t[0],"# "));return s.match(/^\s*$/)?"":""+s+""},e.prototype.parseMh=function(t,e,r,n){return this.parseSh(t,e,r,n)},e.prototype.parseQuote=function(t,e,r){var n;return(n=(t=t.map(function(t){return t.replace(/^\s*> ?/,"")})).join("\n")).match(/^\s*$/)?"":"
    "+this.parse(n,!0,r)+"
    "},e.prototype.parseList=function(t,e,r){for(var n,s,l,i,o,a,c,h,p,u,f,k,m="",g=99999,d=99999,B=!1,b=!1,y=[],v=n=0,$=t.length;n<$;v=++n)(h=(c=t[v]).match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i))?(u=h[1].length,k=0<="+-*".indexOf(h[2])?"ul":"ol",g=Math.min(u,g),B=!0,0"),l!==k&&(l&&(m+=""),m+="<"+k+">"),o=v,i=[f],l=k)):i.push(p.replace(new RegExp("^\\s{"+d+"}"),""));return 0"+this.parse(i.join("\n"),!0,r+o)+""),m},e.prototype.parseTable=function(t,e,r){for(var n,s,l,i,o,a,c,h,p,u,f,k,m=e[0],g=e[1],d=0";B+="",d?B+="":b=b&&!1}return null!==b&&(B+=""),B+""},e.prototype.parseHr=function(t,e,r){return this.line?'
    ':"
    "},e.prototype.parseNormal=function(t,e,r){var n,s,l;return null==e&&(e=!1),n=0,t=t.map((l=this,function(t){return(t=l.parseInline(t)).match(/^\s*$/)||(t=l.markLine(r+n)+t),n+=1,t})),(s=(s=(s=x(t.join("\n"))).replace(/(\n\s*){2,}/g,"

    ")).replace(/\n/g,"
    ")).match(/^\s*$/)?"":e?s:"

    "+s+"

    "},e.prototype.parseFootnote=function(t,e){e[0];var r=e[1],n=this.footnotes.indexOf(r);return 0<=n&&((t=t.slice(0))[0]=t[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/,""),this.footnotes[n]=t),""},e.prototype.parseDefinition=function(){return""},e.prototype.parseHtml=function(t,e,r){var n;return t=t.map((n=this,function(t){return n.parseInline(t,null!=n.specialWhiteList[e]?n.specialWhiteList[e]:"")})),this.markLines(t,r).join("\n")},e.prototype.cleanUrl=function(t){var e,r=new RegExp("^\\s*((http|https|ftp|mailto):["+B+"_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&\\(\\)]+)","i"),n=new RegExp("^\\s*(["+B+"_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)","i");return(e=t.match(r))||(e=t.match(n))?e[1]:"#"},e.prototype.escapeBracket=function(t){return b(["\\[","\\]","\\(","\\)"],["[","]","(",")"],t)},e.prototype.startBlock=function(t,e,r){return null==r&&(r=null),this.pos+=1,this.current=t,this.blocks.push([t,e,e,r]),this},e.prototype.endBlock=function(){return this.current="normal",this},e.prototype.isBlock=function(t,e){return null==e&&(e=null),this.current===t&&(null===e||this.blocks[this.pos][3]===e)},e.prototype.getBlock=function(){return null!=this.blocks[this.pos]?this.blocks[this.pos]:null},e.prototype.setBlock=function(t,e){return null==t&&(t=null),null==e&&(e=null),null!==t&&(this.blocks[this.pos][2]=t),null!==e&&(this.blocks[this.pos][3]=e),this},e.prototype.backBlock=function(t,e,r){var n,s;return null==r&&(r=null),this.pos<0?this.startBlock(e,0,r):(s=this.blocks[this.pos][2],this.blocks[this.pos][2]=s-t,n=[e,s-t+1,s,r],this.blocks[this.pos][1]<=this.blocks[this.pos][2]?(this.pos+=1,this.blocks.push(n)):this.blocks[this.pos]=n,this.current=e,this)},e.prototype.combineBlock=function(){var t,e;return this.pos<1||(e=this.blocks[this.pos-1].slice(0),t=this.blocks[this.pos].slice(0),e[2]=t[2],this.blocks[this.pos-1]=e,this.current=e[0],this.blocks=this.blocks.slice(0,-1),--this.pos),this},t=e,"undefined"!=typeof module&&null!==module?module.exports=t:"undefined"!=typeof window&&null!==window&&(window.HyperDown=t)}).call(this); \ No newline at end of file diff --git a/admin/js/jquery-ui.js b/admin/js/jquery-ui.js index 5e24f394..79d41e4e 100644 --- a/admin/js/jquery-ui.js +++ b/admin/js/jquery-ui.js @@ -1,4980 +1 @@ -/*! jQuery UI - v1.10.3 - 2013-10-16 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.datepicker.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-highlight.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - //
    - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - }, - - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); - } - }); - }, - - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - - - - - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } - }, - - // only used by resizable - hasScroll: function( el, a ) { - - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; - } - - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; - - if ( el[ scroll ] > 0 ) { - return true; - } - - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
    ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; - -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; -}); - -})( jQuery ); -(function( $, undefined ) { - -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var that = this; - - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); - }) - .bind("click."+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { - $.removeData(event.target, that.widgetName + ".preventClickEvent"); - event.stopImmediatePropagation(); - return false; - } - }); - - this.started = false; - }, - - // TODO: make sure destroying one instance of mouse doesn't mess with - // other instances of mouse - _mouseDestroy: function() { - this.element.unbind("."+this.widgetName); - if ( this._mouseMoveDelegate ) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - } - }, - - _mouseDown: function(event) { - // don't let more than one widget handle mouseStart - if( mouseHandled ) { return; } - - // we may have missed mouseup (out of window) - (this._mouseStarted && this._mouseUp(event)); - - this._mouseDownEvent = event; - - var that = this, - btnIsLeft = (event.which === 1), - // event.target.nodeName works around a bug in IE 8 with - // disabled inputs (#7620) - elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); - if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { - return true; - } - - this.mouseDelayMet = !this.options.delay; - if (!this.mouseDelayMet) { - this._mouseDelayTimer = setTimeout(function() { - that.mouseDelayMet = true; - }, this.options.delay); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = (this._mouseStart(event) !== false); - if (!this._mouseStarted) { - event.preventDefault(); - return true; - } - } - - // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { - $.removeData(event.target, this.widgetName + ".preventClickEvent"); - } - - // these delegates are required to keep context - this._mouseMoveDelegate = function(event) { - return that._mouseMove(event); - }; - this._mouseUpDelegate = function(event) { - return that._mouseUp(event); - }; - $(document) - .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .bind("mouseup."+this.widgetName, this._mouseUpDelegate); - - event.preventDefault(); - - mouseHandled = true; - return true; - }, - - _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); - } - - if (this._mouseStarted) { - this._mouseDrag(event); - return event.preventDefault(); - } - - if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { - this._mouseStarted = - (this._mouseStart(this._mouseDownEvent, event) !== false); - (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); - } - - return !this._mouseStarted; - }, - - _mouseUp: function(event) { - $(document) - .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) - .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); - - if (this._mouseStarted) { - this._mouseStarted = false; - - if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + ".preventClickEvent", true); - } - - this._mouseStop(event); - } - - return false; - }, - - _mouseDistanceMet: function(event) { - return (Math.max( - Math.abs(this._mouseDownEvent.pageX - event.pageX), - Math.abs(this._mouseDownEvent.pageY - event.pageY) - ) >= this.options.distance - ); - }, - - _mouseDelayMet: function(/* event */) { - return this.mouseDelayMet; - }, - - // These are placeholder methods, to be overriden by extending plugin - _mouseStart: function(/* event */) {}, - _mouseDrag: function(/* event */) {}, - _mouseStop: function(/* event */) {}, - _mouseCapture: function(/* event */) { return true; } -}); - -})(jQuery); -(function( $, undefined ) { - -$.extend($.ui, { datepicker: { version: "1.10.3" } }); - -var PROP_NAME = "datepicker", - instActive; - -/* Date picker manager. - Use the singleton instance of this class, $.datepicker, to interact with the date picker. - Settings for (groups of) date pickers are maintained in an instance object, - allowing multiple different settings on the same page. */ - -function Datepicker() { - this._curInst = null; // The current instance in use - this._keyEvent = false; // If the last event was a key event - this._disabledInputs = []; // List of date picker inputs that have been disabled - this._datepickerShowing = false; // True if the popup picker is showing , false if not - this._inDialog = false; // True if showing within a "dialog", false if not - this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division - this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class - this._appendClass = "ui-datepicker-append"; // The name of the append marker class - this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class - this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class - this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class - this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class - this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class - this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class - this.regional = []; // Available regional settings, indexed by language code - this.regional[""] = { // Default regional settings - closeText: "Done", // Display text for close link - prevText: "Prev", // Display text for previous month link - nextText: "Next", // Display text for next month link - currentText: "Today", // Display text for current month link - monthNames: ["January","February","March","April","May","June", - "July","August","September","October","November","December"], // Names of months for drop-down and formatting - monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting - dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting - dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting - dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday - weekHeader: "Wk", // Column header for week of the year - dateFormat: "mm/dd/yy", // See format options on parseDate - firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... - isRTL: false, // True if right-to-left language, false if left-to-right - showMonthAfterYear: false, // True if the year select precedes month, false for month then year - yearSuffix: "" // Additional text to append to the year in the month headers - }; - this._defaults = { // Global defaults for all the date picker instances - showOn: "focus", // "focus" for popup on focus, - // "button" for trigger button, or "both" for either - showAnim: "fadeIn", // Name of jQuery animation for popup - showOptions: {}, // Options for enhanced animations - defaultDate: null, // Used when field is blank: actual date, - // +/-number for offset from today, null for today - appendText: "", // Display text following the input box, e.g. showing the format - buttonText: "...", // Text for trigger button - buttonImage: "", // URL for trigger button image - buttonImageOnly: false, // True if the image appears alone, false if it appears on a button - hideIfNoPrevNext: false, // True to hide next/previous month links - // if not applicable, false to just disable them - navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links - gotoCurrent: false, // True if today link goes back to current selection instead - changeMonth: false, // True if month can be selected directly, false if only prev/next - changeYear: false, // True if year can be selected directly, false if only prev/next - yearRange: "c-10:c+10", // Range of years to display in drop-down, - // either relative to today's year (-nn:+nn), relative to currently displayed year - // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) - showOtherMonths: false, // True to show dates in other months, false to leave blank - selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable - showWeek: false, // True to show week of the year, false to not show it - calculateWeek: this.iso8601Week, // How to calculate the week of the year, - // takes a Date and returns the number of the week for it - shortYearCutoff: "+10", // Short year values < this are in the current century, - // > this are in the previous century, - // string value starting with "+" for current year + value - minDate: null, // The earliest selectable date, or null for no limit - maxDate: null, // The latest selectable date, or null for no limit - duration: "fast", // Duration of display/closure - beforeShowDay: null, // Function that takes a date and returns an array with - // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", - // [2] = cell title (optional), e.g. $.datepicker.noWeekends - beforeShow: null, // Function that takes an input field and - // returns a set of custom settings for the date picker - onSelect: null, // Define a callback function when a date is selected - onChangeMonthYear: null, // Define a callback function when the month or year is changed - onClose: null, // Define a callback function when the datepicker is closed - numberOfMonths: 1, // Number of months to show at a time - showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) - stepMonths: 1, // Number of months to step back/forward - stepBigMonths: 12, // Number of months to step back/forward for the big links - altField: "", // Selector for an alternate field to store selected dates into - altFormat: "", // The date format to use for the alternate field - constrainInput: true, // The input is constrained by the current date format - showButtonPanel: false, // True to show button panel, false to not show it - autoSize: false, // True to size the input for the date format, false to leave as is - disabled: false // The initial disabled state - }; - $.extend(this._defaults, this.regional[""]); - this.dpDiv = bindHover($("
    ")); -} - -$.extend(Datepicker.prototype, { - /* Class name added to elements to indicate already configured with a date picker. */ - markerClassName: "hasDatepicker", - - //Keep track of the maximum number of rows displayed (see #7043) - maxRows: 4, - - // TODO rename to "widget" when switching to widget factory - _widgetDatepicker: function() { - return this.dpDiv; - }, - - /* Override the default settings for all instances of the date picker. - * @param settings object - the new settings to use as defaults (anonymous object) - * @return the manager object - */ - setDefaults: function(settings) { - extendRemove(this._defaults, settings || {}); - return this; - }, - - /* Attach the date picker to a jQuery selection. - * @param target element - the target input field or division or span - * @param settings object - the new settings to use for this date picker instance (anonymous) - */ - _attachDatepicker: function(target, settings) { - var nodeName, inline, inst; - nodeName = target.nodeName.toLowerCase(); - inline = (nodeName === "div" || nodeName === "span"); - if (!target.id) { - this.uuid += 1; - target.id = "dp" + this.uuid; - } - inst = this._newInst($(target), inline); - inst.settings = $.extend({}, settings || {}); - if (nodeName === "input") { - this._connectDatepicker(target, inst); - } else if (inline) { - this._inlineDatepicker(target, inst); - } - }, - - /* Create a new instance object. */ - _newInst: function(target, inline) { - var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars - return {id: id, input: target, // associated target - selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection - drawMonth: 0, drawYear: 0, // month being drawn - inline: inline, // is datepicker inline or not - dpDiv: (!inline ? this.dpDiv : // presentation div - bindHover($("
    ")))}; - }, - - /* Attach the date picker to an input field. */ - _connectDatepicker: function(target, inst) { - var input = $(target); - inst.append = $([]); - inst.trigger = $([]); - if (input.hasClass(this.markerClassName)) { - return; - } - this._attachments(input, inst); - input.addClass(this.markerClassName).keydown(this._doKeyDown). - keypress(this._doKeyPress).keyup(this._doKeyUp); - this._autoSize(inst); - $.data(target, PROP_NAME, inst); - //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) - if( inst.settings.disabled ) { - this._disableDatepicker( target ); - } - }, - - /* Make attachments based on settings. */ - _attachments: function(input, inst) { - var showOn, buttonText, buttonImage, - appendText = this._get(inst, "appendText"), - isRTL = this._get(inst, "isRTL"); - - if (inst.append) { - inst.append.remove(); - } - if (appendText) { - inst.append = $("" + appendText + ""); - input[isRTL ? "before" : "after"](inst.append); - } - - input.unbind("focus", this._showDatepicker); - - if (inst.trigger) { - inst.trigger.remove(); - } - - showOn = this._get(inst, "showOn"); - if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field - input.focus(this._showDatepicker); - } - if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked - buttonText = this._get(inst, "buttonText"); - buttonImage = this._get(inst, "buttonImage"); - inst.trigger = $(this._get(inst, "buttonImageOnly") ? - $("").addClass(this._triggerClass). - attr({ src: buttonImage, alt: buttonText, title: buttonText }) : - $("").addClass(this._triggerClass). - html(!buttonImage ? buttonText : $("").attr( - { src:buttonImage, alt:buttonText, title:buttonText }))); - input[isRTL ? "before" : "after"](inst.trigger); - inst.trigger.click(function() { - if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { - $.datepicker._hideDatepicker(); - } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { - $.datepicker._hideDatepicker(); - $.datepicker._showDatepicker(input[0]); - } else { - $.datepicker._showDatepicker(input[0]); - } - return false; - }); - } - }, - - /* Apply the maximum length for the date format. */ - _autoSize: function(inst) { - if (this._get(inst, "autoSize") && !inst.inline) { - var findMax, max, maxI, i, - date = new Date(2009, 12 - 1, 20), // Ensure double digits - dateFormat = this._get(inst, "dateFormat"); - - if (dateFormat.match(/[DM]/)) { - findMax = function(names) { - max = 0; - maxI = 0; - for (i = 0; i < names.length; i++) { - if (names[i].length > max) { - max = names[i].length; - maxI = i; - } - } - return maxI; - }; - date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? - "monthNames" : "monthNamesShort")))); - date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? - "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); - } - inst.input.attr("size", this._formatDate(inst, date).length); - } - }, - - /* Attach an inline date picker to a div. */ - _inlineDatepicker: function(target, inst) { - var divSpan = $(target); - if (divSpan.hasClass(this.markerClassName)) { - return; - } - divSpan.addClass(this.markerClassName).append(inst.dpDiv); - $.data(target, PROP_NAME, inst); - this._setDate(inst, this._getDefaultDate(inst), true); - this._updateDatepicker(inst); - this._updateAlternate(inst); - //If disabled option is true, disable the datepicker before showing it (see ticket #5665) - if( inst.settings.disabled ) { - this._disableDatepicker( target ); - } - // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements - // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height - inst.dpDiv.css( "display", "block" ); - }, - - /* Pop-up the date picker in a "dialog" box. - * @param input element - ignored - * @param date string or Date - the initial date to display - * @param onSelect function - the function to call when a date is selected - * @param settings object - update the dialog date picker instance's settings (anonymous object) - * @param pos int[2] - coordinates for the dialog's position within the screen or - * event - with x/y coordinates or - * leave empty for default (screen centre) - * @return the manager object - */ - _dialogDatepicker: function(input, date, onSelect, settings, pos) { - var id, browserWidth, browserHeight, scrollX, scrollY, - inst = this._dialogInst; // internal instance - - if (!inst) { - this.uuid += 1; - id = "dp" + this.uuid; - this._dialogInput = $(""); - this._dialogInput.keydown(this._doKeyDown); - $("body").append(this._dialogInput); - inst = this._dialogInst = this._newInst(this._dialogInput, false); - inst.settings = {}; - $.data(this._dialogInput[0], PROP_NAME, inst); - } - extendRemove(inst.settings, settings || {}); - date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); - this._dialogInput.val(date); - - this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); - if (!this._pos) { - browserWidth = document.documentElement.clientWidth; - browserHeight = document.documentElement.clientHeight; - scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; - scrollY = document.documentElement.scrollTop || document.body.scrollTop; - this._pos = // should use actual width/height below - [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; - } - - // move input on screen for focus, but hidden behind dialog - this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); - inst.settings.onSelect = onSelect; - this._inDialog = true; - this.dpDiv.addClass(this._dialogClass); - this._showDatepicker(this._dialogInput[0]); - if ($.blockUI) { - $.blockUI(this.dpDiv); - } - $.data(this._dialogInput[0], PROP_NAME, inst); - return this; - }, - - /* Detach a datepicker from its control. - * @param target element - the target input field or division or span - */ - _destroyDatepicker: function(target) { - var nodeName, - $target = $(target), - inst = $.data(target, PROP_NAME); - - if (!$target.hasClass(this.markerClassName)) { - return; - } - - nodeName = target.nodeName.toLowerCase(); - $.removeData(target, PROP_NAME); - if (nodeName === "input") { - inst.append.remove(); - inst.trigger.remove(); - $target.removeClass(this.markerClassName). - unbind("focus", this._showDatepicker). - unbind("keydown", this._doKeyDown). - unbind("keypress", this._doKeyPress). - unbind("keyup", this._doKeyUp); - } else if (nodeName === "div" || nodeName === "span") { - $target.removeClass(this.markerClassName).empty(); - } - }, - - /* Enable the date picker to a jQuery selection. - * @param target element - the target input field or division or span - */ - _enableDatepicker: function(target) { - var nodeName, inline, - $target = $(target), - inst = $.data(target, PROP_NAME); - - if (!$target.hasClass(this.markerClassName)) { - return; - } - - nodeName = target.nodeName.toLowerCase(); - if (nodeName === "input") { - target.disabled = false; - inst.trigger.filter("button"). - each(function() { this.disabled = false; }).end(). - filter("img").css({opacity: "1.0", cursor: ""}); - } else if (nodeName === "div" || nodeName === "span") { - inline = $target.children("." + this._inlineClass); - inline.children().removeClass("ui-state-disabled"); - inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). - prop("disabled", false); - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value === target ? null : value); }); // delete entry - }, - - /* Disable the date picker to a jQuery selection. - * @param target element - the target input field or division or span - */ - _disableDatepicker: function(target) { - var nodeName, inline, - $target = $(target), - inst = $.data(target, PROP_NAME); - - if (!$target.hasClass(this.markerClassName)) { - return; - } - - nodeName = target.nodeName.toLowerCase(); - if (nodeName === "input") { - target.disabled = true; - inst.trigger.filter("button"). - each(function() { this.disabled = true; }).end(). - filter("img").css({opacity: "0.5", cursor: "default"}); - } else if (nodeName === "div" || nodeName === "span") { - inline = $target.children("." + this._inlineClass); - inline.children().addClass("ui-state-disabled"); - inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). - prop("disabled", true); - } - this._disabledInputs = $.map(this._disabledInputs, - function(value) { return (value === target ? null : value); }); // delete entry - this._disabledInputs[this._disabledInputs.length] = target; - }, - - /* Is the first field in a jQuery collection disabled as a datepicker? - * @param target element - the target input field or division or span - * @return boolean - true if disabled, false if enabled - */ - _isDisabledDatepicker: function(target) { - if (!target) { - return false; - } - for (var i = 0; i < this._disabledInputs.length; i++) { - if (this._disabledInputs[i] === target) { - return true; - } - } - return false; - }, - - /* Retrieve the instance data for the target control. - * @param target element - the target input field or division or span - * @return object - the associated instance data - * @throws error if a jQuery problem getting data - */ - _getInst: function(target) { - try { - return $.data(target, PROP_NAME); - } - catch (err) { - throw "Missing instance data for this datepicker"; - } - }, - - /* Update or retrieve the settings for a date picker attached to an input field or division. - * @param target element - the target input field or division or span - * @param name object - the new settings to update or - * string - the name of the setting to change or retrieve, - * when retrieving also "all" for all instance settings or - * "defaults" for all global defaults - * @param value any - the new value for the setting - * (omit if above is an object or to retrieve a value) - */ - _optionDatepicker: function(target, name, value) { - var settings, date, minDate, maxDate, - inst = this._getInst(target); - - if (arguments.length === 2 && typeof name === "string") { - return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : - (inst ? (name === "all" ? $.extend({}, inst.settings) : - this._get(inst, name)) : null)); - } - - settings = name || {}; - if (typeof name === "string") { - settings = {}; - settings[name] = value; - } - - if (inst) { - if (this._curInst === inst) { - this._hideDatepicker(); - } - - date = this._getDateDatepicker(target, true); - minDate = this._getMinMaxDate(inst, "min"); - maxDate = this._getMinMaxDate(inst, "max"); - extendRemove(inst.settings, settings); - // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided - if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { - inst.settings.minDate = this._formatDate(inst, minDate); - } - if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { - inst.settings.maxDate = this._formatDate(inst, maxDate); - } - if ( "disabled" in settings ) { - if ( settings.disabled ) { - this._disableDatepicker(target); - } else { - this._enableDatepicker(target); - } - } - this._attachments($(target), inst); - this._autoSize(inst); - this._setDate(inst, date); - this._updateAlternate(inst); - this._updateDatepicker(inst); - } - }, - - // change method deprecated - _changeDatepicker: function(target, name, value) { - this._optionDatepicker(target, name, value); - }, - - /* Redraw the date picker attached to an input field or division. - * @param target element - the target input field or division or span - */ - _refreshDatepicker: function(target) { - var inst = this._getInst(target); - if (inst) { - this._updateDatepicker(inst); - } - }, - - /* Set the dates for a jQuery selection. - * @param target element - the target input field or division or span - * @param date Date - the new date - */ - _setDateDatepicker: function(target, date) { - var inst = this._getInst(target); - if (inst) { - this._setDate(inst, date); - this._updateDatepicker(inst); - this._updateAlternate(inst); - } - }, - - /* Get the date(s) for the first entry in a jQuery selection. - * @param target element - the target input field or division or span - * @param noDefault boolean - true if no default date is to be used - * @return Date - the current date - */ - _getDateDatepicker: function(target, noDefault) { - var inst = this._getInst(target); - if (inst && !inst.inline) { - this._setDateFromField(inst, noDefault); - } - return (inst ? this._getDate(inst) : null); - }, - - /* Handle keystrokes. */ - _doKeyDown: function(event) { - var onSelect, dateStr, sel, - inst = $.datepicker._getInst(event.target), - handled = true, - isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); - - inst._keyEvent = true; - if ($.datepicker._datepickerShowing) { - switch (event.keyCode) { - case 9: $.datepicker._hideDatepicker(); - handled = false; - break; // hide on tab out - case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + - $.datepicker._currentClass + ")", inst.dpDiv); - if (sel[0]) { - $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); - } - - onSelect = $.datepicker._get(inst, "onSelect"); - if (onSelect) { - dateStr = $.datepicker._formatDate(inst); - - // trigger custom callback - onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); - } else { - $.datepicker._hideDatepicker(); - } - - return false; // don't submit the form - case 27: $.datepicker._hideDatepicker(); - break; // hide on escape - case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? - -$.datepicker._get(inst, "stepBigMonths") : - -$.datepicker._get(inst, "stepMonths")), "M"); - break; // previous month/year on page up/+ ctrl - case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? - +$.datepicker._get(inst, "stepBigMonths") : - +$.datepicker._get(inst, "stepMonths")), "M"); - break; // next month/year on page down/+ ctrl - case 35: if (event.ctrlKey || event.metaKey) { - $.datepicker._clearDate(event.target); - } - handled = event.ctrlKey || event.metaKey; - break; // clear on ctrl or command +end - case 36: if (event.ctrlKey || event.metaKey) { - $.datepicker._gotoToday(event.target); - } - handled = event.ctrlKey || event.metaKey; - break; // current on ctrl or command +home - case 37: if (event.ctrlKey || event.metaKey) { - $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); - } - handled = event.ctrlKey || event.metaKey; - // -1 day on ctrl or command +left - if (event.originalEvent.altKey) { - $.datepicker._adjustDate(event.target, (event.ctrlKey ? - -$.datepicker._get(inst, "stepBigMonths") : - -$.datepicker._get(inst, "stepMonths")), "M"); - } - // next month/year on alt +left on Mac - break; - case 38: if (event.ctrlKey || event.metaKey) { - $.datepicker._adjustDate(event.target, -7, "D"); - } - handled = event.ctrlKey || event.metaKey; - break; // -1 week on ctrl or command +up - case 39: if (event.ctrlKey || event.metaKey) { - $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); - } - handled = event.ctrlKey || event.metaKey; - // +1 day on ctrl or command +right - if (event.originalEvent.altKey) { - $.datepicker._adjustDate(event.target, (event.ctrlKey ? - +$.datepicker._get(inst, "stepBigMonths") : - +$.datepicker._get(inst, "stepMonths")), "M"); - } - // next month/year on alt +right - break; - case 40: if (event.ctrlKey || event.metaKey) { - $.datepicker._adjustDate(event.target, +7, "D"); - } - handled = event.ctrlKey || event.metaKey; - break; // +1 week on ctrl or command +down - default: handled = false; - } - } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home - $.datepicker._showDatepicker(this); - } else { - handled = false; - } - - if (handled) { - event.preventDefault(); - event.stopPropagation(); - } - }, - - /* Filter entered characters - based on date format. */ - _doKeyPress: function(event) { - var chars, chr, - inst = $.datepicker._getInst(event.target); - - if ($.datepicker._get(inst, "constrainInput")) { - chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); - chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); - return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); - } - }, - - /* Synchronise manual entry and field/alternate field. */ - _doKeyUp: function(event) { - var date, - inst = $.datepicker._getInst(event.target); - - if (inst.input.val() !== inst.lastVal) { - try { - date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), - (inst.input ? inst.input.val() : null), - $.datepicker._getFormatConfig(inst)); - - if (date) { // only if valid - $.datepicker._setDateFromField(inst); - $.datepicker._updateAlternate(inst); - $.datepicker._updateDatepicker(inst); - } - } - catch (err) { - } - } - return true; - }, - - /* Pop-up the date picker for a given input field. - * If false returned from beforeShow event handler do not show. - * @param input element - the input field attached to the date picker or - * event - if triggered by focus - */ - _showDatepicker: function(input) { - input = input.target || input; - if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger - input = $("input", input.parentNode)[0]; - } - - if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here - return; - } - - var inst, beforeShow, beforeShowSettings, isFixed, - offset, showAnim, duration; - - inst = $.datepicker._getInst(input); - if ($.datepicker._curInst && $.datepicker._curInst !== inst) { - $.datepicker._curInst.dpDiv.stop(true, true); - if ( inst && $.datepicker._datepickerShowing ) { - $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); - } - } - - beforeShow = $.datepicker._get(inst, "beforeShow"); - beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; - if(beforeShowSettings === false){ - return; - } - extendRemove(inst.settings, beforeShowSettings); - - inst.lastVal = null; - $.datepicker._lastInput = input; - $.datepicker._setDateFromField(inst); - - if ($.datepicker._inDialog) { // hide cursor - input.value = ""; - } - if (!$.datepicker._pos) { // position below input - $.datepicker._pos = $.datepicker._findPos(input); - $.datepicker._pos[1] += input.offsetHeight; // add the height - } - - isFixed = false; - $(input).parents().each(function() { - isFixed |= $(this).css("position") === "fixed"; - return !isFixed; - }); - - offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; - $.datepicker._pos = null; - //to avoid flashes on Firefox - inst.dpDiv.empty(); - // determine sizing offscreen - inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); - $.datepicker._updateDatepicker(inst); - // fix width for dynamic number of date pickers - // and adjust position before showing - offset = $.datepicker._checkOffset(inst, offset, isFixed); - inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? - "static" : (isFixed ? "fixed" : "absolute")), display: "none", - left: offset.left + "px", top: offset.top + "px"}); - - if (!inst.inline) { - showAnim = $.datepicker._get(inst, "showAnim"); - duration = $.datepicker._get(inst, "duration"); - inst.dpDiv.zIndex($(input).zIndex()+1); - $.datepicker._datepickerShowing = true; - - if ( $.effects && $.effects.effect[ showAnim ] ) { - inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); - } else { - inst.dpDiv[showAnim || "show"](showAnim ? duration : null); - } - - if ( $.datepicker._shouldFocusInput( inst ) ) { - inst.input.focus(); - } - - $.datepicker._curInst = inst; - } - }, - - /* Generate the date picker content. */ - _updateDatepicker: function(inst) { - this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) - instActive = inst; // for delegate hover events - inst.dpDiv.empty().append(this._generateHTML(inst)); - this._attachHandlers(inst); - inst.dpDiv.find("." + this._dayOverClass + " a").mouseover(); - - var origyearshtml, - numMonths = this._getNumberOfMonths(inst), - cols = numMonths[1], - width = 17; - - inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); - if (cols > 1) { - inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); - } - inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + - "Class"]("ui-datepicker-multi"); - inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + - "Class"]("ui-datepicker-rtl"); - - if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { - inst.input.focus(); - } - - // deffered render of the years select (to avoid flashes on Firefox) - if( inst.yearshtml ){ - origyearshtml = inst.yearshtml; - setTimeout(function(){ - //assure that inst.yearshtml didn't change. - if( origyearshtml === inst.yearshtml && inst.yearshtml ){ - inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); - } - origyearshtml = inst.yearshtml = null; - }, 0); - } - }, - - // #6694 - don't focus the input if it's already focused - // this breaks the change event in IE - // Support: IE and jQuery <1.9 - _shouldFocusInput: function( inst ) { - return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); - }, - - /* Check positioning to remain on screen. */ - _checkOffset: function(inst, offset, isFixed) { - var dpWidth = inst.dpDiv.outerWidth(), - dpHeight = inst.dpDiv.outerHeight(), - inputWidth = inst.input ? inst.input.outerWidth() : 0, - inputHeight = inst.input ? inst.input.outerHeight() : 0, - viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), - viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); - - offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); - offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; - offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; - - // now check if datepicker is showing outside window viewport - move to a better place if so. - offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? - Math.abs(offset.left + dpWidth - viewWidth) : 0); - offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? - Math.abs(dpHeight + inputHeight) : 0); - - return offset; - }, - - /* Find an object's position on the screen. */ - _findPos: function(obj) { - var position, - inst = this._getInst(obj), - isRTL = this._get(inst, "isRTL"); - - while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { - obj = obj[isRTL ? "previousSibling" : "nextSibling"]; - } - - position = $(obj).offset(); - return [position.left, position.top]; - }, - - /* Hide the date picker from view. - * @param input element - the input field attached to the date picker - */ - _hideDatepicker: function(input) { - var showAnim, duration, postProcess, onClose, - inst = this._curInst; - - if (!inst || (input && inst !== $.data(input, PROP_NAME))) { - return; - } - - if (this._datepickerShowing) { - showAnim = this._get(inst, "showAnim"); - duration = this._get(inst, "duration"); - postProcess = function() { - $.datepicker._tidyDialog(inst); - }; - - // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed - if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { - inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); - } else { - inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : - (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); - } - - if (!showAnim) { - postProcess(); - } - this._datepickerShowing = false; - - onClose = this._get(inst, "onClose"); - if (onClose) { - onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); - } - - this._lastInput = null; - if (this._inDialog) { - this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); - if ($.blockUI) { - $.unblockUI(); - $("body").append(this.dpDiv); - } - } - this._inDialog = false; - } - }, - - /* Tidy up after a dialog display. */ - _tidyDialog: function(inst) { - inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); - }, - - /* Close date picker if clicked elsewhere. */ - _checkExternalClick: function(event) { - if (!$.datepicker._curInst) { - return; - } - - var $target = $(event.target), - inst = $.datepicker._getInst($target[0]); - - if ( ( ( $target[0].id !== $.datepicker._mainDivId && - $target.parents("#" + $.datepicker._mainDivId).length === 0 && - !$target.hasClass($.datepicker.markerClassName) && - !$target.closest("." + $.datepicker._triggerClass).length && - $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || - ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { - $.datepicker._hideDatepicker(); - } - }, - - /* Adjust one of the date sub-fields. */ - _adjustDate: function(id, offset, period) { - var target = $(id), - inst = this._getInst(target[0]); - - if (this._isDisabledDatepicker(target[0])) { - return; - } - this._adjustInstDate(inst, offset + - (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning - period); - this._updateDatepicker(inst); - }, - - /* Action for current link. */ - _gotoToday: function(id) { - var date, - target = $(id), - inst = this._getInst(target[0]); - - if (this._get(inst, "gotoCurrent") && inst.currentDay) { - inst.selectedDay = inst.currentDay; - inst.drawMonth = inst.selectedMonth = inst.currentMonth; - inst.drawYear = inst.selectedYear = inst.currentYear; - } else { - date = new Date(); - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - } - this._notifyChange(inst); - this._adjustDate(target); - }, - - /* Action for selecting a new month/year. */ - _selectMonthYear: function(id, select, period) { - var target = $(id), - inst = this._getInst(target[0]); - - inst["selected" + (period === "M" ? "Month" : "Year")] = - inst["draw" + (period === "M" ? "Month" : "Year")] = - parseInt(select.options[select.selectedIndex].value,10); - - this._notifyChange(inst); - this._adjustDate(target); - }, - - /* Action for selecting a day. */ - _selectDay: function(id, month, year, td) { - var inst, - target = $(id); - - if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { - return; - } - - inst = this._getInst(target[0]); - inst.selectedDay = inst.currentDay = $("a", td).html(); - inst.selectedMonth = inst.currentMonth = month; - inst.selectedYear = inst.currentYear = year; - this._selectDate(id, this._formatDate(inst, - inst.currentDay, inst.currentMonth, inst.currentYear)); - }, - - /* Erase the input field and hide the date picker. */ - _clearDate: function(id) { - var target = $(id); - this._selectDate(target, ""); - }, - - /* Update the input field with the selected date. */ - _selectDate: function(id, dateStr) { - var onSelect, - target = $(id), - inst = this._getInst(target[0]); - - dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); - if (inst.input) { - inst.input.val(dateStr); - } - this._updateAlternate(inst); - - onSelect = this._get(inst, "onSelect"); - if (onSelect) { - onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback - } else if (inst.input) { - inst.input.trigger("change"); // fire the change event - } - - if (inst.inline){ - this._updateDatepicker(inst); - } else { - this._hideDatepicker(); - this._lastInput = inst.input[0]; - if (typeof(inst.input[0]) !== "object") { - inst.input.focus(); // restore focus - } - this._lastInput = null; - } - }, - - /* Update any alternate field to synchronise with the main field. */ - _updateAlternate: function(inst) { - var altFormat, date, dateStr, - altField = this._get(inst, "altField"); - - if (altField) { // update alternate field too - altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); - date = this._getDate(inst); - dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); - $(altField).each(function() { $(this).val(dateStr); }); - } - }, - - /* Set as beforeShowDay function to prevent selection of weekends. - * @param date Date - the date to customise - * @return [boolean, string] - is this date selectable?, what is its CSS class? - */ - noWeekends: function(date) { - var day = date.getDay(); - return [(day > 0 && day < 6), ""]; - }, - - /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. - * @param date Date - the date to get the week for - * @return number - the number of the week within the year that contains this date - */ - iso8601Week: function(date) { - var time, - checkDate = new Date(date.getTime()); - - // Find Thursday of this week starting on Monday - checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); - - time = checkDate.getTime(); - checkDate.setMonth(0); // Compare with Jan 1 - checkDate.setDate(1); - return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; - }, - - /* Parse a string value into a date object. - * See formatDate below for the possible formats. - * - * @param format string - the expected format of the date - * @param value string - the date in the above format - * @param settings Object - attributes include: - * shortYearCutoff number - the cutoff year for determining the century (optional) - * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) - * dayNames string[7] - names of the days from Sunday (optional) - * monthNamesShort string[12] - abbreviated names of the months (optional) - * monthNames string[12] - names of the months (optional) - * @return Date - the extracted date value or null if value is blank - */ - parseDate: function (format, value, settings) { - if (format == null || value == null) { - throw "Invalid arguments"; - } - - value = (typeof value === "object" ? value.toString() : value + ""); - if (value === "") { - return null; - } - - var iFormat, dim, extra, - iValue = 0, - shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, - shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : - new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), - dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, - dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, - monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, - monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, - year = -1, - month = -1, - day = -1, - doy = -1, - literal = false, - date, - // Check whether a format character is doubled - lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); - if (matches) { - iFormat++; - } - return matches; - }, - // Extract a number from the string value - getNumber = function(match) { - var isDoubled = lookAhead(match), - size = (match === "@" ? 14 : (match === "!" ? 20 : - (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), - digits = new RegExp("^\\d{1," + size + "}"), - num = value.substring(iValue).match(digits); - if (!num) { - throw "Missing number at position " + iValue; - } - iValue += num[0].length; - return parseInt(num[0], 10); - }, - // Extract a name from the string value and convert to an index - getName = function(match, shortNames, longNames) { - var index = -1, - names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { - return [ [k, v] ]; - }).sort(function (a, b) { - return -(a[1].length - b[1].length); - }); - - $.each(names, function (i, pair) { - var name = pair[1]; - if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { - index = pair[0]; - iValue += name.length; - return false; - } - }); - if (index !== -1) { - return index + 1; - } else { - throw "Unknown name at position " + iValue; - } - }, - // Confirm that a literal character matches the string value - checkLiteral = function() { - if (value.charAt(iValue) !== format.charAt(iFormat)) { - throw "Unexpected literal at position " + iValue; - } - iValue++; - }; - - for (iFormat = 0; iFormat < format.length; iFormat++) { - if (literal) { - if (format.charAt(iFormat) === "'" && !lookAhead("'")) { - literal = false; - } else { - checkLiteral(); - } - } else { - switch (format.charAt(iFormat)) { - case "d": - day = getNumber("d"); - break; - case "D": - getName("D", dayNamesShort, dayNames); - break; - case "o": - doy = getNumber("o"); - break; - case "m": - month = getNumber("m"); - break; - case "M": - month = getName("M", monthNamesShort, monthNames); - break; - case "y": - year = getNumber("y"); - break; - case "@": - date = new Date(getNumber("@")); - year = date.getFullYear(); - month = date.getMonth() + 1; - day = date.getDate(); - break; - case "!": - date = new Date((getNumber("!") - this._ticksTo1970) / 10000); - year = date.getFullYear(); - month = date.getMonth() + 1; - day = date.getDate(); - break; - case "'": - if (lookAhead("'")){ - checkLiteral(); - } else { - literal = true; - } - break; - default: - checkLiteral(); - } - } - } - - if (iValue < value.length){ - extra = value.substr(iValue); - if (!/^\s+/.test(extra)) { - throw "Extra/unparsed characters found in date: " + extra; - } - } - - if (year === -1) { - year = new Date().getFullYear(); - } else if (year < 100) { - year += new Date().getFullYear() - new Date().getFullYear() % 100 + - (year <= shortYearCutoff ? 0 : -100); - } - - if (doy > -1) { - month = 1; - day = doy; - do { - dim = this._getDaysInMonth(year, month - 1); - if (day <= dim) { - break; - } - month++; - day -= dim; - } while (true); - } - - date = this._daylightSavingAdjust(new Date(year, month - 1, day)); - if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { - throw "Invalid date"; // E.g. 31/02/00 - } - return date; - }, - - /* Standard date formats. */ - ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) - COOKIE: "D, dd M yy", - ISO_8601: "yy-mm-dd", - RFC_822: "D, d M y", - RFC_850: "DD, dd-M-y", - RFC_1036: "D, d M y", - RFC_1123: "D, d M yy", - RFC_2822: "D, d M yy", - RSS: "D, d M y", // RFC 822 - TICKS: "!", - TIMESTAMP: "@", - W3C: "yy-mm-dd", // ISO 8601 - - _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + - Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), - - /* Format a date object into a string value. - * The format can be combinations of the following: - * d - day of month (no leading zero) - * dd - day of month (two digit) - * o - day of year (no leading zeros) - * oo - day of year (three digit) - * D - day name short - * DD - day name long - * m - month of year (no leading zero) - * mm - month of year (two digit) - * M - month name short - * MM - month name long - * y - year (two digit) - * yy - year (four digit) - * @ - Unix timestamp (ms since 01/01/1970) - * ! - Windows ticks (100ns since 01/01/0001) - * "..." - literal text - * '' - single quote - * - * @param format string - the desired format of the date - * @param date Date - the date value to format - * @param settings Object - attributes include: - * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) - * dayNames string[7] - names of the days from Sunday (optional) - * monthNamesShort string[12] - abbreviated names of the months (optional) - * monthNames string[12] - names of the months (optional) - * @return string - the date in the above format - */ - formatDate: function (format, date, settings) { - if (!date) { - return ""; - } - - var iFormat, - dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, - dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, - monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, - monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, - // Check whether a format character is doubled - lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); - if (matches) { - iFormat++; - } - return matches; - }, - // Format a number, with leading zero if necessary - formatNumber = function(match, value, len) { - var num = "" + value; - if (lookAhead(match)) { - while (num.length < len) { - num = "0" + num; - } - } - return num; - }, - // Format a name, short or long as requested - formatName = function(match, value, shortNames, longNames) { - return (lookAhead(match) ? longNames[value] : shortNames[value]); - }, - output = "", - literal = false; - - if (date) { - for (iFormat = 0; iFormat < format.length; iFormat++) { - if (literal) { - if (format.charAt(iFormat) === "'" && !lookAhead("'")) { - literal = false; - } else { - output += format.charAt(iFormat); - } - } else { - switch (format.charAt(iFormat)) { - case "d": - output += formatNumber("d", date.getDate(), 2); - break; - case "D": - output += formatName("D", date.getDay(), dayNamesShort, dayNames); - break; - case "o": - output += formatNumber("o", - Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); - break; - case "m": - output += formatNumber("m", date.getMonth() + 1, 2); - break; - case "M": - output += formatName("M", date.getMonth(), monthNamesShort, monthNames); - break; - case "y": - output += (lookAhead("y") ? date.getFullYear() : - (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); - break; - case "@": - output += date.getTime(); - break; - case "!": - output += date.getTime() * 10000 + this._ticksTo1970; - break; - case "'": - if (lookAhead("'")) { - output += "'"; - } else { - literal = true; - } - break; - default: - output += format.charAt(iFormat); - } - } - } - } - return output; - }, - - /* Extract all possible characters from the date format. */ - _possibleChars: function (format) { - var iFormat, - chars = "", - literal = false, - // Check whether a format character is doubled - lookAhead = function(match) { - var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); - if (matches) { - iFormat++; - } - return matches; - }; - - for (iFormat = 0; iFormat < format.length; iFormat++) { - if (literal) { - if (format.charAt(iFormat) === "'" && !lookAhead("'")) { - literal = false; - } else { - chars += format.charAt(iFormat); - } - } else { - switch (format.charAt(iFormat)) { - case "d": case "m": case "y": case "@": - chars += "0123456789"; - break; - case "D": case "M": - return null; // Accept anything - case "'": - if (lookAhead("'")) { - chars += "'"; - } else { - literal = true; - } - break; - default: - chars += format.charAt(iFormat); - } - } - } - return chars; - }, - - /* Get a setting value, defaulting if necessary. */ - _get: function(inst, name) { - return inst.settings[name] !== undefined ? - inst.settings[name] : this._defaults[name]; - }, - - /* Parse existing date and initialise date picker. */ - _setDateFromField: function(inst, noDefault) { - if (inst.input.val() === inst.lastVal) { - return; - } - - var dateFormat = this._get(inst, "dateFormat"), - dates = inst.lastVal = inst.input ? inst.input.val() : null, - defaultDate = this._getDefaultDate(inst), - date = defaultDate, - settings = this._getFormatConfig(inst); - - try { - date = this.parseDate(dateFormat, dates, settings) || defaultDate; - } catch (event) { - dates = (noDefault ? "" : dates); - } - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - inst.currentDay = (dates ? date.getDate() : 0); - inst.currentMonth = (dates ? date.getMonth() : 0); - inst.currentYear = (dates ? date.getFullYear() : 0); - this._adjustInstDate(inst); - }, - - /* Retrieve the default date shown on opening. */ - _getDefaultDate: function(inst) { - return this._restrictMinMax(inst, - this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); - }, - - /* A date may be specified as an exact value or a relative one. */ - _determineDate: function(inst, date, defaultDate) { - var offsetNumeric = function(offset) { - var date = new Date(); - date.setDate(date.getDate() + offset); - return date; - }, - offsetString = function(offset) { - try { - return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), - offset, $.datepicker._getFormatConfig(inst)); - } - catch (e) { - // Ignore - } - - var date = (offset.toLowerCase().match(/^c/) ? - $.datepicker._getDate(inst) : null) || new Date(), - year = date.getFullYear(), - month = date.getMonth(), - day = date.getDate(), - pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, - matches = pattern.exec(offset); - - while (matches) { - switch (matches[2] || "d") { - case "d" : case "D" : - day += parseInt(matches[1],10); break; - case "w" : case "W" : - day += parseInt(matches[1],10) * 7; break; - case "m" : case "M" : - month += parseInt(matches[1],10); - day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); - break; - case "y": case "Y" : - year += parseInt(matches[1],10); - day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); - break; - } - matches = pattern.exec(offset); - } - return new Date(year, month, day); - }, - newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : - (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); - - newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); - if (newDate) { - newDate.setHours(0); - newDate.setMinutes(0); - newDate.setSeconds(0); - newDate.setMilliseconds(0); - } - return this._daylightSavingAdjust(newDate); - }, - - /* Handle switch to/from daylight saving. - * Hours may be non-zero on daylight saving cut-over: - * > 12 when midnight changeover, but then cannot generate - * midnight datetime, so jump to 1AM, otherwise reset. - * @param date (Date) the date to check - * @return (Date) the corrected date - */ - _daylightSavingAdjust: function(date) { - if (!date) { - return null; - } - date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); - return date; - }, - - /* Set the date(s) directly. */ - _setDate: function(inst, date, noChange) { - var clear = !date, - origMonth = inst.selectedMonth, - origYear = inst.selectedYear, - newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); - - inst.selectedDay = inst.currentDay = newDate.getDate(); - inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); - inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); - if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { - this._notifyChange(inst); - } - this._adjustInstDate(inst); - if (inst.input) { - inst.input.val(clear ? "" : this._formatDate(inst)); - } - }, - - /* Retrieve the date(s) directly. */ - _getDate: function(inst) { - var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : - this._daylightSavingAdjust(new Date( - inst.currentYear, inst.currentMonth, inst.currentDay))); - return startDate; - }, - - /* Attach the onxxx handlers. These are declared statically so - * they work with static code transformers like Caja. - */ - _attachHandlers: function(inst) { - var stepMonths = this._get(inst, "stepMonths"), - id = "#" + inst.id.replace( /\\\\/g, "\\" ); - inst.dpDiv.find("[data-handler]").map(function () { - var handler = { - prev: function () { - $.datepicker._adjustDate(id, -stepMonths, "M"); - }, - next: function () { - $.datepicker._adjustDate(id, +stepMonths, "M"); - }, - hide: function () { - $.datepicker._hideDatepicker(); - }, - today: function () { - $.datepicker._gotoToday(id); - }, - selectDay: function () { - $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); - return false; - }, - selectMonth: function () { - $.datepicker._selectMonthYear(id, this, "M"); - return false; - }, - selectYear: function () { - $.datepicker._selectMonthYear(id, this, "Y"); - return false; - } - }; - $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); - }); - }, - - /* Generate the HTML for the current state of the date picker. */ - _generateHTML: function(inst) { - var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, - controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, - monthNames, monthNamesShort, beforeShowDay, showOtherMonths, - selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, - cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, - printDate, dRow, tbody, daySettings, otherMonth, unselectable, - tempDate = new Date(), - today = this._daylightSavingAdjust( - new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time - isRTL = this._get(inst, "isRTL"), - showButtonPanel = this._get(inst, "showButtonPanel"), - hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), - navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), - numMonths = this._getNumberOfMonths(inst), - showCurrentAtPos = this._get(inst, "showCurrentAtPos"), - stepMonths = this._get(inst, "stepMonths"), - isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), - currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : - new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), - minDate = this._getMinMaxDate(inst, "min"), - maxDate = this._getMinMaxDate(inst, "max"), - drawMonth = inst.drawMonth - showCurrentAtPos, - drawYear = inst.drawYear; - - if (drawMonth < 0) { - drawMonth += 12; - drawYear--; - } - if (maxDate) { - maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), - maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); - maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); - while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { - drawMonth--; - if (drawMonth < 0) { - drawMonth = 11; - drawYear--; - } - } - } - inst.drawMonth = drawMonth; - inst.drawYear = drawYear; - - prevText = this._get(inst, "prevText"); - prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, - this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), - this._getFormatConfig(inst))); - - prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? - "
    " + prevText + "" : - (hideIfNoPrevNext ? "" : "" + prevText + "")); - - nextText = this._get(inst, "nextText"); - nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, - this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), - this._getFormatConfig(inst))); - - next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? - "" + nextText + "" : - (hideIfNoPrevNext ? "" : "" + nextText + "")); - - currentText = this._get(inst, "currentText"); - gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); - currentText = (!navigationAsDateFormat ? currentText : - this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); - - controls = (!inst.inline ? "" : ""); - - buttonPanel = (showButtonPanel) ? "
    " + (isRTL ? controls : "") + - (this._isInRange(inst, gotoDate) ? "" : "") + (isRTL ? "" : controls) + "
    " : ""; - - firstDay = parseInt(this._get(inst, "firstDay"),10); - firstDay = (isNaN(firstDay) ? 0 : firstDay); - - showWeek = this._get(inst, "showWeek"); - dayNames = this._get(inst, "dayNames"); - dayNamesMin = this._get(inst, "dayNamesMin"); - monthNames = this._get(inst, "monthNames"); - monthNamesShort = this._get(inst, "monthNamesShort"); - beforeShowDay = this._get(inst, "beforeShowDay"); - showOtherMonths = this._get(inst, "showOtherMonths"); - selectOtherMonths = this._get(inst, "selectOtherMonths"); - defaultDate = this._getDefaultDate(inst); - html = ""; - dow; - for (row = 0; row < numMonths[0]; row++) { - group = ""; - this.maxRows = 4; - for (col = 0; col < numMonths[1]; col++) { - selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); - cornerClass = " ui-corner-all"; - calender = ""; - if (isMultiMonth) { - calender += "
    "; - } - calender += "
    " + - (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + - (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + - this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, - row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers - "
    " + - ""; - thead = (showWeek ? "" : ""); - for (dow = 0; dow < 7; dow++) { // days of the week - day = (dow + firstDay) % 7; - thead += "= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + - "" + dayNamesMin[day] + ""; - } - calender += thead + ""; - daysInMonth = this._getDaysInMonth(drawYear, drawMonth); - if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { - inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); - } - leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; - curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate - numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) - this.maxRows = numRows; - printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); - for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows - calender += ""; - tbody = (!showWeek ? "" : ""); - for (dow = 0; dow < 7; dow++) { // create date picker days - daySettings = (beforeShowDay ? - beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); - otherMonth = (printDate.getMonth() !== drawMonth); - unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || - (minDate && printDate < minDate) || (maxDate && printDate > maxDate); - tbody += ""; // display selectable date - printDate.setDate(printDate.getDate() + 1); - printDate = this._daylightSavingAdjust(printDate); - } - calender += tbody + ""; - } - drawMonth++; - if (drawMonth > 11) { - drawMonth = 0; - drawYear++; - } - calender += "
    " + this._get(inst, "weekHeader") + "
    " + - this._get(inst, "calculateWeek")(printDate) + "" + // actions - (otherMonth && !showOtherMonths ? " " : // display for other months - (unselectable ? "" + printDate.getDate() + "" : "" + printDate.getDate() + "")) + "
    " + (isMultiMonth ? "
    " + - ((numMonths[0] > 0 && col === numMonths[1]-1) ? "
    " : "") : ""); - group += calender; - } - html += group; - } - html += buttonPanel; - inst._keyEvent = false; - return html; - }, - - /* Generate the month and year header. */ - _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, - secondary, monthNames, monthNamesShort) { - - var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, - changeMonth = this._get(inst, "changeMonth"), - changeYear = this._get(inst, "changeYear"), - showMonthAfterYear = this._get(inst, "showMonthAfterYear"), - html = "
    ", - monthHtml = ""; - - // month selection - if (secondary || !changeMonth) { - monthHtml += "" + monthNames[drawMonth] + ""; - } else { - inMinYear = (minDate && minDate.getFullYear() === drawYear); - inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); - monthHtml += ""; - } - - if (!showMonthAfterYear) { - html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); - } - - // year selection - if ( !inst.yearshtml ) { - inst.yearshtml = ""; - if (secondary || !changeYear) { - html += "" + drawYear + ""; - } else { - // determine range of years to display - years = this._get(inst, "yearRange").split(":"); - thisYear = new Date().getFullYear(); - determineYear = function(value) { - var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : - (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : - parseInt(value, 10))); - return (isNaN(year) ? thisYear : year); - }; - year = determineYear(years[0]); - endYear = Math.max(year, determineYear(years[1] || "")); - year = (minDate ? Math.max(year, minDate.getFullYear()) : year); - endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); - inst.yearshtml += ""; - - html += inst.yearshtml; - inst.yearshtml = null; - } - } - - html += this._get(inst, "yearSuffix"); - if (showMonthAfterYear) { - html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; - } - html += "
    "; // Close datepicker_header - return html; - }, - - /* Adjust one of the date sub-fields. */ - _adjustInstDate: function(inst, offset, period) { - var year = inst.drawYear + (period === "Y" ? offset : 0), - month = inst.drawMonth + (period === "M" ? offset : 0), - day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), - date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); - - inst.selectedDay = date.getDate(); - inst.drawMonth = inst.selectedMonth = date.getMonth(); - inst.drawYear = inst.selectedYear = date.getFullYear(); - if (period === "M" || period === "Y") { - this._notifyChange(inst); - } - }, - - /* Ensure a date is within any min/max bounds. */ - _restrictMinMax: function(inst, date) { - var minDate = this._getMinMaxDate(inst, "min"), - maxDate = this._getMinMaxDate(inst, "max"), - newDate = (minDate && date < minDate ? minDate : date); - return (maxDate && newDate > maxDate ? maxDate : newDate); - }, - - /* Notify change of month/year. */ - _notifyChange: function(inst) { - var onChange = this._get(inst, "onChangeMonthYear"); - if (onChange) { - onChange.apply((inst.input ? inst.input[0] : null), - [inst.selectedYear, inst.selectedMonth + 1, inst]); - } - }, - - /* Determine the number of months to show. */ - _getNumberOfMonths: function(inst) { - var numMonths = this._get(inst, "numberOfMonths"); - return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); - }, - - /* Determine the current maximum date - ensure no time components are set. */ - _getMinMaxDate: function(inst, minMax) { - return this._determineDate(inst, this._get(inst, minMax + "Date"), null); - }, - - /* Find the number of days in a given month. */ - _getDaysInMonth: function(year, month) { - return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); - }, - - /* Find the day of the week of the first of a month. */ - _getFirstDayOfMonth: function(year, month) { - return new Date(year, month, 1).getDay(); - }, - - /* Determines if we should allow a "next/prev" month display change. */ - _canAdjustMonth: function(inst, offset, curYear, curMonth) { - var numMonths = this._getNumberOfMonths(inst), - date = this._daylightSavingAdjust(new Date(curYear, - curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); - - if (offset < 0) { - date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); - } - return this._isInRange(inst, date); - }, - - /* Is the given date in the accepted range? */ - _isInRange: function(inst, date) { - var yearSplit, currentYear, - minDate = this._getMinMaxDate(inst, "min"), - maxDate = this._getMinMaxDate(inst, "max"), - minYear = null, - maxYear = null, - years = this._get(inst, "yearRange"); - if (years){ - yearSplit = years.split(":"); - currentYear = new Date().getFullYear(); - minYear = parseInt(yearSplit[0], 10); - maxYear = parseInt(yearSplit[1], 10); - if ( yearSplit[0].match(/[+\-].*/) ) { - minYear += currentYear; - } - if ( yearSplit[1].match(/[+\-].*/) ) { - maxYear += currentYear; - } - } - - return ((!minDate || date.getTime() >= minDate.getTime()) && - (!maxDate || date.getTime() <= maxDate.getTime()) && - (!minYear || date.getFullYear() >= minYear) && - (!maxYear || date.getFullYear() <= maxYear)); - }, - - /* Provide the configuration settings for formatting/parsing. */ - _getFormatConfig: function(inst) { - var shortYearCutoff = this._get(inst, "shortYearCutoff"); - shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : - new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); - return {shortYearCutoff: shortYearCutoff, - dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), - monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; - }, - - /* Format the given date for display. */ - _formatDate: function(inst, day, month, year) { - if (!day) { - inst.currentDay = inst.selectedDay; - inst.currentMonth = inst.selectedMonth; - inst.currentYear = inst.selectedYear; - } - var date = (day ? (typeof day === "object" ? day : - this._daylightSavingAdjust(new Date(year, month, day))) : - this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); - } -}); - -/* - * Bind hover events for datepicker elements. - * Done via delegate so the binding only occurs once in the lifetime of the parent div. - * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. - */ -function bindHover(dpDiv) { - var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; - return dpDiv.delegate(selector, "mouseout", function() { - $(this).removeClass("ui-state-hover"); - if (this.className.indexOf("ui-datepicker-prev") !== -1) { - $(this).removeClass("ui-datepicker-prev-hover"); - } - if (this.className.indexOf("ui-datepicker-next") !== -1) { - $(this).removeClass("ui-datepicker-next-hover"); - } - }) - .delegate(selector, "mouseover", function(){ - if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) { - $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); - $(this).addClass("ui-state-hover"); - if (this.className.indexOf("ui-datepicker-prev") !== -1) { - $(this).addClass("ui-datepicker-prev-hover"); - } - if (this.className.indexOf("ui-datepicker-next") !== -1) { - $(this).addClass("ui-datepicker-next-hover"); - } - } - }); -} - -/* jQuery extend now ignores nulls! */ -function extendRemove(target, props) { - $.extend(target, props); - for (var name in props) { - if (props[name] == null) { - target[name] = props[name]; - } - } - return target; -} - -/* Invoke the datepicker functionality. - @param options string - a command, optionally followed by additional parameters or - Object - settings for attaching new datepicker functionality - @return jQuery object */ -$.fn.datepicker = function(options){ - - /* Verify an empty collection wasn't passed - Fixes #6976 */ - if ( !this.length ) { - return this; - } - - /* Initialise the date picker. */ - if (!$.datepicker.initialized) { - $(document).mousedown($.datepicker._checkExternalClick); - $.datepicker.initialized = true; - } - - /* Append datepicker main container to body if not exist. */ - if ($("#"+$.datepicker._mainDivId).length === 0) { - $("body").append($.datepicker.dpDiv); - } - - var otherArgs = Array.prototype.slice.call(arguments, 1); - if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { - return $.datepicker["_" + options + "Datepicker"]. - apply($.datepicker, [this[0]].concat(otherArgs)); - } - if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { - return $.datepicker["_" + options + "Datepicker"]. - apply($.datepicker, [this[0]].concat(otherArgs)); - } - return this.each(function() { - typeof options === "string" ? - $.datepicker["_" + options + "Datepicker"]. - apply($.datepicker, [this].concat(otherArgs)) : - $.datepicker._attachDatepicker(this, options); - }); -}; - -$.datepicker = new Datepicker(); // singleton instance -$.datepicker.initialized = false; -$.datepicker.uuid = new Date().getTime(); -$.datepicker.version = "1.10.3"; - -})(jQuery); -(function( $, undefined ) { - -// number of pages in a slider -// (how many times can you page up/down to go through the whole range) -var numPages = 5; - -$.widget( "ui.slider", $.ui.mouse, { - version: "1.10.3", - widgetEventPrefix: "slide", - - options: { - animate: false, - distance: 0, - max: 100, - min: 0, - orientation: "horizontal", - range: false, - step: 1, - value: 0, - values: null, - - // callbacks - change: null, - slide: null, - start: null, - stop: null - }, - - _create: function() { - this._keySliding = false; - this._mouseSliding = false; - this._animateOff = true; - this._handleIndex = null; - this._detectOrientation(); - this._mouseInit(); - - this.element - .addClass( "ui-slider" + - " ui-slider-" + this.orientation + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all"); - - this._refresh(); - this._setOption( "disabled", this.options.disabled ); - - this._animateOff = false; - }, - - _refresh: function() { - this._createRange(); - this._createHandles(); - this._setupEvents(); - this._refreshValue(); - }, - - _createHandles: function() { - var i, handleCount, - options = this.options, - existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), - handle = "", - handles = []; - - handleCount = ( options.values && options.values.length ) || 1; - - if ( existingHandles.length > handleCount ) { - existingHandles.slice( handleCount ).remove(); - existingHandles = existingHandles.slice( 0, handleCount ); - } - - for ( i = existingHandles.length; i < handleCount; i++ ) { - handles.push( handle ); - } - - this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); - - this.handle = this.handles.eq( 0 ); - - this.handles.each(function( i ) { - $( this ).data( "ui-slider-handle-index", i ); - }); - }, - - _createRange: function() { - var options = this.options, - classes = ""; - - if ( options.range ) { - if ( options.range === true ) { - if ( !options.values ) { - options.values = [ this._valueMin(), this._valueMin() ]; - } else if ( options.values.length && options.values.length !== 2 ) { - options.values = [ options.values[0], options.values[0] ]; - } else if ( $.isArray( options.values ) ) { - options.values = options.values.slice(0); - } - } - - if ( !this.range || !this.range.length ) { - this.range = $( "
    " ) - .appendTo( this.element ); - - classes = "ui-slider-range" + - // note: this isn't the most fittingly semantic framework class for this element, - // but worked best visually with a variety of themes - " ui-widget-header ui-corner-all"; - } else { - this.range.removeClass( "ui-slider-range-min ui-slider-range-max" ) - // Handle range switching from true to min/max - .css({ - "left": "", - "bottom": "" - }); - } - - this.range.addClass( classes + - ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) ); - } else { - this.range = $([]); - } - }, - - _setupEvents: function() { - var elements = this.handles.add( this.range ).filter( "a" ); - this._off( elements ); - this._on( elements, this._handleEvents ); - this._hoverable( elements ); - this._focusable( elements ); - }, - - _destroy: function() { - this.handles.remove(); - this.range.remove(); - - this.element - .removeClass( "ui-slider" + - " ui-slider-horizontal" + - " ui-slider-vertical" + - " ui-widget" + - " ui-widget-content" + - " ui-corner-all" ); - - this._mouseDestroy(); - }, - - _mouseCapture: function( event ) { - var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, - that = this, - o = this.options; - - if ( o.disabled ) { - return false; - } - - this.elementSize = { - width: this.element.outerWidth(), - height: this.element.outerHeight() - }; - this.elementOffset = this.element.offset(); - - position = { x: event.pageX, y: event.pageY }; - normValue = this._normValueFromMouse( position ); - distance = this._valueMax() - this._valueMin() + 1; - this.handles.each(function( i ) { - var thisDistance = Math.abs( normValue - that.values(i) ); - if (( distance > thisDistance ) || - ( distance === thisDistance && - (i === that._lastChangedValue || that.values(i) === o.min ))) { - distance = thisDistance; - closestHandle = $( this ); - index = i; - } - }); - - allowed = this._start( event, index ); - if ( allowed === false ) { - return false; - } - this._mouseSliding = true; - - this._handleIndex = index; - - closestHandle - .addClass( "ui-state-active" ) - .focus(); - - offset = closestHandle.offset(); - mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); - this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { - left: event.pageX - offset.left - ( closestHandle.width() / 2 ), - top: event.pageY - offset.top - - ( closestHandle.height() / 2 ) - - ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - - ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + - ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) - }; - - if ( !this.handles.hasClass( "ui-state-hover" ) ) { - this._slide( event, index, normValue ); - } - this._animateOff = true; - return true; - }, - - _mouseStart: function() { - return true; - }, - - _mouseDrag: function( event ) { - var position = { x: event.pageX, y: event.pageY }, - normValue = this._normValueFromMouse( position ); - - this._slide( event, this._handleIndex, normValue ); - - return false; - }, - - _mouseStop: function( event ) { - this.handles.removeClass( "ui-state-active" ); - this._mouseSliding = false; - - this._stop( event, this._handleIndex ); - this._change( event, this._handleIndex ); - - this._handleIndex = null; - this._clickOffset = null; - this._animateOff = false; - - return false; - }, - - _detectOrientation: function() { - this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; - }, - - _normValueFromMouse: function( position ) { - var pixelTotal, - pixelMouse, - percentMouse, - valueTotal, - valueMouse; - - if ( this.orientation === "horizontal" ) { - pixelTotal = this.elementSize.width; - pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); - } else { - pixelTotal = this.elementSize.height; - pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); - } - - percentMouse = ( pixelMouse / pixelTotal ); - if ( percentMouse > 1 ) { - percentMouse = 1; - } - if ( percentMouse < 0 ) { - percentMouse = 0; - } - if ( this.orientation === "vertical" ) { - percentMouse = 1 - percentMouse; - } - - valueTotal = this._valueMax() - this._valueMin(); - valueMouse = this._valueMin() + percentMouse * valueTotal; - - return this._trimAlignValue( valueMouse ); - }, - - _start: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - return this._trigger( "start", event, uiHash ); - }, - - _slide: function( event, index, newVal ) { - var otherVal, - newValues, - allowed; - - if ( this.options.values && this.options.values.length ) { - otherVal = this.values( index ? 0 : 1 ); - - if ( ( this.options.values.length === 2 && this.options.range === true ) && - ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) - ) { - newVal = otherVal; - } - - if ( newVal !== this.values( index ) ) { - newValues = this.values(); - newValues[ index ] = newVal; - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal, - values: newValues - } ); - otherVal = this.values( index ? 0 : 1 ); - if ( allowed !== false ) { - this.values( index, newVal, true ); - } - } - } else { - if ( newVal !== this.value() ) { - // A slide can be canceled by returning false from the slide callback - allowed = this._trigger( "slide", event, { - handle: this.handles[ index ], - value: newVal - } ); - if ( allowed !== false ) { - this.value( newVal ); - } - } - } - }, - - _stop: function( event, index ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - this._trigger( "stop", event, uiHash ); - }, - - _change: function( event, index ) { - if ( !this._keySliding && !this._mouseSliding ) { - var uiHash = { - handle: this.handles[ index ], - value: this.value() - }; - if ( this.options.values && this.options.values.length ) { - uiHash.value = this.values( index ); - uiHash.values = this.values(); - } - - //store the last changed value index for reference when handles overlap - this._lastChangedValue = index; - - this._trigger( "change", event, uiHash ); - } - }, - - value: function( newValue ) { - if ( arguments.length ) { - this.options.value = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, 0 ); - return; - } - - return this._value(); - }, - - values: function( index, newValue ) { - var vals, - newValues, - i; - - if ( arguments.length > 1 ) { - this.options.values[ index ] = this._trimAlignValue( newValue ); - this._refreshValue(); - this._change( null, index ); - return; - } - - if ( arguments.length ) { - if ( $.isArray( arguments[ 0 ] ) ) { - vals = this.options.values; - newValues = arguments[ 0 ]; - for ( i = 0; i < vals.length; i += 1 ) { - vals[ i ] = this._trimAlignValue( newValues[ i ] ); - this._change( null, i ); - } - this._refreshValue(); - } else { - if ( this.options.values && this.options.values.length ) { - return this._values( index ); - } else { - return this.value(); - } - } - } else { - return this._values(); - } - }, - - _setOption: function( key, value ) { - var i, - valsLength = 0; - - if ( key === "range" && this.options.range === true ) { - if ( value === "min" ) { - this.options.value = this._values( 0 ); - this.options.values = null; - } else if ( value === "max" ) { - this.options.value = this._values( this.options.values.length-1 ); - this.options.values = null; - } - } - - if ( $.isArray( this.options.values ) ) { - valsLength = this.options.values.length; - } - - $.Widget.prototype._setOption.apply( this, arguments ); - - switch ( key ) { - case "orientation": - this._detectOrientation(); - this.element - .removeClass( "ui-slider-horizontal ui-slider-vertical" ) - .addClass( "ui-slider-" + this.orientation ); - this._refreshValue(); - break; - case "value": - this._animateOff = true; - this._refreshValue(); - this._change( null, 0 ); - this._animateOff = false; - break; - case "values": - this._animateOff = true; - this._refreshValue(); - for ( i = 0; i < valsLength; i += 1 ) { - this._change( null, i ); - } - this._animateOff = false; - break; - case "min": - case "max": - this._animateOff = true; - this._refreshValue(); - this._animateOff = false; - break; - case "range": - this._animateOff = true; - this._refresh(); - this._animateOff = false; - break; - } - }, - - //internal value getter - // _value() returns value trimmed by min and max, aligned by step - _value: function() { - var val = this.options.value; - val = this._trimAlignValue( val ); - - return val; - }, - - //internal values getter - // _values() returns array of values trimmed by min and max, aligned by step - // _values( index ) returns single value trimmed by min and max, aligned by step - _values: function( index ) { - var val, - vals, - i; - - if ( arguments.length ) { - val = this.options.values[ index ]; - val = this._trimAlignValue( val ); - - return val; - } else if ( this.options.values && this.options.values.length ) { - // .slice() creates a copy of the array - // this copy gets trimmed by min and max and then returned - vals = this.options.values.slice(); - for ( i = 0; i < vals.length; i+= 1) { - vals[ i ] = this._trimAlignValue( vals[ i ] ); - } - - return vals; - } else { - return []; - } - }, - - // returns the step-aligned value that val is closest to, between (inclusive) min and max - _trimAlignValue: function( val ) { - if ( val <= this._valueMin() ) { - return this._valueMin(); - } - if ( val >= this._valueMax() ) { - return this._valueMax(); - } - var step = ( this.options.step > 0 ) ? this.options.step : 1, - valModStep = (val - this._valueMin()) % step, - alignValue = val - valModStep; - - if ( Math.abs(valModStep) * 2 >= step ) { - alignValue += ( valModStep > 0 ) ? step : ( -step ); - } - - // Since JavaScript has problems with large floats, round - // the final value to 5 digits after the decimal point (see #4124) - return parseFloat( alignValue.toFixed(5) ); - }, - - _valueMin: function() { - return this.options.min; - }, - - _valueMax: function() { - return this.options.max; - }, - - _refreshValue: function() { - var lastValPercent, valPercent, value, valueMin, valueMax, - oRange = this.options.range, - o = this.options, - that = this, - animate = ( !this._animateOff ) ? o.animate : false, - _set = {}; - - if ( this.options.values && this.options.values.length ) { - this.handles.each(function( i ) { - valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; - _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - if ( that.options.range === true ) { - if ( that.orientation === "horizontal" ) { - if ( i === 0 ) { - that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); - } - if ( i === 1 ) { - that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } else { - if ( i === 0 ) { - that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); - } - if ( i === 1 ) { - that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - } - lastValPercent = valPercent; - }); - } else { - value = this.value(); - valueMin = this._valueMin(); - valueMax = this._valueMax(); - valPercent = ( valueMax !== valueMin ) ? - ( value - valueMin ) / ( valueMax - valueMin ) * 100 : - 0; - _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; - this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); - - if ( oRange === "min" && this.orientation === "horizontal" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "horizontal" ) { - this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - if ( oRange === "min" && this.orientation === "vertical" ) { - this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); - } - if ( oRange === "max" && this.orientation === "vertical" ) { - this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); - } - } - }, - - _handleEvents: { - keydown: function( event ) { - /*jshint maxcomplexity:25*/ - var allowed, curVal, newVal, step, - index = $( event.target ).data( "ui-slider-handle-index" ); - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - case $.ui.keyCode.END: - case $.ui.keyCode.PAGE_UP: - case $.ui.keyCode.PAGE_DOWN: - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - event.preventDefault(); - if ( !this._keySliding ) { - this._keySliding = true; - $( event.target ).addClass( "ui-state-active" ); - allowed = this._start( event, index ); - if ( allowed === false ) { - return; - } - } - break; - } - - step = this.options.step; - if ( this.options.values && this.options.values.length ) { - curVal = newVal = this.values( index ); - } else { - curVal = newVal = this.value(); - } - - switch ( event.keyCode ) { - case $.ui.keyCode.HOME: - newVal = this._valueMin(); - break; - case $.ui.keyCode.END: - newVal = this._valueMax(); - break; - case $.ui.keyCode.PAGE_UP: - newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.PAGE_DOWN: - newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) ); - break; - case $.ui.keyCode.UP: - case $.ui.keyCode.RIGHT: - if ( curVal === this._valueMax() ) { - return; - } - newVal = this._trimAlignValue( curVal + step ); - break; - case $.ui.keyCode.DOWN: - case $.ui.keyCode.LEFT: - if ( curVal === this._valueMin() ) { - return; - } - newVal = this._trimAlignValue( curVal - step ); - break; - } - - this._slide( event, index, newVal ); - }, - click: function( event ) { - event.preventDefault(); - }, - keyup: function( event ) { - var index = $( event.target ).data( "ui-slider-handle-index" ); - - if ( this._keySliding ) { - this._keySliding = false; - this._stop( event, index ); - this._change( event, index ); - $( event.target ).removeClass( "ui-state-active" ); - } - } - } - -}); - -}(jQuery)); -(function($, undefined) { - -var dataSpace = "ui-effects-"; - -$.effects = { - effect: {} -}; - -/*! - * jQuery Color Animations v2.1.2 - * https://github.com/jquery/jquery-color - * - * Copyright 2013 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * Date: Wed Jan 16 08:47:09 2013 -0600 - */ -(function( jQuery, undefined ) { - - var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", - - // plusequals test for += 100 -= 100 - rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, - // a set of RE's that can match strings and generate color tuples. - stringParsers = [{ - re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ], - execResult[ 3 ], - execResult[ 4 ] - ]; - } - }, { - re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - parse: function( execResult ) { - return [ - execResult[ 1 ] * 2.55, - execResult[ 2 ] * 2.55, - execResult[ 3 ] * 2.55, - execResult[ 4 ] - ]; - } - }, { - // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ], 16 ) - ]; - } - }, { - // this regex ignores A-F because it's compared against an already lowercased string - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, - parse: function( execResult ) { - return [ - parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), - parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) - ]; - } - }, { - re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, - space: "hsla", - parse: function( execResult ) { - return [ - execResult[ 1 ], - execResult[ 2 ] / 100, - execResult[ 3 ] / 100, - execResult[ 4 ] - ]; - } - }], - - // jQuery.Color( ) - color = jQuery.Color = function( color, green, blue, alpha ) { - return new jQuery.Color.fn.parse( color, green, blue, alpha ); - }, - spaces = { - rgba: { - props: { - red: { - idx: 0, - type: "byte" - }, - green: { - idx: 1, - type: "byte" - }, - blue: { - idx: 2, - type: "byte" - } - } - }, - - hsla: { - props: { - hue: { - idx: 0, - type: "degrees" - }, - saturation: { - idx: 1, - type: "percent" - }, - lightness: { - idx: 2, - type: "percent" - } - } - } - }, - propTypes = { - "byte": { - floor: true, - max: 255 - }, - "percent": { - max: 1 - }, - "degrees": { - mod: 360, - floor: true - } - }, - support = color.support = {}, - - // element for support tests - supportElem = jQuery( "

    " )[ 0 ], - - // colors = jQuery.Color.names - colors, - - // local aliases of functions called often - each = jQuery.each; - -// determine rgba support immediately -supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; -support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; - -// define cache name and alpha properties -// for rgba and hsla spaces -each( spaces, function( spaceName, space ) { - space.cache = "_" + spaceName; - space.props.alpha = { - idx: 3, - type: "percent", - def: 1 - }; -}); - -function clamp( value, prop, allowEmpty ) { - var type = propTypes[ prop.type ] || {}; - - if ( value == null ) { - return (allowEmpty || !prop.def) ? null : prop.def; - } - - // ~~ is an short way of doing floor for positive numbers - value = type.floor ? ~~value : parseFloat( value ); - - // IE will pass in empty strings as value for alpha, - // which will hit this case - if ( isNaN( value ) ) { - return prop.def; - } - - if ( type.mod ) { - // we add mod before modding to make sure that negatives values - // get converted properly: -10 -> 350 - return (value + type.mod) % type.mod; - } - - // for now all property types without mod have min and max - return 0 > value ? 0 : type.max < value ? type.max : value; -} - -function stringParse( string ) { - var inst = color(), - rgba = inst._rgba = []; - - string = string.toLowerCase(); - - each( stringParsers, function( i, parser ) { - var parsed, - match = parser.re.exec( string ), - values = match && parser.parse( match ), - spaceName = parser.space || "rgba"; - - if ( values ) { - parsed = inst[ spaceName ]( values ); - - // if this was an rgba parse the assignment might happen twice - // oh well.... - inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; - rgba = inst._rgba = parsed._rgba; - - // exit each( stringParsers ) here because we matched - return false; - } - }); - - // Found a stringParser that handled it - if ( rgba.length ) { - - // if this came from a parsed string, force "transparent" when alpha is 0 - // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) - if ( rgba.join() === "0,0,0,0" ) { - jQuery.extend( rgba, colors.transparent ); - } - return inst; - } - - // named colors - return colors[ string ]; -} - -color.fn = jQuery.extend( color.prototype, { - parse: function( red, green, blue, alpha ) { - if ( red === undefined ) { - this._rgba = [ null, null, null, null ]; - return this; - } - if ( red.jquery || red.nodeType ) { - red = jQuery( red ).css( green ); - green = undefined; - } - - var inst = this, - type = jQuery.type( red ), - rgba = this._rgba = []; - - // more than 1 argument specified - assume ( red, green, blue, alpha ) - if ( green !== undefined ) { - red = [ red, green, blue, alpha ]; - type = "array"; - } - - if ( type === "string" ) { - return this.parse( stringParse( red ) || colors._default ); - } - - if ( type === "array" ) { - each( spaces.rgba.props, function( key, prop ) { - rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); - }); - return this; - } - - if ( type === "object" ) { - if ( red instanceof color ) { - each( spaces, function( spaceName, space ) { - if ( red[ space.cache ] ) { - inst[ space.cache ] = red[ space.cache ].slice(); - } - }); - } else { - each( spaces, function( spaceName, space ) { - var cache = space.cache; - each( space.props, function( key, prop ) { - - // if the cache doesn't exist, and we know how to convert - if ( !inst[ cache ] && space.to ) { - - // if the value was null, we don't need to copy it - // if the key was alpha, we don't need to copy it either - if ( key === "alpha" || red[ key ] == null ) { - return; - } - inst[ cache ] = space.to( inst._rgba ); - } - - // this is the only case where we allow nulls for ALL properties. - // call clamp with alwaysAllowEmpty - inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); - }); - - // everything defined but alpha? - if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { - // use the default of 1 - inst[ cache ][ 3 ] = 1; - if ( space.from ) { - inst._rgba = space.from( inst[ cache ] ); - } - } - }); - } - return this; - } - }, - is: function( compare ) { - var is = color( compare ), - same = true, - inst = this; - - each( spaces, function( _, space ) { - var localCache, - isCache = is[ space.cache ]; - if (isCache) { - localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; - each( space.props, function( _, prop ) { - if ( isCache[ prop.idx ] != null ) { - same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); - return same; - } - }); - } - return same; - }); - return same; - }, - _space: function() { - var used = [], - inst = this; - each( spaces, function( spaceName, space ) { - if ( inst[ space.cache ] ) { - used.push( spaceName ); - } - }); - return used.pop(); - }, - transition: function( other, distance ) { - var end = color( other ), - spaceName = end._space(), - space = spaces[ spaceName ], - startColor = this.alpha() === 0 ? color( "transparent" ) : this, - start = startColor[ space.cache ] || space.to( startColor._rgba ), - result = start.slice(); - - end = end[ space.cache ]; - each( space.props, function( key, prop ) { - var index = prop.idx, - startValue = start[ index ], - endValue = end[ index ], - type = propTypes[ prop.type ] || {}; - - // if null, don't override start value - if ( endValue === null ) { - return; - } - // if null - use end - if ( startValue === null ) { - result[ index ] = endValue; - } else { - if ( type.mod ) { - if ( endValue - startValue > type.mod / 2 ) { - startValue += type.mod; - } else if ( startValue - endValue > type.mod / 2 ) { - startValue -= type.mod; - } - } - result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); - } - }); - return this[ spaceName ]( result ); - }, - blend: function( opaque ) { - // if we are already opaque - return ourself - if ( this._rgba[ 3 ] === 1 ) { - return this; - } - - var rgb = this._rgba.slice(), - a = rgb.pop(), - blend = color( opaque )._rgba; - - return color( jQuery.map( rgb, function( v, i ) { - return ( 1 - a ) * blend[ i ] + a * v; - })); - }, - toRgbaString: function() { - var prefix = "rgba(", - rgba = jQuery.map( this._rgba, function( v, i ) { - return v == null ? ( i > 2 ? 1 : 0 ) : v; - }); - - if ( rgba[ 3 ] === 1 ) { - rgba.pop(); - prefix = "rgb("; - } - - return prefix + rgba.join() + ")"; - }, - toHslaString: function() { - var prefix = "hsla(", - hsla = jQuery.map( this.hsla(), function( v, i ) { - if ( v == null ) { - v = i > 2 ? 1 : 0; - } - - // catch 1 and 2 - if ( i && i < 3 ) { - v = Math.round( v * 100 ) + "%"; - } - return v; - }); - - if ( hsla[ 3 ] === 1 ) { - hsla.pop(); - prefix = "hsl("; - } - return prefix + hsla.join() + ")"; - }, - toHexString: function( includeAlpha ) { - var rgba = this._rgba.slice(), - alpha = rgba.pop(); - - if ( includeAlpha ) { - rgba.push( ~~( alpha * 255 ) ); - } - - return "#" + jQuery.map( rgba, function( v ) { - - // default to 0 when nulls exist - v = ( v || 0 ).toString( 16 ); - return v.length === 1 ? "0" + v : v; - }).join(""); - }, - toString: function() { - return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); - } -}); -color.fn.parse.prototype = color.fn; - -// hsla conversions adapted from: -// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 - -function hue2rgb( p, q, h ) { - h = ( h + 1 ) % 1; - if ( h * 6 < 1 ) { - return p + (q - p) * h * 6; - } - if ( h * 2 < 1) { - return q; - } - if ( h * 3 < 2 ) { - return p + (q - p) * ((2/3) - h) * 6; - } - return p; -} - -spaces.hsla.to = function ( rgba ) { - if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { - return [ null, null, null, rgba[ 3 ] ]; - } - var r = rgba[ 0 ] / 255, - g = rgba[ 1 ] / 255, - b = rgba[ 2 ] / 255, - a = rgba[ 3 ], - max = Math.max( r, g, b ), - min = Math.min( r, g, b ), - diff = max - min, - add = max + min, - l = add * 0.5, - h, s; - - if ( min === max ) { - h = 0; - } else if ( r === max ) { - h = ( 60 * ( g - b ) / diff ) + 360; - } else if ( g === max ) { - h = ( 60 * ( b - r ) / diff ) + 120; - } else { - h = ( 60 * ( r - g ) / diff ) + 240; - } - - // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% - // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) - if ( diff === 0 ) { - s = 0; - } else if ( l <= 0.5 ) { - s = diff / add; - } else { - s = diff / ( 2 - add ); - } - return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; -}; - -spaces.hsla.from = function ( hsla ) { - if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { - return [ null, null, null, hsla[ 3 ] ]; - } - var h = hsla[ 0 ] / 360, - s = hsla[ 1 ], - l = hsla[ 2 ], - a = hsla[ 3 ], - q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, - p = 2 * l - q; - - return [ - Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), - Math.round( hue2rgb( p, q, h ) * 255 ), - Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), - a - ]; -}; - - -each( spaces, function( spaceName, space ) { - var props = space.props, - cache = space.cache, - to = space.to, - from = space.from; - - // makes rgba() and hsla() - color.fn[ spaceName ] = function( value ) { - - // generate a cache for this space if it doesn't exist - if ( to && !this[ cache ] ) { - this[ cache ] = to( this._rgba ); - } - if ( value === undefined ) { - return this[ cache ].slice(); - } - - var ret, - type = jQuery.type( value ), - arr = ( type === "array" || type === "object" ) ? value : arguments, - local = this[ cache ].slice(); - - each( props, function( key, prop ) { - var val = arr[ type === "object" ? key : prop.idx ]; - if ( val == null ) { - val = local[ prop.idx ]; - } - local[ prop.idx ] = clamp( val, prop ); - }); - - if ( from ) { - ret = color( from( local ) ); - ret[ cache ] = local; - return ret; - } else { - return color( local ); - } - }; - - // makes red() green() blue() alpha() hue() saturation() lightness() - each( props, function( key, prop ) { - // alpha is included in more than one space - if ( color.fn[ key ] ) { - return; - } - color.fn[ key ] = function( value ) { - var vtype = jQuery.type( value ), - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), - local = this[ fn ](), - cur = local[ prop.idx ], - match; - - if ( vtype === "undefined" ) { - return cur; - } - - if ( vtype === "function" ) { - value = value.call( this, cur ); - vtype = jQuery.type( value ); - } - if ( value == null && prop.empty ) { - return this; - } - if ( vtype === "string" ) { - match = rplusequals.exec( value ); - if ( match ) { - value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); - } - } - local[ prop.idx ] = value; - return this[ fn ]( local ); - }; - }); -}); - -// add cssHook and .fx.step function for each named hook. -// accept a space separated string of properties -color.hook = function( hook ) { - var hooks = hook.split( " " ); - each( hooks, function( i, hook ) { - jQuery.cssHooks[ hook ] = { - set: function( elem, value ) { - var parsed, curElem, - backgroundColor = ""; - - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { - value = color( parsed || value ); - if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { - curElem = hook === "backgroundColor" ? elem.parentNode : elem; - while ( - (backgroundColor === "" || backgroundColor === "transparent") && - curElem && curElem.style - ) { - try { - backgroundColor = jQuery.css( curElem, "backgroundColor" ); - curElem = curElem.parentNode; - } catch ( e ) { - } - } - - value = value.blend( backgroundColor && backgroundColor !== "transparent" ? - backgroundColor : - "_default" ); - } - - value = value.toRgbaString(); - } - try { - elem.style[ hook ] = value; - } catch( e ) { - // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' - } - } - }; - jQuery.fx.step[ hook ] = function( fx ) { - if ( !fx.colorInit ) { - fx.start = color( fx.elem, hook ); - fx.end = color( fx.end ); - fx.colorInit = true; - } - jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); - }; - }); - -}; - -color.hook( stepHooks ); - -jQuery.cssHooks.borderColor = { - expand: function( value ) { - var expanded = {}; - - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { - expanded[ "border" + part + "Color" ] = value; - }); - return expanded; - } -}; - -// Basic color names only. -// Usage of any of the other color names requires adding yourself or including -// jquery.color.svg-names.js. -colors = jQuery.Color.names = { - // 4.1. Basic color keywords - aqua: "#00ffff", - black: "#000000", - blue: "#0000ff", - fuchsia: "#ff00ff", - gray: "#808080", - green: "#008000", - lime: "#00ff00", - maroon: "#800000", - navy: "#000080", - olive: "#808000", - purple: "#800080", - red: "#ff0000", - silver: "#c0c0c0", - teal: "#008080", - white: "#ffffff", - yellow: "#ffff00", - - // 4.2.3. "transparent" color keyword - transparent: [ null, null, null, 0 ], - - _default: "#ffffff" -}; - -})( jQuery ); - - -/******************************************************************************/ -/****************************** CLASS ANIMATIONS ******************************/ -/******************************************************************************/ -(function() { - -var classAnimationActions = [ "add", "remove", "toggle" ], - shorthandStyles = { - border: 1, - borderBottom: 1, - borderColor: 1, - borderLeft: 1, - borderRight: 1, - borderTop: 1, - borderWidth: 1, - margin: 1, - padding: 1 - }; - -$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { - $.fx.step[ prop ] = function( fx ) { - if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { - jQuery.style( fx.elem, prop, fx.end ); - fx.setAttr = true; - } - }; -}); - -function getElementStyles( elem ) { - var key, len, - style = elem.ownerDocument.defaultView ? - elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : - elem.currentStyle, - styles = {}; - - if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { - len = style.length; - while ( len-- ) { - key = style[ len ]; - if ( typeof style[ key ] === "string" ) { - styles[ $.camelCase( key ) ] = style[ key ]; - } - } - // support: Opera, IE <9 - } else { - for ( key in style ) { - if ( typeof style[ key ] === "string" ) { - styles[ key ] = style[ key ]; - } - } - } - - return styles; -} - - -function styleDifference( oldStyle, newStyle ) { - var diff = {}, - name, value; - - for ( name in newStyle ) { - value = newStyle[ name ]; - if ( oldStyle[ name ] !== value ) { - if ( !shorthandStyles[ name ] ) { - if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { - diff[ name ] = value; - } - } - } - } - - return diff; -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -$.effects.animateClass = function( value, duration, easing, callback ) { - var o = $.speed( duration, easing, callback ); - - return this.queue( function() { - var animated = $( this ), - baseClass = animated.attr( "class" ) || "", - applyClassChange, - allAnimations = o.children ? animated.find( "*" ).addBack() : animated; - - // map the animated objects to store the original styles. - allAnimations = allAnimations.map(function() { - var el = $( this ); - return { - el: el, - start: getElementStyles( this ) - }; - }); - - // apply class change - applyClassChange = function() { - $.each( classAnimationActions, function(i, action) { - if ( value[ action ] ) { - animated[ action + "Class" ]( value[ action ] ); - } - }); - }; - applyClassChange(); - - // map all animated objects again - calculate new styles and diff - allAnimations = allAnimations.map(function() { - this.end = getElementStyles( this.el[ 0 ] ); - this.diff = styleDifference( this.start, this.end ); - return this; - }); - - // apply original class - animated.attr( "class", baseClass ); - - // map all animated objects again - this time collecting a promise - allAnimations = allAnimations.map(function() { - var styleInfo = this, - dfd = $.Deferred(), - opts = $.extend({}, o, { - queue: false, - complete: function() { - dfd.resolve( styleInfo ); - } - }); - - this.el.animate( this.diff, opts ); - return dfd.promise(); - }); - - // once all animations have completed: - $.when.apply( $, allAnimations.get() ).done(function() { - - // set the final class - applyClassChange(); - - // for each animated element, - // clear all css properties that were animated - $.each( arguments, function() { - var el = this.el; - $.each( this.diff, function(key) { - el.css( key, "" ); - }); - }); - - // this is guarnteed to be there if you use jQuery.speed() - // it also handles dequeuing the next anim... - o.complete.call( animated[ 0 ] ); - }); - }); -}; - -$.fn.extend({ - addClass: (function( orig ) { - return function( classNames, speed, easing, callback ) { - return speed ? - $.effects.animateClass.call( this, - { add: classNames }, speed, easing, callback ) : - orig.apply( this, arguments ); - }; - })( $.fn.addClass ), - - removeClass: (function( orig ) { - return function( classNames, speed, easing, callback ) { - return arguments.length > 1 ? - $.effects.animateClass.call( this, - { remove: classNames }, speed, easing, callback ) : - orig.apply( this, arguments ); - }; - })( $.fn.removeClass ), - - toggleClass: (function( orig ) { - return function( classNames, force, speed, easing, callback ) { - if ( typeof force === "boolean" || force === undefined ) { - if ( !speed ) { - // without speed parameter - return orig.apply( this, arguments ); - } else { - return $.effects.animateClass.call( this, - (force ? { add: classNames } : { remove: classNames }), - speed, easing, callback ); - } - } else { - // without force parameter - return $.effects.animateClass.call( this, - { toggle: classNames }, force, speed, easing ); - } - }; - })( $.fn.toggleClass ), - - switchClass: function( remove, add, speed, easing, callback) { - return $.effects.animateClass.call( this, { - add: add, - remove: remove - }, speed, easing, callback ); - } -}); - -})(); - -/******************************************************************************/ -/*********************************** EFFECTS **********************************/ -/******************************************************************************/ - -(function() { - -$.extend( $.effects, { - version: "1.10.3", - - // Saves a set of properties in a data storage - save: function( element, set ) { - for( var i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); - } - } - }, - - // Restores a set of previously saved properties from a data storage - restore: function( element, set ) { - var val, i; - for( i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - val = element.data( dataSpace + set[ i ] ); - // support: jQuery 1.6.2 - // http://bugs.jquery.com/ticket/9917 - // jQuery 1.6.2 incorrectly returns undefined for any falsy value. - // We can't differentiate between "" and 0 here, so we just assume - // empty string since it's likely to be a more common value... - if ( val === undefined ) { - val = ""; - } - element.css( set[ i ], val ); - } - } - }, - - setMode: function( el, mode ) { - if (mode === "toggle") { - mode = el.is( ":hidden" ) ? "show" : "hide"; - } - return mode; - }, - - // Translates a [top,left] array into a baseline value - // this should be a little more flexible in the future to handle a string & hash - getBaseline: function( origin, original ) { - var y, x; - switch ( origin[ 0 ] ) { - case "top": y = 0; break; - case "middle": y = 0.5; break; - case "bottom": y = 1; break; - default: y = origin[ 0 ] / original.height; - } - switch ( origin[ 1 ] ) { - case "left": x = 0; break; - case "center": x = 0.5; break; - case "right": x = 1; break; - default: x = origin[ 1 ] / original.width; - } - return { - x: x, - y: y - }; - }, - - // Wraps the element around a wrapper that copies position properties - createWrapper: function( element ) { - - // if the element is already wrapped, return it - if ( element.parent().is( ".ui-effects-wrapper" )) { - return element.parent(); - } - - // wrap the element - var props = { - width: element.outerWidth(true), - height: element.outerHeight(true), - "float": element.css( "float" ) - }, - wrapper = $( "

    " ) - .addClass( "ui-effects-wrapper" ) - .css({ - fontSize: "100%", - background: "transparent", - border: "none", - margin: 0, - padding: 0 - }), - // Store the size in case width/height are defined in % - Fixes #5245 - size = { - width: element.width(), - height: element.height() - }, - active = document.activeElement; - - // support: Firefox - // Firefox incorrectly exposes anonymous content - // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 - try { - active.id; - } catch( e ) { - active = document.body; - } - - element.wrap( wrapper ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - - wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element - - // transfer positioning properties to the wrapper - if ( element.css( "position" ) === "static" ) { - wrapper.css({ position: "relative" }); - element.css({ position: "relative" }); - } else { - $.extend( props, { - position: element.css( "position" ), - zIndex: element.css( "z-index" ) - }); - $.each([ "top", "left", "bottom", "right" ], function(i, pos) { - props[ pos ] = element.css( pos ); - if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { - props[ pos ] = "auto"; - } - }); - element.css({ - position: "relative", - top: 0, - left: 0, - right: "auto", - bottom: "auto" - }); - } - element.css(size); - - return wrapper.css( props ).show(); - }, - - removeWrapper: function( element ) { - var active = document.activeElement; - - if ( element.parent().is( ".ui-effects-wrapper" ) ) { - element.parent().replaceWith( element ); - - // Fixes #7595 - Elements lose focus when wrapped. - if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { - $( active ).focus(); - } - } - - - return element; - }, - - setTransition: function( element, list, factor, value ) { - value = value || {}; - $.each( list, function( i, x ) { - var unit = element.cssUnit( x ); - if ( unit[ 0 ] > 0 ) { - value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; - } - }); - return value; - } -}); - -// return an effect options object for the given parameters: -function _normalizeArguments( effect, options, speed, callback ) { - - // allow passing all options as the first parameter - if ( $.isPlainObject( effect ) ) { - options = effect; - effect = effect.effect; - } - - // convert to an object - effect = { effect: effect }; - - // catch (effect, null, ...) - if ( options == null ) { - options = {}; - } - - // catch (effect, callback) - if ( $.isFunction( options ) ) { - callback = options; - speed = null; - options = {}; - } - - // catch (effect, speed, ?) - if ( typeof options === "number" || $.fx.speeds[ options ] ) { - callback = speed; - speed = options; - options = {}; - } - - // catch (effect, options, callback) - if ( $.isFunction( speed ) ) { - callback = speed; - speed = null; - } - - // add options to effect - if ( options ) { - $.extend( effect, options ); - } - - speed = speed || options.duration; - effect.duration = $.fx.off ? 0 : - typeof speed === "number" ? speed : - speed in $.fx.speeds ? $.fx.speeds[ speed ] : - $.fx.speeds._default; - - effect.complete = callback || options.complete; - - return effect; -} - -function standardAnimationOption( option ) { - // Valid standard speeds (nothing, number, named speed) - if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { - return true; - } - - // Invalid strings - treat as "normal" speed - if ( typeof option === "string" && !$.effects.effect[ option ] ) { - return true; - } - - // Complete callback - if ( $.isFunction( option ) ) { - return true; - } - - // Options hash (but not naming an effect) - if ( typeof option === "object" && !option.effect ) { - return true; - } - - // Didn't match any standard API - return false; -} - -$.fn.extend({ - effect: function( /* effect, options, speed, callback */ ) { - var args = _normalizeArguments.apply( this, arguments ), - mode = args.mode, - queue = args.queue, - effectMethod = $.effects.effect[ args.effect ]; - - if ( $.fx.off || !effectMethod ) { - // delegate to the original method (e.g., .show()) if possible - if ( mode ) { - return this[ mode ]( args.duration, args.complete ); - } else { - return this.each( function() { - if ( args.complete ) { - args.complete.call( this ); - } - }); - } - } - - function run( next ) { - var elem = $( this ), - complete = args.complete, - mode = args.mode; - - function done() { - if ( $.isFunction( complete ) ) { - complete.call( elem[0] ); - } - if ( $.isFunction( next ) ) { - next(); - } - } - - // If the element already has the correct final state, delegate to - // the core methods so the internal tracking of "olddisplay" works. - if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { - elem[ mode ](); - done(); - } else { - effectMethod.call( elem[0], args, done ); - } - } - - return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); - }, - - show: (function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "show"; - return this.effect.call( this, args ); - } - }; - })( $.fn.show ), - - hide: (function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "hide"; - return this.effect.call( this, args ); - } - }; - })( $.fn.hide ), - - toggle: (function( orig ) { - return function( option ) { - if ( standardAnimationOption( option ) || typeof option === "boolean" ) { - return orig.apply( this, arguments ); - } else { - var args = _normalizeArguments.apply( this, arguments ); - args.mode = "toggle"; - return this.effect.call( this, args ); - } - }; - })( $.fn.toggle ), - - // helper functions - cssUnit: function(key) { - var style = this.css( key ), - val = []; - - $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { - if ( style.indexOf( unit ) > 0 ) { - val = [ parseFloat( style ), unit ]; - } - }); - return val; - } -}); - -})(); - -/******************************************************************************/ -/*********************************** EASING ***********************************/ -/******************************************************************************/ - -(function() { - -// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) - -var baseEasings = {}; - -$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { - baseEasings[ name ] = function( p ) { - return Math.pow( p, i + 2 ); - }; -}); - -$.extend( baseEasings, { - Sine: function ( p ) { - return 1 - Math.cos( p * Math.PI / 2 ); - }, - Circ: function ( p ) { - return 1 - Math.sqrt( 1 - p * p ); - }, - Elastic: function( p ) { - return p === 0 || p === 1 ? p : - -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); - }, - Back: function( p ) { - return p * p * ( 3 * p - 2 ); - }, - Bounce: function ( p ) { - var pow2, - bounce = 4; - - while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} - return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); - } -}); - -$.each( baseEasings, function( name, easeIn ) { - $.easing[ "easeIn" + name ] = easeIn; - $.easing[ "easeOut" + name ] = function( p ) { - return 1 - easeIn( 1 - p ); - }; - $.easing[ "easeInOut" + name ] = function( p ) { - return p < 0.5 ? - easeIn( p * 2 ) / 2 : - 1 - easeIn( p * -2 + 2 ) / 2; - }; -}); - -})(); - -})(jQuery); -(function( $, undefined ) { - -$.effects.effect.highlight = function( o, done ) { - var elem = $( this ), - props = [ "backgroundImage", "backgroundColor", "opacity" ], - mode = $.effects.setMode( elem, o.mode || "show" ), - animation = { - backgroundColor: elem.css( "backgroundColor" ) - }; - - if (mode === "hide") { - animation.opacity = 0; - } - - $.effects.save( elem, props ); - - elem - .show() - .css({ - backgroundImage: "none", - backgroundColor: o.color || "#ffff99" - }) - .animate( animation, { - queue: false, - duration: o.duration, - easing: o.easing, - complete: function() { - if ( mode === "hide" ) { - elem.hide(); - } - $.effects.restore( elem, props ); - done(); - } - }); -}; - -})(jQuery); +!function(o,u){var e,t,i=0,a=/^ui-id-\d+$/;function s(e,t){var i,a,s,n=e.nodeName.toLowerCase();return"area"===n?(a=(i=e.parentNode).name,!(!e.href||!a||"map"!==i.nodeName.toLowerCase())&&(!!(s=o("img[usemap=#"+a+"]")[0])&&r(s))):(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n&&e.href||t)&&r(e)}function r(e){return o.expr.filters.visible(e)&&!o(e).parents().addBack().filter(function(){return"hidden"===o.css(this,"visibility")}).length}o.ui=o.ui||{},o.extend(o.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),o.fn.extend({focus:(e=o.fn.focus,function(t,i){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){o(e).focus(),i&&i.call(e)},t)}):e.apply(this,arguments)}),scrollParent:function(){var e=o.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(o.css(this,"position"))&&/(auto|scroll)/.test(o.css(this,"overflow")+o.css(this,"overflow-y")+o.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(o.css(this,"overflow")+o.css(this,"overflow-y")+o.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!e.length?o(document):e},zIndex:function(e){if(e!==u)return this.css("zIndex",e);if(this.length)for(var t,i,a=o(this[0]);a.length&&a[0]!==document;){if(("absolute"===(t=a.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(a.css("zIndex"),10),!isNaN(i)&&0!==i))return i;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&o(this).removeAttr("id")})}}),o.extend(o.expr[":"],{data:o.expr.createPseudo?o.expr.createPseudo(function(t){return function(e){return!!o.data(e,t)}}):function(e,t,i){return!!o.data(e,i[3])},focusable:function(e){return s(e,!isNaN(o.attr(e,"tabindex")))},tabbable:function(e){var t=o.attr(e,"tabindex"),i=isNaN(t);return(i||0<=t)&&s(e,!i)}}),o("").outerWidth(1).jquery||o.each(["Width","Height"],function(e,i){var s="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),n={innerWidth:o.fn.innerWidth,innerHeight:o.fn.innerHeight,outerWidth:o.fn.outerWidth,outerHeight:o.fn.outerHeight};function r(e,t,i,a){return o.each(s,function(){t-=parseFloat(o.css(e,"padding"+this))||0,i&&(t-=parseFloat(o.css(e,"border"+this+"Width"))||0),a&&(t-=parseFloat(o.css(e,"margin"+this))||0)}),t}o.fn["inner"+i]=function(e){return e===u?n["inner"+i].call(this):this.each(function(){o(this).css(a,r(this,e)+"px")})},o.fn["outer"+i]=function(e,t){return"number"!=typeof e?n["outer"+i].call(this,e):this.each(function(){o(this).css(a,r(this,e,!0,t)+"px")})}}),o.fn.addBack||(o.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),o("").data("a-b","a").removeData("a-b").data("a-b")&&(o.fn.removeData=(t=o.fn.removeData,function(e){return arguments.length?t.call(this,o.camelCase(e)):t.call(this)})),o.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),o.support.selectstart="onselectstart"in document.createElement("div"),o.fn.extend({disableSelection:function(){return this.bind((o.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),o.extend(o.ui,{plugin:{add:function(e,t,i){var a,s=o.ui[e].prototype;for(a in i)s.plugins[a]=s.plugins[a]||[],s.plugins[a].push([t,i[a]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;a",options:{disabled:!1,create:null},_createWidget:function(e,t){t=h(t||this.defaultElement||this)[0],this.element=h(t),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=h.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=h(),this.hoverable=h(),this.focusable=h(),t!==this&&(h.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=h(t.style?t.ownerDocument:t.document||t),this.window=h(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:h.noop,_getCreateEventData:h.noop,_create:h.noop,_init:h.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(h.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:h.noop,widget:function(){return this.element},option:function(e,t){var i,a,s,n=e;if(0===arguments.length)return h.widget.extend({},this.options);if("string"==typeof e)if(n={},e=(i=e.split(".")).shift(),i.length){for(a=n[e]=h.widget.extend({},this.options[e]),s=0;s=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(w,u){w.extend(w.ui,{datepicker:{version:"1.10.3"}});var s,c="datepicker";function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},w.extend(this._defaults,this.regional[""]),this.dpDiv=i(w("
    "))}function i(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){w(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&w(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&w(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){w.datepicker._isDisabledDatepicker(s.inline?e.parent()[0]:s.input[0])||(w(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),w(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&w(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&w(this).addClass("ui-datepicker-next-hover"))})}function d(e,t){for(var i in w.extend(e,t),t)null==t[i]&&(e[i]=t[i]);return e}w.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return d(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var i,a=e.nodeName.toLowerCase(),s="div"===a||"span"===a;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(w(e),s)).settings=w.extend({},t||{}),"input"===a?this._connectDatepicker(e,i):s&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?i(w("
    ")):this.dpDiv}},_connectDatepicker:function(e,t){var i=w(e);t.append=w([]),t.trigger=w([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),w.data(e,c,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i,a,s,n=this._get(t,"appendText"),r=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=w(""+n+""),e[r?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(i=this._get(t,"showOn"))&&"both"!==i||e.focus(this._showDatepicker),"button"!==i&&"both"!==i||(a=this._get(t,"buttonText"),s=this._get(t,"buttonImage"),t.trigger=w(this._get(t,"buttonImageOnly")?w("").addClass(this._triggerClass).attr({src:s,alt:a,title:a}):w("").addClass(this._triggerClass).html(s?w("").attr({src:s,alt:a,title:a}):a)),e[r?"before":"after"](t.trigger),t.trigger.click(function(){return w.datepicker._datepickerShowing&&w.datepicker._lastInput===e[0]?w.datepicker._hideDatepicker():(w.datepicker._datepickerShowing&&w.datepicker._lastInput!==e[0]&&w.datepicker._hideDatepicker(),w.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,i,a,s,n,r;this._get(e,"autoSize")&&!e.inline&&(n=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(t=function(e){for(s=a=i=0;si&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length))},_inlineDatepicker:function(e,t){var i=w(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv),w.data(e,c,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,a,s){var n,r,o,u,l,h=this._dialogInst;return h||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=w(""),this._dialogInput.keydown(this._doKeyDown),w("body").append(this._dialogInput),(h=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},w.data(this._dialogInput[0],c,h)),d(h.settings,a||{}),t=t&&t.constructor===Date?this._formatDate(h,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(r=document.documentElement.clientWidth,o=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+u,o/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),w.blockUI&&w.blockUI(this.dpDiv),w.data(this._dialogInput[0],c,h),this},_destroyDatepicker:function(e){var t,i=w(e),a=w.data(e,c);i.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),w.removeData(e,c),"input"===t?(a.append.remove(),a.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||i.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var e,i,a=w(t),s=w.data(t,c);a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=w.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,i,a=w(t),s=w.data(t,c);a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((i=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=w.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;to&&au&&st;)--Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z-Q,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,ee,Z)?"
    "+i+"":V?"":""+i+"",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,Z+Q,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,ee,Z)?""+s+"":V?"":""+s+"",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?J:L,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"",l=U?"
    "+(H?u:"")+(this._isInRange(e,o)?"":"")+(H?"":u)+"
    ":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,c=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),g=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),y=this._getDefaultDate(e),k="",b=0;b"+(/all|left/.test(x)&&0===b?H?n:a:"")+(/all|right/.test(x)&&0===b?H?a:n:"")+this._generateMonthYearHeader(e,Z,ee,X,$,0",N=c?"":"",D=0;D<7;D++)N+=""+p[S]+"";for(I+=N+"",A=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),F=(this._getFirstDayOfMonth(ee,Z)-h+7)%7,T=Math.ceil((F+A)/7),O=G&&this.maxRows>T?this.maxRows:T,this.maxRows=O,Y=this._daylightSavingAdjust(new Date(ee,Z,1-F)),E=0;E",j=c?"":"",D=0;D<7;D++)P=m?m.apply(e.input?e.input[0]:null,[Y]):[!0,""],K=(W=Y.getMonth()!==Z)&&!v||!P[0]||X&&Y"+(W&&!_?" ":K?""+Y.getDate()+"":""+Y.getDate()+"")+"",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y);I+=j+""}11<++Z&&(Z=0,ee++),w+=I+="
    "+this._get(e,"weekHeader")+"
    "+this._get(e,"calculateWeek")(Y)+"
    "+(G?"
    "+(0":""):"")}k+=w}return k+=l,e._keyEvent=!1,k},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,l,h,c,d,p,f,g,m=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),y="
    ",k="";if(n||!m)k+=""+r[t]+"";else{for(u=a&&a.getFullYear()===i,l=s&&s.getFullYear()===i,k+=""}if(v||(y+=k+(!n&&m&&_?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!_)y+=""+i+"";else{for(c=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t})(c[0]),g=Math.max(f,p(c[1]||"")),f=a?Math.max(f,a.getFullYear()):f,g=s?Math.min(g,s.getFullYear()):g,e.yearshtml+="",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,"yearSuffix"),v&&(y+=(!n&&m&&_?"":" ")+k),y+="
    "},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&t=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||t.getFullYear()<=o)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),w.fn.datepicker=function(e){if(!this.length)return this;w.datepicker.initialized||(w(document).mousedown(w.datepicker._checkExternalClick),w.datepicker.initialized=!0),0===w("#"+w.datepicker._mainDivId).length&&w("body").append(w.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?w.datepicker["_"+e+"Datepicker"].apply(w.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?w.datepicker["_"+e+"Datepicker"].apply(w.datepicker,[this].concat(t)):w.datepicker._attachDatepicker(this,e)})},w.datepicker=new e,w.datepicker.initialized=!1,w.datepicker.uuid=(new Date).getTime(),w.datepicker.version="1.10.3"}(jQuery),function(h){h.widget("ui.slider",h.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a=[],s=t.values&&t.values.length||1;for(i.length>s&&(i.slice(s).remove(),i=i.slice(0,s)),e=i.length;e");this.handles=i.add(h(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){h(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,t="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:h.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=h("
    ").appendTo(this.element),t="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(t+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=h([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var t,i,a,s,n,r,o,u=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-u.values(e));(t=this._valueMax())return this._valueMax();var t=0=t&&(a+=0")[0],m=h.each,t.style.cssText="background-color:rgba(1,1,1,.5)",r.rgba=-1").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:i.width(),height:i.height()},s=document.activeElement;try{s.id}catch(e){s=document.body}return i.wrap(e),i[0]!==s&&!o.contains(i[0],s)||o(s).focus(),e=i.parent(),"static"===i.css("position")?(e.css({position:"relative"}),i.css({position:"relative"})):(o.extend(a,{position:i.css("position"),zIndex:i.css("z-index")}),o.each(["top","left","bottom","right"],function(e,t){a[t]=i.css(t),isNaN(parseInt(a[t],10))&&(a[t]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(t),e.css(a).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),e[0]!==t&&!o.contains(e[0],t)||o(t).focus()),e},setTransition:function(a,e,s,n){return n=n||{},o.each(e,function(e,t){var i=a.cssUnit(t);0= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android < 4.0, iOS < 6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v1.10.19 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-04-18 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== strundefined && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, - doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", function() { - setDocument(); - }, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", function() { - setDocument(); - }); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { - div.innerHTML = "
    "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowclip^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android < 4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Math.random(); -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android < 4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -/* - Implementation Summary - - 1. Enforce API surface and semantic compatibility with 1.9.x branch - 2. Improve the module's maintainability by reducing the storage - paths to a single mechanism. - 3. Use the same single mechanism to support "private" and "user" data. - 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) - 5. Avoid exposing implementation details on user objects (eg. expando properties) - 6. Provide a clear path for implementation upgrade to WeakMap in 2014 -*/ -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - name = attrs[ i ].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - // Support: Windows Web Apps (WWA) - // `name` and `type` need .setAttribute for WWA - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 - // old WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Make sure textarea (and checkbox) defaultValue is properly cloned - // Support: IE9-IE11+ - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome < 28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - // Support: Android < 4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// Create "bubbling" focus and blur events -// Support: Firefox, Chrome, Safari -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE 9 - option: [ 1, "" ], - - thead: [ 1, "", "
    " ], - col: [ 2, "", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - _default: [ 0, "", "" ] - }; - -// Support: IE 9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute("type"); - } - - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Support: IE >= 9 -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Support: IE >= 9 - // Fix Cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Fixes #12346 - // Support: Webkit, IE - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - }); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optmization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "'; - _iframe = temp.firstChild; - container.appendChild(_iframe); - - /* _iframe.onreadystatechange = function() { - console.info(_iframe.readyState); - };*/ - - Events.addEvent(_iframe, 'load', function() { // _iframe.onload doesn't work in IE lte 8 - var el; - - try { - el = _iframe.contentWindow.document || _iframe.contentDocument || window.frames[_iframe.id].document; - - // try to detect some standard error pages - if (/^4(0[0-9]|1[0-7]|2[2346])\s/.test(el.title)) { // test if title starts with 4xx HTTP error - _status = el.title.replace(/^(\d+).*$/, '$1'); - } else { - _status = 200; - // get result - _response = Basic.trim(el.body.innerHTML); - - // we need to fire these at least once - target.trigger({ - type: 'progress', - loaded: _response.length, - total: _response.length - }); - - if (blob) { // if we were uploading a file - target.trigger({ - type: 'uploadprogress', - loaded: blob.size || 1025, - total: blob.size || 1025 - }); - } - } - } catch (ex) { - if (Url.hasSameOrigin(meta.url)) { - // if response is sent with error code, iframe in IE gets redirected to res://ieframe.dll/http_x.htm - // which obviously results to cross domain error (wtf?) - _status = 404; - } else { - cleanup.call(target, function() { - target.trigger('error'); - }); - return; - } - } - - cleanup.call(target, function() { - target.trigger('load'); - }); - }, target.uid); - } // end createIframe - - // prepare data to be sent and convert if required - if (data instanceof FormData && data.hasBlob()) { - blob = data.getBlob(); - uid = blob.uid; - input = Dom.get(uid); - form = Dom.get(uid + '_form'); - if (!form) { - throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); - } - } else { - uid = Basic.guid('uid_'); - - form = document.createElement('form'); - form.setAttribute('id', uid + '_form'); - form.setAttribute('method', meta.method); - form.setAttribute('enctype', 'multipart/form-data'); - form.setAttribute('encoding', 'multipart/form-data'); - - I.getShimContainer().appendChild(form); - } - - // set upload target - form.setAttribute('target', uid + '_iframe'); - - if (data instanceof FormData) { - data.each(function(value, name) { - if (value instanceof Blob) { - if (input) { - input.setAttribute('name', name); - } - } else { - var hidden = document.createElement('input'); - - Basic.extend(hidden, { - type : 'hidden', - name : name, - value : value - }); - - // make sure that input[type="file"], if it's there, comes last - if (input) { - form.insertBefore(hidden, input); - } else { - form.appendChild(hidden); - } - } - }); - } - - // set destination url - form.setAttribute("action", meta.url); - - createIframe(); - form.submit(); - target.trigger('loadstart'); - }, - - getStatus: function() { - return _status; - }, - - getResponse: function(responseType) { - if ('json' === responseType) { - // strip off
    ..
    tags that might be enclosing the response - if (Basic.typeOf(_response) === 'string' && !!window.JSON) { - try { - return JSON.parse(_response.replace(/^\s*]*>/, '').replace(/<\/pre>\s*$/, '')); - } catch (ex) { - return null; - } - } - } else if ('document' === responseType) { - - } - return _response; - }, - - abort: function() { - var target = this; - - if (_iframe && _iframe.contentWindow) { - if (_iframe.contentWindow.stop) { // FireFox/Safari/Chrome - _iframe.contentWindow.stop(); - } else if (_iframe.contentWindow.document.execCommand) { // IE - _iframe.contentWindow.document.execCommand('Stop'); - } else { - _iframe.src = "about:blank"; - } - } - - cleanup.call(this, function() { - // target.dispatchEvent('readystatechange'); - target.dispatchEvent('abort'); - }); - }, - - destroy: function() { - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - } - - return (extensions.XMLHttpRequest = XMLHttpRequest); -}); - -// Included from: src/javascript/runtime/html4/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html4/image/Image -@private -*/ -define("moxie/runtime/html4/image/Image", [ - "moxie/runtime/html4/Runtime", - "moxie/runtime/html5/image/Image" -], function(extensions, Image) { - return (extensions.Image = Image); -}); - -expose(["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Dom","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/core/I18n","moxie/core/utils/Mime","moxie/file/FileInput","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/image/Image","moxie/core/utils/Events","moxie/runtime/html5/image/ResizerCanvas"]); -})(this); -})); \ No newline at end of file +var MXI_DEBUG=!0;!function(e){function t(){var e={};return function(){(function(a,w){"use strict";var s={};function n(e,t){var i,n=[];for(var r=0;r0){c(e,function(e,t){var i=m(s(e),["array","object"])!==-1;if(e===o||n&&a[t]===o){return true}if(i&&r){e=u(e)}if(s(a[t])===s(e)&&i){l(n,r,[a[t],e])}else{a[t]=e}})}});return a}function o(t,e){for(var i in e){if({}.hasOwnProperty.call(e,i)){t[i]=e[i]}}function n(){this.constructor=t;if(MXI_DEBUG){var e=function(e){var t=e.toString().match(/^function\s([^\(\s]+)/);return t?t[1]:false};this.ctorName=e(t)}}n.prototype=e.prototype;t.prototype=new n;t.parent=e.prototype;return t}function c(e,t){var i,n,r,o;if(e){try{i=e.length}catch(e){i=o}if(i===o||typeof i!=="number"){for(n in e){if(e.hasOwnProperty(n)){if(t(e[n],n)===false){return}}}}else{for(r=0;r>16&255;r=c>>8&255;o=c&255;if(u==64){h[d++]=String.fromCharCode(n)}else if(l==64){h[d++]=String.fromCharCode(n,r)}else{h[d++]=String.fromCharCode(n,r,o)}}while(f>18&63;s=c>>12&63;u=c>>6&63;l=c&63;h[d++]=i.charAt(a)+i.charAt(s)+i.charAt(u)+i.charAt(l)}while(f0){if(o.length==2){if(typeof o[1]==d){e[o[0]]=o[1].call(this,s)}else{e[o[0]]=o[1]}}else if(o.length==3){if(typeof o[1]===d&&!(o[1].exec&&o[1].test)){e[o[0]]=s?o[1].call(this,s,o[2]):f}else{e[o[0]]=s?s.replace(o[1],o[2]):f}}else if(o.length==4){e[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):f}}else{e[o]=s?s:f}}break}}if(!!a)break}return e},str:function(e,t){for(var i in t){if(typeof t[i]===h&&t[i].length>0){for(var n=0;nt[n]){o=1;break}}if(!i){return o}switch(i){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return o<=0;case"==":case"=":case"eq":return o===0;case"<>":case"!=":case"ne":return o!==0;case"":case"<":case"lt":return o<0;default:return null}}var i=function(){var n={access_global_ns:function(){return!!window.moxie},define_property:function(){return false}(),create_canvas:function(){var e=document.createElement("canvas");var t=!!(e.getContext&&e.getContext("2d"));n.create_canvas=t;return t},return_response_type:function(e){try{if(r.inArray(e,["","text","document"])!==-1){return true}else if(window.XMLHttpRequest){var t=new XMLHttpRequest;t.open("get","/");if("responseType"in t){t.responseType=e;if(t.responseType!==e){return false}return true}}}catch(e){}return false},use_blob_uri:function(){var e=window.URL;n.use_blob_uri=e&&"createObjectURL"in e&&"revokeObjectURL"in e&&(o.browser!=="IE"||o.verComp(o.version,"11.0.46",">="));return n.use_blob_uri},use_data_uri:function(){var e=new Image;e.onload=function(){n.use_data_uri=e.width===1&&e.height===1};setTimeout(function(){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1);return false}(),use_data_uri_over32kb:function(){return n.use_data_uri&&(o.browser!=="IE"||o.version>=9)},use_data_uri_of:function(e){return n.use_data_uri&&e<33e3||n.use_data_uri_over32kb()},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)){return false}var e=document.createElement("input");e.setAttribute("type","file");return n.use_fileinput=!e.disabled},use_webgl:function(){var e=document.createElement("canvas");var t=null,i;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}if(!t){t=null}i=!!t;n.use_webgl=i;e=w;return i}};return function(e){var t=[].slice.call(arguments);t.shift();return r.typeOf(n[e])==="function"?n[e].apply(this,t):!!n[e]}}();var n=(new e).getResult();var o={can:i,uaParser:e,browser:n.browser.name,version:n.browser.version,os:n.os.name,osVersion:n.os.version,verComp:t,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};o.OS=o.os;if(MXI_DEBUG){o.debug={runtime:true,events:false};o.log=function(){function e(e){t.appendChild(document.createTextNode(e+"\n"))}if(window&&window.console&&window.console.log&&window.console.log.apply){window.console.log.apply(window.console,arguments)}else if(document){var t=document.getElementById("moxie-console");if(!t){t=document.createElement("pre");t.id="moxie-console";document.body.appendChild(t)}var i=arguments[0];if(r.typeOf(i)==="string"){i=r.sprintf.apply(this,arguments)}else if(r.inArray(r.typeOf(i),["object","array"])!==-1){e(i);return}t.appendChild(document.createTextNode(i+"\n"))}}}return o});e("moxie/core/Exceptions",["moxie/core/utils/Basic"],function(n){function r(e,t){var i;for(i in e){if(e[i]===t){return i}}return null}return{RuntimeError:function(){var i={NOT_INIT_ERR:1,EXCEPTION_ERR:3,NOT_SUPPORTED_ERR:9,JS_ERR:4};function e(e,t){this.code=e;this.name=r(i,e);this.message=this.name+(t||": RuntimeError "+this.code)}n.extend(e,i);e.prototype=Error.prototype;return e}(),OperationNotAllowedException:function(){function e(e){this.code=e;this.name="OperationNotAllowedException"}n.extend(e,{NOT_ALLOWED_ERR:1});e.prototype=Error.prototype;return e}(),ImageError:function(){var t={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3};function e(e){this.code=e;this.name=r(t,e);this.message=this.name+": ImageError "+this.code}n.extend(e,t);e.prototype=Error.prototype;return e}(),FileException:function(){var t={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};function e(e){this.code=e;this.name=r(t,e);this.message=this.name+": FileException "+this.code}n.extend(e,t);e.prototype=Error.prototype;return e}(),DOMException:function(){var t={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};function e(e){this.code=e;this.name=r(t,e);this.message=this.name+": DOMException "+this.code}n.extend(e,t);e.prototype=Error.prototype;return e}(),EventException:function(){function e(e){this.code=e;this.name="EventException"}n.extend(e,{UNSPECIFIED_EVENT_TYPE_ERR:0});e.prototype=Error.prototype;return e}()}});e("moxie/core/utils/Dom",["moxie/core/utils/Env"],function(l){var e=function(e){if(typeof e!=="string"){return e}return document.getElementById(e)};var i=function(e,t){if(!e.className){return false}var i=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return i.test(e.className)};var t=function(e,t){if(!i(e,t)){e.className=!e.className?t:e.className.replace(/\s+$/,"")+" "+t}};var n=function(e,t){if(e.className){var i=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(i,function(e,t,i){return t===" "&&i===" "?" ":""})}};var r=function(e,t){if(e.currentStyle){return e.currentStyle[t]}else if(window.getComputedStyle){return window.getComputedStyle(e,null)[t]}};var o=function(e,t){var i=0,n=0,r,o=document,a,s;e=e;t=t||o.body;function u(e){var t,i,n=0,r=0;if(e){i=e.getBoundingClientRect();t=o.compatMode==="CSS1Compat"?o.documentElement:o.body;n=i.left+t.scrollLeft;r=i.top+t.scrollTop}return{x:n,y:r}}if(e&&e.getBoundingClientRect&&l.browser==="IE"&&(!o.documentMode||o.documentMode<8)){a=u(e);s=u(t);return{x:a.x-s.x,y:a.y-s.y}}r=e;while(r&&r!=t&&r.nodeType){i+=r.offsetLeft||0;n+=r.offsetTop||0;r=r.offsetParent}r=e.parentNode;while(r&&r!=t&&r.nodeType){i-=r.scrollLeft||0;n-=r.scrollTop||0;r=r.parentNode}return{x:i,y:n}};var a=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:e,hasClass:i,addClass:t,removeClass:n,getStyle:r,getPos:o,getSize:a}});e("moxie/core/EventTarget",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic"],function(l,c,f){var d={};function e(){this.uid=f.guid()}f.extend(e.prototype,{init:function(){if(!this.uid){this.uid=f.guid("uid_")}},addEventListener:function(e,t,i,n){var r=this,o;if(!this.hasOwnProperty("uid")){this.uid=f.guid("uid_")}e=f.trim(e);if(/\s/.test(e)){f.each(e.split(/\s+/),function(e){r.addEventListener(e,t,i,n)});return}e=e.toLowerCase();i=parseInt(i,10)||0;o=d[this.uid]&&d[this.uid][e]||[];o.push({fn:t,priority:i,scope:n||this});if(!d[this.uid]){d[this.uid]={}}d[this.uid][e]=o},hasEventListener:function(e){var t;if(e){e=e.toLowerCase();t=d[this.uid]&&d[this.uid][e]}else{t=d[this.uid]}return t?t:false},removeEventListener:function(e,t){var i=this,n,r;e=e.toLowerCase();if(/\s/.test(e)){f.each(e.split(/\s+/),function(e){i.removeEventListener(e,t)});return}n=d[this.uid]&&d[this.uid][e];if(n){if(t){for(r=n.length-1;r>=0;r--){if(n[r].fn===t){n.splice(r,1);break}}}else{n=[]}if(!n.length){delete d[this.uid][e];if(f.isEmptyObj(d[this.uid])){delete d[this.uid]}}}},removeAllEventListeners:function(){if(d[this.uid]){delete d[this.uid]}},dispatchEvent:function(t){var i,e,n,r,o={},a=true,s;if(f.typeOf(t)!=="string"){r=t;if(f.typeOf(r.type)==="string"){t=r.type;if(r.total!==s&&r.loaded!==s){o.total=r.total;o.loaded=r.loaded}o.async=r.async||false}else{throw new c.EventException(c.EventException.UNSPECIFIED_EVENT_TYPE_ERR)}}if(t.indexOf("::")!==-1){(function(e){i=e[0];t=e[1]})(t.split("::"))}else{i=this.uid}t=t.toLowerCase();e=d[i]&&d[i][t];if(e){e.sort(function(e,t){return t.priority-e.priority});n=[].slice.call(arguments);n.shift();o.type=t;n.unshift(o);if(MXI_DEBUG&&l.debug.events){l.log("%cEvent '%s' fired on %s","color: #999;",o.type,(this.ctorName?this.ctorName+"::":"")+i)}var u=[];f.each(e,function(t){n[0].target=t.scope;if(o.async){u.push(function(e){setTimeout(function(){e(t.fn.apply(t.scope,n)===false)},1)})}else{u.push(function(e){e(t.fn.apply(t.scope,n)===false)})}});if(u.length){f.inSeries(u,function(e){a=!e})}}return a},bindOnce:function(t,i,e,n){var r=this;r.bind.call(this,t,function e(){r.unbind(t,e);return i.apply(this,arguments)},e,n)},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(e){var t=this;this.bind(e.join(" "),function(e){var t="on"+e.type.toLowerCase();if(f.typeOf(this[t])==="function"){this[t].apply(this,arguments)}});f.each(e,function(e){e="on"+e.toLowerCase(e);if(f.typeOf(t[e])==="undefined"){t[e]=null}})}});e.instance=new e;return e});e("moxie/runtime/Runtime",["moxie/core/utils/Env","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/EventTarget"],function(l,c,f,i){var n={},d={};function m(e,t,r,i,n){var o=this,a,s=c.guid(t+"_"),u=n||"browser";e=e||{};d[s]=this;r=c.extend({access_binary:false,access_image_binary:false,display_media:false,do_cors:false,drag_and_drop:false,filter_by_extension:true,resize_image:false,report_upload_progress:false,return_response_headers:false,return_response_type:false,return_status_code:true,send_custom_headers:false,select_file:false,select_folder:false,select_multiple:true,send_binary_string:false,send_browser_cookies:true,send_multipart:true,slice_blob:false,stream_upload:false,summon_file_dialog:false,upload_filesize:true,use_http_method:true},r);if(e.preferred_caps){u=m.getMode(i,e.preferred_caps,u)}if(MXI_DEBUG&&l.debug.runtime){l.log("\tdefault mode: %s",u)}a=function(){var r={};return{exec:function(e,t,i,n){if(a[t]){if(!r[e]){r[e]={context:this,instance:new a[t]}}if(r[e].instance[i]){return r[e].instance[i].apply(this,n)}}},removeInstance:function(e){delete r[e]},removeAllInstances:function(){var i=this;c.each(r,function(e,t){if(c.typeOf(e.instance.destroy)==="function"){e.instance.destroy.call(e.context)}i.removeInstance(t)})}}}();c.extend(this,{initialized:false,uid:s,type:t,mode:m.getMode(i,e.required_caps,u),shimid:s+"_container",clients:0,options:e,can:function(e,t){var i=arguments[2]||r;if(c.typeOf(e)==="string"&&c.typeOf(t)==="undefined"){e=m.parseCaps(e)}if(c.typeOf(e)==="object"){for(var n in e){if(!this.can(n,e[n],i)){return false}}return true}if(c.typeOf(i[e])==="function"){return i[e].call(this,t)}else{return t===i[e]}},getShimContainer:function(){var e,t=f.get(this.shimid);if(!t){e=f.get(this.options.container)||document.body;t=document.createElement("div");t.id=this.shimid;t.className="moxie-shim moxie-shim-"+this.type;c.extend(t.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"});e.appendChild(t);e=null}return t},getShim:function(){return a},shimExec:function(e,t){var i=[].slice.call(arguments,2);return o.getShim().exec.call(this,this.uid,e,t,i)},exec:function(e,t){var i=[].slice.call(arguments,2);if(o[e]&&o[e][t]){return o[e][t].apply(this,i)}return o.shimExec.apply(this,arguments)},destroy:function(){if(!o){return}var e=f.get(this.shimid);if(e){e.parentNode.removeChild(e)}if(a){a.removeAllInstances()}this.unbindAll();delete d[this.uid];this.uid=null;s=o=a=e=null}});if(this.mode&&e.required_caps&&!this.can(e.required_caps)){this.mode=false}}m.order="html5,flash,silverlight,html4";m.getRuntime=function(e){return d[e]?d[e]:false};m.addConstructor=function(e,t){t.prototype=i.instance;n[e]=t};m.getConstructor=function(e){return n[e]||null};m.getInfo=function(e){var t=m.getRuntime(e);if(t){return{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}}return null};m.parseCaps=function(e){var t={};if(c.typeOf(e)!=="string"){return e||{}}c.each(e.split(","),function(e){t[e]=true});return t};m.can=function(e,t){var i,n=m.getConstructor(e),r;if(n){i=new n({required_caps:t});r=i.mode;i.destroy();return!!r}return false};m.thatCan=function(e,t){var i=(t||m.order).split(/\s*,\s*/);for(var n in i){if(m.can(i[n],e)){return i[n]}}return null};m.getMode=function(n,e,t){var r=null;if(c.typeOf(t)==="undefined"){t="browser"}if(e&&!c.isEmptyObj(n)){c.each(e,function(e,t){if(n.hasOwnProperty(t)){var i=n[t](e);if(typeof i==="string"){i=[i]}if(!r){r=i}else if(!(r=c.arrayIntersect(r,i))){if(MXI_DEBUG&&l.debug.runtime){l.log("\t\t%s: %s (conflicting mode requested: %s)",t,e,i)}return r=false}}if(MXI_DEBUG&&l.debug.runtime){l.log("\t\t%s: %s (compatible modes: %s)",t,e,r)}});if(r){return c.inArray(t,r)!==-1?t:r[0]}else if(r===false){return false}}return t};m.getGlobalEventTarget=function(){if(/^moxie\./.test(l.global_event_dispatcher)&&!l.can("access_global_ns")){var e=c.guid("moxie_event_target_");window[e]=function(e,t){i.instance.dispatchEvent(e,t)};l.global_event_dispatcher=e}return l.global_event_dispatcher};m.capTrue=function(){return true};m.capFalse=function(){return false};m.capTest=function(e){return function(){return!!e}};return m});e("moxie/runtime/RuntimeClient",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/Runtime"],function(s,u,t,l){return function e(){var a;t.extend(this,{connectRuntime:function(n){var r=this,e;function o(e){var t,i;if(!e.length){r.trigger("RuntimeError",new u.RuntimeError(u.RuntimeError.NOT_INIT_ERR));a=null;return}t=e.shift().toLowerCase();i=l.getConstructor(t);if(!i){if(MXI_DEBUG&&s.debug.runtime){s.log("Constructor for '%s' runtime is not available.",t)}o(e);return}if(MXI_DEBUG&&s.debug.runtime){s.log("Trying runtime: %s",t);s.log(n)}a=new i(n);a.bind("Init",function(){a.initialized=true;if(MXI_DEBUG&&s.debug.runtime){s.log("Runtime '%s' initialized",a.type)}setTimeout(function(){a.clients++;r.ruid=a.uid;r.trigger("RuntimeInit",a)},1)});a.bind("Error",function(){if(MXI_DEBUG&&s.debug.runtime){s.log("Runtime '%s' failed to initialize",a.type)}a.destroy();o(e)});a.bind("Exception",function(e,t){var i=t.name+"(#"+t.code+")"+(t.message?", from: "+t.message:"");if(MXI_DEBUG&&s.debug.runtime){s.log("Runtime '%s' has thrown an exception: %s",this.type,i)}r.trigger("RuntimeError",new u.RuntimeError(u.RuntimeError.EXCEPTION_ERR,i))});if(MXI_DEBUG&&s.debug.runtime){s.log("\tselected mode: %s",a.mode)}if(!a.mode){a.trigger("Error");return}a.init()}if(t.typeOf(n)==="string"){e=n}else if(t.typeOf(n.ruid)==="string"){e=n.ruid}if(e){a=l.getRuntime(e);if(a){r.ruid=e;a.clients++;return a}else{throw new u.RuntimeError(u.RuntimeError.NOT_INIT_ERR)}}o((n.runtime_order||l.order).split(/\s*,\s*/))},disconnectRuntime:function(){if(a&&--a.clients<=0){a.destroy()}a=null},getRuntime:function(){if(a&&a.uid){return a}return a=null},exec:function(){return a?a.exec.apply(this,arguments):null},can:function(e){return a?a.can(e):false}})}});e("moxie/file/Blob",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient"],function(o,i,r){var a={};function s(e,t){function n(e,t,i){var n,r=a[this.uid];if(o.typeOf(r)!=="string"||!r.length){return null}n=new s(null,{type:i,size:t-e});n.detach(r.substr(e,n.size));return n}r.call(this);if(e){this.connectRuntime(e)}if(!t){t={}}else if(o.typeOf(t)==="string"){t={data:t}}o.extend(this,{uid:t.uid||o.guid("uid_"),ruid:e,size:t.size||0,type:t.type||"",slice:function(e,t,i){if(this.isDetached()){return n.apply(this,arguments)}return this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),e,t,i)},getSource:function(){if(!a[this.uid]){return null}return a[this.uid]},detach:function(e){if(this.ruid){this.getRuntime().exec.call(this,"Blob","destroy");this.disconnectRuntime();this.ruid=null}e=e||"";if(e.substr(0,5)=="data:"){var t=e.indexOf(";base64,");this.type=e.substring(5,t);e=i.atob(e.substring(t+8))}this.size=e.length;a[this.uid]=e},isDetached:function(){return!this.ruid&&o.typeOf(a[this.uid])==="string"},destroy:function(){this.detach();delete a[this.uid]}});if(t.data){this.detach(t.data)}else{a[this.uid]=t}}return s});e("moxie/core/I18n",["moxie/core/utils/Basic"],function(i){var t={};return{addI18n:function(e){return i.extend(t,e)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(e){var t=[].slice.call(arguments,1);return e.replace(/%[a-z]/g,function(){var e=t.shift();return i.typeOf(e)!=="undefined"?e:""})}}});e("moxie/core/utils/Mime",["moxie/core/utils/Basic","moxie/core/I18n"],function(s,n){var e=""+"application/msword,doc dot,"+"application/pdf,pdf,"+"application/pgp-signature,pgp,"+"application/postscript,ps ai eps,"+"application/rtf,rtf,"+"application/vnd.ms-excel,xls xlb xlt xla,"+"application/vnd.ms-powerpoint,ppt pps pot ppa,"+"application/zip,zip,"+"application/x-shockwave-flash,swf swfl,"+"application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,"+"application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,"+"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,"+"application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,"+"application/vnd.openxmlformats-officedocument.presentationml.template,potx,"+"application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,"+"application/x-javascript,js,"+"application/json,json,"+"audio/mpeg,mp3 mpga mpega mp2,"+"audio/x-wav,wav,"+"audio/x-m4a,m4a,"+"audio/ogg,oga ogg,"+"audio/aiff,aiff aif,"+"audio/flac,flac,"+"audio/aac,aac,"+"audio/ac3,ac3,"+"audio/x-ms-wma,wma,"+"image/bmp,bmp,"+"image/gif,gif,"+"image/jpeg,jpg jpeg jpe,"+"image/photoshop,psd,"+"image/png,png,"+"image/svg+xml,svg svgz,"+"image/tiff,tiff tif,"+"text/plain,asc txt text diff log,"+"text/html,htm html xhtml,"+"text/css,css,"+"text/csv,csv,"+"text/rtf,rtf,"+"video/mpeg,mpeg mpg mpe m2v,"+"video/quicktime,qt mov,"+"video/mp4,mp4,"+"video/x-m4v,m4v,"+"video/x-flv,flv,"+"video/x-ms-wmv,wmv,"+"video/avi,avi,"+"video/webm,webm,"+"video/3gpp,3gpp 3gp,"+"video/3gpp2,3g2,"+"video/vnd.rn-realvideo,rv,"+"video/ogg,ogv,"+"video/x-matroska,mkv,"+"application/vnd.oasis.opendocument.formula-template,otf,"+"application/octet-stream,exe";var o={};var a={};var t=function(e){var t=e.split(/,/),i,n,r;for(i=0;i0){if(p){i.upload.dispatchEvent(e)}i.dispatchEvent(e)}else{v=true;i.dispatchEvent("error")}n()});E.bind("Abort",function(e){i.dispatchEvent(e);n()});E.bind("Error",function(e){v=true;R("readyState",k.DONE);i.dispatchEvent("readystatechange");g=true;i.dispatchEvent(e);n()});t.exec.call(E,"XMLHttpRequest","send",{url:s,method:u,async:a,user:c,password:f,headers:l,mimeType:d,encoding:o,responseType:i.responseType,withCredentials:i.withCredentials,options:y},e)}if(typeof y.required_caps==="string"){y.required_caps=N.parseCaps(y.required_caps)}y.required_caps=T.extend({},y.required_caps,{return_response_type:i.responseType});if(e instanceof M){y.required_caps.send_multipart=true}if(!T.isEmptyObj(l)){y.required_caps.send_custom_headers=true}if(!x){y.required_caps.do_cors=true}if(y.ruid){r(E.connectRuntime(y))}else{E.bind("RuntimeInit",function(e,t){r(t)});E.bind("RuntimeError",function(e,t){i.dispatchEvent("RuntimeError",t)});E.connectRuntime(y)}}function A(){R("responseText","");R("responseXML",null);R("response",null);R("status",0);R("statusText","");t=e=null}}k.UNSENT=0;k.OPENED=1;k.HEADERS_RECEIVED=2;k.LOADING=3;k.DONE=4;k.prototype=e.instance;return k});e("moxie/runtime/Transporter",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(d,m,e,t){function h(){var o,n,a,s,r,u;e.call(this);d.extend(this,{uid:d.guid("uid_"),state:h.IDLE,result:null,transport:function(e,i,t){var n=this;t=d.extend({chunk_size:204798},t);if(o=t.chunk_size%3){t.chunk_size+=3-o}u=t.chunk_size;l.call(this);a=e;s=e.length;if(d.typeOf(t)==="string"||t.ruid){c.call(n,i,this.connectRuntime(t))}else{var r=function(e,t){n.unbind("RuntimeInit",r);c.call(n,i,t)};this.bind("RuntimeInit",r);this.connectRuntime(t)}},abort:function(){var e=this;e.state=h.IDLE;if(n){n.exec.call(e,"Transporter","clear");e.trigger("TransportingAborted")}l.call(e)},destroy:function(){this.unbindAll();n=null;this.disconnectRuntime();l.call(this)}});function l(){s=r=0;a=this.result=null}function c(e,t){var i=this;n=t;i.bind("TransportingProgress",function(e){r=e.loaded;if(ri){u=i}t=m.btoa(a.substr(r,u));n.exec.call(e,"Transporter","receive",t,s)}}h.IDLE=0;h.BUSY=1;h.DONE=2;h.prototype=t.instance;return h});e("moxie/image/Image",["moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/file/FileReaderSync","moxie/xhr/XMLHttpRequest","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/runtime/Transporter","moxie/core/utils/Env","moxie/core/EventTarget","moxie/file/Blob","moxie/file/File","moxie/core/utils/Encode"],function(l,c,f,e,a,s,t,d,m,i,u,h,p){var g=["progress","load","error","resize","embedded"];function v(){t.call(this);l.extend(this,{uid:l.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){i.apply(this,arguments)},resize:function(e){var t=this;var i;var n;var r={x:0,y:0,width:t.width,height:t.height};var o=l.extendIf({width:t.width,height:t.height,type:t.type||"image/jpeg",quality:90,crop:false,fit:true,preserveHeaders:true,resample:"default",multipass:true},e);try{if(!t.size){throw new f.DOMException(f.DOMException.INVALID_STATE_ERR)}if(t.width>v.MAX_RESIZE_WIDTH||t.height>v.MAX_RESIZE_HEIGHT){throw new f.ImageError(f.ImageError.MAX_RESOLUTION_ERR)}i=t.meta&&t.meta.tiff&&t.meta.tiff.Orientation||1;if(l.inArray(i,[5,6,7,8])!==-1){var a=o.width;o.width=o.height;o.height=a}if(o.crop){n=Math.max(o.width/t.width,o.height/t.height);if(e.fit){r.width=Math.min(Math.ceil(o.width/n),t.width);r.height=Math.min(Math.ceil(o.height/n),t.height);n=o.width/r.width}else{r.width=Math.min(o.width,t.width);r.height=Math.min(o.height,t.height);n=1}if(typeof o.crop==="boolean"){o.crop="cc"}switch(o.crop.toLowerCase().replace(/_/,"-")){case"rb":case"right-bottom":r.x=t.width-r.width;r.y=t.height-r.height;break;case"cb":case"center-bottom":r.x=Math.floor((t.width-r.width)/2);r.y=t.height-r.height;break;case"lb":case"left-bottom":r.x=0;r.y=t.height-r.height;break;case"lt":case"left-top":r.x=0;r.y=0;break;case"ct":case"center-top":r.x=Math.floor((t.width-r.width)/2);r.y=0;break;case"rt":case"right-top":r.x=t.width-r.width;r.y=0;break;case"rc":case"right-center":case"right-middle":r.x=t.width-r.width;r.y=Math.floor((t.height-r.height)/2);break;case"lc":case"left-center":case"left-middle":r.x=0;r.y=Math.floor((t.height-r.height)/2);break;case"cc":case"center-center":case"center-middle":default:r.x=Math.floor((t.width-r.width)/2);r.y=Math.floor((t.height-r.height)/2)}r.x=Math.max(r.x,0);r.y=Math.max(r.y,0)}else{n=Math.min(o.width/t.width,o.height/t.height);if(n>1&&!o.fit){n=1}}this.exec("Image","resize",r,n,o)}catch(e){t.trigger("error",e.code)}},downsize:function(e){var t={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:false,fit:false,preserveHeaders:true,resample:"default"},i;if(typeof e==="object"){i=l.extend(t,e)}else{i=l.extend(t,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]})}this.resize(i)},crop:function(e,t,i){this.downsize(e,t,true,i)},getAsCanvas:function(){if(!m.can("create_canvas")){throw new f.RuntimeError(f.RuntimeError.NOT_SUPPORTED_ERR)}return this.exec("Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size){throw new f.DOMException(f.DOMException.INVALID_STATE_ERR)}return this.exec("Image","getAsBlob",e||"image/jpeg",t||90)},getAsDataURL:function(e,t){if(!this.size){throw new f.DOMException(f.DOMException.INVALID_STATE_ERR)}return this.exec("Image","getAsDataURL",e||"image/jpeg",t||90)},getAsBinaryString:function(e,t){var i=this.getAsDataURL(e,t);return p.atob(i.substring(i.indexOf("base64,")+7))},embed:function(a,e){var s=this,u;var t=l.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,fit:true,resample:"nearest"},e);function i(e,t){var i=this;if(m.can("create_canvas")){var n=i.getAsCanvas();if(n){a.appendChild(n);n=null;i.destroy();s.trigger("embedded");return}}var r=i.getAsDataURL(e,t);if(!r){throw new f.ImageError(f.ImageError.WRONG_FORMAT)}if(m.can("use_data_uri_of",r.length)){a.innerHTML='';i.destroy();s.trigger("embedded")}else{var o=new d;o.bind("TransportingComplete",function(){u=s.connectRuntime(this.result.ruid);s.bind("Embedded",function(){l.extend(u.getShimContainer().style,{top:"0px",left:"0px",width:i.width+"px",height:i.height+"px"});u=null},999);u.exec.call(s,"ImageView","display",this.result.uid,width,height);i.destroy()});o.transport(p.atob(r.substring(r.indexOf("base64,")+7)),e,{required_caps:{display_media:true},runtime_order:"flash,silverlight",container:a})}}try{if(!(a=c.get(a))){throw new f.DOMException(f.DOMException.INVALID_NODE_TYPE_ERR)}if(!this.size){throw new f.DOMException(f.DOMException.INVALID_STATE_ERR)}if(this.width>v.MAX_RESIZE_WIDTH||this.height>v.MAX_RESIZE_HEIGHT){}var n=new v;n.bind("Resize",function(){i.call(this,t.type,t.quality)});n.bind("Load",function(){this.downsize(t)});if(this.meta.thumb&&this.meta.thumb.width>=t.width&&this.meta.thumb.height>=t.height){n.load(this.meta.thumb.data)}else{n.clone(this,false)}return n}catch(e){this.trigger("error",e.code)}},destroy:function(){if(this.ruid){this.getRuntime().exec.call(this,"Image","destroy");this.disconnectRuntime()}if(this.meta&&this.meta.thumb){this.meta.thumb.data.destroy()}this.unbindAll()}});this.handleEventProps(g);this.bind("Load Resize",function(){return e.call(this)},999);function e(e){try{if(!e){e=this.exec("Image","getInfo")}this.size=e.size;this.width=e.width;this.height=e.height;this.type=e.type;this.meta=e.meta;if(this.name===""){this.name=e.name}return true}catch(e){this.trigger("error",e.code);return false}}function i(e){var t=l.typeOf(e);try{if(e instanceof v){if(!e.size){throw new f.DOMException(f.DOMException.INVALID_STATE_ERR)}n.apply(this,arguments)}else if(e instanceof u){if(!~l.inArray(e.type,["image/jpeg","image/png"])){throw new f.ImageError(f.ImageError.WRONG_FORMAT)}r.apply(this,arguments)}else if(l.inArray(t,["blob","file"])!==-1){i.call(this,new h(null,e),arguments[1])}else if(t==="string"){if(e.substr(0,5)==="data:"){i.call(this,new u(null,{data:e}),arguments[1])}else{o.apply(this,arguments)}}else if(t==="node"&&e.nodeName.toLowerCase()==="img"){i.call(this,e.src,arguments[1])}else{throw new f.DOMException(f.DOMException.TYPE_MISMATCH_ERR)}}catch(e){this.trigger("error",e.code)}}function n(e,t){var i=this.connectRuntime(e.ruid);this.ruid=i.uid;i.exec.call(this,"Image","loadFromImage",e,l.typeOf(t)==="undefined"?true:t)}function r(t,e){var i=this;i.name=t.name||"";function n(e){i.ruid=e.uid;e.exec.call(i,"Image","loadFromBlob",t)}if(t.isDetached()){this.bind("RuntimeInit",function(e,t){n(t)});if(e&&typeof e.required_caps==="string"){e.required_caps=s.parseCaps(e.required_caps)}this.connectRuntime(l.extend({required_caps:{access_image_binary:true,resize_image:true}},e))}else{n(this.connectRuntime(t.ruid))}}function o(e,t){var i=this,n;n=new a;n.open("get",e);n.responseType="blob";n.onprogress=function(e){i.trigger(e)};n.onload=function(){r.call(i,n.response,true)};n.onerror=function(e){i.trigger(e)};n.onloadend=function(){n.destroy()};n.bind("RuntimeError",function(e,t){i.trigger("RuntimeError",t)});n.send(null,t)}}v.MAX_RESIZE_WIDTH=8192;v.MAX_RESIZE_HEIGHT=8192;v.prototype=i.instance;return v});e("moxie/runtime/html5/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(o,e,a,s){var u="html5",l={};function t(e){var t=this,i=a.capTest,n=a.capTrue;var r=o.extend({access_binary:i(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return t.can("access_binary")&&!!l.Image},display_media:i((s.can("create_canvas")||s.can("use_data_uri_over32kb"))&&d("moxie/image/Image")),do_cors:i(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:i(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&(s.browser!=="IE"||s.verComp(s.version,9,">"))}()),filter_by_extension:i(function(){return!(s.browser==="Chrome"&&s.verComp(s.version,28,"<")||s.browser==="IE"&&s.verComp(s.version,10,"<")||s.browser==="Safari"&&s.verComp(s.version,7,"<")||s.browser==="Firefox"&&s.verComp(s.version,37,"<"))}()),return_response_headers:n,return_response_type:function(e){if(e==="json"&&!!window.JSON){return true}return s.can("return_response_type",e)},return_status_code:n,report_upload_progress:i(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return t.can("access_binary")&&s.can("create_canvas")},select_file:function(){return s.can("use_fileinput")&&window.File},select_folder:function(){return t.can("select_file")&&(s.browser==="Chrome"&&s.verComp(s.version,21,">=")||s.browser==="Firefox"&&s.verComp(s.version,42,">="))},select_multiple:function(){return t.can("select_file")&&!(s.browser==="Safari"&&s.os==="Windows")&&!(s.os==="iOS"&&s.verComp(s.osVersion,"7.0.0",">")&&s.verComp(s.osVersion,"8.0.0","<"))},send_binary_string:i(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:i(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||t.can("send_binary_string")},slice_blob:i(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return t.can("slice_blob")&&t.can("send_multipart")},summon_file_dialog:function(){return t.can("select_file")&&!(s.browser==="Firefox"&&s.verComp(s.version,4,"<")||s.browser==="Opera"&&s.verComp(s.version,12,"<")||s.browser==="IE"&&s.verComp(s.version,10,"<"))},upload_filesize:n,use_http_method:n},arguments[2]);a.call(this,e,arguments[1]||u,r);o.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(t);e=t=null}}(this.destroy)});o.extend(this.getShim(),l)}a.addConstructor(u,t);return l});e("moxie/runtime/html5/file/Blob",["moxie/runtime/html5/Runtime","moxie/file/Blob"],function(e,t){function i(){function e(t,i,n){var e;if(window.File.prototype.slice){try{t.slice();return t.slice(i,n)}catch(e){return t.slice(i,n-i)}}else if(e=window.File.prototype.webkitSlice||window.File.prototype.mozSlice){return e.call(t,i,n)}else{return null}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))};this.destroy=function(){this.getRuntime().getShim().removeInstance(this.uid)}}return e.Blob=i});e("moxie/core/utils/Events",["moxie/core/utils/Basic"],function(a){var s={},u="moxie_"+a.guid();function l(){this.returnValue=false}function c(){this.cancelBubble=true}var e=function(e,t,i,n){var r,o;t=t.toLowerCase();if(e.addEventListener){r=i;e.addEventListener(t,r,false)}else if(e.attachEvent){r=function(){var e=window.event;if(!e.target){e.target=e.srcElement}e.preventDefault=l;e.stopPropagation=c;i(e)};e.attachEvent("on"+t,r)}if(!e[u]){e[u]=a.guid()}if(!s.hasOwnProperty(e[u])){s[e[u]]={}}o=s[e[u]];if(!o.hasOwnProperty(t)){o[t]=[]}o[t].push({func:r,orig:i,key:n})};var r=function(t,e,i){var n,r;e=e.toLowerCase();if(t[u]&&s[t[u]]&&s[t[u]][e]){n=s[t[u]][e]}else{return}for(var o=n.length-1;o>=0;o--){if(n[o].orig===i||n[o].key===i){if(t.removeEventListener){t.removeEventListener(e,n[o].func,false)}else if(t.detachEvent){t.detachEvent("on"+e,n[o].func)}n[o].orig=null;n[o].func=null;n.splice(o,1);if(i!==r){break}}}if(!n.length){delete s[t[u]][e]}if(a.isEmptyObj(s[t[u]])){delete s[t[u]];try{delete t[u]}catch(e){t[u]=r}}};var t=function(i,n){if(!i||!i[u]){return}a.each(s[i[u]],function(e,t){r(i,t,n)})};return{addEvent:e,removeEvent:r,removeAllEvents:t}});e("moxie/runtime/html5/file/FileInput",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,f,d,m,h,p,g){function t(){var l,c;d.extend(this,{init:function(e){var i=this,n=i.getRuntime(),t,r,o,a,s,u;l=e;o=p.extList2mimes(l.accept,n.can("filter_by_extension"));r=n.getShimContainer();r.innerHTML='";t=m.get(n.uid);d.extend(t.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"});a=m.get(l.browse_button);c=m.getStyle(a,"z-index")||"auto";if(n.can("summon_file_dialog")){if(m.getStyle(a,"position")==="static"){a.style.position="relative"}h.addEvent(a,"click",function(e){var t=m.get(n.uid);if(t&&!t.disabled){t.click()}e.preventDefault()},i.uid);i.bind("Refresh",function(){s=parseInt(c,10)||1;m.get(l.browse_button).style.zIndex=s;this.getRuntime().getShimContainer().style.zIndex=s-1})}u=n.can("summon_file_dialog")?a:r;h.addEvent(u,"mouseover",function(){i.trigger("mouseenter")},i.uid);h.addEvent(u,"mouseout",function(){i.trigger("mouseleave")},i.uid);h.addEvent(u,"mousedown",function(){i.trigger("mousedown")},i.uid);h.addEvent(m.get(l.container),"mouseup",function(){i.trigger("mouseup")},i.uid);(n.can("summon_file_dialog")?t:a).setAttribute("tabindex",-1);t.onchange=function e(){i.files=[];d.each(this.files,function(e){var t="";if(l.directory){if(e.name=="."){return true}}if(e.webkitRelativePath){t="/"+e.webkitRelativePath.replace(/^\//,"")}e=new f(n.uid,e);e.relativePath=t;i.files.push(e)});if(g.browser!=="IE"&&g.browser!=="IEMobile"){this.value=""}else{var t=this.cloneNode(true);this.parentNode.replaceChild(t,this);t.onchange=e}if(i.files.length){i.trigger("change")}};i.trigger({type:"ready",async:true});r=null},setOption:function(e,t){var i=this.getRuntime();var n=m.get(i.uid);switch(e){case"accept":if(t){var r=t.mimes||p.extList2mimes(t,i.can("filter_by_extension"));n.setAttribute("accept",r.join(","))}else{n.removeAttribute("accept")}break;case"directory":if(t&&i.can("select_folder")){n.setAttribute("directory","");n.setAttribute("webkitdirectory","")}else{n.removeAttribute("directory");n.removeAttribute("webkitdirectory")}break;case"multiple":if(t&&i.can("select_multiple")){n.setAttribute("multiple","")}else{n.removeAttribute("multiple")}}},disable:function(e){var t=this.getRuntime(),i;if(i=m.get(t.uid)){i.disabled=!!e}},destroy:function(){var e=this.getRuntime(),t=e.getShim(),i=e.getShimContainer(),n=l&&m.get(l.container),r=l&&m.get(l.browse_button);if(n){h.removeAllEvents(n,this.uid)}if(r){h.removeAllEvents(r,this.uid);r.style.zIndex=c}if(i){h.removeAllEvents(i,this.uid);i.innerHTML=""}t.removeInstance(this.uid);l=i=n=r=t=null}})}return e.FileInput=t});e("moxie/runtime/html5/file/FileDrop",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime"],function(e,h,p,t,g,i){function n(){var n=[],r=[],o,a;p.extend(this,{init:function(e){var t=this,i;o=e;a=t.ruid;r=l(o.accept);i=o.container;g.addEvent(i,"dragover",function(e){if(!s(e)){return}e.preventDefault();e.dataTransfer.dropEffect="copy"},t.uid);g.addEvent(i,"drop",function(e){if(!s(e)){return}e.preventDefault();n=[];if(e.dataTransfer.items&&e.dataTransfer.items[0].webkitGetAsEntry){f(e.dataTransfer.items,function(){t.files=n;t.trigger("drop")})}else{p.each(e.dataTransfer.files,function(e){u(e)});t.files=n;t.trigger("drop")}},t.uid);g.addEvent(i,"dragenter",function(e){t.trigger("dragenter")},t.uid);g.addEvent(i,"dragleave",function(e){t.trigger("dragleave")},t.uid)},destroy:function(){g.removeAllEvents(o&&t.get(o.container),this.uid);a=n=r=o=null;this.getRuntime().getShim().removeInstance(this.uid)}});function s(e){if(!e.dataTransfer||!e.dataTransfer.types){return false}var t=p.toArray(e.dataTransfer.types||[]);return p.inArray("Files",t)!==-1||p.inArray("public.file-url",t)!==-1||p.inArray("application/x-moz-file",t)!==-1}function u(e,t){if(c(e)){var i=new h(a,e);i.relativePath=t||"";n.push(i)}}function l(e){var t=[];for(var i=0;i=")&&w.verComp(w.version,7,"<"),t=w.browser==="Android Browser",o=false;u=n.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase();s=c();s.open(n.method,n.url,n.async,n.user,n.password);if(i instanceof g){if(i.isDetached()){o=true}i=i.getSource()}else if(i instanceof v){if(i.hasBlob()){if(i.getBlob().isDetached()){i=f.call(r,i);o=true}else if((e||t)&&d.typeOf(i.getBlob().getSource())==="blob"&&window.FileReader){l.call(r,n,i);return}}if(i instanceof v){var a=new window.FormData;i.each(function(e,t){if(e instanceof g){a.append(t,e.getSource())}else{a.append(t,e)}});i=a}}if(s.upload){if(n.withCredentials){s.withCredentials=true}s.addEventListener("load",function(e){r.trigger(e)});s.addEventListener("error",function(e){r.trigger(e)});s.addEventListener("progress",function(e){r.trigger(e)});s.upload.addEventListener("progress",function(e){r.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})}else{s.onreadystatechange=function e(){switch(s.readyState){case 1:break;case 2:break;case 3:var t,i;try{if(h.hasSameOrigin(n.url)){t=s.getResponseHeader("Content-Length")||0}if(s.responseText){i=s.responseText.length}}catch(e){t=i=0}r.trigger({type:"progress",lengthComputable:!!t,total:parseInt(t,10),loaded:i});break;case 4:s.onreadystatechange=function(){};try{if(s.status>=200&&s.status<400){r.trigger("load");break}}catch(e){}r.trigger("error");break}}}if(!d.isEmptyObj(n.headers)){d.each(n.headers,function(e,t){s.setRequestHeader(t,e)})}if(""!==n.responseType&&"responseType"in s){if("json"===n.responseType&&!w.can("return_response_type","json")){s.responseType="text"}else{s.responseType=n.responseType}}if(!o){s.send(i)}else{if(s.sendAsBinary){s.sendAsBinary(i)}else{(function(){var e=new Uint8Array(i.length);for(var t=0;tthis.length()){throw new Error("You are trying to read outside the source boundaries.")}n=this.littleEndian?0:-8*(t-1);for(r=0,i=0;rthis.length()){throw new Error("You are trying to write outside the source boundaries.")}n=this.littleEndian?0:-8*(i-1);for(r=0;r>Math.abs(n+r*8)&255)}},BYTE:function(e){return this.read(e,1)},SHORT:function(e){return this.read(e,2)},LONG:function(e){return this.read(e,4)},SLONG:function(e){var t=this.read(e,4);return t>2147483647?t-4294967296:t},CHAR:function(e){return String.fromCharCode(this.read(e,1))},STRING:function(e,t){return this.asArray("CHAR",e,t).join("")},asArray:function(e,t,i){var n=[];for(var r=0;r0){n.set(new Uint8Array(r.slice(0,e)),0)}n.set(new Uint8Array(i),e);n.set(new Uint8Array(r.slice(e+t)),e+i.byteLength);this.clear();r=n.buffer;o=new DataView(r);break}default:return r}},length:function(){return r?r.byteLength:0},clear:function(){o=r=null}})}function n(n){e.extend(this,{readByteAt:function(e){return n.charCodeAt(e)},writeByteAt:function(e,t){r(String.fromCharCode(t),e,1)},SEGMENT:function(e,t,i){switch(arguments.length){case 1:return n.substr(e);case 2:return n.substr(e,t);case 3:r(i!==null?i:"",e,t);break;default:return n}},length:function(){return n?n.length:0},clear:function(){n=null}});function r(e,t,i){i=arguments.length===3?i:n.length-t-1;n=n.substr(0,t)+e+n.substr(i+t)}}return t});e("moxie/runtime/html5/image/JPEGHeaders",["moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(s,u){return function o(e){var a=[],t,r,i,n=0;t=new s(e);if(t.SHORT(0)!==65496){t.clear();throw new u.ImageError(u.ImageError.WRONG_FORMAT)}r=2;while(r<=t.length()){i=t.SHORT(r);if(i>=65488&&i<=65495){r+=2;continue}if(i===65498||i===65497){break}n=t.SHORT(r+2)+2;if(i>=65505&&i<=65519){a.push({hex:i,name:"APP"+(i&15),start:r,length:n,segment:t.SEGMENT(r,n)})}r+=n}t.clear();return{headers:a,restore:function(e){var t,i,n;n=new s(e);r=n.SHORT(2)==65504?4+n.SHORT(4):2;for(i=0,t=a.length;i=i.length){break}}},purge:function(){this.headers=a=[]}}}});e("moxie/runtime/html5/image/ExifParser",["moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(v,s,x){function u(e){var t,c,p,g,i,n;s.call(this,e);c={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}};p={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};g={tiffHeader:10};i=g.tiffHeader;t={clear:this.clear};v.extend(this,{read:function(){try{return u.prototype.read.apply(this,arguments)}catch(e){throw new x.ImageError(x.ImageError.INVALID_META_ERR)}},write:function(){try{return u.prototype.write.apply(this,arguments)}catch(e){throw new x.ImageError(x.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(e){return this.LONG(e)/this.LONG(e+4)},SRATIONAL:function(e){return this.SLONG(e)/this.SLONG(e+4)},ASCII:function(e){return this.CHAR(e)},TIFF:function(){return n||null},EXIF:function(){var e=null;if(g.exifIFD){try{e=o.call(this,g.exifIFD,c.exif)}catch(e){return null}if(e.ExifVersion&&v.typeOf(e.ExifVersion)==="array"){for(var t=0,i="";t4){l=i.LONG(l)+g.tiffHeader}if(l+u*s>=this.length()){throw new x.ImageError(x.ImageError.INVALID_META_ERR)}if(a==="ASCII"){d[o]=v.trim(i.STRING(l,s).replace(/\0$/,""));continue}else{f=i.asArray(a,l,s);c=s==1?f[0]:f;if(p.hasOwnProperty(o)&&typeof c!="object"){d[o]=p[o][c]}else{d[o]=c}}}return d}function a(e,t,i){var n,r,o,a=0;if(typeof t==="string"){var s=c[e.toLowerCase()];for(var u in s){if(s[u]===t){t=u;break}}}n=g[e.toLowerCase()+"IFD"];r=this.SHORT(n);for(var l=0;l=65472&&i<=65475){t+=5;return{height:e.SHORT(t),width:e.SHORT(t+=2)}}n=e.SHORT(t+=2);t+=n-2}return null}function a(){var e=n.thumb(),t,i;if(e){t=new f(e);i=o(t);t.clear();if(i){i.data=e;return i}}return null}function s(){if(!n||!i||!r){return}n.clear();i.purge();r.clear();t=i=n=r=null}}return e});e("moxie/runtime/html5/image/PNG",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader"],function(u,l,c){function e(e){var o,t,i,n;o=new c(e);(function(){var e=0,t=0,i=[35152,20039,3338,6666];for(t=0;te.height?"width":"height";var r=Math.round(e[n]*t);var o=false;if(i!=="nearest"&&(t<.5||t>2)){t=t<.5?.5:2;o=true}var a=u(e,t);if(o){return s(a,r/a[n],i)}else{return a}}function u(e,t){var i=e.width;var n=e.height;var r=Math.round(i*t);var o=Math.round(n*t);var a=document.createElement("canvas");a.width=r;a.height=o;a.getContext("2d").drawImage(e,0,0,i,n,0,0,r,o);e=null;return a}return{scale:s}});e("moxie/runtime/html5/image/Image",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/runtime/html5/image/ImageInfo","moxie/runtime/html5/image/ResizerCanvas","moxie/core/utils/Mime","moxie/core/utils/Env"],function(e,x,w,y,E,b,_,R,I,t){function i(){var n=this,i,r,o,a,s,u=false,l=true;x.extend(this,{loadFromBlob:function(e){var t=this.getRuntime(),i=arguments.length>1?arguments[1]:true;if(!t.can("access_binary")){throw new w.RuntimeError(w.RuntimeError.NOT_SUPPORTED_ERR)}s=e;if(e.isDetached()){a=e.getSource();h.call(this,a);return}else{p.call(this,e.getSource(),function(e){if(i){a=d(e)}h.call(this,e)})}},loadFromImage:function(e,t){this.meta=e.meta;s=new b(null,{name:e.name,size:e.size,type:e.type});h.call(this,t?a=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var e=this.getRuntime(),t;if(!r&&a&&e.can("access_image_binary")){r=new _(a)}t={width:c().width||0,height:c().height||0,type:s.type||I.getFileMime(s.name),size:a&&a.length||s.size||0,name:s.name||"",meta:null};if(l){t.meta=r&&r.meta||this.meta||{};if(t.meta&&t.meta.thumb&&!(t.meta.thumb.data instanceof E)){t.meta.thumb.data=new E(null,{type:"image/jpeg",data:t.meta.thumb.data})}}return t},resize:function(e,t,i){var n=document.createElement("canvas");n.width=e.width;n.height=e.height;n.getContext("2d").drawImage(c(),e.x,e.y,e.width,e.height,0,0,n.width,n.height);o=R.scale(n,t);l=i.preserveHeaders;if(!l){var r=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1;o=g(o,r)}this.width=o.width;this.height=o.height;u=true;this.trigger("Resize")},getAsCanvas:function(){if(!o){o=f()}o.id=this.uid+"_canvas";return o},getAsBlob:function(e,t){if(e!==this.type){u=true;return new b(null,{name:s.name||"",type:e,data:n.getAsDataURL(e,t)})}return new b(null,{name:s.name||"",type:e,data:n.getAsBinaryString(e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!u){return i.src}f();if("image/jpeg"!==e){return o.toDataURL("image/png")}else{try{return o.toDataURL("image/jpeg",t/100)}catch(e){return o.toDataURL("image/jpeg")}}},getAsBinaryString:function(e,t){if(!u){if(!a){a=d(n.getAsDataURL(e,t))}return a}if("image/jpeg"!==e){a=d(n.getAsDataURL(e,t))}else{var i;if(!t){t=90}f();try{i=o.toDataURL("image/jpeg",t/100)}catch(e){i=o.toDataURL("image/jpeg")}a=d(i);if(r){a=r.stripHeaders(a);if(l){if(r.meta&&r.meta.exif){r.setExif({PixelXDimension:this.width,PixelYDimension:this.height})}a=r.writeHeaders(a)}r.purge();r=null}}u=false;return a},destroy:function(){n=null;v.call(this);this.getRuntime().getShim().removeInstance(this.uid)}});function c(){if(!o&&!i){throw new w.ImageError(w.DOMException.INVALID_STATE_ERR)}return o||i}function f(){var e=c();if(e.nodeName.toLowerCase()=="canvas"){return e}o=document.createElement("canvas");o.width=e.width;o.height=e.height;o.getContext("2d").drawImage(e,0,0);return o}function d(e){return y.atob(e.substring(e.indexOf("base64,")+7))}function m(e,t){return"data:"+(t||"")+";base64,"+y.btoa(e)}function h(e){var t=this;i=new Image;i.onerror=function(){v.call(this);t.trigger("error",w.ImageError.WRONG_FORMAT)};i.onload=function(){t.trigger("load")};i.src=e.substr(0,5)=="data:"?e:m(e,s.type)}function p(e,t){var i=this,n;if(window.FileReader){n=new FileReader;n.onload=function(){t.call(i,this.result)};n.onerror=function(){i.trigger("error",w.ImageError.WRONG_FORMAT)};n.readAsDataURL(e)}else{return t.call(this,e.getAsDataURL())}}function g(e,t){var i=Math.PI/180;var n=document.createElement("canvas");var r=n.getContext("2d");var o=e.width;var a=e.height;if(x.inArray(t,[5,6,7,8])>-1){n.width=a;n.height=o}else{n.width=o;n.height=a}switch(t){case 2:r.translate(o,0);r.scale(-1,1);break;case 3:r.translate(o,a);r.rotate(180*i);break;case 4:r.translate(0,a);r.scale(1,-1);break;case 5:r.rotate(90*i);r.scale(1,-1);break;case 6:r.rotate(90*i);r.translate(0,-a);break;case 7:r.rotate(90*i);r.translate(o,-a);r.scale(-1,1);break;case 8:r.rotate(-90*i);r.translate(-o,0);break}r.drawImage(e,0,0,o,a);return n}function v(){if(r){r.purge();r=null}a=i=o=s=null;u=false}}return e.Image=i});e("moxie/runtime/flash/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(a,s,u,l,c){var e="flash",t={};function i(){var t;try{t=navigator.plugins["Shockwave Flash"];t=t.description}catch(e){try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(e){t="0.0"}}t=t.match(/\d+/g);return parseFloat(t[0]+"."+t[1])}function f(t){var i=u.get(t);if(i&&i.nodeName=="OBJECT"){if(s.browser==="IE"){i.style.display="none";(function e(){if(i.readyState==4){n(t)}else{setTimeout(e,10)}})()}else{i.parentNode.removeChild(i)}}}function n(e){var t=u.get(e);if(t){for(var i in t){if(typeof t[i]=="function"){t[i]=null}}t.parentNode.removeChild(t)}}function r(n){var r=this,o;n=a.extend({swf_url:s.swf_url},n);c.call(this,n,e,{access_binary:function(e){return e&&r.mode==="browser"},access_image_binary:function(e){return e&&r.mode==="browser"},display_media:c.capTest(d("moxie/image/Image")),do_cors:c.capTrue,drag_and_drop:false,report_upload_progress:function(){return r.mode==="client"},resize_image:c.capTrue,return_response_headers:false,return_response_type:function(e){if(e==="json"&&!!window.JSON){return true}return!a.arrayDiff(e,["","text","document"])||r.mode==="browser"},return_status_code:function(e){return r.mode==="browser"||!a.arrayDiff(e,[200,404])},select_file:c.capTrue,select_multiple:c.capTrue,send_binary_string:function(e){return e&&r.mode==="browser"},send_browser_cookies:function(e){return e&&r.mode==="browser"},send_custom_headers:function(e){return e&&r.mode==="browser"},send_multipart:c.capTrue,slice_blob:function(e){return e&&r.mode==="browser"},stream_upload:function(e){return e&&r.mode==="browser"},summon_file_dialog:false,upload_filesize:function(e){return a.parseSizeStr(e)<=2097152||r.mode==="client"},use_http_method:function(e){return!a.arrayDiff(e,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(e){return a.arrayDiff(e,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(e){return a.arrayDiff(e,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},slice_blob:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(e){return a.parseSizeStr(e)>=2097152?"client":"browser"}},"client");if(i()<11.3){if(MXI_DEBUG&&s.debug.runtime){s.log("\tFlash didn't meet minimal version requirement (11.3).")}this.mode=false}a.extend(this,{getShim:function(){return u.get(this.uid)},shimExec:function(e,t){var i=[].slice.call(arguments,2);return r.getShim().exec(this.uid,e,t,i)},init:function(){var e,t,i;i=this.getShimContainer();a.extend(i.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"});e=''+''+''+''+"";if(s.browser==="IE"){t=document.createElement("div");i.appendChild(t);t.outerHTML=e;t=i=null}else{i.innerHTML=e}o=setTimeout(function(){if(r&&!r.initialized){r.trigger("Error",new l.RuntimeError(l.RuntimeError.NOT_INIT_ERR));if(MXI_DEBUG&&s.debug.runtime){s.log("\tFlash failed to initialize within a specified period of time (typically 5s).")}}},5e3)},destroy:function(e){return function(){f(r.uid);e.call(r);clearTimeout(o);n=o=e=r=null}}(this.destroy)},t)}c.addConstructor(e,r);return t});e("moxie/runtime/flash/file/Blob",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(e,o){var t={slice:function(e,t,i,n){var r=this.getRuntime();if(t<0){t=Math.max(e.size+t,0)}else if(t>0){t=Math.min(t,e.size)}if(i<0){i=Math.max(e.size+i,0)}else if(i>0){i=Math.min(i,e.size)}e=r.shimExec.call(this,"Blob","slice",t,i,n||"");if(e){e=new o(r.uid,e)}return e}};return e.Blob=t});e("moxie/runtime/flash/file/FileInput",["moxie/runtime/flash/Runtime","moxie/file/File","moxie/core/utils/Dom","moxie/core/utils/Basic"],function(e,r,o,a){var t={init:function(e){var t=this,i=this.getRuntime();var n=o.get(e.browse_button);if(n){n.setAttribute("tabindex",-1);n=null}this.bind("Change",function(){var e=i.shimExec.call(t,"FileInput","getFiles");t.files=[];a.each(e,function(e){t.files.push(new r(i.uid,e))})},999);this.getRuntime().shimExec.call(this,"FileInput","init",{accept:e.accept,multiple:e.multiple});this.trigger("ready")}};return e.FileInput=t});e("moxie/runtime/flash/file/FileReader",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(e,i){function r(e,t){switch(t){case"readAsText":return i.atob(e,"utf8");case"readAsBinaryString":return i.atob(e);case"readAsDataURL":return e}return null}var t={read:function(i,e){var n=this;n.result="";if(i==="readAsDataURL"){n.result="data:"+(e.type||"")+";base64,"}n.bind("Progress",function(e,t){if(t){n.result+=r(t,i)}},999);return n.getRuntime().shimExec.call(this,"FileReader","readAsBase64",e.uid)}};return e.FileReader=t});e("moxie/runtime/flash/file/FileReaderSync",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(e,i){function r(e,t){switch(t){case"readAsText":return i.atob(e,"utf8");case"readAsBinaryString":return i.atob(e);case"readAsDataURL":return e}return null}var t={read:function(e,t){var i,n=this.getRuntime();i=n.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid);if(!i){return null}if(e==="readAsDataURL"){i="data:"+(t.type||"")+";base64,"+i}return r(i,e,t.type)}};return e.FileReaderSync=t});e("moxie/runtime/flash/runtime/Transporter",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(e,n){var t={getAsBlob:function(e){var t=this.getRuntime(),i=t.shimExec.call(this,"Transporter","getAsBlob",e);if(i){return new n(t.uid,i)}return null}};return e.Transporter=t});e("moxie/runtime/flash/xhr/XMLHttpRequest",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/file/Blob","moxie/file/File","moxie/file/FileReaderSync","moxie/runtime/flash/file/FileReaderSync","moxie/xhr/FormData","moxie/runtime/Transporter","moxie/runtime/flash/runtime/Transporter"],function(e,l,c,r,o,t,f,d,i){var n={send:function(e,i){var n=this,r=n.getRuntime();function o(){e.transport=r.mode;r.shimExec.call(n,"XMLHttpRequest","send",e,i)}function t(e,t){r.shimExec.call(n,"XMLHttpRequest","appendBlob",e,t.uid);i=null;o()}function a(e,t){var i=new d;i.bind("TransportingComplete",function(){t(this.result)});i.transport(e.getSource(),e.type,{ruid:r.uid})}if(!l.isEmptyObj(e.headers)){l.each(e.headers,function(e,t){r.shimExec.call(n,"XMLHttpRequest","setRequestHeader",t,e.toString())})}if(i instanceof f){var s;i.each(function(e,t){if(e instanceof c){s=t}else{r.shimExec.call(n,"XMLHttpRequest","append",t,e)}});if(!i.hasBlob()){i=null;o()}else{var u=i.getBlob();if(u.isDetached()){a(u,function(e){u.destroy();t(s,e)})}else{t(s,u)}}}else if(i instanceof c){if(i.isDetached()){a(i,function(e){i.destroy();i=e.uid;o()})}else{i=i.uid;o()}}else{o()}},getResponse:function(e){var t,i,n=this.getRuntime();i=n.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob");if(i){i=new r(n.uid,i);if("blob"===e){return i}try{t=new o;if(!!~l.inArray(e,["","text"])){return t.readAsText(i)}else if("json"===e&&!!window.JSON){return JSON.parse(t.readAsText(i))}}finally{i.destroy()}}return null},abort:function(e){var t=this.getRuntime();t.shimExec.call(this,"XMLHttpRequest","abort");this.dispatchEvent("readystatechange");this.dispatchEvent("abort")}};return e.XMLHttpRequest=n});e("moxie/runtime/flash/image/Image",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/runtime/Transporter","moxie/file/Blob","moxie/file/FileReaderSync"],function(e,t,o,r,n){var i={loadFromBlob:function(e){var t=this,i=t.getRuntime();function n(e){i.shimExec.call(t,"Image","loadFromBlob",e.uid);t=i=null}if(e.isDetached()){var r=new o;r.bind("TransportingComplete",function(){n(r.result.getSource())});r.transport(e.getSource(),e.type,{ruid:i.uid})}else{n(e.getSource())}},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getInfo:function(){var e=this.getRuntime(),t=e.shimExec.call(this,"Image","getInfo");if(t.meta&&t.meta.thumb&&t.meta.thumb.data&&!(e.meta.thumb.data instanceof r)){t.meta.thumb.data=new r(e.uid,t.meta.thumb.data)}return t},getAsBlob:function(e,t){var i=this.getRuntime(),n=i.shimExec.call(this,"Image","getAsBlob",e,t);if(n){return new r(i.uid,n)}return null},getAsDataURL:function(){var e=this.getRuntime(),t=e.Image.getAsBlob.apply(this,arguments),i;if(!t){return null}i=new n;return i.readAsDataURL(t)}};return e.Image=i});e("moxie/runtime/silverlight/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(r,o,e,a,s){var u="silverlight",l={};function c(t){var i=false,e=null,n,r,o,a,s,u=0;try{try{e=new ActiveXObject("AgControl.AgControl");if(e.IsVersionSupported(t)){i=true}e=null}catch(e){var l=navigator.plugins["Silverlight Plug-In"];if(l){n=l.description;if(n==="1.0.30226.2"){n="2.0.30226.2"}r=n.split(".");while(r.length>3){r.pop()}while(r.length<4){r.push(0)}o=t.split(".");while(o.length>4){o.pop()}do{a=parseInt(o[u],10);s=parseInt(r[u],10);u++}while(u'+''+''+''+''+''+"";i=setTimeout(function(){if(n&&!n.initialized){n.trigger("Error",new a.RuntimeError(a.RuntimeError.NOT_INIT_ERR));if(MXI_DEBUG&&o.debug.runtime){o.log("Silverlight failed to initialize within a specified period of time (5-10s).")}}},o.OS!=="Windows"?1e4:5e3)},destroy:function(e){return function(){e.call(n);clearTimeout(i);t=i=e=n=null}}(this.destroy)},l)}s.addConstructor(u,t);return l});e("moxie/runtime/silverlight/file/Blob",["moxie/runtime/silverlight/Runtime","moxie/core/utils/Basic","moxie/runtime/flash/file/Blob"],function(e,t,i){return e.Blob=t.extend({},i)});e("moxie/runtime/silverlight/file/FileInput",["moxie/runtime/silverlight/Runtime","moxie/file/File","moxie/core/utils/Dom","moxie/core/utils/Basic"],function(e,r,o,a){function s(e){var t="";for(var i=0;i