diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ #.ruby-version /config/secrets.yml + +/.byebug_history diff --git a/Gemfile b/Gemfile --- a/Gemfile +++ b/Gemfile @@ -102,7 +102,7 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem 'debug', platforms: [:mri, :mingw, :x64_mingw] + gem 'byebug' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,11 +92,12 @@ bindex (0.8.1) bootsnap (1.13.0) msgpack (~> 1.2) - bootstrap (5.2.0) + bootstrap (5.2.1) autoprefixer-rails (>= 9.1.0) - popper_js (>= 2.11.5, < 3) + popper_js (>= 2.11.6, < 3) sassc-rails (>= 2.0.0) builder (3.2.4) + byebug (11.1.3) capybara (3.37.1) addressable matrix @@ -116,9 +117,6 @@ coffee-script-source (1.12.2) concurrent-ruby (1.1.10) crass (1.0.6) - debug (1.6.2) - irb (>= 1.3.6) - reline (>= 0.3.1) digest (3.1.0) dynamic_form (1.1.4) erubi (1.11.0) @@ -149,9 +147,6 @@ actionpack (>= 6.0.0) railties (>= 6.0.0) in_place_editing (1.2.0) - io-console (0.5.11) - irb (1.4.1) - reline (>= 0.3.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) @@ -162,7 +157,7 @@ listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.18.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -199,11 +194,9 @@ net-protocol timeout nio4r (2.5.8) - nokogiri (1.13.8-x86_64-darwin) - racc (~> 1.4) nokogiri (1.13.8-x86_64-linux) racc (~> 1.4) - popper_js (2.11.5) + popper_js (2.11.6) public_suffix (5.0.0) puma (5.6.5) nio4r (~> 2.0) @@ -243,8 +236,6 @@ ffi (~> 1.0) rdiscount (2.2.0.2) regexp_parser (2.5.0) - reline (0.3.1) - io-console (~> 0.5) rexml (3.2.5) rouge (4.0.0) ruby-progressbar (1.11.0) @@ -279,7 +270,6 @@ actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.5.0-x86_64-darwin) sqlite3 (1.5.0-x86_64-linux) strscan (3.0.4) temple (0.8.2) @@ -293,7 +283,7 @@ activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.0.0) + webdrivers (5.1.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) @@ -306,7 +296,6 @@ zeitwerk (2.6.0) PLATFORMS - x86_64-darwin-20 x86_64-linux DEPENDENCIES @@ -315,9 +304,9 @@ best_in_place! bootsnap bootstrap (~> 5.2) + byebug capybara coffee-rails - debug dynamic_form fuzzy-string-match haml diff --git a/app/assets/javascripts/my_app.js b/app/assets/javascripts/my_app.js --- a/app/assets/javascripts/my_app.js +++ b/app/assets/javascripts/my_app.js @@ -1,5 +1,6 @@ //main entry point for sprocket -//= require jquery +//= require jquery3 +//= require jquery_ujs //= require moment //= require moment/th //= require ace-rails-ap diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -26,6 +26,7 @@ //bootstrap //@import "bootstrap-sprockets"; +@import "my_bootstrap_var"; @import "bootstrap"; @import "select2/select2.min"; @import "select2/select2-bootstrap-5-theme.min"; @@ -43,6 +44,7 @@ @import 'material_icons'; //bootstrap navbar color (from) +/* $bgDefault: #19197b; $bgHighlight: #06064b; $colDefault: #8e8eb4; @@ -57,6 +59,9 @@ font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); } +*/ + +@import 'my_custom' /* .navbar-default { @@ -176,425 +181,5 @@ } } } - */ -.secondnavbar { - top: 50px; -} - -// --------------- bootstrap file upload ---------------------- -.btn-file { - position: relative; - overflow: hidden; -} - -.btn-file input[type=file] { - position: absolute; - top: 0; - right: 0; - min-width: 100%; - min-height: 100%; - font-size: 100px; - text-align: right; - filter: alpha(opacity = 0); - opacity: 0; - outline: none; - background: white; - cursor: inherit; - display: block; -} - -body { - background: white image-url("topbg.jpg") repeat-x top center; - - //font-size: 13px - //font-family: Tahoma, "sans-serif" - margin: 10px; - padding: 10px; - padding-top: 60px; -} - -// ------------------ bootstrap sortable -------------------- -table.sortable th { - padding-right: 20px !important; - - span.sign { - right: (-15px) !important; - } - - &.text-right { - padding-left: 20px !important; - padding-right: 8px !important; - - &:after, span.sign { - left: (-15px) !important; - } - } -} - -input { - font-family: Tahoma, "sans-serif"; -} - -h1 { - font-size: 24px; - color: #334488; - line-height: 2em; -} - -h2 { - font-size: 18px; - color: #5566bb; - line-height: 1.5em; -} - -hr { - border-top: 1px solid #dddddd; - border-bottom: 1px solid #eeeeee; -} - -//#a -// color: #6666cc -// text-decoration: none -// -// &:link, &:visited -// color: #6666cc -// text-decoration: none -// -// &:hover, &:focus -// color: #111166 -// text-decoration: none - -div { - &.userbar { - line-height: 1.5em; - text-align: right; - font-size: 12px; - } - - &.title { - padding: 10px 0px; - line-height: 1.5em; - font-size: 13px; - - span.contest-over-msg { - font-size: 15px; - color: red; - } - - table { - width: 100%; - font-weight: bold; - } - - td { - &.left-col { - text-align: left; - vertical-align: top; - color: #444444; - } - - &.right-col { - text-align: right; - vertical-align: top; - font-size: 18px; - color: #116699; - } - } - } -} - -table.info { - margin: 10px 0; - border: 1px solid #666666; - border-collapse: collapse; - font-size: 12px; - - th { - border: 1px solid #666666; - line-height: 1.5em; - padding: 0 0.5em; - } - - td { - border-left: 1px solid #666666; - border-right: 1px solid #666666; - line-height: 1.5em; - padding: 0 0.5em; - } -} - -tr { - &.info-head { - background: #777777; - color: white; - } - - &.info-odd { - background: #eeeeee; - } - - &.info-even { - background: #fcfcfc; - } -} - -@mixin basicbox { - background: #eeeeff; - border: 1px dotted #99aaee; - padding: 5px; - margin: 10px 0px; - color: black; - font-size: 13px; -} - -.infobox { - @include basicbox; -} - -.submitbox { - @include basicbox; -} - -.errorExplanation { - border: 1px dotted gray; - color: #bb2222; - padding: 5px 15px 5px 15px; - margin-bottom: 5px; - background-color: white; - font-weight: normal; - - h2 { - color: #cc1111; - font-weight: bold; - } -} - -table.uinfo { - border-collapse: collapse; - border: 1px solid black; - font-size: 13px; -} - -td.uinfo { - vertical-align: top; - border: 1px solid black; - padding: 5px; -} -th.uinfo { - background: lightgreen; - vertical-align: top; - text-align: right; - border: 1px solid black; - padding: 5px; -} - -div { - &.compilermsgbody { - font-family: monospace; - } - - &.task-menu { - text-align: center; - font-size: 13px; - line-height: 1.75em; - font-weight: bold; - border-top: 1px dashed gray; - border-bottom: 1px dashed gray; - margin-top: 2px; - margin-bottom: 4px; - } -} - -table.taskdesc { - border: 2px solid #dddddd; - border-collapse: collapse; - margin: 10px auto; - width: 90%; - font-size: 13px; - - p { - font-size: 13px; - } - - tr.name { - border: 2px solid #dddddd; - background: #dddddd; - color: #333333; - font-weight: bold; - font-size: 14px; - line-height: 1.5em; - text-align: center; - } - - td { - &.desc-odd { - padding: 5px; - padding-left: 20px; - background: #fefeee; - } - - &.desc-even { - padding: 5px; - padding-left: 20px; - background: #feeefe; - } - } -} - -.announcementbox { - margin: 10px 0px; - background: #bbddee; - padding: 1px; - - span.title { - font-weight: bold; - color: #224455; - padding-left: 10px; - line-height: 1.6em; - } -} - -.announcement { - margin: 2px; - background: white; - padding: 1px; - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; - padding-bottom: 5px; -} - -.announcement p { - font-size: 12px; - margin: 2px; -} - -.pub-info { - text-align: right; - font-style: italic; - font-size: 9px; - - p { - text-align: right; - font-style: italic; - font-size: 9px; - } -} - -.announcement { - .toggles { - font-weight: normal; - float: right; - font-size: 80%; - } - - .announcement-title { - font-weight: bold; - } -} - -div { - &.message { - margin: 10px 0 0; - - div { - &.message { - margin: 0 0 0 30px; - } - - &.body { - border: 2px solid #dddddd; - background: #fff8f8; - padding-left: 5px; - } - - &.reply-body { - border: 2px solid #bbbbbb; - background: #fffff8; - padding-left: 5px; - } - - &.stat { - font-size: 10px; - line-height: 1.75em; - padding: 0 5px; - color: #333333; - background: #dddddd; - font-weight: bold; - } - - &.message div.stat { - font-size: 10px; - line-height: 1.75em; - padding: 0 5px; - color: #444444; - background: #bbbbbb; - font-weight: bold; - } - } - } - - &.contest-title { - color: white; - text-align: center; - line-height: 2em; - } - - &.registration-desc, &.test-desc { - border: 1px dotted gray; - background: #f5f5f5; - padding: 5px; - margin: 10px 0; - font-size: 12px; - line-height: 1.5em; - } -} - -h2.contest-title { - margin-top: 5px; - margin-bottom: 5px; -} - - - -.grader-comment { - word-wrap: break-word; -} - - -golden-btn + .golden-btn { margin-top: 1em; } - -.golden-btn { - display: inline-block; - outline: none; - font-family: inherit; - box-sizing: border-box; - border: none; - box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), - inset 0 -2px 5px 1px rgba(139,66,8,1), - inset 0 -1px 1px 3px rgba(250,227,133,1); - background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; - border: 1px solid #a55d07; - color: rgb(120,50,5); - text-shadow: 0 2px 2px rgba(250, 227, 133, 1); - cursor: pointer; - transition: all .2s ease-in-out; - background-size: 100% 100%; - background-position:center; -} -.golden-btn:focus, -.golden-btn:hover { - background-size: 150% 150%; - box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), - inset 0 -2px 5px 1px #b17d10, - inset 0 -1px 1px 3px rgba(250,227,133,1); - border: 1px solid rgba(165,93,7,.6); - color: rgba(120,50,5,.8); -} -.golden-btn:active { - box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), - inset 0 -2px 5px 1px #b17d10, - inset 0 -1px 1px 3px rgba(250,227,133,1); -} diff --git a/app/assets/stylesheets/my_bootstrap_var.css.scss b/app/assets/stylesheets/my_bootstrap_var.css.scss new file mode 100644 --- /dev/null +++ b/app/assets/stylesheets/my_bootstrap_var.css.scss @@ -0,0 +1,1 @@ +$font-size-base: 0.875rem; diff --git a/app/assets/stylesheets/my_custom.css.scss b/app/assets/stylesheets/my_custom.css.scss new file mode 100644 --- /dev/null +++ b/app/assets/stylesheets/my_custom.css.scss @@ -0,0 +1,416 @@ + +.secondnavbar { + top: 50px; +} + +// --------------- bootstrap file upload ---------------------- +.btn-file { + position: relative; + overflow: hidden; +} + +.btn-file input[type=file] { + position: absolute; + top: 0; + right: 0; + min-width: 100%; + min-height: 100%; + font-size: 100px; + text-align: right; + filter: alpha(opacity = 0); + opacity: 0; + outline: none; + background: white; + cursor: inherit; + display: block; +} + +body { + //font-size: 13px + font-family: 'Krub', Tahoma, "sans-serif"; + margin: 10px; + padding: 10px; + padding-top: 60px; +} + +// ------------------ bootstrap sortable -------------------- +table.sortable th { + padding-right: 20px !important; + + span.sign { + right: (-15px) !important; + } + + &.text-right { + padding-left: 20px !important; + padding-right: 8px !important; + + &:after, span.sign { + left: (-15px) !important; + } + } +} + +input { + font-family: Tahoma, "sans-serif"; +} + +h1 { + color: #334488; +} + +h2 { + color: #5566bb; +} + +hr { + border-top: 1px solid #dddddd; + border-bottom: 1px solid #eeeeee; +} + +//#a +// color: #6666cc +// text-decoration: none +// +// &:link, &:visited +// color: #6666cc +// text-decoration: none +// +// &:hover, &:focus +// color: #111166 +// text-decoration: none + +div { + &.userbar { + line-height: 1.5em; + text-align: right; + font-size: 12px; + } + + &.title { + padding: 10px 0px; + line-height: 1.5em; + font-size: 13px; + + span.contest-over-msg { + font-size: 15px; + color: red; + } + + table { + width: 100%; + font-weight: bold; + } + + td { + &.left-col { + text-align: left; + vertical-align: top; + color: #444444; + } + + &.right-col { + text-align: right; + vertical-align: top; + font-size: 18px; + color: #116699; + } + } + } +} + +table.info { + margin: 10px 0; + border: 1px solid #666666; + border-collapse: collapse; + font-size: 12px; + + th { + border: 1px solid #666666; + line-height: 1.5em; + padding: 0 0.5em; + } + + td { + border-left: 1px solid #666666; + border-right: 1px solid #666666; + line-height: 1.5em; + padding: 0 0.5em; + } +} + +tr { + &.info-head { + background: #777777; + color: white; + } + + &.info-odd { + background: #eeeeee; + } + + &.info-even { + background: #fcfcfc; + } +} + +@mixin basicbox { + background: #eeeeff; + border: 1px dotted #99aaee; + padding: 5px; + margin: 10px 0px; + color: black; + font-size: 13px; +} + +.infobox { + @include basicbox; +} + +.submitbox { + @include basicbox; +} + +.errorExplanation { + border: 1px dotted gray; + color: #bb2222; + padding: 5px 15px 5px 15px; + margin-bottom: 5px; + background-color: white; + font-weight: normal; + + h2 { + color: #cc1111; + font-weight: bold; + } +} + +table.uinfo { + border-collapse: collapse; + border: 1px solid black; + font-size: 13px; +} + +td.uinfo { + vertical-align: top; + border: 1px solid black; + padding: 5px; +} + +th.uinfo { + background: lightgreen; + vertical-align: top; + text-align: right; + border: 1px solid black; + padding: 5px; +} + +div { + &.compilermsgbody { + font-family: monospace; + } + + &.task-menu { + text-align: center; + font-size: 13px; + line-height: 1.75em; + font-weight: bold; + border-top: 1px dashed gray; + border-bottom: 1px dashed gray; + margin-top: 2px; + margin-bottom: 4px; + } +} + +table.taskdesc { + border: 2px solid #dddddd; + border-collapse: collapse; + margin: 10px auto; + width: 90%; + font-size: 13px; + + p { + font-size: 13px; + } + + tr.name { + border: 2px solid #dddddd; + background: #dddddd; + color: #333333; + font-weight: bold; + font-size: 14px; + line-height: 1.5em; + text-align: center; + } + + td { + &.desc-odd { + padding: 5px; + padding-left: 20px; + background: #fefeee; + } + + &.desc-even { + padding: 5px; + padding-left: 20px; + background: #feeefe; + } + } +} + +.announcementbox { + margin: 10px 0px; + background: #bbddee; + padding: 1px; + + span.title { + font-weight: bold; + color: #224455; + padding-left: 10px; + line-height: 1.6em; + } +} + +.announcement { + margin: 2px; + background: white; + padding: 1px; + padding-left: 10px; + padding-right: 10px; + padding-top: 5px; + padding-bottom: 5px; +} + +.announcement p { + font-size: 12px; + margin: 2px; +} + +.pub-info { + text-align: right; + font-style: italic; + font-size: 9px; + + p { + text-align: right; + font-style: italic; + font-size: 9px; + } +} + +.announcement { + .toggles { + font-weight: normal; + float: right; + font-size: 80%; + } + + .announcement-title { + font-weight: bold; + } +} + +div { + &.message { + margin: 10px 0 0; + + div { + &.message { + margin: 0 0 0 30px; + } + + &.body { + border: 2px solid #dddddd; + background: #fff8f8; + padding-left: 5px; + } + + &.reply-body { + border: 2px solid #bbbbbb; + background: #fffff8; + padding-left: 5px; + } + + &.stat { + font-size: 10px; + line-height: 1.75em; + padding: 0 5px; + color: #333333; + background: #dddddd; + font-weight: bold; + } + + &.message div.stat { + font-size: 10px; + line-height: 1.75em; + padding: 0 5px; + color: #444444; + background: #bbbbbb; + font-weight: bold; + } + } + } + + &.contest-title { + color: white; + text-align: center; + line-height: 2em; + } + + &.registration-desc, &.test-desc { + border: 1px dotted gray; + background: #f5f5f5; + padding: 5px; + margin: 10px 0; + font-size: 12px; + line-height: 1.5em; + } +} + +h2.contest-title { + margin-top: 5px; + margin-bottom: 5px; +} + + + +.grader-comment { + word-wrap: break-word; + font-family: consolas; +} + + +golden-btn + .golden-btn { margin-top: 1em; } + +.golden-btn { + display: inline-block; + outline: none; + font-family: inherit; + box-sizing: border-box; + border: none; + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), + inset 0 -2px 5px 1px rgba(139,66,8,1), + inset 0 -1px 1px 3px rgba(250,227,133,1); + background-image: linear-gradient(160deg, #a54e07, #b47e11, #fef1a2, #bc881b, #a54e07) !important; + border: 1px solid #a55d07; + color: rgb(120,50,5); + text-shadow: 0 2px 2px rgba(250, 227, 133, 1); + cursor: pointer; + transition: all .2s ease-in-out; + background-size: 100% 100%; + background-position:center; +} +.golden-btn:focus, +.golden-btn:hover { + background-size: 150% 150%; + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), + inset 0 -2px 5px 1px #b17d10, + inset 0 -1px 1px 3px rgba(250,227,133,1); + border: 1px solid rgba(165,93,7,.6); + color: rgba(120,50,5,.8); +} +.golden-btn:active { + box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(110,80,20,.4), + inset 0 -2px 5px 1px #b17d10, + inset 0 -1px 1px 3px rgba(250,227,133,1); +} diff --git a/app/javascript/application.js b/app/javascript/application.js --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -3,20 +3,16 @@ //import "controllers" // -//import "my_sprocket" -import "pdfmake" -import "pdfmake-vfs" -import "jszip" //bootstrap import "bootstrap" window.bootstrap = bootstrap -console.log($); // ok -console.log(bootstrap) -console.log(JSZip); //datatable //import 'datatables-bundle' +import "pdfmake" +import "pdfmake-vfs" +import "jszip" import "datatables" import "datatables-bs5" import "datatables-editor" @@ -49,10 +45,6 @@ import "select2" -//import "ace-rails-ap" -//import "ace/theme-merbivore" -//import "ace/mode-python" - //my own customization import 'custom' diff --git a/app/javascript/custom.js b/app/javascript/custom.js --- a/app/javascript/custom.js +++ b/app/javascript/custom.js @@ -8,7 +8,12 @@ $(function() { var e; - $(".select2").select2({}); + $(".select2").select2({ + theme: "bootstrap-5", + //selectionCssClass: "select2--small", + //dropdownCssClass: "select2--small", + }); + $('.btn-file :file').on('fileselect', function(event, numFiles, label) { var input, log; input = $(this).parents('.input-group').find(':text'); diff --git a/app/models/application_record.rb b/app/models/application_record.rb --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,3 @@ class ApplicationRecord < ActiveRecord::Base - self.abstract_class = true + primary_abstract_class end diff --git a/app/models/submission.rb b/app/models/submission.rb --- a/app/models/submission.rb +++ b/app/models/submission.rb @@ -1,4 +1,4 @@ -class Submission < ActiveRecord::Base +class Submission < ApplicationRecord enum tag: {default: 0, model: 1}, _prefix: true @@ -91,7 +91,7 @@ def self.find_language_in_source(source, source_filename="") langopt = find_option_in_source(/^LANG:/,source) if langopt - return (Language.find_by_name(langopt) || + return (Language.find_by_name(langopt) || Language.find_by_pretty_name(langopt)) else if source_filename @@ -143,14 +143,14 @@ return if self.problem!=nil and self.problem.output_only if self.language == nil - errors.add('source',"Cannot detect language. Did you submit a correct source file?") + errors.add(:source,:invalid,message: "Cannot detect language. Did you submit a correct source file?") end end def must_have_valid_problem return if self.source==nil if self.problem==nil - errors.add('problem',"must be specified.") + errors.add(:problem,:blank,'aaa') else #admin always have right return if self.user.admin? diff --git a/app/views/application/_submission.html.haml b/app/views/application/_submission.html.haml --- a/app/views/application/_submission.html.haml +++ b/app/views/application/_submission.html.haml @@ -12,14 +12,7 @@ = " (#{submission.language.pretty_name}) " = link_to '[load]', download_submission_path(submission) %td - - if submission.graded_at - = "Graded at #{format_short_time(submission.graded_at)}." - %br/ - = "Score: #{(submission.points*100/submission.problem.full_score).to_i} " if GraderConfiguration['ui.show_score'] - = " [" - %tt - = submission.grader_comment - = "]" + = render 'submission_short', submission: submission, show_button: false, problem_id: submission&.problem&.id %td = render :partial => 'compiler_message', :locals => {:compiler_message => submission.compiler_message } %td diff --git a/app/views/application/_submission_short.html.haml b/app/views/application/_submission_short.html.haml --- a/app/views/application/_submission_short.html.haml +++ b/app/views/application/_submission_short.html.haml @@ -1,32 +1,33 @@ - if submission.nil? = "-" - else - %strong= "Submission ID:" - = submission.id - %br + - if local_assigns[:show_id] + .row + .col-3.text-secondary + Sub ID: + %strong.col-9= submission.id - unless submission.graded_at - %strong= t 'main.submitted_at:' - = format_full_time_ago(submission.submitted_at.localtime) + .row + .col-3.text-secondary= t 'main.submitted_at' + %strong.col-9= format_full_time_ago(submission.submitted_at.localtime) - else - %strong= t 'main.graded_at:' - = format_full_time_ago(submission.graded_at.localtime) - %br + .row + .col-3.text-secondary= t 'main.graded_at' + %strong.col-9= format_full_time_ago(submission.graded_at.localtime) - if GraderConfiguration['ui.show_score'] - %strong=t 'main.score' - = "#{(submission.points*100/submission.problem.full_score).to_i} " - = " [" - %tt - = submission.grader_comment - = "]" - %br - %strong View: - - if GraderConfiguration.show_grading_result - = link_to '[detailed result]', :action => 'result', :id => submission.id - - if submission.graded_at - = link_to "#{t 'main.cmp_msg'}", compiler_msg_submission_path(submission), {popup: true,remote: true,class: 'btn btn-xs btn-info'} - -# - %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}} - =t 'main.cmp_msg' - = link_to "#{t 'main.src_link'}", download_submission_path(submission.id), class: 'btn btn-xs btn-info' - = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info' + .row + .col-3.text-secondary=t 'main.score' + %strong.col-9 + = (submission.points*100/submission.problem.full_score).to_i + %tt.grader-comment + = " [#{submission.grader_comment}]" + - if local_assigns[:show_button] + - if submission.graded_at + - if GraderConfiguration.show_grading_result + = link_to '[detailed result]', :action => 'result', :id => submission.id + = link_to "#{t 'main.cmp_msg'}", compiler_msg_submission_path(submission), {popup: true,remote: true,class: 'btn btn-sm btn-info'} + = link_to "#{t 'main.src_link'}",download_submission_path(submission), class: 'btn btn-sm btn-info' + = link_to "#{t 'main.submissions_link'}", problem_submissions_path(submission.problem.id), class: 'btn btn-sm btn-info' + - if GraderConfiguration.show_testcase + = link_to "testcases", show_problem_testcases_path(submission.problem.id), class: 'btn btn-sm btn-info' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -14,7 +14,9 @@ -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"} -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"} - + + + %body - unless local_assigns[:skip_header] diff --git a/app/views/main/_announcement.html.haml b/app/views/main/_announcement.html.haml --- a/app/views/main/_announcement.html.haml +++ b/app/views/main/_announcement.html.haml @@ -1,8 +1,9 @@ -.card-body +%li.list-group-item .card-title - = announcement.title - - if @current_user and @current_user.admin? - = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' + %h1 + = announcement.title + - if @current_user and @current_user.admin? + = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-sm btn-outline-secondary' .card-subtitle = "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" .card-text diff --git a/app/views/main/_problem.html.haml b/app/views/main/_problem.html.haml --- a/app/views/main/_problem.html.haml +++ b/app/views/main/_problem.html.haml @@ -13,8 +13,8 @@ = @prob_submissions[problem.id][:count] -#= link_to "[subs]", main_submission_path(problem.id) %td - = render :partial => 'submission_short', - :locals => {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id } + = render partial: 'submission_short', + locals: {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name, :problem_id => problem.id, show_button: true } %td - if @prob_submissions[problem.id][:submission] = link_to 'Edit', edit_submission_path(@prob_submissions[problem.id][:submission]), class: 'btn btn-success' diff --git a/app/views/main/_submission_short.html.haml b/app/views/main/_submission_short.html.haml deleted file mode 100644 --- a/app/views/main/_submission_short.html.haml +++ /dev/null @@ -1,29 +0,0 @@ - -- if submission.nil? - = "-" -- else - - unless submission.graded_at - = t 'main.submitted_at' - = format_short_time(submission.submitted_at.localtime) - - else - %strong= t 'main.graded_at' - = "#{format_short_time(submission.graded_at.localtime)} " - %br - - if GraderConfiguration['ui.show_score'] - %strong=t 'main.score' - = "#{(submission.points*100/submission.problem.full_score).to_i} " - = " [" - %tt.grader-comment - = submission.grader_comment - = "]" - %br - %strong View: - - if GraderConfiguration.show_grading_result - = link_to '[detailed result]', :action => 'result', :id => submission.id - /= link_to "#{t 'main.cmp_msg'}", {:action => 'compiler_msg', :id => submission.id}, {popup: true,class: 'btn btn-xs btn-info'} - = link_to "#{t 'main.cmp_msg'}", compiler_msg_submission_path(submission), {popup: true,remote: true,class: 'btn btn-xs btn-info'} - = link_to "#{t 'main.src_link'}",download_submission_path(submission), class: 'btn btn-xs btn-info' - = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info' - - if GraderConfiguration.show_testcase - = link_to "testcases", show_problem_testcases_path(problem_id), class: 'btn btn-xs btn-info' - diff --git a/app/views/main/list.html.haml b/app/views/main/list.html.haml --- a/app/views/main/list.html.haml +++ b/app/views/main/list.html.haml @@ -47,13 +47,13 @@ .card .card-header Announcement - = link_to 'Manage', announcements_path, class: 'btn btn-small' - .card-body + = link_to 'Manage', announcements_path, class: 'btn btn-secondary btn-sm' + %ul.list-group.list-group-flush = render :partial => 'announcement', :collection => @announcements - -%script{:type => 'text/javascript'} - = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" - Announcement.registerRefreshEventTimer(); +-# + %script{:type => 'text/javascript'} + = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';".html_safe + Announcement.registerRefreshEventTimer(); .modal.fade#compiler{tabindex: -1,role: 'dialog'} .modal-dialog.modal-lg{role:'document'} diff --git a/app/views/submissions/compiler_msg.js.haml b/app/views/submissions/compiler_msg.js.haml --- a/app/views/submissions/compiler_msg.js.haml +++ b/app/views/submissions/compiler_msg.js.haml @@ -1,4 +1,4 @@ :plain $("#compiler_msg").html("#{j @submission.compiler_message}"); - $("#compiler").modal(); + $("#compiler").modal('show'); diff --git a/app/views/submissions/edit.html.haml b/app/views/submissions/edit.html.haml --- a/app/views/submissions/edit.html.haml +++ b/app/views/submissions/edit.html.haml @@ -12,41 +12,44 @@ .col-md-8 %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} .col-md-4 - - # submission form - = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do - - = hidden_field_tag 'editor_text', @source - = hidden_field_tag 'submission[problem_id]', @problem.id - .form-group - = label_tag "Task:" - = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true - .form-group - = label_tag "Description:" - = link_to_description_if_any "[download] ".html_safe, @problem + -# submission form + .card.mb-3 + .card-header + Submission + .card-body + = form_with url: submit_main_path, :multipart => true, class: 'form' do |form| + = hidden_field_tag 'editor_text', @source + = hidden_field_tag 'submission[problem_id]', @problem.id + .row.mb-2 + .col-md-4 + = form.label "Task", class: 'col-form-label text-secondary' + .col-md-8 + = form.label nil, "#{@problem.long_name}", class: 'col-form-label fw-bold' + .row.mb-2 + .col-md-4 + = form.label "Description", class: 'col-form-label text-secondary' + .col-md-8 + = link_to_description_if_any "[download] description".html_safe, @problem + .row.mb-2 + .col-md-4 + = form.label :language_id, 'Language', class: 'col-form-label text-secondary' + .col-md-8 + = form.select :language_id, options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || @current_user.default_language || Language.find_by_pretty_name("Python").id || Language.first.id), {}, class: 'form-select', style: "width: 100px", id: 'language_id' + .row.mb-2 + .col-12 + = form.file_field :load_file, class: 'form-control', id: 'load_file' + .row.mb-2 + .col-12 + = submit_tag 'Submit', class: 'btn ' + (@submission && @submission.number >= 100 ? 'golden-btn' : 'btn-success'), id: 'live_submit', + data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} - .form-group - = label_tag 'Language:' - = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || @current_user.default_language || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" - .form-group - .input-group - %span.input-group-btn - %span.btn.btn-default.btn-file - Browse - = file_field_tag 'load_file' - = text_field_tag '' , nil, {readonly: true, class: 'form-control'} - .form-group - = submit_tag 'Submit', class: 'btn ' + (@submission && @submission.number >= 100 ? 'golden-btn' : 'btn-success'), id: 'live_submit', - data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} - - # latest submission status - .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} - .panel-heading + -# latest submission status + .card + .card-header.text-bg-info.border-info Latest Submission Status - = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission - .panel-body - %div#latest_status - - if @submission - = render :partial => 'submission_short', - :locals => {submission: @submission, problem_name: @problem.name, problem_id: @problem.id } + = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), id: 'refresh', class: "btn btn-light btn-sm", remote: true if @submission + .card-body + #latest_status .modal.fade#compiler{tabindex: -1,role: 'dialog'} .modal-dialog.modal-lg{role:'document'} @@ -64,7 +67,7 @@ :javascript $(document).ready(function() { - e = ace.edit("editor") + var e = ace.edit("editor") e.setValue($("#text_sourcecode").val()); e.gotoLine(1); $("#language_id").trigger('change'); @@ -80,7 +83,36 @@ reader.readAsText(file) }); + $("#live_submit").on("click", function(event) { + $("#editor_text").val(e.getValue()); + }); + + $("#language_id").on("change", function(event) { + text = $("#language_id option:selected").text(); + mode = 'ace/mode/c_cpp'; + switch (text) { + case 'Pascal': + mode = 'ace/mode/pascal'; + break; + case 'C++': + case 'C': + mode = 'ace/mode/c_cpp'; + break; + case 'Ruby': + mode = 'ace/mode/ruby'; + break; + case 'Python': + mode = 'ace/mode/python'; + break; + case 'Java': + mode = 'ace/mode/java'; + } + e.getSession().setMode(mode); + }); + //brython(); + $('#refresh').click() + }); diff --git a/app/views/submissions/get_latest_submission_status.js.haml b/app/views/submissions/get_latest_submission_status.js.haml --- a/app/views/submissions/get_latest_submission_status.js.haml +++ b/app/views/submissions/get_latest_submission_status.js.haml @@ -1,2 +1,2 @@ :plain - $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, problem_name: @problem.name, problem_id: @problem.id}})}") + $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, show_id: true, show_button: true } })}") diff --git a/app/views/submissions/index.html.haml b/app/views/submissions/index.html.haml --- a/app/views/submissions/index.html.haml +++ b/app/views/submissions/index.html.haml @@ -1,14 +1,16 @@ -.panel.panel-info - .panel-heading +.card.border-info.mb-2 + .card-header.text-bg-info.border-info Select Problems - .panel-body - .form-inline - = select 'submission', - 'problem_id', - @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_submissions_url(p.id)]}, - { selected: (@problem ? problem_submissions_url(@problem) : -1) }, - { class: 'select2 form-control'} - %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: '#submission_problem_id'}} Go + .card-body + .row + .col-6 + = select 'submission', + 'problem_id', + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_submissions_url(p.id)]}, + { selected: (@problem ? problem_submissions_url(@problem) : -1) }, + { class: 'select2 form-control'} + .col-6 + %a.btn.btn-primary.go-button#problem_go{data: {source: '#submission_problem_id'}} Go - if @problem!=nil %h2= "Task: #{@problem.full_name} (#{@problem.name})" diff --git a/app/views/submissions/show.html.haml b/app/views/submissions/show.html.haml --- a/app/views/submissions/show.html.haml +++ b/app/views/submissions/show.html.haml @@ -87,7 +87,7 @@ %td.text-right %strong Compiler result %td - %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}} + %button.btn.btn-info.btn-sm{type: 'button', data: {toggle: 'modal', target: '#compiler'}} view %tr %td.text-right @@ -95,7 +95,7 @@ %td = @task.status_str if @task - if @current_user.admin? - = link_to "rejudge", rejudge_submission_path, data: {remote: true}, class: 'btn btn-info btn-xs' + = link_to "rejudge", rejudge_submission_path, data: {remote: true}, class: 'btn btn-info btn-sm' - if @current_user.has_role?('ta') %tr %td.text-right @@ -108,11 +108,11 @@ - if @submission.tag_model? YES - if @current_user.has_role?('ta') - = link_to "remove model status", set_tag_submission_path(@submission, tag: :default), class: 'btn btn-warning btn-xs' + = link_to "remove model status", set_tag_submission_path(@submission, tag: :default), class: 'btn btn-warning btn-sm' - else No - if @current_user.has_role?('ta') - = link_to "set as model solution", set_tag_submission_path(@submission, tag: :model), class: 'btn btn-success btn-xs' + = link_to "set as model solution", set_tag_submission_path(@submission, tag: :model), class: 'btn btn-success btn-sm' .modal.fade#compiler{tabindex: -1,role: 'dialog'} diff --git a/config/importmap.rb b/config/importmap.rb --- a/config/importmap.rb +++ b/config/importmap.rb @@ -6,7 +6,8 @@ pin "my_sprocket" pin_all_from "app/javascript/controllers", under: "controllers" -pin "jquery", to: 'jquery.js', preload: true +#we don't need jquery in importmap because we use sprocket version +#pin "jquery", to: 'jquery.js', preload: true pin "bootstrap", to: "bootstrap.bundle.min.js", preload: true #no need popper, because bundled already in bootstrap #pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js" diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb deleted file mode 100644 --- a/config/initializers/application_controller_renderer.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# ActiveSupport::Reloader.to_prepare do -# ApplicationController.renderer.defaults.merge!( -# http_host: 'example.org', -# https: false -# ) -# end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb deleted file mode 100644 --- a/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code -# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". -Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -6,20 +6,20 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. -Rails.application.config.action_controller.raise_on_unfiltered_parameters = true +#Rails.application.config.action_controller.raise_on_unfiltered_parameters = true # Enable per-form CSRF tokens. Previous versions had false. -Rails.application.config.action_controller.per_form_csrf_tokens = false +#Rails.application.config.action_controller.per_form_csrf_tokens = false # Enable origin-checking CSRF mitigation. Previous versions had false. -Rails.application.config.action_controller.forgery_protection_origin_check = false +#Rails.application.config.action_controller.forgery_protection_origin_check = false # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. # Previous versions had false. -ActiveSupport.to_time_preserves_timezone = false +#ActiveSupport.to_time_preserves_timezone = false # Require `belongs_to` associations by default. Previous versions had false. -Rails.application.config.active_record.belongs_to_required_by_default = false +#Rails.application.config.active_record.belongs_to_required_by_default = false # Do not halt callback chains when a callback returns false. Previous versions had true. # ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/config/locales/en.yml b/config/locales/en.yml --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -42,10 +42,11 @@ start_soon: "The contest at your site will start soon. Please wait." specified_in_header: "Specified in header" - problem_desc: "desc" - submitted_at: "Submitted at" - graded_at: "Graded at" - score: "score: " + problem_desc: desc + submission_id: Sub ID + submitted_at: Submitted + graded_at: Graded + score: score cmp_msg: "compiler msg" src_link: "src" submissions_link: "submissions" diff --git a/vendor/javascript/jquery.js b/vendor/javascript/jquery.js deleted file mode 100644 --- a/vendor/javascript/jquery.js +++ /dev/null @@ -1,75 +0,0 @@ -var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var t={};(function(e,n){t=e.document?n(e,true):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}})("undefined"!==typeof window?window:t,(function(t,n){var r=[];var i=Object.getPrototypeOf;var o=r.slice;var a=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)};var s=r.push;var u=r.indexOf;var l={};var c=l.toString;var f=l.hasOwnProperty;var d=f.toString;var p=d.call(Object);var h={};var g=function isFunction(e){return"function"===typeof e&&"number"!==typeof e.nodeType&&"function"!==typeof e.item};var m=function isWindow(e){return null!=e&&e===e.window};var v=t.document;var y={type:true,src:true,nonce:true,noModule:true};function DOMEval(e,t,n){n=n||v;var r,i,o=n.createElement("script");o.text=e;if(t)for(r in y){i=t[r]||t.getAttribute&&t.getAttribute(r);i&&o.setAttribute(r,i)}n.head.appendChild(o).parentNode.removeChild(o)}function toType(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?l[c.call(e)]||"object":typeof e}var x="3.6.1",jQuery=function(e,t){return new jQuery.fn.init(e,t)};jQuery.fn=jQuery.prototype={jquery:x,constructor:jQuery,length:0,toArray:function(){return o.call(this||e)},get:function(t){return null==t?o.call(this||e):t<0?(this||e)[t+(this||e).length]:(this||e)[t]},pushStack:function(t){var n=jQuery.merge(this.constructor(),t);n.prevObject=this||e;return n},each:function(t){return jQuery.each(this||e,t)},map:function(t){return this.pushStack(jQuery.map(this||e,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(o.apply(this||e,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(jQuery.grep(this||e,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(jQuery.grep(this||e,(function(e,t){return t%2})))},eq:function(t){var n=(this||e).length,r=+t+(t<0?n:0);return this.pushStack(r>=0&&r0&&t-1 in e)}var b=function(e){var t,n,r,i,o,a,s,u,l,c,f,d,p,h,g,m,v,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,S=createCache(),A=createCache(),E=createCache(),k=createCache(),sortOrder=function(e,t){e===t&&(f=true);return 0},N={}.hasOwnProperty,D=[],j=D.pop,P=D.push,L=D.push,q=D.slice,indexOf=function(e,t){var n=0,r=e.length;for(;n+~]|"+O+")"+O+"*"),$=new RegExp(O+"|>"),_=new RegExp(z),U=new RegExp("^"+M+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,V=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ee=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},unloadHandler=function(){d()},te=addCombinator((function(e){return true===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(D=q.call(w.childNodes),w.childNodes);D[w.childNodes.length].nodeType}catch(e){L={apply:D.length?function(e,t){P.apply(e,q.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function Sizzle(e,t,r,i){var o,s,l,c,f,h,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;r=r||[];if("string"!==typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i){d(t);t=t||p;if(g){if(11!==w&&(f=J.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o){r.push(l);return r}}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o){r.push(l);return r}}else{if(f[2]){L.apply(r,t.getElementsByTagName(e));return r}if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName){L.apply(r,t.getElementsByClassName(o));return r}}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){v=e;y=t;if(1===w&&($.test(e)||B.test(e))){y=K.test(e)&&testContext(t.parentNode)||t;y===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(ee,fcssescape):t.setAttribute("id",c=b));h=a(e);s=h.length;while(s--)h[s]=(c?"#"+c:":scope")+" "+toSelector(h[s]);v=h.join(",")}try{L.apply(r,y.querySelectorAll(v));return r}catch(t){k(e,true)}finally{c===b&&t.removeAttribute("id")}}}}return u(e.replace(R,"$1"),t,r,i)} -/** - * 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 e=[];function cache(t,n){e.push(t+" ")>r.cacheLength&&delete cache[e.shift()];return cache[t+" "]=n}return cache} -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */function markFunction(e){e[b]=true;return e} -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */function assert(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return false}finally{t.parentNode&&t.parentNode.removeChild(t);t=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(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t} -/** - * 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(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1} -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */function createInputPseudo(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}} -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */function createButtonPseudo(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}} -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */function createDisabledPseudo(e){return function(t){return"form"in t?t.parentNode&&false===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}} -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */function createPositionalPseudo(e){return markFunction((function(t){t=+t;return markFunction((function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))} -/** - * 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(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}n=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 - */o=Sizzle.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")}; -/** - * 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 - */d=Sizzle.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;if(a==p||9!==a.nodeType||!a.documentElement)return p;p=a;h=p.documentElement;g=!o(p);w!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",unloadHandler,false):i.attachEvent&&i.attachEvent("onunload",unloadHandler));n.scope=assert((function(e){h.appendChild(e).appendChild(p.createElement("div"));return"undefined"!==typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}));n.attributes=assert((function(e){e.className="i";return!e.getAttribute("className")}));n.getElementsByTagName=assert((function(e){e.appendChild(p.createComment(""));return!e.getElementsByTagName("*").length}));n.getElementsByClassName=Q.test(p.getElementsByClassName);n.getById=assert((function(e){h.appendChild(e).id=b;return!p.getElementsByName||!p.getElementsByName(b).length}));if(n.getById){r.filter.ID=function(e){var t=e.replace(Z,funescape);return function(e){return e.getAttribute("id")===t}};r.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}}else{r.filter.ID=function(e){var t=e.replace(Z,funescape);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}};r.find.ID=function(e,t){if("undefined"!==typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){n=o.getAttributeNode("id");if(n&&n.value===e)return[o];i=t.getElementsByName(e);r=0;while(o=i[r++]){n=o.getAttributeNode("id");if(n&&n.value===e)return[o]}}return[]}}}r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o};r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!==typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)};v=[];m=[];if(n.qsa=Q.test(p.querySelectorAll)){assert((function(e){var t;h.appendChild(e).innerHTML="";e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+O+"*(?:''|\"\")");e.querySelectorAll("[selected]").length||m.push("\\["+O+"*(?:value|"+H+")");e.querySelectorAll("[id~="+b+"-]").length||m.push("~=");t=p.createElement("input");t.setAttribute("name","");e.appendChild(t);e.querySelectorAll("[name='']").length||m.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")");e.querySelectorAll(":checked").length||m.push(":checked");e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]");e.querySelectorAll("\\\f");m.push("[\\r\\n\\f]")}));assert((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");e.querySelectorAll("[name=d]").length&&m.push("name"+O+"*[*^$|!~]?=");2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled");h.appendChild(e).disabled=true;2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled");e.querySelectorAll("*,:x");m.push(",.*:")}))}(n.matchesSelector=Q.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&assert((function(e){n.disconnectedMatch=y.call(e,"*");y.call(e,"[s!='']:x");v.push("!=",z)}));m=m.length&&new RegExp(m.join("|"));v=v.length&&new RegExp(v.join("|"));t=Q.test(h.compareDocumentPosition);x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&1===r.nodeType&&(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return true;return false};sortOrder=t?function(e,t){if(e===t){f=true;return 0}var r=!e.compareDocumentPosition-!t.compareDocumentPosition;if(r)return r;r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1;return 1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==w&&x(w,e)?-1:t==p||t.ownerDocument==w&&x(w,t)?1:c?indexOf(c,e)-indexOf(c,t):0:4&r?-1:1}:function(e,t){if(e===t){f=true;return 0}var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:c?indexOf(c,e)-indexOf(c,t):0;if(i===o)return siblingCheck(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?siblingCheck(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0};return p};Sizzle.matches=function(e,t){return Sizzle(e,null,null,t)};Sizzle.matchesSelector=function(e,t){d(e);if(n.matchesSelector&&g&&!k[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,true)}return Sizzle(t,p,null,[e]).length>0};Sizzle.contains=function(e,t){(e.ownerDocument||e)!=p&&d(e);return x(e,t)};Sizzle.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null};Sizzle.escape=function(e){return(e+"").replace(ee,fcssescape)};Sizzle.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)}; -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */Sizzle.uniqueSort=function(e){var t,r=[],i=0,o=0;f=!n.detectDuplicates;c=!n.sortStable&&e.slice(0);e.sort(sortOrder);if(f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}c=null;return e}; -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */i=Sizzle.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n};r=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(Z,funescape);e[3]=(e[3]||e[4]||e[5]||"").replace(Z,funescape);"~="===e[2]&&(e[3]=" "+e[3]+" ");return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if("nth"===e[1].slice(0,3)){e[3]||Sizzle.error(e[0]);e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3]));e[5]=+(e[7]+e[8]||"odd"===e[3])}else e[3]&&Sizzle.error(e[0]);return e},PSEUDO:function(e){var t,n=!e[6]&&e[2];if(X.CHILD.test(e[0]))return null;if(e[3])e[2]=e[4]||e[5]||"";else if(n&&_.test(n)&&(t=a(n,true))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(Z,funescape).toLowerCase();return"*"===e?function(){return true}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&S(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Sizzle.attr(r,e);if(null==i)return"!="===t;if(!t)return true;i+="";return"="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(I," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-")}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=false;if(m){if(o){while(g){d=t;while(d=d[g])if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return false;h=g="only"===e&&!h&&"nextSibling"}return true}h=[a?m.firstChild:m.lastChild];if(a&&y){d=m;f=d[b]||(d[b]={});c=f[d.uniqueID]||(f[d.uniqueID]={});l=c[e]||[];p=l[0]===T&&l[1];x=p&&l[2];d=p&&m.childNodes[p];while(d=++p&&d&&d[g]||(x=p=0)||h.pop())if(1===d.nodeType&&++x&&d===t){c[e]=[T,p,x];break}}else{if(y){d=t;f=d[b]||(d[b]={});c=f[d.uniqueID]||(f[d.uniqueID]={});l=c[e]||[];p=l[0]===T&&l[1];x=p}if(false===x)while(d=++p&&d&&d[g]||(x=p=0)||h.pop())if((s?d.nodeName.toLowerCase()===v:1===d.nodeType)&&++x){if(y){f=d[b]||(d[b]={});c=f[d.uniqueID]||(f[d.uniqueID]={});c[e]=[T,x]}if(d===t)break}}x-=i;return x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||Sizzle.error("unsupported pseudo: "+e);if(i[b])return i(t);if(i.length>1){n=[e,e,"",t];return r.setFilters.hasOwnProperty(e.toLowerCase())?markFunction((function(e,n){var r,o=i(e,t),a=o.length;while(a--){r=indexOf(e,o[a]);e[r]=!(n[r]=o[a])}})):function(e){return i(e,0,n)}}return i}},pseudos:{not:markFunction((function(e){var t=[],n=[],r=s(e.replace(R,"$1"));return r[b]?markFunction((function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){t[0]=e;r(t,null,o,n);t[0]=null;return!n.pop()}})),has:markFunction((function(e){return function(t){return Sizzle(e,t).length>0}})),contains:markFunction((function(e){e=e.replace(Z,funescape);return function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:markFunction((function(e){U.test(e||"")||Sizzle.error("unsupported lang: "+e);e=e.replace(Z,funescape).toLowerCase();return function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return n===e||0===n.indexOf(e+"-")}}while((t=t.parentNode)&&1===t.nodeType);return false}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return true===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return false;return true},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:createPositionalPseudo((function(){return[0]})),last:createPositionalPseudo((function(e,t){return[t-1]})),eq:createPositionalPseudo((function(e,t,n){return[n<0?n+t:n]})),even:createPositionalPseudo((function(e,t){var n=0;for(;nt?t:n;for(;--r>=0;)e.push(r);return e})),gt:createPositionalPseudo((function(e,t,n){var r=n<0?n+t:n;for(;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return false;return true}:e[0]}function multipleContexts(e,t,n){var r=0,i=t.length;for(;r-1&&(o[l]=!(a[l]=f))}}else{v=condense(v===a?v.splice(h,v.length):v);i?i(null,a,v,u):L.apply(a,v)}}))}function matcherFromTokens(e){var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=addCombinator((function(e){return e===t}),s,true),f=addCombinator((function(e){return indexOf(t,e)>-1}),s,true),d=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));t=null;return i}];for(;u1&&elementMatcher(d),u>1&&toSelector(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(R,"$1"),n,u0,i=e.length>0,superMatcher=function(o,a,s,u,c){var f,h,m,v=0,y="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),S=T+=null==w?1:Math.random()||.1,A=C.length;c&&(l=a==p||a||c);for(;y!==A&&null!=(f=C[y]);y++){if(i&&f){h=0;if(!a&&f.ownerDocument!=p){d(f);s=!g}while(m=e[h++])if(m(f,a||p,s)){u.push(f);break}c&&(T=S)}if(n){(f=!m&&f)&&v--;o&&x.push(f)}}v+=y;if(n&&y!==v){h=0;while(m=t[h++])m(x,b,a,s);if(o){if(v>0)while(y--)x[y]||b[y]||(b[y]=j.call(u));b=condense(b)}L.apply(u,b);c&&!o&&b.length>0&&v+t.length>1&&Sizzle.uniqueSort(u)}if(c){T=S;l=w}return x};return n?markFunction(superMatcher):superMatcher}s=Sizzle.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=a(e));n=t.length;while(n--){o=matcherFromTokens(t[n]);o[b]?r.push(o):i.push(o)}o=E(e,matcherFromGroupMatchers(i,r));o.selector=e}return o}; -/** - * 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 - */u=Sizzle.select=function(e,t,n,i){var o,u,l,c,f,d="function"===typeof e&&e,p=!i&&a(e=d.selector||e);n=n||[];if(1===p.length){u=p[0]=p[0].slice(0);if(u.length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){t=(r.find.ID(l.matches[0].replace(Z,funescape),t)||[])[0];if(!t)return n;d&&(t=t.parentNode);e=e.slice(u.shift().value.length)}o=X.needsContext.test(e)?0:u.length;while(o--){l=u[o];if(r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,funescape),K.test(u[0].type)&&testContext(t.parentNode)||t))){u.splice(o,1);e=i.length&&toSelector(u);if(!e){L.apply(n,i);return n}break}}}(d||s(e,p))(i,t,!g,n,!t||K.test(e)&&testContext(t.parentNode)||t);return n};n.sortStable=b.split("").sort(sortOrder).join("")===b;n.detectDuplicates=!!f;d();n.sortDetached=assert((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}));assert((function(e){e.innerHTML="";return"#"===e.firstChild.getAttribute("href")}))||addHandle("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}));n.attributes&&assert((function(e){e.innerHTML="";e.firstChild.setAttribute("value","");return""===e.firstChild.getAttribute("value")}))||addHandle("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}));assert((function(e){return null==e.getAttribute("disabled")}))||addHandle(H,(function(e,t,n){var r;if(!n)return true===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}));return Sizzle}(t);jQuery.find=b;jQuery.expr=b.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=b.uniqueSort;jQuery.text=b.getText;jQuery.isXMLDoc=b.isXML;jQuery.contains=b.contains;jQuery.escapeSelector=b.escape;var dir=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&jQuery(e).is(n))break;r.push(e)}return r};var siblings=function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n};var w=jQuery.expr.match.needsContext;function nodeName(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(e,t,n){return g(t)?jQuery.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?jQuery.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?jQuery.grep(e,(function(e){return u.call(t,e)>-1!==n})):jQuery.filter(t,e,n)}jQuery.filter=function(e,t,n){var r=t[0];n&&(e=":not("+e+")");return 1===t.length&&1===r.nodeType?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,(function(e){return 1===e.nodeType})))};jQuery.fn.extend({find:function(t){var n,r,i=(this||e).length,o=this||e;if("string"!==typeof t)return this.pushStack(jQuery(t).filter((function(){for(n=0;n1?jQuery.uniqueSort(r):r},filter:function(t){return this.pushStack(winnow(this||e,t||[],false))},not:function(t){return this.pushStack(winnow(this||e,t||[],true))},is:function(t){return!!winnow(this||e,"string"===typeof t&&w.test(t)?jQuery(t):t||[],false).length}});var C,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,A=jQuery.fn.init=function(t,n,r){var i,o;if(!t)return this||e;r=r||C;if("string"===typeof t){i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:S.exec(t);if(!i||!i[1]&&n)return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t);if(i[1]){n=n instanceof jQuery?n[0]:n;jQuery.merge(this||e,jQuery.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:v,true));if(T.test(i[1])&&jQuery.isPlainObject(n))for(i in n)g((this||e)[i])?this[i](n[i]):this.attr(i,n[i]);return this||e}o=v.getElementById(i[2]);if(o){(this||e)[0]=o;(this||e).length=1}return this||e}if(t.nodeType){(this||e)[0]=t;(this||e).length=1;return this||e}return g(t)?void 0!==r.ready?r.ready(t):t(jQuery):jQuery.makeArray(t,this||e)};A.prototype=jQuery.fn;C=jQuery(v);var E=/^(?:parents|prev(?:Until|All))/,k={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(t){var n=jQuery(t,this||e),r=n.length;return this.filter((function(){var t=0;for(;t-1:1===r.nodeType&&jQuery.find.matchesSelector(r,t))){a.push(r);break}return this.pushStack(a.length>1?jQuery.uniqueSort(a):a)},index:function(t){return t?"string"===typeof t?u.call(jQuery(t),(this||e)[0]):u.call(this||e,t.jquery?t[0]:t):(this||e)[0]&&(this||e)[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(t){return this.add(null==t?(this||e).prevObject:(this||e).prevObject.filter(t))}});function sibling(e,t){while((e=e[t])&&1!==e.nodeType);return e}jQuery.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return dir(e,"parentNode")},parentsUntil:function(e,t,n){return dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return dir(e,"nextSibling")},prevAll:function(e){return dir(e,"previousSibling")},nextUntil:function(e,t,n){return dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return dir(e,"previousSibling",n)},siblings:function(e){return siblings((e.parentNode||{}).firstChild,e)},children:function(e){return siblings(e.firstChild)},contents:function(e){if(null!=e.contentDocument&&i(e.contentDocument))return e.contentDocument;nodeName(e,"template")&&(e=e.content||e);return jQuery.merge([],e.childNodes)}},(function(t,n){jQuery.fn[t]=function(r,i){var o=jQuery.map(this||e,n,r);"Until"!==t.slice(-5)&&(i=r);i&&"string"===typeof i&&(o=jQuery.filter(i,o));if((this||e).length>1){k[t]||jQuery.uniqueSort(o);E.test(t)&&o.reverse()}return this.pushStack(o)}}));var N=/[^\x20\t\r\n\f]+/g;function createOptions(e){var t={};jQuery.each(e.match(N)||[],(function(e,n){t[n]=true}));return t}jQuery.Callbacks=function(t){t="string"===typeof t?createOptions(t):jQuery.extend({},t);var n,r,i,o,a=[],s=[],u=-1,fire=function(){o=o||t.once;i=n=true;for(;s.length;u=-1){r=s.shift();while(++u-1){a.splice(n,1);n<=u&&u--}}));return this||e},has:function(e){return e?jQuery.inArray(e,a)>-1:a.length>0},empty:function(){a&&(a=[]);return this||e},disable:function(){o=s=[];a=r="";return this||e},disabled:function(){return!a},lock:function(){o=s=[];r||n||(a=r="");return this||e},locked:function(){return!!o},fireWith:function(t,r){if(!o){r=r||[];r=[t,r.slice?r.slice():r];s.push(r);n||fire()}return this||e},fire:function(){l.fireWith(this||e,arguments);return this||e},fired:function(){return!!i}};return l};function Identity(e){return e}function Thrower(e){throw e}function adoptValue(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}jQuery.extend({Deferred:function(n){var r=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){a.done(arguments).fail(arguments);return this||e},catch:function(e){return o.then(null,e)},pipe:function(){var t=arguments;return jQuery.Deferred((function(n){jQuery.each(r,(function(r,i){var o=g(t[i[4]])&&t[i[4]];a[i[1]]((function(){var t=o&&o.apply(this||e,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this||e,o?[t]:arguments)}))}));t=null})).promise()},then:function(n,i,o){var a=0;function resolve(n,r,i,o){return function(){var s=this||e,u=arguments,mightThrow=function(){var e,t;if(!(n=a){if(i!==Thrower){s=void 0;u=[e]}r.rejectWith(s,u)}}};if(n)l();else{jQuery.Deferred.getStackHook&&(l.stackTrace=jQuery.Deferred.getStackHook());t.setTimeout(l)}}}return jQuery.Deferred((function(e){r[0][3].add(resolve(0,e,g(o)?o:Identity,e.notifyWith));r[1][3].add(resolve(0,e,g(n)?n:Identity));r[2][3].add(resolve(0,e,g(i)?i:Thrower))})).promise()},promise:function(e){return null!=e?jQuery.extend(e,o):o}},a={};jQuery.each(r,(function(t,n){var s=n[2],u=n[5];o[n[1]]=s.add;u&&s.add((function(){i=u}),r[3-t][2].disable,r[3-t][3].disable,r[0][2].lock,r[0][3].lock);s.add(n[3].fire);a[n[0]]=function(){a[n[0]+"With"]((this||e)===a?void 0:this||e,arguments);return this||e};a[n[0]+"With"]=s.fireWith}));o.promise(a);n&&n.call(a,a);return a},when:function(t){var n=arguments.length,r=n,i=Array(r),a=o.call(arguments),s=jQuery.Deferred(),updateFunc=function(t){return function(r){i[t]=this||e;a[t]=arguments.length>1?o.call(arguments):r;--n||s.resolveWith(i,a)}};if(n<=1){adoptValue(t,s.done(updateFunc(r)).resolve,s.reject,!n);if("pending"===s.state()||g(a[r]&&a[r].then))return s.then()}while(r--)adoptValue(a[r],updateFunc(r),s.reject);return s.promise()}});var D=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&D.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)};jQuery.readyException=function(e){t.setTimeout((function(){throw e}))};var j=jQuery.Deferred();jQuery.fn.ready=function(t){j.then(t).catch((function(e){jQuery.readyException(e)}));return this||e};jQuery.extend({isReady:false,readyWait:1,ready:function(e){if(!(true===e?--jQuery.readyWait:jQuery.isReady)){jQuery.isReady=true;true!==e&&--jQuery.readyWait>0||j.resolveWith(v,[jQuery])}}});jQuery.ready.then=j.then;function completed(){v.removeEventListener("DOMContentLoaded",completed);t.removeEventListener("load",completed);jQuery.ready()}if("complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll)t.setTimeout(jQuery.ready);else{v.addEventListener("DOMContentLoaded",completed);t.addEventListener("load",completed)}var access=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===toType(n)){i=true;for(s in n)access(e,t,s,n[s],true,o,a)}else if(void 0!==r){i=true;g(r)||(a=true);if(l)if(a){t.call(e,r);t=null}else{l=t;t=function(e,t,n){return l.call(jQuery(e),n)}}if(t)for(;s1,null,true)},removeData:function(t){return this.each((function(){H.remove(this||e,t)}))}});jQuery.extend({queue:function(e,t,n){var r;if(e){t=(t||"fx")+"queue";r=q.get(e,t);n&&(!r||Array.isArray(n)?r=q.access(e,t,jQuery.makeArray(n)):r.push(n));return r||[]}},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),o=jQuery._queueHooks(e,t),next=function(){jQuery.dequeue(e,t)};if("inprogress"===i){i=n.shift();r--}if(i){"fx"===t&&n.unshift("inprogress");delete o.stop;i.call(e,next,o)}!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:jQuery.Callbacks("once memory").add((function(){q.remove(e,[t+"queue",n])}))})}});jQuery.fn.extend({queue:function(t,n){var r=2;if("string"!==typeof t){n=t;t="fx";r--}return arguments.length\x20\t\r\n\f]*)/i;var U=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=v.createDocumentFragment(),t=e.appendChild(v.createElement("div")),n=v.createElement("input");n.setAttribute("type","radio");n.setAttribute("checked","checked");n.setAttribute("name","t");t.appendChild(n);h.checkClone=t.cloneNode(true).cloneNode(true).lastChild.checked;t.innerHTML="";h.noCloneChecked=!!t.cloneNode(true).lastChild.defaultValue;t.innerHTML="";h.option=!!t.lastChild})();var X={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};X.tbody=X.tfoot=X.colgroup=X.caption=X.thead;X.th=X.td;h.option||(X.optgroup=X.option=[1,""]);function getAll(e,t){var n;n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&nodeName(e,t)?jQuery.merge([e],n):n}function setGlobalEval(e,t){var n=0,r=e.length;for(;n-1)i&&i.push(o);else{l=isAttached(o);a=getAll(f.appendChild(o),"script");l&&setGlobalEval(a);if(n){c=0;while(o=a[c++])U.test(o.type||"")&&n.push(o)}}return f}var V=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function expectSync(e,t){return e===safeActiveElement()===("focus"===t)}function safeActiveElement(){try{return v.activeElement}catch(e){}}function on(t,n,r,i,o,a){var s,u;if("object"===typeof n){if("string"!==typeof r){i=i||r;r=void 0}for(u in n)on(t,u,r,i,n[u],a);return t}if(null==i&&null==o){o=r;i=r=void 0}else if(null==o)if("string"===typeof r){o=i;i=void 0}else{o=i;i=r;r=void 0}if(false===o)o=returnFalse;else if(!o)return t;if(1===a){s=o;o=function(t){jQuery().off(t);return s.apply(this||e,arguments)};o.guid=s.guid||(s.guid=jQuery.guid++)}return t.each((function(){jQuery.event.add(this||e,n,o,i,r)}))}jQuery.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=q.get(e);if(acceptData(e)){if(n.handler){o=n;n=o.handler;i=o.selector}i&&jQuery.find.matchesSelector(R,i);n.guid||(n.guid=jQuery.guid++);(u=m.events)||(u=m.events=Object.create(null));(a=m.handle)||(a=m.handle=function(t){return"undefined"!==typeof jQuery&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):void 0});t=(t||"").match(N)||[""];l=t.length;while(l--){s=V.exec(t[l])||[];p=g=s[1];h=(s[2]||"").split(".").sort();if(p){f=jQuery.event.special[p]||{};p=(i?f.delegateType:f.bindType)||p;f=jQuery.event.special[p]||{};c=jQuery.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:h.join(".")},o);if(!(d=u[p])){d=u[p]=[];d.delegateCount=0;f.setup&&false!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)}if(f.add){f.add.call(e,c);c.handler.guid||(c.handler.guid=n.guid)}i?d.splice(d.delegateCount++,0,c):d.push(c);jQuery.event.global[p]=true}}}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(N)||[""];l=t.length;while(l--){s=V.exec(t[l])||[];p=g=s[1];h=(s[2]||"").split(".").sort();if(p){f=jQuery.event.special[p]||{};p=(r?f.delegateType:f.bindType)||p;d=u[p]||[];s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)");a=o=d.length;while(o--){c=d[o];if((i||g===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!r||r===c.selector||"**"===r&&c.selector)){d.splice(o,1);c.selector&&d.delegateCount--;f.remove&&f.remove.call(e,c)}}if(a&&!d.length){f.teardown&&false!==f.teardown.call(e,h,m.handle)||jQuery.removeEvent(e,p,m.handle);delete u[p]}}else for(p in u)jQuery.event.remove(e,p+t[l],n,r,true)}jQuery.isEmptyObject(u)&&q.remove(e,"handle events")}},dispatch:function(t){var n,r,i,o,a,s,u=new Array(arguments.length),l=jQuery.event.fix(t),c=(q.get(this||e,"events")||Object.create(null))[l.type]||[],f=jQuery.event.special[l.type]||{};u[0]=l;for(n=1;n=1))for(;c!==(this||e);c=c.parentNode||this||e)if(1===c.nodeType&&!("click"===t.type&&true===c.disabled)){a=[];s={};for(r=0;r-1:jQuery.find(o,this||e,null,[c]).length);s[o]&&a.push(i)}a.length&&u.push({elem:c,handlers:a})}c=this||e;l\s*$/g;function manipulationTarget(e,t){return nodeName(e,"table")&&nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&jQuery(e).children("tbody")[0]||e}function disableScript(e){e.type=(null!==e.getAttribute("type"))+"/"+e.type;return e}function restoreScript(e){"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type");return e}function cloneCopyEvent(e,t){var n,r,i,o,a,s,u;if(1===t.nodeType){if(q.hasData(e)){o=q.get(e);u=o.events;if(u){q.remove(t,"handle events");for(i in u)for(n=0,r=u[i].length;n1&&"string"===typeof v&&!h.checkClone&&Q.test(v))return t.each((function(o){var a=t.eq(o);y&&(n[0]=v.call(this||e,o,a.html()));domManip(a,n,r,i)}));if(p){o=buildFragment(n,t[0].ownerDocument,false,t,i);s=o.firstChild;1===o.childNodes.length&&(o=s);if(s||i){u=jQuery.map(getAll(o,"script"),disableScript);l=u.length;for(;d0&&setGlobalEval(a,!u&&getAll(e,"script"));return s},cleanData:function(e){var t,n,r,i=jQuery.event.special,o=0;for(;void 0!==(n=e[o]);o++)if(acceptData(n)){if(t=n[q.expando]){if(t.events)for(r in t.events)i[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);n[q.expando]=void 0}n[H.expando]&&(n[H.expando]=void 0)}}});jQuery.fn.extend({detach:function(t){return remove(this||e,t,true)},remove:function(t){return remove(this||e,t)},text:function(t){return access(this||e,(function(t){return void 0===t?jQuery.text(this||e):this.empty().each((function(){1!==(this||e).nodeType&&11!==(this||e).nodeType&&9!==(this||e).nodeType||((this||e).textContent=t)}))}),null,t,arguments.length)},append:function(){return domManip(this||e,arguments,(function(t){if(1===(this||e).nodeType||11===(this||e).nodeType||9===(this||e).nodeType){var n=manipulationTarget(this||e,t);n.appendChild(t)}}))},prepend:function(){return domManip(this||e,arguments,(function(t){if(1===(this||e).nodeType||11===(this||e).nodeType||9===(this||e).nodeType){var n=manipulationTarget(this||e,t);n.insertBefore(t,n.firstChild)}}))},before:function(){return domManip(this||e,arguments,(function(t){(this||e).parentNode&&(this||e).parentNode.insertBefore(t,this||e)}))},after:function(){return domManip(this||e,arguments,(function(t){(this||e).parentNode&&(this||e).parentNode.insertBefore(t,(this||e).nextSibling)}))},empty:function(){var t,n=0;for(;null!=(t=(this||e)[n]);n++)if(1===t.nodeType){jQuery.cleanData(getAll(t,false));t.textContent=""}return this||e},clone:function(t,n){t=null!=t&&t;n=null==n?t:n;return this.map((function(){return jQuery.clone(this||e,t,n)}))},html:function(t){return access(this||e,(function(t){var n=(this||e)[0]||{},r=0,i=(this||e).length;if(void 0===t&&1===n.nodeType)return n.innerHTML;if("string"===typeof t&&!Y.test(t)&&!X[(_.exec(t)||["",""])[1].toLowerCase()]){t=jQuery.htmlPrefilter(t);try{for(;r=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0);return u}function getWidthOrHeight(e,t,n){var r=getStyles(e),i=!h.boxSizingReliable()||n,o=i&&"border-box"===jQuery.css(e,"boxSizing",false,r),a=o,s=curCSS(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(K.test(s)){if(!n)return s;s="auto"}if((!h.boxSizingReliable()&&o||!h.reliableTrDimensions()&&nodeName(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===jQuery.css(e,"display",false,r))&&e.getClientRects().length){o="border-box"===jQuery.css(e,"boxSizing",false,r);a=u in e;a&&(s=e[u])}s=parseFloat(s)||0;return s+boxModelAdjustment(e,t,n||(o?"border":"content"),a,r,s)+"px"}jQuery.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=curCSS(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:true,columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=camelCase(t),u=Z.test(t),l=e.style;u||(t=finalPropName(s));a=jQuery.cssHooks[t]||jQuery.cssHooks[s];if(void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,false,r))?i:l[t];o=typeof n;if("string"===o&&(i=z.exec(n))&&i[1]){n=adjustCSS(e,t,i);o="number"}if(null!=n&&n===n){"number"!==o||u||(n+=i&&i[3]||(jQuery.cssNumber[s]?"":"px"));h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit");a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n)}}},css:function(e,t,n,r){var i,o,a,s=camelCase(t),u=Z.test(t);u||(t=finalPropName(s));a=jQuery.cssHooks[t]||jQuery.cssHooks[s];a&&"get"in a&&(i=a.get(e,true,n));void 0===i&&(i=curCSS(e,t,r));"normal"===i&&t in ue&&(i=ue[t]);if(""===n||n){o=parseFloat(i);return true===n||isFinite(o)?o||0:i}return i}});jQuery.each(["height","width"],(function(e,t){jQuery.cssHooks[t]={get:function(e,n,r){if(n)return!ae.test(jQuery.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?getWidthOrHeight(e,t,r):swap(e,se,(function(){return getWidthOrHeight(e,t,r)}))},set:function(e,n,r){var i,o=getStyles(e),a=!h.scrollboxSize()&&"absolute"===o.position,s=a||r,u=s&&"border-box"===jQuery.css(e,"boxSizing",false,o),l=r?boxModelAdjustment(e,t,r,u,o):0;u&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-boxModelAdjustment(e,t,"border",false,o)-.5));if(l&&(i=z.exec(n))&&"px"!==(i[3]||"px")){e.style[t]=n;n=jQuery.css(e,t)}return setPositiveNumber(e,n,l)}}}));jQuery.cssHooks.marginLeft=addGetHookIf(h.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(curCSS(e,"marginLeft"))||e.getBoundingClientRect().left-swap(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"}));jQuery.each({margin:"",padding:"",border:"Width"},(function(e,t){jQuery.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"===typeof n?n.split(" "):[n];for(;r<4;r++)i[e+I[r]+t]=o[r]||o[r-2]||o[0];return i}};"margin"!==e&&(jQuery.cssHooks[e+t].set=setPositiveNumber)}));jQuery.fn.extend({css:function(t,n){return access(this||e,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){r=getStyles(e);i=t.length;for(;a1)}});function Tween(e,t,n,r,i){return new Tween.prototype.init(e,t,n,r,i)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(t,n,r,i,o,a){(this||e).elem=t;(this||e).prop=r;(this||e).easing=o||jQuery.easing._default;(this||e).options=n;(this||e).start=(this||e).now=this.cur();(this||e).end=i;(this||e).unit=a||(jQuery.cssNumber[r]?"":"px")},cur:function(){var t=Tween.propHooks[(this||e).prop];return t&&t.get?t.get(this||e):Tween.propHooks._default.get(this||e)},run:function(t){var n,r=Tween.propHooks[(this||e).prop];(this||e).options.duration?(this||e).pos=n=jQuery.easing[(this||e).easing](t,(this||e).options.duration*t,0,1,(this||e).options.duration):(this||e).pos=n=t;(this||e).now=((this||e).end-(this||e).start)*n+(this||e).start;(this||e).options.step&&(this||e).options.step.call((this||e).elem,(this||e).now,this||e);r&&r.set?r.set(this||e):Tween.propHooks._default.set(this||e);return this||e}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(e){var t;if(1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop])return e.elem[e.prop];t=jQuery.css(e.elem,e.prop,"");return t&&"auto"!==t?t:0},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):1!==e.elem.nodeType||!jQuery.cssHooks[e.prop]&&null==e.elem.style[finalPropName(e.prop)]?e.elem[e.prop]=e.now:jQuery.style(e.elem,e.prop,e.now+e.unit)}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}};jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var le,ce,fe=/^(?:toggle|show|hide)$/,de=/queueHooks$/;function schedule(){if(ce){false===v.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(schedule):t.setTimeout(schedule,jQuery.fx.interval);jQuery.fx.tick()}}function createFxNow(){t.setTimeout((function(){le=void 0}));return le=Date.now()}function genFx(e,t){var n,r=0,i={height:e};t=t?1:0;for(;r<4;r+=2-t){n=I[r];i["margin"+n]=i["padding"+n]=e}t&&(i.opacity=i.width=e);return i}function createTween(e,t,n){var r,i=(Animation.tweeners[t]||[]).concat(Animation.tweeners["*"]),o=0,a=i.length;for(;o1)},removeAttr:function(t){return this.each((function(){jQuery.removeAttr(this||e,t)}))}});jQuery.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if("undefined"===typeof e.getAttribute)return jQuery.prop(e,t,n);1===o&&jQuery.isXMLDoc(e)||(i=jQuery.attrHooks[t.toLowerCase()]||(jQuery.expr.match.bool.test(t)?pe:void 0));if(void 0!==n){if(null===n){jQuery.removeAttr(e,t);return}if(i&&"set"in i&&void 0!==(r=i.set(e,n,t)))return r;e.setAttribute(t,n+"");return n}if(i&&"get"in i&&null!==(r=i.get(e,t)))return r;r=jQuery.find.attr(e,t);return null==r?void 0:r}},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);n&&(e.value=n);return t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(N);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}});pe={set:function(e,t,n){false===t?jQuery.removeAttr(e,n):e.setAttribute(n,n);return n}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=he[t]||jQuery.find.attr;he[t]=function(e,t,r){var i,o,a=t.toLowerCase();if(!r){o=he[a];he[a]=i;i=null!=n(e,t,r)?a:null;he[a]=o}return i}}));var ge=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(t,n){return access(this||e,jQuery.prop,t,n,arguments.length>1)},removeProp:function(t){return this.each((function(){delete(this||e)[jQuery.propFix[t]||t]}))}});jQuery.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(1!==o||!jQuery.isXMLDoc(e)){t=jQuery.propFix[t]||t;i=jQuery.propHooks[t]}return void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]}},propHooks:{tabIndex:{get:function(e){var t=jQuery.find.attr(e,"tabindex");return t?parseInt(t,10):ge.test(e.nodeName)||me.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}});h.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;t&&t.parentNode&&t.parentNode.selectedIndex;return null},set:function(e){var t=e.parentNode;if(t){t.selectedIndex;t.parentNode&&t.parentNode.selectedIndex}}});jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){jQuery.propFix[this.toLowerCase()]=this||e}));function stripAndCollapse(e){var t=e.match(N)||[];return t.join(" ")}function getClass(e){return e.getAttribute&&e.getAttribute("class")||""}function classesToArray(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(N)||[]}jQuery.fn.extend({addClass:function(t){var n,r,i,o,a,s;if(g(t))return this.each((function(n){jQuery(this||e).addClass(t.call(this||e,n,getClass(this||e)))}));n=classesToArray(t);return n.length?this.each((function(){i=getClass(this||e);r=1===(this||e).nodeType&&" "+stripAndCollapse(i)+" ";if(r){for(a=0;a-1)r=r.replace(" "+o+" "," ")}s=stripAndCollapse(r);i!==s&&this.setAttribute("class",s)}})):this||e},toggleClass:function(t,n){var r,i,o,a,s=typeof t,u="string"===s||Array.isArray(t);if(g(t))return this.each((function(r){jQuery(this||e).toggleClass(t.call(this||e,r,getClass(this||e),n),n)}));if("boolean"===typeof n&&u)return n?this.addClass(t):this.removeClass(t);r=classesToArray(t);return this.each((function(){if(u){a=jQuery(this||e);for(o=0;o-1)return true;return false}});var ve=/\r/g;jQuery.fn.extend({val:function(t){var n,r,i,o=(this||e)[0];if(arguments.length){i=g(t);return this.each((function(r){var o;if(1===(this||e).nodeType){o=i?t.call(this||e,r,jQuery(this||e).val()):t;null==o?o="":"number"===typeof o?o+="":Array.isArray(o)&&(o=jQuery.map(o,(function(e){return null==e?"":e+""})));n=jQuery.valHooks[(this||e).type]||jQuery.valHooks[(this||e).nodeName.toLowerCase()];n&&"set"in n&&void 0!==n.set(this||e,o,"value")||((this||e).value=o)}}))}if(o){n=jQuery.valHooks[o.type]||jQuery.valHooks[o.nodeName.toLowerCase()];if(n&&"get"in n&&void 0!==(r=n.get(o,"value")))return r;r=o.value;return"string"===typeof r?r.replace(ve,""):null==r?"":r}}});jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return null!=t?t:stripAndCollapse(jQuery.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;r=o<0?u:a?o:0;for(;r-1)&&(n=true)}n||(e.selectedIndex=-1);return o}}}});jQuery.each(["radio","checkbox"],(function(){jQuery.valHooks[this||e]={set:function(e,t){if(Array.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>-1}};h.checkOn||(jQuery.valHooks[this||e].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));h.focusin="onfocusin"in t;var ye=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(e,n,r,i){var o,a,s,u,l,c,d,p,h=[r||v],y=f.call(e,"type")?e.type:e,x=f.call(e,"namespace")?e.namespace.split("."):[];a=p=s=r=r||v;if(3!==r.nodeType&&8!==r.nodeType&&!ye.test(y+jQuery.event.triggered)){if(y.indexOf(".")>-1){x=y.split(".");y=x.shift();x.sort()}l=y.indexOf(":")<0&&"on"+y;e=e[jQuery.expando]?e:new jQuery.Event(y,"object"===typeof e&&e);e.isTrigger=i?2:3;e.namespace=x.join(".");e.rnamespace=e.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;e.result=void 0;e.target||(e.target=r);n=null==n?[e]:jQuery.makeArray(n,[e]);d=jQuery.event.special[y]||{};if(i||!d.trigger||false!==d.trigger.apply(r,n)){if(!i&&!d.noBubble&&!m(r)){u=d.delegateType||y;ye.test(u+y)||(a=a.parentNode);for(;a;a=a.parentNode){h.push(a);s=a}s===(r.ownerDocument||v)&&h.push(s.defaultView||s.parentWindow||t)}o=0;while((a=h[o++])&&!e.isPropagationStopped()){p=a;e.type=o>1?u:d.bindType||y;c=(q.get(a,"events")||Object.create(null))[e.type]&&q.get(a,"handle");c&&c.apply(a,n);c=l&&a[l];if(c&&c.apply&&acceptData(a)){e.result=c.apply(a,n);false===e.result&&e.preventDefault()}}e.type=y;if(!i&&!e.isDefaultPrevented()&&(!d._default||false===d._default.apply(h.pop(),n))&&acceptData(r)&&l&&g(r[y])&&!m(r)){s=r[l];s&&(r[l]=null);jQuery.event.triggered=y;e.isPropagationStopped()&&p.addEventListener(y,stopPropagationCallback);r[y]();e.isPropagationStopped()&&p.removeEventListener(y,stopPropagationCallback);jQuery.event.triggered=void 0;s&&(r[l]=s)}return e.result}}},simulate:function(e,t,n){var r=jQuery.extend(new jQuery.Event,n,{type:e,isSimulated:true});jQuery.event.trigger(r,null,t)}});jQuery.fn.extend({trigger:function(t,n){return this.each((function(){jQuery.event.trigger(t,n,this||e)}))},triggerHandler:function(t,n){var r=(this||e)[0];if(r)return jQuery.event.trigger(t,n,r,true)}});h.focusin||jQuery.each({focus:"focusin",blur:"focusout"},(function(t,n){var handler=function(e){jQuery.event.simulate(n,e.target,jQuery.event.fix(e))};jQuery.event.special[n]={setup:function(){var r=(this||e).ownerDocument||(this||e).document||this||e,i=q.access(r,n);i||r.addEventListener(t,handler,true);q.access(r,n,(i||0)+1)},teardown:function(){var r=(this||e).ownerDocument||(this||e).document||this||e,i=q.access(r,n)-1;if(i)q.access(r,n,i);else{r.removeEventListener(t,handler,true);q.remove(r,n)}}}}));var xe=t.location;var be={guid:Date.now()};var we=/\?/;jQuery.parseXML=function(e){var n,r;if(!e||"string"!==typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(e){}r=n&&n.getElementsByTagName("parsererror")[0];n&&!r||jQuery.error("Invalid XML: "+(r?jQuery.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e));return n};var Te=/\[\]$/,Ce=/\r?\n/g,Se=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;function buildParams(e,t,n,r){var i;if(Array.isArray(t))jQuery.each(t,(function(t,i){n||Te.test(e)?r(e,i):buildParams(e+"["+("object"===typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==toType(t))r(e,t);else for(i in t)buildParams(e+"["+i+"]",t[i],n,r)}jQuery.param=function(t,n){var r,i=[],add=function(e,t){var n=g(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!jQuery.isPlainObject(t))jQuery.each(t,(function(){add((this||e).name,(this||e).value)}));else for(r in t)buildParams(r,t[r],n,add);return i.join("&")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=jQuery.prop(this||e,"elements");return t?jQuery.makeArray(t):this||e})).filter((function(){var t=(this||e).type;return(this||e).name&&!jQuery(this||e).is(":disabled")&&Ae.test((this||e).nodeName)&&!Se.test(t)&&((this||e).checked||!$.test(t))})).map((function(t,n){var r=jQuery(this||e).val();return null==r?null:Array.isArray(r)?jQuery.map(r,(function(e){return{name:n.name,value:e.replace(Ce,"\r\n")}})):{name:n.name,value:r.replace(Ce,"\r\n")}})).get()}});var Ee=/%20/g,ke=/#.*$/,Ne=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,je=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Pe=/^(?:GET|HEAD)$/,Le=/^\/\//,qe={},He={},Oe="*/".concat("*"),Me=v.createElement("a");Me.href=xe.href;function addToPrefiltersOrTransports(e){return function(t,n){if("string"!==typeof t){n=t;t="*"}var r,i=0,o=t.toLowerCase().match(N)||[];if(g(n))while(r=o[i++])if("+"===r[0]){r=r.slice(1)||"*";(e[r]=e[r]||[]).unshift(n)}else(e[r]=e[r]||[]).push(n)}}function inspectPrefiltersOrTransports(e,t,n,r){var i={},o=e===He;function inspect(a){var s;i[a]=true;jQuery.each(e[a]||[],(function(e,a){var u=a(t,n,r);if("string"===typeof u&&!o&&!i[u]){t.dataTypes.unshift(u);inspect(u);return false}if(o)return!(s=u)}));return s}return inspect(t.dataTypes[0])||!i["*"]&&inspect("*")}function ajaxExtend(e,t){var n,r,i=jQuery.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);r&&jQuery.extend(true,e,r);return e}function ajaxHandleResponses(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0]){u.shift();void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"))}if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o){o!==u[0]&&u.unshift(o);return n[o]}}function ajaxConvert(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o){e.responseFields[o]&&(n[e.responseFields[o]]=t);!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType));u=o;o=c.shift();if(o)if("*"===o)o=u;else if("*"!==u&&u!==o){a=l[u+" "+o]||l["* "+o];if(!a)for(i in l){s=i.split(" ");if(s[1]===o){a=l[u+" "+s[0]]||l["* "+s[0]];if(a){if(true===a)a=l[i];else if(true!==l[i]){o=s[0];c.unshift(s[1])}break}}}if(true!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}}return{state:"success",data:t}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:je.test(xe.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Oe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(qe),ajaxTransport:addToPrefiltersOrTransports(He),ajax:function(n,r){if("object"===typeof n){r=n;n=void 0}r=r||{};var i,o,a,s,u,l,c,f,d,p,h=jQuery.ajaxSetup({},r),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?jQuery(g):jQuery.event,y=jQuery.Deferred(),x=jQuery.Callbacks("once memory"),b=h.statusCode||{},w={},T={},C="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=De.exec(a))s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,n){if(null==c){t=T[t.toLowerCase()]=T[t.toLowerCase()]||t;w[t]=n}return this||e},overrideMimeType:function(t){null==c&&(h.mimeType=t);return this||e},statusCode:function(t){var n;if(t)if(c)S.always(t[S.status]);else for(n in t)b[n]=[b[n],t[n]];return this||e},abort:function(t){var n=t||C;i&&i.abort(n);done(0,n);return this||e}};y.promise(S);h.url=((n||h.url||xe.href)+"").replace(Le,xe.protocol+"//");h.type=r.method||r.type||h.method||h.type;h.dataTypes=(h.dataType||"*").toLowerCase().match(N)||[""];if(null==h.crossDomain){l=v.createElement("a");try{l.href=h.url;l.href=l.href;h.crossDomain=Me.protocol+"//"+Me.host!==l.protocol+"//"+l.host}catch(e){h.crossDomain=true}}h.data&&h.processData&&"string"!==typeof h.data&&(h.data=jQuery.param(h.data,h.traditional));inspectPrefiltersOrTransports(qe,h,r,S);if(c)return S;f=jQuery.event&&h.global;f&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart");h.type=h.type.toUpperCase();h.hasContent=!Pe.test(h.type);o=h.url.replace(ke,"");if(h.hasContent)h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ee,"+"));else{p=h.url.slice(o.length);if(h.data&&(h.processData||"string"===typeof h.data)){o+=(we.test(o)?"&":"?")+h.data;delete h.data}if(false===h.cache){o=o.replace(Ne,"$1");p=(we.test(o)?"&":"?")+"_="+be.guid+++p}h.url=o+p}if(h.ifModified){jQuery.lastModified[o]&&S.setRequestHeader("If-Modified-Since",jQuery.lastModified[o]);jQuery.etag[o]&&S.setRequestHeader("If-None-Match",jQuery.etag[o])}(h.data&&h.hasContent&&false!==h.contentType||r.contentType)&&S.setRequestHeader("Content-Type",h.contentType);S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Oe+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(false===h.beforeSend.call(g,S,h)||c))return S.abort();C="abort";x.add(h.complete);S.done(h.success);S.fail(h.error);i=inspectPrefiltersOrTransports(He,h,r,S);if(i){S.readyState=1;f&&m.trigger("ajaxSend",[S,h]);if(c)return S;h.async&&h.timeout>0&&(u=t.setTimeout((function(){S.abort("timeout")}),h.timeout));try{c=false;i.send(w,done)}catch(e){if(c)throw e;done(-1,e)}}else done(-1,"No Transport");function done(e,n,r,s){var l,d,p,v,w,T=n;if(!c){c=true;u&&t.clearTimeout(u);i=void 0;a=s||"";S.readyState=e>0?4:0;l=e>=200&&e<300||304===e;r&&(v=ajaxHandleResponses(h,S,r));!l&&jQuery.inArray("script",h.dataTypes)>-1&&jQuery.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){});v=ajaxConvert(h,v,S,l);if(l){if(h.ifModified){w=S.getResponseHeader("Last-Modified");w&&(jQuery.lastModified[o]=w);w=S.getResponseHeader("etag");w&&(jQuery.etag[o]=w)}if(204===e||"HEAD"===h.type)T="nocontent";else if(304===e)T="notmodified";else{T=v.state;d=v.data;p=v.error;l=!p}}else{p=T;if(e||!T){T="error";e<0&&(e=0)}}S.status=e;S.statusText=(n||T)+"";l?y.resolveWith(g,[d,T,S]):y.rejectWith(g,[S,T,p]);S.statusCode(b);b=void 0;f&&m.trigger(l?"ajaxSuccess":"ajaxError",[S,h,l?d:p]);x.fireWith(g,[S,T]);if(f){m.trigger("ajaxComplete",[S,h]);--jQuery.active||jQuery.event.trigger("ajaxStop")}}}return S},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,void 0,t,"script")}});jQuery.each(["get","post"],(function(e,t){jQuery[t]=function(e,n,r,i){if(g(n)){i=i||r;r=n;n=void 0}return jQuery.ajax(jQuery.extend({url:e,type:t,dataType:i,data:n,success:r},jQuery.isPlainObject(e)&&e))}}));jQuery.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}));jQuery._evalUrl=function(e,t,n){return jQuery.ajax({url:e,type:"GET",dataType:"script",cache:true,async:false,global:false,converters:{"text script":function(){}},dataFilter:function(e){jQuery.globalEval(e,t,n)}})};jQuery.fn.extend({wrapAll:function(t){var n;if((this||e)[0]){g(t)&&(t=t.call((this||e)[0]));n=jQuery(t,(this||e)[0].ownerDocument).eq(0).clone(true);(this||e)[0].parentNode&&n.insertBefore((this||e)[0]);n.map((function(){var t=this||e;while(t.firstElementChild)t=t.firstElementChild;return t})).append(this||e)}return this||e},wrapInner:function(t){return g(t)?this.each((function(n){jQuery(this||e).wrapInner(t.call(this||e,n))})):this.each((function(){var n=jQuery(this||e),r=n.contents();r.length?r.wrapAll(t):n.append(t)}))},wrap:function(t){var n=g(t);return this.each((function(r){jQuery(this||e).wrapAll(n?t.call(this||e,r):t)}))},unwrap:function(t){this.parent(t).not("body").each((function(){jQuery(this||e).replaceWith((this||e).childNodes)}));return this||e}});jQuery.expr.pseudos.hidden=function(e){return!jQuery.expr.pseudos.visible(e)};jQuery.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};jQuery.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Fe={0:200,1223:204},ze=jQuery.ajaxSettings.xhr();h.cors=!!ze&&"withCredentials"in ze;h.ajax=ze=!!ze;jQuery.ajaxTransport((function(e){var n,r;if(h.cors||ze&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();s.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType);e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){if(n){n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null;"abort"===e?s.abort():"error"===e?"number"!==typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Fe[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!==typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders())}}};s.onload=n();r=s.onerror=s.ontimeout=n("error");void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&t.setTimeout((function(){n&&r()}))};n=n("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}));jQuery.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=false)}));jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){jQuery.globalEval(e);return e}}});jQuery.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=false);e.crossDomain&&(e.type="GET")}));jQuery.ajaxTransport("script",(function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,i){t=jQuery("