New Fauxton Build.
Added Ace Editor files to Makefile.am
Updated settings.json.default to have the correct release root
diff --git a/fauxton/css/index.css b/fauxton/css/index.css
index 6e2c48a..16bf698 100644
--- a/fauxton/css/index.css
+++ b/fauxton/css/index.css
@@ -1,4 +1,4 @@
-.task-tabs li{cursor:pointer}table.active-tasks{font-size:16px}.menuDropdown{display:none}/*!
+.task-tabs li{cursor:pointer}table.active-tasks{font-size:16px}.menuDropdown{display:none}.compaction-option{background-color:#F7F7F7;border:1px solid #DDD;margin-bottom:30px;padding:10px}table.config #config-trash{width:5%}table.config #delete-value{text-align:center}button#add-section{float:right}/*!
  *
  * Fauxton less style files
  *
@@ -34,4 +34,4 @@
  *  Email: dave@fontawesome.io
  *  Twitter: http://twitter.com/davegandy
  *  Work: Lead Product Designer @ Kyruus - http://kyruus.com
- */ @font-face{font-family:FontAwesome;src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?v=3.2.1);src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?#iefix&v=3.2.1) format('embedded-opentype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.woff?v=3.2.1) format('woff'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.ttf?v=3.2.1) format('truetype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^=icon-]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^=icon-],a [class*=" icon-"]{display:inline}[class^=icon-].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:.2857142857142857em}[class^=icon-].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em}.icons-ul{margin-left:2.142857142857143em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit}[class^=icon-].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^=icon-].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^=icon-].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}[class^=icon-],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^=icon-].icon-large,.nav [class^=icon-].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].icon-spin,.nav [class^=icon-].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^=icon-],.nav-pills [class^=icon-],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^=icon-].icon-large,.nav-pills [class^=icon-].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^=icon-].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^=icon-].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^=icon-].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^=icon-].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^=icon-],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{line-height:inherit}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^=icon-],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em}.icon-stack .icon-stack-base{font-size:2em;*line-height:1em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope-alt:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-power-off:before,.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-gear:before,.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file-alt:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-rotate-right:before,.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-gears:before,.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up-alt:before{content:"\f087"}.icon-thumbs-down-alt:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-unchecked:before,.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-rotate-left:before,.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-text-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-mail-reply:before,.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"}.icon-compass:before{content:"\f14e"}.icon-collapse:before{content:"\f150"}.icon-collapse-top:before{content:"\f151"}.icon-expand:before{content:"\f152"}.icon-euro:before,.icon-eur:before{content:"\f153"}.icon-gbp:before{content:"\f154"}.icon-dollar:before,.icon-usd:before{content:"\f155"}.icon-rupee:before,.icon-inr:before{content:"\f156"}.icon-yen:before,.icon-jpy:before{content:"\f157"}.icon-renminbi:before,.icon-cny:before{content:"\f158"}.icon-won:before,.icon-krw:before{content:"\f159"}.icon-bitcoin:before,.icon-btc:before{content:"\f15a"}.icon-file:before{content:"\f15b"}.icon-file-text:before{content:"\f15c"}.icon-sort-by-alphabet:before{content:"\f15d"}.icon-sort-by-alphabet-alt:before{content:"\f15e"}.icon-sort-by-attributes:before{content:"\f160"}.icon-sort-by-attributes-alt:before{content:"\f161"}.icon-sort-by-order:before{content:"\f162"}.icon-sort-by-order-alt:before{content:"\f163"}.icon-thumbs-up:before{content:"\f164"}.icon-thumbs-down:before{content:"\f165"}.icon-youtube-sign:before{content:"\f166"}.icon-youtube:before{content:"\f167"}.icon-xing:before{content:"\f168"}.icon-xing-sign:before{content:"\f169"}.icon-youtube-play:before{content:"\f16a"}.icon-dropbox:before{content:"\f16b"}.icon-stackexchange:before{content:"\f16c"}.icon-instagram:before{content:"\f16d"}.icon-flickr:before{content:"\f16e"}.icon-adn:before{content:"\f170"}.icon-bitbucket:before{content:"\f171"}.icon-bitbucket-sign:before{content:"\f172"}.icon-tumblr:before{content:"\f173"}.icon-tumblr-sign:before{content:"\f174"}.icon-long-arrow-down:before{content:"\f175"}.icon-long-arrow-up:before{content:"\f176"}.icon-long-arrow-left:before{content:"\f177"}.icon-long-arrow-right:before{content:"\f178"}.icon-apple:before{content:"\f179"}.icon-windows:before{content:"\f17a"}.icon-android:before{content:"\f17b"}.icon-linux:before{content:"\f17c"}.icon-dribbble:before{content:"\f17d"}.icon-skype:before{content:"\f17e"}.icon-foursquare:before{content:"\f180"}.icon-trello:before{content:"\f181"}.icon-female:before{content:"\f182"}.icon-male:before{content:"\f183"}.icon-gittip:before{content:"\f184"}.icon-sun:before{content:"\f185"}.icon-moon:before{content:"\f186"}.icon-archive:before{content:"\f187"}.icon-bug:before{content:"\f188"}.icon-vk:before{content:"\f189"}.icon-weibo:before{content:"\f18a"}.icon-renren:before{content:"\f18b"}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#fff;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px;-moz-border-radius:0 6px 6px;border-radius:0 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^=icon-],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^=icon-],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^=icon-],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#e3553b;background-image:-moz-linear-gradient(top,#e33f3b,#e3773b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e3773b));background-image:-webkit-linear-gradient(top,#e33f3b,#e3773b);background-image:-o-linear-gradient(top,#e33f3b,#e3773b);background-image:linear-gradient(to bottom,#e33f3b,#e3773b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe3773b', GradientType=0);border-color:#e3773b #e3773b #b7521a;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e3773b;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0);border-color:#f3622d #f3622d #c83e0b;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f3622d;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#e33f3b;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#b71e1a;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em}.btn-group:first-child{*margin-left:0}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#e3773b}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f3622d}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255,255,255,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#e33f3b}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#e33f3b}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#e33f3b;border-bottom-color:#e33f3b;margin-top:6px}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#b71e1a;border-bottom-color:#b71e1a}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065);*zoom:1}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type=image],.navbar-form input[type=checkbox],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #fff;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);-moz-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:0}.modal.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;*zoom:1}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,.055);box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#e33f3b;-webkit-box-shadow:0 1px 4px rgba(0,105,214,.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,.25);box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f3622d}.label-warning[href],.badge-warning[href]{background-color:#e0450d}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#f79875;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.config-item{height:41px}.config-item .edit-button{float:right;display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:12px;padding-bottom:12px;margin-top:0;padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;display:none}.config-item .edit-button [class^=icon-].icon-large,.config-item .edit-button [class*=" icon-"].icon-large{line-height:.9em}.config-item .edit-button [class^=icon-].icon-spin,.config-item .edit-button [class*=" icon-"].icon-spin{display:inline-block}.config-item .edit-button [class^=icon-].pull-left.icon-2x,.config-item .edit-button [class*=" icon-"].pull-left.icon-2x,.config-item .edit-button [class^=icon-].pull-right.icon-2x,.config-item .edit-button [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.config-item .edit-button [class^=icon-].icon-spin.icon-large,.config-item .edit-button [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:hover,.config-item .edit-button:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.config-item .edit-button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.config-item .edit-button.active,.config-item .edit-button:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.config-item .edit-button.disabled,.config-item .edit-button[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.config-item .edit-button .label,.config-item .edit-button .badge{position:relative;top:-1px}.config-item .edit-button .label,.config-item .edit-button .badge{top:0}.config-item td:hover .edit-button{display:block}.config-item .value-input{width:98%}.config-item #delete-value{cursor:pointer}.button-margin{margin-bottom:15px}#add-section-modal{width:400px}#log-sidebar ul{margin-left:0;list-style:none}#log-sidebar .remove-filter{opacity:.2}pre.prettyprint{background:#000;border-radius:0;font-size:83%;line-height:1.4;margin:0;padding:16px}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#f8f8f8}.prettyprint .kwd{color:#ff8300}.prettyprint .str{color:#ff8300}.prettyprint .lit{color:#0f0}.prettyprint .com{color:#666}.CodeMirror-wrap pre.view-code-error{color:#af2d24}.CodeMirror-wrap pre .tooltip{z-index:100000000}#db-tools{position:absolute;top:-7px;right:0;width:390px}#db-tools .btn-group{position:absolute;left:0;top:6px}#db-tools form{position:absolute;right:0;top:0}.tools .nav{margin-bottom:10px}#sidenav{padding-top:10px}#sidenav h3{margin:10px 0}#sidenav li a span.divider{background:0;color:#ccc;padding:0 2px}#sidenav li.nav-header a{display:inline}#sidenav div.btn-group{display:inline-block}#sidenav li.nav-header,#sidenav #sidenav li a{padding-left:4px}#sidenav li.active a{background-color:#ddd;color:#333;text-shadow:none}.edit{display:none}.edit form{margin-bottom:0}.edit h3{border-bottom:1px solid #ccc;font-size:100%;line-height:1;margin-bottom:18px}.edit textarea{height:100px;width:95%}.edit .btn-toolbar{margin-bottom:0}.edit .preview{width:100px}#new-view-index .confirm{display:none}#new-view-index .confirm .progress{display:none;margin:20px}#new-view-index textarea{height:100px;width:95%}.view{display:none}.view .result-tools{float:left;width:100%;margin-bottom:10px}.view table td div{position:relative}.view table td div div{display:none;line-height:1;position:absolute;right:4px;top:4px}.view table td div:hover div a.edits{padding-left:16px;padding-right:16px}.view table td div:hover div{display:block}.view.show{display:block}.view.show.hidden-by-params{display:none}#database .view table tr td{padding:0}.loading{display:none}.view-request-duration{padding-right:10px;float:right}table.active-tasks th{cursor:pointer}.well .row-fluid{margin:0}.well .row-fluid .row-fluid:last-child .well-item{border:0}.well .well-item{color:#666;font-size:12px;border-bottom:1px solid #e5e5e5;padding:8px 4px}.well .well-item strong{font-size:16px}#doc .dropdown-menu{width:auto}.databases a.db-actions,.databases a.db-actions:visited{color:#e33f3b;border:1px solid #e3e3e3;padding:5px 7px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;text-decoration:none;font-size:19px}.btn-group ul.dropdown-menu li a:before{margin-right:10px}.design-doc-group .span3{margin:0}.design-doc-group #new-ddoc-section{margin-top:10px}.design-doc-group #new-ddoc-section label{width:100px}.design-doc-group #new-ddoc-section .controls{margin-left:100px}table#changes-table #changes{width:50%}table#changes-table #seq,table#changes-table #deleted{width:5%}@font-face{font-family:fauxtonicon;src:url(../img/fontcustom_fauxton.eot);src:url(../img/fontcustom_fauxton.eot?#iefix) format("embedded-opentype"),url(../img/fontcustom_fauxton.woff) format("woff"),url(../img/fontcustom_fauxton.ttf) format("truetype"),url(../img/fontcustom_fauxton.svg#fontcustom_fauxton) format("svg");font-weight:400;font-style:normal}.fonticon-activetasks:before,.fonticon-bookmark:before,.fonticon-carrot:before,.fonticon-circle-check:before,.fonticon-circle-minus:before,.fonticon-circle-plus:before,.fonticon-circle-x:before,.fonticon-cog:before,.fonticon-collapse:before,.fonticon-dashboard:before,.fonticon-database:before,.fonticon-document:before,.fonticon-documents:before,.fonticon-expand:before,.fonticon-eye:before,.fonticon-key:before,.fonticon-link:before,.fonticon-log:before,.fonticon-minus:before,.fonticon-mixer:before,.fonticon-new-database:before,.fonticon-paperclip:before,.fonticon-pencil:before,.fonticon-play:before,.fonticon-plus:before,.fonticon-profile:before,.fonticon-replicate:before,.fonticon-reply:before,.fonticon-save:before,.fonticon-search:before,.fonticon-stats:before,.fonticon-support:before,.fonticon-swap-arrows:before,.fonticon-trash:before,.fonticon-user:before,.fonticon-users:before,.fonticon-wrench:before,.fonticon-x:before{font-family:fauxtonicon;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;display:inline-block;text-decoration:inherit}.fonticon-activetasks:before{content:"\f100"}.fonticon-bookmark:before{content:"\f101"}.fonticon-carrot:before{content:"\f102"}.fonticon-circle-check:before{content:"\f103"}.fonticon-circle-minus:before{content:"\f104"}.fonticon-circle-plus:before{content:"\f105"}.fonticon-circle-x:before{content:"\f106"}.fonticon-cog:before{content:"\f107"}.fonticon-collapse:before{content:"\f108"}.fonticon-dashboard:before{content:"\f109"}.fonticon-database:before{content:"\f10a"}.fonticon-document:before{content:"\f10b"}.fonticon-documents:before{content:"\f10c"}.fonticon-expand:before{content:"\f10d"}.fonticon-eye:before{content:"\f10e"}.fonticon-key:before{content:"\f10f"}.fonticon-link:before{content:"\f110"}.fonticon-log:before{content:"\f111"}.fonticon-minus:before{content:"\f112"}.fonticon-mixer:before{content:"\f113"}.fonticon-new-database:before{content:"\f114"}.fonticon-paperclip:before{content:"\f115"}.fonticon-pencil:before{content:"\f116"}.fonticon-play:before{content:"\f117"}.fonticon-plus:before{content:"\f118"}.fonticon-profile:before{content:"\f119"}.fonticon-replicate:before{content:"\f11a"}.fonticon-reply:before{content:"\f11b"}.fonticon-save:before{content:"\f11c"}.fonticon-search:before{content:"\f11d"}.fonticon-stats:before{content:"\f11e"}.fonticon-support:before{content:"\f11f"}.fonticon-swap-arrows:before{content:"\f120"}.fonticon-trash:before{content:"\f121"}.fonticon-user:before{content:"\f122"}.fonticon-users:before{content:"\f123"}.fonticon-wrench:before{content:"\f124"}.fonticon-x:before{content:"\f125"}body{background-color:#F2F2F2}#main>footer{position:fixed;bottom:0;font-size:10px;margin-left:220px;padding:5px 10px;background-color:#F2F2F2;width:100%}.closeMenu #main>footer{margin-left:62px}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.row{margin-left:0}body{font-size:16px;line-height:1.3;padding-bottom:0;color:#333;padding-top:92px;background-color:#f2f2f2}body#home{padding-top:90px}body .btn{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none;background-repeat:no-repeat}h2,h3,h4{font-weight:600}a,.btn{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear}a,a:visited,a:active{color:#e33f3b}a:hover{color:#e33f3b}.loader{background:url(../img/loader.gif) center center no-repeat;min-height:100px}#app-container.loader{min-height:400px}#app-container.loader>*{display:none}#global-notifications{position:fixed;top:0;display:block;z-index:100000;left:220px;width:100%}.closeMenu #global-notifications{left:62px}#app-container{padding:0;height:100%;width:100%;position:absolute;top:0;left:0}#app-container>.row-fluid{height:100%}.container-fluid{padding-right:0;padding-left:0}#primary-navbar{height:100%;position:fixed;width:220px;top:0;bottom:0;background-color:#3a2c2b}#primary-navbar #footer-links{position:absolute;bottom:0;width:100%}#primary-navbar .navbar .brand{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;-webkit-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-moz-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-ms-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-o-transition:left,1s cubic-bezier(0.805,.005,.165,.985);transition:left,1s cubic-bezier(0.805,.005,.165,.985);-webkit-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-moz-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-ms-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-o-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);transition-timing-function:cubic-bezier(0.805,.005,.165,.985);margin:10px 0 6px;width:174px;height:40px;padding:10px}#primary-navbar .navbar .brand .icon{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background:url(../img/couchdb-site.png) no-repeat 0 0;display:block;height:100%;width:100%}#primary-navbar .navbar .brand .burger{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:6px;left:-8px;position:absolute}#primary-navbar .navbar .brand .burger div{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;height:4px;width:8px;-webkit-border-radius:2;-moz-border-radius:2;border-radius:2;background-color:#af2d24;margin:4px 0}#primary-navbar .navbar .brand:hover .burger div{background-color:#f3622d}.closeMenu #primary-navbar .navbar .brand{width:45px}.closeMenu #primary-navbar .navbar .brand .icon{background:url(../img/minilogo.png) no-repeat 0 0}.closeMenu #primary-navbar .navbar .brand .burger{left:0}#primary-navbar .navbar nav .nav{margin:0}#primary-navbar .navbar nav .nav li{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding:0;font-size:20px;line-height:23px;width:220px;font-weight:400;font-family:helvetica;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#af2d24;border-bottom:1px solid #3a2c2b;min-height:55px}#primary-navbar .navbar nav .nav li.active,#primary-navbar .navbar nav .nav li:hover{background-color:#e33f3b}#primary-navbar .navbar nav .nav li.active a,#primary-navbar .navbar nav .nav li:hover a{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#primary-navbar .navbar nav .nav li:hover a.fonticon:before{color:#fff}#primary-navbar .navbar nav .nav li.active a.fonticon:before,#primary-navbar .navbar nav .nav li:hover a.fonticon:before{text-shadow:2px 2px rgba(0,0,0,.2);color:#fff}#primary-navbar .navbar nav .nav li a{padding:17px 25px 12px 60px;background-color:transparent;color:#fff;text-shadow:1px 2px rgba(0,0,0,0)}#primary-navbar .navbar nav .nav li a.closeMenu{color:transparent}#primary-navbar .navbar nav .nav li a span.fonticon{position:relative}#primary-navbar .navbar nav .nav li a span.fonticon:before{position:absolute;top:-5px;left:-44px;font-size:28px;color:#3a2c2b;text-shadow:2px 2px rgba(0,0,0,0)}.closeMenu #primary-navbar .navbar nav .nav li a{color:transparent}#primary-navbar .navbar nav ul#footer-nav-links li{background-color:#3a2c2b;border-top:1px solid #e33f3b;border-bottom:0;font-size:12px;padding:12px;min-height:44px}#primary-navbar .navbar nav ul#footer-nav-links li.active,#primary-navbar .navbar nav ul#footer-nav-links li:hover{background-color:#da4f49;border-top:1px solid #e33f3b}#primary-navbar .navbar nav ul#footer-nav-links li.active a,#primary-navbar .navbar nav ul#footer-nav-links li:hover a{color:#fff}#primary-navbar .navbar nav ul#footer-nav-links li a{color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links{margin-top:0}#primary-navbar .navbar nav ul#bottom-nav-links li{min-height:46px;background-color:#554d4c}#primary-navbar .navbar nav ul#bottom-nav-links li.active{background-color:#da4f49}#primary-navbar .navbar nav ul#bottom-nav-links li:hover{background-color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon{position:relative}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon:before{left:-40px;font-size:22px}#dashboard{max-width:1500px;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);border-left:1px solid #999;position:absolute;left:220px;margin-left:0;background-color:#f2f2f2;min-width:600px;height:100%}.closeMenu #dashboard{left:62px}#dashboard.one-pane{min-width:800px;margin-top:0}#dashboard-content{padding:20px}#dashboard-content.row-fluid,#dashboard-content.window-resizeable{margin-left:0}.with-sidebar #dashboard-content{border-left:1px solid #999;border-right:1px solid #999;width:auto;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);padding:0;bottom:0;top:60px;position:absolute;overflow-x:hidden;overflow-y:auto;left:330px;right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-content>div.inner{display:block}.with-sidebar.content-area{position:absolute;top:0;bottom:0;left:0;right:0}.row-fluid.content-area{background-color:#f2f2f2}.fixed-header{background-color:#f1f1f1;position:fixed;top:0;right:0;left:220px;border-bottom:5px solid #e33f3b;-webkit-box-shadow:0 4px 6px -2px gray;-moz-box-shadow:0 4px 6px -2px gray;box-shadow:0 4px 6px -2px gray;z-index:100}.closeMenu .fixed-header{left:62px}.one-pane .fixed-header{position:relative;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;left:auto}#breadcrumbs{padding:15px 20px}#breadcrumbs .breadcrumb{margin-bottom:0;background-color:transparent;padding:0}#breadcrumbs .breadcrumb li{color:#e33f3b;font-size:18px;text-shadow:none}#breadcrumbs .breadcrumb li .divider{font-size:12px;color:#999}#breadcrumbs .breadcrumb li:first-child{font-size:30px}#breadcrumbs .breadcrumb li.active{color:#333}#breadcrumbs .breadcrumb li a{color:#e33f3b}footer#mainFooter{position:fixed;bottom:0}.topmenu-defaults{height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-upper-menu{position:fixed;z-index:11;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#CBCBCB}#dashboard-lower-content{padding:20px;background-color:#F1F1F1}#dashboard-upper-content .well{padding:20px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#sidenav{padding:0}#sidenav header{width:330px;-webkit-box-shadow:inset -7px 0 15px -6px #000;-moz-box-shadow:inset -7px 0 15px -6px #000;box-shadow:inset -7px 0 15px -6px #000;background:transparent url(../img/linen.png) repeat 0 0;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sidenav nav .nav-list .divider{border:0}#sidenav nav .nav-list li.active a{background-color:#af2d24;color:#fff}#sidenav nav .nav-list a{display:block;padding:10px 5px 10px 15px;color:#333;border-bottom:1px solid #989898}#sidenav nav .nav-list .nav-header{background-color:#B2B2B2;padding:5px;text-shadow:none;color:#333;border-bottom:1px solid #989898}#sidebar-content{-webkit-box-shadow:-7px 0 15px -6px #000;-moz-box-shadow:-7px 0 15px -6px #000;box-shadow:-7px 0 15px -6px #000;position:absolute;bottom:0;top:60px;width:330px;left:0;overflow-x:hidden;overflow-y:auto;background-color:#e4dfdc}#sidebar-content>div.inner{display:block}.result-tools{padding:5px 0;border-bottom:1px solid #999;padding:10px 0;float:left;width:100%;margin-bottom:10px}.navbar-form.pull-right.database-search{margin-right:36px}.navbar-form.pull-right.database-search input[type=text]{margin-top:-4px}#db-views-tabs-nav{position:fixed;z-index:12;margin-top:31px;margin-bottom:0;padding:0 20px}.db-views-smaller{max-width:500px}.nav-tabs>li{margin-right:2px}.nav-tabs>li>a{color:#333;border-color:#eee #eee #ddd;text-decoration:none;background-color:#eee;border-radius:0;border-left:0;border-right:0}.nav-tabs>li>a.fonticon:before{margin-right:6px;font-size:16px}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{background-color:#da4f49;border-top:1px solid #e33f3b;color:#fff}.tab-content{margin-top:70px}.well .controls-group{margin-bottom:8px}.well .controls-group:first-child,.well .controls-group:last-child{margin-top:24px}.well .controls-row{margin-bottom:8px}table.table{table-layout:fixed}table tr td{word-wrap:break-word}table tr td.select{width:20px}table.databases{clear:both}thead{border-bottom:2px solid #e33f3b}tbody{padding-top:10px}.table-condensed td{padding:18px 5px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#F7F7F7}.btn-group>.btn+.dropdown-toggle,.btn-group>.btn:first-child,.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none}.btn{padding-top:12px;padding-bottom:12px;margin-top:0}.button{padding:10px 15px;cursor:pointer;-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;border:0;background-color:#e33f3b;color:#fff;padding:10px}.button:before{padding-right:5px}.button.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button.outlineGray:hover{border:1px solid #f3622d}.button.green{background-color:#7fa30c}.button.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button,a.button:visited,a.button:active{color:#fff}.button:disabled{opacity:.5}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none}.button-style{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}.button-style:before{padding-right:5px}.button-style.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button-style.outlineGray:hover{border:1px solid #f3622d}.button-style.green{background-color:#7fa30c}.button-style.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button-style .icon{margin-right:10px;font-size:20px}.button-style:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button-style,a.button-style:visited,a.button-style:active{color:#fff}.button-style:disabled{opacity:.5}a.button,a.button:visited,a.button:active{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}a.button:before,a.button:visited:before,a.button:active:before{padding-right:5px}a.button.outlineGray,a.button:visited.outlineGray,a.button:active.outlineGray{border:1px solid #999;background-color:transparent;color:#333}a.button.outlineGray:hover,a.button:visited.outlineGray:hover,a.button:active.outlineGray:hover{border:1px solid #f3622d}a.button.green,a.button:visited.green,a.button:active.green{background-color:#7fa30c}a.button.round-btn,a.button:visited.round-btn,a.button:active.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}a.button .icon,a.button:visited .icon,a.button:active .icon{margin-right:10px;font-size:20px}a.button:hover,a.button:visited:hover,a.button:active:hover{color:#fff;text-decoration:none;background-color:#f3622d}aa.button,aa.button:visited,aa.button:active,aa.button:visited,aa.button:visited:visited,aa.button:active:visited,aa.button:active,aa.button:visited:active,aa.button:active:active{color:#fff}a.button:disabled,a.button:visited:disabled,a.button:active:disabled{opacity:.5}.select>a{display:block;padding:5px 15px 5px 5px;border:1px solid #989898;position:relative;background-color:#FFF;color:#666}.select>a:after{content:'';width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #989898;position:absolute;right:9px;top:12px}.select>a:before{content:'';border-left:1px solid #989898;height:30px;position:absolute;right:30px;top:0}input[type=text],input[type=password],.navbar-form input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;padding:12px;border:1px solid #ccc;height:auto;font-size:16px;margin-top:0}label.fonticon-search{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}label.fonticon-search:before{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;font-size:16px;position:absolute;right:-47px;background-color:#E1E1E1;height:46px;width:48px;border:1px solid #ccc;padding:14px;top:-4px}label.fonticon-search:hover{color:#fff}label.fonticon-search:hover:before{background-color:#e33f3b}.form-inline input[type=password],.form-inline input[type=text]{width:auto}*,:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=file],input[type=checkbox],input[type=radio],select{margin:0 0 1em}.well select{margin:0}form.custom .hidden-field{margin-left:-99999px;position:absolute;visibility:hidden}.checkbox label{display:inline-block;padding-left:25px}label{margin-right:15px;padding-left:0;display:block;cursor:pointer;position:relative;font-size:14px}label.inline{display:inline-block}.help-block{font-size:12px}.custom-inputs input[type=radio],.custom-inputs input[type=checkbox]{display:none}.custom-inputs .checkbox label:before{border-radius:3px}.custom-inputs .controls>.radio:first-child,.custom-inputs .controls>.checkbox:first-child{padding-top:15px}.custom-inputs .radio.inline,.custom-inputs .checkbox.inline{display:inline-block;padding-top:15px;margin-bottom:12px;vertical-align:middle}.custom-inputs input[type=checkbox]:checked+label:before{content:"\00d7";text-shadow:1px 1px 1px rgba(0,0,0,.2);font-size:16px;background-color:#e33f3b;color:#fff;text-align:center;line-height:15px}.custom-inputs label:before{content:"";display:inline-block;width:16px;height:16px;margin-right:10px;position:absolute;left:0;bottom:1px;background-color:#aaa;box-shadow:inset 0 2px 3px 0 rgba(0,0,0,.3),0 1px 0 0 rgba(255,255,255,.8)}.custom-inputs .radio label:before{border-radius:8px}.custom-inputs input[type=radio]:checked+label:before{content:"\2022";color:#f3f3f3;font-size:30px;text-align:center;line-height:18px}.custom-inputs label.drop-down:before{display:none}form.view-query-update,form.view-query-save{max-width:100%}.form-actions{background:0;border:0}.input-append .add-on,.input-prepend .add-on{font-size:18px;padding:14px 5px 30px}.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{padding:10px 5px 14px}.input-append .btn{padding:10px 5px 14px}.row-fluid .input-append [class*=span],.input-prepend input[class*=span]{width:auto}pre.prettyprint{background:#E5E0DD;border:0}.prettyprint .str,.prettyprint .lit{color:#e33f3b}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#333}tr.all-docs-item{border:0;background:transparent}#log-sidebar{padding:20px}.view.show{color:gray}div.spinner{position:absolute;left:50%;top:50%}.CodeMirror-scroll{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:solid 1px #ddd}.btn-primary a:visited{color:#fff}#api-navbar{position:relative}.button.api-url-btn{position:absolute;right:15px;top:-50px}.button.api-url-btn span.icon{font-size:11px}.api-navbar{border-top:1px solid #e33f3b;padding:20px 20px 15px}.api-navbar .input-append.input-prepend{margin-bottom:0}.api-navbar .input-append.input-prepend .add-on{background:0;padding:14px 12px 32px;border:0}.api-navbar .input-append.input-prepend .btn:last-child{margin-left:-1px;background:0;padding:13px 12px 11px}.api-navbar .input-append.input-prepend .btn:last-child:hover{background-color:#e33f3b;color:#fff}#jump-to-doc{width:50%;max-width:600px;float:right;margin-right:40px}#jump-to-doc #jump-to-doc-label{width:100%}#jump-to-doc #jump-to-doc-id{width:100%;margin-top:-4px}#map-function,#reduce-function{width:100%;height:300px;font-size:16px}#editor-container{width:1316px;height:688px;font-size:16px}form#replication{position:relative;max-width:none;width:auto}form#replication .form_set{width:350px;display:inline-block;border:1px solid #a59d9d;padding:15px 10px 0;margin-bottom:20px}form#replication .form_set.middle{width:100px;border:0;position:relative;height:100px;margin:0}form#replication .form_set input,form#replication .form_set select{margin:0 0 16px 5px;height:40px;width:318px}form#replication .form_set .btn-group{margin:0 0 16px 5px}form#replication .form_set .btn-group .btn{padding:10px 57px}form#replication .form_set.local .local_option{display:block}form#replication .form_set.local .remote_option{display:none}form#replication .form_set.local .local-btn{background-color:#e33f3b;color:#fff}form#replication .form_set.local .remote-btn{background-color:#f5f5f5;color:gray}form#replication .form_set .local_option{display:none}form#replication .form_set .remote-btn{background-color:#e33f3b;color:#fff}form#replication .options{position:relative}form#replication .options:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000;border-top:0}form#replication .options.off:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:0;border-top:5px solid #000}form#replication .control-group label{float:left;min-height:30px;vertical-align:top;padding-right:5px;min-width:130px;padding-left:0}form#replication .control-group input[type=radio],form#replication .control-group input[type=checkbox]{margin:0 0 2px}form#replication .circle{z-index:0;position:absolute;top:20px;left:15px}form#replication .circle:after{width:70px;height:70px;content:'';display:block;position:relative;margin:0 auto;border:1px solid #a59d9d;-webkit-border-radius:40px;-moz-border-radius:40px;border-radius:40px}form#replication .swap{text-decoration:none;z-index:30;cursor:pointer;position:absolute;font-size:40px;width:27px;height:12px;top:31px;left:30px}form#replication .swap:hover{color:#a59d9d}#replicationStatus.showHeader li.header{display:block;border:0}#replicationStatus.showHeader ul{border:1px solid #a59d9d}#replicationStatus li.header{display:none}#replicationStatus ul{margin:0}#replicationStatus ul li{padding:10px;margin:0;list-style:none;border-top:1px solid #a59d9d}#replicationStatus ul li .progress,#replicationStatus ul li p{margin:0;vertical-align:bottom}#replicationStatus ul li .progress.break,#replicationStatus ul li p.break{-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.datatypes{border:#d3d3d3 1px solid;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:15px}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer}
\ No newline at end of file
+ */ @font-face{font-family:FontAwesome;src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?v=3.2.1);src:url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.eot?#iefix&v=3.2.1) format('embedded-opentype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.woff?v=3.2.1) format('woff'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.ttf?v=3.2.1) format('truetype'),url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1) format('svg');font-weight:400;font-style:normal}[class^=icon-],[class*=" icon-"]{font-family:FontAwesome;font-weight:400;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^=icon-]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^=icon-],a [class*=" icon-"]{display:inline}[class^=icon-].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:.2857142857142857em}[class^=icon-].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em}.icons-ul{margin-left:2.142857142857143em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit}[class^=icon-].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eee}.icon-light{color:#fff}.icon-dark{color:#333}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right{float:right}.pull-left{float:left}[class^=icon-].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^=icon-].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}[class^=icon-],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^=icon-].icon-large,.nav [class^=icon-].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].icon-spin,.nav [class^=icon-].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^=icon-],.nav-pills [class^=icon-],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^=icon-].icon-large,.nav-pills [class^=icon-].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em}.btn [class^=icon-].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^=icon-].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^=icon-].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^=icon-].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^=icon-].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^=icon-],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^=icon-].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^=icon-].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{line-height:inherit}.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%}.icon-stack [class^=icon-],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em}.icon-stack .icon-stack-base{font-size:2em;*line-height:1em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2)}.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.icon-flip-horizontal:before{-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.icon-flip-vertical:before{-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope-alt:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-power-off:before,.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-gear:before,.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file-alt:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-rotate-right:before,.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-mail-forward:before,.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-gears:before,.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up-alt:before{content:"\f087"}.icon-thumbs-down-alt:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-unchecked:before,.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-rotate-left:before,.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-text-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-mail-reply:before,.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}.icon-expand-alt:before{content:"\f116"}.icon-collapse-alt:before{content:"\f117"}.icon-smile:before{content:"\f118"}.icon-frown:before{content:"\f119"}.icon-meh:before{content:"\f11a"}.icon-gamepad:before{content:"\f11b"}.icon-keyboard:before{content:"\f11c"}.icon-flag-alt:before{content:"\f11d"}.icon-flag-checkered:before{content:"\f11e"}.icon-terminal:before{content:"\f120"}.icon-code:before{content:"\f121"}.icon-reply-all:before{content:"\f122"}.icon-mail-reply-all:before{content:"\f122"}.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123"}.icon-location-arrow:before{content:"\f124"}.icon-crop:before{content:"\f125"}.icon-code-fork:before{content:"\f126"}.icon-unlink:before{content:"\f127"}.icon-question:before{content:"\f128"}.icon-info:before{content:"\f129"}.icon-exclamation:before{content:"\f12a"}.icon-superscript:before{content:"\f12b"}.icon-subscript:before{content:"\f12c"}.icon-eraser:before{content:"\f12d"}.icon-puzzle-piece:before{content:"\f12e"}.icon-microphone:before{content:"\f130"}.icon-microphone-off:before{content:"\f131"}.icon-shield:before{content:"\f132"}.icon-calendar-empty:before{content:"\f133"}.icon-fire-extinguisher:before{content:"\f134"}.icon-rocket:before{content:"\f135"}.icon-maxcdn:before{content:"\f136"}.icon-chevron-sign-left:before{content:"\f137"}.icon-chevron-sign-right:before{content:"\f138"}.icon-chevron-sign-up:before{content:"\f139"}.icon-chevron-sign-down:before{content:"\f13a"}.icon-html5:before{content:"\f13b"}.icon-css3:before{content:"\f13c"}.icon-anchor:before{content:"\f13d"}.icon-unlock-alt:before{content:"\f13e"}.icon-bullseye:before{content:"\f140"}.icon-ellipsis-horizontal:before{content:"\f141"}.icon-ellipsis-vertical:before{content:"\f142"}.icon-rss-sign:before{content:"\f143"}.icon-play-sign:before{content:"\f144"}.icon-ticket:before{content:"\f145"}.icon-minus-sign-alt:before{content:"\f146"}.icon-check-minus:before{content:"\f147"}.icon-level-up:before{content:"\f148"}.icon-level-down:before{content:"\f149"}.icon-check-sign:before{content:"\f14a"}.icon-edit-sign:before{content:"\f14b"}.icon-external-link-sign:before{content:"\f14c"}.icon-share-sign:before{content:"\f14d"}.icon-compass:before{content:"\f14e"}.icon-collapse:before{content:"\f150"}.icon-collapse-top:before{content:"\f151"}.icon-expand:before{content:"\f152"}.icon-euro:before,.icon-eur:before{content:"\f153"}.icon-gbp:before{content:"\f154"}.icon-dollar:before,.icon-usd:before{content:"\f155"}.icon-rupee:before,.icon-inr:before{content:"\f156"}.icon-yen:before,.icon-jpy:before{content:"\f157"}.icon-renminbi:before,.icon-cny:before{content:"\f158"}.icon-won:before,.icon-krw:before{content:"\f159"}.icon-bitcoin:before,.icon-btc:before{content:"\f15a"}.icon-file:before{content:"\f15b"}.icon-file-text:before{content:"\f15c"}.icon-sort-by-alphabet:before{content:"\f15d"}.icon-sort-by-alphabet-alt:before{content:"\f15e"}.icon-sort-by-attributes:before{content:"\f160"}.icon-sort-by-attributes-alt:before{content:"\f161"}.icon-sort-by-order:before{content:"\f162"}.icon-sort-by-order-alt:before{content:"\f163"}.icon-thumbs-up:before{content:"\f164"}.icon-thumbs-down:before{content:"\f165"}.icon-youtube-sign:before{content:"\f166"}.icon-youtube:before{content:"\f167"}.icon-xing:before{content:"\f168"}.icon-xing-sign:before{content:"\f169"}.icon-youtube-play:before{content:"\f16a"}.icon-dropbox:before{content:"\f16b"}.icon-stackexchange:before{content:"\f16c"}.icon-instagram:before{content:"\f16d"}.icon-flickr:before{content:"\f16e"}.icon-adn:before{content:"\f170"}.icon-bitbucket:before{content:"\f171"}.icon-bitbucket-sign:before{content:"\f172"}.icon-tumblr:before{content:"\f173"}.icon-tumblr-sign:before{content:"\f174"}.icon-long-arrow-down:before{content:"\f175"}.icon-long-arrow-up:before{content:"\f176"}.icon-long-arrow-left:before{content:"\f177"}.icon-long-arrow-right:before{content:"\f178"}.icon-apple:before{content:"\f179"}.icon-windows:before{content:"\f17a"}.icon-android:before{content:"\f17b"}.icon-linux:before{content:"\f17c"}.icon-dribbble:before{content:"\f17d"}.icon-skype:before{content:"\f17e"}.icon-foursquare:before{content:"\f180"}.icon-trello:before{content:"\f181"}.icon-female:before{content:"\f182"}.icon-male:before{content:"\f183"}.icon-gittip:before{content:"\f184"}.icon-sun:before{content:"\f185"}.icon-moon:before{content:"\f186"}.icon-archive:before{content:"\f187"}.icon-bug:before{content:"\f188"}.icon-vk:before{content:"\f189"}.icon-weibo:before{content:"\f18a"}.icon-renren:before{content:"\f18b"}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#fff;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#e23632;background-image:-moz-linear-gradient(top,#e33f3b,#e02925);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e02925));background-image:-webkit-linear-gradient(top,#e33f3b,#e02925);background-image:-o-linear-gradient(top,#e33f3b,#e02925);background-image:linear-gradient(to bottom,#e33f3b,#e02925);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe02925', GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:default}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px;-moz-border-radius:0 6px 6px;border-radius:0 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^=icon-],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^=icon-],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^=icon-],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#e3553b;background-image:-moz-linear-gradient(top,#e33f3b,#e3773b);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e33f3b),to(#e3773b));background-image:-webkit-linear-gradient(top,#e33f3b,#e3773b);background-image:-o-linear-gradient(top,#e33f3b,#e3773b);background-image:linear-gradient(to bottom,#e33f3b,#e3773b);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe33f3b', endColorstr='#ffe3773b', GradientType=0);border-color:#e3773b #e3773b #b7521a;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e3773b;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#e3773b;*background-color:#e06825}.btn-primary:active,.btn-primary.active{background-color:#ce5c1d \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0);border-color:#f3622d #f3622d #c83e0b;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f3622d;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f3622d;*background-color:#f25015}.btn-warning:active,.btn-warning.active{background-color:#e0450d \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#222;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type=submit].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type=submit].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type=submit].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type=submit].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{border-color:transparent;cursor:pointer;color:#e33f3b;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#b71e1a;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em}.btn-group:first-child{*margin-left:0}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px}.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#e3773b}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f3622d}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success h4{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-left:0;margin-bottom:20px;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255,255,255,.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.2);background-color:#e33f3b}.nav-list [class^=icon-],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#e33f3b}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{border-top-color:#e33f3b;border-bottom-color:#e33f3b;margin-top:6px}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#b71e1a;border-bottom-color:#b71e1a}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default}.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2}.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065);*zoom:1}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{float:left;display:block;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type=image],.navbar-form input[type=checkbox],.navbar-form input[type=radio]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333;text-decoration:none}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#ededed;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:9px}.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:10px}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);border-bottom:0;bottom:-7px;top:auto}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #fff;border-bottom:0;bottom:-6px;top:auto}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#fff}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-left-color:#111;border-right-color:#222}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111;color:#fff}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);-moz-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15);outline:0}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #fff}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;background-color:transparent;cursor:default}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:"";line-height:0}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:default}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:0}.modal.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;*zoom:1}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,.055);box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#e33f3b;-webkit-box-shadow:0 1px 4px rgba(0,105,214,.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,.25);box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:700;line-height:14px;color:#fff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f3622d}.label-warning[href],.badge-warning[href]{background-color:#e0450d}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.progress .bar{width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#f58258;background-image:-moz-linear-gradient(top,#f79875,#f3622d);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f79875),to(#f3622d));background-image:-webkit-linear-gradient(top,#f79875,#f3622d);background-image:-o-linear-gradient(top,#f79875,#f3622d);background-image:linear-gradient(to bottom,#f79875,#f3622d);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff79875', endColorstr='#fff3622d', GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#f79875;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{color:#fff;line-height:20px}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.config-item{height:41px}.config-item .edit-button{float:right;display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:12px;padding-bottom:12px;margin-top:0;padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;display:none}.config-item .edit-button [class^=icon-].icon-large,.config-item .edit-button [class*=" icon-"].icon-large{line-height:.9em}.config-item .edit-button [class^=icon-].icon-spin,.config-item .edit-button [class*=" icon-"].icon-spin{display:inline-block}.config-item .edit-button [class^=icon-].pull-left.icon-2x,.config-item .edit-button [class*=" icon-"].pull-left.icon-2x,.config-item .edit-button [class^=icon-].pull-right.icon-2x,.config-item .edit-button [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.config-item .edit-button [class^=icon-].icon-spin.icon-large,.config-item .edit-button [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:hover,.config-item .edit-button:focus,.config-item .edit-button:active,.config-item .edit-button.active,.config-item .edit-button.disabled,.config-item .edit-button[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.config-item .edit-button:active,.config-item .edit-button.active{background-color:#ccc \9}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:first-child{*margin-left:0}.config-item .edit-button:hover,.config-item .edit-button:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.config-item .edit-button:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.config-item .edit-button.active,.config-item .edit-button:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.config-item .edit-button.disabled,.config-item .edit-button[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.config-item .edit-button .label,.config-item .edit-button .badge{position:relative;top:-1px}.config-item .edit-button .label,.config-item .edit-button .badge{top:0}.config-item td:hover .edit-button{display:block}.config-item .value-input{width:98%}.config-item #delete-value{cursor:pointer}.button-margin{margin-bottom:15px}#add-section-modal{width:400px}#log-sidebar ul{margin-left:0;list-style:none}#log-sidebar .remove-filter{opacity:.2}pre.prettyprint{background:#000;border-radius:0;font-size:83%;line-height:1.4;margin:0;padding:16px}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#f8f8f8}.prettyprint .kwd{color:#ff8300}.prettyprint .str{color:#ff8300}.prettyprint .lit{color:#0f0}.prettyprint .com{color:#666}.CodeMirror-wrap pre.view-code-error{color:#af2d24}.CodeMirror-wrap pre .tooltip{z-index:100000000}#db-tools{position:absolute;top:-7px;right:0;width:390px}#db-tools .btn-group{position:absolute;left:0;top:6px}#db-tools form{position:absolute;right:0;top:0}.tools .nav{margin-bottom:10px}#sidenav{padding-top:10px}#sidenav h3{margin:10px 0}#sidenav li a span.divider{background:0;color:#ccc;padding:0 2px}#sidenav li.nav-header a{display:inline}#sidenav div.btn-group{display:inline-block}#sidenav li.nav-header,#sidenav #sidenav li a{padding-left:4px}#sidenav li.active a{background-color:#ddd;color:#333;text-shadow:none}.edit{display:none}.edit form{margin-bottom:0}.edit h3{border-bottom:1px solid #ccc;font-size:100%;line-height:1;margin-bottom:18px}.edit textarea{height:100px;width:95%}.edit .btn-toolbar{margin-bottom:0}.edit .preview{width:100px}#new-view-index .confirm{display:none}#new-view-index .confirm .progress{display:none;margin:20px}#new-view-index textarea{height:100px;width:95%}.view{display:none}.view .result-tools{float:left;width:100%;margin-bottom:10px}.view table td div{position:relative}.view table td div div{display:none;line-height:1;position:absolute;right:4px;top:4px}.view table td div:hover div a.edits{padding-left:16px;padding-right:16px}.view table td div:hover div{display:block}.view.show{display:block}.view.show.hidden-by-params{display:none}#database .view table tr td{padding:0}.loading{display:none}.view-request-duration{padding-right:10px;float:right}table.active-tasks th{cursor:pointer}.well .row-fluid{margin:0}.well .row-fluid .row-fluid:last-child .well-item{border:0}.well .well-item{color:#666;font-size:12px;border-bottom:1px solid #e5e5e5;padding:8px 4px}.well .well-item strong{font-size:16px}#doc .dropdown-menu{width:auto}.databases a.db-actions,.databases a.db-actions:visited{color:#e33f3b;border:1px solid #e3e3e3;padding:5px 7px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;text-decoration:none;font-size:19px}.btn-group ul.dropdown-menu li a:before{margin-right:10px}.design-doc-group .span3{margin:0}.design-doc-group #new-ddoc-section{margin-top:10px}.design-doc-group #new-ddoc-section label{width:100px}.design-doc-group #new-ddoc-section .controls{margin-left:100px}table#changes-table #changes{width:50%}table#changes-table #seq,table#changes-table #deleted{width:5%}.doc-editor-buttons{margin-bottom:15px}.doc-editor-buttons a.button.btn-large.gray{padding:9px 10px;vertical-align:middle}@font-face{font-family:fauxtonicon;src:url(../img/fontcustom_fauxton.eot);src:url(../img/fontcustom_fauxton.eot?#iefix) format("embedded-opentype"),url(../img/fontcustom_fauxton.woff) format("woff"),url(../img/fontcustom_fauxton.ttf) format("truetype"),url(../img/fontcustom_fauxton.svg#fontcustom_fauxton) format("svg");font-weight:400;font-style:normal}.fonticon-activetasks:before,.fonticon-bookmark:before,.fonticon-carrot:before,.fonticon-circle-check:before,.fonticon-circle-minus:before,.fonticon-circle-plus:before,.fonticon-circle-x:before,.fonticon-cog:before,.fonticon-collapse:before,.fonticon-dashboard:before,.fonticon-database:before,.fonticon-document:before,.fonticon-documents:before,.fonticon-expand:before,.fonticon-eye:before,.fonticon-key:before,.fonticon-link:before,.fonticon-log:before,.fonticon-minus:before,.fonticon-mixer:before,.fonticon-new-database:before,.fonticon-paperclip:before,.fonticon-pencil:before,.fonticon-play:before,.fonticon-plus:before,.fonticon-profile:before,.fonticon-replicate:before,.fonticon-reply:before,.fonticon-save:before,.fonticon-search:before,.fonticon-stats:before,.fonticon-support:before,.fonticon-swap-arrows:before,.fonticon-trash:before,.fonticon-user:before,.fonticon-users:before,.fonticon-wrench:before,.fonticon-x:before{font-family:fauxtonicon;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;display:inline-block;text-decoration:inherit}.fonticon-activetasks:before{content:"\f100"}.fonticon-bookmark:before{content:"\f101"}.fonticon-carrot:before{content:"\f102"}.fonticon-circle-check:before{content:"\f103"}.fonticon-circle-minus:before{content:"\f104"}.fonticon-circle-plus:before{content:"\f105"}.fonticon-circle-x:before{content:"\f106"}.fonticon-cog:before{content:"\f107"}.fonticon-collapse:before{content:"\f108"}.fonticon-dashboard:before{content:"\f109"}.fonticon-database:before{content:"\f10a"}.fonticon-document:before{content:"\f10b"}.fonticon-documents:before{content:"\f10c"}.fonticon-expand:before{content:"\f10d"}.fonticon-eye:before{content:"\f10e"}.fonticon-key:before{content:"\f10f"}.fonticon-link:before{content:"\f110"}.fonticon-log:before{content:"\f111"}.fonticon-minus:before{content:"\f112"}.fonticon-mixer:before{content:"\f113"}.fonticon-new-database:before{content:"\f114"}.fonticon-paperclip:before{content:"\f115"}.fonticon-pencil:before{content:"\f116"}.fonticon-play:before{content:"\f117"}.fonticon-plus:before{content:"\f118"}.fonticon-profile:before{content:"\f119"}.fonticon-replicate:before{content:"\f11a"}.fonticon-reply:before{content:"\f11b"}.fonticon-save:before{content:"\f11c"}.fonticon-search:before{content:"\f11d"}.fonticon-stats:before{content:"\f11e"}.fonticon-support:before{content:"\f11f"}.fonticon-swap-arrows:before{content:"\f120"}.fonticon-trash:before{content:"\f121"}.fonticon-user:before{content:"\f122"}.fonticon-users:before{content:"\f123"}.fonticon-wrench:before{content:"\f124"}.fonticon-x:before{content:"\f125"}body{background-color:#F2F2F2}#main>footer{position:fixed;bottom:0;font-size:10px;margin-left:220px;padding:5px 10px;background-color:#F2F2F2;width:100%}.closeMenu #main>footer{margin-left:62px}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.row{margin-left:0}body{font-size:16px;line-height:1.3;padding-bottom:0;color:#333;padding-top:92px;background-color:#f2f2f2}body#home{padding-top:90px}body .btn{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none;background-repeat:no-repeat}h2,h3,h4{font-weight:600}a,.btn{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear}a,a:visited,a:active{color:#e33f3b}a:hover{color:#e33f3b}.loader{background:url(../img/loader.gif) center center no-repeat;min-height:100px}#app-container.loader{min-height:400px}#app-container.loader>*{display:none}#global-notifications{position:fixed;top:0;display:block;z-index:100000;left:220px;width:100%}.closeMenu #global-notifications{left:62px}#app-container{padding:0;height:100%;width:100%;position:absolute;top:0;left:0}#app-container>.row-fluid{height:100%}.container-fluid{padding-right:0;padding-left:0}#primary-navbar{height:100%;position:fixed;width:220px;top:0;bottom:0;background-color:#3a2c2b}#primary-navbar #footer-links{position:absolute;bottom:0;width:100%}#primary-navbar .navbar .brand{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;-webkit-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-moz-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-ms-transition:left,1s cubic-bezier(0.805,.005,.165,.985);-o-transition:left,1s cubic-bezier(0.805,.005,.165,.985);transition:left,1s cubic-bezier(0.805,.005,.165,.985);-webkit-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-moz-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-ms-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);-o-transition-timing-function:cubic-bezier(0.805,.005,.165,.985);transition-timing-function:cubic-bezier(0.805,.005,.165,.985);margin:10px 0 6px;width:174px;height:40px;padding:10px}#primary-navbar .navbar .brand .icon{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background:url(../img/couchdb-site.png) no-repeat 0 0;display:block;height:100%;width:100%}#primary-navbar .navbar .brand .burger{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding-top:6px;left:-8px;position:absolute}#primary-navbar .navbar .brand .burger div{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;height:4px;width:8px;-webkit-border-radius:2;-moz-border-radius:2;border-radius:2;background-color:#af2d24;margin:4px 0}#primary-navbar .navbar .brand:hover .burger div{background-color:#f3622d}.closeMenu #primary-navbar .navbar .brand{width:45px}.closeMenu #primary-navbar .navbar .brand .icon{background:url(../img/minilogo.png) no-repeat 0 0}.closeMenu #primary-navbar .navbar .brand .burger{left:0}#primary-navbar .navbar nav .nav{margin:0}#primary-navbar .navbar nav .nav li{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;padding:0;font-size:20px;line-height:23px;width:220px;font-weight:400;font-family:helvetica;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#af2d24;border-bottom:1px solid #3a2c2b;min-height:55px}#primary-navbar .navbar nav .nav li.active,#primary-navbar .navbar nav .nav li:hover{background-color:#e33f3b}#primary-navbar .navbar nav .nav li.active a,#primary-navbar .navbar nav .nav li:hover a{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#primary-navbar .navbar nav .nav li:hover a.fonticon:before{color:#fff}#primary-navbar .navbar nav .nav li.active a.fonticon:before,#primary-navbar .navbar nav .nav li:hover a.fonticon:before{text-shadow:2px 2px rgba(0,0,0,.2);color:#fff}#primary-navbar .navbar nav .nav li a{padding:17px 25px 12px 60px;background-color:transparent;color:#fff;text-shadow:1px 2px rgba(0,0,0,0)}#primary-navbar .navbar nav .nav li a.closeMenu{color:transparent}#primary-navbar .navbar nav .nav li a span.fonticon{position:relative}#primary-navbar .navbar nav .nav li a span.fonticon:before{position:absolute;top:-5px;left:-44px;font-size:28px;color:#3a2c2b;text-shadow:2px 2px rgba(0,0,0,0)}.closeMenu #primary-navbar .navbar nav .nav li a{color:transparent}#primary-navbar .navbar nav ul#footer-nav-links li{background-color:#3a2c2b;border-top:1px solid #e33f3b;border-bottom:0;font-size:12px;padding:12px;min-height:44px}#primary-navbar .navbar nav ul#footer-nav-links li.active,#primary-navbar .navbar nav ul#footer-nav-links li:hover{background-color:#da4f49;border-top:1px solid #e33f3b}#primary-navbar .navbar nav ul#footer-nav-links li.active a,#primary-navbar .navbar nav ul#footer-nav-links li:hover a{color:#fff}#primary-navbar .navbar nav ul#footer-nav-links li a{color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links{margin-top:0}#primary-navbar .navbar nav ul#bottom-nav-links li{min-height:46px;background-color:#554d4c}#primary-navbar .navbar nav ul#bottom-nav-links li.active{background-color:#da4f49}#primary-navbar .navbar nav ul#bottom-nav-links li:hover{background-color:#e33f3b}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon{position:relative}#primary-navbar .navbar nav ul#bottom-nav-links li a.fonticon:before{left:-40px;font-size:22px}#dashboard{max-width:1500px;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);border-left:1px solid #999;position:absolute;left:220px;margin-left:0;background-color:#f2f2f2;min-width:600px;height:100%}.closeMenu #dashboard{left:62px}#dashboard.one-pane{min-width:800px;margin-top:0}#dashboard-content{padding:20px}#dashboard-content.row-fluid,#dashboard-content.window-resizeable{margin-left:0}.with-sidebar #dashboard-content{border-left:1px solid #999;border-right:1px solid #999;width:auto;-webkit-box-shadow:-6px 0 rgba(0,0,0,.1);-moz-box-shadow:-6px 0 rgba(0,0,0,.1);box-shadow:-6px 0 rgba(0,0,0,.1);padding:0;bottom:0;top:60px;position:absolute;overflow-x:hidden;overflow-y:auto;left:330px;right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-content>div.inner{display:block}.with-sidebar.content-area{position:absolute;top:0;bottom:0;left:0;right:0}.row-fluid.content-area{background-color:#f2f2f2}.fixed-header{background-color:#f1f1f1;position:fixed;top:0;right:0;left:220px;border-bottom:5px solid #e33f3b;-webkit-box-shadow:0 4px 6px -2px gray;-moz-box-shadow:0 4px 6px -2px gray;box-shadow:0 4px 6px -2px gray;z-index:100}.closeMenu .fixed-header{left:62px}.one-pane .fixed-header{position:relative;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;left:auto}#breadcrumbs{padding:15px 20px}#breadcrumbs .breadcrumb{margin-bottom:0;background-color:transparent;padding:0}#breadcrumbs .breadcrumb li{color:#e33f3b;font-size:18px;text-shadow:none}#breadcrumbs .breadcrumb li .divider{font-size:12px;color:#999}#breadcrumbs .breadcrumb li:first-child{font-size:30px}#breadcrumbs .breadcrumb li.active{color:#333}#breadcrumbs .breadcrumb li a{color:#e33f3b}footer#mainFooter{position:fixed;bottom:0}.topmenu-defaults{height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#dashboard-upper-menu{position:fixed;z-index:11;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#CBCBCB}#dashboard-lower-content{padding:20px;background-color:#F1F1F1}#dashboard-upper-content .well{padding:20px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#sidenav{padding:0}#sidenav header{width:330px;-webkit-box-shadow:inset -7px 0 15px -6px #000;-moz-box-shadow:inset -7px 0 15px -6px #000;box-shadow:inset -7px 0 15px -6px #000;background:transparent url(../img/linen.png) repeat 0 0;height:70px;padding:12px 10px 0;border-bottom:1px solid #af2d24;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sidenav nav .nav-list .divider{border:0}#sidenav nav .nav-list li.active a{background-color:#af2d24;color:#fff}#sidenav nav .nav-list a{display:block;padding:10px 5px 10px 15px;color:#333;border-bottom:1px solid #989898}#sidenav nav .nav-list .nav-header{background-color:#B2B2B2;padding:5px;text-shadow:none;color:#333;border-bottom:1px solid #989898}#sidebar-content{-webkit-box-shadow:-7px 0 15px -6px #000;-moz-box-shadow:-7px 0 15px -6px #000;box-shadow:-7px 0 15px -6px #000;position:absolute;bottom:0;top:60px;width:330px;left:0;overflow-x:hidden;overflow-y:auto;background-color:#e4dfdc}#sidebar-content>div.inner{display:block}.result-tools{padding:5px 0;border-bottom:1px solid #999;padding:10px 0;float:left;width:100%;margin-bottom:10px}.navbar-form.pull-right.database-search{margin:-10px 50px 12px 0;padding:11px}.navbar-form.pull-right.database-search input[type=text]{margin-top:0}#db-views-tabs-nav{position:fixed;z-index:12;margin-top:31px;margin-bottom:0;padding:0 20px}.db-views-smaller{max-width:500px}.nav-tabs>li{margin-right:2px}.nav-tabs>li>a{cursor:pointer;color:#333;border-color:#eee #eee #ddd;text-decoration:none;background-color:#eee;border-radius:0;border-left:0;border-right:0}.nav-tabs>li>a.fonticon:before{margin-right:6px;font-size:16px}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{background-color:#da4f49;border-top:1px solid #e33f3b;color:#fff}.tab-content{margin-top:70px}.well .controls-group{margin-bottom:8px}.well .controls-group:first-child,.well .controls-group:last-child{margin-top:24px}.well .controls-row{margin-bottom:8px}table.table{table-layout:fixed}table tr td{word-wrap:break-word}table tr td.select{width:20px}table.databases{clear:both}thead{border-bottom:2px solid #e33f3b}tbody{padding-top:10px}.table-condensed td{padding:18px 5px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#F7F7F7}.btn-group>.btn+.dropdown-toggle,.btn-group>.btn:first-child,.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-image:none;text-shadow:none}.btn{padding-top:12px;padding-bottom:12px;margin-top:0}.button{padding:10px 15px;cursor:pointer;-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;border:0;background-color:#e33f3b;color:#fff;padding:10px}.button:before{padding-right:5px}.button.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button.outlineGray:hover{border:1px solid #f3622d}.button.gray{background-color:#ddd;color:#333}.button.green{background-color:#7fa30c}.button.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button,a.button:visited,a.button:active{color:#fff}.button:disabled{opacity:.5}.button .icon{margin-right:10px;font-size:20px}.button:hover{color:#fff;text-decoration:none}.button-style{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}.button-style:before{padding-right:5px}.button-style.outlineGray{border:1px solid #999;background-color:transparent;color:#333}.button-style.outlineGray:hover{border:1px solid #f3622d}.button-style.gray{background-color:#ddd;color:#333}.button-style.green{background-color:#7fa30c}.button-style.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.button-style .icon{margin-right:10px;font-size:20px}.button-style:hover{color:#fff;text-decoration:none;background-color:#f3622d}a.button-style,a.button-style:visited,a.button-style:active{color:#fff}.button-style:disabled{opacity:.5}a.button,a.button:visited,a.button:active{background-color:#e33f3b;color:#fff;padding:10px 15px;cursor:pointer}a.button:before,a.button:visited:before,a.button:active:before{padding-right:5px}a.button.outlineGray,a.button:visited.outlineGray,a.button:active.outlineGray{border:1px solid #999;background-color:transparent;color:#333}a.button.outlineGray:hover,a.button:visited.outlineGray:hover,a.button:active.outlineGray:hover{border:1px solid #f3622d}a.button.gray,a.button:visited.gray,a.button:active.gray{background-color:#ddd;color:#333}a.button.green,a.button:visited.green,a.button:active.green{background-color:#7fa30c}a.button.round-btn,a.button:visited.round-btn,a.button:active.round-btn{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}a.button .icon,a.button:visited .icon,a.button:active .icon{margin-right:10px;font-size:20px}a.button:hover,a.button:visited:hover,a.button:active:hover{color:#fff;text-decoration:none;background-color:#f3622d}aa.button,aa.button:visited,aa.button:active,aa.button:visited,aa.button:visited:visited,aa.button:active:visited,aa.button:active,aa.button:visited:active,aa.button:active:active{color:#fff}a.button:disabled,a.button:visited:disabled,a.button:active:disabled{opacity:.5}.select>a{display:block;padding:5px 15px 5px 5px;border:1px solid #989898;position:relative;background-color:#FFF;color:#666}.select>a:after{content:'';width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #989898;position:absolute;right:9px;top:12px}.select>a:before{content:'';border-left:1px solid #989898;height:30px;position:absolute;right:30px;top:0}input[type=text],input[type=password],.navbar-form input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;padding:12px;border:1px solid #ccc;height:auto;font-size:16px;margin-top:0}label.fonticon-search{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}label.fonticon-search:before{-webkit-transition:all .25s linear;-moz-transition:all .25s linear;-o-transition:all .25s linear;transition:all .25s linear;font-size:16px;position:absolute;right:-47px;background-color:#E1E1E1;height:46px;width:48px;border:1px solid #ccc;padding:14px;top:-4px}label.fonticon-search:hover{color:#fff}label.fonticon-search:hover:before{background-color:#e33f3b}.form-inline input[type=password],.form-inline input[type=text]{width:auto}*,:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=file],input[type=checkbox],input[type=radio],select{margin:0 0 1em}.well select{margin:0}form.custom .hidden-field{margin-left:-99999px;position:absolute;visibility:hidden}.checkbox label{display:inline-block;padding-left:25px}label{margin-right:15px;padding-left:0;display:block;cursor:pointer;position:relative;font-size:14px}label.inline{display:inline-block}.help-block{font-size:12px}input[type=text].error{border:red 1px solid}.custom-inputs input[type=radio],.custom-inputs input[type=checkbox]{display:none}.custom-inputs .checkbox label:before{border-radius:3px}.custom-inputs .controls>.radio:first-child,.custom-inputs .controls>.checkbox:first-child{padding-top:15px}.custom-inputs .radio.inline,.custom-inputs .checkbox.inline{display:inline-block;padding-top:15px;margin-bottom:12px;vertical-align:middle}.custom-inputs input[type=checkbox]:checked+label:before{content:"\00d7";text-shadow:1px 1px 1px rgba(0,0,0,.2);font-size:16px;background-color:#e33f3b;color:#fff;text-align:center;line-height:15px}.custom-inputs label:before{content:"";display:inline-block;width:16px;height:16px;margin-right:10px;position:absolute;left:0;bottom:1px;background-color:#aaa;box-shadow:inset 0 2px 3px 0 rgba(0,0,0,.3),0 1px 0 0 rgba(255,255,255,.8)}.custom-inputs .radio label:before{border-radius:8px}.custom-inputs input[type=radio]:checked+label:before{content:"\2022";color:#f3f3f3;font-size:30px;text-align:center;line-height:18px}.custom-inputs label.drop-down:before{display:none}form.view-query-update,form.view-query-save{max-width:100%}.form-actions{background:0;border:0}.input-append .add-on,.input-prepend .add-on{font-size:18px;padding:14px 5px 30px}.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{padding:10px 5px 14px}.input-append .btn{padding:10px 5px 14px}.row-fluid .input-append [class*=span],.input-prepend input[class*=span]{width:auto}pre.prettyprint{background:#E5E0DD;border:0}.prettyprint .str,.prettyprint .lit{color:#e33f3b}.prettyprint .pln,.prettyprint .pun,.prettyprint .typ{color:#333}tr.all-docs-item{border:0;background:transparent}#log-sidebar{padding:20px}.view.show{color:gray}div.spinner{position:absolute;left:50%;top:50%}.CodeMirror-scroll{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:solid 1px #ddd}.btn-primary a:visited{color:#fff}#api-navbar{position:relative}.button.api-url-btn{position:absolute;right:15px;top:-50px}.button.api-url-btn span.icon{font-size:11px}.api-navbar{border-top:1px solid #e33f3b;padding:20px 20px 15px}.api-navbar .input-append.input-prepend{margin-bottom:0}.api-navbar .input-append.input-prepend .add-on{background:0;padding:14px 12px 32px;border:0}.api-navbar .input-append.input-prepend .btn:last-child{margin-left:-1px;background:0;padding:13px 12px 11px}.api-navbar .input-append.input-prepend .btn:last-child:hover{background-color:#e33f3b;color:#fff}#jump-to-doc,#jump-to-db{width:auto;float:right}#jump-to-doc button,#jump-to-db button{padding-left:20px;padding-right:10px}#map-function,#reduce-function{width:100%;font-size:16px}#editor-container{width:1316px;height:688px;font-size:16px}#delete-database{float:right}.border-hdr{border-bottom:1px solid #E3E3E3;margin-bottom:10px}.border-hdr h3{text-transform:capitalize;margin-bottom:0}.permission-items.unstyled{margin-left:0}.permission-items.unstyled li{padding:5px;border-bottom:1px solid #E3E3E3;border-right:1px solid #E3E3E3;border-left:3px solid #E3E3E3}.permission-items.unstyled li:first-child{border-top:1px solid #E3E3E3}.permission-items.unstyled li:nth-child(odd){border-left:3px solid red}.permission-items.unstyled li button{float:right;margin-bottom:6px}form#replication{position:relative;max-width:none;width:auto}form#replication .form_set{width:350px;display:inline-block;border:1px solid #a59d9d;padding:15px 10px 0;margin-bottom:20px}form#replication .form_set.middle{width:100px;border:0;position:relative;height:100px;margin:0}form#replication .form_set input,form#replication .form_set select{margin:0 0 16px 5px;height:40px;width:318px}form#replication .form_set .btn-group{margin:0 0 16px 5px}form#replication .form_set .btn-group .btn{padding:10px 57px}form#replication .form_set.local .local_option{display:block}form#replication .form_set.local .remote_option{display:none}form#replication .form_set.local .local-btn{background-color:#e33f3b;color:#fff}form#replication .form_set.local .remote-btn{background-color:#f5f5f5;color:gray}form#replication .form_set .local_option{display:none}form#replication .form_set .remote-btn{background-color:#e33f3b;color:#fff}form#replication .options{position:relative}form#replication .options:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000;border-top:0}form#replication .options.off:after{content:'';display:block;position:absolute;right:-16px;top:9px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:0;border-top:5px solid #000}form#replication .control-group label{float:left;min-height:30px;vertical-align:top;padding-right:5px;min-width:130px;padding-left:0}form#replication .control-group input[type=radio],form#replication .control-group input[type=checkbox]{margin:0 0 2px}form#replication .circle{z-index:0;position:absolute;top:20px;left:15px}form#replication .circle:after{width:70px;height:70px;content:'';display:block;position:relative;margin:0 auto;border:1px solid #a59d9d;-webkit-border-radius:40px;-moz-border-radius:40px;border-radius:40px}form#replication .swap{text-decoration:none;z-index:30;cursor:pointer;position:absolute;font-size:40px;width:27px;height:12px;top:31px;left:30px}form#replication .swap:hover{color:#a59d9d}#replicationStatus.showHeader li.header{display:block;border:0}#replicationStatus.showHeader ul{border:1px solid #a59d9d}#replicationStatus li.header{display:none}#replicationStatus ul{margin:0}#replicationStatus ul li{padding:10px;margin:0;list-style:none;border-top:1px solid #a59d9d}#replicationStatus ul li .progress,#replicationStatus ul li p{margin:0;vertical-align:bottom}#replicationStatus ul li .progress.break,#replicationStatus ul li p.break{-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.datatypes{border:#d3d3d3 1px solid;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:15px}#start{margin-bottom:20px}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer}.chartWrap{margin:0;padding:0;overflow:hidden}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);padding:10px;border:1px solid #ddd;z-index:10000;font-family:Arial;font-size:13px;transition:opacity 500ms linear;-moz-transition:opacity 500ms linear;-webkit-transition:opacity 500ms linear;transition-delay:500ms;-moz-transition-delay:500ms;-webkit-transition-delay:500ms;-moz-box-shadow:4px 4px 8px rgba(0,0,0,.5);-webkit-box-shadow:4px 4px 8px rgba(0,0,0,.5);box-shadow:4px 4px 8px rgba(0,0,0,.5);-moz-border-radius:10px;border-radius:10px;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip h3{margin:0;padding:0;text-align:center}.nvtooltip p{margin:0;padding:0;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip-pending-removal{position:absolute;pointer-events:none}svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;height:100%}svg text{font:400 12px Arial}svg .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:bolf}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .disabled circle{fill-opacity:0}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#000;stroke-opacity:.25;shape-rendering:crispEdges}.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-bars .negative rect{zfill:brown}.nvd3 .nv-bars rect{zfill:steelblue;fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect:hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:lightblue}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups path.nv-line{fill:none;stroke-width:2.5px}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3 .nv-line.hover path{stroke-width:6px}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;fill-opacity:.5!important;stroke-opacity:.5!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}.nvd3 .nv-distribution{pointer-events:none}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvd3.nv-stackedarea .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.75;fill-opacity:1}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#999;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:4px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel{font-weight:700}.nvd3.nv-historicalStockChart .nv-dragTarget{fill-opacity:0;stroke:none;cursor:move}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-indentedtree .name{margin-left:5px}.nvd3.nv-indentedtree .clickable{color:#08C;cursor:pointer}.nvd3.nv-indentedtree span.clickable:hover{color:#005580;text-decoration:underline}.nvd3.nv-indentedtree .nv-childrenCount{display:inline-block;margin-left:5px}.nvd3.nv-indentedtree .nv-treeicon{cursor:pointer}.nvd3.nv-indentedtree .nv-treeicon.nv-folded{cursor:pointer}
\ No newline at end of file
diff --git a/fauxton/js/ace/mode-javascript.js b/fauxton/js/ace/mode-javascript.js
new file mode 100644
index 0000000..c9e6f50
--- /dev/null
+++ b/fauxton/js/ace/mode-javascript.js
@@ -0,0 +1,886 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+    this.HighlightRules = JavaScriptHighlightRules;
+    
+    this.$outdent = new MatchingBraceOutdent();
+    this.$behaviour = new CstyleBehaviour();
+    this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+    this.lineCommentStart = "//";
+    this.blockComment = {start: "/*", end: "*/"};
+
+    this.getNextLineIndent = function(state, line, tab) {
+        var indent = this.$getIndent(line);
+
+        var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+        var tokens = tokenizedLine.tokens;
+        var endState = tokenizedLine.state;
+
+        if (tokens.length && tokens[tokens.length-1].type == "comment") {
+            return indent;
+        }
+
+        if (state == "start" || state == "no_regex") {
+            var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+            if (match) {
+                indent += tab;
+            }
+        } else if (state == "doc-start") {
+            if (endState == "start" || endState == "no_regex") {
+                return "";
+            }
+            var match = line.match(/^\s*(\/?)\*/);
+            if (match) {
+                if (match[1]) {
+                    indent += " ";
+                }
+                indent += "* ";
+            }
+        }
+
+        return indent;
+    };
+
+    this.checkOutdent = function(state, line, input) {
+        return this.$outdent.checkOutdent(line, input);
+    };
+
+    this.autoOutdent = function(state, doc, row) {
+        this.$outdent.autoOutdent(doc, row);
+    };
+
+    this.createWorker = function(session) {
+        var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+        worker.attachToDocument(session.getDocument());
+
+        worker.on("jslint", function(results) {
+            session.setAnnotations(results.data);
+        });
+
+        worker.on("terminate", function() {
+            session.clearAnnotations();
+        });
+
+        return worker;
+    };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+    var keywordMapper = this.createKeywordMapper({
+        "variable.language":
+            "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|"  + // Constructors
+            "Namespace|QName|XML|XMLList|"                                             + // E4X
+            "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|"   +
+            "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|"                    +
+            "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|"   + // Errors
+            "SyntaxError|TypeError|URIError|"                                          +
+            "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+            "isNaN|parseFloat|parseInt|"                                               +
+            "JSON|Math|"                                                               + // Other
+            "this|arguments|prototype|window|document"                                 , // Pseudo
+        "keyword":
+            "const|yield|import|get|set|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+            "__parent__|__count__|escape|unescape|with|__proto__|" +
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+        "storage.type":
+            "const|let|var|function",
+        "constant.language":
+            "null|Infinity|NaN|undefined",
+        "support.function":
+            "alert",
+        "constant.language.boolean": "true|false"
+    }, "identifier");
+    var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+    var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+    var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+        "u[0-9a-fA-F]{4}|" + // unicode
+        "[0-2][0-7]{0,2}|" + // oct
+        "3[0-6][0-7]?|" + // oct
+        "37[0-7]?|" + // oct
+        "[4-7][0-7]?|" + //oct
+        ".)";
+
+    this.$rules = {
+        "no_regex" : [
+            {
+                token : "comment",
+                regex : "\\/\\/",
+                next : "line_comment"
+            },
+            DocCommentHighlightRules.getStartRule("doc-start"),
+            {
+                token : "comment", // multi line comment
+                regex : /\/\*/,
+                next : "comment"
+            }, {
+                token : "string",
+                regex : "'(?=.)",
+                next  : "qstring"
+            }, {
+                token : "string",
+                regex : '"(?=.)',
+                next  : "qqstring"
+            }, {
+                token : "constant.numeric", // hex
+                regex : /0[xX][0-9a-fA-F]+\b/
+            }, {
+                token : "constant.numeric", // float
+                regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+            }, {
+                token : [
+                    "storage.type", "punctuation.operator", "support.function",
+                    "punctuation.operator", "entity.name.function", "text","keyword.operator"
+                ],
+                regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "storage.type", "punctuation.operator", "entity.name.function", "text",
+                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+                    "text", "paren.lparen"
+                ],
+                regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "storage.type", "punctuation.operator", "entity.name.function", "text",
+                    "keyword.operator", "text",
+                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                ],
+                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                ],
+                regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "entity.name.function", "text", "punctuation.operator",
+                    "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : [
+                    "text", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex : "(:)(\\s*)(function)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token : "keyword",
+                regex : "(?:" + kwBeforeRe + ")\\b",
+                next : "start"
+            }, {
+                token : ["punctuation.operator", "support.function"],
+                regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+            }, {
+                token : ["punctuation.operator", "support.function.dom"],
+                regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+            }, {
+                token : ["punctuation.operator", "support.constant"],
+                regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+            }, {
+                token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+                regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+            }, {
+                token : keywordMapper,
+                regex : identifierRe
+            }, {
+                token : "keyword.operator",
+                regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+                next  : "start"
+            }, {
+                token : "punctuation.operator",
+                regex : /\?|\:|\,|\;|\./,
+                next  : "start"
+            }, {
+                token : "paren.lparen",
+                regex : /[\[({]/,
+                next  : "start"
+            }, {
+                token : "paren.rparen",
+                regex : /[\])}]/
+            }, {
+                token : "keyword.operator",
+                regex : /\/=?/,
+                next  : "start"
+            }, {
+                token: "comment",
+                regex: /^#!.*$/
+            }
+        ],
+        "start": [
+            DocCommentHighlightRules.getStartRule("doc-start"),
+            {
+                token : "comment", // multi line comment
+                regex : "\\/\\*",
+                next : "comment_regex_allowed"
+            }, {
+                token : "comment",
+                regex : "\\/\\/",
+                next : "line_comment_regex_allowed"
+            }, {
+                token: "string.regexp",
+                regex: "\\/",
+                next: "regex"
+            }, {
+                token : "text",
+                regex : "\\s+|^$",
+                next : "start"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
+        "regex": [
+            {
+                token: "regexp.keyword.operator",
+                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+            }, {
+                token: "string.regexp",
+                regex: "/\\w*",
+                next: "no_regex"
+            }, {
+                token : "invalid",
+                regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+            }, {
+                token : "constant.language.escape",
+                regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+            }, {
+                token : "constant.language.delimiter",
+                regex: /\|/
+            }, {
+                token: "constant.language.escape",
+                regex: /\[\^?/,
+                next: "regex_character_class"
+            }, {
+                token: "empty",
+                regex: "$",
+                next: "no_regex"
+            }, {
+                defaultToken: "string.regexp"
+            }
+        ],
+        "regex_character_class": [
+            {
+                token: "regexp.keyword.operator",
+                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+            }, {
+                token: "constant.language.escape",
+                regex: "]",
+                next: "regex"
+            }, {
+                token: "constant.language.escape",
+                regex: "-"
+            }, {
+                token: "empty",
+                regex: "$",
+                next: "no_regex"
+            }, {
+                defaultToken: "string.regexp.charachterclass"
+            }
+        ],
+        "function_arguments": [
+            {
+                token: "variable.parameter",
+                regex: identifierRe
+            }, {
+                token: "punctuation.operator",
+                regex: "[, ]+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
+        "comment_regex_allowed" : [
+            {token : "comment", regex : "\\*\\/", next : "start"},
+            {defaultToken : "comment"}
+        ],
+        "comment" : [
+            {token : "comment", regex : "\\*\\/", next : "no_regex"},
+            {defaultToken : "comment"}
+        ],
+        "line_comment_regex_allowed" : [
+            {token : "comment", regex : "$|^", next : "start"},
+            {defaultToken : "comment"}
+        ],
+        "line_comment" : [
+            {token : "comment", regex : "$|^", next : "no_regex"},
+            {defaultToken : "comment"}
+        ],
+        "qqstring" : [
+            {
+                token : "constant.language.escape",
+                regex : escapedRe
+            }, {
+                token : "string",
+                regex : "\\\\$",
+                next  : "qqstring"
+            }, {
+                token : "string",
+                regex : '"|$',
+                next  : "no_regex"
+            }, {
+                defaultToken: "string"
+            }
+        ],
+        "qstring" : [
+            {
+                token : "constant.language.escape",
+                regex : escapedRe
+            }, {
+                token : "string",
+                regex : "\\\\$",
+                next  : "qstring"
+            }, {
+                token : "string",
+                regex : "'|$",
+                next  : "no_regex"
+            }, {
+                defaultToken: "string"
+            }
+        ]
+    };
+
+    this.embedRules(DocCommentHighlightRules, "doc-",
+        [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+    this.$rules = {
+        "start" : [ {
+            token : "comment.doc.tag",
+            regex : "@[\\w\\d_]+" // TODO: fix email addresses
+        }, {
+            token : "comment.doc.tag",
+            regex : "\\bTODO\\b"
+        }, {
+            defaultToken : "comment.doc"
+        }]
+    };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+    return {
+        token : "comment.doc", // doc comment
+        regex : "\\/\\*(?=\\*)",
+        next  : start
+    };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+    return {
+        token : "comment.doc", // closing comment
+        regex : "\\*\\/",
+        next  : start
+    };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+    this.checkOutdent = function(line, input) {
+        if (! /^\s+$/.test(line))
+            return false;
+
+        return /^\s*\}/.test(input);
+    };
+
+    this.autoOutdent = function(doc, row) {
+        var line = doc.getLine(row);
+        var match = line.match(/^(\s*\})/);
+
+        if (!match) return 0;
+
+        var column = match[1].length;
+        var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+        if (!openBracePos || openBracePos.row == row) return 0;
+
+        var indent = this.$getIndent(doc.getLine(openBracePos.row));
+        doc.replace(new Range(row, 0, row, column-1), indent);
+    };
+
+    this.$getIndent = function(line) {
+        return line.match(/^\s*/)[0];
+    };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+    
+    CstyleBehaviour.isSaneInsertion = function(editor, session) {
+        var cursor = editor.getCursorPosition();
+        var iterator = new TokenIterator(session, cursor.row, cursor.column);
+        if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+            var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+            if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+                return false;
+        }
+        iterator.stepForward();
+        return iterator.getCurrentTokenRow() !== cursor.row ||
+            this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+    };
+    
+    CstyleBehaviour.$matchTokenType = function(token, types) {
+        return types.indexOf(token.type || token) > -1;
+    };
+    
+    CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+            autoInsertedBrackets = 0;
+        autoInsertedRow = cursor.row;
+        autoInsertedLineEnd = bracket + line.substr(cursor.column);
+        autoInsertedBrackets++;
+    };
+    
+    CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (!this.isMaybeInsertedClosing(cursor, line))
+            maybeInsertedBrackets = 0;
+        maybeInsertedRow = cursor.row;
+        maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+        maybeInsertedLineEnd = line.substr(cursor.column);
+        maybeInsertedBrackets++;
+    };
+    
+    CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+        return autoInsertedBrackets > 0 &&
+            cursor.row === autoInsertedRow &&
+            bracket === autoInsertedLineEnd[0] &&
+            line.substr(cursor.column) === autoInsertedLineEnd;
+    };
+    
+    CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+        return maybeInsertedBrackets > 0 &&
+            cursor.row === maybeInsertedRow &&
+            line.substr(cursor.column) === maybeInsertedLineEnd &&
+            line.substr(0, cursor.column) == maybeInsertedLineStart;
+    };
+    
+    CstyleBehaviour.popAutoInsertedClosing = function() {
+        autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+        autoInsertedBrackets--;
+    };
+    
+    CstyleBehaviour.clearMaybeInsertedClosing = function() {
+        maybeInsertedBrackets = 0;
+        maybeInsertedRow = -1;
+    };
+
+    this.add("braces", "insertion", function (state, action, editor, session, text) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (text == '{') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '{' + selected + '}',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                if (/[\]\}\)]/.test(line[cursor.column])) {
+                    CstyleBehaviour.recordAutoInsert(editor, session, "}");
+                    return {
+                        text: '{}',
+                        selection: [1, 1]
+                    };
+                } else {
+                    CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+                    return {
+                        text: '{',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == '}') {
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == '}') {
+                var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == "\n" || text == "\r\n") {
+            var closing = "";
+            if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+                closing = lang.stringRepeat("}", maybeInsertedBrackets);
+                CstyleBehaviour.clearMaybeInsertedClosing();
+            }
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == '}' || closing !== "") {
+                var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+                if (!openBracePos)
+                     return null;
+
+                var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+                var next_indent = this.$getIndent(line);
+
+                return {
+                    text: '\n' + indent + '\n' + next_indent + closing,
+                    selection: [1, indent.length, 1, indent.length]
+                };
+            }
+        }
+    });
+
+    this.add("braces", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '{') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.end.column, range.end.column + 1);
+            if (rightChar == '}') {
+                range.end.column++;
+                return range;
+            } else {
+                maybeInsertedBrackets--;
+            }
+        }
+    });
+
+    this.add("parens", "insertion", function (state, action, editor, session, text) {
+        if (text == '(') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '(' + selected + ')',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, ")");
+                return {
+                    text: '()',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ')') {
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ')') {
+                var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("parens", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '(') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ')') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("brackets", "insertion", function (state, action, editor, session, text) {
+        if (text == '[') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '[' + selected + ']',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, "]");
+                return {
+                    text: '[]',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ']') {
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ']') {
+                var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("brackets", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '[') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ']') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            } else {
+                var cursor = editor.getCursorPosition();
+                var line = session.doc.getLine(cursor.row);
+                var leftChar = line.substring(cursor.column-1, cursor.column);
+                if (leftChar == '\\') {
+                    return null;
+                }
+                var tokens = session.getTokens(selection.start.row);
+                var col = 0, token;
+                var quotepos = -1; // Track whether we're inside an open quote.
+
+                for (var x = 0; x < tokens.length; x++) {
+                    token = tokens[x];
+                    if (token.type == "string") {
+                      quotepos = -1;
+                    } else if (quotepos < 0) {
+                      quotepos = token.value.indexOf(quote);
+                    }
+                    if ((token.value.length + col) > selection.start.column) {
+                        break;
+                    }
+                    col += tokens[x].value.length;
+                }
+                if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+                    if (!CstyleBehaviour.isSaneInsertion(editor, session))
+                        return;
+                    return {
+                        text: quote + quote,
+                        selection: [1,1]
+                    };
+                } else if (token && token.type === "string") {
+                    var rightChar = line.substring(cursor.column, cursor.column + 1);
+                    if (rightChar == quote) {
+                        return {
+                            text: '',
+                            selection: [1, 1]
+                        };
+                    }
+                }
+            }
+        }
+    });
+
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(
+            this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+        );
+        this.foldingStopMarker = new RegExp(
+            this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+        );
+    }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+    this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+    this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+    this.getFoldWidgetRange = function(session, foldStyle, row) {
+        var line = session.getLine(row);
+        var match = line.match(this.foldingStartMarker);
+        if (match) {
+            var i = match.index;
+
+            if (match[1])
+                return this.openingBracketBlock(session, match[1], row, i);
+
+            return session.getCommentFoldRange(row, i + match[0].length, 1);
+        }
+
+        if (foldStyle !== "markbeginend")
+            return;
+
+        var match = line.match(this.foldingStopMarker);
+        if (match) {
+            var i = match.index + match[0].length;
+
+            if (match[1])
+                return this.closingBracketBlock(session, match[1], row, i);
+
+            return session.getCommentFoldRange(row, i, -1);
+        }
+    };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/fauxton/js/ace/mode-json.js b/fauxton/js/ace/mode-json.js
new file mode 100644
index 0000000..d1b3d47
--- /dev/null
+++ b/fauxton/js/ace/mode-json.js
@@ -0,0 +1,578 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define('ace/mode/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+    this.HighlightRules = HighlightRules;
+    this.$outdent = new MatchingBraceOutdent();
+    this.$behaviour = new CstyleBehaviour();
+    this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+    this.getNextLineIndent = function(state, line, tab) {
+        var indent = this.$getIndent(line);
+
+        if (state == "start") {
+            var match = line.match(/^.*[\{\(\[]\s*$/);
+            if (match) {
+                indent += tab;
+            }
+        }
+
+        return indent;
+    };
+
+    this.checkOutdent = function(state, line, input) {
+        return this.$outdent.checkOutdent(line, input);
+    };
+
+    this.autoOutdent = function(state, doc, row) {
+        this.$outdent.autoOutdent(doc, row);
+    };
+
+    this.createWorker = function(session) {
+        var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
+        worker.attachToDocument(session.getDocument());
+
+        worker.on("error", function(e) {
+            session.setAnnotations([e.data]);
+        });
+
+        worker.on("ok", function() {
+            session.clearAnnotations();
+        });
+
+        return worker;
+    };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JsonHighlightRules = function() {
+    this.$rules = {
+        "start" : [
+            {
+                token : "variable", // single line
+                regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
+            }, {
+                token : "string", // single line
+                regex : '"',
+                next  : "string"
+            }, {
+                token : "constant.numeric", // hex
+                regex : "0[xX][0-9a-fA-F]+\\b"
+            }, {
+                token : "constant.numeric", // float
+                regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+            }, {
+                token : "constant.language.boolean",
+                regex : "(?:true|false)\\b"
+            }, {
+                token : "invalid.illegal", // single quoted strings are not allowed
+                regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+            }, {
+                token : "invalid.illegal", // comments are not allowed
+                regex : "\\/\\/.*$"
+            }, {
+                token : "paren.lparen",
+                regex : "[[({]"
+            }, {
+                token : "paren.rparen",
+                regex : "[\\])}]"
+            }, {
+                token : "text",
+                regex : "\\s+"
+            }
+        ],
+        "string" : [
+            {
+                token : "constant.language.escape",
+                regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
+            }, {
+                token : "string",
+                regex : '[^"\\\\]+'
+            }, {
+                token : "string",
+                regex : '"',
+                next  : "start"
+            }, {
+                token : "string",
+                regex : "",
+                next  : "start"
+            }
+        ]
+    };
+    
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
+
+define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
+
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+    this.checkOutdent = function(line, input) {
+        if (! /^\s+$/.test(line))
+            return false;
+
+        return /^\s*\}/.test(input);
+    };
+
+    this.autoOutdent = function(doc, row) {
+        var line = doc.getLine(row);
+        var match = line.match(/^(\s*\})/);
+
+        if (!match) return 0;
+
+        var column = match[1].length;
+        var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+        if (!openBracePos || openBracePos.row == row) return 0;
+
+        var indent = this.$getIndent(doc.getLine(openBracePos.row));
+        doc.replace(new Range(row, 0, row, column-1), indent);
+    };
+
+    this.$getIndent = function(line) {
+        return line.match(/^\s*/)[0];
+    };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+    
+    CstyleBehaviour.isSaneInsertion = function(editor, session) {
+        var cursor = editor.getCursorPosition();
+        var iterator = new TokenIterator(session, cursor.row, cursor.column);
+        if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+            var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+            if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+                return false;
+        }
+        iterator.stepForward();
+        return iterator.getCurrentTokenRow() !== cursor.row ||
+            this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+    };
+    
+    CstyleBehaviour.$matchTokenType = function(token, types) {
+        return types.indexOf(token.type || token) > -1;
+    };
+    
+    CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+            autoInsertedBrackets = 0;
+        autoInsertedRow = cursor.row;
+        autoInsertedLineEnd = bracket + line.substr(cursor.column);
+        autoInsertedBrackets++;
+    };
+    
+    CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (!this.isMaybeInsertedClosing(cursor, line))
+            maybeInsertedBrackets = 0;
+        maybeInsertedRow = cursor.row;
+        maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+        maybeInsertedLineEnd = line.substr(cursor.column);
+        maybeInsertedBrackets++;
+    };
+    
+    CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+        return autoInsertedBrackets > 0 &&
+            cursor.row === autoInsertedRow &&
+            bracket === autoInsertedLineEnd[0] &&
+            line.substr(cursor.column) === autoInsertedLineEnd;
+    };
+    
+    CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+        return maybeInsertedBrackets > 0 &&
+            cursor.row === maybeInsertedRow &&
+            line.substr(cursor.column) === maybeInsertedLineEnd &&
+            line.substr(0, cursor.column) == maybeInsertedLineStart;
+    };
+    
+    CstyleBehaviour.popAutoInsertedClosing = function() {
+        autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+        autoInsertedBrackets--;
+    };
+    
+    CstyleBehaviour.clearMaybeInsertedClosing = function() {
+        maybeInsertedBrackets = 0;
+        maybeInsertedRow = -1;
+    };
+
+    this.add("braces", "insertion", function (state, action, editor, session, text) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (text == '{') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '{' + selected + '}',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                if (/[\]\}\)]/.test(line[cursor.column])) {
+                    CstyleBehaviour.recordAutoInsert(editor, session, "}");
+                    return {
+                        text: '{}',
+                        selection: [1, 1]
+                    };
+                } else {
+                    CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+                    return {
+                        text: '{',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == '}') {
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == '}') {
+                var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == "\n" || text == "\r\n") {
+            var closing = "";
+            if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+                closing = lang.stringRepeat("}", maybeInsertedBrackets);
+                CstyleBehaviour.clearMaybeInsertedClosing();
+            }
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == '}' || closing !== "") {
+                var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+                if (!openBracePos)
+                     return null;
+
+                var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+                var next_indent = this.$getIndent(line);
+
+                return {
+                    text: '\n' + indent + '\n' + next_indent + closing,
+                    selection: [1, indent.length, 1, indent.length]
+                };
+            }
+        }
+    });
+
+    this.add("braces", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '{') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.end.column, range.end.column + 1);
+            if (rightChar == '}') {
+                range.end.column++;
+                return range;
+            } else {
+                maybeInsertedBrackets--;
+            }
+        }
+    });
+
+    this.add("parens", "insertion", function (state, action, editor, session, text) {
+        if (text == '(') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '(' + selected + ')',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, ")");
+                return {
+                    text: '()',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ')') {
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ')') {
+                var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("parens", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '(') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ')') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("brackets", "insertion", function (state, action, editor, session, text) {
+        if (text == '[') {
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: '[' + selected + ']',
+                    selection: false
+                };
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, "]");
+                return {
+                    text: '[]',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ']') {
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ']') {
+                var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("brackets", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '[') {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ']') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            } else {
+                var cursor = editor.getCursorPosition();
+                var line = session.doc.getLine(cursor.row);
+                var leftChar = line.substring(cursor.column-1, cursor.column);
+                if (leftChar == '\\') {
+                    return null;
+                }
+                var tokens = session.getTokens(selection.start.row);
+                var col = 0, token;
+                var quotepos = -1; // Track whether we're inside an open quote.
+
+                for (var x = 0; x < tokens.length; x++) {
+                    token = tokens[x];
+                    if (token.type == "string") {
+                      quotepos = -1;
+                    } else if (quotepos < 0) {
+                      quotepos = token.value.indexOf(quote);
+                    }
+                    if ((token.value.length + col) > selection.start.column) {
+                        break;
+                    }
+                    col += tokens[x].value.length;
+                }
+                if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+                    if (!CstyleBehaviour.isSaneInsertion(editor, session))
+                        return;
+                    return {
+                        text: quote + quote,
+                        selection: [1,1]
+                    };
+                } else if (token && token.type === "string") {
+                    var rightChar = line.substring(cursor.column, cursor.column + 1);
+                    if (rightChar == quote) {
+                        return {
+                            text: '',
+                            selection: [1, 1]
+                        };
+                    }
+                }
+            }
+        }
+    });
+
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
+
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(
+            this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+        );
+        this.foldingStopMarker = new RegExp(
+            this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+        );
+    }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+    this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+    this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+    this.getFoldWidgetRange = function(session, foldStyle, row) {
+        var line = session.getLine(row);
+        var match = line.match(this.foldingStartMarker);
+        if (match) {
+            var i = match.index;
+
+            if (match[1])
+                return this.openingBracketBlock(session, match[1], row, i);
+
+            return session.getCommentFoldRange(row, i + match[0].length, 1);
+        }
+
+        if (foldStyle !== "markbeginend")
+            return;
+
+        var match = line.match(this.foldingStopMarker);
+        if (match) {
+            var i = match.index + match[0].length;
+
+            if (match[1])
+                return this.closingBracketBlock(session, match[1], row, i);
+
+            return session.getCommentFoldRange(row, i, -1);
+        }
+    };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/fauxton/js/ace/theme-crimson_editor.js b/fauxton/js/ace/theme-crimson_editor.js
new file mode 100644
index 0000000..5192579
--- /dev/null
+++ b/fauxton/js/ace/theme-crimson_editor.js
@@ -0,0 +1,148 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define('ace/theme/crimson_editor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
+exports.isDark = false;
+exports.cssText = ".ace-crimson-editor .ace_gutter {\
+background: #ebebeb;\
+color: #333;\
+overflow : hidden;\
+}\
+.ace-crimson-editor .ace_gutter-layer {\
+width: 100%;\
+text-align: right;\
+}\
+.ace-crimson-editor .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-crimson-editor {\
+background-color: #FFFFFF;\
+color: rgb(64, 64, 64);\
+}\
+.ace-crimson-editor .ace_cursor {\
+color: black;\
+}\
+.ace-crimson-editor .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-crimson-editor .ace_identifier {\
+color: black;\
+}\
+.ace-crimson-editor .ace_keyword {\
+color: blue;\
+}\
+.ace-crimson-editor .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-crimson-editor .ace_constant.ace_language {\
+color: rgb(255, 156, 0);\
+}\
+.ace-crimson-editor .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-crimson-editor .ace_invalid {\
+text-decoration: line-through;\
+color: rgb(224, 0, 0);\
+}\
+.ace-crimson-editor .ace_fold {\
+}\
+.ace-crimson-editor .ace_support.ace_function {\
+color: rgb(192, 0, 0);\
+}\
+.ace-crimson-editor .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-crimson-editor .ace_support.ace_type,\
+.ace-crimson-editor .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-crimson-editor .ace_keyword.ace_operator {\
+color: rgb(49, 132, 149);\
+}\
+.ace-crimson-editor .ace_string {\
+color: rgb(128, 0, 128);\
+}\
+.ace-crimson-editor .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-crimson-editor .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-crimson-editor .ace_constant.ace_numeric {\
+color: rgb(0, 0, 64);\
+}\
+.ace-crimson-editor .ace_variable {\
+color: rgb(0, 64, 128);\
+}\
+.ace-crimson-editor .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_active-line {\
+background: rgb(232, 242, 254);\
+}\
+.ace-crimson-editor .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-crimson-editor .ace_meta.ace_tag {\
+color:rgb(28, 2, 255);\
+}\
+.ace-crimson-editor .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-crimson-editor .ace_string.ace_regex {\
+color: rgb(192, 0, 192);\
+}\
+.ace-crimson-editor .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}";
+
+exports.cssClass = "ace-crimson-editor";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/fauxton/js/ace/worker-javascript.js b/fauxton/js/ace/worker-javascript.js
new file mode 100644
index 0000000..5481bed
--- /dev/null
+++ b/fauxton/js/ace/worker-javascript.js
@@ -0,0 +1,10088 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document) {
+    return;
+}
+
+window.console = function() {
+    var msgs = Array.prototype.slice.call(arguments, 0);
+    postMessage({type: "log", data: msgs});
+};
+window.console.error =
+window.console.warn = 
+window.console.log =
+window.console.trace = window.console;
+
+window.window = window;
+window.ace = window;
+
+window.normalizeModule = function(parentId, moduleName) {
+    if (moduleName.indexOf("!") !== -1) {
+        var chunks = moduleName.split("!");
+        return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+    }
+    if (moduleName.charAt(0) == ".") {
+        var base = parentId.split("/").slice(0, -1).join("/");
+        moduleName = (base ? base + "/" : "") + moduleName;
+        
+        while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+            var previous = moduleName;
+            moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+        }
+    }
+    
+    return moduleName;
+};
+
+window.require = function(parentId, id) {
+    if (!id) {
+        id = parentId
+        parentId = null;
+    }
+    if (!id.charAt)
+        throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+    id = window.normalizeModule(parentId, id);
+
+    var module = window.require.modules[id];
+    if (module) {
+        if (!module.initialized) {
+            module.initialized = true;
+            module.exports = module.factory().exports;
+        }
+        return module.exports;
+    }
+    
+    var chunks = id.split("/");
+    if (!window.require.tlns)
+        return console.log("unable to load " + id);
+    chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
+    var path = chunks.join("/") + ".js";
+    
+    window.require.id = id;
+    importScripts(path);
+    return window.require(parentId, id);
+};
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+    if (arguments.length == 2) {
+        factory = deps;
+        if (typeof id != "string") {
+            deps = id;
+            id = window.require.id;
+        }
+    } else if (arguments.length == 1) {
+        factory = id;
+        deps = []
+        id = window.require.id;
+    }
+
+    if (!deps.length)
+        deps = ['require', 'exports', 'module']
+
+    if (id.indexOf("text!") === 0) 
+        return;
+    
+    var req = function(childId) {
+        return window.require(id, childId);
+    };
+
+    window.require.modules[id] = {
+        exports: {},
+        factory: function() {
+            var module = this;
+            var returnExports = factory.apply(this, deps.map(function(dep) {
+              switch(dep) {
+                  case 'require': return req
+                  case 'exports': return module.exports
+                  case 'module':  return module
+                  default:        return req(dep)
+              }
+            }));
+            if (returnExports)
+                module.exports = returnExports;
+            return module;
+        }
+    };
+};
+window.define.amd = {}
+
+window.initBaseUrls  = function initBaseUrls(topLevelNamespaces) {
+    require.tlns = topLevelNamespaces;
+}
+
+window.initSender = function initSender() {
+
+    var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+    var oop = window.require("ace/lib/oop");
+    
+    var Sender = function() {};
+    
+    (function() {
+        
+        oop.implement(this, EventEmitter);
+                
+        this.callback = function(data, callbackId) {
+            postMessage({
+                type: "call",
+                id: callbackId,
+                data: data
+            });
+        };
+    
+        this.emit = function(name, data) {
+            postMessage({
+                type: "event",
+                name: name,
+                data: data
+            });
+        };
+        
+    }).call(Sender.prototype);
+    
+    return new Sender();
+}
+
+window.main = null;
+window.sender = null;
+
+window.onmessage = function(e) {
+    var msg = e.data;
+    if (msg.command) {
+        if (main[msg.command])
+            main[msg.command].apply(main, msg.args);
+        else
+            throw new Error("Unknown command:" + msg.command);
+    }
+    else if (msg.init) {        
+        initBaseUrls(msg.tlns);
+        require("ace/lib/es5-shim");
+        sender = initSender();
+        var clazz = require(msg.module)[msg.classname];
+        main = new clazz(sender);
+    } 
+    else if (msg.event && sender) {
+        sender._emit(msg.event, msg.data);
+    }
+};
+})(this);// https://github.com/kriskowal/es5-shim
+
+define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+    Function.prototype.bind = function bind(that) { // .length is 1
+        var target = this;
+        if (typeof target != "function") {
+            throw new TypeError("Function.prototype.bind called on incompatible " + target);
+        }
+        var args = slice.call(arguments, 1); // for normal call
+        var bound = function () {
+
+            if (this instanceof bound) {
+
+                var result = target.apply(
+                    this,
+                    args.concat(slice.call(arguments))
+                );
+                if (Object(result) === result) {
+                    return result;
+                }
+                return this;
+
+            } else {
+                return target.apply(
+                    that,
+                    args.concat(slice.call(arguments))
+                );
+
+            }
+
+        };
+        if(target.prototype) {
+            Empty.prototype = target.prototype;
+            bound.prototype = new Empty();
+            Empty.prototype = null;
+        }
+        return bound;
+    };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+    defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+    defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+    lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+    lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+    if(function() { // test IE < 9 to splice bug - see issue #138
+        function makeArray(l) {
+            var a = new Array(l+2);
+            a[0] = a[1] = 0;
+            return a;
+        }
+        var array = [], lengthBefore;
+        
+        array.splice.apply(array, makeArray(20));
+        array.splice.apply(array, makeArray(26));
+
+        lengthBefore = array.length; //46
+        array.splice(5, 0, "XXX"); // add one element
+
+        lengthBefore + 1 == array.length
+
+        if (lengthBefore + 1 == array.length) {
+            return true;// has right splice implementation without bugs
+        }
+    }()) {//IE 6/7
+        var array_splice = Array.prototype.splice;
+        Array.prototype.splice = function(start, deleteCount) {
+            if (!arguments.length) {
+                return [];
+            } else {
+                return array_splice.apply(this, [
+                    start === void 0 ? 0 : start,
+                    deleteCount === void 0 ? (this.length - start) : deleteCount
+                ].concat(slice.call(arguments, 2)))
+            }
+        };
+    } else {//IE8
+        Array.prototype.splice = function(pos, removeCount){
+            var length = this.length;
+            if (pos > 0) {
+                if (pos > length)
+                    pos = length;
+            } else if (pos == void 0) {
+                pos = 0;
+            } else if (pos < 0) {
+                pos = Math.max(length + pos, 0);
+            }
+
+            if (!(pos+removeCount < length))
+                removeCount = length - pos;
+
+            var removed = this.slice(pos, pos+removeCount);
+            var insert = slice.call(arguments, 2);
+            var add = insert.length;            
+            if (pos === length) {
+                if (add) {
+                    this.push.apply(this, insert);
+                }
+            } else {
+                var remove = Math.min(removeCount, length - pos);
+                var tailOldPos = pos + remove;
+                var tailNewPos = tailOldPos + add - remove;
+                var tailCount = length - tailOldPos;
+                var lengthAfterRemove = length - remove;
+
+                if (tailNewPos < tailOldPos) { // case A
+                    for (var i = 0; i < tailCount; ++i) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } else if (tailNewPos > tailOldPos) { // case B
+                    for (i = tailCount; i--; ) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } // else, add == remove (nothing to do)
+
+                if (add && pos === lengthAfterRemove) {
+                    this.length = lengthAfterRemove; // truncate array
+                    this.push.apply(this, insert);
+                } else {
+                    this.length = lengthAfterRemove + add; // reserves space
+                    for (i = 0; i < add; ++i) {
+                        this[pos+i] = insert[i];
+                    }
+                }
+            }
+            return removed;
+        };
+    }
+}
+if (!Array.isArray) {
+    Array.isArray = function isArray(obj) {
+        return _toString(obj) == "[object Array]";
+    };
+}
+var boxedString = Object("a"),
+    splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+    Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            thisp = arguments[1],
+            i = -1,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(); // TODO message
+        }
+
+        while (++i < length) {
+            if (i in self) {
+                fun.call(thisp, self[i], i, object);
+            }
+        }
+    };
+}
+if (!Array.prototype.map) {
+    Array.prototype.map = function map(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            result = Array(length),
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self)
+                result[i] = fun.call(thisp, self[i], i, object);
+        }
+        return result;
+    };
+}
+if (!Array.prototype.filter) {
+    Array.prototype.filter = function filter(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                    object,
+            length = self.length >>> 0,
+            result = [],
+            value,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self) {
+                value = self[i];
+                if (fun.call(thisp, value, i, object)) {
+                    result.push(value);
+                }
+            }
+        }
+        return result;
+    };
+}
+if (!Array.prototype.every) {
+    Array.prototype.every = function every(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && !fun.call(thisp, self[i], i, object)) {
+                return false;
+            }
+        }
+        return true;
+    };
+}
+if (!Array.prototype.some) {
+    Array.prototype.some = function some(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && fun.call(thisp, self[i], i, object)) {
+                return true;
+            }
+        }
+        return false;
+    };
+}
+if (!Array.prototype.reduce) {
+    Array.prototype.reduce = function reduce(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduce of empty array with no initial value");
+        }
+
+        var i = 0;
+        var result;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i++];
+                    break;
+                }
+                if (++i >= length) {
+                    throw new TypeError("reduce of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        for (; i < length; i++) {
+            if (i in self) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        }
+
+        return result;
+    };
+}
+if (!Array.prototype.reduceRight) {
+    Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduceRight of empty array with no initial value");
+        }
+
+        var result, i = length - 1;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i--];
+                    break;
+                }
+                if (--i < 0) {
+                    throw new TypeError("reduceRight of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        do {
+            if (i in this) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        } while (i--);
+
+        return result;
+    };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+    Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+
+        var i = 0;
+        if (arguments.length > 1) {
+            i = toInteger(arguments[1]);
+        }
+        i = i >= 0 ? i : Math.max(0, length + i);
+        for (; i < length; i++) {
+            if (i in self && self[i] === sought) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+    Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+        var i = length - 1;
+        if (arguments.length > 1) {
+            i = Math.min(i, toInteger(arguments[1]));
+        }
+        i = i >= 0 ? i : length - Math.abs(i);
+        for (; i >= 0; i--) {
+            if (i in self && sought === self[i]) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Object.getPrototypeOf) {
+    Object.getPrototypeOf = function getPrototypeOf(object) {
+        return object.__proto__ || (
+            object.constructor ?
+            object.constructor.prototype :
+            prototypeOfObject
+        );
+    };
+}
+if (!Object.getOwnPropertyDescriptor) {
+    var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+                         "non-object: ";
+    Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT + object);
+        if (!owns(object, property))
+            return;
+
+        var descriptor, getter, setter;
+        descriptor =  { enumerable: true, configurable: true };
+        if (supportsAccessors) {
+            var prototype = object.__proto__;
+            object.__proto__ = prototypeOfObject;
+
+            var getter = lookupGetter(object, property);
+            var setter = lookupSetter(object, property);
+            object.__proto__ = prototype;
+
+            if (getter || setter) {
+                if (getter) descriptor.get = getter;
+                if (setter) descriptor.set = setter;
+                return descriptor;
+            }
+        }
+        descriptor.value = object[property];
+        return descriptor;
+    };
+}
+if (!Object.getOwnPropertyNames) {
+    Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+        return Object.keys(object);
+    };
+}
+if (!Object.create) {
+    var createEmpty;
+    if (Object.prototype.__proto__ === null) {
+        createEmpty = function () {
+            return { "__proto__": null };
+        };
+    } else {
+        createEmpty = function () {
+            var empty = {};
+            for (var i in empty)
+                empty[i] = null;
+            empty.constructor =
+            empty.hasOwnProperty =
+            empty.propertyIsEnumerable =
+            empty.isPrototypeOf =
+            empty.toLocaleString =
+            empty.toString =
+            empty.valueOf =
+            empty.__proto__ = null;
+            return empty;
+        }
+    }
+
+    Object.create = function create(prototype, properties) {
+        var object;
+        if (prototype === null) {
+            object = createEmpty();
+        } else {
+            if (typeof prototype != "object")
+                throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+            var Type = function () {};
+            Type.prototype = prototype;
+            object = new Type();
+            object.__proto__ = prototype;
+        }
+        if (properties !== void 0)
+            Object.defineProperties(object, properties);
+        return object;
+    };
+}
+
+function doesDefinePropertyWork(object) {
+    try {
+        Object.defineProperty(object, "sentinel", {});
+        return "sentinel" in object;
+    } catch (exception) {
+    }
+}
+if (Object.defineProperty) {
+    var definePropertyWorksOnObject = doesDefinePropertyWork({});
+    var definePropertyWorksOnDom = typeof document == "undefined" ||
+        doesDefinePropertyWork(document.createElement("div"));
+    if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+        var definePropertyFallback = Object.defineProperty;
+    }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+    var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+    var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+    var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+                                      "on this javascript engine";
+
+    Object.defineProperty = function defineProperty(object, property, descriptor) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+        if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+            throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+        if (definePropertyFallback) {
+            try {
+                return definePropertyFallback.call(Object, object, property, descriptor);
+            } catch (exception) {
+            }
+        }
+        if (owns(descriptor, "value")) {
+
+            if (supportsAccessors && (lookupGetter(object, property) ||
+                                      lookupSetter(object, property)))
+            {
+                var prototype = object.__proto__;
+                object.__proto__ = prototypeOfObject;
+                delete object[property];
+                object[property] = descriptor.value;
+                object.__proto__ = prototype;
+            } else {
+                object[property] = descriptor.value;
+            }
+        } else {
+            if (!supportsAccessors)
+                throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+            if (owns(descriptor, "get"))
+                defineGetter(object, property, descriptor.get);
+            if (owns(descriptor, "set"))
+                defineSetter(object, property, descriptor.set);
+        }
+
+        return object;
+    };
+}
+if (!Object.defineProperties) {
+    Object.defineProperties = function defineProperties(object, properties) {
+        for (var property in properties) {
+            if (owns(properties, property))
+                Object.defineProperty(object, property, properties[property]);
+        }
+        return object;
+    };
+}
+if (!Object.seal) {
+    Object.seal = function seal(object) {
+        return object;
+    };
+}
+if (!Object.freeze) {
+    Object.freeze = function freeze(object) {
+        return object;
+    };
+}
+try {
+    Object.freeze(function () {});
+} catch (exception) {
+    Object.freeze = (function freeze(freezeObject) {
+        return function freeze(object) {
+            if (typeof object == "function") {
+                return object;
+            } else {
+                return freezeObject(object);
+            }
+        };
+    })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+    Object.preventExtensions = function preventExtensions(object) {
+        return object;
+    };
+}
+if (!Object.isSealed) {
+    Object.isSealed = function isSealed(object) {
+        return false;
+    };
+}
+if (!Object.isFrozen) {
+    Object.isFrozen = function isFrozen(object) {
+        return false;
+    };
+}
+if (!Object.isExtensible) {
+    Object.isExtensible = function isExtensible(object) {
+        if (Object(object) === object) {
+            throw new TypeError(); // TODO message
+        }
+        var name = '';
+        while (owns(object, name)) {
+            name += '?';
+        }
+        object[name] = true;
+        var returnValue = owns(object, name);
+        delete object[name];
+        return returnValue;
+    };
+}
+if (!Object.keys) {
+    var hasDontEnumBug = true,
+        dontEnums = [
+            "toString",
+            "toLocaleString",
+            "valueOf",
+            "hasOwnProperty",
+            "isPrototypeOf",
+            "propertyIsEnumerable",
+            "constructor"
+        ],
+        dontEnumsLength = dontEnums.length;
+
+    for (var key in {"toString": null}) {
+        hasDontEnumBug = false;
+    }
+
+    Object.keys = function keys(object) {
+
+        if (
+            (typeof object != "object" && typeof object != "function") ||
+            object === null
+        ) {
+            throw new TypeError("Object.keys called on a non-object");
+        }
+
+        var keys = [];
+        for (var name in object) {
+            if (owns(object, name)) {
+                keys.push(name);
+            }
+        }
+
+        if (hasDontEnumBug) {
+            for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+                var dontEnum = dontEnums[i];
+                if (owns(object, dontEnum)) {
+                    keys.push(dontEnum);
+                }
+            }
+        }
+        return keys;
+    };
+
+}
+if (!Date.now) {
+    Date.now = function now() {
+        return new Date().getTime();
+    };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+    "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+    "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+    ws = "[" + ws + "]";
+    var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+        trimEndRegexp = new RegExp(ws + ws + "*$");
+    String.prototype.trim = function trim() {
+        return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+    };
+}
+
+function toInteger(n) {
+    n = +n;
+    if (n !== n) { // isNaN
+        n = 0;
+    } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+        n = (n > 0 || -1) * Math.floor(Math.abs(n));
+    }
+    return n;
+}
+
+function isPrimitive(input) {
+    var type = typeof input;
+    return (
+        input === null ||
+        type === "undefined" ||
+        type === "boolean" ||
+        type === "number" ||
+        type === "string"
+    );
+}
+
+function toPrimitive(input) {
+    var val, valueOf, toString;
+    if (isPrimitive(input)) {
+        return input;
+    }
+    valueOf = input.valueOf;
+    if (typeof valueOf === "function") {
+        val = valueOf.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    toString = input.toString;
+    if (typeof toString === "function") {
+        val = toString.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    throw new TypeError();
+}
+var toObject = function (o) {
+    if (o == null) { // this matches both null and undefined
+        throw new TypeError("can't convert "+o+" to object");
+    }
+    return Object(o);
+};
+
+});
+
+define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/javascript/jshint'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var lint = require("./javascript/jshint").JSHINT;
+
+function startRegex(arr) {
+    return RegExp("^(" + arr.join("|") + ")");
+}
+
+var disabledWarningsRe = startRegex([
+    "Bad for in variable '(.+)'.",
+    'Missing "use strict"'
+]);
+var errorsRe = startRegex([
+    "Unexpected",
+    "Expected ",
+    "Confusing (plus|minus)",
+    "\\{a\\} unterminated regular expression",
+    "Unclosed ",
+    "Unmatched ",
+    "Unbegun comment",
+    "Bad invocation",
+    "Missing space after",
+    "Missing operator at"
+]);
+var infoRe = startRegex([
+    "Expected an assignment",
+    "Bad escapement of EOL",
+    "Unexpected comma",
+    "Unexpected space",
+    "Missing radix parameter.",
+    "A leading decimal point can",
+    "\\['{a}'\\] is better written in dot notation.",
+    "'{a}' used out of scope"
+]);
+
+var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
+    Mirror.call(this, sender);
+    this.setTimeout(500);
+    this.setOptions();
+};
+
+oop.inherits(JavaScriptWorker, Mirror);
+
+(function() {
+    this.setOptions = function(options) {
+        this.options = options || {
+            esnext: true,
+            moz: true,
+            devel: true,
+            browser: true,
+            node: true,
+            laxcomma: true,
+            laxbreak: true,
+            lastsemic: true,
+            onevar: false,
+            passfail: false,
+            maxerr: 100,
+            expr: true,
+            multistr: true,
+            globalstrict: true
+        };
+        this.doc.getValue() && this.deferredUpdate.schedule(100);
+    };
+
+    this.changeOptions = function(newOptions) {
+        oop.mixin(this.options, newOptions);
+        this.doc.getValue() && this.deferredUpdate.schedule(100);
+    };
+
+    this.isValidJS = function(str) {
+        try {
+            eval("throw 0;" + str);
+        } catch(e) {
+            if (e === 0)
+                return true;
+        }
+        return false
+    };
+
+    this.onUpdate = function() {
+        var value = this.doc.getValue();
+        value = value.replace(/^#!.*\n/, "\n");
+        if (!value) {
+            this.sender.emit("jslint", []);
+            return;
+        }
+        var errors = [];
+        var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
+        lint(value, this.options);
+        var results = lint.errors;
+
+        var errorAdded = false
+        for (var i = 0; i < results.length; i++) {
+            var error = results[i];
+            if (!error)
+                continue;
+            var raw = error.raw;
+            var type = "warning";
+
+            if (raw == "Missing semicolon.") {
+                var str = error.evidence.substr(error.character);
+                str = str.charAt(str.search(/\S/));
+                if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
+                    error.reason = 'Missing ";" before statement';
+                    type = "error";
+                } else {
+                    type = "info";
+                }
+            }
+            else if (disabledWarningsRe.test(raw)) {
+                continue;
+            }
+            else if (infoRe.test(raw)) {
+                type = "info"
+            }
+            else if (errorsRe.test(raw)) {
+                errorAdded  = true;
+                type = maxErrorLevel;
+            }
+            else if (raw == "'{a}' is not defined.") {
+                type = "warning";
+            }
+            else if (raw == "'{a}' is defined but never used.") {
+                type = "info";
+            }
+
+            errors.push({
+                row: error.line-1,
+                column: error.character-1,
+                text: error.reason,
+                type: type,
+                raw: raw
+            });
+
+            if (errorAdded) {
+            }
+        }
+
+        this.sender.emit("jslint", errors);
+    };
+
+}).call(JavaScriptWorker.prototype);
+
+});
+
+define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.inherits = (function() {
+    var tempCtor = function() {};
+    return function(ctor, superCtor) {
+        tempCtor.prototype = superCtor.prototype;
+        ctor.super_ = superCtor.prototype;
+        ctor.prototype = new tempCtor();
+        ctor.prototype.constructor = ctor;
+    };
+}());
+
+exports.mixin = function(obj, mixin) {
+    for (var key in mixin) {
+        obj[key] = mixin[key];
+    }
+    return obj;
+};
+
+exports.implement = function(proto, mixin) {
+    exports.mixin(proto, mixin);
+};
+
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+    
+var Mirror = exports.Mirror = function(sender) {
+    this.sender = sender;
+    var doc = this.doc = new Document("");
+    
+    var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+    
+    var _self = this;
+    sender.on("change", function(e) {
+        doc.applyDeltas(e.data);
+        deferredUpdate.schedule(_self.$timeout);
+    });
+};
+
+(function() {
+    
+    this.$timeout = 500;
+    
+    this.setTimeout = function(timeout) {
+        this.$timeout = timeout;
+    };
+    
+    this.setValue = function(value) {
+        this.doc.setValue(value);
+        this.deferredUpdate.schedule(this.$timeout);
+    };
+    
+    this.getValue = function(callbackId) {
+        this.sender.callback(this.doc.getValue(), callbackId);
+    };
+    
+    this.onUpdate = function() {
+    };
+    
+}).call(Mirror.prototype);
+
+});
+
+define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+    this.$lines = [];
+    if (text.length == 0) {
+        this.$lines = [""];
+    } else if (Array.isArray(text)) {
+        this._insertLines(0, text);
+    } else {
+        this.insert({row: 0, column:0}, text);
+    }
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.setValue = function(text) {
+        var len = this.getLength();
+        this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+        this.insert({row: 0, column:0}, text);
+    };
+    this.getValue = function() {
+        return this.getAllLines().join(this.getNewLineCharacter());
+    };
+    this.createAnchor = function(row, column) {
+        return new Anchor(this, row, column);
+    };
+    if ("aaa".split(/a/).length == 0)
+        this.$split = function(text) {
+            return text.replace(/\r\n|\r/g, "\n").split("\n");
+        }
+    else
+        this.$split = function(text) {
+            return text.split(/\r\n|\r|\n/);
+        };
+
+
+    this.$detectNewLine = function(text) {
+        var match = text.match(/^.*?(\r\n|\r|\n)/m);
+        this.$autoNewLine = match ? match[1] : "\n";
+    };
+    this.getNewLineCharacter = function() {
+        switch (this.$newLineMode) {
+          case "windows":
+            return "\r\n";
+          case "unix":
+            return "\n";
+          default:
+            return this.$autoNewLine;
+        }
+    };
+
+    this.$autoNewLine = "\n";
+    this.$newLineMode = "auto";
+    this.setNewLineMode = function(newLineMode) {
+        if (this.$newLineMode === newLineMode)
+            return;
+
+        this.$newLineMode = newLineMode;
+    };
+    this.getNewLineMode = function() {
+        return this.$newLineMode;
+    };
+    this.isNewLine = function(text) {
+        return (text == "\r\n" || text == "\r" || text == "\n");
+    };
+    this.getLine = function(row) {
+        return this.$lines[row] || "";
+    };
+    this.getLines = function(firstRow, lastRow) {
+        return this.$lines.slice(firstRow, lastRow + 1);
+    };
+    this.getAllLines = function() {
+        return this.getLines(0, this.getLength());
+    };
+    this.getLength = function() {
+        return this.$lines.length;
+    };
+    this.getTextRange = function(range) {
+        if (range.start.row == range.end.row) {
+            return this.getLine(range.start.row)
+                .substring(range.start.column, range.end.column);
+        }
+        var lines = this.getLines(range.start.row, range.end.row);
+        lines[0] = (lines[0] || "").substring(range.start.column);
+        var l = lines.length - 1;
+        if (range.end.row - range.start.row == l)
+            lines[l] = lines[l].substring(0, range.end.column);
+        return lines.join(this.getNewLineCharacter());
+    };
+
+    this.$clipPosition = function(position) {
+        var length = this.getLength();
+        if (position.row >= length) {
+            position.row = Math.max(0, length - 1);
+            position.column = this.getLine(length-1).length;
+        } else if (position.row < 0)
+            position.row = 0;
+        return position;
+    };
+    this.insert = function(position, text) {
+        if (!text || text.length === 0)
+            return position;
+
+        position = this.$clipPosition(position);
+        if (this.getLength() <= 1)
+            this.$detectNewLine(text);
+
+        var lines = this.$split(text);
+        var firstLine = lines.splice(0, 1)[0];
+        var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+        position = this.insertInLine(position, firstLine);
+        if (lastLine !== null) {
+            position = this.insertNewLine(position); // terminate first line
+            position = this._insertLines(position.row, lines);
+            position = this.insertInLine(position, lastLine || "");
+        }
+        return position;
+    };
+    this.insertLines = function(row, lines) {
+        if (row >= this.getLength())
+            return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+        return this._insertLines(Math.max(row, 0), lines);
+    };
+    this._insertLines = function(row, lines) {
+        if (lines.length == 0)
+            return {row: row, column: 0};
+        if (lines.length > 0xFFFF) {
+            var end = this._insertLines(row, lines.slice(0xFFFF));
+            lines = lines.slice(0, 0xFFFF);
+        }
+
+        var args = [row, 0];
+        args.push.apply(args, lines);
+        this.$lines.splice.apply(this.$lines, args);
+
+        var range = new Range(row, 0, row + lines.length, 0);
+        var delta = {
+            action: "insertLines",
+            range: range,
+            lines: lines
+        };
+        this._emit("change", { data: delta });
+        return end || range.end;
+    };
+    this.insertNewLine = function(position) {
+        position = this.$clipPosition(position);
+        var line = this.$lines[position.row] || "";
+
+        this.$lines[position.row] = line.substring(0, position.column);
+        this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+        var end = {
+            row : position.row + 1,
+            column : 0
+        };
+
+        var delta = {
+            action: "insertText",
+            range: Range.fromPoints(position, end),
+            text: this.getNewLineCharacter()
+        };
+        this._emit("change", { data: delta });
+
+        return end;
+    };
+    this.insertInLine = function(position, text) {
+        if (text.length == 0)
+            return position;
+
+        var line = this.$lines[position.row] || "";
+
+        this.$lines[position.row] = line.substring(0, position.column) + text
+                + line.substring(position.column);
+
+        var end = {
+            row : position.row,
+            column : position.column + text.length
+        };
+
+        var delta = {
+            action: "insertText",
+            range: Range.fromPoints(position, end),
+            text: text
+        };
+        this._emit("change", { data: delta });
+
+        return end;
+    };
+    this.remove = function(range) {
+        if (!range instanceof Range)
+            range = Range.fromPoints(range.start, range.end);
+        range.start = this.$clipPosition(range.start);
+        range.end = this.$clipPosition(range.end);
+
+        if (range.isEmpty())
+            return range.start;
+
+        var firstRow = range.start.row;
+        var lastRow = range.end.row;
+
+        if (range.isMultiLine()) {
+            var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+            var lastFullRow = lastRow - 1;
+
+            if (range.end.column > 0)
+                this.removeInLine(lastRow, 0, range.end.column);
+
+            if (lastFullRow >= firstFullRow)
+                this._removeLines(firstFullRow, lastFullRow);
+
+            if (firstFullRow != firstRow) {
+                this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+                this.removeNewLine(range.start.row);
+            }
+        }
+        else {
+            this.removeInLine(firstRow, range.start.column, range.end.column);
+        }
+        return range.start;
+    };
+    this.removeInLine = function(row, startColumn, endColumn) {
+        if (startColumn == endColumn)
+            return;
+
+        var range = new Range(row, startColumn, row, endColumn);
+        var line = this.getLine(row);
+        var removed = line.substring(startColumn, endColumn);
+        var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+        this.$lines.splice(row, 1, newLine);
+
+        var delta = {
+            action: "removeText",
+            range: range,
+            text: removed
+        };
+        this._emit("change", { data: delta });
+        return range.start;
+    };
+    this.removeLines = function(firstRow, lastRow) {
+        if (firstRow < 0 || lastRow >= this.getLength())
+            return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+        return this._removeLines(firstRow, lastRow);
+    };
+
+    this._removeLines = function(firstRow, lastRow) {
+        var range = new Range(firstRow, 0, lastRow + 1, 0);
+        var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+        var delta = {
+            action: "removeLines",
+            range: range,
+            nl: this.getNewLineCharacter(),
+            lines: removed
+        };
+        this._emit("change", { data: delta });
+        return removed;
+    };
+    this.removeNewLine = function(row) {
+        var firstLine = this.getLine(row);
+        var secondLine = this.getLine(row+1);
+
+        var range = new Range(row, firstLine.length, row+1, 0);
+        var line = firstLine + secondLine;
+
+        this.$lines.splice(row, 2, line);
+
+        var delta = {
+            action: "removeText",
+            range: range,
+            text: this.getNewLineCharacter()
+        };
+        this._emit("change", { data: delta });
+    };
+    this.replace = function(range, text) {
+        if (!range instanceof Range)
+            range = Range.fromPoints(range.start, range.end);
+        if (text.length == 0 && range.isEmpty())
+            return range.start;
+        if (text == this.getTextRange(range))
+            return range.end;
+
+        this.remove(range);
+        if (text) {
+            var end = this.insert(range.start, text);
+        }
+        else {
+            end = range.start;
+        }
+
+        return end;
+    };
+    this.applyDeltas = function(deltas) {
+        for (var i=0; i<deltas.length; i++) {
+            var delta = deltas[i];
+            var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+            if (delta.action == "insertLines")
+                this.insertLines(range.start.row, delta.lines);
+            else if (delta.action == "insertText")
+                this.insert(range.start, delta.text);
+            else if (delta.action == "removeLines")
+                this._removeLines(range.start.row, range.end.row - 1);
+            else if (delta.action == "removeText")
+                this.remove(range);
+        }
+    };
+    this.revertDeltas = function(deltas) {
+        for (var i=deltas.length-1; i>=0; i--) {
+            var delta = deltas[i];
+
+            var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+            if (delta.action == "insertLines")
+                this._removeLines(range.start.row, range.end.row - 1);
+            else if (delta.action == "insertText")
+                this.remove(range);
+            else if (delta.action == "removeLines")
+                this._insertLines(range.start.row, delta.lines);
+            else if (delta.action == "removeText")
+                this.insert(range.start, delta.text);
+        }
+    };
+    this.indexToPosition = function(index, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        for (var i = startRow || 0, l = lines.length; i < l; i++) {
+            index -= lines[i].length + newlineLength;
+            if (index < 0)
+                return {row: i, column: index + lines[i].length + newlineLength};
+        }
+        return {row: l-1, column: lines[l-1].length};
+    };
+    this.positionToIndex = function(pos, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        var index = 0;
+        var row = Math.min(pos.row, lines.length);
+        for (var i = startRow || 0; i < row; ++i)
+            index += lines[i].length + newlineLength;
+
+        return index + pos.column;
+    };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+    this._eventRegistry || (this._eventRegistry = {});
+    this._defaultHandlers || (this._defaultHandlers = {});
+
+    var listeners = this._eventRegistry[eventName] || [];
+    var defaultHandler = this._defaultHandlers[eventName];
+    if (!listeners.length && !defaultHandler)
+        return;
+
+    if (typeof e != "object" || !e)
+        e = {};
+
+    if (!e.type)
+        e.type = eventName;
+    if (!e.stopPropagation)
+        e.stopPropagation = stopPropagation;
+    if (!e.preventDefault)
+        e.preventDefault = preventDefault;
+
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++) {
+        listeners[i](e, this);
+        if (e.propagationStopped)
+            break;
+    }
+    
+    if (defaultHandler && !e.defaultPrevented)
+        return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+    var listeners = (this._eventRegistry || {})[eventName];
+    if (!listeners)
+        return;
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++)
+        listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+    var _self = this;
+    callback && this.addEventListener(eventName, function newCallback() {
+        _self.removeEventListener(eventName, newCallback);
+        callback.apply(null, arguments);
+    });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        handlers = this._defaultHandlers = {_disabled_: {}};
+    
+    if (handlers[eventName]) {
+        var old = handlers[eventName];
+        var disabled = handlers._disabled_[eventName];
+        if (!disabled)
+            handlers._disabled_[eventName] = disabled = [];
+        disabled.push(old);
+        var i = disabled.indexOf(callback);
+        if (i != -1) 
+            disabled.splice(i, 1);
+    }
+    handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        return;
+    var disabled = handlers._disabled_[eventName];
+    
+    if (handlers[eventName] == callback) {
+        var old = handlers[eventName];
+        if (disabled)
+            this.setDefaultHandler(eventName, disabled.pop());
+    } else if (disabled) {
+        var i = disabled.indexOf(callback);
+        if (i != -1)
+            disabled.splice(i, 1);
+    }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        listeners = this._eventRegistry[eventName] = [];
+
+    if (listeners.indexOf(callback) == -1)
+        listeners[capturing ? "unshift" : "push"](callback);
+    return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        return;
+
+    var index = listeners.indexOf(callback);
+    if (index !== -1)
+        listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+    if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+var comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+    this.start = {
+        row: startRow,
+        column: startColumn
+    };
+
+    this.end = {
+        row: endRow,
+        column: endColumn
+    };
+};
+
+(function() {
+    this.isEqual = function(range) {
+        return this.start.row === range.start.row &&
+            this.end.row === range.end.row &&
+            this.start.column === range.start.column &&
+            this.end.column === range.end.column;
+    };
+    this.toString = function() {
+        return ("Range: [" + this.start.row + "/" + this.start.column +
+            "] -> [" + this.end.row + "/" + this.end.column + "]");
+    };
+
+    this.contains = function(row, column) {
+        return this.compare(row, column) == 0;
+    };
+    this.compareRange = function(range) {
+        var cmp,
+            end = range.end,
+            start = range.start;
+
+        cmp = this.compare(end.row, end.column);
+        if (cmp == 1) {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == 1) {
+                return 2;
+            } else if (cmp == 0) {
+                return 1;
+            } else {
+                return 0;
+            }
+        } else if (cmp == -1) {
+            return -2;
+        } else {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == -1) {
+                return -1;
+            } else if (cmp == 1) {
+                return 42;
+            } else {
+                return 0;
+            }
+        }
+    };
+    this.comparePoint = function(p) {
+        return this.compare(p.row, p.column);
+    };
+    this.containsRange = function(range) {
+        return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+    };
+    this.intersects = function(range) {
+        var cmp = this.compareRange(range);
+        return (cmp == -1 || cmp == 0 || cmp == 1);
+    };
+    this.isEnd = function(row, column) {
+        return this.end.row == row && this.end.column == column;
+    };
+    this.isStart = function(row, column) {
+        return this.start.row == row && this.start.column == column;
+    };
+    this.setStart = function(row, column) {
+        if (typeof row == "object") {
+            this.start.column = row.column;
+            this.start.row = row.row;
+        } else {
+            this.start.row = row;
+            this.start.column = column;
+        }
+    };
+    this.setEnd = function(row, column) {
+        if (typeof row == "object") {
+            this.end.column = row.column;
+            this.end.row = row.row;
+        } else {
+            this.end.row = row;
+            this.end.column = column;
+        }
+    };
+    this.inside = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column) || this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideStart = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideEnd = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.compare = function(row, column) {
+        if (!this.isMultiLine()) {
+            if (row === this.start.row) {
+                return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+            };
+        }
+
+        if (row < this.start.row)
+            return -1;
+
+        if (row > this.end.row)
+            return 1;
+
+        if (this.start.row === row)
+            return column >= this.start.column ? 0 : -1;
+
+        if (this.end.row === row)
+            return column <= this.end.column ? 0 : 1;
+
+        return 0;
+    };
+    this.compareStart = function(row, column) {
+        if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareEnd = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareInside = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.clipRows = function(firstRow, lastRow) {
+        if (this.end.row > lastRow)
+            var end = {row: lastRow + 1, column: 0};
+        else if (this.end.row < firstRow)
+            var end = {row: firstRow, column: 0};
+
+        if (this.start.row > lastRow)
+            var start = {row: lastRow + 1, column: 0};
+        else if (this.start.row < firstRow)
+            var start = {row: firstRow, column: 0};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+    this.extend = function(row, column) {
+        var cmp = this.compare(row, column);
+
+        if (cmp == 0)
+            return this;
+        else if (cmp == -1)
+            var start = {row: row, column: column};
+        else
+            var end = {row: row, column: column};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+
+    this.isEmpty = function() {
+        return (this.start.row === this.end.row && this.start.column === this.end.column);
+    };
+    this.isMultiLine = function() {
+        return (this.start.row !== this.end.row);
+    };
+    this.clone = function() {
+        return Range.fromPoints(this.start, this.end);
+    };
+    this.collapseRows = function() {
+        if (this.end.column == 0)
+            return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+        else
+            return new Range(this.start.row, 0, this.end.row, 0)
+    };
+    this.toScreenRange = function(session) {
+        var screenPosStart = session.documentToScreenPosition(this.start);
+        var screenPosEnd = session.documentToScreenPosition(this.end);
+
+        return new Range(
+            screenPosStart.row, screenPosStart.column,
+            screenPosEnd.row, screenPosEnd.column
+        );
+    };
+    this.moveBy = function(row, column) {
+        this.start.row += row;
+        this.start.column += column;
+        this.end.row += row;
+        this.end.column += column;
+    };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+    return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+    this.$onChange = this.onChange.bind(this);
+    this.attach(doc);
+    
+    if (typeof column == "undefined")
+        this.setPosition(row.row, row.column);
+    else
+        this.setPosition(row, column);
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.getPosition = function() {
+        return this.$clipPositionToDocument(this.row, this.column);
+    };
+    this.getDocument = function() {
+        return this.document;
+    };
+    this.$insertRight = false;
+    this.onChange = function(e) {
+        var delta = e.data;
+        var range = delta.range;
+
+        if (range.start.row == range.end.row && range.start.row != this.row)
+            return;
+
+        if (range.start.row > this.row)
+            return;
+
+        if (range.start.row == this.row && range.start.column > this.column)
+            return;
+
+        var row = this.row;
+        var column = this.column;
+        var start = range.start;
+        var end = range.end;
+
+        if (delta.action === "insertText") {
+            if (start.row === row && start.column <= column) {
+                if (start.column === column && this.$insertRight) {
+                } else if (start.row === end.row) {
+                    column += end.column - start.column;
+                } else {
+                    column -= start.column;
+                    row += end.row - start.row;
+                }
+            } else if (start.row !== end.row && start.row < row) {
+                row += end.row - start.row;
+            }
+        } else if (delta.action === "insertLines") {
+            if (start.row <= row) {
+                row += end.row - start.row;
+            }
+        } else if (delta.action === "removeText") {
+            if (start.row === row && start.column < column) {
+                if (end.column >= column)
+                    column = start.column;
+                else
+                    column = Math.max(0, column - (end.column - start.column));
+
+            } else if (start.row !== end.row && start.row < row) {
+                if (end.row === row)
+                    column = Math.max(0, column - end.column) + start.column;
+                row -= (end.row - start.row);
+            } else if (end.row === row) {
+                row -= end.row - start.row;
+                column = Math.max(0, column - end.column) + start.column;
+            }
+        } else if (delta.action == "removeLines") {
+            if (start.row <= row) {
+                if (end.row <= row)
+                    row -= end.row - start.row;
+                else {
+                    row = start.row;
+                    column = 0;
+                }
+            }
+        }
+
+        this.setPosition(row, column, true);
+    };
+    this.setPosition = function(row, column, noClip) {
+        var pos;
+        if (noClip) {
+            pos = {
+                row: row,
+                column: column
+            };
+        } else {
+            pos = this.$clipPositionToDocument(row, column);
+        }
+
+        if (this.row == pos.row && this.column == pos.column)
+            return;
+
+        var old = {
+            row: this.row,
+            column: this.column
+        };
+
+        this.row = pos.row;
+        this.column = pos.column;
+        this._emit("change", {
+            old: old,
+            value: pos
+        });
+    };
+    this.detach = function() {
+        this.document.removeEventListener("change", this.$onChange);
+    };
+    this.attach = function(doc) {
+        this.document = doc || this.document;
+        this.document.on("change", this.$onChange);
+    };
+    this.$clipPositionToDocument = function(row, column) {
+        var pos = {};
+
+        if (row >= this.document.getLength()) {
+            pos.row = Math.max(0, this.document.getLength() - 1);
+            pos.column = this.document.getLine(pos.row).length;
+        }
+        else if (row < 0) {
+            pos.row = 0;
+            pos.column = 0;
+        }
+        else {
+            pos.row = row;
+            pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+        }
+
+        if (column < 0)
+            pos.column = 0;
+
+        return pos;
+    };
+
+}).call(Anchor.prototype);
+
+});
+
+define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+    return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+    var result = '';
+    while (count > 0) {
+        if (count & 1)
+            result += string;
+
+        if (count >>= 1)
+            string += string;
+    }
+    return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+    return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+    return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+    var copy = {};
+    for (var key in obj) {
+        copy[key] = obj[key];
+    }
+    return copy;
+};
+
+exports.copyArray = function(array){
+    var copy = [];
+    for (var i=0, l=array.length; i<l; i++) {
+        if (array[i] && typeof array[i] == "object")
+            copy[i] = this.copyObject( array[i] );
+        else 
+            copy[i] = array[i];
+    }
+    return copy;
+};
+
+exports.deepCopy = function (obj) {
+    if (typeof obj != "object") {
+        return obj;
+    }
+    
+    var copy = obj.constructor();
+    for (var key in obj) {
+        if (typeof obj[key] == "object") {
+            copy[key] = this.deepCopy(obj[key]);
+        } else {
+            copy[key] = obj[key];
+        }
+    }
+    return copy;
+};
+
+exports.arrayToMap = function(arr) {
+    var map = {};
+    for (var i=0; i<arr.length; i++) {
+        map[arr[i]] = 1;
+    }
+    return map;
+
+};
+
+exports.createMap = function(props) {
+    var map = Object.create(null);
+    for (var i in props) {
+        map[i] = props[i];
+    }
+    return map;
+};
+exports.arrayRemove = function(array, value) {
+  for (var i = 0; i <= array.length; i++) {
+    if (value === array[i]) {
+      array.splice(i, 1);
+    }
+  }
+};
+
+exports.escapeRegExp = function(str) {
+    return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+    return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+    var matches = [];
+
+    string.replace(regExp, function(str) {
+        matches.push({
+            offset: arguments[arguments.length-2],
+            length: str.length
+        });
+    });
+
+    return matches;
+};
+exports.deferredCall = function(fcn) {
+
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var deferred = function(timeout) {
+        deferred.cancel();
+        timer = setTimeout(callback, timeout || 0);
+        return deferred;
+    };
+
+    deferred.schedule = deferred;
+
+    deferred.call = function() {
+        this.cancel();
+        fcn();
+        return deferred;
+    };
+
+    deferred.cancel = function() {
+        clearTimeout(timer);
+        timer = null;
+        return deferred;
+    };
+
+    return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var _self = function(timeout) {
+        timer && clearTimeout(timer);
+        timer = setTimeout(callback, timeout || defaultTimeout);
+    };
+
+    _self.delay = _self;
+    _self.schedule = function(timeout) {
+        if (timer == null)
+            timer = setTimeout(callback, timeout || 0);
+    };
+
+    _self.call = function() {
+        this.cancel();
+        fcn();
+    };
+
+    _self.cancel = function() {
+        timer && clearTimeout(timer);
+        timer = null;
+    };
+
+    _self.isPending = function() {
+        return timer;
+    };
+
+    return _self;
+};
+});
+define('ace/mode/javascript/jshint', ['require', 'exports', 'module' ], function(require, exports, module) {
+require = null;
+require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+9:[function (req,module,exports){
+        ["log", "info", "warn", "error", 
+        "time","timeEnd", "trace", "dir", "assert"
+        ].forEach(function(x) {exports[x] = nop;});
+        function nop() {}
+    },{}],
+1:[function(req,module,exports){
+
+(function() {
+  var root = this;
+  var previousUnderscore = root._;
+  var breaker = {};
+  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+  var push             = ArrayProto.push,
+      slice            = ArrayProto.slice,
+      concat           = ArrayProto.concat,
+      toString         = ObjProto.toString,
+      hasOwnProperty   = ObjProto.hasOwnProperty;
+  var
+    nativeForEach      = ArrayProto.forEach,
+    nativeMap          = ArrayProto.map,
+    nativeReduce       = ArrayProto.reduce,
+    nativeReduceRight  = ArrayProto.reduceRight,
+    nativeFilter       = ArrayProto.filter,
+    nativeEvery        = ArrayProto.every,
+    nativeSome         = ArrayProto.some,
+    nativeIndexOf      = ArrayProto.indexOf,
+    nativeLastIndexOf  = ArrayProto.lastIndexOf,
+    nativeIsArray      = Array.isArray,
+    nativeKeys         = Object.keys,
+    nativeBind         = FuncProto.bind;
+  var _ = function(obj) {
+    if (obj instanceof _) return obj;
+    if (!(this instanceof _)) return new _(obj);
+    this._wrapped = obj;
+  };
+  if (typeof exports !== 'undefined') {
+    if (typeof module !== 'undefined' && module.exports) {
+      exports = module.exports = _;
+    }
+    exports._ = _;
+  } else {
+    root._ = _;
+  }
+  _.VERSION = '1.4.4';
+  var each = _.each = _.forEach = function(obj, iterator, context) {
+    if (obj == null) return;
+    if (nativeForEach && obj.forEach === nativeForEach) {
+      obj.forEach(iterator, context);
+    } else if (obj.length === +obj.length) {
+      for (var i = 0, l = obj.length; i < l; i++) {
+        if (iterator.call(context, obj[i], i, obj) === breaker) return;
+      }
+    } else {
+      for (var key in obj) {
+        if (_.has(obj, key)) {
+          if (iterator.call(context, obj[key], key, obj) === breaker) return;
+        }
+      }
+    }
+  };
+  _.map = _.collect = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+    each(obj, function(value, index, list) {
+      results[results.length] = iterator.call(context, value, index, list);
+    });
+    return results;
+  };
+
+  var reduceError = 'Reduce of empty array with no initial value';
+  _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduce && obj.reduce === nativeReduce) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+    }
+    each(obj, function(value, index, list) {
+      if (!initial) {
+        memo = value;
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, value, index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+  _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+    var initial = arguments.length > 2;
+    if (obj == null) obj = [];
+    if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+      if (context) iterator = _.bind(iterator, context);
+      return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+    }
+    var length = obj.length;
+    if (length !== +length) {
+      var keys = _.keys(obj);
+      length = keys.length;
+    }
+    each(obj, function(value, index, list) {
+      index = keys ? keys[--length] : --length;
+      if (!initial) {
+        memo = obj[index];
+        initial = true;
+      } else {
+        memo = iterator.call(context, memo, obj[index], index, list);
+      }
+    });
+    if (!initial) throw new TypeError(reduceError);
+    return memo;
+  };
+  _.find = _.detect = function(obj, iterator, context) {
+    var result;
+    any(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) {
+        result = value;
+        return true;
+      }
+    });
+    return result;
+  };
+  _.filter = _.select = function(obj, iterator, context) {
+    var results = [];
+    if (obj == null) return results;
+    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+    each(obj, function(value, index, list) {
+      if (iterator.call(context, value, index, list)) results[results.length] = value;
+    });
+    return results;
+  };
+  _.reject = function(obj, iterator, context) {
+    return _.filter(obj, function(value, index, list) {
+      return !iterator.call(context, value, index, list);
+    }, context);
+  };
+  _.every = _.all = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = true;
+    if (obj == null) return result;
+    if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+    each(obj, function(value, index, list) {
+      if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+  var any = _.some = _.any = function(obj, iterator, context) {
+    iterator || (iterator = _.identity);
+    var result = false;
+    if (obj == null) return result;
+    if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+    each(obj, function(value, index, list) {
+      if (result || (result = iterator.call(context, value, index, list))) return breaker;
+    });
+    return !!result;
+  };
+  _.contains = _.include = function(obj, target) {
+    if (obj == null) return false;
+    if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+    return any(obj, function(value) {
+      return value === target;
+    });
+  };
+  _.invoke = function(obj, method) {
+    var args = slice.call(arguments, 2);
+    var isFunc = _.isFunction(method);
+    return _.map(obj, function(value) {
+      return (isFunc ? method : value[method]).apply(value, args);
+    });
+  };
+  _.pluck = function(obj, key) {
+    return _.map(obj, function(value){ return value[key]; });
+  };
+  _.where = function(obj, attrs, first) {
+    if (_.isEmpty(attrs)) return first ? null : [];
+    return _[first ? 'find' : 'filter'](obj, function(value) {
+      for (var key in attrs) {
+        if (attrs[key] !== value[key]) return false;
+      }
+      return true;
+    });
+  };
+  _.findWhere = function(obj, attrs) {
+    return _.where(obj, attrs, true);
+  };
+  _.max = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.max.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return -Infinity;
+    var result = {computed : -Infinity, value: -Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed >= result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+  _.min = function(obj, iterator, context) {
+    if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+      return Math.min.apply(Math, obj);
+    }
+    if (!iterator && _.isEmpty(obj)) return Infinity;
+    var result = {computed : Infinity, value: Infinity};
+    each(obj, function(value, index, list) {
+      var computed = iterator ? iterator.call(context, value, index, list) : value;
+      computed < result.computed && (result = {value : value, computed : computed});
+    });
+    return result.value;
+  };
+  _.shuffle = function(obj) {
+    var rand;
+    var index = 0;
+    var shuffled = [];
+    each(obj, function(value) {
+      rand = _.random(index++);
+      shuffled[index - 1] = shuffled[rand];
+      shuffled[rand] = value;
+    });
+    return shuffled;
+  };
+  var lookupIterator = function(value) {
+    return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+  };
+  _.sortBy = function(obj, value, context) {
+    var iterator = lookupIterator(value);
+    return _.pluck(_.map(obj, function(value, index, list) {
+      return {
+        value : value,
+        index : index,
+        criteria : iterator.call(context, value, index, list)
+      };
+    }).sort(function(left, right) {
+      var a = left.criteria;
+      var b = right.criteria;
+      if (a !== b) {
+        if (a > b || a === void 0) return 1;
+        if (a < b || b === void 0) return -1;
+      }
+      return left.index < right.index ? -1 : 1;
+    }), 'value');
+  };
+  var group = function(obj, value, context, behavior) {
+    var result = {};
+    var iterator = lookupIterator(value || _.identity);
+    each(obj, function(value, index) {
+      var key = iterator.call(context, value, index, obj);
+      behavior(result, key, value);
+    });
+    return result;
+  };
+  _.groupBy = function(obj, value, context) {
+    return group(obj, value, context, function(result, key, value) {
+      (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
+    });
+  };
+  _.countBy = function(obj, value, context) {
+    return group(obj, value, context, function(result, key) {
+      if (!_.has(result, key)) result[key] = 0;
+      result[key]++;
+    });
+  };
+  _.sortedIndex = function(array, obj, iterator, context) {
+    iterator = iterator == null ? _.identity : lookupIterator(iterator);
+    var value = iterator.call(context, obj);
+    var low = 0, high = array.length;
+    while (low < high) {
+      var mid = (low + high) >>> 1;
+      iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+    }
+    return low;
+  };
+  _.toArray = function(obj) {
+    if (!obj) return [];
+    if (_.isArray(obj)) return slice.call(obj);
+    if (obj.length === +obj.length) return _.map(obj, _.identity);
+    return _.values(obj);
+  };
+  _.size = function(obj) {
+    if (obj == null) return 0;
+    return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+  };
+  _.first = _.head = _.take = function(array, n, guard) {
+    if (array == null) return void 0;
+    return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+  };
+  _.initial = function(array, n, guard) {
+    return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+  };
+  _.last = function(array, n, guard) {
+    if (array == null) return void 0;
+    if ((n != null) && !guard) {
+      return slice.call(array, Math.max(array.length - n, 0));
+    } else {
+      return array[array.length - 1];
+    }
+  };
+  _.rest = _.tail = _.drop = function(array, n, guard) {
+    return slice.call(array, (n == null) || guard ? 1 : n);
+  };
+  _.compact = function(array) {
+    return _.filter(array, _.identity);
+  };
+  var flatten = function(input, shallow, output) {
+    each(input, function(value) {
+      if (_.isArray(value)) {
+        shallow ? push.apply(output, value) : flatten(value, shallow, output);
+      } else {
+        output.push(value);
+      }
+    });
+    return output;
+  };
+  _.flatten = function(array, shallow) {
+    return flatten(array, shallow, []);
+  };
+  _.without = function(array) {
+    return _.difference(array, slice.call(arguments, 1));
+  };
+  _.uniq = _.unique = function(array, isSorted, iterator, context) {
+    if (_.isFunction(isSorted)) {
+      context = iterator;
+      iterator = isSorted;
+      isSorted = false;
+    }
+    var initial = iterator ? _.map(array, iterator, context) : array;
+    var results = [];
+    var seen = [];
+    each(initial, function(value, index) {
+      if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+        seen.push(value);
+        results.push(array[index]);
+      }
+    });
+    return results;
+  };
+  _.union = function() {
+    return _.uniq(concat.apply(ArrayProto, arguments));
+  };
+  _.intersection = function(array) {
+    var rest = slice.call(arguments, 1);
+    return _.filter(_.uniq(array), function(item) {
+      return _.every(rest, function(other) {
+        return _.indexOf(other, item) >= 0;
+      });
+    });
+  };
+  _.difference = function(array) {
+    var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+    return _.filter(array, function(value){ return !_.contains(rest, value); });
+  };
+  _.zip = function() {
+    var args = slice.call(arguments);
+    var length = _.max(_.pluck(args, 'length'));
+    var results = new Array(length);
+    for (var i = 0; i < length; i++) {
+      results[i] = _.pluck(args, "" + i);
+    }
+    return results;
+  };
+  _.object = function(list, values) {
+    if (list == null) return {};
+    var result = {};
+    for (var i = 0, l = list.length; i < l; i++) {
+      if (values) {
+        result[list[i]] = values[i];
+      } else {
+        result[list[i][0]] = list[i][1];
+      }
+    }
+    return result;
+  };
+  _.indexOf = function(array, item, isSorted) {
+    if (array == null) return -1;
+    var i = 0, l = array.length;
+    if (isSorted) {
+      if (typeof isSorted == 'number') {
+        i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
+      } else {
+        i = _.sortedIndex(array, item);
+        return array[i] === item ? i : -1;
+      }
+    }
+    if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+    for (; i < l; i++) if (array[i] === item) return i;
+    return -1;
+  };
+  _.lastIndexOf = function(array, item, from) {
+    if (array == null) return -1;
+    var hasIndex = from != null;
+    if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+      return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+    }
+    var i = (hasIndex ? from : array.length);
+    while (i--) if (array[i] === item) return i;
+    return -1;
+  };
+  _.range = function(start, stop, step) {
+    if (arguments.length <= 1) {
+      stop = start || 0;
+      start = 0;
+    }
+    step = arguments[2] || 1;
+
+    var len = Math.max(Math.ceil((stop - start) / step), 0);
+    var idx = 0;
+    var range = new Array(len);
+
+    while(idx < len) {
+      range[idx++] = start;
+      start += step;
+    }
+
+    return range;
+  };
+  _.bind = function(func, context) {
+    if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+    var args = slice.call(arguments, 2);
+    return function() {
+      return func.apply(context, args.concat(slice.call(arguments)));
+    };
+  };
+  _.partial = function(func) {
+    var args = slice.call(arguments, 1);
+    return function() {
+      return func.apply(this, args.concat(slice.call(arguments)));
+    };
+  };
+  _.bindAll = function(obj) {
+    var funcs = slice.call(arguments, 1);
+    if (funcs.length === 0) funcs = _.functions(obj);
+    each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+    return obj;
+  };
+  _.memoize = function(func, hasher) {
+    var memo = {};
+    hasher || (hasher = _.identity);
+    return function() {
+      var key = hasher.apply(this, arguments);
+      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+    };
+  };
+  _.delay = function(func, wait) {
+    var args = slice.call(arguments, 2);
+    return setTimeout(function(){ return func.apply(null, args); }, wait);
+  };
+  _.defer = function(func) {
+    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+  };
+  _.throttle = function(func, wait) {
+    var context, args, timeout, result;
+    var previous = 0;
+    var later = function() {
+      previous = new Date;
+      timeout = null;
+      result = func.apply(context, args);
+    };
+    return function() {
+      var now = new Date;
+      var remaining = wait - (now - previous);
+      context = this;
+      args = arguments;
+      if (remaining <= 0) {
+        clearTimeout(timeout);
+        timeout = null;
+        previous = now;
+        result = func.apply(context, args);
+      } else if (!timeout) {
+        timeout = setTimeout(later, remaining);
+      }
+      return result;
+    };
+  };
+  _.debounce = function(func, wait, immediate) {
+    var timeout, result;
+    return function() {
+      var context = this, args = arguments;
+      var later = function() {
+        timeout = null;
+        if (!immediate) result = func.apply(context, args);
+      };
+      var callNow = immediate && !timeout;
+      clearTimeout(timeout);
+      timeout = setTimeout(later, wait);
+      if (callNow) result = func.apply(context, args);
+      return result;
+    };
+  };
+  _.once = function(func) {
+    var ran = false, memo;
+    return function() {
+      if (ran) return memo;
+      ran = true;
+      memo = func.apply(this, arguments);
+      func = null;
+      return memo;
+    };
+  };
+  _.wrap = function(func, wrapper) {
+    return function() {
+      var args = [func];
+      push.apply(args, arguments);
+      return wrapper.apply(this, args);
+    };
+  };
+  _.compose = function() {
+    var funcs = arguments;
+    return function() {
+      var args = arguments;
+      for (var i = funcs.length - 1; i >= 0; i--) {
+        args = [funcs[i].apply(this, args)];
+      }
+      return args[0];
+    };
+  };
+  _.after = function(times, func) {
+    if (times <= 0) return func();
+    return function() {
+      if (--times < 1) {
+        return func.apply(this, arguments);
+      }
+    };
+  };
+  _.keys = nativeKeys || function(obj) {
+    if (obj !== Object(obj)) throw new TypeError('Invalid object');
+    var keys = [];
+    for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
+    return keys;
+  };
+  _.values = function(obj) {
+    var values = [];
+    for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
+    return values;
+  };
+  _.pairs = function(obj) {
+    var pairs = [];
+    for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
+    return pairs;
+  };
+  _.invert = function(obj) {
+    var result = {};
+    for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
+    return result;
+  };
+  _.functions = _.methods = function(obj) {
+    var names = [];
+    for (var key in obj) {
+      if (_.isFunction(obj[key])) names.push(key);
+    }
+    return names.sort();
+  };
+  _.extend = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+  _.pick = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    each(keys, function(key) {
+      if (key in obj) copy[key] = obj[key];
+    });
+    return copy;
+  };
+  _.omit = function(obj) {
+    var copy = {};
+    var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+    for (var key in obj) {
+      if (!_.contains(keys, key)) copy[key] = obj[key];
+    }
+    return copy;
+  };
+  _.defaults = function(obj) {
+    each(slice.call(arguments, 1), function(source) {
+      if (source) {
+        for (var prop in source) {
+          if (obj[prop] == null) obj[prop] = source[prop];
+        }
+      }
+    });
+    return obj;
+  };
+  _.clone = function(obj) {
+    if (!_.isObject(obj)) return obj;
+    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+  };
+  _.tap = function(obj, interceptor) {
+    interceptor(obj);
+    return obj;
+  };
+  var eq = function(a, b, aStack, bStack) {
+    if (a === b) return a !== 0 || 1 / a == 1 / b;
+    if (a == null || b == null) return a === b;
+    if (a instanceof _) a = a._wrapped;
+    if (b instanceof _) b = b._wrapped;
+    var className = toString.call(a);
+    if (className != toString.call(b)) return false;
+    switch (className) {
+      case '[object String]':
+        return a == String(b);
+      case '[object Number]':
+        return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+      case '[object Date]':
+      case '[object Boolean]':
+        return +a == +b;
+      case '[object RegExp]':
+        return a.source == b.source &&
+               a.global == b.global &&
+               a.multiline == b.multiline &&
+               a.ignoreCase == b.ignoreCase;
+    }
+    if (typeof a != 'object' || typeof b != 'object') return false;
+    var length = aStack.length;
+    while (length--) {
+      if (aStack[length] == a) return bStack[length] == b;
+    }
+    aStack.push(a);
+    bStack.push(b);
+    var size = 0, result = true;
+    if (className == '[object Array]') {
+      size = a.length;
+      result = size == b.length;
+      if (result) {
+        while (size--) {
+          if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+        }
+      }
+    } else {
+      var aCtor = a.constructor, bCtor = b.constructor;
+      if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+                               _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
+        return false;
+      }
+      for (var key in a) {
+        if (_.has(a, key)) {
+          size++;
+          if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+        }
+      }
+      if (result) {
+        for (key in b) {
+          if (_.has(b, key) && !(size--)) break;
+        }
+        result = !size;
+      }
+    }
+    aStack.pop();
+    bStack.pop();
+    return result;
+  };
+  _.isEqual = function(a, b) {
+    return eq(a, b, [], []);
+  };
+  _.isEmpty = function(obj) {
+    if (obj == null) return true;
+    if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+    for (var key in obj) if (_.has(obj, key)) return false;
+    return true;
+  };
+  _.isElement = function(obj) {
+    return !!(obj && obj.nodeType === 1);
+  };
+  _.isArray = nativeIsArray || function(obj) {
+    return toString.call(obj) == '[object Array]';
+  };
+  _.isObject = function(obj) {
+    return obj === Object(obj);
+  };
+  each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+    _['is' + name] = function(obj) {
+      return toString.call(obj) == '[object ' + name + ']';
+    };
+  });
+  if (!_.isArguments(arguments)) {
+    _.isArguments = function(obj) {
+      return !!(obj && _.has(obj, 'callee'));
+    };
+  }
+  if (typeof (/./) !== 'function') {
+    _.isFunction = function(obj) {
+      return typeof obj === 'function';
+    };
+  }
+  _.isFinite = function(obj) {
+    return isFinite(obj) && !isNaN(parseFloat(obj));
+  };
+  _.isNaN = function(obj) {
+    return _.isNumber(obj) && obj != +obj;
+  };
+  _.isBoolean = function(obj) {
+    return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+  };
+  _.isNull = function(obj) {
+    return obj === null;
+  };
+  _.isUndefined = function(obj) {
+    return obj === void 0;
+  };
+  _.has = function(obj, key) {
+    return hasOwnProperty.call(obj, key);
+  };
+  _.noConflict = function() {
+    root._ = previousUnderscore;
+    return this;
+  };
+  _.identity = function(value) {
+    return value;
+  };
+  _.times = function(n, iterator, context) {
+    var accum = Array(n);
+    for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+    return accum;
+  };
+  _.random = function(min, max) {
+    if (max == null) {
+      max = min;
+      min = 0;
+    }
+    return min + Math.floor(Math.random() * (max - min + 1));
+  };
+  var entityMap = {
+    escape: {
+      '&': '&amp;',
+      '<': '&lt;',
+      '>': '&gt;',
+      '"': '&quot;',
+      "'": '&#x27;',
+      '/': '&#x2F;'
+    }
+  };
+  entityMap.unescape = _.invert(entityMap.escape);
+  var entityRegexes = {
+    escape:   new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+    unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+  };
+  _.each(['escape', 'unescape'], function(method) {
+    _[method] = function(string) {
+      if (string == null) return '';
+      return ('' + string).replace(entityRegexes[method], function(match) {
+        return entityMap[method][match];
+      });
+    };
+  });
+  _.result = function(object, property) {
+    if (object == null) return null;
+    var value = object[property];
+    return _.isFunction(value) ? value.call(object) : value;
+  };
+  _.mixin = function(obj) {
+    each(_.functions(obj), function(name){
+      var func = _[name] = obj[name];
+      _.prototype[name] = function() {
+        var args = [this._wrapped];
+        push.apply(args, arguments);
+        return result.call(this, func.apply(_, args));
+      };
+    });
+  };
+  var idCounter = 0;
+  _.uniqueId = function(prefix) {
+    var id = ++idCounter + '';
+    return prefix ? prefix + id : id;
+  };
+  _.templateSettings = {
+    evaluate    : /<%([\s\S]+?)%>/g,
+    interpolate : /<%=([\s\S]+?)%>/g,
+    escape      : /<%-([\s\S]+?)%>/g
+  };
+  var noMatch = /(.)^/;
+  var escapes = {
+    "'":      "'",
+    '\\':     '\\',
+    '\r':     'r',
+    '\n':     'n',
+    '\t':     't',
+    '\u2028': 'u2028',
+    '\u2029': 'u2029'
+  };
+
+  var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+  _.template = function(text, data, settings) {
+    var render;
+    settings = _.defaults({}, settings, _.templateSettings);
+    var matcher = new RegExp([
+      (settings.escape || noMatch).source,
+      (settings.interpolate || noMatch).source,
+      (settings.evaluate || noMatch).source
+    ].join('|') + '|$', 'g');
+    var index = 0;
+    var source = "__p+='";
+    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+      source += text.slice(index, offset)
+        .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+      if (escape) {
+        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+      }
+      if (interpolate) {
+        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+      }
+      if (evaluate) {
+        source += "';\n" + evaluate + "\n__p+='";
+      }
+      index = offset + match.length;
+      return match;
+    });
+    source += "';\n";
+    if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+    source = "var __t,__p='',__j=Array.prototype.join," +
+      "print=function(){__p+=__j.call(arguments,'');};\n" +
+      source + "return __p;\n";
+
+    try {
+      render = new Function(settings.variable || 'obj', '_', source);
+    } catch (e) {
+      e.source = source;
+      throw e;
+    }
+
+    if (data) return render(data, _);
+    var template = function(data) {
+      return render.call(this, data, _);
+    };
+    template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+    return template;
+  };
+  _.chain = function(obj) {
+    return _(obj).chain();
+  };
+  var result = function(obj) {
+    return this._chain ? _(obj).chain() : obj;
+  };
+  _.mixin(_);
+  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      var obj = this._wrapped;
+      method.apply(obj, arguments);
+      if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+      return result.call(this, obj);
+    };
+  });
+  each(['concat', 'join', 'slice'], function(name) {
+    var method = ArrayProto[name];
+    _.prototype[name] = function() {
+      return result.call(this, method.apply(this._wrapped, arguments));
+    };
+  });
+
+  _.extend(_.prototype, {
+    chain: function() {
+      this._chain = true;
+      return this;
+    },
+    value: function() {
+      return this._wrapped;
+    }
+
+  });
+
+}).call(this);
+
+},
+{}],
+2:[function(req,module,exports){
+
+
+var _ = req("underscore");
+
+var errors = {
+	E001: "Bad option: '{a}'.",
+	E002: "Bad option value.",
+	E003: "Expected a JSON value.",
+	E004: "Input is neither a string nor an array of strings.",
+	E005: "Input is empty.",
+	E006: "Unexpected early end of program.",
+	E007: "Missing \"use strict\" statement.",
+	E008: "Strict violation.",
+	E009: "Option 'validthis' can't be used in a global scope.",
+	E010: "'with' is not allowed in strict mode.",
+	E011: "const '{a}' has already been declared.",
+	E012: "const '{a}' is initialized to 'undefined'.",
+	E013: "Attempting to override '{a}' which is a constant.",
+	E014: "A regular expression literal can be confused with '/='.",
+	E015: "Unclosed regular expression.",
+	E016: "Invalid regular expression.",
+	E017: "Unclosed comment.",
+	E018: "Unbegun comment.",
+	E019: "Unmatched '{a}'.",
+	E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
+	E021: "Expected '{a}' and instead saw '{b}'.",
+	E022: "Line breaking error '{a}'.",
+	E023: "Missing '{a}'.",
+	E024: "Unexpected '{a}'.",
+	E025: "Missing ':' on a case clause.",
+	E026: "Missing '}' to match '{' from line {a}.",
+	E027: "Missing ']' to match '[' form line {a}.",
+	E028: "Illegal comma.",
+	E029: "Unclosed string.",
+	E030: "Expected an identifier and instead saw '{a}'.",
+	E031: "Bad assignment.", // FIXME: Rephrase
+	E032: "Expected a small integer or 'false' and instead saw '{a}'.",
+	E033: "Expected an operator and instead saw '{a}'.",
+	E034: "get/set are ES5 features.",
+	E035: "Missing property name.",
+	E036: "Expected to see a statement and instead saw a block.",
+	E037: null, // Vacant
+	E038: null, // Vacant
+	E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
+	E040: "Each value should have its own case label.",
+	E041: "Unrecoverable syntax error.",
+	E042: "Stopping.",
+	E043: "Too many errors.",
+	E044: "'{a}' is already defined and can't be redefined.",
+	E045: "Invalid for each loop.",
+	E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
+	E047: "A generator function shall contain a yield statement.",
+	E048: "Let declaration not directly within block.",
+	E049: "A {a} cannot be named '{b}'.",
+	E050: "Mozilla requires the yield expression to be parenthesized here.",
+	E051: "Regular parameters cannot come after default parameters."
+};
+
+var warnings = {
+	W001: "'hasOwnProperty' is a really bad name.",
+	W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
+	W003: "'{a}' was used before it was defined.",
+	W004: "'{a}' is already defined.",
+	W005: "A dot following a number can be confused with a decimal point.",
+	W006: "Confusing minuses.",
+	W007: "Confusing pluses.",
+	W008: "A leading decimal point can be confused with a dot: '{a}'.",
+	W009: "The array literal notation [] is preferrable.",
+	W010: "The object literal notation {} is preferrable.",
+	W011: "Unexpected space after '{a}'.",
+	W012: "Unexpected space before '{a}'.",
+	W013: "Missing space after '{a}'.",
+	W014: "Bad line breaking before '{a}'.",
+	W015: "Expected '{a}' to have an indentation at {b} instead at {c}.",
+	W016: "Unexpected use of '{a}'.",
+	W017: "Bad operand.",
+	W018: "Confusing use of '{a}'.",
+	W019: "Use the isNaN function to compare with NaN.",
+	W020: "Read only.",
+	W021: "'{a}' is a function.",
+	W022: "Do not assign to the exception parameter.",
+	W023: "Expected an identifier in an assignment and instead saw a function invocation.",
+	W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
+	W025: "Missing name in function declaration.",
+	W026: "Inner functions should be listed at the top of the outer function.",
+	W027: "Unreachable '{a}' after '{b}'.",
+	W028: "Label '{a}' on {b} statement.",
+	W030: "Expected an assignment or function call and instead saw an expression.",
+	W031: "Do not use 'new' for side effects.",
+	W032: "Unnecessary semicolon.",
+	W033: "Missing semicolon.",
+	W034: "Unnecessary directive \"{a}\".",
+	W035: "Empty block.",
+	W036: "Unexpected /*member '{a}'.",
+	W037: "'{a}' is a statement label.",
+	W038: "'{a}' used out of scope.",
+	W039: "'{a}' is not allowed.",
+	W040: "Possible strict violation.",
+	W041: "Use '{a}' to compare with '{b}'.",
+	W042: "Avoid EOL escaping.",
+	W043: "Bad escaping of EOL. Use option multistr if needed.",
+	W044: "Bad or unnecessary escaping.",
+	W045: "Bad number '{a}'.",
+	W046: "Don't use extra leading zeros '{a}'.",
+	W047: "A trailing decimal point can be confused with a dot: '{a}'.",
+	W048: "Unexpected control character in regular expression.",
+	W049: "Unexpected escaped character '{a}' in regular expression.",
+	W050: "JavaScript URL.",
+	W051: "Variables should not be deleted.",
+	W052: "Unexpected '{a}'.",
+	W053: "Do not use {a} as a constructor.",
+	W054: "The Function constructor is a form of eval.",
+	W055: "A constructor name should start with an uppercase letter.",
+	W056: "Bad constructor.",
+	W057: "Weird construction. Is 'new' unnecessary?",
+	W058: "Missing '()' invoking a constructor.",
+	W059: "Avoid arguments.{a}.",
+	W060: "document.write can be a form of eval.",
+	W061: "eval can be harmful.",
+	W062: "Wrap an immediate function invocation in parens " +
+		"to assist the reader in understanding that the expression " +
+		"is the result of a function, and not the function itself.",
+	W063: "Math is not a function.",
+	W064: "Missing 'new' prefix when invoking a constructor.",
+	W065: "Missing radix parameter.",
+	W066: "Implied eval. Consider passing a function instead of a string.",
+	W067: "Bad invocation.",
+	W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
+	W069: "['{a}'] is better written in dot notation.",
+	W070: "Extra comma. (it breaks older versions of IE)",
+	W071: "This function has too many statements. ({a})",
+	W072: "This function has too many parameters. ({a})",
+	W073: "Blocks are nested too deeply. ({a})",
+	W074: "This function's cyclomatic complexity is too high. ({a})",
+	W075: "Duplicate key '{a}'.",
+	W076: "Unexpected parameter '{a}' in get {b} function.",
+	W077: "Expected a single parameter in set {a} function.",
+	W078: "Setter is defined without getter.",
+	W079: "Redefinition of '{a}'.",
+	W080: "It's not necessary to initialize '{a}' to 'undefined'.",
+	W081: "Too many var statements.",
+	W082: "Function declarations should not be placed in blocks. " +
+		"Use a function expression or move the statement to the top of " +
+		"the outer function.",
+	W083: "Don't make functions within a loop.",
+	W084: "Assignment in conditional expression",
+	W085: "Don't use 'with'.",
+	W086: "Expected a 'break' statement before '{a}'.",
+	W087: "Forgotten 'debugger' statement?",
+	W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
+	W089: "The body of a for in should be wrapped in an if statement to filter " +
+		"unwanted properties from the prototype.",
+	W090: "'{a}' is not a statement label.",
+	W091: "'{a}' is out of scope.",
+	W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.",
+	W093: "Did you mean to return a conditional instead of an assignment?",
+	W094: "Unexpected comma.",
+	W095: "Expected a string and instead saw {a}.",
+	W096: "The '{a}' key may produce unexpected results.",
+	W097: "Use the function form of \"use strict\".",
+	W098: "'{a}' is defined but never used.",
+	W099: "Mixed spaces and tabs.",
+	W100: "This character may get silently deleted by one or more browsers.",
+	W101: "Line is too long.",
+	W102: "Trailing whitespace.",
+	W103: "The '{a}' property is deprecated.",
+	W104: "'{a}' is only available in JavaScript 1.7.",
+	W105: "Unexpected {a} in '{b}'.",
+	W106: "Identifier '{a}' is not in camel case.",
+	W107: "Script URL.",
+	W108: "Strings must use doublequote.",
+	W109: "Strings must use singlequote.",
+	W110: "Mixed double and single quotes.",
+	W112: "Unclosed string.",
+	W113: "Control character in string: {a}.",
+	W114: "Avoid {a}.",
+	W115: "Octal literals are not allowed in strict mode.",
+	W116: "Expected '{a}' and instead saw '{b}'.",
+	W117: "'{a}' is not defined.",
+	W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
+	W119: "'{a}' is only available in ES6 (use esnext option).",
+	W120: "You might be leaking a variable ({a}) here."
+};
+
+var info = {
+	I001: "Comma warnings can be turned off with 'laxcomma'.",
+	I002: "Reserved words as properties can be used under the 'es5' option.",
+	I003: "ES5 option is now set per default"
+};
+
+exports.errors = {};
+exports.warnings = {};
+exports.info = {};
+
+_.each(errors, function (desc, code) {
+	exports.errors[code] = { code: code, desc: desc };
+});
+
+_.each(warnings, function (desc, code) {
+	exports.warnings[code] = { code: code, desc: desc };
+});
+
+_.each(info, function (desc, code) {
+	exports.info[code] = { code: code, desc: desc };
+});
+
+},
+{"underscore":1}],
+3:[function(req,module,exports){
+
+exports.reservedVars = {
+	arguments : false,
+	NaN       : false
+};
+
+exports.ecmaIdentifiers = {
+	Array              : false,
+	Boolean            : false,
+	Date               : false,
+	decodeURI          : false,
+	decodeURIComponent : false,
+	encodeURI          : false,
+	encodeURIComponent : false,
+	Error              : false,
+	"eval"             : false,
+	EvalError          : false,
+	Function           : false,
+	hasOwnProperty     : false,
+	isFinite           : false,
+	isNaN              : false,
+	JSON               : false,
+	Math               : false,
+	Map                : false,
+	Number             : false,
+	Object             : false,
+	parseInt           : false,
+	parseFloat         : false,
+	RangeError         : false,
+	ReferenceError     : false,
+	RegExp             : false,
+	Set                : false,
+	String             : false,
+	SyntaxError        : false,
+	TypeError          : false,
+	URIError           : false,
+	WeakMap            : false
+};
+
+exports.browser = {
+	ArrayBuffer          : false,
+	ArrayBufferView      : false,
+	Audio                : false,
+	Blob                 : false,
+	addEventListener     : false,
+	applicationCache     : false,
+	atob                 : false,
+	blur                 : false,
+	btoa                 : false,
+	clearInterval        : false,
+	clearTimeout         : false,
+	close                : false,
+	closed               : false,
+	CustomEvent          : false,
+	DataView             : false,
+	DOMParser            : false,
+	defaultStatus        : false,
+	document             : false,
+	Element              : false,
+	ElementTimeControl   : false,
+	event                : false,
+	FileReader           : false,
+	Float32Array         : false,
+	Float64Array         : false,
+	FormData             : false,
+	focus                : false,
+	frames               : false,
+	getComputedStyle     : false,
+	HTMLElement          : false,
+	HTMLAnchorElement    : false,
+	HTMLBaseElement      : false,
+	HTMLBlockquoteElement: false,
+	HTMLBodyElement      : false,
+	HTMLBRElement        : false,
+	HTMLButtonElement    : false,
+	HTMLCanvasElement    : false,
+	HTMLDirectoryElement : false,
+	HTMLDivElement       : false,
+	HTMLDListElement     : false,
+	HTMLFieldSetElement  : false,
+	HTMLFontElement      : false,
+	HTMLFormElement      : false,
+	HTMLFrameElement     : false,
+	HTMLFrameSetElement  : false,
+	HTMLHeadElement      : false,
+	HTMLHeadingElement   : false,
+	HTMLHRElement        : false,
+	HTMLHtmlElement      : false,
+	HTMLIFrameElement    : false,
+	HTMLImageElement     : false,
+	HTMLInputElement     : false,
+	HTMLIsIndexElement   : false,
+	HTMLLabelElement     : false,
+	HTMLLayerElement     : false,
+	HTMLLegendElement    : false,
+	HTMLLIElement        : false,
+	HTMLLinkElement      : false,
+	HTMLMapElement       : false,
+	HTMLMenuElement      : false,
+	HTMLMetaElement      : false,
+	HTMLModElement       : false,
+	HTMLObjectElement    : false,
+	HTMLOListElement     : false,
+	HTMLOptGroupElement  : false,
+	HTMLOptionElement    : false,
+	HTMLParagraphElement : false,
+	HTMLParamElement     : false,
+	HTMLPreElement       : false,
+	HTMLQuoteElement     : false,
+	HTMLScriptElement    : false,
+	HTMLSelectElement    : false,
+	HTMLStyleElement     : false,
+	HTMLTableCaptionElement: false,
+	HTMLTableCellElement : false,
+	HTMLTableColElement  : false,
+	HTMLTableElement     : false,
+	HTMLTableRowElement  : false,
+	HTMLTableSectionElement: false,
+	HTMLTextAreaElement  : false,
+	HTMLTitleElement     : false,
+	HTMLUListElement     : false,
+	HTMLVideoElement     : false,
+	history              : false,
+	Int16Array           : false,
+	Int32Array           : false,
+	Int8Array            : false,
+	Image                : false,
+	length               : false,
+	localStorage         : false,
+	location             : false,
+	MessageChannel       : false,
+	MessageEvent         : false,
+	MessagePort          : false,
+	MouseEvent           : false,
+	moveBy               : false,
+	moveTo               : false,
+	MutationObserver     : false,
+	name                 : false,
+	Node                 : false,
+	NodeFilter           : false,
+	navigator            : false,
+	onbeforeunload       : true,
+	onblur               : true,
+	onerror              : true,
+	onfocus              : true,
+	onload               : true,
+	onresize             : true,
+	onunload             : true,
+	open                 : false,
+	openDatabase         : false,
+	opener               : false,
+	Option               : false,
+	parent               : false,
+	print                : false,
+	removeEventListener  : false,
+	resizeBy             : false,
+	resizeTo             : false,
+	screen               : false,
+	scroll               : false,
+	scrollBy             : false,
+	scrollTo             : false,
+	sessionStorage       : false,
+	setInterval          : false,
+	setTimeout           : false,
+	SharedWorker         : false,
+	status               : false,
+	SVGAElement          : false,
+	SVGAltGlyphDefElement: false,
+	SVGAltGlyphElement   : false,
+	SVGAltGlyphItemElement: false,
+	SVGAngle             : false,
+	SVGAnimateColorElement: false,
+	SVGAnimateElement    : false,
+	SVGAnimateMotionElement: false,
+	SVGAnimateTransformElement: false,
+	SVGAnimatedAngle     : false,
+	SVGAnimatedBoolean   : false,
+	SVGAnimatedEnumeration: false,
+	SVGAnimatedInteger   : false,
+	SVGAnimatedLength    : false,
+	SVGAnimatedLengthList: false,
+	SVGAnimatedNumber    : false,
+	SVGAnimatedNumberList: false,
+	SVGAnimatedPathData  : false,
+	SVGAnimatedPoints    : false,
+	SVGAnimatedPreserveAspectRatio: false,
+	SVGAnimatedRect      : false,
+	SVGAnimatedString    : false,
+	SVGAnimatedTransformList: false,
+	SVGAnimationElement  : false,
+	SVGCSSRule           : false,
+	SVGCircleElement     : false,
+	SVGClipPathElement   : false,
+	SVGColor             : false,
+	SVGColorProfileElement: false,
+	SVGColorProfileRule  : false,
+	SVGComponentTransferFunctionElement: false,
+	SVGCursorElement     : false,
+	SVGDefsElement       : false,
+	SVGDescElement       : false,
+	SVGDocument          : false,
+	SVGElement           : false,
+	SVGElementInstance   : false,
+	SVGElementInstanceList: false,
+	SVGEllipseElement    : false,
+	SVGExternalResourcesRequired: false,
+	SVGFEBlendElement    : false,
+	SVGFEColorMatrixElement: false,
+	SVGFEComponentTransferElement: false,
+	SVGFECompositeElement: false,
+	SVGFEConvolveMatrixElement: false,
+	SVGFEDiffuseLightingElement: false,
+	SVGFEDisplacementMapElement: false,
+	SVGFEDistantLightElement: false,
+	SVGFEFloodElement    : false,
+	SVGFEFuncAElement    : false,
+	SVGFEFuncBElement    : false,
+	SVGFEFuncGElement    : false,
+	SVGFEFuncRElement    : false,
+	SVGFEGaussianBlurElement: false,
+	SVGFEImageElement    : false,
+	SVGFEMergeElement    : false,
+	SVGFEMergeNodeElement: false,
+	SVGFEMorphologyElement: false,
+	SVGFEOffsetElement   : false,
+	SVGFEPointLightElement: false,
+	SVGFESpecularLightingElement: false,
+	SVGFESpotLightElement: false,
+	SVGFETileElement     : false,
+	SVGFETurbulenceElement: false,
+	SVGFilterElement     : false,
+	SVGFilterPrimitiveStandardAttributes: false,
+	SVGFitToViewBox      : false,
+	SVGFontElement       : false,
+	SVGFontFaceElement   : false,
+	SVGFontFaceFormatElement: false,
+	SVGFontFaceNameElement: false,
+	SVGFontFaceSrcElement: false,
+	SVGFontFaceUriElement: false,
+	SVGForeignObjectElement: false,
+	SVGGElement          : false,
+	SVGGlyphElement      : false,
+	SVGGlyphRefElement   : false,
+	SVGGradientElement   : false,
+	SVGHKernElement      : false,
+	SVGICCColor          : false,
+	SVGImageElement      : false,
+	SVGLangSpace         : false,
+	SVGLength            : false,
+	SVGLengthList        : false,
+	SVGLineElement       : false,
+	SVGLinearGradientElement: false,
+	SVGLocatable         : false,
+	SVGMPathElement      : false,
+	SVGMarkerElement     : false,
+	SVGMaskElement       : false,
+	SVGMatrix            : false,
+	SVGMetadataElement   : false,
+	SVGMissingGlyphElement: false,
+	SVGNumber            : false,
+	SVGNumberList        : false,
+	SVGPaint             : false,
+	SVGPathElement       : false,
+	SVGPathSeg           : false,
+	SVGPathSegArcAbs     : false,
+	SVGPathSegArcRel     : false,
+	SVGPathSegClosePath  : false,
+	SVGPathSegCurvetoCubicAbs: false,
+	SVGPathSegCurvetoCubicRel: false,
+	SVGPathSegCurvetoCubicSmoothAbs: false,
+	SVGPathSegCurvetoCubicSmoothRel: false,
+	SVGPathSegCurvetoQuadraticAbs: false,
+	SVGPathSegCurvetoQuadraticRel: false,
+	SVGPathSegCurvetoQuadraticSmoothAbs: false,
+	SVGPathSegCurvetoQuadraticSmoothRel: false,
+	SVGPathSegLinetoAbs  : false,
+	SVGPathSegLinetoHorizontalAbs: false,
+	SVGPathSegLinetoHorizontalRel: false,
+	SVGPathSegLinetoRel  : false,
+	SVGPathSegLinetoVerticalAbs: false,
+	SVGPathSegLinetoVerticalRel: false,
+	SVGPathSegList       : false,
+	SVGPathSegMovetoAbs  : false,
+	SVGPathSegMovetoRel  : false,
+	SVGPatternElement    : false,
+	SVGPoint             : false,
+	SVGPointList         : false,
+	SVGPolygonElement    : false,
+	SVGPolylineElement   : false,
+	SVGPreserveAspectRatio: false,
+	SVGRadialGradientElement: false,
+	SVGRect              : false,
+	SVGRectElement       : false,
+	SVGRenderingIntent   : false,
+	SVGSVGElement        : false,
+	SVGScriptElement     : false,
+	SVGSetElement        : false,
+	SVGStopElement       : false,
+	SVGStringList        : false,
+	SVGStylable          : false,
+	SVGStyleElement      : false,
+	SVGSwitchElement     : false,
+	SVGSymbolElement     : false,
+	SVGTRefElement       : false,
+	SVGTSpanElement      : false,
+	SVGTests             : false,
+	SVGTextContentElement: false,
+	SVGTextElement       : false,
+	SVGTextPathElement   : false,
+	SVGTextPositioningElement: false,
+	SVGTitleElement      : false,
+	SVGTransform         : false,
+	SVGTransformList     : false,
+	SVGTransformable     : false,
+	SVGURIReference      : false,
+	SVGUnitTypes         : false,
+	SVGUseElement        : false,
+	SVGVKernElement      : false,
+	SVGViewElement       : false,
+	SVGViewSpec          : false,
+	SVGZoomAndPan        : false,
+	TimeEvent            : false,
+	top                  : false,
+	Uint16Array          : false,
+	Uint32Array          : false,
+	Uint8Array           : false,
+	Uint8ClampedArray    : false,
+	WebSocket            : false,
+	window               : false,
+	Worker               : false,
+	XMLHttpRequest       : false,
+	XMLSerializer        : false,
+	XPathEvaluator       : false,
+	XPathException       : false,
+	XPathExpression      : false,
+	XPathNamespace       : false,
+	XPathNSResolver      : false,
+	XPathResult          : false
+};
+
+exports.devel = {
+	alert  : false,
+	confirm: false,
+	console: false,
+	Debug  : false,
+	opera  : false,
+	prompt : false
+};
+
+exports.worker = {
+	importScripts: true,
+	postMessage  : true,
+	self         : true
+};
+exports.nonstandard = {
+	escape  : false,
+	unescape: false
+};
+
+exports.couch = {
+	"require" : false,
+	respond   : false,
+	getRow    : false,
+	emit      : false,
+	send      : false,
+	start     : false,
+	sum       : false,
+	log       : false,
+	exports   : false,
+	module    : false,
+	provides  : false
+};
+
+exports.node = {
+	__filename    : false,
+	__dirname     : false,
+	Buffer        : false,
+	DataView      : false,
+	console       : false,
+	exports       : true,  // In Node it is ok to exports = module.exports = foo();
+	GLOBAL        : false,
+	global        : false,
+	module        : false,
+	process       : false,
+	require       : false,
+	setTimeout    : false,
+	clearTimeout  : false,
+	setInterval   : false,
+	clearInterval : false,
+	setImmediate  : false, // v0.9.1+
+	clearImmediate: false  // v0.9.1+
+};
+
+exports.phantom = {
+	phantom      : true,
+	require      : true,
+	WebPage      : true
+};
+
+exports.rhino = {
+	defineClass  : false,
+	deserialize  : false,
+	gc           : false,
+	help         : false,
+	importPackage: false,
+	"java"       : false,
+	load         : false,
+	loadClass    : false,
+	print        : false,
+	quit         : false,
+	readFile     : false,
+	readUrl      : false,
+	runCommand   : false,
+	seal         : false,
+	serialize    : false,
+	spawn        : false,
+	sync         : false,
+	toint32      : false,
+	version      : false
+};
+
+exports.shelljs = {
+	target       : false,
+	echo         : false,
+	exit         : false,
+	cd           : false,
+	pwd          : false,
+	ls           : false,
+	find         : false,
+	cp           : false,
+	rm           : false,
+	mv           : false,
+	mkdir        : false,
+	test         : false,
+	cat          : false,
+	sed          : false,
+	grep         : false,
+	which        : false,
+	dirs         : false,
+	pushd        : false,
+	popd         : false,
+	env          : false,
+	exec         : false,
+	chmod        : false,
+	config       : false,
+	error        : false,
+	tempdir      : false
+};
+
+exports.wsh = {
+	ActiveXObject            : true,
+	Enumerator               : true,
+	GetObject                : true,
+	ScriptEngine             : true,
+	ScriptEngineBuildVersion : true,
+	ScriptEngineMajorVersion : true,
+	ScriptEngineMinorVersion : true,
+	VBArray                  : true,
+	WSH                      : true,
+	WScript                  : true,
+	XDomainRequest           : true
+};
+
+exports.dojo = {
+	dojo     : false,
+	dijit    : false,
+	dojox    : false,
+	define	 : false,
+	"require": false
+};
+
+exports.jquery = {
+	"$"    : false,
+	jQuery : false
+};
+
+exports.mootools = {
+	"$"           : false,
+	"$$"          : false,
+	Asset         : false,
+	Browser       : false,
+	Chain         : false,
+	Class         : false,
+	Color         : false,
+	Cookie        : false,
+	Core          : false,
+	Document      : false,
+	DomReady      : false,
+	DOMEvent      : false,
+	DOMReady      : false,
+	Drag          : false,
+	Element       : false,
+	Elements      : false,
+	Event         : false,
+	Events        : false,
+	Fx            : false,
+	Group         : false,
+	Hash          : false,
+	HtmlTable     : false,
+	Iframe        : false,
+	IframeShim    : false,
+	InputValidator: false,
+	instanceOf    : false,
+	Keyboard      : false,
+	Locale        : false,
+	Mask          : false,
+	MooTools      : false,
+	Native        : false,
+	Options       : false,
+	OverText      : false,
+	Request       : false,
+	Scroller      : false,
+	Slick         : false,
+	Slider        : false,
+	Sortables     : false,
+	Spinner       : false,
+	Swiff         : false,
+	Tips          : false,
+	Type          : false,
+	typeOf        : false,
+	URI           : false,
+	Window        : false
+};
+
+exports.prototypejs = {
+	"$"               : false,
+	"$$"              : false,
+	"$A"              : false,
+	"$F"              : false,
+	"$H"              : false,
+	"$R"              : false,
+	"$break"          : false,
+	"$continue"       : false,
+	"$w"              : false,
+	Abstract          : false,
+	Ajax              : false,
+	Class             : false,
+	Enumerable        : false,
+	Element           : false,
+	Event             : false,
+	Field             : false,
+	Form              : false,
+	Hash              : false,
+	Insertion         : false,
+	ObjectRange       : false,
+	PeriodicalExecuter: false,
+	Position          : false,
+	Prototype         : false,
+	Selector          : false,
+	Template          : false,
+	Toggle            : false,
+	Try               : false,
+	Autocompleter     : false,
+	Builder           : false,
+	Control           : false,
+	Draggable         : false,
+	Draggables        : false,
+	Droppables        : false,
+	Effect            : false,
+	Sortable          : false,
+	SortableObserver  : false,
+	Sound             : false,
+	Scriptaculous     : false
+};
+
+exports.yui = {
+	YUI       : false,
+	Y         : false,
+	YUI_config: false
+};
+
+
+},
+{}],
+"n4bKNg":[function(req,module,exports){
+
+var _        = req("underscore");
+var events   = req("events");
+var vars     = req("../shared/vars.js");
+var messages = req("../shared/messages.js");
+var Lexer    = req("./lex.js").Lexer;
+var reg      = req("./reg.js");
+var state    = req("./state.js").state;
+var style    = req("./style.js");
+var console = req("console-browserify");
+
+var JSHINT = (function () {
+	
+
+	var anonname, // The guessed name for anonymous functions.
+		api, // Extension API
+		bang = {
+			"<"  : true,
+			"<=" : true,
+			"==" : true,
+			"===": true,
+			"!==": true,
+			"!=" : true,
+			">"  : true,
+			">=" : true,
+			"+"  : true,
+			"-"  : true,
+			"*"  : true,
+			"/"  : true,
+			"%"  : true
+		},
+		boolOptions = {
+			asi         : true, // if automatic semicolon insertion should be tolerated
+			bitwise     : true, // if bitwise operators should not be allowed
+			boss        : true, // if advanced usage of assignments should be allowed
+			browser     : true, // if the standard browser globals should be predefined
+			camelcase   : true, // if identifiers should be required in camel case
+			couch       : true, // if CouchDB globals should be predefined
+			curly       : true, // if curly braces around all blocks should be required
+			debug       : true, // if debugger statements should be allowed
+			devel       : true, // if logging globals should be predefined (console, alert, etc.)
+			dojo        : true, // if Dojo Toolkit globals should be predefined
+			eqeqeq      : true, // if === should be required
+			eqnull      : true, // if == null comparisons should be tolerated
+			es3         : true, // if ES3 syntax should be allowed
+			es5         : true, // if ES5 syntax should be allowed (is now set per default)
+			esnext      : true, // if es.next specific syntax should be allowed
+			moz         : true, // if mozilla specific syntax should be allowed
+			evil        : true, // if eval should be allowed
+			expr        : true, // if ExpressionStatement should be allowed as Programs
+			forin       : true, // if for in statements must filter
+			funcscope   : true, // if only function scope should be used for scope tests
+			gcl         : true, // if JSHint should be compatible with Google Closure Linter
+			globalstrict: true, // if global  should be allowed (also enables 'strict')
+			immed       : true, // if immediate invocations must be wrapped in parens
+			iterator    : true, // if the `__iterator__` property should be allowed
+			jquery      : true, // if jQuery globals should be predefined
+			lastsemic   : true, // if semicolons may be ommitted for the trailing
+			laxbreak    : true, // if line breaks should not be checked
+			laxcomma    : true, // if line breaks should not be checked around commas
+			loopfunc    : true, // if functions should be allowed to be defined within
+			mootools    : true, // if MooTools globals should be predefined
+			multistr    : true, // allow multiline strings
+			newcap      : true, // if constructor names must be capitalized
+			noarg       : true, // if arguments.caller and arguments.callee should be
+			node        : true, // if the Node.js environment globals should be
+			noempty     : true, // if empty blocks should be disallowed
+			nonew       : true, // if using `new` for side-effects should be disallowed
+			nonstandard : true, // if non-standard (but widely adopted) globals should
+			nomen       : true, // if names should be checked
+			onevar      : true, // if only one var statement per function should be
+			passfail    : true, // if the scan should stop on first error
+			phantom     : true, // if PhantomJS symbols should be allowed
+			plusplus    : true, // if increment/decrement should not be allowed
+			proto       : true, // if the `__proto__` property should be allowed
+			prototypejs : true, // if Prototype and Scriptaculous globals should be
+			rhino       : true, // if the Rhino environment globals should be predefined
+			shelljs     : true, // if ShellJS globals should be predefined
+			undef       : true, // if variables should be declared before used
+			scripturl   : true, // if script-targeted URLs should be tolerated
+			shadow      : true, // if variable shadowing should be tolerated
+			smarttabs   : true, // if smarttabs should be tolerated
+			strict      : true, // require the  pragma
+			sub         : true, // if all forms of subscript notation are tolerated
+			supernew    : true, // if `new function () { ... };` and `new Object;`
+			trailing    : true, // if trailing whitespace rules apply
+			validthis   : true, // if 'this' inside a non-constructor function is valid.
+			withstmt    : true, // if with statements should be allowed
+			white       : true, // if strict whitespace rules apply
+			worker      : true, // if Web Worker script symbols should be allowed
+			wsh         : true, // if the Windows Scripting Host environment globals
+			yui         : true, // YUI variables should be predefined
+			onecase     : true, // if one case switch statements should be allowed
+			regexp      : true, // if the . should not be allowed in regexp literals
+			regexdash   : true  // if unescaped first/last dash (-) inside brackets
+		},
+		valOptions = {
+			maxlen       : false,
+			indent       : false,
+			maxerr       : false,
+			predef       : false,
+			quotmark     : false, //'single'|'double'|true
+			scope        : false,
+			maxstatements: false, // {int} max statements per function
+			maxdepth     : false, // {int} max nested block depth per function
+			maxparams    : false, // {int} max params per function
+			maxcomplexity: false, // {int} max cyclomatic complexity per function
+			unused       : true,  // warn if variables are unused. Available options:
+			latedef      : false  // warn if the variable is used before its definition
+		},
+		invertedOptions = {
+			bitwise : true,
+			forin   : true,
+			newcap  : true,
+			nomen   : true,
+			plusplus: true,
+			regexp  : true,
+			undef   : true,
+			white   : true,
+			eqeqeq  : true,
+			onevar  : true,
+			strict  : true
+		},
+		renamedOptions = {
+			eqeq   : "eqeqeq",
+			vars   : "onevar",
+			windows: "wsh",
+			sloppy : "strict"
+		},
+
+		declared, // Globals that were declared using /*global ... */ syntax.
+		exported, // Variables that are used outside of the current file.
+
+		functionicity = [
+			"closure", "exception", "global", "label",
+			"outer", "unused", "var"
+		],
+
+		funct, // The current function
+		functions, // All of the functions
+
+		global, // The global scope
+		implied, // Implied globals
+		inblock,
+		indent,
+		lookahead,
+		lex,
+		member,
+		membersOnly,
+		noreach,
+		predefined,		// Global variables defined by option
+
+		scope,  // The current scope
+		stack,
+		unuseds,
+		urls,
+		warnings,
+
+		extraModules = [],
+		emitter = new events.EventEmitter();
+
+	function checkOption(name, t) {
+		name = name.trim();
+
+		if (/^[+-]W\d{3}$/g.test(name)) {
+			return true;
+		}
+
+		if (valOptions[name] === undefined && boolOptions[name] === undefined) {
+			if (t.type !== "jslint") {
+				error("E001", t, name);
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	function isString(obj) {
+		return Object.prototype.toString.call(obj) === "[object String]";
+	}
+
+	function isIdentifier(tkn, value) {
+		if (!tkn)
+			return false;
+
+		if (!tkn.identifier || tkn.value !== value)
+			return false;
+
+		return true;
+	}
+
+	function isReserved(token) {
+		if (!token.reserved) {
+			return false;
+		}
+		var meta = token.meta;
+
+		if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+			if (!meta.es5) {
+				return false;
+			}
+			if (meta.strictOnly) {
+				if (!state.option.strict && !state.directive["use strict"]) {
+					return false;
+				}
+			}
+
+			if (token.isProperty) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	function supplant(str, data) {
+		return str.replace(/\{([^{}]*)\}/g, function (a, b) {
+			var r = data[b];
+			return typeof r === "string" || typeof r === "number" ? r : a;
+		});
+	}
+
+	function combine(t, o) {
+		var n;
+		for (n in o) {
+			if (_.has(o, n) && !_.has(JSHINT.blacklist, n)) {
+				t[n] = o[n];
+			}
+		}
+	}
+
+	function updatePredefined() {
+		Object.keys(JSHINT.blacklist).forEach(function (key) {
+			delete predefined[key];
+		});
+	}
+
+	function assume() {
+		if (state.option.couch) {
+			combine(predefined, vars.couch);
+		}
+
+		if (state.option.rhino) {
+			combine(predefined, vars.rhino);
+		}
+
+		if (state.option.shelljs) {
+			combine(predefined, vars.shelljs);
+			combine(predefined, vars.node);
+		}
+
+		if (state.option.phantom) {
+			combine(predefined, vars.phantom);
+		}
+
+		if (state.option.prototypejs) {
+			combine(predefined, vars.prototypejs);
+		}
+
+		if (state.option.node) {
+			combine(predefined, vars.node);
+		}
+
+		if (state.option.devel) {
+			combine(predefined, vars.devel);
+		}
+
+		if (state.option.dojo) {
+			combine(predefined, vars.dojo);
+		}
+
+		if (state.option.browser) {
+			combine(predefined, vars.browser);
+		}
+
+		if (state.option.nonstandard) {
+			combine(predefined, vars.nonstandard);
+		}
+
+		if (state.option.jquery) {
+			combine(predefined, vars.jquery);
+		}
+
+		if (state.option.mootools) {
+			combine(predefined, vars.mootools);
+		}
+
+		if (state.option.worker) {
+			combine(predefined, vars.worker);
+		}
+
+		if (state.option.wsh) {
+			combine(predefined, vars.wsh);
+		}
+
+		if (state.option.globalstrict && state.option.strict !== false) {
+			state.option.strict = true;
+		}
+
+		if (state.option.yui) {
+			combine(predefined, vars.yui);
+		}
+
+		state.option.inMoz = function (strict) {
+			return state.option.moz;
+		};
+
+		state.option.inESNext = function (strict) {
+			return state.option.moz || state.option.esnext;
+		};
+
+		state.option.inES5 = function (/* strict */) {
+			return !state.option.es3;
+		};
+
+		state.option.inES3 = function (strict) {
+			if (strict) {
+				return !state.option.moz && !state.option.esnext && state.option.es3;
+			}
+			return state.option.es3;
+		};
+	}
+	function quit(code, line, chr) {
+		var percentage = Math.floor((line / state.lines.length) * 100);
+		var message = messages.errors[code].desc;
+
+		throw {
+			name: "JSHintError",
+			line: line,
+			character: chr,
+			message: message + " (" + percentage + "% scanned).",
+			raw: message,
+			code: code
+		};
+	}
+
+	function isundef(scope, code, token, a) {
+		return JSHINT.undefs.push([scope, code, token, a]);
+	}
+
+	function warning(code, t, a, b, c, d) {
+		var ch, l, w, msg;
+
+		if (/^W\d{3}$/.test(code)) {
+			if (state.ignored[code])
+				return;
+
+			msg = messages.warnings[code];
+		} else if (/E\d{3}/.test(code)) {
+			msg = messages.errors[code];
+		} else if (/I\d{3}/.test(code)) {
+			msg = messages.info[code];
+		}
+
+		t = t || state.tokens.next;
+		if (t.id === "(end)") {  // `~
+			t = state.tokens.curr;
+		}
+
+		l = t.line || 0;
+		ch = t.from || 0;
+
+		w = {
+			id: "(error)",
+			raw: msg.desc,
+			code: msg.code,
+			evidence: state.lines[l - 1] || "",
+			line: l,
+			character: ch,
+			scope: JSHINT.scope,
+			a: a,
+			b: b,
+			c: c,
+			d: d
+		};
+
+		w.reason = supplant(msg.desc, w);
+		JSHINT.errors.push(w);
+
+		if (state.option.passfail) {
+			quit("E042", l, ch);
+		}
+
+		warnings += 1;
+		if (warnings >= state.option.maxerr) {
+			quit("E043", l, ch);
+		}
+
+		return w;
+	}
+
+	function warningAt(m, l, ch, a, b, c, d) {
+		return warning(m, {
+			line: l,
+			from: ch
+		}, a, b, c, d);
+	}
+
+	function error(m, t, a, b, c, d) {
+		warning(m, t, a, b, c, d);
+	}
+
+	function errorAt(m, l, ch, a, b, c, d) {
+		return error(m, {
+			line: l,
+			from: ch
+		}, a, b, c, d);
+	}
+	function addInternalSrc(elem, src) {
+		var i;
+		i = {
+			id: "(internal)",
+			elem: elem,
+			value: src
+		};
+		JSHINT.internals.push(i);
+		return i;
+	}
+
+	function addlabel(t, type, tkn, islet) {
+		if (type === "exception") {
+			if (_.has(funct["(context)"], t)) {
+				if (funct[t] !== true && !state.option.node) {
+					warning("W002", state.tokens.next, t);
+				}
+			}
+		}
+
+		if (_.has(funct, t) && !funct["(global)"]) {
+			if (funct[t] === true) {
+				if (state.option.latedef) {
+					if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
+							!_.contains([funct[t], type], "unction")) {
+						warning("W003", state.tokens.next, t);
+					}
+				}
+			} else {
+				if (!state.option.shadow && type !== "exception" ||
+							(funct["(blockscope)"].getlabel(t))) {
+					warning("W004", state.tokens.next, t);
+				}
+			}
+		}
+		if (funct["(blockscope)"] && funct["(blockscope)"].current.has(t)) {
+			error("E044", state.tokens.next, t);
+		}
+		if (islet) {
+			funct["(blockscope)"].current.add(t, type, state.tokens.curr);
+		} else {
+
+			funct[t] = type;
+
+			if (tkn) {
+				funct["(tokens)"][t] = tkn;
+			}
+
+			if (funct["(global)"]) {
+				global[t] = funct;
+				if (_.has(implied, t)) {
+					if (state.option.latedef) {
+						if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
+								!_.contains([funct[t], type], "unction")) {
+							warning("W003", state.tokens.next, t);
+						}
+					}
+
+					delete implied[t];
+				}
+			} else {
+				scope[t] = funct;
+			}
+		}
+	}
+
+	function doOption() {
+		var nt = state.tokens.next;
+		var body = nt.body.match(/(-\s+)?[^\s,]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g);
+		var predef = {};
+
+		if (nt.type === "globals") {
+			body.forEach(function (g) {
+				g = g.split(":");
+				var key = (g[0] || "").trim();
+				var val = (g[1] || "").trim();
+
+				if (key.charAt(0) === "-") {
+					key = key.slice(1);
+					val = false;
+
+					JSHINT.blacklist[key] = key;
+					updatePredefined();
+				} else {
+					predef[key] = (val === "true");
+				}
+			});
+
+			combine(predefined, predef);
+
+			for (var key in predef) {
+				if (_.has(predef, key)) {
+					declared[key] = nt;
+				}
+			}
+		}
+
+		if (nt.type === "exported") {
+			body.forEach(function (e) {
+				exported[e] = true;
+			});
+		}
+
+		if (nt.type === "members") {
+			membersOnly = membersOnly || {};
+
+			body.forEach(function (m) {
+				var ch1 = m.charAt(0);
+				var ch2 = m.charAt(m.length - 1);
+
+				if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
+					m = m
+						.substr(1, m.length - 2)
+						.replace("\\b", "\b")
+						.replace("\\t", "\t")
+						.replace("\\n", "\n")
+						.replace("\\v", "\v")
+						.replace("\\f", "\f")
+						.replace("\\r", "\r")
+						.replace("\\\\", "\\")
+						.replace("\\\"", "\"");
+				}
+
+				membersOnly[m] = false;
+			});
+		}
+
+		var numvals = [
+			"maxstatements",
+			"maxparams",
+			"maxdepth",
+			"maxcomplexity",
+			"maxerr",
+			"maxlen",
+			"indent"
+		];
+
+		if (nt.type === "jshint" || nt.type === "jslint") {
+			body.forEach(function (g) {
+				g = g.split(":");
+				var key = (g[0] || "").trim();
+				var val = (g[1] || "").trim();
+
+				if (!checkOption(key, nt)) {
+					return;
+				}
+
+				if (numvals.indexOf(key) >= 0) {
+					if (val !== "false") {
+						val = +val;
+
+						if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
+							error("E032", nt, g[1].trim());
+							return;
+						}
+
+						if (key === "indent") {
+							state.option["(explicitIndent)"] = true;
+						}
+						state.option[key] = val;
+					} else {
+						if (key === "indent") {
+							state.option["(explicitIndent)"] = false;
+						} else {
+							state.option[key] = false;
+						}
+					}
+
+					return;
+				}
+
+				if (key === "validthis") {
+					if (funct["(global)"]) {
+						error("E009");
+					} else {
+						if (val === "true" || val === "false") {
+							state.option.validthis = (val === "true");
+						} else {
+							error("E002", nt);
+						}
+					}
+					return;
+				}
+
+				if (key === "quotmark") {
+					switch (val) {
+					case "true":
+					case "false":
+						state.option.quotmark = (val === "true");
+						break;
+					case "double":
+					case "single":
+						state.option.quotmark = val;
+						break;
+					default:
+						error("E002", nt);
+					}
+					return;
+				}
+
+				if (key === "unused") {
+					switch (val) {
+					case "true":
+						state.option.unused = true;
+						break;
+					case "false":
+						state.option.unused = false;
+						break;
+					case "vars":
+					case "strict":
+						state.option.unused = val;
+						break;
+					default:
+						error("E002", nt);
+					}
+					return;
+				}
+
+				if (key === "latedef") {
+					switch (val) {
+					case "true":
+						state.option.latedef = true;
+						break;
+					case "false":
+						state.option.latedef = false;
+						break;
+					case "nofunc":
+						state.option.latedef = "nofunc";
+						break;
+					default:
+						error("E002", nt);
+					}
+					return;
+				}
+
+				var match = /^([+-])(W\d{3})$/g.exec(key);
+				if (match) {
+					state.ignored[match[2]] = (match[1] === "-");
+					return;
+				}
+
+				var tn;
+				if (val === "true" || val === "false") {
+					if (nt.type === "jslint") {
+						tn = renamedOptions[key] || key;
+						state.option[tn] = (val === "true");
+
+						if (invertedOptions[tn] !== undefined) {
+							state.option[tn] = !state.option[tn];
+						}
+					} else {
+						state.option[key] = (val === "true");
+					}
+
+					if (key === "newcap") {
+						state.option["(explicitNewcap)"] = true;
+					}
+					return;
+				}
+
+				error("E002", nt);
+			});
+
+			assume();
+		}
+	}
+
+	function peek(p) {
+		var i = p || 0, j = 0, t;
+
+		while (j <= i) {
+			t = lookahead[j];
+			if (!t) {
+				t = lookahead[j] = lex.token();
+			}
+			j += 1;
+		}
+		return t;
+	}
+
+	function advance(id, t) {
+		switch (state.tokens.curr.id) {
+		case "(number)":
+			if (state.tokens.next.id === ".") {
+				warning("W005", state.tokens.curr);
+			}
+			break;
+		case "-":
+			if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
+				warning("W006");
+			}
+			break;
+		case "+":
+			if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
+				warning("W007");
+			}
+			break;
+		}
+
+		if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) {
+			anonname = state.tokens.curr.value;
+		}
+
+		if (id && state.tokens.next.id !== id) {
+			if (t) {
+				if (state.tokens.next.id === "(end)") {
+					error("E019", t, t.id);
+				} else {
+					error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
+				}
+			} else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
+				warning("W116", state.tokens.next, id, state.tokens.next.value);
+			}
+		}
+
+		state.tokens.prev = state.tokens.curr;
+		state.tokens.curr = state.tokens.next;
+		for (;;) {
+			state.tokens.next = lookahead.shift() || lex.token();
+
+			if (!state.tokens.next) { // No more tokens left, give up
+				quit("E041", state.tokens.curr.line);
+			}
+
+			if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
+				return;
+			}
+
+			if (state.tokens.next.check) {
+				state.tokens.next.check();
+			}
+
+			if (state.tokens.next.isSpecial) {
+				doOption();
+			} else {
+				if (state.tokens.next.id !== "(endline)") {
+					break;
+				}
+			}
+		}
+	}
+
+	function isInfix(token) {
+		return token.infix || (!token.identifier && !!token.led);
+	}
+
+	function isEndOfExpr() {
+		var curr = state.tokens.curr;
+		var next = state.tokens.next;
+		if (next.id === ";" || next.id === "}" || next.id === ":") {
+			return true;
+		}
+		if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) {
+			return curr.line !== next.line;
+		}
+		return false;
+	}
+
+	function expression(rbp, initial) {
+		var left, isArray = false, isObject = false, isLetExpr = false;
+		if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
+			if (!state.option.inMoz(true)) {
+				warning("W118", state.tokens.next, "let expressions");
+			}
+			isLetExpr = true;
+			funct["(blockscope)"].stack();
+			advance("let");
+			advance("(");
+			state.syntax["let"].fud.call(state.syntax["let"].fud, false);
+			advance(")");
+		}
+
+		if (state.tokens.next.id === "(end)")
+			error("E006", state.tokens.curr);
+
+		advance();
+
+		if (initial) {
+			anonname = "anonymous";
+			funct["(verb)"] = state.tokens.curr.value;
+		}
+
+		if (initial === true && state.tokens.curr.fud) {
+			left = state.tokens.curr.fud();
+		} else {
+			if (state.tokens.curr.nud) {
+				left = state.tokens.curr.nud();
+			} else {
+				error("E030", state.tokens.curr, state.tokens.curr.id);
+			}
+
+			while (rbp < state.tokens.next.lbp && !isEndOfExpr()) {
+				isArray = state.tokens.curr.value === "Array";
+				isObject = state.tokens.curr.value === "Object";
+				if (left && (left.value || (left.first && left.first.value))) {
+					if (left.value !== "new" ||
+					  (left.first && left.first.value && left.first.value === ".")) {
+						isArray = false;
+						if (left.value !== state.tokens.curr.value) {
+							isObject = false;
+						}
+					}
+				}
+
+				advance();
+
+				if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+					warning("W009", state.tokens.curr);
+				}
+
+				if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+					warning("W010", state.tokens.curr);
+				}
+
+				if (left && state.tokens.curr.led) {
+					left = state.tokens.curr.led(left);
+				} else {
+					error("E033", state.tokens.curr, state.tokens.curr.id);
+				}
+			}
+		}
+		if (isLetExpr) {
+			funct["(blockscope)"].unstack();
+		}
+		return left;
+	}
+
+	function adjacent(left, right) {
+		left = left || state.tokens.curr;
+		right = right || state.tokens.next;
+		if (state.option.white) {
+			if (left.character !== right.from && left.line === right.line) {
+				left.from += (left.character - left.from);
+				warning("W011", left, left.value);
+			}
+		}
+	}
+
+	function nobreak(left, right) {
+		left = left || state.tokens.curr;
+		right = right || state.tokens.next;
+		if (state.option.white && (left.character !== right.from || left.line !== right.line)) {
+			warning("W012", right, right.value);
+		}
+	}
+
+	function nospace(left, right) {
+		left = left || state.tokens.curr;
+		right = right || state.tokens.next;
+		if (state.option.white && !left.comment) {
+			if (left.line === right.line) {
+				adjacent(left, right);
+			}
+		}
+	}
+
+	function nonadjacent(left, right) {
+		if (state.option.white) {
+			left = left || state.tokens.curr;
+			right = right || state.tokens.next;
+
+			if (left.value === ";" && right.value === ";") {
+				return;
+			}
+
+			if (left.line === right.line && left.character === right.from) {
+				left.from += (left.character - left.from);
+				warning("W013", left, left.value);
+			}
+		}
+	}
+
+	function nobreaknonadjacent(left, right) {
+		left = left || state.tokens.curr;
+		right = right || state.tokens.next;
+		if (!state.option.laxbreak && left.line !== right.line) {
+			warning("W014", right, right.value);
+		} else if (state.option.white) {
+			left = left || state.tokens.curr;
+			right = right || state.tokens.next;
+			if (left.character === right.from) {
+				left.from += (left.character - left.from);
+				warning("W013", left, left.value);
+			}
+		}
+	}
+
+	function indentation(bias) {
+		if (!state.option.white && !state.option["(explicitIndent)"]) {
+			return;
+		}
+
+		if (state.tokens.next.id === "(end)") {
+			return;
+		}
+
+		var i = indent + (bias || 0);
+		if (state.tokens.next.from !== i) {
+			warning("W015", state.tokens.next, state.tokens.next.value, i, state.tokens.next.from);
+		}
+	}
+
+	function nolinebreak(t) {
+		t = t || state.tokens.curr;
+		if (t.line !== state.tokens.next.line) {
+			warning("E022", t, t.value);
+		}
+	}
+
+	function nobreakcomma(left, right) {
+		if (left.line !== right.line) {
+			if (!state.option.laxcomma) {
+				if (comma.first) {
+					warning("I001");
+					comma.first = false;
+				}
+				warning("W014", left, right.value);
+			}
+		} else if (!left.comment && left.character !== right.from && state.option.white) {
+			left.from += (left.character - left.from);
+			warning("W011", left, left.value);
+		}
+	}
+
+	function comma(opts) {
+		opts = opts || {};
+
+		if (!opts.peek) {
+			nobreakcomma(state.tokens.curr, state.tokens.next);
+			advance(",");
+		} else {
+			nobreakcomma(state.tokens.prev, state.tokens.curr);
+		}
+
+		if (state.tokens.next.value !== "]" && state.tokens.next.value !== "}") {
+			nonadjacent(state.tokens.curr, state.tokens.next);
+		}
+
+		if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) {
+			switch (state.tokens.next.value) {
+			case "break":
+			case "case":
+			case "catch":
+			case "continue":
+			case "default":
+			case "do":
+			case "else":
+			case "finally":
+			case "for":
+			case "if":
+			case "in":
+			case "instanceof":
+			case "return":
+			case "switch":
+			case "throw":
+			case "try":
+			case "var":
+			case "let":
+			case "while":
+			case "with":
+				error("E024", state.tokens.next, state.tokens.next.value);
+				return false;
+			}
+		}
+
+		if (state.tokens.next.type === "(punctuator)") {
+			switch (state.tokens.next.value) {
+			case "}":
+			case "]":
+			case ",":
+				if (opts.allowTrailing) {
+					return true;
+				}
+			case ")":
+				error("E024", state.tokens.next, state.tokens.next.value);
+				return false;
+			}
+		}
+		return true;
+	}
+
+	function symbol(s, p) {
+		var x = state.syntax[s];
+		if (!x || typeof x !== "object") {
+			state.syntax[s] = x = {
+				id: s,
+				lbp: p,
+				value: s
+			};
+		}
+		return x;
+	}
+
+	function delim(s) {
+		return symbol(s, 0);
+	}
+
+	function stmt(s, f) {
+		var x = delim(s);
+		x.identifier = x.reserved = true;
+		x.fud = f;
+		return x;
+	}
+
+	function blockstmt(s, f) {
+		var x = stmt(s, f);
+		x.block = true;
+		return x;
+	}
+
+	function reserveName(x) {
+		var c = x.id.charAt(0);
+		if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
+			x.identifier = x.reserved = true;
+		}
+		return x;
+	}
+
+	function prefix(s, f) {
+		var x = symbol(s, 150);
+		reserveName(x);
+		x.nud = (typeof f === "function") ? f : function () {
+			this.right = expression(150);
+			this.arity = "unary";
+			if (this.id === "++" || this.id === "--") {
+				if (state.option.plusplus) {
+					warning("W016", this, this.id);
+				} else if ((!this.right.identifier || isReserved(this.right)) &&
+						this.right.id !== "." && this.right.id !== "[") {
+					warning("W017", this);
+				}
+			}
+			return this;
+		};
+		return x;
+	}
+
+	function type(s, f) {
+		var x = delim(s);
+		x.type = s;
+		x.nud = f;
+		return x;
+	}
+
+	function reserve(name, func) {
+		var x = type(name, func);
+		x.identifier = true;
+		x.reserved = true;
+		return x;
+	}
+
+	function FutureReservedWord(name, meta) {
+		var x = type(name, (meta && meta.nud) || function () {
+			return this;
+		});
+
+		meta = meta || {};
+		meta.isFutureReservedWord = true;
+
+		x.value = name;
+		x.identifier = true;
+		x.reserved = true;
+		x.meta = meta;
+
+		return x;
+	}
+
+	function reservevar(s, v) {
+		return reserve(s, function () {
+			if (typeof v === "function") {
+				v(this);
+			}
+			return this;
+		});
+	}
+
+	function infix(s, f, p, w) {
+		var x = symbol(s, p);
+		reserveName(x);
+		x.infix = true;
+		x.led = function (left) {
+			if (!w) {
+				nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+				nonadjacent(state.tokens.curr, state.tokens.next);
+			}
+			if (s === "in" && left.id === "!") {
+				warning("W018", left, "!");
+			}
+			if (typeof f === "function") {
+				return f(left, this);
+			} else {
+				this.left = left;
+				this.right = expression(p);
+				return this;
+			}
+		};
+		return x;
+	}
+
+
+	function application(s) {
+		var x = symbol(s, 42);
+
+		x.led = function (left) {
+			if (!state.option.inESNext()) {
+				warning("W104", state.tokens.curr, "arrow function syntax (=>)");
+			}
+
+			nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+			nonadjacent(state.tokens.curr, state.tokens.next);
+
+			this.left = left;
+			this.right = doFunction(undefined, undefined, false, left);
+			return this;
+		};
+		return x;
+	}
+
+	function relation(s, f) {
+		var x = symbol(s, 100);
+
+		x.led = function (left) {
+			nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			var right = expression(100);
+
+			if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
+				warning("W019", this);
+			} else if (f) {
+				f.apply(this, [left, right]);
+			}
+
+			if (!left || !right) {
+				quit("E041", state.tokens.curr.line);
+			}
+
+			if (left.id === "!") {
+				warning("W018", left, "!");
+			}
+
+			if (right.id === "!") {
+				warning("W018", right, "!");
+			}
+
+			this.left = left;
+			this.right = right;
+			return this;
+		};
+		return x;
+	}
+
+	function isPoorRelation(node) {
+		return node &&
+			  ((node.type === "(number)" && +node.value === 0) ||
+			   (node.type === "(string)" && node.value === "") ||
+			   (node.type === "null" && !state.option.eqnull) ||
+				node.type === "true" ||
+				node.type === "false" ||
+				node.type === "undefined");
+	}
+
+	function assignop(s, f, p) {
+		var x = infix(s, typeof f === "function" ? f : function (left, that) {
+			that.left = left;
+
+			if (left) {
+				if (predefined[left.value] === false &&
+						scope[left.value]["(global)"] === true) {
+					warning("W020", left);
+				} else if (left["function"]) {
+					warning("W021", left, left.value);
+				}
+
+				if (funct[left.value] === "const") {
+					error("E013", left, left.value);
+				}
+
+				if (left.id === ".") {
+					if (!left.left) {
+						warning("E031", that);
+					} else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+						warning("E031", that);
+					}
+
+					that.right = expression(10);
+					return that;
+				} else if (left.id === "[") {
+					if (state.tokens.curr.left.first) {
+						state.tokens.curr.left.first.forEach(function (t) {
+							if (funct[t.value] === "const") {
+								error("E013", t, t.value);
+							}
+						});
+					} else if (!left.left) {
+						warning("E031", that);
+					} else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+						warning("E031", that);
+					}
+					that.right = expression(10);
+					return that;
+				} else if (left.identifier && !isReserved(left)) {
+					if (funct[left.value] === "exception") {
+						warning("W022", left);
+					}
+					that.right = expression(10);
+					return that;
+				}
+
+				if (left === state.syntax["function"]) {
+					warning("W023", state.tokens.curr);
+				}
+			}
+
+			error("E031", that);
+		}, p);
+
+		x.exps = true;
+		x.assign = true;
+		return x;
+	}
+
+
+	function bitwise(s, f, p) {
+		var x = symbol(s, p);
+		reserveName(x);
+		x.led = (typeof f === "function") ? f : function (left) {
+			if (state.option.bitwise) {
+				warning("W016", this, this.id);
+			}
+			this.left = left;
+			this.right = expression(p);
+			return this;
+		};
+		return x;
+	}
+
+
+	function bitwiseassignop(s) {
+		return assignop(s, function (left, that) {
+			if (state.option.bitwise) {
+				warning("W016", that, that.id);
+			}
+			nonadjacent(state.tokens.prev, state.tokens.curr);
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			if (left) {
+				if (left.id === "." || left.id === "[" ||
+						(left.identifier && !isReserved(left))) {
+					expression(10);
+					return that;
+				}
+				if (left === state.syntax["function"]) {
+					warning("W023", state.tokens.curr);
+				}
+				return that;
+			}
+			error("E031", that);
+		}, 20);
+	}
+
+
+	function suffix(s) {
+		var x = symbol(s, 150);
+
+		x.led = function (left) {
+			if (state.option.plusplus) {
+				warning("W016", this, this.id);
+			} else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
+				warning("W017", this);
+			}
+
+			this.left = left;
+			return this;
+		};
+		return x;
+	}
+
+	function optionalidentifier(fnparam, prop) {
+		if (!state.tokens.next.identifier) {
+			return;
+		}
+
+		advance();
+
+		var curr = state.tokens.curr;
+		var val  = state.tokens.curr.value;
+
+		if (!isReserved(curr)) {
+			return val;
+		}
+
+		if (prop) {
+			if (state.option.inES5()) {
+				return val;
+			}
+		}
+
+		if (fnparam && val === "undefined") {
+			return val;
+		}
+		if (prop && !api.getCache("displayed:I002")) {
+			api.setCache("displayed:I002", true);
+			warning("I002");
+		}
+
+		warning("W024", state.tokens.curr, state.tokens.curr.id);
+		return val;
+	}
+	function identifier(fnparam, prop) {
+		var i = optionalidentifier(fnparam, prop);
+		if (i) {
+			return i;
+		}
+		if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") {
+			warning("W025");
+		} else {
+			error("E030", state.tokens.next, state.tokens.next.value);
+		}
+	}
+
+
+	function reachable(s) {
+		var i = 0, t;
+		if (state.tokens.next.id !== ";" || noreach) {
+			return;
+		}
+		for (;;) {
+			t = peek(i);
+			if (t.reach) {
+				return;
+			}
+			if (t.id !== "(endline)") {
+				if (t.id === "function") {
+					if (!state.option.latedef) {
+						break;
+					}
+
+					warning("W026", t);
+					break;
+				}
+
+				warning("W027", t, t.value, s);
+				break;
+			}
+			i += 1;
+		}
+	}
+
+
+	function statement(noindent) {
+		var values;
+		var i = indent, r, s = scope, t = state.tokens.next;
+
+		if (t.id === ";") {
+			advance(";");
+			return;
+		}
+		var res = isReserved(t);
+
+		if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
+			warning("W024", t, t.id);
+			res = false;
+		}
+		if (_.has(["[", "{"], t.value)) {
+			if (lookupBlockType().isDestAssign) {
+				if (!state.option.inESNext()) {
+					warning("W104", state.tokens.curr, "destructuring expression");
+				}
+				values = destructuringExpression();
+				values.forEach(function (tok) {
+					isundef(funct, "W117", tok.token, tok.id);
+				});
+				advance("=");
+				destructuringExpressionMatch(values, expression(10, true));
+				advance(";");
+				return;
+			}
+		}
+		if (t.identifier && !res && peek().id === ":") {
+			advance();
+			advance(":");
+			scope = Object.create(s);
+			addlabel(t.value, "label");
+
+			if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
+				warning("W028", state.tokens.next, t.value, state.tokens.next.value);
+			}
+
+			state.tokens.next.label = t.value;
+			t = state.tokens.next;
+		}
+
+		if (t.id === "{") {
+			block(true, true);
+			return;
+		}
+
+		if (!noindent) {
+			indentation();
+		}
+		r = expression(0, true);
+
+		if (!t.block) {
+			if (!state.option.expr && (!r || !r.exps)) {
+				warning("W030", state.tokens.curr);
+			} else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
+				warning("W031", t);
+			}
+
+			if (state.tokens.next.id !== ";") {
+				if (!state.option.asi) {
+					if (!state.option.lastsemic || state.tokens.next.id !== "}" ||
+						state.tokens.next.line !== state.tokens.curr.line) {
+						warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
+					}
+				}
+			} else {
+				adjacent(state.tokens.curr, state.tokens.next);
+				advance(";");
+				nonadjacent(state.tokens.curr, state.tokens.next);
+			}
+		}
+
+		indent = i;
+		scope = s;
+		return r;
+	}
+
+
+	function statements(startLine) {
+		var a = [], p;
+
+		while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
+			if (state.tokens.next.id === ";") {
+				p = peek();
+
+				if (!p || (p.id !== "(" && p.id !== "[")) {
+					warning("W032");
+				}
+
+				advance(";");
+			} else {
+				a.push(statement(startLine === state.tokens.next.line));
+			}
+		}
+		return a;
+	}
+	function directives() {
+		var i, p, pn;
+
+		for (;;) {
+			if (state.tokens.next.id === "(string)") {
+				p = peek(0);
+				if (p.id === "(endline)") {
+					i = 1;
+					do {
+						pn = peek(i);
+						i = i + 1;
+					} while (pn.id === "(endline)");
+
+					if (pn.id !== ";") {
+						if (pn.id !== "(string)" && pn.id !== "(number)" &&
+							pn.id !== "(regexp)" && pn.identifier !== true &&
+							pn.id !== "}") {
+							break;
+						}
+						warning("W033", state.tokens.next);
+					} else {
+						p = pn;
+					}
+				} else if (p.id === "}") {
+					warning("W033", p);
+				} else if (p.id !== ";") {
+					break;
+				}
+
+				indentation();
+				advance();
+				if (state.directive[state.tokens.curr.value]) {
+					warning("W034", state.tokens.curr, state.tokens.curr.value);
+				}
+
+				if (state.tokens.curr.value === "use strict") {
+					if (!state.option["(explicitNewcap)"])
+						state.option.newcap = true;
+					state.option.undef = true;
+				}
+				state.directive[state.tokens.curr.value] = true;
+
+				if (p.id === ";") {
+					advance(";");
+				}
+				continue;
+			}
+			break;
+		}
+	}
+	function block(ordinary, stmt, isfunc, isfatarrow) {
+		var a,
+			b = inblock,
+			old_indent = indent,
+			m,
+			s = scope,
+			t,
+			line,
+			d;
+
+		inblock = ordinary;
+
+		if (!ordinary || !state.option.funcscope)
+			scope = Object.create(scope);
+
+		nonadjacent(state.tokens.curr, state.tokens.next);
+		t = state.tokens.next;
+
+		var metrics = funct["(metrics)"];
+		metrics.nestedBlockDepth += 1;
+		metrics.verifyMaxNestedBlockDepthPerFunction();
+
+		if (state.tokens.next.id === "{") {
+			advance("{");
+			funct["(blockscope)"].stack();
+
+			line = state.tokens.curr.line;
+			if (state.tokens.next.id !== "}") {
+				indent += state.option.indent;
+				while (!ordinary && state.tokens.next.from > indent) {
+					indent += state.option.indent;
+				}
+
+				if (isfunc) {
+					m = {};
+					for (d in state.directive) {
+						if (_.has(state.directive, d)) {
+							m[d] = state.directive[d];
+						}
+					}
+					directives();
+
+					if (state.option.strict && funct["(context)"]["(global)"]) {
+						if (!m["use strict"] && !state.directive["use strict"]) {
+							warning("E007");
+						}
+					}
+				}
+
+				a = statements(line);
+
+				metrics.statementCount += a.length;
+
+				if (isfunc) {
+					state.directive = m;
+				}
+
+				indent -= state.option.indent;
+				if (line !== state.tokens.next.line) {
+					indentation();
+				}
+			} else if (line !== state.tokens.next.line) {
+				indentation();
+			}
+			advance("}", t);
+
+			funct["(blockscope)"].unstack();
+
+			indent = old_indent;
+		} else if (!ordinary) {
+			if (isfunc) {
+				m = {};
+				if (stmt && !isfatarrow && !state.option.inMoz(true)) {
+					error("W118", state.tokens.curr, "function closure expressions");
+				}
+
+				if (!stmt) {
+					for (d in state.directive) {
+						if (_.has(state.directive, d)) {
+							m[d] = state.directive[d];
+						}
+					}
+				}
+				expression(10);
+
+				if (state.option.strict && funct["(context)"]["(global)"]) {
+					if (!m["use strict"] && !state.directive["use strict"]) {
+						warning("E007");
+					}
+				}
+			} else {
+				error("E021", state.tokens.next, "{", state.tokens.next.value);
+			}
+		} else {
+			funct["(nolet)"] = true;
+
+			if (!stmt || state.option.curly) {
+				warning("W116", state.tokens.next, "{", state.tokens.next.value);
+			}
+
+			noreach = true;
+			indent += state.option.indent;
+			a = [statement(state.tokens.next.line === state.tokens.curr.line)];
+			indent -= state.option.indent;
+			noreach = false;
+
+			delete funct["(nolet)"];
+		}
+		funct["(verb)"] = null;
+		if (!ordinary || !state.option.funcscope) scope = s;
+		inblock = b;
+		if (ordinary && state.option.noempty && (!a || a.length === 0)) {
+			warning("W035");
+		}
+		metrics.nestedBlockDepth -= 1;
+		return a;
+	}
+
+
+	function countMember(m) {
+		if (membersOnly && typeof membersOnly[m] !== "boolean") {
+			warning("W036", state.tokens.curr, m);
+		}
+		if (typeof member[m] === "number") {
+			member[m] += 1;
+		} else {
+			member[m] = 1;
+		}
+	}
+
+
+	function note_implied(tkn) {
+		var name = tkn.value, line = tkn.line, a = implied[name];
+		if (typeof a === "function") {
+			a = false;
+		}
+
+		if (!a) {
+			a = [line];
+			implied[name] = a;
+		} else if (a[a.length - 1] !== line) {
+			a.push(line);
+		}
+	}
+
+	type("(number)", function () {
+		return this;
+	});
+
+	type("(string)", function () {
+		return this;
+	});
+
+	state.syntax["(identifier)"] = {
+		type: "(identifier)",
+		lbp: 0,
+		identifier: true,
+		nud: function () {
+			var v = this.value,
+				s = scope[v],
+				f;
+
+			if (typeof s === "function") {
+				s = undefined;
+			} else if (typeof s === "boolean") {
+				f = funct;
+				funct = functions[0];
+				addlabel(v, "var");
+				s = funct;
+				funct = f;
+			}
+			var block;
+			if (_.has(funct, "(blockscope)")) {
+				block = funct["(blockscope)"].getlabel(v);
+			}
+			if (funct === s || block) {
+				switch (block ? block[v]["(type)"] : funct[v]) {
+				case "unused":
+					if (block) block[v]["(type)"] = "var";
+					else funct[v] = "var";
+					break;
+				case "unction":
+					if (block) block[v]["(type)"] = "function";
+					else funct[v] = "function";
+					this["function"] = true;
+					break;
+				case "function":
+					this["function"] = true;
+					break;
+				case "label":
+					warning("W037", state.tokens.curr, v);
+					break;
+				}
+			} else if (funct["(global)"]) {
+
+				if (typeof predefined[v] !== "boolean") {
+					if (!(anonname === "typeof" || anonname === "delete") ||
+						(state.tokens.next && (state.tokens.next.value === "." ||
+							state.tokens.next.value === "["))) {
+
+						if (!funct["(comparray)"].check(v)) {
+							isundef(funct, "W117", state.tokens.curr, v);
+						}
+					}
+				}
+
+				note_implied(state.tokens.curr);
+			} else {
+
+				switch (funct[v]) {
+				case "closure":
+				case "function":
+				case "var":
+				case "unused":
+					warning("W038", state.tokens.curr, v);
+					break;
+				case "label":
+					warning("W037", state.tokens.curr, v);
+					break;
+				case "outer":
+				case "global":
+					break;
+				default:
+					if (s === true) {
+						funct[v] = true;
+					} else if (s === null) {
+						warning("W039", state.tokens.curr, v);
+						note_implied(state.tokens.curr);
+					} else if (typeof s !== "object") {
+						if (!(anonname === "typeof" || anonname === "delete") ||
+							(state.tokens.next &&
+								(state.tokens.next.value === "." || state.tokens.next.value === "["))) {
+
+							isundef(funct, "W117", state.tokens.curr, v);
+						}
+						funct[v] = true;
+						note_implied(state.tokens.curr);
+					} else {
+						switch (s[v]) {
+						case "function":
+						case "unction":
+							this["function"] = true;
+							s[v] = "closure";
+							funct[v] = s["(global)"] ? "global" : "outer";
+							break;
+						case "var":
+						case "unused":
+							s[v] = "closure";
+							funct[v] = s["(global)"] ? "global" : "outer";
+							break;
+						case "closure":
+							funct[v] = s["(global)"] ? "global" : "outer";
+							break;
+						case "label":
+							warning("W037", state.tokens.curr, v);
+						}
+					}
+				}
+			}
+			return this;
+		},
+		led: function () {
+			error("E033", state.tokens.next, state.tokens.next.value);
+		}
+	};
+
+	type("(regexp)", function () {
+		return this;
+	});
+
+	delim("(endline)");
+	delim("(begin)");
+	delim("(end)").reach = true;
+	delim("(error)").reach = true;
+	delim("}").reach = true;
+	delim(")");
+	delim("]");
+	delim("\"").reach = true;
+	delim("'").reach = true;
+	delim(";");
+	delim(":").reach = true;
+	delim("#");
+
+	reserve("else");
+	reserve("case").reach = true;
+	reserve("catch");
+	reserve("default").reach = true;
+	reserve("finally");
+	reservevar("arguments", function (x) {
+		if (state.directive["use strict"] && funct["(global)"]) {
+			warning("E008", x);
+		}
+	});
+	reservevar("eval");
+	reservevar("false");
+	reservevar("Infinity");
+	reservevar("null");
+	reservevar("this", function (x) {
+		if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] &&
+				funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
+			warning("W040", x);
+		}
+	});
+	reservevar("true");
+	reservevar("undefined");
+
+	assignop("=", "assign", 20);
+	assignop("+=", "assignadd", 20);
+	assignop("-=", "assignsub", 20);
+	assignop("*=", "assignmult", 20);
+	assignop("/=", "assigndiv", 20).nud = function () {
+		error("E014");
+	};
+	assignop("%=", "assignmod", 20);
+
+	bitwiseassignop("&=", "assignbitand", 20);
+	bitwiseassignop("|=", "assignbitor", 20);
+	bitwiseassignop("^=", "assignbitxor", 20);
+	bitwiseassignop("<<=", "assignshiftleft", 20);
+	bitwiseassignop(">>=", "assignshiftright", 20);
+	bitwiseassignop(">>>=", "assignshiftrightunsigned", 20);
+	infix(",", function (left, that) {
+		var expr;
+		that.exprs = [left];
+		if (!comma({peek: true})) {
+			return that;
+		}
+		while (true) {
+			if (!(expr = expression(10)))  {
+				break;
+			}
+			that.exprs.push(expr);
+			if (state.tokens.next.value !== "," || !comma()) {
+				break;
+			}
+		}
+		return that;
+	}, 10, true);
+
+	infix("?", function (left, that) {
+		increaseComplexityCount();
+		that.left = left;
+		that.right = expression(10);
+		advance(":");
+		that["else"] = expression(10);
+		return that;
+	}, 30);
+
+	var orPrecendence = 40;
+	infix("||", function (left, that) {
+		increaseComplexityCount();
+		that.left = left;
+		that.right = expression(orPrecendence);
+		return that;
+	}, orPrecendence);
+	infix("&&", "and", 50);
+	bitwise("|", "bitor", 70);
+	bitwise("^", "bitxor", 80);
+	bitwise("&", "bitand", 90);
+	relation("==", function (left, right) {
+		var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null");
+
+		if (!eqnull && state.option.eqeqeq)
+			warning("W116", this, "===", "==");
+		else if (isPoorRelation(left))
+			warning("W041", this, "===", left.value);
+		else if (isPoorRelation(right))
+			warning("W041", this, "===", right.value);
+
+		return this;
+	});
+	relation("===");
+	relation("!=", function (left, right) {
+		var eqnull = state.option.eqnull &&
+				(left.value === "null" || right.value === "null");
+
+		if (!eqnull && state.option.eqeqeq) {
+			warning("W116", this, "!==", "!=");
+		} else if (isPoorRelation(left)) {
+			warning("W041", this, "!==", left.value);
+		} else if (isPoorRelation(right)) {
+			warning("W041", this, "!==", right.value);
+		}
+		return this;
+	});
+	relation("!==");
+	relation("<");
+	relation(">");
+	relation("<=");
+	relation(">=");
+	bitwise("<<", "shiftleft", 120);
+	bitwise(">>", "shiftright", 120);
+	bitwise(">>>", "shiftrightunsigned", 120);
+	infix("in", "in", 120);
+	infix("instanceof", "instanceof", 120);
+	infix("+", function (left, that) {
+		var right = expression(130);
+		if (left && right && left.id === "(string)" && right.id === "(string)") {
+			left.value += right.value;
+			left.character = right.character;
+			if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
+				warning("W050", left);
+			}
+			return left;
+		}
+		that.left = left;
+		that.right = right;
+		return that;
+	}, 130);
+	prefix("+", "num");
+	prefix("+++", function () {
+		warning("W007");
+		this.right = expression(150);
+		this.arity = "unary";
+		return this;
+	});
+	infix("+++", function (left) {
+		warning("W007");
+		this.left = left;
+		this.right = expression(130);
+		return this;
+	}, 130);
+	infix("-", "sub", 130);
+	prefix("-", "neg");
+	prefix("---", function () {
+		warning("W006");
+		this.right = expression(150);
+		this.arity = "unary";
+		return this;
+	});
+	infix("---", function (left) {
+		warning("W006");
+		this.left = left;
+		this.right = expression(130);
+		return this;
+	}, 130);
+	infix("*", "mult", 140);
+	infix("/", "div", 140);
+	infix("%", "mod", 140);
+
+	suffix("++", "postinc");
+	prefix("++", "preinc");
+	state.syntax["++"].exps = true;
+
+	suffix("--", "postdec");
+	prefix("--", "predec");
+	state.syntax["--"].exps = true;
+	prefix("delete", function () {
+		var p = expression(10);
+		if (!p || (p.id !== "." && p.id !== "[")) {
+			warning("W051");
+		}
+		this.first = p;
+		return this;
+	}).exps = true;
+
+	prefix("~", function () {
+		if (state.option.bitwise) {
+			warning("W052", this, "~");
+		}
+		expression(150);
+		return this;
+	});
+
+	prefix("...", function () {
+		if (!state.option.inESNext()) {
+			warning("W104", this, "spread/rest operator");
+		}
+		if (!state.tokens.next.identifier) {
+			error("E030", state.tokens.next, state.tokens.next.value);
+		}
+		expression(150);
+		return this;
+	});
+
+	prefix("!", function () {
+		this.right = expression(150);
+		this.arity = "unary";
+
+		if (!this.right) { // '!' followed by nothing? Give up.
+			quit("E041", this.line || 0);
+		}
+
+		if (bang[this.right.id] === true) {
+			warning("W018", this, "!");
+		}
+		return this;
+	});
+
+	prefix("typeof", "typeof");
+	prefix("new", function () {
+		var c = expression(155), i;
+		if (c && c.id !== "function") {
+			if (c.identifier) {
+				c["new"] = true;
+				switch (c.value) {
+				case "Number":
+				case "String":
+				case "Boolean":
+				case "Math":
+				case "JSON":
+					warning("W053", state.tokens.prev, c.value);
+					break;
+				case "Function":
+					if (!state.option.evil) {
+						warning("W054");
+					}
+					break;
+				case "Date":
+				case "RegExp":
+					break;
+				default:
+					if (c.id !== "function") {
+						i = c.value.substr(0, 1);
+						if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) {
+							warning("W055", state.tokens.curr);
+						}
+					}
+				}
+			} else {
+				if (c.id !== "." && c.id !== "[" && c.id !== "(") {
+					warning("W056", state.tokens.curr);
+				}
+			}
+		} else {
+			if (!state.option.supernew)
+				warning("W057", this);
+		}
+		adjacent(state.tokens.curr, state.tokens.next);
+		if (state.tokens.next.id !== "(" && !state.option.supernew) {
+			warning("W058", state.tokens.curr, state.tokens.curr.value);
+		}
+		this.first = c;
+		return this;
+	});
+	state.syntax["new"].exps = true;
+
+	prefix("void").exps = true;
+
+	infix(".", function (left, that) {
+		adjacent(state.tokens.prev, state.tokens.curr);
+		nobreak();
+		var m = identifier(false, true);
+
+		if (typeof m === "string") {
+			countMember(m);
+		}
+
+		that.left = left;
+		that.right = m;
+
+		if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
+			warning("W001");
+		}
+
+		if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
+			if (state.option.noarg)
+				warning("W059", left, m);
+			else if (state.directive["use strict"])
+				error("E008");
+		} else if (!state.option.evil && left && left.value === "document" &&
+				(m === "write" || m === "writeln")) {
+			warning("W060", left);
+		}
+
+		if (!state.option.evil && (m === "eval" || m === "execScript")) {
+			warning("W061");
+		}
+
+		return that;
+	}, 160, true);
+
+	infix("(", function (left, that) {
+		if (state.tokens.prev.id !== "}" && state.tokens.prev.id !== ")") {
+			nobreak(state.tokens.prev, state.tokens.curr);
+		}
+
+		nospace();
+		if (state.option.immed && left && !left.immed && left.id === "function") {
+			warning("W062");
+		}
+
+		var n = 0;
+		var p = [];
+
+		if (left) {
+			if (left.type === "(identifier)") {
+				if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
+					if ("Number String Boolean Date Object".indexOf(left.value) === -1) {
+						if (left.value === "Math") {
+							warning("W063", left);
+						} else if (state.option.newcap) {
+							warning("W064", left);
+						}
+					}
+				}
+			}
+		}
+
+		if (state.tokens.next.id !== ")") {
+			for (;;) {
+				p[p.length] = expression(10);
+				n += 1;
+				if (state.tokens.next.id !== ",") {
+					break;
+				}
+				comma();
+			}
+		}
+
+		advance(")");
+		nospace(state.tokens.prev, state.tokens.curr);
+
+		if (typeof left === "object") {
+			if (left.value === "parseInt" && n === 1) {
+				warning("W065", state.tokens.curr);
+			}
+			if (!state.option.evil) {
+				if (left.value === "eval" || left.value === "Function" ||
+						left.value === "execScript") {
+					warning("W061", left);
+
+					if (p[0] && [0].id === "(string)") {
+						addInternalSrc(left, p[0].value);
+					}
+				} else if (p[0] && p[0].id === "(string)" &&
+					   (left.value === "setTimeout" ||
+						left.value === "setInterval")) {
+					warning("W066", left);
+					addInternalSrc(left, p[0].value);
+				} else if (p[0] && p[0].id === "(string)" &&
+					   left.value === "." &&
+					   left.left.value === "window" &&
+					   (left.right === "setTimeout" ||
+						left.right === "setInterval")) {
+					warning("W066", left);
+					addInternalSrc(left, p[0].value);
+				}
+			}
+			if (!left.identifier && left.id !== "." && left.id !== "[" &&
+					left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
+					left.id !== "?") {
+				warning("W067", left);
+			}
+		}
+
+		that.left = left;
+		return that;
+	}, 155, true).exps = true;
+
+	prefix("(", function () {
+		nospace();
+		var bracket, brackets = [];
+		var pn, pn1, i = 0;
+		var ret;
+
+		do {
+			pn = peek(i);
+			i += 1;
+			pn1 = peek(i);
+			i += 1;
+		} while (pn.value !== ")" && pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
+
+		if (state.tokens.next.id === "function") {
+			state.tokens.next.immed = true;
+		}
+
+		var exprs = [];
+
+		if (state.tokens.next.id !== ")") {
+			for (;;) {
+				if (pn1.value === "=>" && state.tokens.next.value === "{") {
+					bracket = state.tokens.next;
+					bracket.left = destructuringExpression();
+					brackets.push(bracket);
+					for (var t in bracket.left) {
+						exprs.push(bracket.left[t].token);
+					}
+				} else {
+					exprs.push(expression(10));
+				}
+				if (state.tokens.next.id !== ",") {
+					break;
+				}
+				comma();
+			}
+		}
+
+		advance(")", this);
+		nospace(state.tokens.prev, state.tokens.curr);
+		if (state.option.immed && exprs[0] && exprs[0].id === "function") {
+			if (state.tokens.next.id !== "(" &&
+			  (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) {
+				warning("W068", this);
+			}
+		}
+
+		if (state.tokens.next.value === "=>") {
+			return exprs;
+		}
+		if (!exprs.length) {
+			return;
+		}
+		if (exprs.length > 1) {
+			ret = Object.create(state.syntax[","]);
+			ret.exprs = exprs;
+		} else {
+			ret = exprs[0];
+		}
+		if (ret) {
+			ret.paren = true;
+		}
+		return ret;
+	});
+
+	application("=>");
+
+	infix("[", function (left, that) {
+		nobreak(state.tokens.prev, state.tokens.curr);
+		nospace();
+		var e = expression(10), s;
+		if (e && e.type === "(string)") {
+			if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
+				warning("W061", that);
+			}
+
+			countMember(e.value);
+			if (!state.option.sub && reg.identifier.test(e.value)) {
+				s = state.syntax[e.value];
+				if (!s || !isReserved(s)) {
+					warning("W069", state.tokens.prev, e.value);
+				}
+			}
+		}
+		advance("]", that);
+
+		if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
+			warning("W001");
+		}
+
+		nospace(state.tokens.prev, state.tokens.curr);
+		that.left = left;
+		that.right = e;
+		return that;
+	}, 160, true);
+
+	function comprehensiveArrayExpression() {
+		var res = {};
+		res.exps = true;
+		funct["(comparray)"].stack();
+
+		res.right = expression(10);
+		advance("for");
+		if (state.tokens.next.value === "each") {
+			advance("each");
+			if (!state.option.inMoz(true)) {
+				warning("W118", state.tokens.curr, "for each");
+			}
+		}
+		advance("(");
+		funct["(comparray)"].setState("define");
+		res.left = expression(10);
+		advance(")");
+		if (state.tokens.next.value === "if") {
+			advance("if");
+			advance("(");
+			funct["(comparray)"].setState("filter");
+			res.filter = expression(10);
+			advance(")");
+		}
+		advance("]");
+		funct["(comparray)"].unstack();
+		return res;
+	}
+
+	prefix("[", function () {
+		var blocktype = lookupBlockType(true);
+		if (blocktype.isCompArray) {
+			if (!state.option.inMoz(true)) {
+				warning("W118", state.tokens.curr, "array comprehension");
+			}
+			return comprehensiveArrayExpression();
+		} else if (blocktype.isDestAssign && !state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "destructuring assignment");
+		}
+		var b = state.tokens.curr.line !== state.tokens.next.line;
+		this.first = [];
+		if (b) {
+			indent += state.option.indent;
+			if (state.tokens.next.from === indent + state.option.indent) {
+				indent += state.option.indent;
+			}
+		}
+		while (state.tokens.next.id !== "(end)") {
+			while (state.tokens.next.id === ",") {
+				if (!state.option.inES5())
+					warning("W070");
+				advance(",");
+			}
+			if (state.tokens.next.id === "]") {
+				break;
+			}
+			if (b && state.tokens.curr.line !== state.tokens.next.line) {
+				indentation();
+			}
+			this.first.push(expression(10));
+			if (state.tokens.next.id === ",") {
+				comma({ allowTrailing: true });
+				if (state.tokens.next.id === "]" && !state.option.inES5(true)) {
+					warning("W070", state.tokens.curr);
+					break;
+				}
+			} else {
+				break;
+			}
+		}
+		if (b) {
+			indent -= state.option.indent;
+			indentation();
+		}
+		advance("]", this);
+		return this;
+	}, 160);
+
+
+	function property_name() {
+		var id = optionalidentifier(false, true);
+
+		if (!id) {
+			if (state.tokens.next.id === "(string)") {
+				id = state.tokens.next.value;
+				advance();
+			} else if (state.tokens.next.id === "(number)") {
+				id = state.tokens.next.value.toString();
+				advance();
+			}
+		}
+
+		if (id === "hasOwnProperty") {
+			warning("W001");
+		}
+
+		return id;
+	}
+
+
+	function functionparams(parsed) {
+		var curr, next;
+		var params = [];
+		var ident;
+		var tokens = [];
+		var t;
+		var pastDefault = false;
+
+		if (parsed) {
+			if (parsed instanceof Array) {
+				for (var i in parsed) {
+					curr = parsed[i];
+					if (_.contains(["{", "["], curr.id)) {
+						for (t in curr.left) {
+							t = tokens[t];
+							if (t.id) {
+								params.push(t.id);
+								addlabel(t.id, "unused", t.token);
+							}
+						}
+					} else if (curr.value === "...") {
+						if (!state.option.inESNext()) {
+							warning("W104", curr, "spread/rest operator");
+						}
+						continue;
+					} else {
+						addlabel(curr.value, "unused", curr);
+					}
+				}
+				return params;
+			} else {
+				if (parsed.identifier === true) {
+					addlabel(parsed.value, "unused", parsed);
+					return [parsed];
+				}
+			}
+		}
+
+		next = state.tokens.next;
+
+		advance("(");
+		nospace();
+
+		if (state.tokens.next.id === ")") {
+			advance(")");
+			return;
+		}
+
+		for (;;) {
+			if (_.contains(["{", "["], state.tokens.next.id)) {
+				tokens = destructuringExpression();
+				for (t in tokens) {
+					t = tokens[t];
+					if (t.id) {
+						params.push(t.id);
+						addlabel(t.id, "unused", t.token);
+					}
+				}
+			} else if (state.tokens.next.value === "...") {
+				if (!state.option.inESNext()) {
+					warning("W104", state.tokens.next, "spread/rest operator");
+				}
+				advance("...");
+				nospace();
+				ident = identifier(true);
+				params.push(ident);
+				addlabel(ident, "unused", state.tokens.curr);
+			} else {
+				ident = identifier(true);
+				params.push(ident);
+				addlabel(ident, "unused", state.tokens.curr);
+			}
+			if (pastDefault) {
+				if (state.tokens.next.id !== "=") {
+					error("E051", state.tokens.current);
+				}
+			}
+			if (state.tokens.next.id === "=") {
+				if (!state.option.inESNext()) {
+					warning("W119", state.tokens.next, "default parameters");
+				}
+				advance("=");
+				pastDefault = true;
+				expression(10);
+			}
+			if (state.tokens.next.id === ",") {
+				comma();
+			} else {
+				advance(")", next);
+				nospace(state.tokens.prev, state.tokens.curr);
+				return params;
+			}
+		}
+	}
+
+
+	function doFunction(name, statement, generator, fatarrowparams) {
+		var f;
+		var oldOption = state.option;
+		var oldIgnored = state.ignored;
+		var oldScope  = scope;
+
+		state.option = Object.create(state.option);
+		state.ignored = Object.create(state.ignored);
+		scope  = Object.create(scope);
+
+		funct = {
+			"(name)"      : name || "\"" + anonname + "\"",
+			"(line)"      : state.tokens.next.line,
+			"(character)" : state.tokens.next.character,
+			"(context)"   : funct,
+			"(breakage)"  : 0,
+			"(loopage)"   : 0,
+			"(metrics)"   : createMetrics(state.tokens.next),
+			"(scope)"     : scope,
+			"(statement)" : statement,
+			"(tokens)"    : {},
+			"(blockscope)": funct["(blockscope)"],
+			"(comparray)" : funct["(comparray)"]
+		};
+
+		if (generator) {
+			funct["(generator)"] = true;
+		}
+
+		f = funct;
+		state.tokens.curr.funct = funct;
+
+		functions.push(funct);
+
+		if (name) {
+			addlabel(name, "function");
+		}
+
+		funct["(params)"] = functionparams(fatarrowparams);
+
+		funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
+
+		block(false, true, true, fatarrowparams ? true:false);
+
+		if (generator && funct["(generator)"] !== "yielded") {
+			error("E047", state.tokens.curr);
+		}
+
+		funct["(metrics)"].verifyMaxStatementsPerFunction();
+		funct["(metrics)"].verifyMaxComplexityPerFunction();
+		funct["(unusedOption)"] = state.option.unused;
+
+		scope = oldScope;
+		state.option = oldOption;
+		state.ignored = oldIgnored;
+		funct["(last)"] = state.tokens.curr.line;
+		funct["(lastcharacter)"] = state.tokens.curr.character;
+		funct = funct["(context)"];
+
+		return f;
+	}
+
+	function createMetrics(functionStartToken) {
+		return {
+			statementCount: 0,
+			nestedBlockDepth: -1,
+			ComplexityCount: 1,
+			verifyMaxStatementsPerFunction: function () {
+				if (state.option.maxstatements &&
+					this.statementCount > state.option.maxstatements) {
+					warning("W071", functionStartToken, this.statementCount);
+				}
+			},
+
+			verifyMaxParametersPerFunction: function (params) {
+				params = params || [];
+
+				if (state.option.maxparams && params.length > state.option.maxparams) {
+					warning("W072", functionStartToken, params.length);
+				}
+			},
+
+			verifyMaxNestedBlockDepthPerFunction: function () {
+				if (state.option.maxdepth &&
+					this.nestedBlockDepth > 0 &&
+					this.nestedBlockDepth === state.option.maxdepth + 1) {
+					warning("W073", null, this.nestedBlockDepth);
+				}
+			},
+
+			verifyMaxComplexityPerFunction: function () {
+				var max = state.option.maxcomplexity;
+				var cc = this.ComplexityCount;
+				if (max && cc > max) {
+					warning("W074", functionStartToken, cc);
+				}
+			}
+		};
+	}
+
+	function increaseComplexityCount() {
+		funct["(metrics)"].ComplexityCount += 1;
+	}
+
+	function checkCondAssignment(expr) {
+		var id, paren;
+		if (expr) {
+			id = expr.id;
+			paren = expr.paren;
+			if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
+				id = expr.id;
+				paren = paren || expr.paren;
+			}
+		}
+		switch (id) {
+		case "=":
+		case "+=":
+		case "-=":
+		case "*=":
+		case "%=":
+		case "&=":
+		case "|=":
+		case "^=":
+		case "/=":
+			if (!paren && !state.option.boss) {
+				warning("W084");
+			}
+		}
+	}
+
+
+	(function (x) {
+		x.nud = function (isclassdef) {
+			var b, f, i, p, t, g;
+			var props = {}; // All properties, including accessors
+			var tag = "";
+
+			function saveProperty(name, tkn) {
+				if (props[name] && _.has(props, name))
+					warning("W075", state.tokens.next, i);
+				else
+					props[name] = {};
+
+				props[name].basic = true;
+				props[name].basictkn = tkn;
+			}
+
+			function saveSetter(name, tkn) {
+				if (props[name] && _.has(props, name)) {
+					if (props[name].basic || props[name].setter)
+						warning("W075", state.tokens.next, i);
+				} else {
+					props[name] = {};
+				}
+
+				props[name].setter = true;
+				props[name].setterToken = tkn;
+			}
+
+			function saveGetter(name) {
+				if (props[name] && _.has(props, name)) {
+					if (props[name].basic || props[name].getter)
+						warning("W075", state.tokens.next, i);
+				} else {
+					props[name] = {};
+				}
+
+				props[name].getter = true;
+				props[name].getterToken = state.tokens.curr;
+			}
+
+			b = state.tokens.curr.line !== state.tokens.next.line;
+			if (b) {
+				indent += state.option.indent;
+				if (state.tokens.next.from === indent + state.option.indent) {
+					indent += state.option.indent;
+				}
+			}
+
+			for (;;) {
+				if (state.tokens.next.id === "}") {
+					break;
+				}
+
+				if (b) {
+					indentation();
+				}
+
+				if (isclassdef && state.tokens.next.value === "static") {
+					advance("static");
+					tag = "static ";
+				}
+
+				if (state.tokens.next.value === "get" && peek().id !== ":") {
+					advance("get");
+
+					if (!state.option.inES5(!isclassdef)) {
+						error("E034");
+					}
+
+					i = property_name();
+					if (!i) {
+						error("E035");
+					}
+					if (isclassdef && i === "constructor") {
+						error("E049", state.tokens.next, "class getter method", i);
+					}
+
+					saveGetter(tag + i);
+					t = state.tokens.next;
+					adjacent(state.tokens.curr, state.tokens.next);
+					f = doFunction();
+					p = f["(params)"];
+
+					if (p) {
+						warning("W076", t, p[0], i);
+					}
+
+					adjacent(state.tokens.curr, state.tokens.next);
+				} else if (state.tokens.next.value === "set" && peek().id !== ":") {
+					advance("set");
+
+					if (!state.option.inES5(!isclassdef)) {
+						error("E034");
+					}
+
+					i = property_name();
+					if (!i) {
+						error("E035");
+					}
+					if (isclassdef && i === "constructor") {
+						error("E049", state.tokens.next, "class setter method", i);
+					}
+
+					saveSetter(tag + i, state.tokens.next);
+					t = state.tokens.next;
+					adjacent(state.tokens.curr, state.tokens.next);
+					f = doFunction();
+					p = f["(params)"];
+
+					if (!p || p.length !== 1) {
+						warning("W077", t, i);
+					}
+				} else {
+					g = false;
+					if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
+						if (!state.option.inESNext()) {
+							warning("W104", state.tokens.next, "generator functions");
+						}
+						advance("*");
+						g = true;
+					}
+					i = property_name();
+					saveProperty(tag + i, state.tokens.next);
+
+					if (typeof i !== "string") {
+						break;
+					}
+
+					if (state.tokens.next.value === "(") {
+						if (!state.option.inESNext()) {
+							warning("W104", state.tokens.curr, "concise methods");
+						}
+						doFunction(i, undefined, g);
+					} else if (!isclassdef) {
+						advance(":");
+						nonadjacent(state.tokens.curr, state.tokens.next);
+						expression(10);
+					}
+				}
+				if (isclassdef && i === "prototype") {
+					error("E049", state.tokens.next, "class method", i);
+				}
+
+				countMember(i);
+				if (isclassdef) {
+					tag = "";
+					continue;
+				}
+				if (state.tokens.next.id === ",") {
+					comma({ allowTrailing: true, property: true });
+					if (state.tokens.next.id === ",") {
+						warning("W070", state.tokens.curr);
+					} else if (state.tokens.next.id === "}" && !state.option.inES5(true)) {
+						warning("W070", state.tokens.curr);
+					}
+				} else {
+					break;
+				}
+			}
+			if (b) {
+				indent -= state.option.indent;
+				indentation();
+			}
+			advance("}", this);
+			if (state.option.inES5()) {
+				for (var name in props) {
+					if (_.has(props, name) && props[name].setter && !props[name].getter) {
+						warning("W078", props[name].setterToken);
+					}
+				}
+			}
+			return this;
+		};
+		x.fud = function () {
+			error("E036", state.tokens.curr);
+		};
+	}(delim("{")));
+
+	function destructuringExpression() {
+		var id, ids;
+		var identifiers = [];
+		if (!state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "destructuring expression");
+		}
+		var nextInnerDE = function () {
+			var ident;
+			if (_.contains(["[", "{"], state.tokens.next.value)) {
+				ids = destructuringExpression();
+				for (var id in ids) {
+					id = ids[id];
+					identifiers.push({ id: id.id, token: id.token });
+				}
+			} else if (state.tokens.next.value === ",") {
+				identifiers.push({ id: null, token: state.tokens.curr });
+			} else {
+				ident = identifier();
+				if (ident)
+					identifiers.push({ id: ident, token: state.tokens.curr });
+			}
+		};
+		if (state.tokens.next.value === "[") {
+			advance("[");
+			nextInnerDE();
+			while (state.tokens.next.value !== "]") {
+				advance(",");
+				nextInnerDE();
+			}
+			advance("]");
+		} else if (state.tokens.next.value === "{") {
+			advance("{");
+			id = identifier();
+			if (state.tokens.next.value === ":") {
+				advance(":");
+				nextInnerDE();
+			} else {
+				identifiers.push({ id: id, token: state.tokens.curr });
+			}
+			while (state.tokens.next.value !== "}") {
+				advance(",");
+				id = identifier();
+				if (state.tokens.next.value === ":") {
+					advance(":");
+					nextInnerDE();
+				} else {
+					identifiers.push({ id: id, token: state.tokens.curr });
+				}
+			}
+			advance("}");
+		}
+		return identifiers;
+	}
+	function destructuringExpressionMatch(tokens, value) {
+		if (value.first) {
+			_.zip(tokens, value.first).forEach(function (val) {
+				var token = val[0];
+				var value = val[1];
+				if (token && value) {
+					token.first = value;
+				} else if (token && token.first && !value) {
+					warning("W080", token.first, token.first.value);
+				} /* else {
+					XXX value is discarded: wouldn't it need a warning ?
+				} */
+			});
+		}
+	}
+
+	var conststatement = stmt("const", function (prefix) {
+		var tokens, value;
+		var lone;
+
+		if (!state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "const");
+		}
+
+		this.first = [];
+		for (;;) {
+			var names = [];
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			if (_.contains(["{", "["], state.tokens.next.value)) {
+				tokens = destructuringExpression();
+				lone = false;
+			} else {
+				tokens = [ { id: identifier(), token: state.tokens.curr } ];
+				lone = true;
+			}
+			for (var t in tokens) {
+				t = tokens[t];
+				if (funct[t.id] === "const") {
+					warning("E011", null, t.id);
+				}
+				if (funct["(global)"] && predefined[t.id] === false) {
+					warning("W079", t.token, t.id);
+				}
+				if (t.id) {
+					addlabel(t.id, "const");
+					names.push(t.token);
+				}
+			}
+			if (prefix) {
+				break;
+			}
+
+			this.first = this.first.concat(names);
+
+			if (state.tokens.next.id !== "=") {
+				warning("E012", state.tokens.curr, state.tokens.curr.value);
+			}
+
+			if (state.tokens.next.id === "=") {
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				advance("=");
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				if (state.tokens.next.id === "undefined") {
+					warning("W080", state.tokens.prev, state.tokens.prev.value);
+				}
+				if (peek(0).id === "=" && state.tokens.next.identifier) {
+					warning("W120", state.tokens.next, state.tokens.next.value);
+				}
+				value = expression(10);
+				if (lone) {
+					tokens[0].first = value;
+				} else {
+					destructuringExpressionMatch(names, value);
+				}
+			}
+
+			if (state.tokens.next.id !== ",") {
+				break;
+			}
+			comma();
+		}
+		return this;
+	});
+	conststatement.exps = true;
+	var varstatement = stmt("var", function (prefix) {
+		var tokens, lone, value;
+
+		if (funct["(onevar)"] && state.option.onevar) {
+			warning("W081");
+		} else if (!funct["(global)"]) {
+			funct["(onevar)"] = true;
+		}
+
+		this.first = [];
+		for (;;) {
+			var names = [];
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			if (_.contains(["{", "["], state.tokens.next.value)) {
+				tokens = destructuringExpression();
+				lone = false;
+			} else {
+				tokens = [ { id: identifier(), token: state.tokens.curr } ];
+				lone = true;
+			}
+			for (var t in tokens) {
+				t = tokens[t];
+				if (state.option.inESNext() && funct[t.id] === "const") {
+					warning("E011", null, t.id);
+				}
+				if (funct["(global)"] && predefined[t.id] === false) {
+					warning("W079", t.token, t.id);
+				}
+				if (t.id) {
+					addlabel(t.id, "unused", t.token);
+					names.push(t.token);
+				}
+			}
+			if (prefix) {
+				break;
+			}
+
+			this.first = this.first.concat(names);
+
+			if (state.tokens.next.id === "=") {
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				advance("=");
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				if (state.tokens.next.id === "undefined") {
+					warning("W080", state.tokens.prev, state.tokens.prev.value);
+				}
+				if (peek(0).id === "=" && state.tokens.next.identifier) {
+					warning("W120", state.tokens.next, state.tokens.next.value);
+				}
+				value = expression(10);
+				if (lone) {
+					tokens[0].first = value;
+				} else {
+					destructuringExpressionMatch(names, value);
+				}
+			}
+
+			if (state.tokens.next.id !== ",") {
+				break;
+			}
+			comma();
+		}
+		return this;
+	});
+	varstatement.exps = true;
+	var letstatement = stmt("let", function (prefix) {
+		var tokens, lone, value, letblock;
+
+		if (!state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "let");
+		}
+
+		if (state.tokens.next.value === "(") {
+			if (!state.option.inMoz(true)) {
+				warning("W118", state.tokens.next, "let block");
+			}
+			advance("(");
+			funct["(blockscope)"].stack();
+			letblock = true;
+		} else if (funct["(nolet)"]) {
+			error("E048", state.tokens.curr);
+		}
+
+		if (funct["(onevar)"] && state.option.onevar) {
+			warning("W081");
+		} else if (!funct["(global)"]) {
+			funct["(onevar)"] = true;
+		}
+
+		this.first = [];
+		for (;;) {
+			var names = [];
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			if (_.contains(["{", "["], state.tokens.next.value)) {
+				tokens = destructuringExpression();
+				lone = false;
+			} else {
+				tokens = [ { id: identifier(), token: state.tokens.curr.value } ];
+				lone = true;
+			}
+			for (var t in tokens) {
+				t = tokens[t];
+				if (state.option.inESNext() && funct[t.id] === "const") {
+					warning("E011", null, t.id);
+				}
+				if (funct["(global)"] && predefined[t.id] === false) {
+					warning("W079", t.token, t.id);
+				}
+				if (t.id && !funct["(nolet)"]) {
+					addlabel(t.id, "unused", t.token, true);
+					names.push(t.token);
+				}
+			}
+			if (prefix) {
+				break;
+			}
+
+			this.first = this.first.concat(names);
+
+			if (state.tokens.next.id === "=") {
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				advance("=");
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				if (state.tokens.next.id === "undefined") {
+					warning("W080", state.tokens.prev, state.tokens.prev.value);
+				}
+				if (peek(0).id === "=" && state.tokens.next.identifier) {
+					warning("W120", state.tokens.next, state.tokens.next.value);
+				}
+				value = expression(10);
+				if (lone) {
+					tokens[0].first = value;
+				} else {
+					destructuringExpressionMatch(names, value);
+				}
+			}
+
+			if (state.tokens.next.id !== ",") {
+				break;
+			}
+			comma();
+		}
+		if (letblock) {
+			advance(")");
+			block(true, true);
+			this.block = true;
+			funct["(blockscope)"].unstack();
+		}
+
+		return this;
+	});
+	letstatement.exps = true;
+
+	blockstmt("class", function () {
+		return classdef.call(this, true);
+	});
+
+	function classdef(stmt) {
+		if (!state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "class");
+		}
+		if (stmt) {
+			this.name = identifier();
+			addlabel(this.name, "unused", state.tokens.curr);
+		} else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
+			this.name = identifier();
+		}
+		classtail(this);
+		return this;
+	}
+
+	function classtail(c) {
+		var strictness = state.directive["use strict"];
+		if (state.tokens.next.value === "extends") {
+			advance("extends");
+			c.heritage = expression(10);
+		}
+		state.directive["use strict"] = true;
+		advance("{");
+		c.body = state.syntax["{"].nud(true);
+		state.directive["use strict"] = strictness;
+	}
+
+	blockstmt("function", function () {
+		var generator = false;
+		if (state.tokens.next.value === "*") {
+			advance("*");
+			if (state.option.inESNext(true)) {
+				generator = true;
+			} else {
+				warning("W119", state.tokens.curr, "function*");
+			}
+		}
+		if (inblock) {
+			warning("W082", state.tokens.curr);
+
+		}
+		var i = identifier();
+		if (funct[i] === "const") {
+			warning("E011", null, i);
+		}
+		adjacent(state.tokens.curr, state.tokens.next);
+		addlabel(i, "unction", state.tokens.curr);
+
+		doFunction(i, { statement: true }, generator);
+		if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
+			error("E039");
+		}
+		return this;
+	});
+
+	prefix("function", function () {
+		var generator = false;
+		if (state.tokens.next.value === "*") {
+			if (!state.option.inESNext()) {
+				warning("W119", state.tokens.curr, "function*");
+			}
+			advance("*");
+			generator = true;
+		}
+		var i = optionalidentifier();
+		if (i || state.option.gcl) {
+			adjacent(state.tokens.curr, state.tokens.next);
+		} else {
+			nonadjacent(state.tokens.curr, state.tokens.next);
+		}
+		doFunction(i, undefined, generator);
+		if (!state.option.loopfunc && funct["(loopage)"]) {
+			warning("W083");
+		}
+		return this;
+	});
+
+	blockstmt("if", function () {
+		var t = state.tokens.next;
+		increaseComplexityCount();
+		state.condition = true;
+		advance("(");
+		nonadjacent(this, t);
+		nospace();
+		checkCondAssignment(expression(0));
+		advance(")", t);
+		state.condition = false;
+		nospace(state.tokens.prev, state.tokens.curr);
+		block(true, true);
+		if (state.tokens.next.id === "else") {
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			advance("else");
+			if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
+				statement(true);
+			} else {
+				block(true, true);
+			}
+		}
+		return this;
+	});
+
+	blockstmt("try", function () {
+		var b;
+
+		function doCatch() {
+			var oldScope = scope;
+			var e;
+
+			advance("catch");
+			nonadjacent(state.tokens.curr, state.tokens.next);
+			advance("(");
+
+			scope = Object.create(oldScope);
+
+			e = state.tokens.next.value;
+			if (state.tokens.next.type !== "(identifier)") {
+				e = null;
+				warning("E030", state.tokens.next, e);
+			}
+
+			advance();
+
+			funct = {
+				"(name)"     : "(catch)",
+				"(line)"     : state.tokens.next.line,
+				"(character)": state.tokens.next.character,
+				"(context)"  : funct,
+				"(breakage)" : funct["(breakage)"],
+				"(loopage)"  : funct["(loopage)"],
+				"(scope)"    : scope,
+				"(statement)": false,
+				"(metrics)"  : createMetrics(state.tokens.next),
+				"(catch)"    : true,
+				"(tokens)"   : {},
+				"(blockscope)": funct["(blockscope)"],
+				"(comparray)": funct["(comparray)"]
+			};
+
+			if (e) {
+				addlabel(e, "exception");
+			}
+
+			if (state.tokens.next.value === "if") {
+				if (!state.option.inMoz(true)) {
+					warning("W118", state.tokens.curr, "catch filter");
+				}
+				advance("if");
+				expression(0);
+			}
+
+			advance(")");
+
+			state.tokens.curr.funct = funct;
+			functions.push(funct);
+
+			block(false);
+
+			scope = oldScope;
+
+			funct["(last)"] = state.tokens.curr.line;
+			funct["(lastcharacter)"] = state.tokens.curr.character;
+			funct = funct["(context)"];
+		}
+
+		block(false);
+
+		while (state.tokens.next.id === "catch") {
+			increaseComplexityCount();
+			if (b && (!state.option.inMoz(true))) {
+				warning("W118", state.tokens.next, "multiple catch blocks");
+			}
+			doCatch();
+			b = true;
+		}
+
+		if (state.tokens.next.id === "finally") {
+			advance("finally");
+			block(false);
+			return;
+		}
+
+		if (!b) {
+			error("E021", state.tokens.next, "catch", state.tokens.next.value);
+		}
+
+		return this;
+	});
+
+	blockstmt("while", function () {
+		var t = state.tokens.next;
+		funct["(breakage)"] += 1;
+		funct["(loopage)"] += 1;
+		increaseComplexityCount();
+		advance("(");
+		nonadjacent(this, t);
+		nospace();
+		checkCondAssignment(expression(0));
+		advance(")", t);
+		nospace(state.tokens.prev, state.tokens.curr);
+		block(true, true);
+		funct["(breakage)"] -= 1;
+		funct["(loopage)"] -= 1;
+		return this;
+	}).labelled = true;
+
+	blockstmt("with", function () {
+		var t = state.tokens.next;
+		if (state.directive["use strict"]) {
+			error("E010", state.tokens.curr);
+		} else if (!state.option.withstmt) {
+			warning("W085", state.tokens.curr);
+		}
+
+		advance("(");
+		nonadjacent(this, t);
+		nospace();
+		expression(0);
+		advance(")", t);
+		nospace(state.tokens.prev, state.tokens.curr);
+		block(true, true);
+
+		return this;
+	});
+
+	blockstmt("switch", function () {
+		var t = state.tokens.next,
+			g = false;
+		funct["(breakage)"] += 1;
+		advance("(");
+		nonadjacent(this, t);
+		nospace();
+		checkCondAssignment(expression(0));
+		advance(")", t);
+		nospace(state.tokens.prev, state.tokens.curr);
+		nonadjacent(state.tokens.curr, state.tokens.next);
+		t = state.tokens.next;
+		advance("{");
+		nonadjacent(state.tokens.curr, state.tokens.next);
+		indent += state.option.indent;
+		this.cases = [];
+
+		for (;;) {
+			switch (state.tokens.next.id) {
+			case "case":
+				switch (funct["(verb)"]) {
+				case "yield":
+				case "break":
+				case "case":
+				case "continue":
+				case "return":
+				case "switch":
+				case "throw":
+					break;
+				default:
+					if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+						warning("W086", state.tokens.curr, "case");
+					}
+				}
+				indentation(-state.option.indent);
+				advance("case");
+				this.cases.push(expression(20));
+				increaseComplexityCount();
+				g = true;
+				advance(":");
+				funct["(verb)"] = "case";
+				break;
+			case "default":
+				switch (funct["(verb)"]) {
+				case "yield":
+				case "break":
+				case "continue":
+				case "return":
+				case "throw":
+					break;
+				default:
+					if (this.cases.length) {
+						if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+							warning("W086", state.tokens.curr, "default");
+						}
+					}
+				}
+				indentation(-state.option.indent);
+				advance("default");
+				g = true;
+				advance(":");
+				break;
+			case "}":
+				indent -= state.option.indent;
+				indentation();
+				advance("}", t);
+				funct["(breakage)"] -= 1;
+				funct["(verb)"] = undefined;
+				return;
+			case "(end)":
+				error("E023", state.tokens.next, "}");
+				return;
+			default:
+				if (g) {
+					switch (state.tokens.curr.id) {
+					case ",":
+						error("E040");
+						return;
+					case ":":
+						g = false;
+						statements();
+						break;
+					default:
+						error("E025", state.tokens.curr);
+						return;
+					}
+				} else {
+					if (state.tokens.curr.id === ":") {
+						advance(":");
+						error("E024", state.tokens.curr, ":");
+						statements();
+					} else {
+						error("E021", state.tokens.next, "case", state.tokens.next.value);
+						return;
+					}
+				}
+			}
+		}
+	}).labelled = true;
+
+	stmt("debugger", function () {
+		if (!state.option.debug) {
+			warning("W087");
+		}
+		return this;
+	}).exps = true;
+
+	(function () {
+		var x = stmt("do", function () {
+			funct["(breakage)"] += 1;
+			funct["(loopage)"] += 1;
+			increaseComplexityCount();
+
+			this.first = block(true, true);
+			advance("while");
+			var t = state.tokens.next;
+			nonadjacent(state.tokens.curr, t);
+			advance("(");
+			nospace();
+			checkCondAssignment(expression(0));
+			advance(")", t);
+			nospace(state.tokens.prev, state.tokens.curr);
+			funct["(breakage)"] -= 1;
+			funct["(loopage)"] -= 1;
+			return this;
+		});
+		x.labelled = true;
+		x.exps = true;
+	}());
+
+	blockstmt("for", function () {
+		var s, t = state.tokens.next;
+		var letscope = false;
+		var foreachtok = null;
+
+		if (t.value === "each") {
+			foreachtok = t;
+			advance("each");
+			if (!state.option.inMoz(true)) {
+				warning("W118", state.tokens.curr, "for each");
+			}
+		}
+
+		funct["(breakage)"] += 1;
+		funct["(loopage)"] += 1;
+		increaseComplexityCount();
+		advance("(");
+		nonadjacent(this, t);
+		nospace();
+		var nextop; // contains the token of the "in" or "of" operator
+		var i = 0;
+		var inof = ["in", "of"];
+		do {
+			nextop = peek(i);
+			++i;
+		} while (!_.contains(inof, nextop.value) && nextop.value !== ";" &&
+					nextop.type !== "(end)");
+		if (_.contains(inof, nextop.value)) {
+			if (!state.option.inESNext() && nextop.value === "of") {
+				error("W104", nextop, "for of");
+			}
+			if (state.tokens.next.id === "var") {
+				advance("var");
+				state.syntax["var"].fud.call(state.syntax["var"].fud, true);
+			} else if (state.tokens.next.id === "let") {
+				advance("let");
+				letscope = true;
+				funct["(blockscope)"].stack();
+				state.syntax["let"].fud.call(state.syntax["let"].fud, true);
+			} else {
+				switch (funct[state.tokens.next.value]) {
+				case "unused":
+					funct[state.tokens.next.value] = "var";
+					break;
+				case "var":
+					break;
+				default:
+					if (!funct["(blockscope)"].getlabel(state.tokens.next.value))
+						warning("W088", state.tokens.next, state.tokens.next.value);
+				}
+				advance();
+			}
+			advance(nextop.value);
+			expression(20);
+			advance(")", t);
+			s = block(true, true);
+			if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" ||
+					s[0].value !== "if")) {
+				warning("W089", this);
+			}
+			funct["(breakage)"] -= 1;
+			funct["(loopage)"] -= 1;
+		} else {
+			if (foreachtok) {
+				error("E045", foreachtok);
+			}
+			if (state.tokens.next.id !== ";") {
+				if (state.tokens.next.id === "var") {
+					advance("var");
+					state.syntax["var"].fud.call(state.syntax["var"].fud);
+				} else if (state.tokens.next.id === "let") {
+					advance("let");
+					letscope = true;
+					funct["(blockscope)"].stack();
+					state.syntax["let"].fud.call(state.syntax["let"].fud);
+				} else {
+					for (;;) {
+						expression(0, "for");
+						if (state.tokens.next.id !== ",") {
+							break;
+						}
+						comma();
+					}
+				}
+			}
+			nolinebreak(state.tokens.curr);
+			advance(";");
+			if (state.tokens.next.id !== ";") {
+				checkCondAssignment(expression(0));
+			}
+			nolinebreak(state.tokens.curr);
+			advance(";");
+			if (state.tokens.next.id === ";") {
+				error("E021", state.tokens.next, ")", ";");
+			}
+			if (state.tokens.next.id !== ")") {
+				for (;;) {
+					expression(0, "for");
+					if (state.tokens.next.id !== ",") {
+						break;
+					}
+					comma();
+				}
+			}
+			advance(")", t);
+			nospace(state.tokens.prev, state.tokens.curr);
+			block(true, true);
+			funct["(breakage)"] -= 1;
+			funct["(loopage)"] -= 1;
+
+		}
+		if (letscope) {
+			funct["(blockscope)"].unstack();
+		}
+		return this;
+	}).labelled = true;
+
+
+	stmt("break", function () {
+		var v = state.tokens.next.value;
+
+		if (funct["(breakage)"] === 0)
+			warning("W052", state.tokens.next, this.value);
+
+		if (!state.option.asi)
+			nolinebreak(this);
+
+		if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+			if (state.tokens.curr.line === state.tokens.next.line) {
+				if (funct[v] !== "label") {
+					warning("W090", state.tokens.next, v);
+				} else if (scope[v] !== funct) {
+					warning("W091", state.tokens.next, v);
+				}
+				this.first = state.tokens.next;
+				advance();
+			}
+		}
+		reachable("break");
+		return this;
+	}).exps = true;
+
+
+	stmt("continue", function () {
+		var v = state.tokens.next.value;
+
+		if (funct["(breakage)"] === 0)
+			warning("W052", state.tokens.next, this.value);
+
+		if (!state.option.asi)
+			nolinebreak(this);
+
+		if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+			if (state.tokens.curr.line === state.tokens.next.line) {
+				if (funct[v] !== "label") {
+					warning("W090", state.tokens.next, v);
+				} else if (scope[v] !== funct) {
+					warning("W091", state.tokens.next, v);
+				}
+				this.first = state.tokens.next;
+				advance();
+			}
+		} else if (!funct["(loopage)"]) {
+			warning("W052", state.tokens.next, this.value);
+		}
+		reachable("continue");
+		return this;
+	}).exps = true;
+
+
+	stmt("return", function () {
+		if (this.line === state.tokens.next.line) {
+			if (state.tokens.next.id === "(regexp)")
+				warning("W092");
+
+			if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+				nonadjacent(state.tokens.curr, state.tokens.next);
+				this.first = expression(0);
+
+				if (this.first &&
+						this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
+					warningAt("W093", this.first.line, this.first.character);
+				}
+			}
+		} else {
+			if (state.tokens.next.type === "(punctuator)" &&
+				["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
+				nolinebreak(this); // always warn (Line breaking error)
+			}
+		}
+		reachable("return");
+		return this;
+	}).exps = true;
+
+	(function (x) {
+		x.exps = true;
+		x.lbp = 25;
+	}(prefix("yield", function () {
+		var prev = state.tokens.prev;
+		if (state.option.inESNext(true) && !funct["(generator)"]) {
+			error("E046", state.tokens.curr, "yield");
+		} else if (!state.option.inESNext()) {
+			warning("W104", state.tokens.curr, "yield");
+		}
+		funct["(generator)"] = "yielded";
+		if (this.line === state.tokens.next.line || !state.option.inMoz(true)) {
+			if (state.tokens.next.id === "(regexp)")
+				warning("W092");
+
+			if (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud) {
+				nobreaknonadjacent(state.tokens.curr, state.tokens.next);
+				this.first = expression(10);
+
+				if (this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
+					warningAt("W093", this.first.line, this.first.character);
+				}
+			}
+
+			if (state.option.inMoz(true) && state.tokens.next.id !== ")" &&
+					(prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) {
+				error("E050", this);
+			}
+		} else if (!state.option.asi) {
+			nolinebreak(this); // always warn (Line breaking error)
+		}
+		return this;
+	})));
+
+
+	stmt("throw", function () {
+		nolinebreak(this);
+		nonadjacent(state.tokens.curr, state.tokens.next);
+		this.first = expression(20);
+		reachable("throw");
+		return this;
+	}).exps = true;
+
+	stmt("import", function () {
+		if (!state.option.inESNext()) {
+			warning("W119", state.tokens.curr, "import");
+		}
+
+		if (state.tokens.next.identifier) {
+			this.name = identifier();
+			addlabel(this.name, "unused", state.tokens.curr);
+		} else {
+			advance("{");
+			for (;;) {
+				var importName;
+				if (state.tokens.next.type === "default") {
+					importName = "default";
+					advance("default");
+				} else {
+					importName = identifier();
+				}
+				if (state.tokens.next.value === "as") {
+					advance("as");
+					importName = identifier();
+				}
+				addlabel(importName, "unused", state.tokens.curr);
+
+				if (state.tokens.next.value === ",") {
+					advance(",");
+				} else if (state.tokens.next.value === "}") {
+					advance("}");
+					break;
+				} else {
+					error("E024", state.tokens.next, state.tokens.next.value);
+					break;
+				}
+			}
+		}
+
+		advance("from");
+		advance("(string)");
+		return this;
+	}).exps = true;
+
+	stmt("export", function () {
+		if (!state.option.inESNext()) {
+			warning("W119", state.tokens.curr, "export");
+		}
+
+		if (state.tokens.next.type === "default") {
+			advance("default");
+			if (state.tokens.next.id === "function" || state.tokens.next.id === "class") {
+				this.block = true;
+			}
+			this.exportee = expression(10);
+
+			return this;
+		}
+
+		if (state.tokens.next.value === "{") {
+			advance("{");
+			for (;;) {
+				identifier();
+
+				if (state.tokens.next.value === ",") {
+					advance(",");
+				} else if (state.tokens.next.value === "}") {
+					advance("}");
+					break;
+				} else {
+					error("E024", state.tokens.next, state.tokens.next.value);
+					break;
+				}
+			}
+			return this;
+		}
+
+		if (state.tokens.next.id === "var") {
+			advance("var");
+			state.syntax["var"].fud.call(state.syntax["var"].fud);
+		} else if (state.tokens.next.id === "let") {
+			advance("let");
+			state.syntax["let"].fud.call(state.syntax["let"].fud);
+		} else if (state.tokens.next.id === "const") {
+			advance("const");
+			state.syntax["const"].fud.call(state.syntax["const"].fud);
+		} else if (state.tokens.next.id === "function") {
+			this.block = true;
+			advance("function");
+			state.syntax["function"].fud();
+		} else if (state.tokens.next.id === "class") {
+			this.block = true;
+			advance("class");
+			state.syntax["class"].fud();
+		} else {
+			error("E024", state.tokens.next, state.tokens.next.value);
+		}
+
+		return this;
+	}).exps = true;
+
+	FutureReservedWord("abstract");
+	FutureReservedWord("boolean");
+	FutureReservedWord("byte");
+	FutureReservedWord("char");
+	FutureReservedWord("class", { es5: true, nud: classdef });
+	FutureReservedWord("double");
+	FutureReservedWord("enum", { es5: true });
+	FutureReservedWord("export", { es5: true });
+	FutureReservedWord("extends", { es5: true });
+	FutureReservedWord("final");
+	FutureReservedWord("float");
+	FutureReservedWord("goto");
+	FutureReservedWord("implements", { es5: true, strictOnly: true });
+	FutureReservedWord("import", { es5: true });
+	FutureReservedWord("int");
+	FutureReservedWord("interface", { es5: true, strictOnly: true });
+	FutureReservedWord("long");
+	FutureReservedWord("native");
+	FutureReservedWord("package", { es5: true, strictOnly: true });
+	FutureReservedWord("private", { es5: true, strictOnly: true });
+	FutureReservedWord("protected", { es5: true, strictOnly: true });
+	FutureReservedWord("public", { es5: true, strictOnly: true });
+	FutureReservedWord("short");
+	FutureReservedWord("static", { es5: true, strictOnly: true });
+	FutureReservedWord("super", { es5: true });
+	FutureReservedWord("synchronized");
+	FutureReservedWord("throws");
+	FutureReservedWord("transient");
+	FutureReservedWord("volatile");
+
+	var lookupBlockType = function () {
+		var pn, pn1;
+		var i = 0;
+		var bracketStack = 0;
+		var ret = {};
+		if (_.contains(["[", "{"], state.tokens.curr.value))
+			bracketStack += 1;
+		if (_.contains(["[", "{"], state.tokens.next.value))
+			bracketStack += 1;
+		if (_.contains(["]", "}"], state.tokens.next.value))
+			bracketStack -= 1;
+		do {
+			pn = peek(i);
+			pn1 = peek(i + 1);
+			i = i + 1;
+			if (_.contains(["[", "{"], pn.value)) {
+				bracketStack += 1;
+			} else if (_.contains(["]", "}"], pn.value)) {
+				bracketStack -= 1;
+			}
+			if (pn.identifier && pn.value === "for" && bracketStack === 1) {
+				ret.isCompArray = true;
+				ret.notJson = true;
+				break;
+			}
+			if (_.contains(["}", "]"], pn.value) && pn1.value === "=") {
+				ret.isDestAssign = true;
+				ret.notJson = true;
+				break;
+			}
+			if (pn.value === ";") {
+				ret.isBlock = true;
+				ret.notJson = true;
+			}
+		} while (bracketStack > 0 && pn.id !== "(end)" && i < 15);
+		return ret;
+	};
+	function destructuringAssignOrJsonValue() {
+
+		var block = lookupBlockType();
+		if (block.notJson) {
+			if (!state.option.inESNext() && block.isDestAssign) {
+				warning("W104", state.tokens.curr, "destructuring assignment");
+			}
+			statements();
+		} else {
+			state.option.laxbreak = true;
+			state.jsonMode = true;
+			jsonValue();
+		}
+	}
+
+	var arrayComprehension = function () {
+		var CompArray = function () {
+			this.mode = "use";
+			this.variables = [];
+		};
+		var _carrays = [];
+		var _current;
+		function declare(v) {
+			var l = _current.variables.filter(function (elt) {
+				if (elt.value === v) {
+					elt.undef = false;
+					return v;
+				}
+			}).length;
+			return l !== 0;
+		}
+		function use(v) {
+			var l = _current.variables.filter(function (elt) {
+				if (elt.value === v && !elt.undef) {
+					if (elt.unused === true) {
+						elt.unused = false;
+					}
+					return v;
+				}
+			}).length;
+			return (l === 0);
+		}
+		return {stack: function () {
+					_current = new CompArray();
+					_carrays.push(_current);
+				},
+				unstack: function () {
+					_current.variables.filter(function (v) {
+						if (v.unused)
+							warning("W098", v.token, v.value);
+						if (v.undef)
+							isundef(v.funct, "W117", v.token, v.value);
+					});
+					_carrays.splice(_carrays[_carrays.length - 1], 1);
+					_current = _carrays[_carrays.length - 1];
+				},
+				setState: function (s) {
+					if (_.contains(["use", "define", "filter"], s))
+						_current.mode = s;
+				},
+				check: function (v) {
+					if (_current && _current.mode === "use") {
+						_current.variables.push({funct: funct,
+													token: state.tokens.curr,
+													value: v,
+													undef: true,
+													unused: false});
+						return true;
+					} else if (_current && _current.mode === "define") {
+						if (!declare(v)) {
+							_current.variables.push({funct: funct,
+														token: state.tokens.curr,
+														value: v,
+														undef: false,
+														unused: true});
+						}
+						return true;
+					} else if (_current && _current.mode === "filter") {
+						if (use(v)) {
+							isundef(funct, "W117", state.tokens.curr, v);
+						}
+						return true;
+					}
+					return false;
+				}
+				};
+	};
+
+	function jsonValue() {
+
+		function jsonObject() {
+			var o = {}, t = state.tokens.next;
+			advance("{");
+			if (state.tokens.next.id !== "}") {
+				for (;;) {
+					if (state.tokens.next.id === "(end)") {
+						error("E026", state.tokens.next, t.line);
+					} else if (state.tokens.next.id === "}") {
+						warning("W094", state.tokens.curr);
+						break;
+					} else if (state.tokens.next.id === ",") {
+						error("E028", state.tokens.next);
+					} else if (state.tokens.next.id !== "(string)") {
+						warning("W095", state.tokens.next, state.tokens.next.value);
+					}
+					if (o[state.tokens.next.value] === true) {
+						warning("W075", state.tokens.next, state.tokens.next.value);
+					} else if ((state.tokens.next.value === "__proto__" &&
+						!state.option.proto) || (state.tokens.next.value === "__iterator__" &&
+						!state.option.iterator)) {
+						warning("W096", state.tokens.next, state.tokens.next.value);
+					} else {
+						o[state.tokens.next.value] = true;
+					}
+					advance();
+					advance(":");
+					jsonValue();
+					if (state.tokens.next.id !== ",") {
+						break;
+					}
+					advance(",");
+				}
+			}
+			advance("}");
+		}
+
+		function jsonArray() {
+			var t = state.tokens.next;
+			advance("[");
+			if (state.tokens.next.id !== "]") {
+				for (;;) {
+					if (state.tokens.next.id === "(end)") {
+						error("E027", state.tokens.next, t.line);
+					} else if (state.tokens.next.id === "]") {
+						warning("W094", state.tokens.curr);
+						break;
+					} else if (state.tokens.next.id === ",") {
+						error("E028", state.tokens.next);
+					}
+					jsonValue();
+					if (state.tokens.next.id !== ",") {
+						break;
+					}
+					advance(",");
+				}
+			}
+			advance("]");
+		}
+
+		switch (state.tokens.next.id) {
+		case "{":
+			jsonObject();
+			break;
+		case "[":
+			jsonArray();
+			break;
+		case "true":
+		case "false":
+		case "null":
+		case "(number)":
+		case "(string)":
+			advance();
+			break;
+		case "-":
+			advance("-");
+			if (state.tokens.curr.character !== state.tokens.next.from) {
+				warning("W011", state.tokens.curr);
+			}
+			adjacent(state.tokens.curr, state.tokens.next);
+			advance("(number)");
+			break;
+		default:
+			error("E003", state.tokens.next);
+		}
+	}
+
+	var blockScope = function () {
+		var _current = {};
+		var _variables = [_current];
+
+		function _checkBlockLabels() {
+			for (var t in _current) {
+				if (_current[t]["(type)"] === "unused") {
+					if (state.option.unused) {
+						var tkn = _current[t]["(token)"];
+						var line = tkn.line;
+						var chr  = tkn.character;
+						warningAt("W098", line, chr, t);
+					}
+				}
+			}
+		}
+
+		return {
+			stack: function () {
+				_current = {};
+				_variables.push(_current);
+			},
+
+			unstack: function () {
+				_checkBlockLabels();
+				_variables.splice(_variables.length - 1, 1);
+				_current = _.last(_variables);
+			},
+
+			getlabel: function (l) {
+				for (var i = _variables.length - 1 ; i >= 0; --i) {
+					if (_.has(_variables[i], l)) {
+						return _variables[i];
+					}
+				}
+			},
+
+			current: {
+				has: function (t) {
+					return _.has(_current, t);
+				},
+				add: function (t, type, tok) {
+					_current[t] = { "(type)" : type,
+									"(token)": tok };
+				}
+			}
+		};
+	};
+	var itself = function (s, o, g) {
+		var i, k, x;
+		var optionKeys;
+		var newOptionObj = {};
+		var newIgnoredObj = {};
+
+		state.reset();
+
+		if (o && o.scope) {
+			JSHINT.scope = o.scope;
+		} else {
+			JSHINT.errors = [];
+			JSHINT.undefs = [];
+			JSHINT.internals = [];
+			JSHINT.blacklist = {};
+			JSHINT.scope = "(main)";
+		}
+
+		predefined = Object.create(null);
+		combine(predefined, vars.ecmaIdentifiers);
+		combine(predefined, vars.reservedVars);
+
+		combine(predefined, g || {});
+
+		declared = Object.create(null);
+		exported = Object.create(null);
+
+		function each(obj, cb) {
+			if (!obj)
+				return;
+
+			if (!Array.isArray(obj) && typeof obj === "object")
+				obj = Object.keys(obj);
+
+			obj.forEach(cb);
+		}
+
+		if (o) {
+			each(o.predef || null, function (item) {
+				var slice, prop;
+
+				if (item[0] === "-") {
+					slice = item.slice(1);
+					JSHINT.blacklist[slice] = slice;
+				} else {
+					prop = Object.getOwnPropertyDescriptor(o.predef, item);
+					predefined[item] = prop ? prop.value : false;
+				}
+			});
+
+			each(o.exported || null, function (item) {
+				exported[item] = true;
+			});
+
+			delete o.predef;
+			delete o.exported;
+
+			optionKeys = Object.keys(o);
+			for (x = 0; x < optionKeys.length; x++) {
+				if (/^-W\d{3}$/g.test(optionKeys[x])) {
+					newIgnoredObj[optionKeys[x].slice(1)] = true;
+				} else {
+					newOptionObj[optionKeys[x]] = o[optionKeys[x]];
+
+					if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
+						newOptionObj["(explicitNewcap)"] = true;
+
+					if (optionKeys[x] === "indent")
+						newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true;
+				}
+			}
+		}
+
+		state.option = newOptionObj;
+		state.ignored = newIgnoredObj;
+
+		state.option.indent = state.option.indent || 4;
+		state.option.maxerr = state.option.maxerr || 50;
+
+		indent = 1;
+		global = Object.create(predefined);
+		scope = global;
+		funct = {
+			"(global)":   true,
+			"(name)":	  "(global)",
+			"(scope)":	  scope,
+			"(breakage)": 0,
+			"(loopage)":  0,
+			"(tokens)":   {},
+			"(metrics)":   createMetrics(state.tokens.next),
+			"(blockscope)": blockScope(),
+			"(comparray)": arrayComprehension()
+		};
+		functions = [funct];
+		urls = [];
+		stack = null;
+		member = {};
+		membersOnly = null;
+		implied = {};
+		inblock = false;
+		lookahead = [];
+		warnings = 0;
+		unuseds = [];
+
+		if (!isString(s) && !Array.isArray(s)) {
+			errorAt("E004", 0);
+			return false;
+		}
+
+		api = {
+			get isJSON() {
+				return state.jsonMode;
+			},
+
+			getOption: function (name) {
+				return state.option[name] || null;
+			},
+
+			getCache: function (name) {
+				return state.cache[name];
+			},
+
+			setCache: function (name, value) {
+				state.cache[name] = value;
+			},
+
+			warn: function (code, data) {
+				warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
+			},
+
+			on: function (names, listener) {
+				names.split(" ").forEach(function (name) {
+					emitter.on(name, listener);
+				}.bind(this));
+			}
+		};
+
+		emitter.removeAllListeners();
+		(extraModules || []).forEach(function (func) {
+			func(api);
+		});
+
+		state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
+
+		lex = new Lexer(s);
+
+		lex.on("warning", function (ev) {
+			warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
+		});
+
+		lex.on("error", function (ev) {
+			errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
+		});
+
+		lex.on("fatal", function (ev) {
+			quit("E041", ev.line, ev.from);
+		});
+
+		lex.on("Identifier", function (ev) {
+			emitter.emit("Identifier", ev);
+		});
+
+		lex.on("String", function (ev) {
+			emitter.emit("String", ev);
+		});
+
+		lex.on("Number", function (ev) {
+			emitter.emit("Number", ev);
+		});
+
+		lex.start();
+		for (var name in o) {
+			if (_.has(o, name)) {
+				checkOption(name, state.tokens.curr);
+			}
+		}
+
+		assume();
+		combine(predefined, g || {});
+		comma.first = true;
+
+		try {
+			advance();
+			switch (state.tokens.next.id) {
+			case "{":
+			case "[":
+				destructuringAssignOrJsonValue();
+				break;
+			default:
+				directives();
+
+				if (state.directive["use strict"]) {
+					if (!state.option.globalstrict && !state.option.node) {
+						warning("W097", state.tokens.prev);
+					}
+				}
+
+				statements();
+			}
+			advance((state.tokens.next && state.tokens.next.value !== ".")	? "(end)" : undefined);
+			funct["(blockscope)"].unstack();
+
+			var markDefined = function (name, context) {
+				do {
+					if (typeof context[name] === "string") {
+
+						if (context[name] === "unused")
+							context[name] = "var";
+						else if (context[name] === "unction")
+							context[name] = "closure";
+
+						return true;
+					}
+
+					context = context["(context)"];
+				} while (context);
+
+				return false;
+			};
+
+			var clearImplied = function (name, line) {
+				if (!implied[name])
+					return;
+
+				var newImplied = [];
+				for (var i = 0; i < implied[name].length; i += 1) {
+					if (implied[name][i] !== line)
+						newImplied.push(implied[name][i]);
+				}
+
+				if (newImplied.length === 0)
+					delete implied[name];
+				else
+					implied[name] = newImplied;
+			};
+
+			var warnUnused = function (name, tkn, type, unused_opt) {
+				var line = tkn.line;
+				var chr  = tkn.character;
+
+				if (unused_opt === undefined) {
+					unused_opt = state.option.unused;
+				}
+
+				if (unused_opt === true) {
+					unused_opt = "last-param";
+				}
+
+				var warnable_types = {
+					"vars": ["var"],
+					"last-param": ["var", "param"],
+					"strict": ["var", "param", "last-param"]
+				};
+
+				if (unused_opt) {
+					if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
+						warningAt("W098", line, chr, name);
+					}
+				}
+
+				unuseds.push({
+					name: name,
+					line: line,
+					character: chr
+				});
+			};
+
+			var checkUnused = function (func, key) {
+				var type = func[key];
+				var tkn = func["(tokens)"][key];
+
+				if (key.charAt(0) === "(")
+					return;
+
+				if (type !== "unused" && type !== "unction")
+					return;
+				if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
+					return;
+				if (func["(global)"] && _.has(exported, key)) {
+					return;
+				}
+
+				warnUnused(key, tkn, "var");
+			};
+			for (i = 0; i < JSHINT.undefs.length; i += 1) {
+				k = JSHINT.undefs[i].slice(0);
+
+				if (markDefined(k[2].value, k[0])) {
+					clearImplied(k[2].value, k[2].line);
+				} else if (state.option.undef) {
+					warning.apply(warning, k.slice(1));
+				}
+			}
+
+			functions.forEach(function (func) {
+				if (func["(unusedOption)"] === false) {
+					return;
+				}
+
+				for (var key in func) {
+					if (_.has(func, key)) {
+						checkUnused(func, key);
+					}
+				}
+
+				if (!func["(params)"])
+					return;
+
+				var params = func["(params)"].slice();
+				var param  = params.pop();
+				var type, unused_opt;
+
+				while (param) {
+					type = func[param];
+					unused_opt = func["(unusedOption)"] || state.option.unused;
+					unused_opt = unused_opt === true ? "last-param" : unused_opt;
+
+					if (param === "undefined")
+						return;
+
+					if (type === "unused" || type === "unction") {
+						warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]);
+					} else if (unused_opt === "last-param") {
+						return;
+					}
+
+					param = params.pop();
+				}
+			});
+
+			for (var key in declared) {
+				if (_.has(declared, key) && !_.has(global, key)) {
+					warnUnused(key, declared[key], "var");
+				}
+			}
+
+		} catch (err) {
+			if (err && err.name === "JSHintError") {
+				var nt = state.tokens.next || {};
+				JSHINT.errors.push({
+					scope     : "(main)",
+					raw       : err.raw,
+					code      : err.code,
+					reason    : err.message,
+					line      : err.line || nt.line,
+					character : err.character || nt.from
+				}, null);
+			} else {
+				throw err;
+			}
+		}
+
+		if (JSHINT.scope === "(main)") {
+			o = o || {};
+
+			for (i = 0; i < JSHINT.internals.length; i += 1) {
+				k = JSHINT.internals[i];
+				o.scope = k.elem;
+				itself(k.value, o, g);
+			}
+		}
+
+		return JSHINT.errors.length === 0;
+	};
+	itself.addModule = function (func) {
+		extraModules.push(func);
+	};
+
+	itself.addModule(style.register);
+	itself.data = function () {
+		var data = {
+			functions: [],
+			options: state.option
+		};
+		var implieds = [];
+		var members = [];
+		var fu, f, i, j, n, globals;
+
+		if (itself.errors.length) {
+			data.errors = itself.errors;
+		}
+
+		if (state.jsonMode) {
+			data.json = true;
+		}
+
+		for (n in implied) {
+			if (_.has(implied, n)) {
+				implieds.push({
+					name: n,
+					line: implied[n]
+				});
+			}
+		}
+
+		if (implieds.length > 0) {
+			data.implieds = implieds;
+		}
+
+		if (urls.length > 0) {
+			data.urls = urls;
+		}
+
+		globals = Object.keys(scope);
+		if (globals.length > 0) {
+			data.globals = globals;
+		}
+
+		for (i = 1; i < functions.length; i += 1) {
+			f = functions[i];
+			fu = {};
+
+			for (j = 0; j < functionicity.length; j += 1) {
+				fu[functionicity[j]] = [];
+			}
+
+			for (j = 0; j < functionicity.length; j += 1) {
+				if (fu[functionicity[j]].length === 0) {
+					delete fu[functionicity[j]];
+				}
+			}
+
+			fu.name = f["(name)"];
+			fu.param = f["(params)"];
+			fu.line = f["(line)"];
+			fu.character = f["(character)"];
+			fu.last = f["(last)"];
+			fu.lastcharacter = f["(lastcharacter)"];
+			data.functions.push(fu);
+		}
+
+		if (unuseds.length > 0) {
+			data.unused = unuseds;
+		}
+
+		members = [];
+		for (n in member) {
+			if (typeof member[n] === "number") {
+				data.member = member;
+				break;
+			}
+		}
+
+		return data;
+	};
+
+	itself.jshint = itself;
+
+	return itself;
+}());
+if (typeof exports === "object" && exports) {
+	exports.JSHINT = JSHINT;
+}
+
+},
+{"../shared/messages.js":2,"../shared/vars.js":3,"./lex.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"console-browserify":9,"events":10,"underscore":1}],
+5:[function(req,module,exports){
+
+
+
+var _      = req("underscore");
+var events = req("events");
+var reg    = req("./reg.js");
+var state  = req("./state.js").state;
+
+var Token = {
+	Identifier: 1,
+	Punctuator: 2,
+	NumericLiteral: 3,
+	StringLiteral: 4,
+	Comment: 5,
+	Keyword: 6,
+	NullLiteral: 7,
+	BooleanLiteral: 8,
+	RegExp: 9
+};
+
+var unicodeLetterTable = [
+	170, 170, 181, 181, 186, 186, 192, 214,
+	216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750,
+	880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908,
+	910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366,
+	1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610,
+	1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775,
+	1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957,
+	1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069,
+	2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361,
+	2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431,
+	2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482,
+	2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529,
+	2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608,
+	2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654,
+	2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736,
+	2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785,
+	2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867,
+	2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929,
+	2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970,
+	2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001,
+	3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123,
+	3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212,
+	3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261,
+	3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344,
+	3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455,
+	3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526,
+	3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716,
+	3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743,
+	3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760,
+	3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805,
+	3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138,
+	4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198,
+	4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4304, 4346,
+	4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696,
+	4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789,
+	4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880,
+	4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740,
+	5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900,
+	5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000,
+	6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312,
+	6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516,
+	6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823,
+	6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141,
+	7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409,
+	7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013,
+	8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061,
+	8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140,
+	8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188,
+	8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455,
+	8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486,
+	8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521,
+	8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358,
+	11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621,
+	11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694,
+	11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726,
+	11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295,
+	12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438,
+	12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589,
+	12593, 12686, 12704, 12730, 12784, 12799, 13312, 13312,
+	19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124,
+	42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539,
+	42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783,
+	42786, 42888, 42891, 42894, 42896, 42897, 42912, 42921,
+	43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042,
+	43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259,
+	43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442,
+	43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595,
+	43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697,
+	43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714,
+	43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798,
+	43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032,
+	55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045,
+	64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279,
+	64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316,
+	64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433,
+	64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019,
+	65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370,
+	65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495,
+	65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594,
+	65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786,
+	65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334,
+	66352, 66378, 66432, 66461, 66464, 66499, 66504, 66511,
+	66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592,
+	67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669,
+	67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115,
+	68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405,
+	68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687,
+	69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894,
+	92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964,
+	119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980,
+	119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069,
+	120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121,
+	120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144,
+	120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570,
+	120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686,
+	120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779,
+	131072, 131072, 173782, 173782, 173824, 173824, 177972, 177972,
+	177984, 177984, 178205, 178205, 194560, 195101
+];
+
+var identifierStartTable = [];
+
+for (var i = 0; i < 128; i++) {
+	identifierStartTable[i] =
+		i === 36 ||           // $
+		i >= 65 && i <= 90 || // A-Z
+		i === 95 ||           // _
+		i >= 97 && i <= 122;  // a-z
+}
+
+var identifierPartTable = [];
+
+for (var i = 0; i < 128; i++) {
+	identifierPartTable[i] =
+		identifierStartTable[i] || // $, _, A-Z, a-z
+		i >= 48 && i <= 57;        // 0-9
+}
+
+function asyncTrigger() {
+	var _checks = [];
+
+	return {
+		push: function (fn) {
+			_checks.push(fn);
+		},
+
+		check: function () {
+			for (var check = 0; check < _checks.length; ++check) {
+				_checks[check]();
+			}
+
+			_checks.splice(0, _checks.length);
+		}
+	};
+}
+function Lexer(source) {
+	var lines = source;
+
+	if (typeof lines === "string") {
+		lines = lines
+			.replace(/\r\n/g, "\n")
+			.replace(/\r/g, "\n")
+			.split("\n");
+	}
+
+	if (lines[0] && lines[0].substr(0, 2) === "#!") {
+		lines[0] = "";
+	}
+
+	this.emitter = new events.EventEmitter();
+	this.source = source;
+	this.setLines(lines);
+	this.prereg = true;
+
+	this.line = 0;
+	this.char = 1;
+	this.from = 1;
+	this.input = "";
+
+	for (var i = 0; i < state.option.indent; i += 1) {
+		state.tab += " ";
+	}
+}
+
+Lexer.prototype = {
+	_lines: [],
+
+	getLines: function () {
+		this._lines = state.lines;
+		return this._lines;
+	},
+
+	setLines: function (val) {
+		this._lines = val;
+		state.lines = this._lines;
+	},
+	peek: function (i) {
+		return this.input.charAt(i || 0);
+	},
+	skip: function (i) {
+		i = i || 1;
+		this.char += i;
+		this.input = this.input.slice(i);
+	},
+	on: function (names, listener) {
+		names.split(" ").forEach(function (name) {
+			this.emitter.on(name, listener);
+		}.bind(this));
+	},
+	trigger: function () {
+		this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
+	},
+	triggerAsync: function (type, args, checks, fn) {
+		checks.push(function () {
+			if (fn()) {
+				this.trigger(type, args);
+			}
+		}.bind(this));
+	},
+	scanPunctuator: function () {
+		var ch1 = this.peek();
+		var ch2, ch3, ch4;
+
+		switch (ch1) {
+		case ".":
+			if ((/^[0-9]$/).test(this.peek(1))) {
+				return null;
+			}
+			if (this.peek(1) === "." && this.peek(2) === ".") {
+				return {
+					type: Token.Punctuator,
+					value: "..."
+				};
+			}
+		case "(":
+		case ")":
+		case ";":
+		case ",":
+		case "{":
+		case "}":
+		case "[":
+		case "]":
+		case ":":
+		case "~":
+		case "?":
+			return {
+				type: Token.Punctuator,
+				value: ch1
+			};
+		case "#":
+			return {
+				type: Token.Punctuator,
+				value: ch1
+			};
+		case "":
+			return null;
+		}
+
+		ch2 = this.peek(1);
+		ch3 = this.peek(2);
+		ch4 = this.peek(3);
+
+		if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
+			return {
+				type: Token.Punctuator,
+				value: ">>>="
+			};
+		}
+
+		if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
+			return {
+				type: Token.Punctuator,
+				value: "==="
+			};
+		}
+
+		if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
+			return {
+				type: Token.Punctuator,
+				value: "!=="
+			};
+		}
+
+		if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
+			return {
+				type: Token.Punctuator,
+				value: ">>>"
+			};
+		}
+
+		if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
+			return {
+				type: Token.Punctuator,
+				value: "<<="
+			};
+		}
+
+		if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
+			return {
+				type: Token.Punctuator,
+				value: ">>="
+			};
+		}
+		if (ch1 === "=" && ch2 === ">") {
+			return {
+				type: Token.Punctuator,
+				value: ch1 + ch2
+			};
+		}
+		if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
+			return {
+				type: Token.Punctuator,
+				value: ch1 + ch2
+			};
+		}
+
+		if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
+			if (ch2 === "=") {
+				return {
+					type: Token.Punctuator,
+					value: ch1 + ch2
+				};
+			}
+
+			return {
+				type: Token.Punctuator,
+				value: ch1
+			};
+		}
+
+		if (ch1 === "/") {
+			if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) {
+				return {
+					type: Token.Punctuator,
+					value: "/="
+				};
+			}
+
+			return {
+				type: Token.Punctuator,
+				value: "/"
+			};
+		}
+
+		return null;
+	},
+	scanComments: function () {
+		var ch1 = this.peek();
+		var ch2 = this.peek(1);
+		var rest = this.input.substr(2);
+		var startLine = this.line;
+		var startChar = this.char;
+
+		function commentToken(label, body, opt) {
+			var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
+			var isSpecial = false;
+			var value = label + body;
+			var commentType = "plain";
+			opt = opt || {};
+
+			if (opt.isMultiline) {
+				value += "*/";
+			}
+
+			special.forEach(function (str) {
+				if (isSpecial) {
+					return;
+				}
+				if (label === "//" && str !== "jshint") {
+					return;
+				}
+
+				if (body.substr(0, str.length) === str) {
+					isSpecial = true;
+					label = label + str;
+					body = body.substr(str.length);
+				}
+
+				if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) {
+					isSpecial = true;
+					label = label + " " + str;
+					body = body.substr(str.length + 1);
+				}
+
+				if (!isSpecial) {
+					return;
+				}
+
+				switch (str) {
+				case "member":
+					commentType = "members";
+					break;
+				case "global":
+					commentType = "globals";
+					break;
+				default:
+					commentType = str;
+				}
+			});
+
+			return {
+				type: Token.Comment,
+				commentType: commentType,
+				value: value,
+				body: body,
+				isSpecial: isSpecial,
+				isMultiline: opt.isMultiline || false,
+				isMalformed: opt.isMalformed || false
+			};
+		}
+		if (ch1 === "*" && ch2 === "/") {
+			this.trigger("error", {
+				code: "E018",
+				line: startLine,
+				character: startChar
+			});
+
+			this.skip(2);
+			return null;
+		}
+		if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
+			return null;
+		}
+		if (ch2 === "/") {
+			this.skip(this.input.length); // Skip to the EOL.
+			return commentToken("//", rest);
+		}
+
+		var body = "";
+		if (ch2 === "*") {
+			this.skip(2);
+
+			while (this.peek() !== "*" || this.peek(1) !== "/") {
+				if (this.peek() === "") { // End of Line
+					body += "\n";
+					if (!this.nextLine()) {
+						this.trigger("error", {
+							code: "E017",
+							line: startLine,
+							character: startChar
+						});
+
+						return commentToken("/*", body, {
+							isMultiline: true,
+							isMalformed: true
+						});
+					}
+				} else {
+					body += this.peek();
+					this.skip();
+				}
+			}
+
+			this.skip(2);
+			return commentToken("/*", body, { isMultiline: true });
+		}
+	},
+	scanKeyword: function () {
+		var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
+		var keywords = [
+			"if", "in", "do", "var", "for", "new",
+			"try", "let", "this", "else", "case",
+			"void", "with", "enum", "while", "break",
+			"catch", "throw", "const", "yield", "class",
+			"super", "return", "typeof", "delete",
+			"switch", "export", "import", "default",
+			"finally", "extends", "function", "continue",
+			"debugger", "instanceof"
+		];
+
+		if (result && keywords.indexOf(result[0]) >= 0) {
+			return {
+				type: Token.Keyword,
+				value: result[0]
+			};
+		}
+
+		return null;
+	},
+	scanIdentifier: function () {
+		var id = "";
+		var index = 0;
+		var type, char;
+
+		function isUnicodeLetter(code) {
+			for (var i = 0; i < unicodeLetterTable.length;) {
+				if (code < unicodeLetterTable[i++]) {
+					return false;
+				}
+
+				if (code <= unicodeLetterTable[i++]) {
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		function isHexDigit(str) {
+			return (/^[0-9a-fA-F]$/).test(str);
+		}
+
+		var readUnicodeEscapeSequence = function () {
+			index += 1;
+
+			if (this.peek(index) !== "u") {
+				return null;
+			}
+
+			var ch1 = this.peek(index + 1);
+			var ch2 = this.peek(index + 2);
+			var ch3 = this.peek(index + 3);
+			var ch4 = this.peek(index + 4);
+			var code;
+
+			if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
+				code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
+
+				if (isUnicodeLetter(code)) {
+					index += 5;
+					return "\\u" + ch1 + ch2 + ch3 + ch4;
+				}
+
+				return null;
+			}
+
+			return null;
+		}.bind(this);
+
+		var getIdentifierStart = function () {
+			var chr = this.peek(index);
+			var code = chr.charCodeAt(0);
+
+			if (code === 92) {
+				return readUnicodeEscapeSequence();
+			}
+
+			if (code < 128) {
+				if (identifierStartTable[code]) {
+					index += 1;
+					return chr;
+				}
+
+				return null;
+			}
+
+			if (isUnicodeLetter(code)) {
+				index += 1;
+				return chr;
+			}
+
+			return null;
+		}.bind(this);
+
+		var getIdentifierPart = function () {
+			var chr = this.peek(index);
+			var code = chr.charCodeAt(0);
+
+			if (code === 92) {
+				return readUnicodeEscapeSequence();
+			}
+
+			if (code < 128) {
+				if (identifierPartTable[code]) {
+					index += 1;
+					return chr;
+				}
+
+				return null;
+			}
+
+			if (isUnicodeLetter(code)) {
+				index += 1;
+				return chr;
+			}
+
+			return null;
+		}.bind(this);
+
+		char = getIdentifierStart();
+		if (char === null) {
+			return null;
+		}
+
+		id = char;
+		for (;;) {
+			char = getIdentifierPart();
+
+			if (char === null) {
+				break;
+			}
+
+			id += char;
+		}
+
+		switch (id) {
+		case "true":
+		case "false":
+			type = Token.BooleanLiteral;
+			break;
+		case "null":
+			type = Token.NullLiteral;
+			break;
+		default:
+			type = Token.Identifier;
+		}
+
+		return {
+			type: type,
+			value: id
+		};
+	},
+	scanNumericLiteral: function () {
+		var index = 0;
+		var value = "";
+		var length = this.input.length;
+		var char = this.peek(index);
+		var bad;
+
+		function isDecimalDigit(str) {
+			return (/^[0-9]$/).test(str);
+		}
+
+		function isOctalDigit(str) {
+			return (/^[0-7]$/).test(str);
+		}
+
+		function isHexDigit(str) {
+			return (/^[0-9a-fA-F]$/).test(str);
+		}
+
+		function isIdentifierStart(ch) {
+			return (ch === "$") || (ch === "_") || (ch === "\\") ||
+				(ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
+		}
+
+		if (char !== "." && !isDecimalDigit(char)) {
+			return null;
+		}
+
+		if (char !== ".") {
+			value = this.peek(index);
+			index += 1;
+			char = this.peek(index);
+
+			if (value === "0") {
+				if (char === "x" || char === "X") {
+					index += 1;
+					value += char;
+
+					while (index < length) {
+						char = this.peek(index);
+						if (!isHexDigit(char)) {
+							break;
+						}
+						value += char;
+						index += 1;
+					}
+
+					if (value.length <= 2) { // 0x
+						return {
+							type: Token.NumericLiteral,
+							value: value,
+							isMalformed: true
+						};
+					}
+
+					if (index < length) {
+						char = this.peek(index);
+						if (isIdentifierStart(char)) {
+							return null;
+						}
+					}
+
+					return {
+						type: Token.NumericLiteral,
+						value: value,
+						base: 16,
+						isMalformed: false
+					};
+				}
+				if (isOctalDigit(char)) {
+					index += 1;
+					value += char;
+					bad = false;
+
+					while (index < length) {
+						char = this.peek(index);
+
+						if (isDecimalDigit(char)) {
+							bad = true;
+						} else if (!isOctalDigit(char)) {
+							break;
+						}
+						value += char;
+						index += 1;
+					}
+
+					if (index < length) {
+						char = this.peek(index);
+						if (isIdentifierStart(char)) {
+							return null;
+						}
+					}
+
+					return {
+						type: Token.NumericLiteral,
+						value: value,
+						base: 8,
+						isMalformed: false
+					};
+				}
+
+				if (isDecimalDigit(char)) {
+					index += 1;
+					value += char;
+				}
+			}
+
+			while (index < length) {
+				char = this.peek(index);
+				if (!isDecimalDigit(char)) {
+					break;
+				}
+				value += char;
+				index += 1;
+			}
+		}
+
+		if (char === ".") {
+			value += char;
+			index += 1;
+
+			while (index < length) {
+				char = this.peek(index);
+				if (!isDecimalDigit(char)) {
+					break;
+				}
+				value += char;
+				index += 1;
+			}
+		}
+
+		if (char === "e" || char === "E") {
+			value += char;
+			index += 1;
+			char = this.peek(index);
+
+			if (char === "+" || char === "-") {
+				value += this.peek(index);
+				index += 1;
+			}
+
+			char = this.peek(index);
+			if (isDecimalDigit(char)) {
+				value += char;
+				index += 1;
+
+				while (index < length) {
+					char = this.peek(index);
+					if (!isDecimalDigit(char)) {
+						break;
+					}
+					value += char;
+					index += 1;
+				}
+			} else {
+				return null;
+			}
+		}
+
+		if (index < length) {
+			char = this.peek(index);
+			if (isIdentifierStart(char)) {
+				return null;
+			}
+		}
+
+		return {
+			type: Token.NumericLiteral,
+			value: value,
+			base: 10,
+			isMalformed: !isFinite(value)
+		};
+	},
+	scanStringLiteral: function (checks) {
+		var quote = this.peek();
+		if (quote !== "\"" && quote !== "'") {
+			return null;
+		}
+		this.triggerAsync("warning", {
+			code: "W108",
+			line: this.line,
+			character: this.char // +1?
+		}, checks, function () { return state.jsonMode && quote !== "\""; });
+
+		var value = "";
+		var startLine = this.line;
+		var startChar = this.char;
+		var allowNewLine = false;
+
+		this.skip();
+
+		while (this.peek() !== quote) {
+			while (this.peek() === "") { // End Of Line
+
+				if (!allowNewLine) {
+					this.trigger("warning", {
+						code: "W112",
+						line: this.line,
+						character: this.char
+					});
+				} else {
+					allowNewLine = false;
+
+					this.triggerAsync("warning", {
+						code: "W043",
+						line: this.line,
+						character: this.char
+					}, checks, function () { return !state.option.multistr; });
+
+					this.triggerAsync("warning", {
+						code: "W042",
+						line: this.line,
+						character: this.char
+					}, checks, function () { return state.jsonMode && state.option.multistr; });
+				}
+
+				if (!this.nextLine()) {
+					this.trigger("error", {
+						code: "E029",
+						line: startLine,
+						character: startChar
+					});
+
+					return {
+						type: Token.StringLiteral,
+						value: value,
+						isUnclosed: true,
+						quote: quote
+					};
+				}
+			}
+
+			allowNewLine = false;
+			var char = this.peek();
+			var jump = 1; // A length of a jump, after we're done
+
+			if (char < " ") {
+				this.trigger("warning", {
+					code: "W113",
+					line: this.line,
+					character: this.char,
+					data: [ "<non-printable>" ]
+				});
+			}
+
+			if (char === "\\") {
+				this.skip();
+				char = this.peek();
+
+				switch (char) {
+				case "'":
+					this.triggerAsync("warning", {
+						code: "W114",
+						line: this.line,
+						character: this.char,
+						data: [ "\\'" ]
+					}, checks, function () {return state.jsonMode; });
+					break;
+				case "b":
+					char = "\b";
+					break;
+				case "f":
+					char = "\f";
+					break;
+				case "n":
+					char = "\n";
+					break;
+				case "r":
+					char = "\r";
+					break;
+				case "t":
+					char = "\t";
+					break;
+				case "0":
+					char = "\0";
+					var n = parseInt(this.peek(1), 10);
+					this.triggerAsync("warning", {
+						code: "W115",
+						line: this.line,
+						character: this.char
+					}, checks,
+					function () { return n >= 0 && n <= 7 && state.directive["use strict"]; });
+					break;
+				case "u":
+					char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16));
+					jump = 5;
+					break;
+				case "v":
+					this.triggerAsync("warning", {
+						code: "W114",
+						line: this.line,
+						character: this.char,
+						data: [ "\\v" ]
+					}, checks, function () { return state.jsonMode; });
+
+					char = "\v";
+					break;
+				case "x":
+					var	x = parseInt(this.input.substr(1, 2), 16);
+
+					this.triggerAsync("warning", {
+						code: "W114",
+						line: this.line,
+						character: this.char,
+						data: [ "\\x-" ]
+					}, checks, function () { return state.jsonMode; });
+
+					char = String.fromCharCode(x);
+					jump = 3;
+					break;
+				case "\\":
+				case "\"":
+				case "/":
+					break;
+				case "":
+					allowNewLine = true;
+					char = "";
+					break;
+				case "!":
+					if (value.slice(value.length - 2) === "<") {
+						break;
+					}
+				default:
+					this.trigger("warning", {
+						code: "W044",
+						line: this.line,
+						character: this.char
+					});
+				}
+			}
+
+			value += char;
+			this.skip(jump);
+		}
+
+		this.skip();
+		return {
+			type: Token.StringLiteral,
+			value: value,
+			isUnclosed: false,
+			quote: quote
+		};
+	},
+	scanRegExp: function () {
+		var index = 0;
+		var length = this.input.length;
+		var char = this.peek();
+		var value = char;
+		var body = "";
+		var flags = [];
+		var malformed = false;
+		var isCharSet = false;
+		var terminated;
+
+		var scanUnexpectedChars = function () {
+			if (char < " ") {
+				malformed = true;
+				this.trigger("warning", {
+					code: "W048",
+					line: this.line,
+					character: this.char
+				});
+			}
+			if (char === "<") {
+				malformed = true;
+				this.trigger("warning", {
+					code: "W049",
+					line: this.line,
+					character: this.char,
+					data: [ char ]
+				});
+			}
+		}.bind(this);
+		if (!this.prereg || char !== "/") {
+			return null;
+		}
+
+		index += 1;
+		terminated = false;
+
+		while (index < length) {
+			char = this.peek(index);
+			value += char;
+			body += char;
+
+			if (isCharSet) {
+				if (char === "]") {
+					if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
+						isCharSet = false;
+					}
+				}
+
+				if (char === "\\") {
+					index += 1;
+					char = this.peek(index);
+					body += char;
+					value += char;
+
+					scanUnexpectedChars();
+				}
+
+				index += 1;
+				continue;
+			}
+
+			if (char === "\\") {
+				index += 1;
+				char = this.peek(index);
+				body += char;
+				value += char;
+
+				scanUnexpectedChars();
+
+				if (char === "/") {
+					index += 1;
+					continue;
+				}
+
+				if (char === "[") {
+					index += 1;
+					continue;
+				}
+			}
+
+			if (char === "[") {
+				isCharSet = true;
+				index += 1;
+				continue;
+			}
+
+			if (char === "/") {
+				body = body.substr(0, body.length - 1);
+				terminated = true;
+				index += 1;
+				break;
+			}
+
+			index += 1;
+		}
+
+		if (!terminated) {
+			this.trigger("error", {
+				code: "E015",
+				line: this.line,
+				character: this.from
+			});
+
+			return void this.trigger("fatal", {
+				line: this.line,
+				from: this.from
+			});
+		}
+
+		while (index < length) {
+			char = this.peek(index);
+			if (!/[gim]/.test(char)) {
+				break;
+			}
+			flags.push(char);
+			value += char;
+			index += 1;
+		}
+
+		try {
+			new RegExp(body, flags.join(""));
+		} catch (err) {
+			malformed = true;
+			this.trigger("error", {
+				code: "E016",
+				line: this.line,
+				character: this.char,
+				data: [ err.message ] // Platform dependent!
+			});
+		}
+
+		return {
+			type: Token.RegExp,
+			value: value,
+			flags: flags,
+			isMalformed: malformed
+		};
+	},
+	scanMixedSpacesAndTabs: function () {
+		var at, match;
+
+		if (state.option.smarttabs) {
+			match = this.input.match(/(\/\/|^\s?\*)? \t/);
+			at = match && !match[1] ? 0 : -1;
+		} else {
+			at = this.input.search(/ \t|\t [^\*]/);
+		}
+
+		return at;
+	},
+	scanUnsafeChars: function () {
+		return this.input.search(reg.unsafeChars);
+	},
+	next: function (checks) {
+		this.from = this.char;
+		var start;
+		if (/\s/.test(this.peek())) {
+			start = this.char;
+
+			while (/\s/.test(this.peek())) {
+				this.from += 1;
+				this.skip();
+			}
+
+			if (this.peek() === "") { // EOL
+				if (!/^\s*$/.test(this.getLines()[this.line - 1]) && state.option.trailing) {
+					this.trigger("warning", { code: "W102", line: this.line, character: start });
+				}
+			}
+		}
+
+		var match = this.scanComments() ||
+			this.scanStringLiteral(checks);
+
+		if (match) {
+			return match;
+		}
+
+		match =
+			this.scanRegExp() ||
+			this.scanPunctuator() ||
+			this.scanKeyword() ||
+			this.scanIdentifier() ||
+			this.scanNumericLiteral();
+
+		if (match) {
+			this.skip(match.value.length);
+			return match;
+		}
+
+		return null;
+	},
+	nextLine: function () {
+		var char;
+
+		if (this.line >= this.getLines().length) {
+			return false;
+		}
+
+		this.input = this.getLines()[this.line];
+		this.line += 1;
+		this.char = 1;
+		this.from = 1;
+
+		char = this.scanMixedSpacesAndTabs();
+		if (char >= 0) {
+			this.trigger("warning", { code: "W099", line: this.line, character: char + 1 });
+		}
+
+		this.input = this.input.replace(/\t/g, state.tab);
+		char = this.scanUnsafeChars();
+
+		if (char >= 0) {
+			this.trigger("warning", { code: "W100", line: this.line, character: char });
+		}
+
+		if (state.option.maxlen && state.option.maxlen < this.input.length) {
+			this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
+		}
+
+		return true;
+	},
+	start: function () {
+		this.nextLine();
+	},
+	token: function () {
+		var checks = asyncTrigger();
+		var token;
+
+
+		function isReserved(token, isProperty) {
+			if (!token.reserved) {
+				return false;
+			}
+			var meta = token.meta;
+
+			if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+				if (!meta.es5) {
+					return false;
+				}
+				if (meta.strictOnly) {
+					if (!state.option.strict && !state.directive["use strict"]) {
+						return false;
+					}
+				}
+
+				if (isProperty) {
+					return false;
+				}
+			}
+
+			return true;
+		}
+		var create = function (type, value, isProperty) {
+			var obj;
+
+			if (type !== "(endline)" && type !== "(end)") {
+				this.prereg = false;
+			}
+
+			if (type === "(punctuator)") {
+				switch (value) {
+				case ".":
+				case ")":
+				case "~":
+				case "#":
+				case "]":
+					this.prereg = false;
+					break;
+				default:
+					this.prereg = true;
+				}
+
+				obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+			}
+
+			if (type === "(identifier)") {
+				if (value === "return" || value === "case" || value === "typeof") {
+					this.prereg = true;
+				}
+
+				if (_.has(state.syntax, value)) {
+					obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+					if (!isReserved(obj, isProperty && type === "(identifier)")) {
+						obj = null;
+					}
+				}
+			}
+
+			if (!obj) {
+				obj = Object.create(state.syntax[type]);
+			}
+
+			obj.identifier = (type === "(identifier)");
+			obj.type = obj.type || type;
+			obj.value = value;
+			obj.line = this.line;
+			obj.character = this.char;
+			obj.from = this.from;
+
+			if (isProperty && obj.identifier) {
+				obj.isProperty = isProperty;
+			}
+
+			obj.check = checks.check;
+
+			return obj;
+		}.bind(this);
+
+		for (;;) {
+			if (!this.input.length) {
+				return create(this.nextLine() ? "(endline)" : "(end)", "");
+			}
+
+			token = this.next(checks);
+
+			if (!token) {
+				if (this.input.length) {
+					this.trigger("error", {
+						code: "E024",
+						line: this.line,
+						character: this.char,
+						data: [ this.peek() ]
+					});
+
+					this.input = "";
+				}
+
+				continue;
+			}
+
+			switch (token.type) {
+			case Token.StringLiteral:
+				this.triggerAsync("String", {
+					line: this.line,
+					char: this.char,
+					from: this.from,
+					value: token.value,
+					quote: token.quote
+				}, checks, function () { return true; });
+
+				return create("(string)", token.value);
+			case Token.Identifier:
+				this.trigger("Identifier", {
+					line: this.line,
+					char: this.char,
+					from: this.form,
+					name: token.value,
+					isProperty: state.tokens.curr.id === "."
+				});
+			case Token.Keyword:
+			case Token.NullLiteral:
+			case Token.BooleanLiteral:
+				return create("(identifier)", token.value, state.tokens.curr.id === ".");
+
+			case Token.NumericLiteral:
+				if (token.isMalformed) {
+					this.trigger("warning", {
+						code: "W045",
+						line: this.line,
+						character: this.char,
+						data: [ token.value ]
+					});
+				}
+
+				this.triggerAsync("warning", {
+					code: "W114",
+					line: this.line,
+					character: this.char,
+					data: [ "0x-" ]
+				}, checks, function () { return token.base === 16 && state.jsonMode; });
+
+				this.triggerAsync("warning", {
+					code: "W115",
+					line: this.line,
+					character: this.char
+				}, checks, function () {
+					return state.directive["use strict"] && token.base === 8; 
+				});
+
+				this.trigger("Number", {
+					line: this.line,
+					char: this.char,
+					from: this.from,
+					value: token.value,
+					base: token.base,
+					isMalformed: token.malformed
+				});
+
+				return create("(number)", token.value);
+
+			case Token.RegExp:
+				return create("(regexp)", token.value);
+
+			case Token.Comment:
+				state.tokens.curr.comment = true;
+
+				if (token.isSpecial) {
+					return {
+						value: token.value,
+						body: token.body,
+						type: token.commentType,
+						isSpecial: token.isSpecial,
+						line: this.line,
+						character: this.char,
+						from: this.from
+					};
+				}
+
+				break;
+
+			case "":
+				break;
+
+			default:
+				return create("(punctuator)", token.value);
+			}
+		}
+	}
+};
+
+exports.Lexer = Lexer;
+
+},
+{"./reg.js":6,"./state.js":7,"events":10,"underscore":1}],
+6:[function(req,module,exports){
+
+"use string";
+exports.unsafeString =
+	/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
+exports.unsafeChars =
+	/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+exports.needEsc =
+	/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+
+exports.needEscGlobal =
+	/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+exports.starSlash = /\*\//;
+exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
+exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
+exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/;
+
+},
+{}],
+7:[function(req,module,exports){
+
+
+var state = {
+	syntax: {},
+
+	reset: function () {
+		this.tokens = {
+			prev: null,
+			next: null,
+			curr: null
+		};
+
+		this.option = {};
+		this.ignored = {};
+		this.directive = {};
+		this.jsonMode = false;
+		this.jsonWarnings = [];
+		this.lines = [];
+		this.tab = "";
+		this.cache = {}; // Node.JS doesn't have Map. Sniff.
+	}
+};
+
+exports.state = state;
+
+},
+{}],
+8:[function(req,module,exports){
+
+
+exports.register = function (linter) {
+
+	linter.on("Identifier", function style_scanProto(data) {
+		if (linter.getOption("proto")) {
+			return;
+		}
+
+		if (data.name === "__proto__") {
+			linter.warn("W103", {
+				line: data.line,
+				char: data.char,
+				data: [ data.name ]
+			});
+		}
+	});
+
+	linter.on("Identifier", function style_scanIterator(data) {
+		if (linter.getOption("iterator")) {
+			return;
+		}
+
+		if (data.name === "__iterator__") {
+			linter.warn("W104", {
+				line: data.line,
+				char: data.char,
+				data: [ data.name ]
+			});
+		}
+	});
+
+	linter.on("Identifier", function style_scanDangling(data) {
+		if (!linter.getOption("nomen")) {
+			return;
+		}
+		if (data.name === "_") {
+			return;
+		}
+		if (linter.getOption("node")) {
+			if (/^(__dirname|__filename)$/.test(data.name) && !data.isProperty) {
+				return;
+			}
+		}
+
+		if (/^(_+.*|.*_+)$/.test(data.name)) {
+			linter.warn("W105", {
+				line: data.line,
+				char: data.from,
+				data: [ "dangling '_'", data.name ]
+			});
+		}
+	});
+
+	linter.on("Identifier", function style_scanCamelCase(data) {
+		if (!linter.getOption("camelcase")) {
+			return;
+		}
+
+		if (data.name.replace(/^_+/, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
+			linter.warn("W106", {
+				line: data.line,
+				char: data.from,
+				data: [ data.name ]
+			});
+		}
+	});
+
+	linter.on("String", function style_scanQuotes(data) {
+		var quotmark = linter.getOption("quotmark");
+		var code;
+
+		if (!quotmark) {
+			return;
+		}
+
+		if (quotmark === "single" && data.quote !== "'") {
+			code = "W109";
+		}
+
+		if (quotmark === "double" && data.quote !== "\"") {
+			code = "W108";
+		}
+
+		if (quotmark === true) {
+			if (!linter.getCache("quotmark")) {
+				linter.setCache("quotmark", data.quote);
+			}
+
+			if (linter.getCache("quotmark") !== data.quote) {
+				code = "W110";
+			}
+		}
+
+		if (code) {
+			linter.warn(code, {
+				line: data.line,
+				char: data.char,
+			});
+		}
+	});
+
+	linter.on("Number", function style_scanNumbers(data) {
+		if (data.value.charAt(0) === ".") {
+			linter.warn("W008", {
+				line: data.line,
+				char: data.char,
+				data: [ data.value ]
+			});
+		}
+
+		if (data.value.substr(data.value.length - 1) === ".") {
+			linter.warn("W047", {
+				line: data.line,
+				char: data.char,
+				data: [ data.value ]
+			});
+		}
+
+		if (/^00+/.test(data.value)) {
+			linter.warn("W046", {
+				line: data.line,
+				char: data.char,
+				data: [ data.value ]
+			});
+		}
+	});
+
+	linter.on("String", function style_scanJavaScriptURLs(data) {
+		var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
+
+		if (linter.getOption("scripturl")) {
+			return;
+		}
+
+		if (re.test(data.value)) {
+			linter.warn("W107", {
+				line: data.line,
+				char: data.char
+			});
+		}
+	});
+};
+},
+{}],
+9:[function(req,module,exports){
+
+},
+{}],
+10:[function(req,module,exports){
+var process=req("__browserify_process");if (!process.EventEmitter) process.EventEmitter = function () {};
+
+var EventEmitter = exports.EventEmitter = process.EventEmitter;
+var isArray = typeof Array.isArray === 'function'
+    ? Array.isArray
+    : function (xs) {
+        return Object.prototype.toString.call(xs) === '[object Array]'
+    }
+;
+function indexOf (xs, x) {
+    if (xs.indexOf) return xs.indexOf(x);
+    for (var i = 0; i < xs.length; i++) {
+        if (x === xs[i]) return i;
+    }
+    return -1;
+}
+var defaultMaxListeners = 200;
+EventEmitter.prototype.setMaxListeners = function(n) {
+  if (!this._events) this._events = {};
+  this._events.maxListeners = n;
+};
+
+
+EventEmitter.prototype.emit = function(type) {
+  if (type === 'error') {
+    if (!this._events || !this._events.error ||
+        (isArray(this._events.error) && !this._events.error.length))
+    {
+      if (arguments[1] instanceof Error) {
+        throw arguments[1]; // Unhandled 'error' event
+      } else {
+        throw new Error("Uncaught, unspecified 'error' event.");
+      }
+      return false;
+    }
+  }
+
+  if (!this._events) return false;
+  var handler = this._events[type];
+  if (!handler) return false;
+
+  if (typeof handler == 'function') {
+    switch (arguments.length) {
+      case 1:
+        handler.call(this);
+        break;
+      case 2:
+        handler.call(this, arguments[1]);
+        break;
+      case 3:
+        handler.call(this, arguments[1], arguments[2]);
+        break;
+      default:
+        var args = Array.prototype.slice.call(arguments, 1);
+        handler.apply(this, args);
+    }
+    return true;
+
+  } else if (isArray(handler)) {
+    var args = Array.prototype.slice.call(arguments, 1);
+
+    var listeners = handler.slice();
+    for (var i = 0, l = listeners.length; i < l; i++) {
+      listeners[i].apply(this, args);
+    }
+    return true;
+
+  } else {
+    return false;
+  }
+};
+EventEmitter.prototype.addListener = function(type, listener) {
+  if ('function' !== typeof listener) {
+    throw new Error('addListener only takes instances of Function');
+  }
+
+  if (!this._events) this._events = {};
+  this.emit('newListener', type, listener);
+
+  if (!this._events[type]) {
+    this._events[type] = listener;
+  } else if (isArray(this._events[type])) {
+    if (!this._events[type].warned) {
+      var m;
+      if (this._events.maxListeners !== undefined) {
+        m = this._events.maxListeners;
+      } else {
+        m = defaultMaxListeners;
+      }
+
+      if (m && m > 0 && this._events[type].length > m) {
+        this._events[type].warned = true;
+        console.error('(node) warning: possible EventEmitter memory ' +
+                      'leak detected. %d listeners added. ' +
+                      'Use emitter.setMaxListeners() to increase limit.',
+                      this._events[type].length);
+        console.trace();
+      }
+    }
+    this._events[type].push(listener);
+  } else {
+    this._events[type] = [this._events[type], listener];
+  }
+
+  return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+  var self = this;
+  self.on(type, function g() {
+    self.removeListener(type, g);
+    listener.apply(this, arguments);
+  });
+
+  return this;
+};
+
+EventEmitter.prototype.removeListener = function(type, listener) {
+  if ('function' !== typeof listener) {
+    throw new Error('removeListener only takes instances of Function');
+  }
+  if (!this._events || !this._events[type]) return this;
+
+  var list = this._events[type];
+
+  if (isArray(list)) {
+    var i = indexOf(list, listener);
+    if (i < 0) return this;
+    list.splice(i, 1);
+    if (list.length == 0)
+      delete this._events[type];
+  } else if (this._events[type] === listener) {
+    delete this._events[type];
+  }
+
+  return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+  if (arguments.length === 0) {
+    this._events = {};
+    return this;
+  }
+  if (type && this._events && this._events[type]) this._events[type] = null;
+  return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+  if (!this._events) this._events = {};
+  if (!this._events[type]) this._events[type] = [];
+  if (!isArray(this._events[type])) {
+    this._events[type] = [this._events[type]];
+  }
+  return this._events[type];
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+  var ret;
+  if (!emitter._events || !emitter._events[type])
+    ret = 0;
+  else if (typeof emitter._events[type] === 'function')
+    ret = 1;
+  else
+    ret = emitter._events[type].length;
+  return ret;
+};
+
+},
+{"__browserify_process":11}],
+11:[function(req,module,exports){
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+    var canSetImmediate = typeof window !== 'undefined'
+    && window.setImmediate;
+    var canPost = typeof window !== 'undefined'
+    && window.postMessage && window.addEventListener
+    ;
+
+    if (canSetImmediate) {
+        return function (f) { return window.setImmediate(f) };
+    }
+
+    if (canPost) {
+        var queue = [];
+        window.addEventListener('message', function (ev) {
+            if (ev.source === window && ev.data === 'process-tick') {
+                ev.stopPropagation();
+                if (queue.length > 0) {
+                    var fn = queue.shift();
+                    fn();
+                }
+            }
+        }, true);
+
+        return function nextTick(fn) {
+            queue.push(fn);
+            window.postMessage('process-tick', '*');
+        };
+    }
+
+    return function nextTick(fn) {
+        setTimeout(fn, 0);
+    };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+process.binding = function (name) {
+    throw new Error('process.binding is not supported');
+}
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+    throw new Error('process.chdir is not supported');
+};
+
+},
+{}],
+"jshint":[function(req,module,exports){
+module.exports=req('n4bKNg');
+},
+{}]},{},["n4bKNg"])
+;
+
+function req() {return require.apply(this, arguments)}
+module.exports = req("jshint");
+
+});
\ No newline at end of file
diff --git a/fauxton/js/ace/worker-json.js b/fauxton/js/ace/worker-json.js
new file mode 100644
index 0000000..607221f
--- /dev/null
+++ b/fauxton/js/ace/worker-json.js
@@ -0,0 +1,2271 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document) {
+    return;
+}
+
+window.console = function() {
+    var msgs = Array.prototype.slice.call(arguments, 0);
+    postMessage({type: "log", data: msgs});
+};
+window.console.error =
+window.console.warn = 
+window.console.log =
+window.console.trace = window.console;
+
+window.window = window;
+window.ace = window;
+
+window.normalizeModule = function(parentId, moduleName) {
+    if (moduleName.indexOf("!") !== -1) {
+        var chunks = moduleName.split("!");
+        return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+    }
+    if (moduleName.charAt(0) == ".") {
+        var base = parentId.split("/").slice(0, -1).join("/");
+        moduleName = (base ? base + "/" : "") + moduleName;
+        
+        while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+            var previous = moduleName;
+            moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+        }
+    }
+    
+    return moduleName;
+};
+
+window.require = function(parentId, id) {
+    if (!id) {
+        id = parentId
+        parentId = null;
+    }
+    if (!id.charAt)
+        throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+    id = window.normalizeModule(parentId, id);
+
+    var module = window.require.modules[id];
+    if (module) {
+        if (!module.initialized) {
+            module.initialized = true;
+            module.exports = module.factory().exports;
+        }
+        return module.exports;
+    }
+    
+    var chunks = id.split("/");
+    if (!window.require.tlns)
+        return console.log("unable to load " + id);
+    chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
+    var path = chunks.join("/") + ".js";
+    
+    window.require.id = id;
+    importScripts(path);
+    return window.require(parentId, id);
+};
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+    if (arguments.length == 2) {
+        factory = deps;
+        if (typeof id != "string") {
+            deps = id;
+            id = window.require.id;
+        }
+    } else if (arguments.length == 1) {
+        factory = id;
+        deps = []
+        id = window.require.id;
+    }
+
+    if (!deps.length)
+        deps = ['require', 'exports', 'module']
+
+    if (id.indexOf("text!") === 0) 
+        return;
+    
+    var req = function(childId) {
+        return window.require(id, childId);
+    };
+
+    window.require.modules[id] = {
+        exports: {},
+        factory: function() {
+            var module = this;
+            var returnExports = factory.apply(this, deps.map(function(dep) {
+              switch(dep) {
+                  case 'require': return req
+                  case 'exports': return module.exports
+                  case 'module':  return module
+                  default:        return req(dep)
+              }
+            }));
+            if (returnExports)
+                module.exports = returnExports;
+            return module;
+        }
+    };
+};
+window.define.amd = {}
+
+window.initBaseUrls  = function initBaseUrls(topLevelNamespaces) {
+    require.tlns = topLevelNamespaces;
+}
+
+window.initSender = function initSender() {
+
+    var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+    var oop = window.require("ace/lib/oop");
+    
+    var Sender = function() {};
+    
+    (function() {
+        
+        oop.implement(this, EventEmitter);
+                
+        this.callback = function(data, callbackId) {
+            postMessage({
+                type: "call",
+                id: callbackId,
+                data: data
+            });
+        };
+    
+        this.emit = function(name, data) {
+            postMessage({
+                type: "event",
+                name: name,
+                data: data
+            });
+        };
+        
+    }).call(Sender.prototype);
+    
+    return new Sender();
+}
+
+window.main = null;
+window.sender = null;
+
+window.onmessage = function(e) {
+    var msg = e.data;
+    if (msg.command) {
+        if (main[msg.command])
+            main[msg.command].apply(main, msg.args);
+        else
+            throw new Error("Unknown command:" + msg.command);
+    }
+    else if (msg.init) {        
+        initBaseUrls(msg.tlns);
+        require("ace/lib/es5-shim");
+        sender = initSender();
+        var clazz = require(msg.module)[msg.classname];
+        main = new clazz(sender);
+    } 
+    else if (msg.event && sender) {
+        sender._emit(msg.event, msg.data);
+    }
+};
+})(this);// https://github.com/kriskowal/es5-shim
+
+define('ace/lib/es5-shim', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+    Function.prototype.bind = function bind(that) { // .length is 1
+        var target = this;
+        if (typeof target != "function") {
+            throw new TypeError("Function.prototype.bind called on incompatible " + target);
+        }
+        var args = slice.call(arguments, 1); // for normal call
+        var bound = function () {
+
+            if (this instanceof bound) {
+
+                var result = target.apply(
+                    this,
+                    args.concat(slice.call(arguments))
+                );
+                if (Object(result) === result) {
+                    return result;
+                }
+                return this;
+
+            } else {
+                return target.apply(
+                    that,
+                    args.concat(slice.call(arguments))
+                );
+
+            }
+
+        };
+        if(target.prototype) {
+            Empty.prototype = target.prototype;
+            bound.prototype = new Empty();
+            Empty.prototype = null;
+        }
+        return bound;
+    };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+    defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+    defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+    lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+    lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+    if(function() { // test IE < 9 to splice bug - see issue #138
+        function makeArray(l) {
+            var a = new Array(l+2);
+            a[0] = a[1] = 0;
+            return a;
+        }
+        var array = [], lengthBefore;
+        
+        array.splice.apply(array, makeArray(20));
+        array.splice.apply(array, makeArray(26));
+
+        lengthBefore = array.length; //46
+        array.splice(5, 0, "XXX"); // add one element
+
+        lengthBefore + 1 == array.length
+
+        if (lengthBefore + 1 == array.length) {
+            return true;// has right splice implementation without bugs
+        }
+    }()) {//IE 6/7
+        var array_splice = Array.prototype.splice;
+        Array.prototype.splice = function(start, deleteCount) {
+            if (!arguments.length) {
+                return [];
+            } else {
+                return array_splice.apply(this, [
+                    start === void 0 ? 0 : start,
+                    deleteCount === void 0 ? (this.length - start) : deleteCount
+                ].concat(slice.call(arguments, 2)))
+            }
+        };
+    } else {//IE8
+        Array.prototype.splice = function(pos, removeCount){
+            var length = this.length;
+            if (pos > 0) {
+                if (pos > length)
+                    pos = length;
+            } else if (pos == void 0) {
+                pos = 0;
+            } else if (pos < 0) {
+                pos = Math.max(length + pos, 0);
+            }
+
+            if (!(pos+removeCount < length))
+                removeCount = length - pos;
+
+            var removed = this.slice(pos, pos+removeCount);
+            var insert = slice.call(arguments, 2);
+            var add = insert.length;            
+            if (pos === length) {
+                if (add) {
+                    this.push.apply(this, insert);
+                }
+            } else {
+                var remove = Math.min(removeCount, length - pos);
+                var tailOldPos = pos + remove;
+                var tailNewPos = tailOldPos + add - remove;
+                var tailCount = length - tailOldPos;
+                var lengthAfterRemove = length - remove;
+
+                if (tailNewPos < tailOldPos) { // case A
+                    for (var i = 0; i < tailCount; ++i) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } else if (tailNewPos > tailOldPos) { // case B
+                    for (i = tailCount; i--; ) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } // else, add == remove (nothing to do)
+
+                if (add && pos === lengthAfterRemove) {
+                    this.length = lengthAfterRemove; // truncate array
+                    this.push.apply(this, insert);
+                } else {
+                    this.length = lengthAfterRemove + add; // reserves space
+                    for (i = 0; i < add; ++i) {
+                        this[pos+i] = insert[i];
+                    }
+                }
+            }
+            return removed;
+        };
+    }
+}
+if (!Array.isArray) {
+    Array.isArray = function isArray(obj) {
+        return _toString(obj) == "[object Array]";
+    };
+}
+var boxedString = Object("a"),
+    splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+    Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            thisp = arguments[1],
+            i = -1,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(); // TODO message
+        }
+
+        while (++i < length) {
+            if (i in self) {
+                fun.call(thisp, self[i], i, object);
+            }
+        }
+    };
+}
+if (!Array.prototype.map) {
+    Array.prototype.map = function map(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            result = Array(length),
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self)
+                result[i] = fun.call(thisp, self[i], i, object);
+        }
+        return result;
+    };
+}
+if (!Array.prototype.filter) {
+    Array.prototype.filter = function filter(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                    object,
+            length = self.length >>> 0,
+            result = [],
+            value,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self) {
+                value = self[i];
+                if (fun.call(thisp, value, i, object)) {
+                    result.push(value);
+                }
+            }
+        }
+        return result;
+    };
+}
+if (!Array.prototype.every) {
+    Array.prototype.every = function every(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && !fun.call(thisp, self[i], i, object)) {
+                return false;
+            }
+        }
+        return true;
+    };
+}
+if (!Array.prototype.some) {
+    Array.prototype.some = function some(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && fun.call(thisp, self[i], i, object)) {
+                return true;
+            }
+        }
+        return false;
+    };
+}
+if (!Array.prototype.reduce) {
+    Array.prototype.reduce = function reduce(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduce of empty array with no initial value");
+        }
+
+        var i = 0;
+        var result;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i++];
+                    break;
+                }
+                if (++i >= length) {
+                    throw new TypeError("reduce of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        for (; i < length; i++) {
+            if (i in self) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        }
+
+        return result;
+    };
+}
+if (!Array.prototype.reduceRight) {
+    Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduceRight of empty array with no initial value");
+        }
+
+        var result, i = length - 1;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i--];
+                    break;
+                }
+                if (--i < 0) {
+                    throw new TypeError("reduceRight of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        do {
+            if (i in this) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        } while (i--);
+
+        return result;
+    };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+    Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+
+        var i = 0;
+        if (arguments.length > 1) {
+            i = toInteger(arguments[1]);
+        }
+        i = i >= 0 ? i : Math.max(0, length + i);
+        for (; i < length; i++) {
+            if (i in self && self[i] === sought) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+    Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+        var i = length - 1;
+        if (arguments.length > 1) {
+            i = Math.min(i, toInteger(arguments[1]));
+        }
+        i = i >= 0 ? i : length - Math.abs(i);
+        for (; i >= 0; i--) {
+            if (i in self && sought === self[i]) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Object.getPrototypeOf) {
+    Object.getPrototypeOf = function getPrototypeOf(object) {
+        return object.__proto__ || (
+            object.constructor ?
+            object.constructor.prototype :
+            prototypeOfObject
+        );
+    };
+}
+if (!Object.getOwnPropertyDescriptor) {
+    var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+                         "non-object: ";
+    Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT + object);
+        if (!owns(object, property))
+            return;
+
+        var descriptor, getter, setter;
+        descriptor =  { enumerable: true, configurable: true };
+        if (supportsAccessors) {
+            var prototype = object.__proto__;
+            object.__proto__ = prototypeOfObject;
+
+            var getter = lookupGetter(object, property);
+            var setter = lookupSetter(object, property);
+            object.__proto__ = prototype;
+
+            if (getter || setter) {
+                if (getter) descriptor.get = getter;
+                if (setter) descriptor.set = setter;
+                return descriptor;
+            }
+        }
+        descriptor.value = object[property];
+        return descriptor;
+    };
+}
+if (!Object.getOwnPropertyNames) {
+    Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+        return Object.keys(object);
+    };
+}
+if (!Object.create) {
+    var createEmpty;
+    if (Object.prototype.__proto__ === null) {
+        createEmpty = function () {
+            return { "__proto__": null };
+        };
+    } else {
+        createEmpty = function () {
+            var empty = {};
+            for (var i in empty)
+                empty[i] = null;
+            empty.constructor =
+            empty.hasOwnProperty =
+            empty.propertyIsEnumerable =
+            empty.isPrototypeOf =
+            empty.toLocaleString =
+            empty.toString =
+            empty.valueOf =
+            empty.__proto__ = null;
+            return empty;
+        }
+    }
+
+    Object.create = function create(prototype, properties) {
+        var object;
+        if (prototype === null) {
+            object = createEmpty();
+        } else {
+            if (typeof prototype != "object")
+                throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+            var Type = function () {};
+            Type.prototype = prototype;
+            object = new Type();
+            object.__proto__ = prototype;
+        }
+        if (properties !== void 0)
+            Object.defineProperties(object, properties);
+        return object;
+    };
+}
+
+function doesDefinePropertyWork(object) {
+    try {
+        Object.defineProperty(object, "sentinel", {});
+        return "sentinel" in object;
+    } catch (exception) {
+    }
+}
+if (Object.defineProperty) {
+    var definePropertyWorksOnObject = doesDefinePropertyWork({});
+    var definePropertyWorksOnDom = typeof document == "undefined" ||
+        doesDefinePropertyWork(document.createElement("div"));
+    if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+        var definePropertyFallback = Object.defineProperty;
+    }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+    var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+    var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+    var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+                                      "on this javascript engine";
+
+    Object.defineProperty = function defineProperty(object, property, descriptor) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+        if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+            throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+        if (definePropertyFallback) {
+            try {
+                return definePropertyFallback.call(Object, object, property, descriptor);
+            } catch (exception) {
+            }
+        }
+        if (owns(descriptor, "value")) {
+
+            if (supportsAccessors && (lookupGetter(object, property) ||
+                                      lookupSetter(object, property)))
+            {
+                var prototype = object.__proto__;
+                object.__proto__ = prototypeOfObject;
+                delete object[property];
+                object[property] = descriptor.value;
+                object.__proto__ = prototype;
+            } else {
+                object[property] = descriptor.value;
+            }
+        } else {
+            if (!supportsAccessors)
+                throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+            if (owns(descriptor, "get"))
+                defineGetter(object, property, descriptor.get);
+            if (owns(descriptor, "set"))
+                defineSetter(object, property, descriptor.set);
+        }
+
+        return object;
+    };
+}
+if (!Object.defineProperties) {
+    Object.defineProperties = function defineProperties(object, properties) {
+        for (var property in properties) {
+            if (owns(properties, property))
+                Object.defineProperty(object, property, properties[property]);
+        }
+        return object;
+    };
+}
+if (!Object.seal) {
+    Object.seal = function seal(object) {
+        return object;
+    };
+}
+if (!Object.freeze) {
+    Object.freeze = function freeze(object) {
+        return object;
+    };
+}
+try {
+    Object.freeze(function () {});
+} catch (exception) {
+    Object.freeze = (function freeze(freezeObject) {
+        return function freeze(object) {
+            if (typeof object == "function") {
+                return object;
+            } else {
+                return freezeObject(object);
+            }
+        };
+    })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+    Object.preventExtensions = function preventExtensions(object) {
+        return object;
+    };
+}
+if (!Object.isSealed) {
+    Object.isSealed = function isSealed(object) {
+        return false;
+    };
+}
+if (!Object.isFrozen) {
+    Object.isFrozen = function isFrozen(object) {
+        return false;
+    };
+}
+if (!Object.isExtensible) {
+    Object.isExtensible = function isExtensible(object) {
+        if (Object(object) === object) {
+            throw new TypeError(); // TODO message
+        }
+        var name = '';
+        while (owns(object, name)) {
+            name += '?';
+        }
+        object[name] = true;
+        var returnValue = owns(object, name);
+        delete object[name];
+        return returnValue;
+    };
+}
+if (!Object.keys) {
+    var hasDontEnumBug = true,
+        dontEnums = [
+            "toString",
+            "toLocaleString",
+            "valueOf",
+            "hasOwnProperty",
+            "isPrototypeOf",
+            "propertyIsEnumerable",
+            "constructor"
+        ],
+        dontEnumsLength = dontEnums.length;
+
+    for (var key in {"toString": null}) {
+        hasDontEnumBug = false;
+    }
+
+    Object.keys = function keys(object) {
+
+        if (
+            (typeof object != "object" && typeof object != "function") ||
+            object === null
+        ) {
+            throw new TypeError("Object.keys called on a non-object");
+        }
+
+        var keys = [];
+        for (var name in object) {
+            if (owns(object, name)) {
+                keys.push(name);
+            }
+        }
+
+        if (hasDontEnumBug) {
+            for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+                var dontEnum = dontEnums[i];
+                if (owns(object, dontEnum)) {
+                    keys.push(dontEnum);
+                }
+            }
+        }
+        return keys;
+    };
+
+}
+if (!Date.now) {
+    Date.now = function now() {
+        return new Date().getTime();
+    };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+    "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+    "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+    ws = "[" + ws + "]";
+    var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+        trimEndRegexp = new RegExp(ws + ws + "*$");
+    String.prototype.trim = function trim() {
+        return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+    };
+}
+
+function toInteger(n) {
+    n = +n;
+    if (n !== n) { // isNaN
+        n = 0;
+    } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+        n = (n > 0 || -1) * Math.floor(Math.abs(n));
+    }
+    return n;
+}
+
+function isPrimitive(input) {
+    var type = typeof input;
+    return (
+        input === null ||
+        type === "undefined" ||
+        type === "boolean" ||
+        type === "number" ||
+        type === "string"
+    );
+}
+
+function toPrimitive(input) {
+    var val, valueOf, toString;
+    if (isPrimitive(input)) {
+        return input;
+    }
+    valueOf = input.valueOf;
+    if (typeof valueOf === "function") {
+        val = valueOf.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    toString = input.toString;
+    if (typeof toString === "function") {
+        val = toString.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    throw new TypeError();
+}
+var toObject = function (o) {
+    if (o == null) { // this matches both null and undefined
+        throw new TypeError("can't convert "+o+" to object");
+    }
+    return Object(o);
+};
+
+});
+
+define('ace/mode/json_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/mode/json/json_parse'], function(require, exports, module) {
+
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var parse = require("./json/json_parse");
+
+var JsonWorker = exports.JsonWorker = function(sender) {
+    Mirror.call(this, sender);
+    this.setTimeout(200);
+};
+
+oop.inherits(JsonWorker, Mirror);
+
+(function() {
+
+    this.onUpdate = function() {
+        var value = this.doc.getValue();
+
+        try {
+            var result = parse(value);
+        } catch (e) {
+            var pos = this.doc.indexToPosition(e.at-1);
+            this.sender.emit("error", {
+                row: pos.row,
+                column: pos.column,
+                text: e.message,
+                type: "error"
+            });
+            return;
+        }
+        this.sender.emit("ok");
+    };
+
+}).call(JsonWorker.prototype);
+
+});
+
+define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.inherits = (function() {
+    var tempCtor = function() {};
+    return function(ctor, superCtor) {
+        tempCtor.prototype = superCtor.prototype;
+        ctor.super_ = superCtor.prototype;
+        ctor.prototype = new tempCtor();
+        ctor.prototype.constructor = ctor;
+    };
+}());
+
+exports.mixin = function(obj, mixin) {
+    for (var key in mixin) {
+        obj[key] = mixin[key];
+    }
+    return obj;
+};
+
+exports.implement = function(proto, mixin) {
+    exports.mixin(proto, mixin);
+};
+
+});
+define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
+
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+    
+var Mirror = exports.Mirror = function(sender) {
+    this.sender = sender;
+    var doc = this.doc = new Document("");
+    
+    var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+    
+    var _self = this;
+    sender.on("change", function(e) {
+        doc.applyDeltas(e.data);
+        deferredUpdate.schedule(_self.$timeout);
+    });
+};
+
+(function() {
+    
+    this.$timeout = 500;
+    
+    this.setTimeout = function(timeout) {
+        this.$timeout = timeout;
+    };
+    
+    this.setValue = function(value) {
+        this.doc.setValue(value);
+        this.deferredUpdate.schedule(this.$timeout);
+    };
+    
+    this.getValue = function(callbackId) {
+        this.sender.callback(this.doc.getValue(), callbackId);
+    };
+    
+    this.onUpdate = function() {
+    };
+    
+}).call(Mirror.prototype);
+
+});
+
+define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(text) {
+    this.$lines = [];
+    if (text.length == 0) {
+        this.$lines = [""];
+    } else if (Array.isArray(text)) {
+        this._insertLines(0, text);
+    } else {
+        this.insert({row: 0, column:0}, text);
+    }
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.setValue = function(text) {
+        var len = this.getLength();
+        this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+        this.insert({row: 0, column:0}, text);
+    };
+    this.getValue = function() {
+        return this.getAllLines().join(this.getNewLineCharacter());
+    };
+    this.createAnchor = function(row, column) {
+        return new Anchor(this, row, column);
+    };
+    if ("aaa".split(/a/).length == 0)
+        this.$split = function(text) {
+            return text.replace(/\r\n|\r/g, "\n").split("\n");
+        }
+    else
+        this.$split = function(text) {
+            return text.split(/\r\n|\r|\n/);
+        };
+
+
+    this.$detectNewLine = function(text) {
+        var match = text.match(/^.*?(\r\n|\r|\n)/m);
+        this.$autoNewLine = match ? match[1] : "\n";
+    };
+    this.getNewLineCharacter = function() {
+        switch (this.$newLineMode) {
+          case "windows":
+            return "\r\n";
+          case "unix":
+            return "\n";
+          default:
+            return this.$autoNewLine;
+        }
+    };
+
+    this.$autoNewLine = "\n";
+    this.$newLineMode = "auto";
+    this.setNewLineMode = function(newLineMode) {
+        if (this.$newLineMode === newLineMode)
+            return;
+
+        this.$newLineMode = newLineMode;
+    };
+    this.getNewLineMode = function() {
+        return this.$newLineMode;
+    };
+    this.isNewLine = function(text) {
+        return (text == "\r\n" || text == "\r" || text == "\n");
+    };
+    this.getLine = function(row) {
+        return this.$lines[row] || "";
+    };
+    this.getLines = function(firstRow, lastRow) {
+        return this.$lines.slice(firstRow, lastRow + 1);
+    };
+    this.getAllLines = function() {
+        return this.getLines(0, this.getLength());
+    };
+    this.getLength = function() {
+        return this.$lines.length;
+    };
+    this.getTextRange = function(range) {
+        if (range.start.row == range.end.row) {
+            return this.getLine(range.start.row)
+                .substring(range.start.column, range.end.column);
+        }
+        var lines = this.getLines(range.start.row, range.end.row);
+        lines[0] = (lines[0] || "").substring(range.start.column);
+        var l = lines.length - 1;
+        if (range.end.row - range.start.row == l)
+            lines[l] = lines[l].substring(0, range.end.column);
+        return lines.join(this.getNewLineCharacter());
+    };
+
+    this.$clipPosition = function(position) {
+        var length = this.getLength();
+        if (position.row >= length) {
+            position.row = Math.max(0, length - 1);
+            position.column = this.getLine(length-1).length;
+        } else if (position.row < 0)
+            position.row = 0;
+        return position;
+    };
+    this.insert = function(position, text) {
+        if (!text || text.length === 0)
+            return position;
+
+        position = this.$clipPosition(position);
+        if (this.getLength() <= 1)
+            this.$detectNewLine(text);
+
+        var lines = this.$split(text);
+        var firstLine = lines.splice(0, 1)[0];
+        var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+        position = this.insertInLine(position, firstLine);
+        if (lastLine !== null) {
+            position = this.insertNewLine(position); // terminate first line
+            position = this._insertLines(position.row, lines);
+            position = this.insertInLine(position, lastLine || "");
+        }
+        return position;
+    };
+    this.insertLines = function(row, lines) {
+        if (row >= this.getLength())
+            return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+        return this._insertLines(Math.max(row, 0), lines);
+    };
+    this._insertLines = function(row, lines) {
+        if (lines.length == 0)
+            return {row: row, column: 0};
+        if (lines.length > 0xFFFF) {
+            var end = this._insertLines(row, lines.slice(0xFFFF));
+            lines = lines.slice(0, 0xFFFF);
+        }
+
+        var args = [row, 0];
+        args.push.apply(args, lines);
+        this.$lines.splice.apply(this.$lines, args);
+
+        var range = new Range(row, 0, row + lines.length, 0);
+        var delta = {
+            action: "insertLines",
+            range: range,
+            lines: lines
+        };
+        this._emit("change", { data: delta });
+        return end || range.end;
+    };
+    this.insertNewLine = function(position) {
+        position = this.$clipPosition(position);
+        var line = this.$lines[position.row] || "";
+
+        this.$lines[position.row] = line.substring(0, position.column);
+        this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+        var end = {
+            row : position.row + 1,
+            column : 0
+        };
+
+        var delta = {
+            action: "insertText",
+            range: Range.fromPoints(position, end),
+            text: this.getNewLineCharacter()
+        };
+        this._emit("change", { data: delta });
+
+        return end;
+    };
+    this.insertInLine = function(position, text) {
+        if (text.length == 0)
+            return position;
+
+        var line = this.$lines[position.row] || "";
+
+        this.$lines[position.row] = line.substring(0, position.column) + text
+                + line.substring(position.column);
+
+        var end = {
+            row : position.row,
+            column : position.column + text.length
+        };
+
+        var delta = {
+            action: "insertText",
+            range: Range.fromPoints(position, end),
+            text: text
+        };
+        this._emit("change", { data: delta });
+
+        return end;
+    };
+    this.remove = function(range) {
+        if (!range instanceof Range)
+            range = Range.fromPoints(range.start, range.end);
+        range.start = this.$clipPosition(range.start);
+        range.end = this.$clipPosition(range.end);
+
+        if (range.isEmpty())
+            return range.start;
+
+        var firstRow = range.start.row;
+        var lastRow = range.end.row;
+
+        if (range.isMultiLine()) {
+            var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+            var lastFullRow = lastRow - 1;
+
+            if (range.end.column > 0)
+                this.removeInLine(lastRow, 0, range.end.column);
+
+            if (lastFullRow >= firstFullRow)
+                this._removeLines(firstFullRow, lastFullRow);
+
+            if (firstFullRow != firstRow) {
+                this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+                this.removeNewLine(range.start.row);
+            }
+        }
+        else {
+            this.removeInLine(firstRow, range.start.column, range.end.column);
+        }
+        return range.start;
+    };
+    this.removeInLine = function(row, startColumn, endColumn) {
+        if (startColumn == endColumn)
+            return;
+
+        var range = new Range(row, startColumn, row, endColumn);
+        var line = this.getLine(row);
+        var removed = line.substring(startColumn, endColumn);
+        var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+        this.$lines.splice(row, 1, newLine);
+
+        var delta = {
+            action: "removeText",
+            range: range,
+            text: removed
+        };
+        this._emit("change", { data: delta });
+        return range.start;
+    };
+    this.removeLines = function(firstRow, lastRow) {
+        if (firstRow < 0 || lastRow >= this.getLength())
+            return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+        return this._removeLines(firstRow, lastRow);
+    };
+
+    this._removeLines = function(firstRow, lastRow) {
+        var range = new Range(firstRow, 0, lastRow + 1, 0);
+        var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+        var delta = {
+            action: "removeLines",
+            range: range,
+            nl: this.getNewLineCharacter(),
+            lines: removed
+        };
+        this._emit("change", { data: delta });
+        return removed;
+    };
+    this.removeNewLine = function(row) {
+        var firstLine = this.getLine(row);
+        var secondLine = this.getLine(row+1);
+
+        var range = new Range(row, firstLine.length, row+1, 0);
+        var line = firstLine + secondLine;
+
+        this.$lines.splice(row, 2, line);
+
+        var delta = {
+            action: "removeText",
+            range: range,
+            text: this.getNewLineCharacter()
+        };
+        this._emit("change", { data: delta });
+    };
+    this.replace = function(range, text) {
+        if (!range instanceof Range)
+            range = Range.fromPoints(range.start, range.end);
+        if (text.length == 0 && range.isEmpty())
+            return range.start;
+        if (text == this.getTextRange(range))
+            return range.end;
+
+        this.remove(range);
+        if (text) {
+            var end = this.insert(range.start, text);
+        }
+        else {
+            end = range.start;
+        }
+
+        return end;
+    };
+    this.applyDeltas = function(deltas) {
+        for (var i=0; i<deltas.length; i++) {
+            var delta = deltas[i];
+            var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+            if (delta.action == "insertLines")
+                this.insertLines(range.start.row, delta.lines);
+            else if (delta.action == "insertText")
+                this.insert(range.start, delta.text);
+            else if (delta.action == "removeLines")
+                this._removeLines(range.start.row, range.end.row - 1);
+            else if (delta.action == "removeText")
+                this.remove(range);
+        }
+    };
+    this.revertDeltas = function(deltas) {
+        for (var i=deltas.length-1; i>=0; i--) {
+            var delta = deltas[i];
+
+            var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+            if (delta.action == "insertLines")
+                this._removeLines(range.start.row, range.end.row - 1);
+            else if (delta.action == "insertText")
+                this.remove(range);
+            else if (delta.action == "removeLines")
+                this._insertLines(range.start.row, delta.lines);
+            else if (delta.action == "removeText")
+                this.insert(range.start, delta.text);
+        }
+    };
+    this.indexToPosition = function(index, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        for (var i = startRow || 0, l = lines.length; i < l; i++) {
+            index -= lines[i].length + newlineLength;
+            if (index < 0)
+                return {row: i, column: index + lines[i].length + newlineLength};
+        }
+        return {row: l-1, column: lines[l-1].length};
+    };
+    this.positionToIndex = function(pos, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        var index = 0;
+        var row = Math.min(pos.row, lines.length);
+        for (var i = startRow || 0; i < row; ++i)
+            index += lines[i].length + newlineLength;
+
+        return index + pos.column;
+    };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+    this._eventRegistry || (this._eventRegistry = {});
+    this._defaultHandlers || (this._defaultHandlers = {});
+
+    var listeners = this._eventRegistry[eventName] || [];
+    var defaultHandler = this._defaultHandlers[eventName];
+    if (!listeners.length && !defaultHandler)
+        return;
+
+    if (typeof e != "object" || !e)
+        e = {};
+
+    if (!e.type)
+        e.type = eventName;
+    if (!e.stopPropagation)
+        e.stopPropagation = stopPropagation;
+    if (!e.preventDefault)
+        e.preventDefault = preventDefault;
+
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++) {
+        listeners[i](e, this);
+        if (e.propagationStopped)
+            break;
+    }
+    
+    if (defaultHandler && !e.defaultPrevented)
+        return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+    var listeners = (this._eventRegistry || {})[eventName];
+    if (!listeners)
+        return;
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++)
+        listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+    var _self = this;
+    callback && this.addEventListener(eventName, function newCallback() {
+        _self.removeEventListener(eventName, newCallback);
+        callback.apply(null, arguments);
+    });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        handlers = this._defaultHandlers = {_disabled_: {}};
+    
+    if (handlers[eventName]) {
+        var old = handlers[eventName];
+        var disabled = handlers._disabled_[eventName];
+        if (!disabled)
+            handlers._disabled_[eventName] = disabled = [];
+        disabled.push(old);
+        var i = disabled.indexOf(callback);
+        if (i != -1) 
+            disabled.splice(i, 1);
+    }
+    handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        return;
+    var disabled = handlers._disabled_[eventName];
+    
+    if (handlers[eventName] == callback) {
+        var old = handlers[eventName];
+        if (disabled)
+            this.setDefaultHandler(eventName, disabled.pop());
+    } else if (disabled) {
+        var i = disabled.indexOf(callback);
+        if (i != -1)
+            disabled.splice(i, 1);
+    }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        listeners = this._eventRegistry[eventName] = [];
+
+    if (listeners.indexOf(callback) == -1)
+        listeners[capturing ? "unshift" : "push"](callback);
+    return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        return;
+
+    var index = listeners.indexOf(callback);
+    if (index !== -1)
+        listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+    if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+var comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+    this.start = {
+        row: startRow,
+        column: startColumn
+    };
+
+    this.end = {
+        row: endRow,
+        column: endColumn
+    };
+};
+
+(function() {
+    this.isEqual = function(range) {
+        return this.start.row === range.start.row &&
+            this.end.row === range.end.row &&
+            this.start.column === range.start.column &&
+            this.end.column === range.end.column;
+    };
+    this.toString = function() {
+        return ("Range: [" + this.start.row + "/" + this.start.column +
+            "] -> [" + this.end.row + "/" + this.end.column + "]");
+    };
+
+    this.contains = function(row, column) {
+        return this.compare(row, column) == 0;
+    };
+    this.compareRange = function(range) {
+        var cmp,
+            end = range.end,
+            start = range.start;
+
+        cmp = this.compare(end.row, end.column);
+        if (cmp == 1) {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == 1) {
+                return 2;
+            } else if (cmp == 0) {
+                return 1;
+            } else {
+                return 0;
+            }
+        } else if (cmp == -1) {
+            return -2;
+        } else {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == -1) {
+                return -1;
+            } else if (cmp == 1) {
+                return 42;
+            } else {
+                return 0;
+            }
+        }
+    };
+    this.comparePoint = function(p) {
+        return this.compare(p.row, p.column);
+    };
+    this.containsRange = function(range) {
+        return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+    };
+    this.intersects = function(range) {
+        var cmp = this.compareRange(range);
+        return (cmp == -1 || cmp == 0 || cmp == 1);
+    };
+    this.isEnd = function(row, column) {
+        return this.end.row == row && this.end.column == column;
+    };
+    this.isStart = function(row, column) {
+        return this.start.row == row && this.start.column == column;
+    };
+    this.setStart = function(row, column) {
+        if (typeof row == "object") {
+            this.start.column = row.column;
+            this.start.row = row.row;
+        } else {
+            this.start.row = row;
+            this.start.column = column;
+        }
+    };
+    this.setEnd = function(row, column) {
+        if (typeof row == "object") {
+            this.end.column = row.column;
+            this.end.row = row.row;
+        } else {
+            this.end.row = row;
+            this.end.column = column;
+        }
+    };
+    this.inside = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column) || this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideStart = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideEnd = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.compare = function(row, column) {
+        if (!this.isMultiLine()) {
+            if (row === this.start.row) {
+                return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+            };
+        }
+
+        if (row < this.start.row)
+            return -1;
+
+        if (row > this.end.row)
+            return 1;
+
+        if (this.start.row === row)
+            return column >= this.start.column ? 0 : -1;
+
+        if (this.end.row === row)
+            return column <= this.end.column ? 0 : 1;
+
+        return 0;
+    };
+    this.compareStart = function(row, column) {
+        if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareEnd = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareInside = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.clipRows = function(firstRow, lastRow) {
+        if (this.end.row > lastRow)
+            var end = {row: lastRow + 1, column: 0};
+        else if (this.end.row < firstRow)
+            var end = {row: firstRow, column: 0};
+
+        if (this.start.row > lastRow)
+            var start = {row: lastRow + 1, column: 0};
+        else if (this.start.row < firstRow)
+            var start = {row: firstRow, column: 0};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+    this.extend = function(row, column) {
+        var cmp = this.compare(row, column);
+
+        if (cmp == 0)
+            return this;
+        else if (cmp == -1)
+            var start = {row: row, column: column};
+        else
+            var end = {row: row, column: column};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+
+    this.isEmpty = function() {
+        return (this.start.row === this.end.row && this.start.column === this.end.column);
+    };
+    this.isMultiLine = function() {
+        return (this.start.row !== this.end.row);
+    };
+    this.clone = function() {
+        return Range.fromPoints(this.start, this.end);
+    };
+    this.collapseRows = function() {
+        if (this.end.column == 0)
+            return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+        else
+            return new Range(this.start.row, 0, this.end.row, 0)
+    };
+    this.toScreenRange = function(session) {
+        var screenPosStart = session.documentToScreenPosition(this.start);
+        var screenPosEnd = session.documentToScreenPosition(this.end);
+
+        return new Range(
+            screenPosStart.row, screenPosStart.column,
+            screenPosEnd.row, screenPosEnd.column
+        );
+    };
+    this.moveBy = function(row, column) {
+        this.start.row += row;
+        this.start.column += column;
+        this.end.row += row;
+        this.end.column += column;
+    };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+    return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
+
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+    this.$onChange = this.onChange.bind(this);
+    this.attach(doc);
+    
+    if (typeof column == "undefined")
+        this.setPosition(row.row, row.column);
+    else
+        this.setPosition(row, column);
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.getPosition = function() {
+        return this.$clipPositionToDocument(this.row, this.column);
+    };
+    this.getDocument = function() {
+        return this.document;
+    };
+    this.$insertRight = false;
+    this.onChange = function(e) {
+        var delta = e.data;
+        var range = delta.range;
+
+        if (range.start.row == range.end.row && range.start.row != this.row)
+            return;
+
+        if (range.start.row > this.row)
+            return;
+
+        if (range.start.row == this.row && range.start.column > this.column)
+            return;
+
+        var row = this.row;
+        var column = this.column;
+        var start = range.start;
+        var end = range.end;
+
+        if (delta.action === "insertText") {
+            if (start.row === row && start.column <= column) {
+                if (start.column === column && this.$insertRight) {
+                } else if (start.row === end.row) {
+                    column += end.column - start.column;
+                } else {
+                    column -= start.column;
+                    row += end.row - start.row;
+                }
+            } else if (start.row !== end.row && start.row < row) {
+                row += end.row - start.row;
+            }
+        } else if (delta.action === "insertLines") {
+            if (start.row <= row) {
+                row += end.row - start.row;
+            }
+        } else if (delta.action === "removeText") {
+            if (start.row === row && start.column < column) {
+                if (end.column >= column)
+                    column = start.column;
+                else
+                    column = Math.max(0, column - (end.column - start.column));
+
+            } else if (start.row !== end.row && start.row < row) {
+                if (end.row === row)
+                    column = Math.max(0, column - end.column) + start.column;
+                row -= (end.row - start.row);
+            } else if (end.row === row) {
+                row -= end.row - start.row;
+                column = Math.max(0, column - end.column) + start.column;
+            }
+        } else if (delta.action == "removeLines") {
+            if (start.row <= row) {
+                if (end.row <= row)
+                    row -= end.row - start.row;
+                else {
+                    row = start.row;
+                    column = 0;
+                }
+            }
+        }
+
+        this.setPosition(row, column, true);
+    };
+    this.setPosition = function(row, column, noClip) {
+        var pos;
+        if (noClip) {
+            pos = {
+                row: row,
+                column: column
+            };
+        } else {
+            pos = this.$clipPositionToDocument(row, column);
+        }
+
+        if (this.row == pos.row && this.column == pos.column)
+            return;
+
+        var old = {
+            row: this.row,
+            column: this.column
+        };
+
+        this.row = pos.row;
+        this.column = pos.column;
+        this._emit("change", {
+            old: old,
+            value: pos
+        });
+    };
+    this.detach = function() {
+        this.document.removeEventListener("change", this.$onChange);
+    };
+    this.attach = function(doc) {
+        this.document = doc || this.document;
+        this.document.on("change", this.$onChange);
+    };
+    this.$clipPositionToDocument = function(row, column) {
+        var pos = {};
+
+        if (row >= this.document.getLength()) {
+            pos.row = Math.max(0, this.document.getLength() - 1);
+            pos.column = this.document.getLine(pos.row).length;
+        }
+        else if (row < 0) {
+            pos.row = 0;
+            pos.column = 0;
+        }
+        else {
+            pos.row = row;
+            pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+        }
+
+        if (column < 0)
+            pos.column = 0;
+
+        return pos;
+    };
+
+}).call(Anchor.prototype);
+
+});
+
+define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.stringReverse = function(string) {
+    return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+    var result = '';
+    while (count > 0) {
+        if (count & 1)
+            result += string;
+
+        if (count >>= 1)
+            string += string;
+    }
+    return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+    return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+    return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+    var copy = {};
+    for (var key in obj) {
+        copy[key] = obj[key];
+    }
+    return copy;
+};
+
+exports.copyArray = function(array){
+    var copy = [];
+    for (var i=0, l=array.length; i<l; i++) {
+        if (array[i] && typeof array[i] == "object")
+            copy[i] = this.copyObject( array[i] );
+        else 
+            copy[i] = array[i];
+    }
+    return copy;
+};
+
+exports.deepCopy = function (obj) {
+    if (typeof obj != "object") {
+        return obj;
+    }
+    
+    var copy = obj.constructor();
+    for (var key in obj) {
+        if (typeof obj[key] == "object") {
+            copy[key] = this.deepCopy(obj[key]);
+        } else {
+            copy[key] = obj[key];
+        }
+    }
+    return copy;
+};
+
+exports.arrayToMap = function(arr) {
+    var map = {};
+    for (var i=0; i<arr.length; i++) {
+        map[arr[i]] = 1;
+    }
+    return map;
+
+};
+
+exports.createMap = function(props) {
+    var map = Object.create(null);
+    for (var i in props) {
+        map[i] = props[i];
+    }
+    return map;
+};
+exports.arrayRemove = function(array, value) {
+  for (var i = 0; i <= array.length; i++) {
+    if (value === array[i]) {
+      array.splice(i, 1);
+    }
+  }
+};
+
+exports.escapeRegExp = function(str) {
+    return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+    return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+    var matches = [];
+
+    string.replace(regExp, function(str) {
+        matches.push({
+            offset: arguments[arguments.length-2],
+            length: str.length
+        });
+    });
+
+    return matches;
+};
+exports.deferredCall = function(fcn) {
+
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var deferred = function(timeout) {
+        deferred.cancel();
+        timer = setTimeout(callback, timeout || 0);
+        return deferred;
+    };
+
+    deferred.schedule = deferred;
+
+    deferred.call = function() {
+        this.cancel();
+        fcn();
+        return deferred;
+    };
+
+    deferred.cancel = function() {
+        clearTimeout(timer);
+        timer = null;
+        return deferred;
+    };
+
+    return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var _self = function(timeout) {
+        timer && clearTimeout(timer);
+        timer = setTimeout(callback, timeout || defaultTimeout);
+    };
+
+    _self.delay = _self;
+    _self.schedule = function(timeout) {
+        if (timer == null)
+            timer = setTimeout(callback, timeout || 0);
+    };
+
+    _self.call = function() {
+        this.cancel();
+        fcn();
+    };
+
+    _self.cancel = function() {
+        timer && clearTimeout(timer);
+        timer = null;
+    };
+
+    _self.isPending = function() {
+        return timer;
+    };
+
+    return _self;
+};
+});
+
+define('ace/mode/json/json_parse', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+    var at,     // The index of the current character
+        ch,     // The current character
+        escapee = {
+            '"':  '"',
+            '\\': '\\',
+            '/':  '/',
+            b:    '\b',
+            f:    '\f',
+            n:    '\n',
+            r:    '\r',
+            t:    '\t'
+        },
+        text,
+
+        error = function (m) {
+
+            throw {
+                name:    'SyntaxError',
+                message: m,
+                at:      at,
+                text:    text
+            };
+        },
+
+        next = function (c) {
+
+            if (c && c !== ch) {
+                error("Expected '" + c + "' instead of '" + ch + "'");
+            }
+
+            ch = text.charAt(at);
+            at += 1;
+            return ch;
+        },
+
+        number = function () {
+
+            var number,
+                string = '';
+
+            if (ch === '-') {
+                string = '-';
+                next('-');
+            }
+            while (ch >= '0' && ch <= '9') {
+                string += ch;
+                next();
+            }
+            if (ch === '.') {
+                string += '.';
+                while (next() && ch >= '0' && ch <= '9') {
+                    string += ch;
+                }
+            }
+            if (ch === 'e' || ch === 'E') {
+                string += ch;
+                next();
+                if (ch === '-' || ch === '+') {
+                    string += ch;
+                    next();
+                }
+                while (ch >= '0' && ch <= '9') {
+                    string += ch;
+                    next();
+                }
+            }
+            number = +string;
+            if (isNaN(number)) {
+                error("Bad number");
+            } else {
+                return number;
+            }
+        },
+
+        string = function () {
+
+            var hex,
+                i,
+                string = '',
+                uffff;
+
+            if (ch === '"') {
+                while (next()) {
+                    if (ch === '"') {
+                        next();
+                        return string;
+                    } else if (ch === '\\') {
+                        next();
+                        if (ch === 'u') {
+                            uffff = 0;
+                            for (i = 0; i < 4; i += 1) {
+                                hex = parseInt(next(), 16);
+                                if (!isFinite(hex)) {
+                                    break;
+                                }
+                                uffff = uffff * 16 + hex;
+                            }
+                            string += String.fromCharCode(uffff);
+                        } else if (typeof escapee[ch] === 'string') {
+                            string += escapee[ch];
+                        } else {
+                            break;
+                        }
+                    } else {
+                        string += ch;
+                    }
+                }
+            }
+            error("Bad string");
+        },
+
+        white = function () {
+
+            while (ch && ch <= ' ') {
+                next();
+            }
+        },
+
+        word = function () {
+
+            switch (ch) {
+            case 't':
+                next('t');
+                next('r');
+                next('u');
+                next('e');
+                return true;
+            case 'f':
+                next('f');
+                next('a');
+                next('l');
+                next('s');
+                next('e');
+                return false;
+            case 'n':
+                next('n');
+                next('u');
+                next('l');
+                next('l');
+                return null;
+            }
+            error("Unexpected '" + ch + "'");
+        },
+
+        value,  // Place holder for the value function.
+
+        array = function () {
+
+            var array = [];
+
+            if (ch === '[') {
+                next('[');
+                white();
+                if (ch === ']') {
+                    next(']');
+                    return array;   // empty array
+                }
+                while (ch) {
+                    array.push(value());
+                    white();
+                    if (ch === ']') {
+                        next(']');
+                        return array;
+                    }
+                    next(',');
+                    white();
+                }
+            }
+            error("Bad array");
+        },
+
+        object = function () {
+
+            var key,
+                object = {};
+
+            if (ch === '{') {
+                next('{');
+                white();
+                if (ch === '}') {
+                    next('}');
+                    return object;   // empty object
+                }
+                while (ch) {
+                    key = string();
+                    white();
+                    next(':');
+                    if (Object.hasOwnProperty.call(object, key)) {
+                        error('Duplicate key "' + key + '"');
+                    }
+                    object[key] = value();
+                    white();
+                    if (ch === '}') {
+                        next('}');
+                        return object;
+                    }
+                    next(',');
+                    white();
+                }
+            }
+            error("Bad object");
+        };
+
+    value = function () {
+
+        white();
+        switch (ch) {
+        case '{':
+            return object();
+        case '[':
+            return array();
+        case '"':
+            return string();
+        case '-':
+            return number();
+        default:
+            return ch >= '0' && ch <= '9' ? number() : word();
+        }
+    };
+
+    return function (source, reviver) {
+        var result;
+
+        text = source;
+        at = 0;
+        ch = ' ';
+        result = value();
+        white();
+        if (ch) {
+            error("Syntax error");
+        }
+
+        return typeof reviver === 'function' ? function walk(holder, key) {
+            var k, v, value = holder[key];
+            if (value && typeof value === 'object') {
+                for (k in value) {
+                    if (Object.hasOwnProperty.call(value, k)) {
+                        v = walk(value, k);
+                        if (v !== undefined) {
+                            value[k] = v;
+                        } else {
+                            delete value[k];
+                        }
+                    }
+                }
+            }
+            return reviver.call(holder, key, value);
+        }({'': result}, '') : result;
+    };
+});
diff --git a/fauxton/js/require.js b/fauxton/js/require.js
index 2d62221..b3552a8 100644
--- a/fauxton/js/require.js
+++ b/fauxton/js/require.js
@@ -1,32 +1,35 @@
-var requirejs,require,define;!function(global){function isFunction(a){return"[object Function]"===ostring.call(a)}function isArray(a){return"[object Array]"===ostring.call(a)}function each(a,b){if(a){var c;for(c=0;c<a.length&&(!a[c]||!b(a[c],c,a));c+=1);}}function eachReverse(a,b){if(a){var c;for(c=a.length-1;c>-1&&(!a[c]||!b(a[c],c,a));c-=1);}}function hasProp(a,b){return hasOwn.call(a,b)}function getOwn(a,b){return hasProp(a,b)&&a[b]}function eachProp(a,b){var c;for(c in a)if(hasProp(a,c)&&b(a[c],c))break}function mixin(a,b,c,d){return b&&eachProp(b,function(b,e){(c||!hasProp(a,e))&&(d&&"string"!=typeof b?(a[e]||(a[e]={}),mixin(a[e],b,c,d)):a[e]=b)}),a}function bind(a,b){return function(){return b.apply(a,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(a){throw a}function getGlobal(a){if(!a)return a;var b=global;return each(a.split("."),function(a){b=b[a]}),b}function makeError(a,b,c,d){var e=new Error(b+"\nhttp://requirejs.org/docs/errors.html#"+a);return e.requireType=a,e.requireModules=d,c&&(e.originalError=c),e}function newContext(a){function b(a){var b,c;for(b=0;a[b];b+=1)if(c=a[b],"."===c)a.splice(b,1),b-=1;else if(".."===c){if(1===b&&(".."===a[2]||".."===a[0]))break;b>0&&(a.splice(b-1,2),b-=2)}}function c(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p=c&&c.split("/"),q=p,r=x.map,s=r&&r["*"];if(a&&"."===a.charAt(0)&&(c?(q=getOwn(x.pkgs,c)?p=[c]:p.slice(0,p.length-1),a=q.concat(a.split("/")),b(a),f=getOwn(x.pkgs,e=a[0]),a=a.join("/"),f&&a===e+"/"+f.main&&(a=e)):0===a.indexOf("./")&&(a=a.substring(2))),d&&r&&(p||s)){for(h=a.split("/"),i=h.length;i>0;i-=1){if(k=h.slice(0,i).join("/"),p)for(j=p.length;j>0;j-=1)if(g=getOwn(r,p.slice(0,j).join("/")),g&&(g=getOwn(g,k))){l=g,m=i;break}if(l)break;!n&&s&&getOwn(s,k)&&(n=getOwn(s,k),o=i)}!l&&n&&(l=n,m=o),l&&(h.splice(0,m,l),a=h.join("/"))}return a}function d(a){isBrowser&&each(scripts(),function(b){return b.getAttribute("data-requiremodule")===a&&b.getAttribute("data-requirecontext")===u.contextName?(b.parentNode.removeChild(b),!0):void 0})}function e(a){var b=getOwn(x.paths,a);return b&&isArray(b)&&b.length>1?(d(a),b.shift(),u.require.undef(a),u.require([a]),!0):void 0}function f(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function g(a,b,d,e){var g,h,i,j,k=null,l=b?b.name:null,m=a,n=!0,o="";return a||(n=!1,a="_@r"+(E+=1)),j=f(a),k=j[0],a=j[1],k&&(k=c(k,l,e),h=getOwn(C,k)),a&&(k?o=h&&h.normalize?h.normalize(a,function(a){return c(a,l,e)}):c(a,l,e):(o=c(a,l,e),j=f(o),k=j[0],o=j[1],d=!0,g=u.nameToUrl(o))),i=!k||h||d?"":"_unnormalized"+(F+=1),{prefix:k,name:o,parentMap:b,unnormalized:!!i,url:g,originalName:m,isDefine:n,id:(k?k+"!"+o:o)+i}}function h(a){var b=a.id,c=getOwn(y,b);return c||(c=y[b]=new u.Module(a)),c}function i(a,b,c){var d=a.id,e=getOwn(y,d);!hasProp(C,d)||e&&!e.defineEmitComplete?(e=h(a),e.error&&"error"===b?c(e.error):e.on(b,c)):"defined"===b&&c(C[d])}function j(a,b){var c=a.requireModules,d=!1;b?b(a):(each(c,function(b){var c=getOwn(y,b);c&&(c.error=a,c.events.error&&(d=!0,c.emit("error",a)))}),d||req.onError(a))}function k(){globalDefQueue.length&&(apsp.apply(B,[B.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function l(a){delete y[a],delete z[a]}function m(a,b,c){var d=a.map.id;a.error?a.emit("error",a.error):(b[d]=!0,each(a.depMaps,function(d,e){var f=d.id,g=getOwn(y,f);!g||a.depMatched[e]||c[f]||(getOwn(b,f)?(a.defineDep(e,C[f]),a.check()):m(g,b,c))}),c[d]=!0)}function n(){var a,b,c,f,g=1e3*x.waitSeconds,h=g&&u.startTime+g<(new Date).getTime(),i=[],k=[],l=!1,o=!0;if(!s){if(s=!0,eachProp(z,function(c){if(a=c.map,b=a.id,c.enabled&&(a.isDefine||k.push(c),!c.error))if(!c.inited&&h)e(b)?(f=!0,l=!0):(i.push(b),d(b));else if(!c.inited&&c.fetched&&a.isDefine&&(l=!0,!a.prefix))return o=!1}),h&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=u.contextName,j(c);o&&each(k,function(a){m(a,{},{})}),h&&!f||!l||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,n()},50)),s=!1}}function o(a){hasProp(C,a[0])||h(g(a[0],null,!0)).init(a[1],a[2])}function p(a,b,c,d){a.detachEvent&&!isOpera?d&&a.detachEvent(d,b):a.removeEventListener(c,b,!1)}function q(a){var b=a.currentTarget||a.srcElement;return p(b,u.onScriptLoad,"load","onreadystatechange"),p(b,u.onScriptError,"error"),{node:b,id:b&&b.getAttribute("data-requiremodule")}}function r(){var a;for(k();B.length;){if(a=B.shift(),null===a[0])return j(makeError("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));o(a)}}var s,t,u,v,w,x={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},y={},z={},A={},B=[],C={},D={},E=1,F=1;return v={require:function(a){return a.require?a.require:a.require=u.makeRequire(a.map)},exports:function(a){return a.usingExports=!0,a.map.isDefine?a.exports?a.exports:a.exports=C[a.map.id]={}:void 0},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){var b,c=getOwn(x.pkgs,a.map.id);return b=c?getOwn(x.config,a.map.id+"/"+c.main):getOwn(x.config,a.map.id),b||{}},exports:C[a.map.id]}}},t=function(a){this.events=getOwn(A,a.id)||{},this.map=a,this.shim=getOwn(x.shim,a.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},t.prototype={init:function(a,b,c,d){d=d||{},this.inited||(this.factory=b,c?this.on("error",c):this.events.error&&(c=bind(this,function(a){this.emit("error",a)})),this.depMaps=a&&a.slice(0),this.errback=c,this.inited=!0,this.ignore=d.ignore,d.enabled||this.enabled?this.enable():this.check())},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=(new Date).getTime();var a=this.map;return this.shim?(u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return a.prefix?this.callPlugin():this.load()})),void 0):a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;D[a]||(D[a]=!0,u.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id,d=this.depExports,e=this.exports,f=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{e=u.execCb(c,f,d,e)}catch(g){a=g}else e=u.execCb(c,f,d,e);if(this.map.isDefine&&(b=this.module,b&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports)),a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",j(this.error=a)}else e=f;this.exports=e,this.map.isDefine&&!this.ignore&&(C[c]=e,req.onResourceLoad&&req.onResourceLoad(u,this.map,this.depMaps)),l(c),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=g(a.prefix);this.depMaps.push(d),i(d,"defined",bind(this,function(d){var e,f,k,m=this.map.name,n=this.map.parentMap?this.map.parentMap.name:null,o=u.makeRequire(a.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(d.normalize&&(m=d.normalize(m,function(a){return c(a,n,!0)})||""),f=g(a.prefix+"!"+m,this.map.parentMap),i(f,"defined",bind(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),k=getOwn(y,f.id),k&&(this.depMaps.push(f),this.events.error&&k.on("error",bind(this,function(a){this.emit("error",a)})),k.enable()),void 0):(e=bind(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),e.error=bind(this,function(a){this.inited=!0,this.error=a,a.requireModules=[b],eachProp(y,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&l(a.map.id)}),j(a)}),e.fromText=bind(this,function(c,d){var f=a.name,i=g(f),k=useInteractive;d&&(c=d),k&&(useInteractive=!1),h(i),hasProp(x.config,b)&&(x.config[f]=x.config[b]);try{req.exec(c)}catch(l){return j(makeError("fromtexteval","fromText eval for "+b+" failed: "+l,l,[b]))}k&&(useInteractive=!0),this.depMaps.push(i),u.completeLoad(f),o([f],e)}),d.load(a.name,o,e,x),void 0)})),u.enable(d,this),this.pluginMaps[d.id]=d},enable:function(){z[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(a,b){var c,d,e;if("string"==typeof a){if(a=g(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[b]=a,e=getOwn(v,a.id))return this.depExports[b]=e(this),void 0;this.depCount+=1,i(a,"defined",bind(this,function(a){this.defineDep(b,a),this.check()})),this.errback&&i(a,"error",bind(this,this.errback))}c=a.id,d=y[c],hasProp(v,c)||!d||d.enabled||u.enable(a,this)})),eachProp(this.pluginMaps,bind(this,function(a){var b=getOwn(y,a.id);b&&!b.enabled&&u.enable(a,this)})),this.enabling=!1,this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]),c.push(b)},emit:function(a,b){each(this.events[a],function(a){a(b)}),"error"===a&&delete this.events[a]}},u={config:x,contextName:a,registry:y,defined:C,urlFetched:D,defQueue:B,Module:t,makeModuleMap:g,nextTick:req.nextTick,onError:j,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=x.pkgs,c=x.shim,d={paths:!0,config:!0,map:!0};eachProp(a,function(a,b){d[b]?"map"===b?(x.map||(x.map={}),mixin(x[b],a,!0,!0)):mixin(x[b],a,!0):x[b]=a}),a.shim&&(eachProp(a.shim,function(a,b){isArray(a)&&(a={deps:a}),!a.exports&&!a.init||a.exportsFn||(a.exportsFn=u.makeShimExports(a)),c[b]=a}),x.shim=c),a.packages&&(each(a.packages,function(a){var c;a="string"==typeof a?{name:a}:a,c=a.location,b[a.name]={name:a.name,location:c||a.name,main:(a.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),x.pkgs=b),eachProp(y,function(a,b){a.inited||a.map.unnormalized||(a.map=g(b))}),(a.deps||a.callback)&&u.require(a.deps||[],a.callback)},makeShimExports:function(a){function b(){var b;return a.init&&(b=a.init.apply(global,arguments)),b||a.exports&&getGlobal(a.exports)}return b},makeRequire:function(b,d){function e(c,f,i){var k,l,m;return d.enableBuildCallback&&f&&isFunction(f)&&(f.__requireJsBuild=!0),"string"==typeof c?isFunction(f)?j(makeError("requireargs","Invalid require call"),i):b&&hasProp(v,c)?v[c](y[b.id]):req.get?req.get(u,c,b,e):(l=g(c,b,!1,!0),k=l.id,hasProp(C,k)?C[k]:j(makeError("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+a+(b?"":". Use require([])")))):(r(),u.nextTick(function(){r(),m=h(g(null,b)),m.skipMap=d.skipMap,m.init(c,f,i,{enabled:!0}),n()}),e)}return d=d||{},mixin(e,{isBrowser:isBrowser,toUrl:function(a){var d,e=a.lastIndexOf("."),f=a.split("/")[0],g="."===f||".."===f;return-1!==e&&(!g||e>1)&&(d=a.substring(e,a.length),a=a.substring(0,e)),u.nameToUrl(c(a,b&&b.id,!0),d,!0)},defined:function(a){return hasProp(C,g(a,b,!1,!0).id)},specified:function(a){return a=g(a,b,!1,!0).id,hasProp(C,a)||hasProp(y,a)}}),b||(e.undef=function(a){k();var c=g(a,b,!0),d=getOwn(y,a);delete C[a],delete D[c.url],delete A[a],d&&(d.events.defined&&(A[a]=d.events),l(a))}),e},enable:function(a){var b=getOwn(y,a.id);b&&h(a).enable()},completeLoad:function(a){var b,c,d,f=getOwn(x.shim,a)||{},g=f.exports;for(k();B.length;){if(c=B.shift(),null===c[0]){if(c[0]=a,b)break;b=!0}else c[0]===a&&(b=!0);o(c)}if(d=getOwn(y,a),!b&&!hasProp(C,a)&&d&&!d.inited){if(!(!x.enforceDefine||g&&getGlobal(g)))return e(a)?void 0:j(makeError("nodefine","No define call for "+a,null,[a]));o([a,f.deps||[],f.exportsFn])}n()},nameToUrl:function(a,b,c){var d,e,f,g,h,i,j,k,l;if(req.jsExtRegExp.test(a))k=a+(b||"");else{for(d=x.paths,e=x.pkgs,h=a.split("/"),i=h.length;i>0;i-=1){if(j=h.slice(0,i).join("/"),f=getOwn(e,j),l=getOwn(d,j)){isArray(l)&&(l=l[0]),h.splice(0,i,l);break}if(f){g=a===f.name?f.location+"/"+f.main:f.location,h.splice(0,i,g);break}}k=h.join("/"),k+=b||(/\?/.test(k)||c?"":".js"),k=("/"===k.charAt(0)||k.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+k}return x.urlArgs?k+((-1===k.indexOf("?")?"?":"&")+x.urlArgs):k},load:function(a,b){req.load(u,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||readyRegExp.test((a.currentTarget||a.srcElement).readyState)){interactiveScript=null;var b=q(a);u.completeLoad(b.id)}},onScriptError:function(a){var b=q(a);return e(b.id)?void 0:j(makeError("scripterror","Script error for: "+b.id,a,[b.id]))}},u.require=u.makeRequire(),u}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(a){return"interactive"===a.readyState?interactiveScript=a:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.6",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(a,b,c,d){var e,f,g=defContextName;return isArray(a)||"string"==typeof a||(f=a,isArray(b)?(a=b,b=c,c=d):a=[]),f&&f.context&&(g=f.context),e=getOwn(contexts,g),e||(e=contexts[g]=req.s.newContext(g)),f&&e.configure(f),e.require(a,b,c)},req.config=function(a){return req(a)},req.nextTick="undefined"!=typeof setTimeout?function(a){setTimeout(a,4)}:function(a){a()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(a){req[a]=function(){var b=contexts[defContextName];return b.require[a].apply(b,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.load=function(a,b,c){var d,e=a&&a.config||{};if(isBrowser)return d=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),d.type=e.scriptType||"text/javascript",d.charset="utf-8",d.async=!0,d.setAttribute("data-requirecontext",a.contextName),d.setAttribute("data-requiremodule",b),!d.attachEvent||d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0||isOpera?(d.addEventListener("load",a.onScriptLoad,!1),d.addEventListener("error",a.onScriptError,!1)):(useInteractive=!0,d.attachEvent("onreadystatechange",a.onScriptLoad)),d.src=c,currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{importScripts(c),a.completeLoad(b)}catch(f){a.onError(makeError("importscripts","importScripts failed for "+b+" at "+c,f,[b]))}},isBrowser&&eachReverse(scripts(),function(a){return head||(head=a.parentNode),dataMain=a.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(a,b,c){var d,e;"string"!=typeof a&&(c=b,b=a,a=null),isArray(b)||(c=b,b=null),!b&&isFunction(c)&&(b=[],c.length&&(c.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(a,c){b.push(c)}),b=(1===c.length?["require"]:["require","exports","module"]).concat(b))),useInteractive&&(d=currentlyAddingScript||getInteractiveScript(),d&&(a||(a=d.getAttribute("data-requiremodule")),e=contexts[d.getAttribute("data-requirecontext")])),(e?e.defQueue:globalDefQueue).push([a,b,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),this.JST=this.JST||{},this.JST["app/templates/databases/item.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n  <a href="#/database/'+(null==(__t=encoded)?"":__t)+'/_all_docs?limit=100">'+(null==(__t=database.get("name"))?"":__t)+"</a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n  <a class="db-actions btn fonticon-replicate set-replication-start" href="#/replication/'+(null==(__t=database.get("name"))?"":__t)+'"></a>\n</td>\n';return __p},this.JST["app/templates/databases/list.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="result-tools" style="">\n  <div id="newButton" class="pull-left"></div>\n  <form class="navbar-form pull-right database-search">\n    <label class="fonticon-search">\n      <input type="text" class="search-query" placeholder="Search by database name">\n    </label>\n  </form>\n</div>\n<table class="databases table table-striped">\n  <thead>\n    <th>Name</th>\n    <th>Size</th>\n    <th># of Docs</th>\n    <th>Update Seq</th>\n    <th>Actions</th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n<div id="database-pagination"></div>\n';return __p},this.JST["app/templates/databases/newdatabase.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a class="button new" id="new"><i class="icon fonticon-new-database"></i>Add new database</a>\n\n\n';return __p},this.JST["app/templates/databases/sidebar.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n  <a href="http://couchdb.org" target="_blank"><img src="img/couchdblogo.png"/></a>\n  <br/>\n</div>\n<hr>\n<ul class="nav nav-list">\n  <!-- <li class="nav-header">Database types</li> -->\n  <li class="active"><a class="toggle-view" id="owned">Your databases</a></li>\n  <li><a class="btn new" id="new"><i class="icon-plus"></i> New database</a></li>\n</ul>\n<hr>\n\n<div>\n  <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/CouchDB" data-widget-id="314360971646869505">Tweets by @CouchDB</a>\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>\n\n</div>\n';return __p},this.JST["app/templates/documents/advanced_options.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="errors-container"></div>\n<form class="view-query-update custom-inputs">\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <input name="key" class="span6" type="text" placeholder="Key">\n        <input name="keys" class="span6" type="text" placeholder="Keys">\n      </div>\n    </div>\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <input name="startkey" class="span6" type="text" placeholder="Start Key">\n        <input name="endkey" class="span6" type="text" placeholder="End Key">\n      </div>\n    </div>\n  </div>\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <div class="checkbox inline">  \n          <input id="check1" type="checkbox" name="include_docs" value="true">  \n          <label name="include_docs" for="check1">Include Docs</label>  \n          ',hasReduce&&(__p+='\n          <input id="check2" name="reduce" type="checkbox" value="true">\n          <label for="check2">Reduce</label>  \n        </div> \n        <label id="select1" class="drop-down inline">\n          Group Level:\n          <select id="select1" disabled name="group_level" class="input-small">\n            <option value="0">None</option>\n            <option value="1">1</option>\n            <option value="2">2</option>\n            <option value="3">3</option>\n            <option value="4">4</option>\n            <option value="5">5</option>\n            <option value="6">6</option>\n            <option value="7">7</option>\n            <option value="8">8</option>\n            <option value="9">9</option>\n            <option value="999" selected="selected">exact</option>\n          </select>\n        </label>\n        '),__p+='\n        <div class="checkbox inline">  \n          <input id="check3" name="stale" type="checkbox" value="ok">\n          <label for="check3">Stale</label>\n          <input id="check4" name="descending" type="checkbox" value="true">  \n          <label for="check4">Descending</label>  \n        </div> \n        <label class="drop-down inline">\n          Limit:\n          <select name="limit" class="input-small">\n            <option>5</option>\n            <option selected="selected">10</option>\n            <option>25</option>\n            <option>50</option>\n            <option>100</option>\n          </select>\n        </label>\n        <div class="checkbox inline">  \n          <input id="check5" name="inclusive_end" type="checkbox" value="false">\n          <label for="check5">Disable Inclusive End</label>\n          <input id="check6" name="update_seq" type="checkbox" value="true">  \n          <label for="check6">Descending</label>  \n        </div>\n      </div>\n    </div>\n  </div>\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div id="button-options" class="controls controls-row">\n        <button type="submit" class="button btn-primary btn-large">Query</button>\n        ',showPreview&&(__p+='\n        <button class="button btn-info btn-large preview">Preview</button>\n        '),__p+="\n      </div>\n    </div>\n  </div>\n</form>\n</div>\n\n";return __p},this.JST["app/templates/documents/all_docs_item.html"]=function(obj){obj||(obj={});var __t,__p="",__e=_.escape;with(Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox" class="row-select"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n    ",doc.isEditable()&&(__p+='\n      <div class="btn-group">\n        <a href="#'+(null==(__t=doc.url("app"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n      </div>\n    '),__p+="\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/all_docs_layout.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Advanced Options</a></li>\n</ul>\n<div class="tab-content">\n  <div class="tab-pane" id="query">\n  </div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_list.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n  ',viewList||(__p+='\n    <div class="row">\n      <div class="btn-toolbar span6">\n        <button type="button" class="btn all" data-toggle="button">✓ All</button>\n        <button class="btn btn-small disabled bulk-delete"><i class="icon-trash"></i></button>\n        ',__p+=expandDocs?'\n        <button id="collapse" class="btn"><i class="icon-minus"></i> Collapse</button>\n        ':'\n        <button id="collapse" class="btn"><i class="icon-plus"></i> Expand</button>\n        ',__p+="\n      </div>\n    </div>\n  "),__p+='\n  <p>\n\n  <div id="item-numbers"> </div>\n\n  ',requestDuration&&(__p+='\n    <span class="view-request-duration">\n    View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n    </span>\n  "),__p+='\n  </p>\n  <table class="all-docs table table-striped table-condensed">\n    <tbody></tbody>\n  </table>\n  <div id="documents-pagination"></div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_number.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+="unknown"===totalRows?'\n  Showing 0 documents. <a href="#/database/'+(null==(__t=database)?"":__t)+'/new"> Create your first document.</a>\n':"\n  Showing "+(null==(__t=offset)?"":__t)+" - "+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n",__p+="\n",updateSeq&&(__p+="\n  -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n"),__p+="\n";return __p},this.JST["app/templates/documents/changes.html"]=function(obj){obj||(obj={});var __t,__p="",__e=_.escape;with(Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<table id="changes-table" class="table">\n  <thead>\n    <th id="seq"> seq </th>\n    <th> id </th>\n    <th id="changes"> changes </th>\n    <th id="deleted"> deleted? </th>\n  </thead>\n  <tbody>\n  ',_.each(changes,function(a){__p+="\n    <tr>\n      <td> "+(null==(__t=a.seq)?"":__t)+" </td>\n      ",__p+=a.deleted?"\n        <td> "+(null==(__t=a.id)?"":__t)+" </td>\n      ":'\n        <td> <a href="#'+(null==(__t=database.url("app"))?"":__t)+"/"+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</a> </td>\n      ",__p+='\n        <td> \n          <pre class="prettyprint">  '+__e(JSON.stringify({changes:a.changes,doc:a.doc},null," "))+" </pre>\n      </td>\n      <td>"+(null==(__t=a.deleted?"true":"false")?"":__t)+"</td>\n    </tr>\n  "}),__p+="\n  </tbody>\n</table>\n";return __p},this.JST["app/templates/documents/ddoc_info.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div>\n  <h2> Design Doc MetaData </h2>\n  <div class="row-fluid">\n	',i=0,_.map(view_index,function(a,b){__p+="\n		",0==i%2&&(__p+='\n			<div class="row-fluid">\n		'),__p+='\n	    <div class="span6 well-item"><strong> '+(null==(__t=b)?"":__t)+"</strong> : "+(null==(__t=a)?"":__t)+"  </div>\n	    ",1==i%2&&(__p+="\n			</div>\n		"),__p+="\n	  	",++i
-}),__p+="\n  </div>\n</div>\n";return __p},this.JST["app/templates/documents/design_doc_selector.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span3">\n  <label for="ddoc">Design document <a href="'+(null==(__t=getDocUrl("design_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n  <select id="ddoc">\n    <optgroup label="Select a document">\n      <option id="new-doc">New document</option>\n      ',ddocs.each(function(a){__p+="\n      ",__p+=a.id===ddocName?'\n      <option selected="selected">'+(null==(__t=a.id)?"":__t)+"</option>\n      ":"\n      <option>"+(null==(__t=a.id)?"":__t)+"</option>\n      ",__p+="\n      "}),__p+='\n    </optgroup>\n  </select>\n</div>\n\n<div id="new-ddoc-section" class="span5" style="display:none">\n  <label class="control-label" for="new-ddoc"> _design/ </label>\n  <div class="controls">\n    <input type="text" id="new-ddoc" placeholder="newDesignDoc">\n  </div>\n</div>\n';return __p},this.JST["app/templates/documents/doc.html"]=function(obj){obj||(obj={});var __t,__p="",__e=_.escape;with(Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc">\n  <div class="errors-container"></div>\n   \n<div class="btn-group" style="margin-bottom: 15px"> \n  ',attachments&&(__p+='\n    <a class="btn dropdown-toggle btn" data-toggle="dropdown" href="#">\n      View Attachments\n      <span class="caret"></span>\n    </a>\n    <ul class="dropdown-menu">\n      ',_.each(attachments,function(a){__p+='\n      <li>\n      <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> <strong> '+(null==(__t=a.fileName)?"":__t)+" </strong> -\n        <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n      </a>\n      </li>\n      "}),__p+="\n    </ul>\n\n  "),__p+=' \n  <button class="btn btn-small upload"><i class="icon-circle-arrow-up"></i> Upload Attachment</button>\n  <button class="btn btn-small duplicate"><i class="icon-repeat"></i> Duplicate document</button>\n  <button class="btn btn-small delete"><i class="icon-trash"></i> Delete document</button>\n  </ul>\n\n<div id="upload-modal"> </div>\n<div id="duplicate-modal"> </div> \n</div>\n\n  <div id="editor-container" class="doc-code">'+__e(JSON.stringify(doc.attributes,null,"  "))+'</div>\n  <br />\n  <p>\n       <button class="save-doc button green btn-success btn-large save fonticon-circle-check" type="button">Save</button>\n       <button class="button gray btn-large cancel-button outlineGray fonticon-circle-x" type="button">Cancel</button>\n  </p>\n\n</div>\n';return __p},this.JST["app/templates/documents/doc_field_editor.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc-field-editor">\n  <div class="tools">\n\n    <div class="btn-toolbar pull-left">\n      <button class="btn btn-small all">&#x2713; All</button>\n      <button class="btn btn-small disabled delete"><i class="icon-trash"></i> Delete field</button>\n      <button class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</button>\n    </div>\n    <div class="btn-toolbar pull-right">\n      <button class="btn btn-small cancel button cancel-button outlineGray fonticon-circle-x">Cancel</button>\n      <button class="btn btn-small save button green fonticon-circle-check">Save</button>\n    </div>\n  </div>\n\n  <div class="clearfix"></div>\n  <!-- <hr style="margin-top: 0"/> -->\n\n  <table class="table table-striped  table-condensed">\n    <thead>\n      <tr>\n        <th class="select">\n        </th>\n        <th>Key</th>\n        <th>Value</th>\n      </tr>\n    </thead>\n    <tbody>\n      <tr style="display:none">\n        <td class="select"><input type="checkbox" /></td>\n        <td class="key"><input type="text" class="input-large" value=\'\' /></td>\n        <td class="value"><input type="text" class="input-xxlarge" value=\'\' /></td>\n      </tr>\n      ',_.each(doc,function(a,b){__p+='\n        <tr>\n          <td class="select"><input type="checkbox" /></td>\n          <td class="key">\n            <input type="text" class="input-large" name="doc['+(null==(__t=b)?"":__t)+']" value="'+(null==(__t=b)?"":__t)+'" />\n          </td>\n          <td class="value"><input type="text" class="input-xxlarge" value=\''+(null==(__t=JSON.stringify(a))?"":__t)+"' /></td>\n        </tr>\n      "}),__p+='\n        <tr>\n          <th colspan="3">\n            Attachments\n          </th>\n        </tr>\n      ',_.each(attachments,function(a){__p+='\n        <tr>\n          <td class="select"><input type="checkbox" /></td>\n          <td colspan="2">\n            <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> '+(null==(__t=a.fileName)?"":__t)+" </a>\n            <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n          </td>\n        </tr>\n      "}),__p+='\n    </tbody>\n  </table>\n  <a class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</a>\n\n</div>\n';return __p},this.JST["app/templates/documents/doc_field_editor_tabs.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="nav nav-tabs">\n  <!--<li id="field_editor" class="'+(null==(__t=isSelectedClass("field_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/field_editor">Doc fields</a></li>-->\n  <li id="code_editor" class="'+(null==(__t=isSelectedClass("code_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/code_editor"><i class="icon-pencil"> </i> Code editor</a>\n  </li>\n</ul>\n';return __p},this.JST["app/templates/documents/duplicate_doc_modal.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Duplicate Document</h3>\n  </div>\n  <div class="modal-body">\n    <div id="modal-error" class="hide alert alert-error"/>\n    <form id="file-upload" class="form" method="post">\n      <p class="help-block">\n      Set new documents ID:\n      </p>\n      <input id="dup-id" type="text" class="input-xlarge">\n    </form>\n\n  </div>\n  <div class="modal-footer">\n    <a href="#" data-dismiss="modal" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n    <a href="#" id="duplicate-btn" class="btn btn-primary button green save fonticon-circle-check">Duplicate</a>\n  </div>\n</div>\n\n\n';return __p},this.JST["app/templates/documents/edit_tools.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n  <p>\n    Showing 1-'+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n    ",updateSeq&&(__p+="\n      -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n    "),__p+="\n    ",requestDuration&&(__p+='\n  <span class="view-request-duration">\n    View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n   </span>\n   "),__p+='\n  </p>\n  <table class="all-docs table table-striped table-condensed">\n    <tbody></tbody>\n  </table>\n  <!--\n  <div class="pagination pagination-centered">\n    <ul>\n      <li class="disabled"><a href="#">&laquo;</a></li>\n      <li class="active"><a href="#">1</a></li>\n      <li><a href="#">2</a></li>\n      <li><a href="#">3</a></li>\n      <li><a href="#">4</a></li>\n      <li><a href="#">5</a></li>\n      <li><a href="#">&raquo;</a></li>\n    </ul>\n  </div>\n  -->\n\n</div>\n';return __p},this.JST["app/templates/documents/index_menu_item.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a id="'+(null==(__t=ddoc)?"":__t)+"_"+(null==(__t=index)?"":__t)+'" href="#database/'+(null==(__t=database)?"":__t)+"/_design/"+(null==(__t=ddoc)?"":__t)+"/_view/"+(null==(__t=index)?"":__t)+'" class="toggle-view">\n  <i class="icon-list"></i> '+(null==(__t=ddoc)?"":__t)+'<span class="divider">/</span>'+(null==(__t=index)?"":__t)+"\n</a>\n";return __p},this.JST["app/templates/documents/index_row_docular.html"]=function(obj){obj||(obj={});var __t,__p="",__e=_.escape;with(Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n    ",doc.isEditable()&&(__p+='\n      <div class="btn-group">\n        <a href="#'+(null==(__t=doc.url("app"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n      </div>\n    '),__p+="\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/index_row_tabular.html"]=function(obj){obj||(obj={});var __p="",__e=_.escape;with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(JSON.stringify(doc.get("key")))+'</pre>\n  </div>\n</td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(JSON.stringify(doc.get("value")))+"</pre>\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/jumpdoc.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="jump-to-doc" class="form-inline" >\n  <label id="jump-to-doc-label" class="fonticon-search">\n    <input type="text" id="jump-to-doc-id" class="input-large" placeholder="Document ID"></input>\n  </label>\n</form>\n';return __p},this.JST["app/templates/documents/search.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<input id="searchbox" type="text" class="span12" placeholder="Search by doc id, view key or search index">';return __p},this.JST["app/templates/documents/sidebar.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n  <header class="row-fluid">\n    <div class="span5">\n      <div class="btn-group">\n        <button class="btn">Docs</button>\n        <button class="btn dropdown-toggle" data-toggle="dropdown">\n          <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu">\n          <!-- dropdown menu links -->\n          <li><a class="icon-file" href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n          <li><a class="icon-lock" href="'+(null==(__t=permissions_url)?"":__t)+'">Permissions</a></li>\n          <li><a class="icon-forward" href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n          ',_.each(docLinks,function(a){__p+='\n          <li><a class="'+(null==(__t=a.icon)?"":__t)+'" href="'+(null==(__t=database_url+"/"+a.url)?"":__t)+'">'+(null==(__t=a.title)?"":__t)+"</a></li>\n          "}),__p+='\n        </ul>\n      </div>\n    </div>\n\n    <div class="span4 offset1">\n      <div class="btn-group">\n        <button class="btn">Add</button>\n        <button class="btn dropdown-toggle" data-toggle="dropdown">\n          <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu">\n          <!-- dropdown menu links -->\n           <li>\n            <a id="doc" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new">New doc</a>\n          </li>\n          ',showNewView&&(__p+='\n            <li>\n              <a href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view">New view</a>\n            </li>\n          '),__p+='\n        </ul>\n      </div>\n    </div>\n    <div class="span1">\n    <button id="delete-database" class="btn"><i class="icon-trash"></i></button>\n    </div>\n  </header>\n\n  <nav>\n    <ul class="nav nav-list">\n      <li class="active"><a id="all-docs" href="#'+(null==(__t=database.url("index"))?"":__t)+'?limit=100" class="toggle-view"><i class="icon-list"></i> All documents</a></li>\n      <li><a id="design-docs" href=\'#'+(null==(__t=database.url("index"))?"":__t)+'?limit=100&startkey="_design"&endkey="_e"\'  class="toggle-view"><i class="icon-list"></i> All design docs</a></li>\n    </ul>\n    <ul class="nav nav-list views">\n      <li class="nav-header">Secondary Indices</li>\n      ',showNewView&&(__p+='\n        <li><a id="new-view" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view" class="new"><i class="icon-plus"></i> New</a></li>\n        '),__p+="\n    </ul>\n  </nav>\n</div>\n";return __p},this.JST["app/templates/documents/tabs.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="nav nav-tabs">\n  <li class="active"><a href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n  <li id="changes"><a  href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n</ul>\n';return __p},this.JST["app/templates/documents/upload_modal.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Upload an Attachment</h3>\n  </div>\n  <div class="modal-body">\n    <div id="modal-error" class="alert alert-error hide" style="font-size: 16px;"> </div>\n    <form id="file-upload" class="form" method="post">\n      <p class="help-block">\n      Please select the file you want to upload as an attachment to this document. \n      Please note that this will result in the immediate creation of a new revision of the document, \n      so it\'s not necessary to save the document after the upload.\n      </p>\n      <input id="_attachments" type="file" name="_attachments">\n      <input id="_rev" type="hidden" name="_rev" value="" >\n      <br/>\n    </form>\n\n    <div class="progress progress-info">\n      <div class="bar" style="width: 0%"></div>\n    </div>\n  </div>\n  <div class="modal-footer">\n    <a href="#" data-dismiss="modal" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n    <a href="#" id="upload-btn" class="btn btn-primary button green save fonticon-circle-check">Upload</a>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/documents/view_editor.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n  <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n    <li class="active"> <a id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index">',__p+=newView?"Create Index ":"Edit Index ",__p+='</a></li>\n    <li><a class="fonticon-plus fonticon" href="#query" data-toggle="tab">Advanced Options</a></li>\n    <li><a href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>\n  </ul>\n  <div class="all-docs-list errors-container"></div>\n  <div class="tab-content">\n    <div class="tab-pane active" id="index">\n      <div id="define-view" class="ddoc-alert well">\n        <div class="errors-container"></div>\n        <form class="form-horizontal view-query-save">\n\n          <div class="control-group design-doc-group">\n          </div>\n\n          <div class="control-group">\n            <label for="index-name">Index name <a href="'+(null==(__t=getDocUrl("view_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n            <input type="text" id="index-name" value="'+(null==(__t=viewName)?"":__t)+'" placeholder="Index name" />\n          </div>\n\n\n          <div class="control-group">\n            <label for="map-function">Map function <a href="'+(null==(__t=getDocUrl("map_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n            ',__p+=newView?'\n            <div class="js-editor" id="map-function">'+(null==(__t=langTemplates.map)?"":__t)+"</div>\n            ":'\n            <div class="js-editor" id="map-function">'+(null==(__t=ddoc.get("views")[viewName].map)?"":__t)+"</div>\n            ",__p+='\n          </div>\n\n\n          <div class="control-group">\n            <label for="reduce-function-selector">Reduce function <a href="'+(null==(__t=getDocUrl("reduce_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n\n            <select id="reduce-function-selector">\n              <option value="" '+(null==(__t=reduceFunStr?"":'selected="selected"')?"":__t)+">None</option>\n              ",_.each(["_sum","_count","_stats"],function(a){__p+='\n              <option value="'+(null==(__t=a)?"":__t)+'" ',a==reduceFunStr&&(__p+="selected"),__p+=">"+(null==(__t=a)?"":__t)+"</option>\n              "}),__p+='\n              <option value="CUSTOM" ',isCustomReduce&&(__p+="selected"),__p+='>Custom reduce</option>\n            </select>\n            <span class="help-block">Reduce functions are optional.</span>\n          </div>\n\n\n          <div class="control-group reduce-function">\n            <label for="reduce-function">Custom Reduce</label>\n            ',__p+=newView?'\n            <div class="js-editor" id="reduce-function">'+(null==(__t=langTemplates.reduce)?"":__t)+"</div>\n            ":'\n            <div class="js-editor" id="reduce-function">'+(null==(__t=ddoc.get("views")[viewName].reduce)?"":__t)+"</div>\n            ",__p+='\n          </div>\n\n          <div class="control-group">\n            <button class="button green save fonticon-circle-check">Save</button>\n            ',this.newView||(__p+='\n            <button class="button delete outlineGray fonticon-circle-x">Delete</button>\n            '),__p+='\n          </div>\n          <div class="clearfix"></div>\n        </form>\n      </div>\n    </div>\n    <div class="tab-pane" id="metadata">\n      <div id="ddoc-info" class="well"> </div>\n    </div>\n    <div class="tab-pane" id="query">\n    </div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/api_bar.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<button class="button api-url-btn">\n  API URL \n  <span class="fonticon-plus icon"></span>\n</button>\n<div class="api-navbar" style="display: none">\n    <div class="input-prepend input-append">\n      <span class="add-on">\n        API reference\n        <a href="'+(null==(__t=getDocUrl(documentation))?"":__t)+'" target="_blank">\n          <i class="icon-question-sign"></i>\n        </a>\n      </span>\n      <input type="text" class="input-xxlarge" value="'+(null==(__t=endpoint)?"":__t)+'">\n      <a href="'+(null==(__t=endpoint)?"":__t)+'" target="_blank" class="btn">Show me</a>\n    </div>\n</div>\n';return __p},this.JST["app/templates/fauxton/breadcrumbs.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="breadcrumb">\n  ',_.each(_.initial(crumbs),function(a){__p+='\n    <li>\n      <a href="#'+(null==(__t=a.link)?"":__t)+'">'+(null==(__t=a.name)?"":__t)+'</a>\n      <span class="divider fonticon fonticon-carrot"> </span>\n    </li>\n  '}),__p+="\n  ";var last=_.last(crumbs)||{name:""};__p+='\n  <li class="active">'+(null==(__t=last.name)?"":__t)+"</li>\n</ul>\n"}return __p},this.JST["app/templates/fauxton/footer.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<p>Fauxton on <a href="http://couchdb.apache.org/">Apache CouchDB</a> '+(null==(__t=version)?"":__t)+"</p>\n";return __p},this.JST["app/templates/fauxton/index_pagination.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n  <ul>\n    <li ',canShowPreviousfn()||(__p+=' class="disabled" '),__p+='>\n       <a id="previous" href="#"> Previous </a>\n     </li>\n     <li ',canShowNextfn()||(__p+=' class="disabled" '),__p+='>\n       <a id="next" href="#"> Next </a></li>\n  </ul>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/nav_bar.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="brand">\n  <div class="burger">\n    <div><!-- * --></div>\n    <div><!-- * --></div>\n    <div><!-- * --></div>\n  </div>\n  <div class="icon">Apache Fauxton</div>\n</div>\n\n<nav id="main_navigation">\n  <ul id="nav-links" class="nav pull-right">\n    ',_.each(navLinks,function(a){__p+="\n    ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'" >\n          <a href="'+(null==(__t=a.href)?"":__t)+'">\n            <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n            '+(null==(__t=a.title)?"":__t)+"\n          </a>\n        </li>\n    ")}),__p+='\n  </ul>\n\n  <div id="footer-links">\n\n    <ul id="bottom-nav-links" class="nav">\n        <li data-nav-name= "Documentation">\n            <a href="'+(null==(__t=getDocUrl("docs"))?"":__t)+'" target="_blank">\n              <span class="fonticon-bookmark fonticon"></span>\n                Documentation\n            </a>\n        </li>\n\n\n      ',_.each(bottomNavLinks,function(a){__p+="\n      ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n            <a href="'+(null==(__t=a.href)?"":__t)+'">\n              <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n              '+(null==(__t=a.title)?"":__t)+"\n            </a>\n        </li>\n      ")
-}),__p+='\n    </ul>\n\n    <ul id="footer-nav-links" class="nav">\n      ',_.each(footerNavLinks,function(a){__p+="\n      ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n            <a href="'+(null==(__t=a.href)?"":__t)+'">\n              <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n              '+(null==(__t=a.title)?"":__t)+"\n            </a>\n        </li>\n      ")}),__p+="\n    </ul>\n\n  </div>\n</nav>\n\n\n\n";return __p},this.JST["app/templates/fauxton/notification.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="alert alert-'+(null==(__t=type)?"":__t)+'">\n  <button type="button" class="close" data-dismiss="alert">×</button>\n  '+(null==(__t=msg)?"":__t)+"\n</div>\n";return __p},this.JST["app/templates/fauxton/pagination.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n  <ul>\n    ',__p+=page>1?'\n    <li> <a href="'+(null==(__t=urlFun(page-1))?"":__t)+'">&laquo;</a></li>\n    ':'\n      <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&laquo;</a></li>\n    ',__p+="\n    ",_.each(_.range(1,totalPages+1),function(a){__p+="\n      <li ",page==a&&(__p+='class="active"'),__p+='> <a href="'+(null==(__t=urlFun(a))?"":__t)+'">'+(null==(__t=a)?"":__t)+"</a></li>\n    "}),__p+="\n    ",__p+=totalPages>page?'\n      <li><a href="'+(null==(__t=urlFun(page+1))?"":__t)+'">&raquo;</a></li>\n    ':'\n      <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&raquo;</a></li>\n    ',__p+="\n  </ul>\n</div>\n";return __p},this.JST["app/templates/layouts/one_pane.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row"></div>\n    <div id="dashboard-content" class="window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/one_pane_notabs.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n    <div id="dashboard-content" class="window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/two_pane.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row"></div>\n    <div id="left-content" class="span6"></div>\n    <div id="right-content" class="span6"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_right_sidebar.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n  <div class="with-sidebar-right content-area">\n    <div id="dashboard-content" class="list"></div>\n    <div id="sidebar-content" class="sidebar pull-right window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_sidebar.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n<header class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</header>\n  <div class="with-sidebar content-area">\n    <div id="sidebar-content" class="sidebar"></div>\n    <div id="dashboard-content" class="list window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_tabs.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<div class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</div>\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row-fluid"></div>\n    <div id="dashboard-content" class="list span12 window-resizeable"></div>\n  </div>\n\n\n';return __p},this.JST["app/templates/layouts/with_tabs_sidebar.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<header class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</header>\n\n\n  <div class="with-sidebar content-area">\n\n    <div id="tabs" class="row-fluid"></div>\n\n    <aside id="sidebar-content" class="sidebar"></aside>\n\n    <section id="dashboard-content" class="list pull-right window-resizeable">\n      <div class="inner">\n        <div id="dashboard-upper-menu" class="window-resizeable"></div>\n        <div id="dashboard-upper-content"></div>\n\n        <div id="dashboard-lower-content"></div>\n      </div>\n    </section>\n\n  </div>\n\n\n';return __p},this.JST["app/addons/activetasks/templates/detail.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="progress progress-striped active">\n  <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n</div>\n<p>\n	"+(null==(__t=model.get("type").replace("_"," "))?"":__t)+" on\n	"+(null==(__t=model.get("node"))?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/activetasks/templates/table.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===collection.length?"\n   <tr> \n    <td>\n      <p>There are no active tasks for "+(null==(__t=currentView)?"":__t)+" right now.</p>\n    </td>\n  </tr>\n":'\n\n  <thead>\n    <tr>\n      <th data-type="type">Type</th>\n      <th data-type="node">Object</th>\n      <th data-type="started_on">Started on</th>\n      <th data-type="updated_on">Last updated on</th>\n      <th data-type="pid">PID</th>\n      <th data-type="progress" width="200">Status</th>\n    </tr>\n  </thead>\n\n  <tbody id="tasks_go_here">\n\n  </tbody>\n\n',__p+="\n";return __p},this.JST["app/addons/activetasks/templates/tabledetail.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n  '+(null==(__t=model.get("type"))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=objectField)?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=formatDate(model.get("started_on")))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=formatDate(model.get("updated_on")))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=model.get("pid"))?"":__t)+'\n</td>\n<td>\n	<div class="progress progress-striped active">\n	  <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n\n	</div>\n	<p>"+(null==(__t=progress)?"":__t)+" </p>\n</td>\n";return __p},this.JST["app/addons/activetasks/templates/tabs.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n\n\n\n<div id="sidenav">\n  <header class="row-fluid">\n    <h3>Filter by: </h3>\n  </header>\n\n  <nav>\n		<ul class="task-tabs nav nav-list">\n		  ';for(var filter in filters)__p+='\n		      <li data-type="'+(null==(__t=filter)?"":__t)+'">\n			      <a>\n			      		'+(null==(__t=filters[filter])?"":__t)+"\n			      </a>\n		    </li>\n		  ";__p+='\n		</ul>\n		<ul class="nav nav-list views">\n			<li class="nav-header">Polling interval</li>\n			<li>\n				<input id="pollingRange" type="range"\n				       min="1"\n				       max="30"\n				       step="1"\n				       value="5"/>\n				<label for="pollingRange"><span>5</span> second(s)</label>\n			</li>\n		</ul>\n  </nav>\n</div>\n'}return __p},this.JST["app/addons/auth/templates/change_password.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n  <h2> Change Password </h2>\n  <form id="change-password">\n    <p class="help-block">\n    Enter your new password.\n    </p>\n    <input id="password" type="password" name="password" placeholder= "New Password:" size="24">\n    <br/>\n    <input id="password-confirm" type="password" name="password_confirm" placeholder= "Verify New Password" size="24">\n    <button type="submit" class="btn btn-primary">Change</button>\n  </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/create_admin.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n  <h2> Add Admin </h2>\n  <form id="create-admin-form">\n    <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n    <br/>\n    <input id="password" type="password" name="password" placeholder= "Password" size="24">\n    <p class="help-block">\n    Before a server admin is configured, all clients have admin privileges.\n    This is fine when HTTP access is restricted \n    to trusted users. <strong>If end-users will be accessing this CouchDB, you must\n      create an admin account to prevent accidental (or malicious) data loss.</strong>\n    </p>\n    <p class="help-block">Server admins can create and destroy databases, install \n    and update _design documents, run the test suite, and edit all aspects of CouchDB \n    configuration.\n    </p>\n    <p class="help-block">Non-admin users have read and write access to all databases, which\n    are controlled by validation functions. CouchDB can be configured to block all\n    access to anonymous users.\n    </p>\n    <button type="submit" href="#" id="create-admin" class="btn btn-primary">Create Admin</button>\n  </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/login.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span12">\n  <form id="login">\n    <p class="help-block">\n      Login to CouchDB with your name and password.\n    </p>\n    <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n    <br/>\n    <input id="password" type="password" name="password" placeholder= "Password" size="24">\n    <br/>\n    <button id="submit" class="btn" type="submit"> Login </button>\n  </form>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_dropdown.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n<header class="row-fluid">\n  <h3> '+(null==(__t=user.name)?"":__t)+' </h3>\n</header>\n<nav>\n<ul class="nav nav-list">\n  <li class="active" ><a data-select="change-password" id="user-change-password" href="#changePassword"> Change Password </a></li>\n  <li ><a data-select="add-admin" href="#addAdmin"> Create Admins </a></li>\n</ul>\n</nav>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_link_title.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+=admin_party?'\n  <a id="user-create-admin" href="#createAdmin"> \n  	<span class="fonticon-user fonticon"></span>\n  	Admin Party! \n  </a>\n':user?'\n  <a  href="#changePassword" >\n  	<span class="fonticon-user fonticon"></span> \n  	'+(null==(__t=user.name)?"":__t)+" \n	</a>\n":'\n  <a  href="#login" >  \n  	<span class="fonticon-user fonticon"></span> \n  	Login \n  </a>\n',__p+="\n\n\n";return __p},this.JST["app/addons/auth/templates/noAccess.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div class="span12">\n  <h2> Access Denied </h2>\n  <p> You do not have permission to view this page. <br/> You might need to <a href="#login"> login </a> to view this page/ </p>\n  \n</div>\n';return __p},this.JST["app/addons/compaction/templates/compact_view.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\nCompact View\n';return __p},this.JST["app/addons/compaction/templates/layout.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n  <div class="span12 compaction-option">\n    <h3> Compact Database </h3>\n    <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>\n    <button id="compact-db" class="btn btn-large btn-primary"> Run </button>\n  </div>\n</div>\n\n<div class="row">\n  <div class="span12 compaction-option">\n    <h3> Cleanup Views </h3>\n    <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>\n    <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>\n  </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/dashboard.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row">\n  <div class="span2 offset10">\n    <button id="add-section" href="#" class="button button-margin">\n      <i class="icon-plus icon-white"> </i>\n      Add Section\n    </button>\n  </div>\n</div>\n<table class="config table table-striped table-bordered">\n  <thead>\n    <th> Section </th>\n    <th> Option </th>\n    <th> Value </th>\n    <th></th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n<div id="add-section-modal" class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Create Config Option</h3>\n  </div>\n  <div class="modal-body">\n    <form id="add-section-form" class="form well">\n      <label>Section</label>\n      <input type="text" name="section" placeholder="Section">\n      <span class="help-block">Enter an existing section name to add to it.</span>\n      <input type="text" name="name" placeholder="Name">\n      <br/>\n      <input type="text" name="value" placeholder="Value">\n      <div class="modal-footer">\n        <button type="button" class="btn" data-dismiss="modal">Cancel</button>\n        <button type="submit" class="btn btn-primary"> Save </button>\n      </div>\n    </form>\n  </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/item.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===option.index?"\n<th> "+(null==(__t=option.section)?"":__t)+" </th>\n":"\n<td></td>\n",__p+="\n<td> "+(null==(__t=option.name)?"":__t)+' </td>\n<td>\n  <div id="show-value">\n    '+(null==(__t=option.value)?"":__t)+' <button class="edit-button"> Edit </button>\n  </div>\n  <div id="edit-value-form" style="display:none">\n    <input class="value-input" type="text" value="'+(null==(__t=option.value)?"":__t)+'" />\n    <button id="save-value" class="btn btn-success btn-small"> Save </button>\n    <button id="cancel-value" class="btn btn-danger btn-small"> Cancel </button>\n  </div>\n</td>\n<td id="delete-value"> <i class="icon-trash"> </i> </td>\n';return __p},this.JST["app/addons/exampleAuth/templates/noAccess.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid" >\n  <div class="span6 offset4">\n  <h3> You do not have permission to view this page </h3>\n</div>\n</div>\n';return __p},this.JST["app/addons/logs/templates/dashboard.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n <h2> CouchDB Logs </h2>\n  <table class="table table-bordered" >\n  <thead>\n    <tr>\n      <th class="Date">Date</th>\n      <th class="Log Level">Log Value</th>\n      <th class="Pid">Pid</th>\n      <th class="Args">Url</th>\n    </tr>\n  </thead>\n\n  <tbody>\n    ',logs.each(function(a){__p+='\n    <tr class="'+(null==(__t=a.logLevel())?"":__t)+'">\n      <td>\n        <!-- TODO: better format the date -->\n        '+(null==(__t=a.date())?"":__t)+"\n      </td>\n      <td>\n        "+(null==(__t=a.logLevel())?"":__t)+"\n      </td>\n      <td>\n        "+(null==(__t=a.pid())?"":__t)+"\n      </td>\n      <td>\n        <!-- TODO: split the line, maybe put method in it's own column -->\n        "+(null==(__t=a.args())?"":__t)+"\n      </td>\n    </tr>\n    "}),__p+="\n  </tbody>\n</table>\n";return __p},this.JST["app/addons/logs/templates/filterItem.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span class="label label-info"> '+(null==(__t=filter)?"":__t)+'  </span>\n<a class="label label-info remove-filter" href="#">&times;</a>\n';return __p},this.JST["app/addons/logs/templates/sidebar.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="log-sidebar">\n  <header>Log Filter</header>\n  <form class="form-inline" id="log-filter-form">\n    <fieldset>\n      <input type="text" name="filter" placeholder="Type a filter to sort the logs by">\n      <!-- TODO: filter by method -->\n      <!-- TODO: correct removed filter behaviour -->\n      <button type="submit" class="btn">Filter</button>\n      <span class="help-block"> <h6> Eg. debug or <1.4.1> or any regex </h6> </span>\n    </fieldset>\n  </form>\n  <ul id="filter-list"></ul>\n</div>\n';
-return __p},this.JST["app/addons/permissions/templates/item.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span> '+(null==(__t=item)?"":__t)+' </span>\n<button type="button" class="close">&times;</button>\n\n';return __p},this.JST["app/addons/permissions/templates/permissions.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sections"> </div>\n';return __p},this.JST["app/addons/permissions/templates/section.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<header class="border-hdr">\n<h3> '+(null==(__t=section)?"":__t)+' </h3>\n<p id="help"> '+(null==(__t=help)?"":__t)+' <a href="'+(null==(__t=getDocUrl("database_permission"))?"":__t)+'" target="_blank"><i class="icon-question-sign"> </i> </a></p>\n</header>\n\n<div class="row">\n  <div class="span6">\n    <header>\n      <h4> Users </h4>\n      <p>Specify users who will have '+(null==(__t=section)?"":__t)+' access to this database.</p>\n    </header>\n    <form class="permission-item-form form-inline">\n      <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="names" type="text" class="item input-small" placeholder="Add Name">\n      <button type="submit" class="button btn green fonticon-circle-plus">Add Name</button>\n    </form>\n    <ul class="clearfix unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-names">\n    </ul>\n  </div>\n  <div class="span6">\n    <header>\n      <h4> Roles </h4>\n      <p>All users under the following role(s) will have '+(null==(__t=section)?"":__t)+' access.</p>\n    </header>\n\n\n    <form class="permission-item-form form-inline">\n      <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="roles" type="text" class="item input-small" placeholder="Add Role">\n      <button type="submit" class="button btn green fonticon-circle-plus">Add Role</button>\n    </form>\n    <ul class="unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-roles">\n    </ul>\n  </div>\n</div>\n';return __p},this.JST["app/addons/plugins/templates/plugins.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\n\nLicensed under the Apache License, Version 2.0 (the "License"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n-->\n    <div id="content">\n      <div class="row">\n        <h2>GeoCouch</h2>\n        <p>Version: <strong>couchdb1.2.x_v0.3.0-11-g66e6219</strong></p>\n        <p>Author: Volker Mische</p>\n        <p>\n          Available Erlang Versions:\n          <ul>\n            <li>CouchDB 1.4.0-XXX R15B01</li>\n          </ul>\n        </p>\n        <p>\n          <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"D5QPhrJTAifM42DXqAj4RxzfEtI="}}\' data-name="geocouch" data-version="couchdb1.2.x_v0.3.0-16-g66e6219">Install GeoCouch Now</button>\n        </p>\n      </div>\n      <div class="row">\n        <h2>CouchPerUser</h2>\n        <p>Version: <strong>1.0.0</strong></p>\n        <p>Author: Bob Ippolito</p>\n        <p>\n          Available Erlang Versions:\n          <ul>\n            <li>CouchDB 1.4.0-XXX R15B01</li>\n          </ul>\n        </p>\n        <p>\n          <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"Aj3mjC6M75NA62q5/xkP0tl8Hws="}}\' data-name="couchperuser" data-version="1.0.0">Install CouchPerUser Now</button>\n        </p>\n      </div>\n    </div>\n  </div></body>\n  <script>\n    $(\'.install-plugin\').each(function() {\n      var button = $(this);\n      var name = button.data(\'name\');\n      var version = button.data(\'version\');\n      $.get("/_config/plugins/" + name + "/", function(body, textStatus) {\n        body = JSON.parse(body);\n        if(body == version) {\n          button.html(\'Already Installed. Click to Uninstall\');\n          button.data(\'delete\', true);\n        } else {\n          button.html(\'Other Version Installed: \' + body);\n          button.attr(\'disabled\', true);\n        }\n      });\n    });\n\n    $(\'.install-plugin\').click(function(event) {\n      var button = $(this);\n      var delete_plugin = button.data(\'delete\') || false;\n      var plugin_spec = JSON.stringify({\n        name: button.data(\'name\'),\n        url: button.data(\'url\'),\n        version: button.data(\'version\'),\n        checksums: button.data(\'checksums\'),\n        "delete": delete_plugin\n      });\n      var url = \'/_plugins\'\n      $.ajax({\n        url: url,\n        type: \'POST\',\n        data: plugin_spec,\n        contentType: \'application/json\', // what we send to the server\n        dataType: \'json\', // expected from the server\n        processData: false, // keep our precious JSON\n        success: function(data, textStatus, jqXhr) {\n          if(textStatus == "success") {\n            var action = delete_plugin ? \'Uninstalled\' : \'Installed\';\n            button.html(\'Sucessfully \' + action);\n            button.attr(\'disabled\', true);\n          } else {\n            button.html(textStatus);\n          }\n        },\n        beforeSend: function(xhr) {\n          xhr.setRequestHeader(\'Accept\', \'application/json\');\n        },\n      });\n    });\n  </script>\n  <style type="text/css">\n  .row {\n    background-color: #FFF;\n    padding:1em;\n    margin-bottom:1em;\n  }\n  </style>';return __p},this.JST["app/addons/recipes/templates/container.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<ul class="nav nav-tabs recipe-nav">\n  <li class="recipes-list">\n    <a href="#/recipes">Recipes</a>\n  </li>\n  <li class="recipes-new"><a href="#/recipes/new">New Recipe</a></li>\n  <li><a href="#/recipes/ingredients">Ingredients</a></li>\n</ul>\n<div id="recipes-content"></div>\n';return __p},this.JST["app/addons/recipes/templates/item.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\n<div data-id="'+(null==(__t=recipe._id)?"":__t)+'" class="recipe row">\n  <div class="span12">\n    <div class="row">\n      <div class="span12">\n        <h4><strong><a href="#">'+(null==(__t=recipe.title)?"":__t)+'</a></strong></h4>\n      </div>\n    </div>\n    <div class="row">\n      <div class="span4">\n        <a href="#" class="thumbnail">\n          <img src="http://placehold.it/260x180" alt="">\n        </a>\n      </div>\n      <div class="span8">\n        <p>'+(null==(__t=recipe.description)?"":__t)+'</p>\n        <p><a class="btn" href="#">Read more</a></p>\n      </div>\n    </div>\n    <div class="row">\n      <div class="span12">\n        <p></p>\n        <p>\n          <i class="icon-user"></i> by <a href="#">John</a> \n          | <i class="icon-calendar"></i> Sept 16th, 2012\n          | <i class="icon-comment"></i> <a href="#">3 Comments</a>\n          | <i class="icon-share"></i> <a href="#">39 Shares</a>\n          | <i class="icon-tags"></i> Tags\n          : <a href="#"><span class="label\n          label-info">Snipp</span></a> \n          <a href="#"><span class="label\n          label-info">Bootstrap</span></a> \n          <a href="#"><span class="label label-info">UI</span></a> \n          <a href="#"><span class="label label-info">growth</span></a>\n        </p>\n      </div>\n    </div>\n  </div>\n</div>\n<hr>\n-->\n<div class="media row">\n  <div class="span4">\n    <a class="pull-left" href="'+(null==(__t=url)?"":__t)+'">\n      <img class="media-object" src="'+(null==(__t=recipe.image())?"":__t)+'">\n    </a>\n  </div>\n  <div class="media-body span8">\n    <h3 class="media-heading clearfix">\n      <strong><a href="'+(null==(__t=url)?"":__t)+'">'+(null==(__t=recipe.dget("title"))?"":__t)+"</a></strong>\n    </h3>\n    "+(null==(__t=recipe.dget("description"))?"":__t)+'\n        <p></p>\n        <p>\n          <i class="icon-user"></i> by <a href="#">John</a> \n          | <i class="icon-calendar"></i> Sept 16th, 2012\n          | <i class="icon-comment"></i> <a href="#">3 Comments</a>\n          | <i class="icon-share"></i> <a href="#">39 Shares</a>\n          | <i class="icon-tags"></i> Tags\n          : <a href="#"><span class="label\n          label-info">Snipp</span></a> \n          <a href="#"><span class="label\n          label-info">Bootstrap</span></a> \n          <a href="#"><span class="label label-info">UI</span></a> \n          <a href="#"><span class="label label-info">growth</span></a>\n        </p>\n  </div>\n</div>\n<hr>\n';return __p},this.JST["app/addons/recipes/templates/list.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<div id="recipes"></div>\n';return __p},this.JST["app/addons/recipes/templates/new.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<form class="new-recipe">\n  <fieldset>\n    <legend>Add a new recipe</legend>\n    <input class="input-xxlarge" type="text" id="recipe-title" name="title" placeholder="Recipe Title…" value="'+(null==(__t=recipe.get("title"))?"":__t)+'">\n    <label>Description</label>\n    <textarea placeholder="Recipe Description" class="input-xxlarge" name="description" id="recipe-description" rows="5"></textarea>\n    <label>Remote Recipe URL</label>\n    <input class="input-xxlarge" type="text" id="recipe-url" name="url" placeholder="URL…">\n    <label>Recipe Source</label>\n    <input class="input-xxlarge" type="text" id="recipe-source" name="source" placeholder="Recipe source, name, url, magazine, etc">\n    <span class="help-block">Save your recipe first then you can add pictures.</span>\n    <label class="checkbox">\n      <input type="checkbox"> Check me out\n    </label>\n  </fieldset>\n  <fieldset>\n    <legend>Ingredients</legend>\n    <div class="ingredients">\n      ',_.each(recipe.get("ingredients"),function(a){__p+='\n          <input type="text" class="input-xxlarge" name="ingredients[]" value="'+(null==(__t=a)?"":__t)+'" placeholder="Ingredient">\n          <a href="#"><i class="icon-trash"></i></a>\n      '}),__p+='\n    </div>\n    <p>\n      <button type="button" class="add-ingredient btn">Add Ingredient</button>\n    </p>\n  </fieldset>\n  <label>Steps</label>\n  <textarea placeholder="Recipe Steps" class="input-xxlarge" name="steps" id="recipe-steps" rows="5"></textarea>\n  <fieldset>\n    <button type="submit" class="btn">Create</button>\n  </fieldset>\n</form>\n<div id="upload-modal"></div>\n';return __p},this.JST["app/addons/recipes/templates/recipe.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<div class="media row">\n  <div class="span8">\n    <a class="pull-left" href="#">\n      <img class="media-object" src="'+(null==(__t=recipe.image())?"":__t)+'">\n    </a>\n  </div>\n  <div class="media-body span8">\n    <h3 class="media-heading clearfix">\n      <strong><a href="#">'+(null==(__t=recipe.dget("title"))?"":__t)+"</a></strong>\n    </h3>\n    "+(null==(__t=recipe.dget("description"))?"":__t)+'\n        <p></p>\n        <p>\n          <i class="icon-user"></i> by <a href="#">John</a> \n          | <i class="icon-calendar"></i> Sept 16th, 2012\n          | <i class="icon-comment"></i> <a href="#">3 Comments</a>\n          | <i class="icon-share"></i> <a href="#">39 Shares</a>\n          | <i class="icon-tags"></i> Tags\n          : <a href="#"><span class="label\n          label-info">Snipp</span></a> \n          <a href="#"><span class="label\n          label-info">Bootstrap</span></a> \n          <a href="#"><span class="label label-info">UI</span></a> \n          <a href="#"><span class="label label-info">growth</span></a>\n        </p>\n  </div>\n</div>\n\n',url&&(__p+='\n  <h4>URL: <a href="'+(null==(__t=url)?"":__t)+'">'+(null==(__t=url)?"":__t)+"</a></h4>\n"),__p+="\n",recipe.dget("source")&&(__p+="\n  <h4>Source: "+(null==(__t=recipe.dget("source"))?"":__t)+"</h4>\n"),__p+="\n\n",recipe.ingredients()&&(__p+='\n  <div class="page-header">\n    <h2>Ingredients</h2>\n  </div>\n  <div class="row recipe-ingredients">\n    ',_.each(recipe.ingredients(),function(a){__p+="\n      <p>"+(null==(__t=a)?"":__t)+"</p>\n    "}),__p+="\n  </div>\n"),__p+="\n\n",recipe.steps()&&(__p+='\n  <div class="page-header">\n    <h2>Steps</h2>\n  </div>\n  <div class="row recipe-steps">\n    ',_.each(recipe.steps(),function(a){__p+="\n      <p>"+(null==(__t=a)?"":__t)+"</p>\n    "}),__p+="\n  </div>\n"),__p+="\n<hr>\n";return __p},this.JST["app/addons/replication/templates/form.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="replication" class="form-horizontal">\n		<div class="from form_set  local">\n			<div class="btn-group">\n			  <button class="btn local-btn" type="button" value="local">Local</button>\n			  <button class="btn remote-btn" type="button" value="remote">Remote</button>\n			</div>\n\n			<div class="from_local local_option">\n				<select id="from_name" name="source">\n					',_.each(databases,function(a){__p+='\n					   <option value="'+(null==(__t=a.name)?"":__t)+'" ',selectedDB==a.name&&(__p+="selected"),__p+=" >"+(null==(__t=a.name)?"":__t)+"</option>\n					"}),__p+='\n				</select>\n			</div>\n			<div class="from_to_remote remote_option">\n				<input type="text" id="from_url" name="source" size="30" value="http://">\n			</div>\n		</div>\n\n		<div class="form_set middle">\n			<span class="circle "></span>\n				<a href="#" title="Switch Target and Source" class="swap">\n					<span class="fonticon-swap-arrows"></span>\n				</a>\n			</span>\n		</div>\n\n		<div class="to form_set local">\n			<div class="btn-group">\n			  <button class="btn local-btn" type="button" value="local">Local</button>\n			  <button class="btn remote-btn" type="button" value="remote">Remote</button>\n			</div>\n			<div class="to_local local_option">\n				<input type="text" id="to_name" name="target" size="30" placeholder="database name">\n			</div>\n\n			<div class="to_remote remote_option">\n				<input type="text" id="to_url" name="target" size="30" value="http://">\n			</div>\n		</div>\n\n\n	<div class="actions">\n		<div class="control-group">\n			<label for="continuous">\n				<input type="checkbox" name="continuous" value="true" id="continuous">\n				Continuous\n			</label>\n\n			<label for="createTarget">\n				<input type="checkbox" name="create_target" value="true" id="createTarget">\n				Create Target <a href="'+(null==(__t=getDocUrl("replication_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign" rel="tooltip" title="Create the target database"></i></a>\n			</label>\n		</div>\n\n		<button class="btn btn-success btn-large save" type="submit">Replicate</button>\n	</div>\n</form>\n\n<div id="replicationStatus"></div>\n';return __p},this.JST["app/addons/replication/templates/progress.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<p class="span6 break">Replicating <strong>'+(null==(__t=source)?"":__t)+"</strong> to <strong>"+(null==(__t=target)?"":__t)+'</strong></p>\n\n<div class="span4 progress progress-striped active">\n  <div class="bar" style="width: '+(null==(__t=progress||0)?"":__t)+'%;">'+(null==(__t=progress||"0")?"":__t)+'%</div>\n</div>\n\n<span class="span1">\n	<button class="cancel btn btn-danger btn-large delete" data-source="'+(null==(__t=source)?"":__t)+'"  data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Cancel</a>\n</span>\n';return __p},this.JST["app/addons/stats/templates/by_method.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<h2>By Method <small>GET, POST, PUT, DELETE</small></h2>\n<div id="httpd_request_methods"></div>\n';return __p},this.JST["app/addons/stats/templates/pie_table.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n    <h2>  '+(null==(__t=datatype)?"":__t)+' </h2>\n</div>\n\n<div class="row-fluid">\n  <div>\n    <table class="table table-condensed table-striped">\n      <thead>\n        <tr>\n          <th> Description </th>\n          <th> current </th>\n          <th>  sum </th>\n          <th>  mean </th>\n          <th>  stddev </th>\n          <th>  min </th>\n          <th>  max </th>\n        </tr>\n      </thead>\n      ',_.each(statistics,function(a){a.get("sum")&&(__p+="\n      <tr>\n        <td>"+(null==(__t=a.get("description"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("current"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("sum"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("mean"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("stddev"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("min"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("max"))?"":__t)+"</td>\n      </tr>\n      ")}),__p+='\n    </table>\n  </div>\n\n  <div class="span4" style="height:430px;min-width: 430px">\n    <center>\n      <svg id="'+(null==(__t=datatype)?"":__t)+'_graph"></svg>\n    </center>\n  </div>\n</div>\n';return __p},this.JST["app/addons/stats/templates/stats.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="datatypes">\n</div>\n';return __p},this.JST["app/addons/stats/templates/statselect.html"]=function(obj){obj||(obj={});var __t,__p="";with(_.escape,Array.prototype.join,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',_.each(datatypes,function(a){__p+='\n<li> \n<a href="#stats" class="datatype-select" data-type-select="'+(null==(__t=a)?"":__t)+'"> \n  '+(null==(__t=a)?"":__t)+'\n  <i class="icon-chevron-right" style="float:right"></i>\n</a>\n</li>\n'}),__p+="\n";return __p},this.JST["app/addons/verifyinstall/templates/main.html"]=function(obj){obj||(obj={});var __p="";with(_.escape,obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<button id="start" class="btn btn-large btn-success"> Verify Installation </button>\n<div id="error"> </div>\n\n<table id="test-score" class="table table-striped table-bordered" >\n  <thead>\n    <tr>\n      <th> Test </th>\n      <th> Status </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td> Create Database </td>\n      <td id="create-database" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Create Document </td>\n      <td id="create-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Update Document </td>\n      <td id="update-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Delete Document </td>\n      <td id="delete-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Create View </td>\n      <td id="create-view" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Replication </td>\n      <td id="replicate" class="status">  </td>\n    </tr>\n  </tbody>\n</table>\n';return __p},function(a,b){function c(a){var b=a.length,c=kb.type(a);return kb.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){var b=zb[a]={};return kb.each(a.match(mb)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(kb.acceptData(a)){var f,g,h=kb.expando,i=a.nodeType,j=i?kb.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||d!==b||"string"!=typeof c)return k||(k=i?a[h]=bb.pop()||kb.guid++:h),j[k]||(j[k]=i?{}:{toJSON:kb.noop}),("object"==typeof c||"function"==typeof c)&&(e?j[k]=kb.extend(j[k],c):j[k].data=kb.extend(j[k].data,c)),g=j[k],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[kb.camelCase(c)]=d),"string"==typeof c?(f=g[c],null==f&&(f=g[kb.camelCase(c)])):f=g,f}}function f(a,b,c){if(kb.acceptData(a)){var d,e,f=a.nodeType,g=f?kb.cache:a,i=f?a[kb.expando]:kb.expando;if(g[i]){if(b&&(d=c?g[i]:g[i].data)){kb.isArray(b)?b=b.concat(kb.map(b,kb.camelCase)):b in d?b=[b]:(b=kb.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!h(d):!kb.isEmptyObject(d))return}(c||(delete g[i].data,h(g[i])))&&(f?kb.cleanData([a],!0):kb.support.deleteExpando||g!=g.window?delete g[i]:g[i]=null)}}}function g(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(Bb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Ab.test(d)?kb.parseJSON(d):d}catch(f){}kb.data(a,c,d)}else d=b}return d}function h(a){var b;for(b in a)if(("data"!==b||!kb.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function i(){return!0}function j(){return!1}function k(){try{return Y.activeElement}catch(a){}}function l(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function m(a,b,c){if(kb.isFunction(b))return kb.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return kb.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(Qb.test(b))return kb.filter(b,a,c);b=kb.filter(b,a)}return kb.grep(a,function(a){return kb.inArray(a,b)>=0!==c})}function n(a){var b=Ub.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function o(a,b){return kb.nodeName(a,"table")&&kb.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function p(a){return a.type=(null!==kb.find.attr(a,"type"))+"/"+a.type,a}function q(a){var b=ec.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function r(a,b){for(var c,d=0;null!=(c=a[d]);d++)kb._data(c,"globalEval",!b||kb._data(b[d],"globalEval"))}function s(a,b){if(1===b.nodeType&&kb.hasData(a)){var c,d,e,f=kb._data(a),g=kb._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)kb.event.add(b,c,h[c][d])}g.data&&(g.data=kb.extend({},g.data))}}function t(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!kb.support.noCloneEvent&&b[kb.expando]){e=kb._data(b);for(d in e.events)kb.removeEvent(b,d,e.handle);b.removeAttribute(kb.expando)}"script"===c&&b.text!==a.text?(p(b).text=a.text,q(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),kb.support.html5Clone&&a.innerHTML&&!kb.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&bc.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function u(a,c){var d,e,f=0,g=typeof a.getElementsByTagName!==W?a.getElementsByTagName(c||"*"):typeof a.querySelectorAll!==W?a.querySelectorAll(c||"*"):b;if(!g)for(g=[],d=a.childNodes||a;null!=(e=d[f]);f++)!c||kb.nodeName(e,c)?g.push(e):kb.merge(g,u(e,c));return c===b||c&&kb.nodeName(a,c)?kb.merge([a],g):g}function v(a){bc.test(a.type)&&(a.defaultChecked=a.checked)}function w(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=yc.length;e--;)if(b=yc[e]+c,b in a)return b;return d}function x(a,b){return a=b||a,"none"===kb.css(a,"display")||!kb.contains(a.ownerDocument,a)}function y(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=kb._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&x(d)&&(f[g]=kb._data(d,"olddisplay",C(d.nodeName)))):f[g]||(e=x(d),(c&&"none"!==c||!e)&&kb._data(d,"olddisplay",e?c:kb.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function z(a,b,c){var d=rc.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=kb.css(a,c+xc[f],!0,e)),d?("content"===c&&(g-=kb.css(a,"padding"+xc[f],!0,e)),"margin"!==c&&(g-=kb.css(a,"border"+xc[f]+"Width",!0,e))):(g+=kb.css(a,"padding"+xc[f],!0,e),"padding"!==c&&(g+=kb.css(a,"border"+xc[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=kc(a),g=kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=lc(a,b,f),(0>e||null==e)&&(e=a.style[b]),sc.test(e))return e;d=g&&(kb.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a){var b=Y,c=uc[a];return c||(c=D(a,b),"none"!==c&&c||(jc=(jc||kb("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jc[0].contentWindow||jc[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),c=D(a,b),jc.detach()),uc[a]=c),c}function D(a,b){var c=kb(b.createElement(a)).appendTo(b.body),d=kb.css(c[0],"display");return c.remove(),d}function E(a,b,c,d){var e;if(kb.isArray(b))kb.each(b,function(b,e){c||Ac.test(a)?d(a,e):E(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==kb.type(b))d(a,b);else for(e in b)E(a+"["+e+"]",b[e],c,d)}function F(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(mb)||[];if(kb.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function G(a,b,c,d){function e(h){var i;return f[h]=!0,kb.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rc;return e(b.dataTypes[0])||!f["*"]&&e("*")}function H(a,c){var d,e,f=kb.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&kb.extend(!0,a,d),a}function I(a,c,d){for(var e,f,g,h,i=a.contents,j=a.dataTypes;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function J(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)
-}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function K(){try{return new a.XMLHttpRequest}catch(b){}}function L(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function M(){return setTimeout(function(){$c=b}),$c=kb.now()}function N(a,b,c){for(var d,e=(ed[b]||[]).concat(ed["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function O(a,b,c){var d,e,f=0,g=dd.length,h=kb.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$c||M(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:kb.extend({},b),opts:kb.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$c||M(),duration:c.duration,tweens:[],createTween:function(b,c){var d=kb.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(P(k,j.opts.specialEasing);g>f;f++)if(d=dd[f].call(j,a,k,j.opts))return d;return kb.map(k,N,j),kb.isFunction(j.opts.start)&&j.opts.start.call(a,j),kb.fx.timer(kb.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function P(a,b){var c,d,e,f,g;for(c in a)if(d=kb.camelCase(c),e=b[d],f=a[c],kb.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=kb.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Q(a,b,c){var d,e,f,g,h,i,j=this,k={},l=a.style,m=a.nodeType&&x(a),n=kb._data(a,"fxshow");c.queue||(h=kb._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,j.always(function(){j.always(function(){h.unqueued--,kb.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[l.overflow,l.overflowX,l.overflowY],"inline"===kb.css(a,"display")&&"none"===kb.css(a,"float")&&(kb.support.inlineBlockNeedsLayout&&"inline"!==C(a.nodeName)?l.zoom=1:l.display="inline-block")),c.overflow&&(l.overflow="hidden",kb.support.shrinkWrapBlocks||j.always(function(){l.overflow=c.overflow[0],l.overflowX=c.overflow[1],l.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ad.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(m?"hide":"show"))continue;k[d]=n&&n[d]||kb.style(a,d)}if(!kb.isEmptyObject(k)){n?"hidden"in n&&(m=n.hidden):n=kb._data(a,"fxshow",{}),f&&(n.hidden=!m),m?kb(a).show():j.done(function(){kb(a).hide()}),j.done(function(){var b;kb._removeData(a,"fxshow");for(b in k)kb.style(a,b,k[b])});for(d in k)g=N(m?n[d]:0,d,j),d in n||(n[d]=g.start,m&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function R(a,b,c,d,e){return new R.prototype.init(a,b,c,d,e)}function S(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=xc[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function T(a){return kb.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var U,V,W=typeof b,X=a.location,Y=a.document,Z=Y.documentElement,$=a.jQuery,_=a.$,ab={},bb=[],cb="1.10.2",db=bb.concat,eb=bb.push,fb=bb.slice,gb=bb.indexOf,hb=ab.toString,ib=ab.hasOwnProperty,jb=cb.trim,kb=function(a,b){return new kb.fn.init(a,b,V)},lb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,mb=/\S+/g,nb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ob=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,pb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,qb=/^[\],:{}\s]*$/,rb=/(?:^|:|,)(?:\s*\[)+/g,sb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,tb=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ub=/^-ms-/,vb=/-([\da-z])/gi,wb=function(a,b){return b.toUpperCase()},xb=function(a){(Y.addEventListener||"load"===a.type||"complete"===Y.readyState)&&(yb(),kb.ready())},yb=function(){Y.addEventListener?(Y.removeEventListener("DOMContentLoaded",xb,!1),a.removeEventListener("load",xb,!1)):(Y.detachEvent("onreadystatechange",xb),a.detachEvent("onload",xb))};kb.fn=kb.prototype={jquery:cb,constructor:kb,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ob.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof kb?c[0]:c,kb.merge(this,kb.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:Y,!0)),pb.test(e[1])&&kb.isPlainObject(c))for(e in c)kb.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=Y.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=Y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):kb.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),kb.makeArray(a,this))},selector:"",length:0,toArray:function(){return fb.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){var b=kb.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return kb.each(this,a,b)},ready:function(a){return kb.ready.promise().done(a),this},slice:function(){return this.pushStack(fb.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},map:function(a){return this.pushStack(kb.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:eb,sort:[].sort,splice:[].splice},kb.fn.init.prototype=kb.fn,kb.extend=kb.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||kb.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(kb.isPlainObject(d)||(c=kb.isArray(d)))?(c?(c=!1,g=a&&kb.isArray(a)?a:[]):g=a&&kb.isPlainObject(a)?a:{},h[e]=kb.extend(k,g,d)):d!==b&&(h[e]=d));return h},kb.extend({expando:"jQuery"+(cb+Math.random()).replace(/\D/g,""),noConflict:function(b){return a.$===kb&&(a.$=_),b&&a.jQuery===kb&&(a.jQuery=$),kb},isReady:!1,readyWait:1,holdReady:function(a){a?kb.readyWait++:kb.ready(!0)},ready:function(a){if(a===!0?!--kb.readyWait:!kb.isReady){if(!Y.body)return setTimeout(kb.ready);kb.isReady=!0,a!==!0&&--kb.readyWait>0||(U.resolveWith(Y,[kb]),kb.fn.trigger&&kb(Y).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===kb.type(a)},isArray:Array.isArray||function(a){return"array"===kb.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?ab[hb.call(a)]||"object":typeof a},isPlainObject:function(a){var c;if(!a||"object"!==kb.type(a)||a.nodeType||kb.isWindow(a))return!1;try{if(a.constructor&&!ib.call(a,"constructor")&&!ib.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(kb.support.ownLast)for(c in a)return ib.call(a,c);for(c in a);return c===b||ib.call(a,c)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Y;var d=pb.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=kb.buildFragment([a],b,e),e&&kb(e).remove(),kb.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=kb.trim(b),b&&qb.test(b.replace(sb,"@").replace(tb,"]").replace(rb,"")))?new Function("return "+b)():(kb.error("Invalid JSON: "+b),void 0)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||kb.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&kb.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(ub,"ms-").replace(vb,wb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:jb&&!jb.call(" ")?function(a){return null==a?"":jb.call(a)}:function(a){return null==a?"":(a+"").replace(nb,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?kb.merge(d,"string"==typeof a?[a]:a):eb.call(d,a)),d},inArray:function(a,b,c){var d;if(b){if(gb)return gb.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&(i[i.length]=e);else for(f in a)e=b(a[f],f,d),null!=e&&(i[i.length]=e);return db.apply([],i)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(f=a[c],c=a,a=f),kb.isFunction(a)?(d=fb.call(arguments,2),e=function(){return a.apply(c||this,d.concat(fb.call(arguments)))},e.guid=a.guid=a.guid||kb.guid++,e):b},access:function(a,c,d,e,f,g,h){var i=0,j=a.length,k=null==d;if("object"===kb.type(d)){f=!0;for(i in d)kb.access(a,c,i,d[i],!0,g,h)}else if(e!==b&&(f=!0,kb.isFunction(e)||(h=!0),k&&(h?(c.call(a,e),c=null):(k=c,c=function(a,b,c){return k.call(kb(a),c)})),c))for(;j>i;i++)c(a[i],d,h?e:e.call(a[i],i,c(a[i],d)));return f?a:k?c.call(a):j?c(a[0],d):g},now:function(){return(new Date).getTime()},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),kb.ready.promise=function(b){if(!U)if(U=kb.Deferred(),"complete"===Y.readyState)setTimeout(kb.ready);else if(Y.addEventListener)Y.addEventListener("DOMContentLoaded",xb,!1),a.addEventListener("load",xb,!1);else{Y.attachEvent("onreadystatechange",xb),a.attachEvent("onload",xb);var c=!1;try{c=null==a.frameElement&&Y.documentElement}catch(d){}c&&c.doScroll&&function e(){if(!kb.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}yb(),kb.ready()}}()}return U.promise(b)},kb.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){ab["[object "+b+"]"]=b.toLowerCase()}),V=kb(Y),function(a,b){function c(a,b,c,d){var e,f,g,h,i,j,k,l,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(I&&!d){if(e=tb.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return ab.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&x.getElementsByClassName&&b.getElementsByClassName)return ab.apply(c,b.getElementsByClassName(g)),c}if(x.qsa&&(!J||!J.test(a))){if(l=k=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=m(a),(k=b.getAttribute("id"))?l=k.replace(wb,"\\$&"):b.setAttribute("id",l),l="[id='"+l+"'] ",i=j.length;i--;)j[i]=l+n(j[i]);o=nb.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return ab.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return v(a.replace(jb,"$1"),b,c,d)}function d(){function a(c,d){return b.push(c+=" ")>z.cacheLength&&delete a[b.shift()],a[c]=d}var b=[];return a}function e(a){return a[N]=!0,a}function f(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)z.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||X)-(~a.sourceIndex||X);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(){}function m(a,b){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=z.preFilter;h;){(!d||(e=lb.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=mb.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(jb," ")}),h=h.slice(d.length));for(g in z.filter)!(e=rb[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return b?h.length:h?c.error(a):S(a,i).slice(0)}function n(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function o(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=P+" "+f;if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e)if(j=b[N]||(b[N]={}),(i=j[d])&&i[0]===k){if((h=i[1])===!0||h===y)return h===!0}else if(i=j[d]=[k],i[1]=a(b,c,g)||y,i[1]===!0)return!0}}function p(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function r(a,b,c,d,f,g){return d&&!d[N]&&(d=r(d)),f&&!f[N]&&(f=r(f,g)),e(function(e,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=e||u(b||"*",h.nodeType?[h]:h,[]),r=!a||!e&&b?p:q(p,m,a,h,i),s=c?f||(e?a:o||d)?[]:g:r;if(c&&c(r,s,h,i),d)for(j=q(s,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(s[n[k]]=!(r[n[k]]=l));if(e){if(f||a){if(f){for(j=[],k=s.length;k--;)(l=s[k])&&j.push(r[k]=l);f(null,s=[],j,i)}for(k=s.length;k--;)(l=s[k])&&(j=f?cb.call(e,l):m[k])>-1&&(e[j]=!(g[j]=l))}}else s=q(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):ab.apply(g,s)})}function s(a){for(var b,c,d,e=a.length,f=z.relative[a[0].type],g=f||z.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return cb.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];e>h;h++)if(c=z.relative[a[h].type])k=[o(p(k),c)];else{if(c=z.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!z.relative[a[d].type];d++);return r(h>1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(jb,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&n(a))}k.push(c)}return p(k)}function t(a,b){var d=0,f=b.length>0,g=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],p=0,r="0",s=e&&[],t=null!=k,u=D,v=e||g&&z.find.TAG("*",k&&h.parentNode||h),w=P+=null==u?1:Math.random()||.1;for(t&&(D=h!==G&&h,y=d);null!=(l=v[r]);r++){if(g&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(P=w,y=++d)}f&&((l=!n&&l)&&p--,e&&s.push(l))}if(p+=r,f&&r!==p){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(p>0)for(;r--;)s[r]||o[r]||(o[r]=$.call(j));o=q(o)}ab.apply(j,o),t&&!e&&o.length>0&&p+b.length>1&&c.uniqueSort(j)}return t&&(P=w,D=u),s};return f?e(h):h}function u(a,b,d){for(var e=0,f=b.length;f>e;e++)c(a,b[e],d);return d}function v(a,b,c,d){var e,f,g,h,i,j=m(a);if(!d&&1===j.length){if(f=j[0]=j[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&x.getById&&9===b.nodeType&&I&&z.relative[f[1].type]){if(b=(z.find.ID(g.matches[0].replace(xb,yb),b)||[])[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=rb.needsContext.test(a)?0:f.length;e--&&(g=f[e],!z.relative[h=g.type]);)if((i=z.find[h])&&(d=i(g.matches[0].replace(xb,yb),nb.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&n(f),!a)return ab.apply(c,d),c;break}}return C(a,j)(d,b,!I,c,nb.test(a)),c}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P=0,Q=0,R=d(),S=d(),T=d(),U=!1,V=function(a,b){return a===b?(U=!0,0):0},W=typeof b,X=1<<31,Y={}.hasOwnProperty,Z=[],$=Z.pop,_=Z.push,ab=Z.push,bb=Z.slice,cb=Z.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},db="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",eb="[\\x20\\t\\r\\n\\f]",fb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",gb=fb.replace("w","w#"),hb="\\["+eb+"*("+fb+")"+eb+"*(?:([*^$|!~]?=)"+eb+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+gb+")|)|)"+eb+"*\\]",ib=":("+fb+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+hb.replace(3,8)+")*)|.*)\\)|)",jb=new RegExp("^"+eb+"+|((?:^|[^\\\\])(?:\\\\.)*)"+eb+"+$","g"),lb=new RegExp("^"+eb+"*,"+eb+"*"),mb=new RegExp("^"+eb+"*([>+~]|"+eb+")"+eb+"*"),nb=new RegExp(eb+"*[+~]"),ob=new RegExp("="+eb+"*([^\\]'\"]*)"+eb+"*\\]","g"),pb=new RegExp(ib),qb=new RegExp("^"+gb+"$"),rb={ID:new RegExp("^#("+fb+")"),CLASS:new RegExp("^\\.("+fb+")"),TAG:new RegExp("^("+fb.replace("w","w*")+")"),ATTR:new RegExp("^"+hb),PSEUDO:new RegExp("^"+ib),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+eb+"*(even|odd|(([+-]|)(\\d*)n|)"+eb+"*(?:([+-]|)"+eb+"*(\\d+)|))"+eb+"*\\)|)","i"),bool:new RegExp("^(?:"+db+")$","i"),needsContext:new RegExp("^"+eb+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+eb+"*((?:-\\d)?\\d*)"+eb+"*\\)|)(?=[^-]|$)","i")},sb=/^[^{]+\{\s*\[native \w/,tb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ub=/^(?:input|select|textarea|button)$/i,vb=/^h\d$/i,wb=/'|\\/g,xb=new RegExp("\\\\([\\da-f]{1,6}"+eb+"?|("+eb+")|.)","ig"),yb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(55296|d>>10,56320|1023&d)};try{ab.apply(Z=bb.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(zb){ab={apply:Z.length?function(a,b){_.apply(a,bb.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}B=c.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},x=c.support={},F=c.setDocument=function(a){var b=a?a.ownerDocument||a:O,c=b.defaultView;return b!==G&&9===b.nodeType&&b.documentElement?(G=b,H=b.documentElement,I=!B(b),c&&c.attachEvent&&c!==c.top&&c.attachEvent("onbeforeunload",function(){F()}),x.attributes=f(function(a){return a.className="i",!a.getAttribute("className")}),x.getElementsByTagName=f(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),x.getElementsByClassName=f(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),x.getById=f(function(a){return H.appendChild(a).id=N,!b.getElementsByName||!b.getElementsByName(N).length}),x.getById?(z.find.ID=function(a,b){if(typeof b.getElementById!==W&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){return a.getAttribute("id")===b}}):(delete z.find.ID,z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){var c=typeof a.getAttributeNode!==W&&a.getAttributeNode("id");return c&&c.value===b}}),z.find.TAG=x.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==W?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},z.find.CLASS=x.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==W&&I?b.getElementsByClassName(a):void 0},K=[],J=[],(x.qsa=sb.test(b.querySelectorAll))&&(f(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||J.push("\\["+eb+"*(?:value|"+db+")"),a.querySelectorAll(":checked").length||J.push(":checked")}),f(function(a){var c=b.createElement("input");c.setAttribute("type","hidden"),a.appendChild(c).setAttribute("t",""),a.querySelectorAll("[t^='']").length&&J.push("[*^$]="+eb+"*(?:''|\"\")"),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(x.matchesSelector=sb.test(L=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&f(function(a){x.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ib)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),M=sb.test(H.contains)||H.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},V=H.compareDocumentPosition?function(a,c){if(a===c)return U=!0,0;var d=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return d?1&d||!x.sortDetached&&c.compareDocumentPosition(a)===d?a===b||M(O,a)?-1:c===b||M(O,c)?1:E?cb.call(E,a)-cb.call(E,c):0:4&d?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,i=[a],j=[c];if(a===c)return U=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:E?cb.call(E,a)-cb.call(E,c):0;if(f===g)return h(a,c);for(d=a;d=d.parentNode;)i.unshift(d);for(d=c;d=d.parentNode;)j.unshift(d);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},b):G},c.matches=function(a,b){return c(a,null,null,b)},c.matchesSelector=function(a,b){if((a.ownerDocument||a)!==G&&F(a),b=b.replace(ob,"='$1']"),!(!x.matchesSelector||!I||K&&K.test(b)||J&&J.test(b)))try{var d=L.call(a,b);if(d||x.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return c(b,G,null,[a]).length>0},c.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},c.attr=function(a,c){(a.ownerDocument||a)!==G&&F(a);var d=z.attrHandle[c.toLowerCase()],e=d&&Y.call(z.attrHandle,c.toLowerCase())?d(a,c,!I):b;return e===b?x.attributes||!I?a.getAttribute(c):(e=a.getAttributeNode(c))&&e.specified?e.value:null:e},c.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},c.uniqueSort=function(a){var b,c=[],d=0,e=0;if(U=!x.detectDuplicates,E=!x.sortStable&&a.slice(0),a.sort(V),U){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return a},A=c.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=A(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=A(b);return c},z=c.selectors={cacheLength:50,createPseudo:e,match:rb,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(xb,yb),a[3]=(a[4]||a[5]||"").replace(xb,yb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||c.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&c.error(a[0]),a},PSEUDO:function(a){var c,d=!a[5]&&a[2];return rb.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:d&&pb.test(d)&&(c=m(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(a[0]=a[0].slice(0,c),a[2]=d.slice(0,c)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(xb,yb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+eb+")"+a+"("+eb+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==W&&a.getAttribute("class")||"")})},ATTR:function(a,b,d){return function(e){var f=c.attr(e,a);return null==f?"!="===b:b?(f+="","="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&f.indexOf(d)>-1:"$="===b?d&&f.slice(-d.length)===d:"~="===b?(" "+f+" ").indexOf(d)>-1:"|="===b?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||0===m%d&&m/d>=0}}},PSEUDO:function(a,b){var d,f=z.pseudos[a]||z.setFilters[a.toLowerCase()]||c.error("unsupported pseudo: "+a);return f[N]?f(b):f.length>1?(d=[a,a,"",b],z.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var d,e=f(a,b),g=e.length;g--;)d=cb.call(a,e[g]),a[d]=!(c[d]=e[g])}):function(a){return f(a,0,d)}):f}},pseudos:{not:e(function(a){var b=[],c=[],d=C(a.replace(jb,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return c(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||A(b)).indexOf(a)>-1}}),lang:e(function(a){return qb.test(a||"")||c.error("unsupported lang: "+a),a=a.replace(xb,yb).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!z.pseudos.empty(a)},header:function(a){return vb.test(a.nodeName)},input:function(a){return ub.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[0>c?c+b:c]}),even:k(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:k(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:k(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},z.pseudos.nth=z.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})z.pseudos[w]=i(w);for(w in{submit:!0,reset:!0})z.pseudos[w]=j(w);l.prototype=z.filters=z.pseudos,z.setFilters=new l,C=c.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=m(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d))}return f},x.sortStable=N.split("").sort(V).join("")===N,x.detectDuplicates=U,F(),x.sortDetached=f(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),x.attributes&&f(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g(db,function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&d.specified?d.value:a[b]===!0?b.toLowerCase():null}),kb.find=c,kb.expr=c.selectors,kb.expr[":"]=kb.expr.pseudos,kb.unique=c.uniqueSort,kb.text=c.getText,kb.isXMLDoc=c.isXML,kb.contains=c.contains}(a);var zb={};kb.Callbacks=function(a){a="string"==typeof a?zb[a]||d(a):kb.extend({},a);var c,e,f,g,h,i,j=[],k=!a.once&&[],l=function(b){for(e=a.memory&&b,f=!0,h=i||0,i=0,g=j.length,c=!0;j&&g>h;h++)if(j[h].apply(b[0],b[1])===!1&&a.stopOnFalse){e=!1;break}c=!1,j&&(k?k.length&&l(k.shift()):e?j=[]:m.disable())},m={add:function(){if(j){var b=j.length;!function d(b){kb.each(b,function(b,c){var e=kb.type(c);"function"===e?a.unique&&m.has(c)||j.push(c):c&&c.length&&"string"!==e&&d(c)})}(arguments),c?g=j.length:e&&(i=b,l(e))}return this},remove:function(){return j&&kb.each(arguments,function(a,b){for(var d;(d=kb.inArray(b,j,d))>-1;)j.splice(d,1),c&&(g>=d&&g--,h>=d&&h--)}),this},has:function(a){return a?kb.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],g=0,this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return!j||f&&!k||(b=b||[],b=[a,b.slice?b.slice():b],c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},kb.extend({Deferred:function(a){var b=[["resolve","done",kb.Callbacks("once memory"),"resolved"],["reject","fail",kb.Callbacks("once memory"),"rejected"],["notify","progress",kb.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return kb.Deferred(function(c){kb.each(b,function(b,f){var g=f[0],h=kb.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&kb.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?kb.extend(a,d):d}},e={};return d.pipe=d.then,kb.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=fb.call(arguments),g=f.length,h=1!==g||a&&kb.isFunction(a.promise)?g:0,i=1===h?a:kb.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?fb.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&kb.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),kb.support=function(b){var c,d,e,f,g,h,i,j,k,l=Y.createElement("div");if(l.setAttribute("className","t"),l.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=l.getElementsByTagName("*")||[],d=l.getElementsByTagName("a")[0],!d||!d.style||!c.length)return b;f=Y.createElement("select"),h=f.appendChild(Y.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b.getSetAttribute="t"!==l.className,b.leadingWhitespace=3===l.firstChild.nodeType,b.tbody=!l.getElementsByTagName("tbody").length,b.htmlSerialize=!!l.getElementsByTagName("link").length,b.style=/top/.test(d.getAttribute("style")),b.hrefNormalized="/a"===d.getAttribute("href"),b.opacity=/^0.5/.test(d.style.opacity),b.cssFloat=!!d.style.cssFloat,b.checkOn=!!e.value,b.optSelected=h.selected,b.enctype=!!Y.createElement("form").enctype,b.html5Clone="<:nav></:nav>"!==Y.createElement("nav").cloneNode(!0).outerHTML,b.inlineBlockNeedsLayout=!1,b.shrinkWrapBlocks=!1,b.pixelPosition=!1,b.deleteExpando=!0,b.noCloneEvent=!0,b.reliableMarginRight=!0,b.boxSizingReliable=!0,e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;
-try{delete l.test}catch(m){b.deleteExpando=!1}e=Y.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=Y.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip;for(k in kb(b))break;return b.ownLast="0"!==k,kb(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=Y.getElementsByTagName("body")[0];g&&(c=Y.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",kb.swap(g,null!=g.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===l.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(Y.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==W&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}({});var Ab=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Bb=/([A-Z])/g;kb.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?kb.cache[a[kb.expando]]:a[kb.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&kb.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),kb.fn.extend({data:function(a,c){var d,e,f=null,h=0,i=this[0];if(a===b){if(this.length&&(f=kb.data(i),1===i.nodeType&&!kb._data(i,"parsedAttrs"))){for(d=i.attributes;h<d.length;h++)e=d[h].name,0===e.indexOf("data-")&&(e=kb.camelCase(e.slice(5)),g(i,e,f[e]));kb._data(i,"parsedAttrs",!0)}return f}return"object"==typeof a?this.each(function(){kb.data(this,a)}):arguments.length>1?this.each(function(){kb.data(this,a,c)}):i?g(i,a,kb.data(i,a)):null},removeData:function(a){return this.each(function(){kb.removeData(this,a)})}}),kb.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=kb._data(a,b),c&&(!d||kb.isArray(c)?d=kb._data(a,b,kb.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=kb.queue(a,b),d=c.length,e=c.shift(),f=kb._queueHooks(a,b),g=function(){kb.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return kb._data(a,c)||kb._data(a,c,{empty:kb.Callbacks("once memory").add(function(){kb._removeData(a,b+"queue"),kb._removeData(a,c)})})}}),kb.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?kb.queue(this[0],a):c===b?this:this.each(function(){var b=kb.queue(this,a,c);kb._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&kb.dequeue(this,a)})},dequeue:function(a){return this.each(function(){kb.dequeue(this,a)})},delay:function(a,b){return a=kb.fx?kb.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=kb.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=kb._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var Cb,Db,Eb=/[\t\r\n\f]/g,Fb=/\r/g,Gb=/^(?:input|select|textarea|button|object)$/i,Hb=/^(?:a|area)$/i,Ib=/^(?:checked|selected)$/i,Jb=kb.support.getSetAttribute,Kb=kb.support.input;kb.fn.extend({attr:function(a,b){return kb.access(this,kb.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){kb.removeAttr(this,a)})},prop:function(a,b){return kb.access(this,kb.prop,a,b,arguments.length>1)},removeProp:function(a){return a=kb.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=kb.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?kb.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):kb.isFunction(a)?this.each(function(c){kb(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=kb(this),f=a.match(mb)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===W||"boolean"===c)&&(this.className&&kb._data(this,"__className__",this.className),this.className=this.className||a===!1?"":kb._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(Eb," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=kb.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,kb(this).val()):a,null==f?f="":"number"==typeof f?f+="":kb.isArray(f)&&(f=kb.map(f,function(a){return null==a?"":a+""})),d=kb.valHooks[this.type]||kb.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=kb.valHooks[f.type]||kb.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Fb,""):null==c?"":c)}}}),kb.extend({valHooks:{option:{get:function(a){var b=kb.find.attr(a,"value");return null!=b?b:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(kb.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&kb.nodeName(c.parentNode,"optgroup"))){if(b=kb(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=kb.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=kb.inArray(kb(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,c,d){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return typeof a.getAttribute===W?kb.prop(a,c,d):(1===g&&kb.isXMLDoc(a)||(c=c.toLowerCase(),e=kb.attrHooks[c]||(kb.expr.match.bool.test(c)?Db:Cb)),d===b?e&&"get"in e&&null!==(f=e.get(a,c))?f:(f=kb.find.attr(a,c),null==f?b:f):null!==d?e&&"set"in e&&(f=e.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):(kb.removeAttr(a,c),void 0))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(mb);if(f&&1===a.nodeType)for(;c=f[e++];)d=kb.propFix[c]||c,kb.expr.match.bool.test(c)?Kb&&Jb||!Ib.test(c)?a[d]=!1:a[kb.camelCase("default-"+c)]=a[d]=!1:kb.attr(a,c,""),a.removeAttribute(Jb?c:d)},attrHooks:{type:{set:function(a,b){if(!kb.support.radioValue&&"radio"===b&&kb.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!kb.isXMLDoc(a),g&&(c=kb.propFix[c]||c,f=kb.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var b=kb.find.attr(a,"tabindex");return b?parseInt(b,10):Gb.test(a.nodeName)||Hb.test(a.nodeName)&&a.href?0:-1}}}}),Db={set:function(a,b,c){return b===!1?kb.removeAttr(a,c):Kb&&Jb||!Ib.test(c)?a.setAttribute(!Jb&&kb.propFix[c]||c,c):a[kb.camelCase("default-"+c)]=a[c]=!0,c}},kb.each(kb.expr.match.bool.source.match(/\w+/g),function(a,c){var d=kb.expr.attrHandle[c]||kb.find.attr;kb.expr.attrHandle[c]=Kb&&Jb||!Ib.test(c)?function(a,c,e){var f=kb.expr.attrHandle[c],g=e?b:(kb.expr.attrHandle[c]=b)!=d(a,c,e)?c.toLowerCase():null;return kb.expr.attrHandle[c]=f,g}:function(a,c,d){return d?b:a[kb.camelCase("default-"+c)]?c.toLowerCase():null}}),Kb&&Jb||(kb.attrHooks.value={set:function(a,b,c){return kb.nodeName(a,"input")?(a.defaultValue=b,void 0):Cb&&Cb.set(a,b,c)}}),Jb||(Cb={set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},kb.expr.attrHandle.id=kb.expr.attrHandle.name=kb.expr.attrHandle.coords=function(a,c,d){var e;return d?b:(e=a.getAttributeNode(c))&&""!==e.value?e.value:null},kb.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&d.specified?d.value:b},set:Cb.set},kb.attrHooks.contenteditable={set:function(a,b,c){Cb.set(a,""===b?!1:b,c)}},kb.each(["width","height"],function(a,b){kb.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),kb.support.hrefNormalized||kb.each(["href","src"],function(a,b){kb.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),kb.support.style||(kb.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),kb.support.optSelected||(kb.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),kb.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){kb.propFix[this.toLowerCase()]=this}),kb.support.enctype||(kb.propFix.enctype="encoding"),kb.each(["radio","checkbox"],function(){kb.valHooks[this]={set:function(a,b){return kb.isArray(b)?a.checked=kb.inArray(kb(a).val(),b)>=0:void 0}},kb.support.checkOn||(kb.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var Lb=/^(?:input|select|textarea)$/i,Mb=/^key/,Nb=/^(?:mouse|contextmenu)|click/,Ob=/^(?:focusinfocus|focusoutblur)$/,Pb=/^([^.]*)(?:\.(.+)|)$/;kb.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=kb._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=kb.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof kb===W||a&&kb.event.triggered===a.type?b:kb.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(mb)||[""],i=c.length;i--;)g=Pb.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),o&&(k=kb.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=kb.event.special[o]||{},m=kb.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&kb.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),kb.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=kb.hasData(a)&&kb._data(a);if(q&&(k=q.events)){for(b=(b||"").match(mb)||[""],j=b.length;j--;)if(h=Pb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=kb.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||kb.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)kb.event.remove(a,n+b[j],c,d,!0);kb.isEmptyObject(k)&&(delete q.handle,kb._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||Y],o=ib.call(c,"type")?c.type:c,p=ib.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||Y,3!==e.nodeType&&8!==e.nodeType&&!Ob.test(o+kb.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[kb.expando]?c:new kb.Event(o,"object"==typeof c&&c),c.isTrigger=f?2:3,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:kb.makeArray(d,[c]),k=kb.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!kb.isWindow(e)){for(j=k.delegateType||o,Ob.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||Y)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(kb._data(i,"events")||{})[c.type]&&kb._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&kb.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(n.pop(),d)===!1)&&kb.acceptData(e)&&h&&e[o]&&!kb.isWindow(e)){l=e[h],l&&(e[h]=null),kb.event.triggered=o;try{e[o]()}catch(q){}kb.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=kb.event.fix(a);var c,d,e,f,g,h=[],i=fb.call(arguments),j=(kb._data(this,"events")||{})[a.type]||[],k=kb.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=kb.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,d=((kb.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;i>g;g++)e=c[g],d=e.selector+" ",f[d]===b&&(f[d]=e.needsContext?kb(d,this).index(j)>=0:kb.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return i<c.length&&h.push({elem:this,handlers:c.slice(i)}),h},fix:function(a){if(a[kb.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Nb.test(e)?this.mouseHooks:Mb.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new kb.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||Y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f,g=c.button,h=c.fromElement;return null==a.pageX&&null!=c.clientX&&(e=a.target.ownerDocument||Y,f=e.documentElement,d=e.body,a.pageX=c.clientX+(f&&f.scrollLeft||d&&d.scrollLeft||0)-(f&&f.clientLeft||d&&d.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||d&&d.scrollTop||0)-(f&&f.clientTop||d&&d.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?c.toElement:h),a.which||g===b||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==k()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===k()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return kb.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return kb.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=kb.extend(new kb.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?kb.event.trigger(e,null,b):kb.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},kb.removeEvent=Y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===W&&(a[d]=null),a.detachEvent(d,c))},kb.Event=function(a,b){return this instanceof kb.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?i:j):this.type=a,b&&kb.extend(this,b),this.timeStamp=a&&a.timeStamp||kb.now(),this[kb.expando]=!0,void 0):new kb.Event(a,b)},kb.Event.prototype={isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=i,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=i,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()}},kb.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){kb.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!kb.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),kb.support.submitBubbles||(kb.event.special.submit={setup:function(){return kb.nodeName(this,"form")?!1:(kb.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=kb.nodeName(c,"input")||kb.nodeName(c,"button")?c.form:b;d&&!kb._data(d,"submitBubbles")&&(kb.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),kb._data(d,"submitBubbles",!0))}),void 0)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&kb.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return kb.nodeName(this,"form")?!1:(kb.event.remove(this,"._submit"),void 0)}}),kb.support.changeBubbles||(kb.event.special.change={setup:function(){return Lb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(kb.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),kb.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),kb.event.simulate("change",this,a,!0)})),!1):(kb.event.add(this,"beforeactivate._change",function(a){var b=a.target;Lb.test(b.nodeName)&&!kb._data(b,"changeBubbles")&&(kb.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||kb.event.simulate("change",this.parentNode,a,!0)}),kb._data(b,"changeBubbles",!0))}),void 0)},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return kb.event.remove(this,"._change"),!Lb.test(this.nodeName)}}),kb.support.focusinBubbles||kb.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){kb.event.simulate(b,a.target,kb.event.fix(a),!0)};kb.event.special[b]={setup:function(){0===c++&&Y.addEventListener(a,d,!0)},teardown:function(){0===--c&&Y.removeEventListener(a,d,!0)}}}),kb.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(g in a)this.on(g,c,d,a[g],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=j;else if(!e)return this;return 1===f&&(h=e,e=function(a){return kb().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=kb.guid++)),this.each(function(){kb.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,kb(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=j),this.each(function(){kb.event.remove(this,a,d,c)})},trigger:function(a,b){return this.each(function(){kb.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?kb.event.trigger(a,b,c,!0):void 0}});var Qb=/^.[^:#\[\.,]*$/,Rb=/^(?:parents|prev(?:Until|All))/,Sb=kb.expr.match.needsContext,Tb={children:!0,contents:!0,next:!0,prev:!0};kb.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(kb(a).filter(function(){for(b=0;e>b;b++)if(kb.contains(d[b],this))return!0}));for(b=0;e>b;b++)kb.find(a,d[b],c);return c=this.pushStack(e>1?kb.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=kb(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(kb.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(m(this,a||[],!0))},filter:function(a){return this.pushStack(m(this,a||[],!1))},is:function(a){return!!m(this,"string"==typeof a&&Sb.test(a)?kb(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sb.test(a)||"string"!=typeof a?kb(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&kb.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?kb.unique(f):f)},index:function(a){return a?"string"==typeof a?kb.inArray(this[0],kb(a)):kb.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?kb(a,b):kb.makeArray(a&&a.nodeType?[a]:a),d=kb.merge(this.get(),c);return this.pushStack(kb.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),kb.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return kb.dir(a,"parentNode")},parentsUntil:function(a,b,c){return kb.dir(a,"parentNode",c)},next:function(a){return l(a,"nextSibling")},prev:function(a){return l(a,"previousSibling")},nextAll:function(a){return kb.dir(a,"nextSibling")},prevAll:function(a){return kb.dir(a,"previousSibling")},nextUntil:function(a,b,c){return kb.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return kb.dir(a,"previousSibling",c)},siblings:function(a){return kb.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return kb.sibling(a.firstChild)},contents:function(a){return kb.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:kb.merge([],a.childNodes)}},function(a,b){kb.fn[a]=function(c,d){var e=kb.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=kb.filter(d,e)),this.length>1&&(Tb[a]||(e=kb.unique(e)),Rb.test(a)&&(e=e.reverse())),this.pushStack(e)}}),kb.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?kb.find.matchesSelector(d,a)?[d]:[]:kb.find.matches(a,kb.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!kb(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ub="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,Wb=new RegExp("<(?:"+Ub+")[\\s/>]","i"),Xb=/^\s+/,Yb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zb=/<([\w:]+)/,$b=/<tbody/i,_b=/<|&#?\w+;/,ac=/<(?:script|style|link)/i,bc=/^(?:checkbox|radio)$/i,cc=/checked\s*(?:[^=]|=\s*.checked.)/i,dc=/^$|\/(?:java|ecma)script/i,ec=/^true\/(.*)/,fc=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,gc={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:kb.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},hc=n(Y),ic=hc.appendChild(Y.createElement("div"));gc.optgroup=gc.option,gc.tbody=gc.tfoot=gc.colgroup=gc.caption=gc.thead,gc.th=gc.td,kb.fn.extend({text:function(a){return kb.access(this,function(a){return a===b?kb.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?kb.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||kb.cleanData(u(c)),c.parentNode&&(b&&kb.contains(c.ownerDocument,c)&&r(u(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&kb.cleanData(u(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&kb.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return kb.clone(this,a,b)})},html:function(a){return kb.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Vb,""):b;if(!("string"!=typeof a||ac.test(a)||!kb.support.htmlSerialize&&Wb.test(a)||!kb.support.leadingWhitespace&&Xb.test(a)||gc[(Zb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Yb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(kb.cleanData(u(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=kb.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),kb(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=db.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,l=this,m=k-1,n=a[0],o=kb.isFunction(n);if(o||!(1>=k||"string"!=typeof n||kb.support.checkClone)&&cc.test(n))return this.each(function(d){var e=l.eq(d);o&&(a[0]=n.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(i=kb.buildFragment(a,this[0].ownerDocument,!1,!c&&this),d=i.firstChild,1===i.childNodes.length&&(i=d),d)){for(g=kb.map(u(i,"script"),p),f=g.length;k>j;j++)e=i,j!==m&&(e=kb.clone(e,!0,!0),f&&kb.merge(g,u(e,"script"))),b.call(this[j],e,j);if(f)for(h=g[g.length-1].ownerDocument,kb.map(g,q),j=0;f>j;j++)e=g[j],dc.test(e.type||"")&&!kb._data(e,"globalEval")&&kb.contains(h,e)&&(e.src?kb._evalUrl(e.src):kb.globalEval((e.text||e.textContent||e.innerHTML||"").replace(fc,"")));i=d=null}return this}}),kb.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){kb.fn[a]=function(a){for(var c,d=0,e=[],f=kb(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),kb(f[d])[b](c),eb.apply(e,c.get());return this.pushStack(e)}}),kb.extend({clone:function(a,b,c){var d,e,f,g,h,i=kb.contains(a.ownerDocument,a);if(kb.support.html5Clone||kb.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ic.innerHTML=a.outerHTML,ic.removeChild(f=ic.firstChild)),!(kb.support.noCloneEvent&&kb.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||kb.isXMLDoc(a)))for(d=u(f),h=u(a),g=0;null!=(e=h[g]);++g)d[g]&&t(e,d[g]);if(b)if(c)for(h=h||u(a),d=d||u(f),g=0;null!=(e=h[g]);g++)s(e,d[g]);else s(a,f);return d=u(f,"script"),d.length>0&&r(d,!i&&u(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=n(b),o=[],p=0;l>p;p++)if(f=a[p],f||0===f)if("object"===kb.type(f))kb.merge(o,f.nodeType?[f]:f);else if(_b.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Zb.exec(f)||["",""])[1].toLowerCase(),k=gc[i]||gc._default,h.innerHTML=k[1]+f.replace(Yb,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!kb.support.leadingWhitespace&&Xb.test(f)&&o.push(b.createTextNode(Xb.exec(f)[0])),!kb.support.tbody)for(f="table"!==i||$b.test(f)?"<table>"!==k[1]||$b.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)kb.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(kb.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else o.push(b.createTextNode(f));for(h&&m.removeChild(h),kb.support.appendChecked||kb.grep(u(o,"input"),v),p=0;f=o[p++];)if((!d||-1===kb.inArray(f,d))&&(g=kb.contains(f.ownerDocument,f),h=u(m.appendChild(f),"script"),g&&r(h),c))for(e=0;f=h[e++];)dc.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=kb.expando,i=kb.cache,j=kb.support.deleteExpando,k=kb.event.special;null!=(c=a[g]);g++)if((b||kb.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?kb.event.remove(c,d):kb.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==W?c.removeAttribute(h):c[h]=null,bb.push(e))}},_evalUrl:function(a){return kb.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),kb.fn.extend({wrapAll:function(a){if(kb.isFunction(a))return this.each(function(b){kb(this).wrapAll(a.call(this,b))});if(this[0]){var b=kb(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return kb.isFunction(a)?this.each(function(b){kb(this).wrapInner(a.call(this,b))}):this.each(function(){var b=kb(this),c=b.contents();
-c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=kb.isFunction(a);return this.each(function(c){kb(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){kb.nodeName(this,"body")||kb(this).replaceWith(this.childNodes)}).end()}});var jc,kc,lc,mc=/alpha\([^)]*\)/i,nc=/opacity\s*=\s*([^)]*)/,oc=/^(top|right|bottom|left)$/,pc=/^(none|table(?!-c[ea]).+)/,qc=/^margin/,rc=new RegExp("^("+lb+")(.*)$","i"),sc=new RegExp("^("+lb+")(?!px)[a-z%]+$","i"),tc=new RegExp("^([+-])=("+lb+")","i"),uc={BODY:"block"},vc={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:0,fontWeight:400},xc=["Top","Right","Bottom","Left"],yc=["Webkit","O","Moz","ms"];kb.fn.extend({css:function(a,c){return kb.access(this,function(a,c,d){var e,f,g={},h=0;if(kb.isArray(c)){for(f=kc(a),e=c.length;e>h;h++)g[c[h]]=kb.css(a,c[h],!1,f);return g}return d!==b?kb.style(a,c,d):kb.css(a,c)},a,c,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){x(this)?kb(this).show():kb(this).hide()})}}),kb.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lc(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":kb.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=kb.camelCase(c),j=a.style;if(c=kb.cssProps[i]||(kb.cssProps[i]=w(j,i)),h=kb.cssHooks[c]||kb.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(kb.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||kb.cssNumber[i]||(d+="px"),kb.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=kb.camelCase(c);return c=kb.cssProps[i]||(kb.cssProps[i]=w(a.style,i)),h=kb.cssHooks[c]||kb.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lc(a,c,e)),"normal"===g&&c in wc&&(g=wc[c]),""===d||d?(f=parseFloat(g),d===!0||kb.isNumeric(f)?f||0:g):g}}),a.getComputedStyle?(kc=function(b){return a.getComputedStyle(b,null)},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||kb.contains(a.ownerDocument,a)||(i=kb.style(a,c)),sc.test(i)&&qc.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):Y.documentElement.currentStyle&&(kc=function(a){return a.currentStyle},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sc.test(i)&&!oc.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),kb.each(["height","width"],function(a,b){kb.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&pc.test(kb.css(a,"display"))?kb.swap(a,vc,function(){return B(a,b,d)}):B(a,b,d):void 0},set:function(a,c,d){var e=d&&kc(a);return z(a,c,d?A(a,b,d,kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,e),e):0)}}}),kb.support.opacity||(kb.cssHooks.opacity={get:function(a,b){return nc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=kb.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===kb.trim(f.replace(mc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mc.test(f)?f.replace(mc,e):f+" "+e)}}),kb(function(){kb.support.reliableMarginRight||(kb.cssHooks.marginRight={get:function(a,b){return b?kb.swap(a,{display:"inline-block"},lc,[a,"marginRight"]):void 0}}),!kb.support.pixelPosition&&kb.fn.position&&kb.each(["top","left"],function(a,b){kb.cssHooks[b]={get:function(a,c){return c?(c=lc(a,b),sc.test(c)?kb(a).position()[b]+"px":c):void 0}}})}),kb.expr&&kb.expr.filters&&(kb.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!kb.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||kb.css(a,"display"))},kb.expr.filters.visible=function(a){return!kb.expr.filters.hidden(a)}),kb.each({margin:"",padding:"",border:"Width"},function(a,b){kb.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+xc[d]+b]=f[d]||f[d-2]||f[0];return e}},qc.test(a)||(kb.cssHooks[a+b].set=z)});var zc=/%20/g,Ac=/\[\]$/,Bc=/\r?\n/g,Cc=/^(?:submit|button|image|reset|file)$/i,Dc=/^(?:input|select|textarea|keygen)/i;kb.fn.extend({serialize:function(){return kb.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=kb.prop(this,"elements");return a?kb.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!kb(this).is(":disabled")&&Dc.test(this.nodeName)&&!Cc.test(a)&&(this.checked||!bc.test(a))}).map(function(a,b){var c=kb(this).val();return null==c?null:kb.isArray(c)?kb.map(c,function(a){return{name:b.name,value:a.replace(Bc,"\r\n")}}):{name:b.name,value:c.replace(Bc,"\r\n")}}).get()}}),kb.param=function(a,c){var d,e=[],f=function(a,b){b=kb.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=kb.ajaxSettings&&kb.ajaxSettings.traditional),kb.isArray(a)||a.jquery&&!kb.isPlainObject(a))kb.each(a,function(){f(this.name,this.value)});else for(d in a)E(d,a[d],c,f);return e.join("&").replace(zc,"+")},kb.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){kb.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),kb.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Ec,Fc,Gc=kb.now(),Hc=/\?/,Ic=/#.*$/,Jc=/([?&])_=[^&]*/,Kc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mc=/^(?:GET|HEAD)$/,Nc=/^\/\//,Oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pc=kb.fn.load,Qc={},Rc={},Sc="*/".concat("*");try{Fc=X.href}catch(Tc){Fc=Y.createElement("a"),Fc.href="",Fc=Fc.href}Ec=Oc.exec(Fc.toLowerCase())||[],kb.fn.load=function(a,c,d){if("string"!=typeof a&&Pc)return Pc.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),kb.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&kb.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?kb("<div>").append(kb.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},kb.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){kb.fn[b]=function(a){return this.on(b,a)}}),kb.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fc,type:"GET",isLocal:Lc.test(Ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":kb.parseJSON,"text xml":kb.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?H(H(a,kb.ajaxSettings),b):H(kb.ajaxSettings,a)},ajaxPrefilter:F(Qc),ajaxTransport:F(Rc),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,f=a>=200&&300>a||304===a,d&&(t=I(m,w,d)),t=J(m,t,w,f),f?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(kb.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(kb.etag[g]=v)),204===a||"HEAD"===m.type?x="nocontent":304===a?x="notmodified":(x=t.state,l=t.data,s=t.error,f=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--kb.active||kb.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=kb.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?kb(n):kb.event,p=kb.Deferred(),q=kb.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kc.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fc)+"").replace(Ic,"").replace(Nc,Ec[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=kb.trim(m.dataType||"*").toLowerCase().match(mb)||[""],null==m.crossDomain&&(e=Oc.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Ec[1]&&e[2]===Ec[2]&&(e[3]||("http:"===e[1]?"80":"443"))===(Ec[3]||("http:"===Ec[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=kb.param(m.data,m.traditional)),G(Qc,m,c,w),2===u)return w;j=m.global,j&&0===kb.active++&&kb.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mc.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hc.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jc.test(g)?g.replace(Jc,"$1_="+Gc++):g+(Hc.test(g)?"&":"?")+"_="+Gc++)),m.ifModified&&(kb.lastModified[g]&&w.setRequestHeader("If-Modified-Since",kb.lastModified[g]),kb.etag[g]&&w.setRequestHeader("If-None-Match",kb.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sc+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=G(Rc,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(2>u))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getJSON:function(a,b,c){return kb.get(a,b,c,"json")},getScript:function(a,c){return kb.get(a,b,c,"script")}}),kb.each(["get","post"],function(a,c){kb[c]=function(a,d,e,f){return kb.isFunction(d)&&(f=f||e,e=d,d=b),kb.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),kb.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return kb.globalEval(a),a}}}),kb.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),kb.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=Y.head||kb("head")[0]||Y.documentElement;return{send:function(b,e){c=Y.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Uc=[],Vc=/(=)\?(?=&|$)|\?\?/;kb.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Uc.pop()||kb.expando+"_"+Gc++;return this[a]=!0,a}}),kb.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=kb.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vc,"$1"+f):c.jsonp!==!1&&(c.url+=(Hc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||kb.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Uc.push(f)),h&&kb.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Wc,Xc,Yc=0,Zc=a.ActiveXObject&&function(){var a;for(a in Wc)Wc[a](b,!0)};kb.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&K()||L()}:K,Xc=kb.ajaxSettings.xhr(),kb.support.cors=!!Xc&&"withCredentials"in Xc,Xc=kb.support.ajax=!!Xc,Xc&&kb.ajaxTransport(function(c){if(!c.crossDomain||kb.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=kb.noop,Zc&&delete Wc[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yc,Zc&&(Wc||(Wc={},kb(a).unload(Zc)),Wc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $c,_c,ad=/^(?:toggle|show|hide)$/,bd=new RegExp("^(?:([+-])=|)("+lb+")([a-z%]*)$","i"),cd=/queueHooks$/,dd=[Q],ed={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bd.exec(b),f=e&&e[3]||(kb.cssNumber[a]?"":"px"),g=(kb.cssNumber[a]||"px"!==f&&+d)&&bd.exec(kb.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,kb.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};kb.Animation=kb.extend(O,{tweener:function(a,b){kb.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ed[c]=ed[c]||[],ed[c].unshift(b)},prefilter:function(a,b){b?dd.unshift(a):dd.push(a)}}),kb.Tween=R,R.prototype={constructor:R,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(kb.cssNumber[c]?"":"px")},cur:function(){var a=R.propHooks[this.prop];return a&&a.get?a.get(this):R.propHooks._default.get(this)},run:function(a){var b,c=R.propHooks[this.prop];return this.pos=b=this.options.duration?kb.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=kb.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){kb.fx.step[a.prop]?kb.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[kb.cssProps[a.prop]]||kb.cssHooks[a.prop])?kb.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},kb.each(["toggle","show","hide"],function(a,b){var c=kb.fn[b];kb.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(S(b,!0),a,d,e)}}),kb.fn.extend({fadeTo:function(a,b,c,d){return this.filter(x).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=kb.isEmptyObject(a),f=kb.speed(b,c,d),g=function(){var b=O(this,kb.extend({},a),f);(e||kb._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=kb.timers,g=kb._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cd.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&kb.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=kb._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=kb.timers,g=d?d.length:0;for(c.finish=!0,kb.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),kb.each({slideDown:S("show"),slideUp:S("hide"),slideToggle:S("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){kb.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),kb.speed=function(a,b,c){var d=a&&"object"==typeof a?kb.extend({},a):{complete:c||!c&&b||kb.isFunction(a)&&a,duration:a,easing:c&&b||b&&!kb.isFunction(b)&&b};return d.duration=kb.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in kb.fx.speeds?kb.fx.speeds[d.duration]:kb.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){kb.isFunction(d.old)&&d.old.call(this),d.queue&&kb.dequeue(this,d.queue)},d},kb.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},kb.timers=[],kb.fx=R.prototype.init,kb.fx.tick=function(){var a,c=kb.timers,d=0;for($c=kb.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||kb.fx.stop(),$c=b},kb.fx.timer=function(a){a()&&kb.timers.push(a)&&kb.fx.start()},kb.fx.interval=13,kb.fx.start=function(){_c||(_c=setInterval(kb.fx.tick,kb.fx.interval))},kb.fx.stop=function(){clearInterval(_c),_c=null},kb.fx.speeds={slow:600,fast:200,_default:400},kb.fx.step={},kb.expr&&kb.expr.filters&&(kb.expr.filters.animated=function(a){return kb.grep(kb.timers,function(b){return a===b.elem}).length}),kb.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){kb.offset.setOffset(this,a,b)});var c,d,e={top:0,left:0},f=this[0],g=f&&f.ownerDocument;if(g)return c=g.documentElement,kb.contains(c,f)?(typeof f.getBoundingClientRect!==W&&(e=f.getBoundingClientRect()),d=T(g),{top:e.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0),left:e.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):e},kb.offset={setOffset:function(a,b,c){var d=kb.css(a,"position");"static"===d&&(a.style.position="relative");var e,f,g=kb(a),h=g.offset(),i=kb.css(a,"top"),j=kb.css(a,"left"),k=("absolute"===d||"fixed"===d)&&kb.inArray("auto",[i,j])>-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),kb.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},kb.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===kb.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),kb.nodeName(a[0],"html")||(c=a.offset()),c.top+=kb.css(a[0],"borderTopWidth",!0),c.left+=kb.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-kb.css(d,"marginTop",!0),left:b.left-c.left-kb.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Z;a&&!kb.nodeName(a,"html")&&"static"===kb.css(a,"position");)a=a.offsetParent;return a||Z})}}),kb.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);kb.fn[a]=function(e){return kb.access(this,function(a,e,f){var g=T(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?kb(g).scrollLeft():f,d?f:kb(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),kb.each({Height:"height",Width:"width"},function(a,c){kb.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){kb.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return kb.access(this,function(c,d,e){var f;return kb.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?kb.css(c,d,h):kb.style(c,d,e,h)},c,g?e:b,g,null)}})}),kb.fn.size=function(){return this.length},kb.fn.andSelf=kb.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=kb:(a.jQuery=a.$=kb,"function"==typeof define&&define.amd&&define("jquery",[],function(){return kb}))}(window),function(a){function b(a,b,c){for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function c(a,b){var c=a.index,d=b.index;if(a=a.criteria,b=b.criteria,a!==b){if(a>b||"undefined"==typeof a)return 1;if(b>a||"undefined"==typeof b)return-1}return d>c?-1:1}function d(a){return"\\"+oc[a]}function e(){}function f(a){return a instanceof f?a:new g(a)}function g(a){this.__wrapped__=a}function h(a,b,c,d){function e(){var d=arguments,k=g?this:b;if(f||(a=b[h]),c.length&&(d=d.length?(d=Nc.call(d),j?d.concat(c):c.concat(d)):c),this instanceof e){k=i(a.prototype);var l=a.apply(k,d);return A(l)?l:k}return a.apply(k,d)}var f=z(a),g=!c,h=b;if(g){var j=d;c=b}else if(!f){if(!d)throw new TypeError;b=a}return e}function i(a){return A(a)?Fc(a):{}}function j(a){return Uc[a]}function k(){var a=(a=f.indexOf)===jb?b:a;return a}function l(a){return Vc[a]}function m(a){return Dc.call(a)==ec}function n(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)a[e]=d[e]}return a}function o(a){return A(a)?Rc(a)?Nc.call(a):n({},a):a}function p(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)null==a[e]&&(a[e]=d[e])}return a}function q(a){var b=[];return Wc(a,function(a,c){z(a)&&b.push(c)}),b.sort()}function r(a,b){return a?Ac.call(a,b):!1}function s(a){for(var b=-1,c=Tc(a),d=c.length,e={};++b<d;){var f=c[b];e[a[f]]=f}return e}function t(a){return a===!0||a===!1||Dc.call(a)==gc}function u(a){return a?"object"==typeof a&&Dc.call(a)==hc:!1}function v(a){return a?1===a.nodeType:!1}function w(a){if(!a)return!0;if(Rc(a)||F(a))return!a.length;for(var b in a)if(Ac.call(a,b))return!1;return!0}function x(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,g=typeof b;if(a===a&&(!a||"function"!=e&&"object"!=e)&&(!b||"function"!=g&&"object"!=g))return!1;if(null==a||null==b)return a===b;var h=Dc.call(a),i=Dc.call(b);if(h!=i)return!1;switch(h){case gc:case hc:return+a==+b;case jc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case lc:case mc:return a==String(b)}var j=h==fc;if(!j){if(a instanceof f||b instanceof f)return x(a.__wrapped__||a,b.__wrapped__||b,c,d);if(h!=kc)return!1;var k=a.constructor,l=b.constructor;if(k!=l&&!(z(k)&&k instanceof k&&z(l)&&l instanceof l))return!1}c||(c=[]),d||(d=[]);for(var m=c.length;m--;)if(c[m]==a)return d[m]==b;var n=!0,o=0;if(c.push(a),d.push(b),j){if(o=b.length,n=o==a.length)for(;o--&&(n=x(a[o],b[o],c,d)););return n}return Wc(b,function(b,e,f){return Ac.call(f,e)?(o++,!(n=Ac.call(a,e)&&x(a[e],b,c,d))&&Zb):void 0}),n&&Wc(a,function(a,b,c){return Ac.call(c,b)?!(n=--o>-1)&&Zb:void 0}),n}function y(a){return Hc(a)&&!Ic(parseFloat(a))}function z(a){return"function"==typeof a}function A(a){return!(!a||!nc[typeof a])}function B(a){return D(a)&&a!=+a}function C(a){return null===a}function D(a){return"number"==typeof a||Dc.call(a)==jc}function E(a){return!(!a||!nc[typeof a])&&Dc.call(a)==lc}function F(a){return"string"==typeof a||Dc.call(a)==mc}function G(a){return"undefined"==typeof a}function H(a){var b=k(),c=yc.apply(sc,Nc.call(arguments,1)),d={};return Wc(a,function(a,e){b(c,e)<0&&(d[e]=a)}),d}function I(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function J(a){for(var b=-1,c=yc.apply(sc,Nc.call(arguments,1)),d=c.length,e={};++b<d;){var f=c[b];f in a&&(e[f]=a[f])}return e}function K(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;)e[b]=a[c[b]];return e}function L(a,b){var c=k(),d=a?a.length:0,e=!1;return d&&"number"==typeof d?e=c(a,b)>-1:Xc(a,function(a){return(e=a===b)&&Zb}),e}function M(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),Ac.call(d,c)?d[c]++:d[c]=1}),d}function N(a,b,c){var d=!0;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&(d=!!b(a[e],e,a)););else Xc(a,function(a,c,e){return!(d=!!b(a,c,e))&&Zb});return d}function O(a,b,c){var d=[];b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f;){var g=a[e];b(g,e,a)&&d.push(g)}else Xc(a,function(a,c,e){b(a,c,e)&&d.push(a)});return d}function P(a,b,c){b=Ab(b,c);var d=-1,e=a?a.length:0;if("number"!=typeof e){var f;return Xc(a,function(a,c,d){return b(a,c,d)?(f=a,Zb):void 0}),f}for(;++d<e;){var g=a[d];if(b(g,d,a))return g}}function Q(a,b){return eb(a,b,!0)}function R(a,b,c){var d=-1,e=a?a.length:0;if(b=b&&"undefined"==typeof c?b:Ab(b,c),"number"==typeof e)for(;++d<e&&b(a[d],d,a)!==Zb;);else Xc(a,b)}function S(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),(Ac.call(d,c)?d[c]:d[c]=[]).push(a)}),d}function T(a,b){var c=Nc.call(arguments,2),d=-1,e="function"==typeof b,f=a?a.length:0,g=Array("number"==typeof f?f:0);return R(a,function(a){g[++d]=(e?b:a[b]).apply(a,c)}),g}function U(a,b,c){var d=-1,e=a?a.length:0;if(b=Ab(b,c),"number"==typeof e)for(var f=Array(e);++d<e;)f[d]=b(a[d],d,a);else f=[],Xc(a,function(a,c,e){f[++d]=b(a,c,e)});return f}function V(a,b,c){var d=-1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);g>d&&(d=g,e=a)});else for(;++f<g;){var h=a[f];h>e&&(e=h)}return e}function W(a,b,c){var d=1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);d>g&&(d=g,e=a)});else for(;++f<g;){var h=a[f];e>h&&(e=h)}return e}function X(a,b){var c=-1,d=a?a.length:0;if("number"==typeof d)for(var e=Array(d);++c<d;)e[c]=a[c][b];return e||U(a,b)}function Y(a,b,c,d){if(!a)return c;var e=arguments.length<3;b=Ab(b,d,4);var f=-1,g=a.length;if("number"==typeof g)for(e&&(c=a[++f]);++f<g;)c=b(c,a[f],f,a);else Xc(a,function(a,d,f){c=e?(e=!1,a):b(c,a,d,f)});return c}function Z(a,b,c,d){var e=a,f=a?a.length:0,g=arguments.length<3;if("number"!=typeof f){var h=Tc(a);f=h.length}return b=Ab(b,d,4),R(a,function(a,d,i){d=h?h[--f]:--f,c=g?(g=!1,e[d]):b(c,e[d],d,i)}),c}function $(a,b,c){return b=Ab(b,c),O(a,function(a,c,d){return!b(a,c,d)})}function _(a){var b=-1,c=a?a.length:0,d=Array("number"==typeof c?c:0);return R(a,function(a){var c=zc(Mc()*(++b+1));d[b]=d[c],d[c]=a}),d}function ab(a){var b=a?a.length:0;return"number"==typeof b?b:Tc(a).length}function bb(a,b,c){var d;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&!(d=b(a[e],e,a)););else Xc(a,function(a,c,e){return(d=b(a,c,e))&&Zb});return!!d}function cb(a,b,d){var e=-1,f=a?a.length:0,g=Array("number"==typeof f?f:0);for(b=Ab(b,d),R(a,function(a,c,d){g[++e]={criteria:b(a,c,d),index:e,value:a}}),f=g.length,g.sort(c);f--;)g[f]=g[f].value;return g}function db(a){return Rc(a)?Nc.call(a):a&&"number"==typeof a.length?U(a):K(a)}function eb(a,b,c){return c&&w(b)?null:(c?P:O)(a,b)}function fb(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function gb(a){for(var b=-1,c=k(),d=a.length,e=yc.apply(sc,Nc.call(arguments,1)),f=[];++b<d;){var g=a[b];c(e,g)<0&&f.push(g)}return f}function hb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=-1;for(b=Ab(b,c);++f<e&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[0];return Nc.call(a,0,Lc(Kc(0,d),e))}}function ib(a,b){for(var c=-1,d=a?a.length:0,e=[];++c<d;){var f=a[c];Rc(f)?Bc.apply(e,b?f:ib(f)):e.push(f)}return e}function jb(a,c,d){if("number"==typeof d){var e=a?a.length:0;d=0>d?Kc(0,e+d):d||0}else if(d){var f=qb(a,c);return a[f]===c?f:-1}return a?b(a,c,d):-1}function kb(a,b,c){if(!a)return[];var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return Nc.call(a,0,Lc(Kc(0,e-d),e))}function lb(a){var b=arguments,c=b.length,d=-1,e=k(),f=a?a.length:0,g=[];a:for(;++d<f;){var h=a[d];if(e(g,h)<0){for(var i=c;--i;)if(e(b[i],h)<0)continue a;g.push(h)}}return g}function mb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[e-1];return Nc.call(a,Kc(0,e-d))}}function nb(a,b,c){var d=a?a.length:0;for("number"==typeof c&&(d=(0>c?Kc(0,d+c):Lc(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function ob(a,b,c){a=+a||0,c=+c||1,null==b&&(b=a,a=0);for(var d=-1,e=Kc(0,wc((b-a)/c)),f=Array(e);++d<e;)f[d]=a,a+=c;return f}function pb(a,b,c){if("number"!=typeof b&&null!=b){var d=0,e=-1,f=a?a.length:0;for(b=Ab(b,c);++e<f&&b(a[e],e,a);)d++}else d=null==b||c?1:Kc(0,b);return Nc.call(a,d)}function qb(a,b,c,d){var e=0,f=a?a.length:e;for(c=c?Ab(c,d,1):Kb,b=c(b);f>e;){var g=e+f>>>1;c(a[g])<b?e=g+1:f=g}return e}function rb(a){return Rc(a)||(arguments[0]=a?Nc.call(a):sc),sb(yc.apply(sc,arguments))}function sb(a,b,c,d){var e=-1,f=k(),g=a?a.length:0,h=[],i=h;for("boolean"!=typeof b&&null!=b&&(d=c,c=b,b=!1),null!=c&&(i=[],c=Ab(c,d));++e<g;){var j=a[e],l=c?c(j,e,a):j;(b?!e||i[i.length-1]!==l:f(i,l)<0)&&(c&&i.push(l),h.push(j))}return h}function tb(a){return gb(a,Nc.call(arguments,1))}function ub(a){for(var b=-1,c=a?V(X(arguments,"length")):0,d=Array(0>c?0:c);++b<c;)d[b]=X(arguments,b);return d}function vb(a,b){for(var c=-1,d=a?a.length:0,e={};++c<d;){var f=a[c];b?e[f]=b[c]:e[f[0]]=f[1]}return e}function wb(a,b){return 1>a?b():function(){return--a<1?b.apply(this,arguments):void 0}}function xb(a,b){return Qc.fastBind||Ec&&arguments.length>2?Ec.call.apply(Ec,arguments):h(a,b,Nc.call(arguments,2))}function yb(a){for(var b=arguments.length>1?yc.apply(sc,Nc.call(arguments,1)):q(a),c=-1,d=b.length;++c<d;){var e=b[c];a[e]=xb(a[e],a)}return a}function zb(){var a=arguments;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Ab(a,b,c){if(null==a)return Kb;var d=typeof a;if("function"!=d){if("object"!=d)return function(b){return b[a]};var e=Tc(a);return function(b){for(var c=e.length,d=!1;c--&&(d=b[e[c]]===a[e[c]]););return d}}return"undefined"==typeof b?a:1===c?function(c){return a.call(b,c)}:2===c?function(c,d){return a.call(b,c,d)}:4===c?function(c,d,e,f){return a.call(b,c,d,e,f)}:function(c,d,e){return a.call(b,c,d,e)}}function Bb(a,b,c){function d(){h=null,c||(f=a.apply(g,e))}var e,f,g,h=null;return function(){var i=c&&!h;return e=arguments,g=this,xc(h),h=Cc(d,b),i&&(f=a.apply(g,e)),f}}function Cb(a){var b=Nc.call(arguments,1);return Cc(function(){a.apply(Xb,b)},1)}function Db(a,b){var c=Nc.call(arguments,2);return Cc(function(){a.apply(Xb,c)},b)}function Eb(a,b){var c={};return function(){var d=$b+(b?b.apply(this,arguments):arguments[0]);return Ac.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}}function Fb(a){var b,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Gb(a){return h(a,Nc.call(arguments,1))
-}function Hb(a,b){function c(){g=new Date,h=null,e=a.apply(f,d)}var d,e,f,g=0,h=null;return function(){var i=new Date,j=b-(i-g);return d=arguments,f=this,0>=j?(xc(h),h=null,g=i,e=a.apply(f,d)):h||(h=Cc(c,j)),e}}function Ib(a,b){return function(){var c=[a];return Bc.apply(c,arguments),b.apply(this,c)}}function Jb(a){return null==a?"":String(a).replace(cc,j)}function Kb(a){return a}function Lb(a){R(q(a),function(b){var c=f[b]=a[b];f.prototype[b]=function(){var a=[this.__wrapped__];Bc.apply(a,arguments);var b=c.apply(f,a);return this.__chain__&&(b=new g(b),b.__chain__=!0),b}})}function Mb(){return a._=uc,this}function Nb(a,b){null==a&&null==b&&(b=1),a=+a||0,null==b?(b=a,a=0):b=+b||0;var c=Mc();return a%1||b%1?a+Lc(c*(b-a+parseFloat("1e-"+((c+"").length-1))),b):a+zc(c*(b-a+1))}function Ob(a,b){var c=a?a[b]:null;return z(c)?a[b]():c}function Pb(a,b,c){var e=f.templateSettings;a||(a=""),c=p({},c,e);var g=0,h="__p += '",i=c.variable,j=RegExp((c.escape||bc).source+"|"+(c.interpolate||bc).source+"|"+(c.evaluate||bc).source+"|$","g");a.replace(j,function(b,c,e,f,i){return h+=a.slice(g,i).replace(dc,d),c&&(h+="' +\n_.escape("+c+") +\n'"),f&&(h+="';\n"+f+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),g=i+b.length,b}),h+="';\n",i||(i="obj",h="with ("+i+" || {}) {\n"+h+"\n}\n"),h="function("+i+") {\n"+"var __t, __p = '', __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n"+h+"return __p\n}";try{var k=Function("_","return "+h)(f)}catch(l){throw l.source=h,l}return b?k(b):(k.source=h,k)}function Qb(a,b,c){for(var d=-1,e=Array(a>-1?a:0);++d<a;)e[d]=b.call(c,d);return e}function Rb(a){return null==a?"":String(a).replace(_b,l)}function Sb(a){var b=++Yb+"";return a?a+b:b}function Tb(a){return a=new g(a),a.__chain__=!0,a}function Ub(a,b){return b(a),a}function Vb(){return this.__chain__=!0,this}function Wb(){return this.__wrapped__}var Xb,Yb=0,Zb={},$b=+new Date+"",_b=/&(?:amp|lt|gt|quot|#39);/g,ac=/<%=([\s\S]+?)%>/g,bc=/($^)/,cc=/[&<>"']/g,dc=/['\n\r\t\u2028\u2029\\]/g,ec="[object Arguments]",fc="[object Array]",gc="[object Boolean]",hc="[object Date]",ic="[object Function]",jc="[object Number]",kc="[object Object]",lc="[object RegExp]",mc="[object String]",nc={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},oc={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},pc=nc[typeof exports]&&exports,qc=nc[typeof module]&&module&&module.exports==pc&&module,rc=nc[typeof global]&&global;!rc||rc.global!==rc&&rc.window!==rc||(a=rc);var sc=[],tc=Object.prototype;String.prototype;var uc=a._,vc=RegExp("^"+String(tc.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),wc=Math.ceil,xc=a.clearTimeout,yc=sc.concat,zc=Math.floor,Ac=tc.hasOwnProperty,Bc=sc.push,Cc=(tc.propertyIsEnumerable,a.setTimeout),Dc=tc.toString,Ec=vc.test(Ec=Dc.bind)&&Ec,Fc=vc.test(Fc=Object.create)&&Fc,Gc=vc.test(Gc=Array.isArray)&&Gc,Hc=a.isFinite,Ic=a.isNaN,Jc=vc.test(Jc=Object.keys)&&Jc,Kc=Math.max,Lc=Math.min,Mc=Math.random,Nc=sc.slice,Oc=vc.test(a.attachEvent),Pc=Ec&&!/\n|true/.test(Ec+Oc);g.prototype=f.prototype;var Qc={};if(function(){var a={0:1,length:1};Qc.fastBind=Ec&&!Pc,Qc.spliceObjects=(sc.splice.call(a,0,1),!a[0])}(1),f.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ac,variable:""},!Fc)var i=function(a){if(A(a)){e.prototype=a;var b=new e;e.prototype=null}return b||{}};m(arguments)||(m=function(a){return a?Ac.call(a,"callee"):!1});var Rc=Gc||function(a){return a?"object"==typeof a&&Dc.call(a)==fc:!1},Sc=function(a){var b,c=a,d=[];if(!c)return d;if(!nc[typeof a])return d;for(b in c)Ac.call(c,b)&&d.push(b);return d},Tc=Jc?function(a){return A(a)?Jc(a):[]}:Sc,Uc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vc=s(Uc),Wc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(b(d[c],c,a)===Zb)return e;return e},Xc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(Ac.call(d,c)&&b(d[c],c,a)===Zb)return e;return e};z(/x/)&&(z=function(a){return"function"==typeof a&&Dc.call(a)==ic}),f.after=wb,f.bind=xb,f.bindAll=yb,f.compact=fb,f.compose=zb,f.countBy=M,f.debounce=Bb,f.defaults=p,f.defer=Cb,f.delay=Db,f.difference=gb,f.filter=O,f.flatten=ib,f.forEach=R,f.functions=q,f.groupBy=S,f.initial=kb,f.intersection=lb,f.invert=s,f.invoke=T,f.keys=Tc,f.map=U,f.max=V,f.memoize=Eb,f.min=W,f.omit=H,f.once=Fb,f.pairs=I,f.partial=Gb,f.pick=J,f.pluck=X,f.range=ob,f.reject=$,f.rest=pb,f.shuffle=_,f.sortBy=cb,f.tap=Ub,f.throttle=Hb,f.times=Qb,f.toArray=db,f.union=rb,f.uniq=sb,f.values=K,f.where=eb,f.without=tb,f.wrap=Ib,f.zip=ub,f.collect=U,f.drop=pb,f.each=R,f.extend=n,f.methods=q,f.object=vb,f.select=O,f.tail=pb,f.unique=sb,f.chain=Tb,f.clone=o,f.contains=L,f.escape=Jb,f.every=N,f.find=P,f.has=r,f.identity=Kb,f.indexOf=jb,f.isArguments=m,f.isArray=Rc,f.isBoolean=t,f.isDate=u,f.isElement=v,f.isEmpty=w,f.isEqual=x,f.isFinite=y,f.isFunction=z,f.isNaN=B,f.isNull=C,f.isNumber=D,f.isObject=A,f.isRegExp=E,f.isString=F,f.isUndefined=G,f.lastIndexOf=nb,f.mixin=Lb,f.noConflict=Mb,f.random=Nb,f.reduce=Y,f.reduceRight=Z,f.result=Ob,f.size=ab,f.some=bb,f.sortedIndex=qb,f.template=Pb,f.unescape=Rb,f.uniqueId=Sb,f.all=N,f.any=bb,f.detect=P,f.findWhere=Q,f.foldl=Y,f.foldr=Z,f.include=L,f.inject=Y,f.first=hb,f.last=mb,f.take=hb,f.head=hb,f.VERSION="1.3.1",Lb(f),f.prototype.chain=Vb,f.prototype.value=Wb,R(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__;return b.apply(a,arguments),Qc.spliceObjects||0!==a.length||delete a[0],this}}),R(["concat","join","slice"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__,c=b.apply(a,arguments);return this.__chain__&&(c=new g(c),c.__chain__=!0),c}}),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(a._=f,define("lodash",[],function(){return f})):pc&&!pc.nodeType?qc?(qc.exports=f)._=f:pc._=f:a._=f}(this),function(){var a,b=this,c=b.Backbone,d=[],e=d.push,f=d.slice,g=d.splice;a="undefined"!=typeof exports?exports:b.Backbone={},a.VERSION="1.0.0";var h=b._;h||"undefined"==typeof require||(h=require("underscore")),a.$=b.jQuery||b.Zepto||b.ender||b.$,a.noConflict=function(){return b.Backbone=c,this},a.emulateHTTP=!1,a.emulateJSON=!1;var i=a.Events={on:function(a,b,c){if(!k(this,"on",a,[b,c])||!b)return this;this._events||(this._events={});var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function(a,b,c){if(!k(this,"once",a,[b,c])||!b)return this;var d=this,e=h.once(function(){d.off(a,e),b.apply(this,arguments)});return e._callback=b,this.on(a,e,c)},off:function(a,b,c){var d,e,f,g,i,j,l,m;if(!this._events||!k(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events={},this;for(g=a?[a]:h.keys(this._events),i=0,j=g.length;j>i;i++)if(a=g[i],f=this._events[a]){if(this._events[a]=d=[],b||c)for(l=0,m=f.length;m>l;l++)e=f[l],(b&&b!==e.callback&&b!==e.callback._callback||c&&c!==e.context)&&d.push(e);d.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=f.call(arguments,1);if(!k(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&l(c,b),d&&l(d,arguments),this},stopListening:function(a,b,c){var d=this._listeners;if(!d)return this;var e=!b&&!c;"object"==typeof b&&(c=this),a&&((d={})[a._listenerId]=a);for(var f in d)d[f].off(b,c,this),e&&delete this._listeners[f];return this}},j=/\s+/,k=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(j.test(c)){for(var f=c.split(j),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},l=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d<e;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f);return;case 2:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g);return;case 3:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g,h);return;default:for(;++d<e;)(c=a[d]).callback.apply(c.ctx,b)}},m={listenTo:"on",listenToOnce:"once"};h.each(m,function(a,b){i[b]=function(b,c,d){var e=this._listeners||(this._listeners={}),f=b._listenerId||(b._listenerId=h.uniqueId("l"));return e[f]=b,"object"==typeof c&&(d=this),b[a](c,d,this),this}}),i.bind=i.on,i.unbind=i.off,h.extend(a,i);var n=a.Model=function(a,b){var c,d=a||{};b||(b={}),this.cid=h.uniqueId("c"),this.attributes={},h.extend(this,h.pick(b,o)),b.parse&&(d=this.parse(d,b)||{}),(c=h.result(this,"defaults"))&&(d=h.defaults({},d,c)),this.set(d,b),this.changed={},this.initialize.apply(this,arguments)},o=["url","urlRoot","collection"];h.extend(n.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return h.clone(this.attributes)},sync:function(){return a.sync.apply(this,arguments)},get:function(a){return this.attributes[a]},escape:function(a){return h.escape(this.get(a))},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e,f,g,i,j,k,l;if(null==a)return this;if("object"==typeof a?(e=a,c=b):(e={})[a]=b,c||(c={}),!this._validate(e,c))return!1;f=c.unset,i=c.silent,g=[],j=this._changing,this._changing=!0,j||(this._previousAttributes=h.clone(this.attributes),this.changed={}),l=this.attributes,k=this._previousAttributes,this.idAttribute in e&&(this.id=e[this.idAttribute]);for(d in e)b=e[d],h.isEqual(l[d],b)||g.push(d),h.isEqual(k[d],b)?delete this.changed[d]:this.changed[d]=b,f?delete l[d]:l[d]=b;if(!i){g.length&&(this._pending=!0);for(var m=0,n=g.length;n>m;m++)this.trigger("change:"+g[m],this,l[g[m]],c)}if(j)return this;if(!i)for(;this._pending;)this._pending=!1,this.trigger("change",this,c);return this._pending=!1,this._changing=!1,this},unset:function(a,b){return this.set(a,void 0,h.extend({},b,{unset:!0}))},clear:function(a){var b={};for(var c in this.attributes)b[c]=void 0;return this.set(b,h.extend({},a,{unset:!0}))},hasChanged:function(a){return null==a?!h.isEmpty(this.changed):h.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?h.clone(this.changed):!1;var b,c=!1,d=this._changing?this._previousAttributes:this.attributes;for(var e in a)h.isEqual(d[e],b=a[e])||((c||(c={}))[e]=b);return c},previous:function(a){return null!=a&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=this,c=a.success;return a.success=function(d){return b.set(b.parse(d,a),a)?(c&&c(b,d,a),b.trigger("sync",b,d,a),void 0):!1},L(this,a),this.sync("read",this,a)},save:function(a,b,c){var d,e,f,g=this.attributes;if(null==a||"object"==typeof a?(d=a,c=b):(d={})[a]=b,!(!d||c&&c.wait||this.set(d,c)))return!1;if(c=h.extend({validate:!0},c),!this._validate(d,c))return!1;d&&c.wait&&(this.attributes=h.extend({},g,d)),void 0===c.parse&&(c.parse=!0);var i=this,j=c.success;return c.success=function(a){i.attributes=g;var b=i.parse(a,c);return c.wait&&(b=h.extend(d||{},b)),h.isObject(b)&&!i.set(b,c)?!1:(j&&j(i,a,c),i.trigger("sync",i,a,c),void 0)},L(this,c),e=this.isNew()?"create":c.patch?"patch":"update","patch"===e&&(c.attrs=d),f=this.sync(e,this,c),d&&c.wait&&(this.attributes=g),f},destroy:function(a){a=a?h.clone(a):{};var b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(a.success=function(e){(a.wait||b.isNew())&&d(),c&&c(b,e,a),b.isNew()||b.trigger("sync",b,e,a)},this.isNew())return a.success(),!1;L(this,a);var e=this.sync("delete",this,a);return a.wait||d(),e},url:function(){var a=h.result(this,"urlRoot")||h.result(this.collection,"url")||K();return this.isNew()?a:a+("/"===a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(a){return this._validate({},h.extend(a||{},{validate:!0}))},_validate:function(a,b){if(!b.validate||!this.validate)return!0;a=h.extend({},this.attributes,a);var c=this.validationError=this.validate(a,b)||null;return c?(this.trigger("invalid",this,c,h.extend(b||{},{validationError:c})),!1):!0}});var p=["keys","values","pairs","invert","pick","omit"];h.each(p,function(a){n.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.attributes),h[a].apply(h,b)}});var q=a.Collection=function(a,b){b||(b={}),b.url&&(this.url=b.url),b.model&&(this.model=b.model),void 0!==b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,h.extend({silent:!0},b))},r={add:!0,remove:!0,merge:!0},s={add:!0,merge:!1,remove:!1};h.extend(q.prototype,i,{model:n,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},sync:function(){return a.sync.apply(this,arguments)},add:function(a,b){return this.set(a,h.defaults(b||{},s))},remove:function(a,b){a=h.isArray(a)?a.slice():[a],b||(b={});var c,d,e,f;for(c=0,d=a.length;d>c;c++)f=this.get(a[c]),f&&(delete this._byId[f.id],delete this._byId[f.cid],e=this.indexOf(f),this.models.splice(e,1),this.length--,b.silent||(b.index=e,f.trigger("remove",f,this,b)),this._removeReference(f));return this},set:function(a,b){b=h.defaults(b||{},r),b.parse&&(a=this.parse(a,b)),h.isArray(a)||(a=a?[a]:[]);var c,d,f,i,j,k=b.at,l=this.comparator&&null==k&&b.sort!==!1,m=h.isString(this.comparator)?this.comparator:null,n=[],o=[],p={};for(c=0,d=a.length;d>c;c++)(f=this._prepareModel(a[c],b))&&((i=this.get(f))?(b.remove&&(p[i.cid]=!0),b.merge&&(i.set(f.attributes,b),l&&!j&&i.hasChanged(m)&&(j=!0))):b.add&&(n.push(f),f.on("all",this._onModelEvent,this),this._byId[f.cid]=f,null!=f.id&&(this._byId[f.id]=f)));if(b.remove){for(c=0,d=this.length;d>c;++c)p[(f=this.models[c]).cid]||o.push(f);o.length&&this.remove(o,b)}if(n.length&&(l&&(j=!0),this.length+=n.length,null!=k?g.apply(this.models,[k,0].concat(n)):e.apply(this.models,n)),j&&this.sort({silent:!0}),b.silent)return this;for(c=0,d=n.length;d>c;c++)(f=n[c]).trigger("add",f,this,b);return j&&this.trigger("sort",this,b),this},reset:function(a,b){b||(b={});for(var c=0,d=this.models.length;d>c;c++)this._removeReference(this.models[c]);return b.previousModels=this.models,this._reset(),this.add(a,h.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),this},push:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:this.length},b)),a},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:0},b)),a},shift:function(a){var b=this.at(0);return this.remove(b,a),b},slice:function(a,b){return this.models.slice(a,b)},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a.cid||a]},at:function(a){return this.models[a]},where:function(a,b){return h.isEmpty(a)?b?void 0:[]:this[b?"find":"filter"](function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},findWhere:function(a){return this.where(a,!0)},sort:function(a){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return a||(a={}),h.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(h.bind(this.comparator,this)),a.silent||this.trigger("sort",this,a),this},sortedIndex:function(a,b,c){b||(b=this.comparator);var d=h.isFunction(b)?b:function(a){return a.get(b)};return h.sortedIndex(this.models,a,d,c)},pluck:function(a){return h.invoke(this.models,"get",a)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=a.success,c=this;return a.success=function(d){var e=a.reset?"reset":"set";c[e](d,a),b&&b(c,d,a),c.trigger("sync",c,d,a)},L(this,a),this.sync("read",this,a)},create:function(a,b){if(b=b?h.clone(b):{},!(a=this._prepareModel(a,b)))return!1;b.wait||this.add(a,b);var c=this,d=b.success;return b.success=function(e){b.wait&&c.add(a,b),d&&d(a,e,b)},a.save(null,b),a},parse:function(a){return a},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(a instanceof n)return a.collection||(a.collection=this),a;b||(b={}),b.collection=this;var c=new this.model(a,b);return c._validate(a,b)?c:(this.trigger("invalid",this,a,b),!1)},_removeReference:function(a){this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!==a&&"remove"!==a||c===this)&&("destroy"===a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],null!=b.id&&(this._byId[b.id]=b)),this.trigger.apply(this,arguments))}});var t=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(t,function(a){q.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.models),h[a].apply(h,b)}});var u=["groupBy","countBy","sortBy"];h.each(u,function(a){q.prototype[a]=function(b,c){var d=h.isFunction(b)?b:function(a){return a.get(b)};return h[a](this.models,d,c)}});var v=a.View=function(a){this.cid=h.uniqueId("view"),this._configure(a||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];h.extend(v.prototype,i,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(b,c){return this.$el&&this.undelegateEvents(),this.$el=b instanceof a.$?b:a.$(b),this.el=this.$el[0],c!==!1&&this.delegateEvents(),this},delegateEvents:function(a){if(!a&&!(a=h.result(this,"events")))return this;this.undelegateEvents();for(var b in a){var c=a[b];if(h.isFunction(c)||(c=this[a[b]]),c){var d=b.match(w),e=d[1],f=d[2];c=h.bind(c,this),e+=".delegateEvents"+this.cid,""===f?this.$el.on(e,c):this.$el.on(e,f,c)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(a){this.options&&(a=h.extend({},h.result(this,"options"),a)),h.extend(this,h.pick(a,x)),this.options=a},_ensureElement:function(){if(this.el)this.setElement(h.result(this,"el"),!1);else{var b=h.extend({},h.result(this,"attributes"));this.id&&(b.id=h.result(this,"id")),this.className&&(b["class"]=h.result(this,"className"));var c=a.$("<"+h.result(this,"tagName")+">").attr(b);this.setElement(c,!1)}}}),a.sync=function(b,c,d){var e=y[b];h.defaults(d||(d={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var f={type:e,dataType:"json"};if(d.url||(f.url=h.result(c,"url")||K()),null!=d.data||!c||"create"!==b&&"update"!==b&&"patch"!==b||(f.contentType="application/json",f.data=JSON.stringify(d.attrs||c.toJSON(d))),d.emulateJSON&&(f.contentType="application/x-www-form-urlencoded",f.data=f.data?{model:f.data}:{}),d.emulateHTTP&&("PUT"===e||"DELETE"===e||"PATCH"===e)){f.type="POST",d.emulateJSON&&(f.data._method=e);var g=d.beforeSend;d.beforeSend=function(a){return a.setRequestHeader("X-HTTP-Method-Override",e),g?g.apply(this,arguments):void 0}}"GET"===f.type||d.emulateJSON||(f.processData=!1),"PATCH"!==f.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(f.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=d.xhr=a.ajax(h.extend(f,d));return c.trigger("request",c,i,d),i};var y={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var z=a.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},A=/\((.*?)\)/g,B=/(\(\?)?:\w+/g,C=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(z.prototype,i,{initialize:function(){},route:function(b,c,d){h.isRegExp(b)||(b=this._routeToRegExp(b)),h.isFunction(c)&&(d=c,c=""),d||(d=this[c]);var e=this;return a.history.route(b,function(f){var g=e._extractParameters(b,f);d&&d.apply(e,g),e.trigger.apply(e,["route:"+c].concat(g)),e.trigger("route",c,g),a.history.trigger("route",e,c,g)}),this},navigate:function(b,c){return a.history.navigate(b,c),this},_bindRoutes:function(){if(this.routes){this.routes=h.result(this,"routes");for(var a,b=h.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(D,"\\$&").replace(A,"(?:$1)?").replace(B,function(a,b){return b?a:"([^/]+)"}).replace(C,"(.*?)"),new RegExp("^"+a+"$")},_extractParameters:function(a,b){var c=a.exec(b).slice(1);return h.map(c,function(a){return a?decodeURIComponent(a):null})}});var E=a.History=function(){this.handlers=[],h.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},F=/^[#\/]|\s+$/g,G=/^\/+|\/+$/g,H=/msie [\w.]+/,I=/\/$/;E.started=!1,h.extend(E.prototype,i,{interval:50,getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=this.location.pathname;var c=this.root.replace(I,"");a.indexOf(c)||(a=a.substr(c.length))}else a=this.getHash();return a.replace(F,"")},start:function(b){if(E.started)throw new Error("Backbone.history has already been started");E.started=!0,this.options=h.extend({},{root:"/"},this.options,b),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var c=this.getFragment(),d=document.documentMode,e=H.exec(navigator.userAgent.toLowerCase())&&(!d||7>=d);this.root=("/"+this.root+"/").replace(G,"/"),e&&this._wantsHashChange&&(this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(c)),this._hasPushState?a.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!e?a.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=c;var f=this.location,g=f.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!g?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&g&&f.hash&&(this.fragment=this.getHash().replace(F,""),this.history.replaceState({},document.title,this.root+this.fragment+f.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),E.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();return a===this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe))),a===this.fragment?!1:(this.iframe&&this.navigate(a),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(a){var b=this.fragment=this.getFragment(a),c=h.any(this.handlers,function(a){return a.route.test(b)?(a.callback(b),!0):void 0});return c},navigate:function(a,b){if(!E.started)return!1;if(b&&b!==!0||(b={trigger:b}),a=this.getFragment(a||""),this.fragment!==a){this.fragment=a;var c=this.root+a;if(this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else{if(!this._wantsHashChange)return this.location.assign(c);this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace))}b.trigger&&this.loadUrl(a)}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),a.history=new E;var J=function(a,b){var c,d=this;c=a&&h.has(a,"constructor")?a.constructor:function(){return d.apply(this,arguments)},h.extend(c,d,b);var e=function(){this.constructor=c};return e.prototype=d.prototype,c.prototype=new e,a&&h.extend(c.prototype,a),c.__super__=d.prototype,c};n.extend=q.extend=z.extend=v.extend=E.extend=J;var K=function(){throw new Error('A "url" property or function must be specified')},L=function(a,b){var c=b.error;b.error=function(d){c&&c(a,d,b),a.trigger("error",a,d,b)}}}.call(this),define("backbone",["lodash","jquery"],function(a){return function(){var b;return b||a.Backbone}}(this)),function(){function a(a,b){try{for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}catch(d){a.prototype=b}}function b(a){for(var b=-1,c=a.length,d=[];++b<c;)d.push(a[b]);return d}function c(a){return Array.prototype.slice.call(a)}function d(){}function e(a){return a}function f(){return this}function g(){return!0}function h(a){return"function"==typeof a?a:function(){return a}}function i(a,b,c){return function(){var d=c.apply(b,arguments);return arguments.length?a:d}}function j(a){return null!=a&&!isNaN(a)}function k(a){return a.length}function l(a){return null==a}function m(a){return a.trim().replace(/\s+/g," ")}function n(a){for(var b=1;a*b%1;)b*=10;return b}function o(){}function p(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],e=new d;return b.on=function(b,d){var f,g=e.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),e.remove(b)),d&&c.push(e.set(b,{on:d})),a)},b}function q(a,b){return b-(a?1+Math.floor(Math.log(a+Math.pow(10,1+Math.floor(Math.log(a)/Math.LN10)-b))/Math.LN10):1)}function r(a){return a+""}function s(a){for(var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];b>0;)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function t(a,b){var c=Math.pow(10,3*Math.abs(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function u(a){return function(b){return 0>=b?0:b>=1?1:a(b)}}function v(a){return function(b){return 1-a(1-b)}}function w(a){return function(b){return.5*(.5>b?a(2*b):2-a(2-2*b))}}function x(a){return a}function y(a){return function(b){return Math.pow(b,a)}}function z(a){return 1-Math.cos(a*Math.PI/2)}function A(a){return Math.pow(2,10*(a-1))}function B(a){return 1-Math.sqrt(1-a*a)}function C(a,b){var c;return arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a),function(d){return 1+a*Math.pow(2,10*-d)*Math.sin(2*(d-c)*Math.PI/b)}}function D(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function E(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function F(){d3.event.stopPropagation(),d3.event.preventDefault()}function G(){for(var a,b=d3.event;a=b.sourceEvent;)b=a;return b}function H(a){for(var b=new o,c=0,d=arguments.length;++c<d;)b[arguments[c]]=p(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=d3.event;e.target=a,d3.event=e,b[e.type].apply(c,d)}finally{d3.event=f}}},b}function I(a){var b=[a.a,a.b],c=[a.c,a.d],d=K(b),e=J(b,c),f=K(L(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*gf,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*gf:0}function J(a,b){return a[0]*b[0]+a[1]*b[1]}function K(a){var b=Math.sqrt(J(a,a));return b&&(a[0]/=b,a[1]/=b),b}function L(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function M(a){return"transform"==a?d3.interpolateTransform:d3.interpolate}function N(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return(c-a)*b}}function O(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function P(){}function Q(a,b,c){return new R(a,b,c)}function R(a,b,c){this.r=a,this.g=b,this.b=c}function S(a){return 16>a?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function T(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/i.exec(a))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(X(e[0]),X(e[1]),X(e[2]))}return(f=lf.get(a))?b(f.r,f.g,f.b):(null!=a&&"#"===a.charAt(0)&&(4===a.length?(g=a.charAt(1),g+=g,h=a.charAt(2),h+=h,i=a.charAt(3),i+=i):7===a.length&&(g=a.substring(1,3),h=a.substring(3,5),i=a.substring(5,7)),g=parseInt(g,16),h=parseInt(h,16),i=parseInt(i,16)),b(g,h,i))}function U(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=.5>i?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(c>b?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):e=d=0,Y(d,e,i)}function V(a,b,c){a=W(a),b=W(b),c=W(c);var d=hb((.4124564*a+.3575761*b+.1804375*c)/pf),e=hb((.2126729*a+.7151522*b+.072175*c)/qf),f=hb((.0193339*a+.119192*b+.9503041*c)/rf);return cb(116*e-16,500*(d-e),200*(e-f))}function W(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function X(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Y(a,b,c){return new Z(a,b,c)}function Z(a,b,c){this.h=a,this.s=b,this.l=c}function $(a,b,c){function d(a){return a>360?a-=360:0>a&&(a+=360),60>a?f+(g-f)*a/60:180>a?g:240>a?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a%=360,0>a&&(a+=360),b=0>b?0:b>1?1:b,c=0>c?0:c>1?1:c,g=.5>=c?c*(1+b):c+b-c*b,f=2*c-g,Q(e(a+120),e(a),e(a-120))}function _(a,b,c){return new ab(a,b,c)}function ab(a,b,c){this.h=a,this.c=b,this.l=c}function bb(a,b,c){return cb(c,Math.cos(a*=Math.PI/180)*b,Math.sin(a)*b)}function cb(a,b,c){return new db(a,b,c)}function db(a,b,c){this.l=a,this.a=b,this.b=c}function eb(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=gb(e)*pf,d=gb(d)*qf,f=gb(f)*rf,Q(ib(3.2404542*e-1.5371385*d-.4985314*f),ib(-.969266*e+1.8760108*d+.041556*f),ib(.0556434*e-.2040259*d+1.0572252*f))}function fb(a,b,c){return _(180*(Math.atan2(c,b)/Math.PI),Math.sqrt(b*b+c*c),a)}function gb(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function hb(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ib(a){return Math.round(255*(.00304>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function jb(a){return Ue(a,yf),a}function kb(a){return function(){return tf(a,this)}}function lb(a){return function(){return uf(a,this)}}function mb(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}return a=d3.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function nb(a){return new RegExp("(?:^|\\s+)"+d3.requote(a)+"(?:\\s+|$)","g")}function ob(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=a.trim().split(/\s+/).map(pb);var e=a.length;return"function"==typeof b?d:c}function pb(a){var b=nb(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.className,f=null!=e.baseVal,g=f?e.baseVal:e;d?(b.lastIndex=0,b.test(g)||(g=m(g+" "+a),f?e.baseVal=g:c.className=g)):g&&(g=m(g.replace(b," ")),f?e.baseVal=g:c.className=g)}}function qb(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function rb(a,b){function c(){delete this[a]}function d(){this[a]=b
-}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function sb(a){return{__data__:a}}function tb(a){return function(){return xf(this,a)}}function ub(a){return arguments.length||(a=d3.ascending),function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function vb(a,b,c){function d(){var b=this[f];b&&(this.removeEventListener(a,b,b.$),delete this[f])}function e(){function e(a){var c=d3.event;d3.event=a,h[0]=g.__data__;try{b.apply(g,h)}finally{d3.event=c}}var g=this,h=arguments;d.call(this),this.addEventListener(a,this[f]=e,e.$=c),e._=b}var f="__on"+a,g=a.indexOf(".");return g>0&&(a=a.substring(0,g)),b?e:d}function wb(a,b){for(var c=0,d=a.length;d>c;c++)for(var e,f=a[c],g=0,h=f.length;h>g;g++)(e=f[g])&&b(e,g,c);return a}function xb(a){return Ue(a,Af),a}function yb(a,b,c){Ue(a,Bf);var e=new d,f=d3.dispatch("start","end"),g=Jf;return a.id=b,a.time=c,a.tween=function(b,c){return arguments.length<2?e.get(b):(null==c?e.remove(b):e.set(b,c),a)},a.ease=function(b){return arguments.length?(g="function"==typeof b?b:d3.ease.apply(d3,arguments),a):g},a.each=function(b,c){return arguments.length<2?zb.call(a,b):(f.on(b,c),a)},d3.timer(function(d){return wb(a,function(a,h){function i(d){return o.active>b?k():(o.active=b,e.forEach(function(b,c){(c=c.call(a,p,h))&&l.push(c)}),f.start.call(a,p,h),j(d)||d3.timer(j,0,c),1)}function j(c){if(o.active!==b)return k();for(var d=(c-m)/n,e=g(d),i=l.length;i>0;)l[--i].call(a,e);return d>=1?(k(),Df=b,f.end.call(a,p,h),Df=0,1):void 0}function k(){return--o.count||delete a.__transition__,1}var l=[],m=a.delay,n=a.duration,o=(a=a.node).__transition__||(a.__transition__={active:0,count:0}),p=a.__data__;++o.count,d>=m?i(d):d3.timer(i,m,c)})},0,c),a}function zb(a){var b=Df,c=Jf,d=Hf,e=If;return Df=this.id,Jf=this.ease(),wb(this,function(b,c,d){Hf=b.delay,If=b.duration,a.call(b=b.node,b.__data__,c,d)}),Df=b,Jf=c,Hf=d,If=e,this}function Ab(a,b,c){return""!=c&&Mf}function Bb(a,b){return d3.tween(a,M(b))}function Cb(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=Db()-b;d>24?(isFinite(d)&&(clearTimeout(Lf),Lf=setTimeout(Cb,d)),Kf=0):(Kf=1,Qf(Cb))}function Db(){for(var a=null,b=Pf,c=1/0;b;)b.flush?(delete Of[b.callback.id],b=a?a.next=b.next:Pf=b.next):(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function Eb(a,b){var c=a.ownerSVGElement||a;if(c.createSVGPoint){var d=c.createSVGPoint();if(0>Rf&&(window.scrollX||window.scrollY)){c=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var e=c[0][0].getScreenCTM();Rf=!(e.f||e.e),c.remove()}return Rf?(d.x=b.pageX,d.y=b.pageY):(d.x=b.clientX,d.y=b.clientY),d=d.matrixTransform(a.getScreenCTM().inverse()),[d.x,d.y]}var f=a.getBoundingClientRect();return[b.clientX-f.left-a.clientLeft,b.clientY-f.top-a.clientTop]}function Fb(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Gb(a){return a.rangeExtent?a.rangeExtent():Fb(a.range())}function Hb(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return f>g&&(c=d,d=e,e=c,c=f,f=g,g=c),(b=b(g-f))&&(a[d]=b.floor(f),a[e]=b.ceil(g)),a}function Ib(){return Math}function Jb(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qb:Pb,i=d?O:N;return g=e(a,b,i,c),h=e(b,a,i,d3.interpolate),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(d3.interpolateRound)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Nb(a,b)},f.tickFormat=function(b){return Ob(a,b)},f.nice=function(){return Hb(a,Lb),e()},f.copy=function(){return Jb(a,b,c,d)},e()}function Kb(a,b){return d3.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Lb(a){return a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1),a&&{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function Mb(a,b){var c=Fb(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return.15>=f?e*=10:.35>=f?e*=5:.75>=f&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Nb(a,b){return d3.range.apply(d3,Mb(a,b))}function Ob(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Mb(a,b)[2])/Math.LN10+.01))+"f")}function Pb(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Qb(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Rb(a,b){function c(c){return a(b(c))}var d=b.pow;return c.invert=function(b){return d(a.invert(b))},c.domain=function(e){return arguments.length?(b=e[0]<0?Tb:Sb,d=b.pow,a.domain(e.map(b)),c):a.domain().map(d)},c.nice=function(){return a.domain(Hb(a.domain(),Ib)),c},c.ticks=function(){var c=Fb(a.domain()),e=[];if(c.every(isFinite)){var f=Math.floor(c[0]),g=Math.ceil(c[1]),h=d(c[0]),i=d(c[1]);if(b===Tb)for(e.push(d(f));f++<g;)for(var j=9;j>0;j--)e.push(d(f)*j);else{for(;g>f;f++)for(var j=1;10>j;j++)e.push(d(f)*j);e.push(d(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},c.tickFormat=function(a,e){if(arguments.length<2&&(e=Sf),arguments.length<1)return e;var f,g=Math.max(.1,a/c.ticks().length),h=b===Tb?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil);return function(a){return a/d(h(b(a)+f))<=g?e(a):""}},c.copy=function(){return Rb(a.copy(),b)},Kb(c,a)}function Sb(a){return Math.log(0>a?0:a)/Math.LN10}function Tb(a){return-Math.log(a>0?0:-a)/Math.LN10}function Ub(a,b){function c(b){return a(d(b))}var d=Vb(b),e=Vb(1/b);return c.invert=function(b){return e(a.invert(b))},c.domain=function(b){return arguments.length?(a.domain(b.map(d)),c):a.domain().map(e)},c.ticks=function(a){return Nb(c.domain(),a)},c.tickFormat=function(a){return Ob(c.domain(),a)},c.nice=function(){return c.domain(Hb(c.domain(),Lb))},c.exponent=function(a){if(!arguments.length)return b;var f=c.domain();return d=Vb(b=a),e=Vb(1/b),c.domain(f)},c.copy=function(){return Ub(a.copy(),b)},Kb(c,a)}function Vb(a){return function(b){return 0>b?-Math.pow(-b,a):Math.pow(b,a)}}function Wb(a,b){function c(b){return g[((f.get(b)||f.set(b,a.push(b)))-1)%g.length]}function e(b,c){return d3.range(a.length).map(function(a){return b+c*a})}var f,g,h;return c.domain=function(e){if(!arguments.length)return a;a=[],f=new d;for(var g,h=-1,i=e.length;++h<i;)f.has(g=e[h])||f.set(g,a.push(g));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(g=a,h=0,b={t:"range",a:arguments},c):g},c.rangePoints=function(d,f){arguments.length<2&&(f=0);var i=d[0],j=d[1],k=(j-i)/(Math.max(1,a.length-1)+f);return g=e(a.length<2?(i+j)/2:i+k*f/2,k),h=0,b={t:"rangePoints",a:arguments},c},c.rangeBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=(l-k)/(a.length-f+2*i);return g=e(k+m*i,m),j&&g.reverse(),h=m*(1-f),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=Math.floor((l-k)/(a.length-f+2*i)),n=l-k-(a.length-f)*m;return g=e(k+Math.round(n/2),m),j&&g.reverse(),h=Math.round(m*(1-f)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return h},c.rangeExtent=function(){return Fb(b.a[0])},c.copy=function(){return Wb(a,b)},c.domain(a)}function Xb(a,b){function c(){var c=0,f=(a.length,b.length);for(e=[];++c<f;)e[c-1]=d3.quantile(a,c/f);return d}function d(a){return isNaN(a=+a)?0/0:b[d3.bisect(e,a)]}var e;return d.domain=function(b){return arguments.length?(a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),c()):a},d.range=function(a){return arguments.length?(b=a,c()):b},d.quantiles=function(){return e},d.copy=function(){return Xb(a,b)},c()}function Yb(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.copy=function(){return Yb(a,b,c)},e()}function Zb(a,b){function c(c){return b[d3.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.copy=function(){return Zb(a,b)},c}function $b(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Nb(a,b)},b.tickFormat=function(b){return Ob(a,b)},b.copy=function(){return $b(a)},b}function _b(a){return a.innerRadius}function ac(a){return a.outerRadius}function bc(a){return a.startAngle}function cc(a){return a.endAngle}function dc(a){function b(b){function g(){k.push("M",f(a(l),j))}for(var i,k=[],l=[],m=-1,n=b.length,o=h(c),p=h(d);++m<n;)e.call(this,i=b[m],m)?l.push([+o.call(this,i,m),+p.call(this,i,m)]):l.length&&(g(),l=[]);return l.length&&g(),k.length?k.join(""):null}var c=ec,d=fc,e=g,f=gc,i=f.key,j=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?f=a:(f=Zf.get(a)||gc).key,b):i},b.tension=function(a){return arguments.length?(j=a,b):j},b}function ec(a){return a[0]}function fc(a){return a[1]}function gc(a){return a.join("L")}function hc(a){return gc(a)+"Z"}function ic(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function jc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function kc(a,b){return a.length<4?gc(a):a[1]+nc(a.slice(1,a.length-1),oc(a,b))}function lc(a,b){return a.length<3?gc(a):a[0]+nc((a.push(a[0]),a),oc([a[a.length-2]].concat(a,[a[1]]),b))}function mc(a,b){return a.length<3?gc(a):a[0]+nc(a,oc(a,b))}function nc(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return gc(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function oc(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function pc(a){if(a.length<3)return gc(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];for(uc(i,g,h);++b<c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);for(b=-1;++b<2;)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);return i.join("")}function qc(a){if(a.length<4)return gc(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(tc(ag,f)+","+tc(ag,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),uc(c,f,g);return c.join("")}function rc(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[tc(ag,g),",",tc(ag,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),uc(b,g,h);return b.join("")}function sc(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return pc(a)}function tc(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function uc(a,b,c){a.push("C",tc($f,b),",",tc($f,c),",",tc(_f,b),",",tc(_f,c),",",tc(ag,b),",",tc(ag,c))}function vc(a,b){return(b[1]-a[1])/(b[0]-a[0])}function wc(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=vc(e,f);++b<c;)d[b]=(g+(g=vc(e=f,f=a[b+1])))/2;return d[b]=g,d}function xc(a){for(var b,c,d,e,f=[],g=wc(a),h=-1,i=a.length-1;++h<i;)b=vc(a[h],a[h+1]),Math.abs(b)<1e-6?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function yc(a){return a.length<3?gc(a):a[0]+nc(a,xc(a))}function zc(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]+Xf,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Ac(a){function b(b){function g(){q.push("M",j(a(s),n),m,l(a(r.reverse()),n),"Z")}for(var k,o,p,q=[],r=[],s=[],t=-1,u=b.length,v=h(c),w=h(e),x=c===d?function(){return o}:h(d),y=e===f?function(){return p}:h(f);++t<u;)i.call(this,k=b[t],t)?(r.push([o=+v.call(this,k,t),p=+w.call(this,k,t)]),s.push([+x.call(this,k,t),+y.call(this,k,t)])):r.length&&(g(),r=[],s=[]);return r.length&&g(),q.length?q.join(""):null}var c=ec,d=ec,e=0,f=fc,i=g,j=gc,k=j.key,l=j,m="L",n=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(i=a,b):i},b.interpolate=function(a){return arguments.length?(k="function"==typeof a?j=a:(j=Zf.get(a)||gc).key,l=j.reverse||j,m=j.closed?"M":"L",b):k},b.tension=function(a){return arguments.length?(n=a,b):n},b}function Bc(a){return a.source}function Cc(a){return a.target}function Dc(a){return a.radius}function Ec(a){return[a.x,a.y]}function Fc(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+Xf;return[c*Math.cos(d),c*Math.sin(d)]}}function Gc(){return 64}function Hc(){return"circle"}function Ic(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Jc(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function Kc(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function Lc(a,b,c){if(d=[],c&&b.length>1){for(var d,e,f,g=Fb(a.domain()),h=-1,i=b.length,j=(b[1]-b[0])/++c;++h<i;)for(e=c;--e>0;)(f=+b[h]-e*j)>=g[0]&&d.push(f);for(--h,e=0;++e<c&&(f=+b[h]+e*j)<g[1];)d.push(f)}return d}function Mc(){gg||(gg=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a,b=d3.event;try{gg.scrollTop=1e3,gg.dispatchEvent(b),a=1e3-gg.scrollTop}catch(c){a=b.wheelDelta||5*-b.detail}return a}function Nc(a){for(var b=a.source,c=a.target,d=Pc(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Oc(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Pc(a,b){if(a===b)return a;for(var c=Oc(a),d=Oc(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Qc(a){a.fixed|=2}function Rc(a){a.fixed&=1}function Sc(a){a.fixed|=4}function Tc(a){a.fixed&=3}function Uc(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Uc(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function Vc(){return 20}function Wc(){return 1}function Xc(a){return a.x}function Yc(a){return a.y}function Zc(a,b,c){a.y0=b,a.y=c}function $c(a){return d3.range(a.length)}function _c(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ad(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;f>c;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function bd(a){return a.reduce(cd,0)}function cd(a,b){return a+b[1]}function dd(a,b){return ed(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ed(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function fd(a){return[d3.min(a),d3.max(a)]}function gd(a,b){return d3.rebind(a,b,"sort","children","value"),a.links=kd,a.nodes=function(b){return lg=!0,(a.nodes=a)(b)},a}function hd(a){return a.children}function id(a){return a.value}function jd(a,b){return b.value-a.value}function kd(a){return d3.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function ld(a,b){return a.value-b.value}function md(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function nd(a,b){a._pack_next=b,b._pack_prev=a}function od(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return e*e-c*c-d*d>.001}function pd(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-1/0,m=1/0,n=-1/0;if(c.forEach(qd),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],td(d,e,f),b(f),md(d,f),d._pack_prev=f,md(f,e),e=d._pack_next,g=3;j>g;g++){td(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(od(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!od(i,f);i=i._pack_prev,q++);o?(q>p||p==q&&e.r<d.r?nd(d,e=h):nd(d=i,e),g--):(md(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;j>g;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(rd)}}function qd(a){a._pack_next=a._pack_prev=a}function rd(a){delete a._pack_next,delete a._pack_prev}function sd(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)sd(e[f],b,c,d)}function td(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ud(a){return 1+d3.max(a,function(a){return a.y})}function vd(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function wd(a){var b=a.children;return b&&b.length?wd(b[0]):a}function xd(a){var b,c=a.children;return c&&(b=c.length)?xd(c[b-1]):a}function yd(a,b){return a.parent==b.parent?1:2}function zd(a){var b=a.children;return b&&b.length?b[0]:a._tree.thread}function Ad(a){var b,c=a.children;return c&&(b=c.length)?c[b-1]:a._tree.thread}function Bd(a,b){var c=a.children;if(c&&(e=c.length))for(var d,e,f=-1;++f<e;)b(d=Bd(c[f],b),a)>0&&(a=d);return a}function Cd(a,b){return a.x-b.x}function Dd(a,b){return b.x-a.x}function Ed(a,b){return a.depth-b.depth}function Fd(a,b){function c(a,d){var e=a.children;if(e&&(g=e.length))for(var f,g,h=null,i=-1;++i<g;)f=e[i],c(f,h),h=f;b(a,d)}c(a,null)}function Gd(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f]._tree,b.prelim+=c,b.mod+=c,c+=b.shift+(d+=b.change)}function Hd(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function Id(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function Jd(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Kd(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return 0>e&&(c+=e/2,e=0),0>f&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Ld(a,b){function c(a,d){d3.text(a,b,function(a){d(a&&c.parse(a))})}function d(b){return b.map(e).join(a)}function e(a){return g.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var f=new RegExp("\r\n|["+a+"\r\n]","g"),g=new RegExp('["'+a+"\n]"),h=a.charCodeAt(0);return c.parse=function(a){var b;return c.parseRows(a,function(a,c){if(c){for(var d={},e=-1,f=b.length;++e<f;)d[b[e]]=a[e];return d}return b=a,null})},c.parseRows=function(a,b){function c(){if(f.lastIndex>=a.length)return i;if(e)return e=!1,g;var b=f.lastIndex;if(34===a.charCodeAt(b)){for(var c=b;c++<a.length;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;c++}f.lastIndex=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&f.lastIndex++):10===d&&(e=!0),a.substring(b+1,c).replace(/""/g,'"')}var j=f.exec(a);return j?(e=j[0].charCodeAt(0)!==h,a.substring(b,j.index)):(f.lastIndex=a.length,a.substring(b))}var d,e,g={},i={},j=[],k=0;for(f.lastIndex=0;(d=c())!==i;){for(var l=[];d!==g&&d!==i;)l.push(d),d=c();(!b||(l=b(l,k++)))&&j.push(l)}return j},c.format=function(a){return a.map(d).join("\n")},c}function Md(a,b){return function(c){return c&&a.hasOwnProperty(c.type)?a[c.type](c):b}}function Nd(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Od(a,b){ng.hasOwnProperty(a.type)&&ng[a.type](a,b)}function Pd(a,b){Od(a.geometry,b)}function Qd(a,b){for(var c=a.features,d=0,e=c.length;e>d;d++)Od(c[d].geometry,b)}function Rd(a,b){for(var c=a.geometries,d=0,e=c.length;e>d;d++)Od(c[d],b)}function Sd(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Td(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Ud(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d][0],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Vd(a,b){b.apply(null,a.coordinates)}function Wd(a,b){for(var c=a.coordinates[0],d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Xd(a){return a.source}function Yd(a){return a.target}function Zd(){function a(a){var b=Math.sin(a*=n)*o,c=Math.sin(n-a)*o,d=c*f+b*l,h=c*g+b*m,i=c*e+b*k;return[Math.atan2(h,d)/mg,Math.atan2(i,Math.sqrt(d*d+h*h))/mg]}var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return a.distance=function(){return null==n&&(o=1/Math.sin(n=Math.acos(Math.max(-1,Math.min(1,e*k+d*j*Math.cos(h-b)))))),n},a.source=function(h){var i=Math.cos(b=h[0]*mg),j=Math.sin(b);return d=Math.cos(c=h[1]*mg),e=Math.sin(c),f=d*i,g=d*j,n=null,a},a.target=function(b){var c=Math.cos(h=b[0]*mg),d=Math.sin(h);return j=Math.cos(i=b[1]*mg),k=Math.sin(i),l=j*c,m=j*d,n=null,a},a}function $d(a,b){var c=Zd().source(a).target(b);return c.distance(),c}function _d(a){for(var b=0,c=0;;){if(a(b,c))return[b,c];0===b?(b=c+1,c=0):(b-=1,c+=1)}}function ae(a,b,c,d){var e,f,g,h,i,j,k;return e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1],(k-g)*(h-f)-(i-g)*(j-f)>0}function be(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function ce(a,b,c,d){var e=a[0],f=b[0],g=c[0],h=d[0],i=a[1],j=b[1],k=c[1],l=d[1],m=e-g,n=f-e,o=h-g,p=i-k,q=j-i,r=l-k,s=(o*p-r*m)/(r*n-o*q);return[e+s*n,i+s*q]}function de(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));return b=b.l},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[qg[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;return c.c=a.x*d+a.y*e+.5*(d*d+e*e),f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e),c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f,g,h=(c.c*d.b-d.c*c.b)/e,i=(d.c*c.a-c.c*d.a)/e,j=c.region.r,k=d.region.r;j.y<k.y||j.y==k.y&&j.x<k.x?(f=a,g=c):(f=b,g=d);var l=h>=g.region.r.x;return l&&"l"===f.side||!l&&"r"===f.side?null:{x:h,y:i}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&"l"===a.side)return 1;if(!e&&"r"===a.side)return 0;if(1===c.a){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;if(!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1)),!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return"l"===a.side?i:!i},endPoint:function(a,c,d){a.ep[c]=d,a.ep[qg[c]]&&b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;g>d;d++){var h=e[d];if(!(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x))break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;d>b&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return 0===f.list.length},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;d>b;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.list.shift();for(var g,h,i,j,k,l,m,n,o,p,q,r,s,t=c.list.shift();;)if(f.empty()||(g=f.min()),t&&(f.empty()||t.y<g.y||t.y==g.y&&t.x<g.x))h=d.leftBound(t),i=d.right(h),m=d.rightRegion(h),r=e.bisect(m,t),l=d.createHalfEdge(r,"l"),d.insert(h,l),p=e.intersect(h,l),p&&(f.del(h),f.insert(h,p,e.distance(p,t))),h=l,l=d.createHalfEdge(r,"r"),d.insert(h,l),p=e.intersect(l,i),p&&f.insert(l,p,e.distance(p,t)),t=c.list.shift();else{if(f.empty())break;h=f.extractMin(),j=d.left(h),i=d.right(h),k=d.right(i),m=d.leftRegion(h),n=d.rightRegion(i),q=h.vertex,e.endPoint(h.edge,h.side,q),e.endPoint(i.edge,i.side,q),d.del(h),f.del(i),d.del(i),s="l",m.y>n.y&&(o=m,m=n,n=o,s="r"),r=e.bisect(m,n),l=d.createHalfEdge(r,s),d.insert(j,l),e.endPoint(r,qg[s],q),p=e.intersect(j,l),p&&(f.del(j),f.insert(j,p,e.distance(p,m))),p=e.intersect(l,k),p&&f.insert(l,p,e.distance(p,m))}for(h=d.right(d.leftEnd);h!=d.rightEnd;h=d.right(h))b(h.edge)}function ee(){return{leaf:!0,nodes:[],point:null}}function fe(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&fe(a,i[0],c,d,g,h),i[1]&&fe(a,i[1],g,d,e,h),i[2]&&fe(a,i[2],c,h,g,f),i[3]&&fe(a,i[3],g,h,e,f)}}function ge(a){return{x:a[0],y:a[1]}}function he(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ie(a){return a.substring(0,3)}function je(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;h>g;){if(d>=i)return-1;if(e=b.charCodeAt(g++),37==e){if(f=Mg[b.charAt(g++)],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function ke(a){return new RegExp("^(?:"+a.map(d3.requote).join("|")+")","i")}function le(a){for(var b=new d,c=-1,e=a.length;++c<e;)b.set(a[c].toLowerCase(),c);return b}function me(a,b,c){Gg.lastIndex=0;var d=Gg.exec(b.substring(c));return d?c+=d[0].length:-1}function ne(a,b,c){Fg.lastIndex=0;var d=Fg.exec(b.substring(c));return d?c+=d[0].length:-1}function oe(a,b,c){Jg.lastIndex=0;var d=Jg.exec(b.substring(c));return d?(a.m=Kg.get(d[0].toLowerCase()),c+=d[0].length):-1}function pe(a,b,c){Hg.lastIndex=0;var d=Hg.exec(b.substring(c));return d?(a.m=Ig.get(d[0].toLowerCase()),c+=d[0].length):-1}function qe(a,b,c){return je(a,Lg.c.toString(),b,c)}function re(a,b,c){return je(a,Lg.x.toString(),b,c)}function se(a,b,c){return je(a,Lg.X.toString(),b,c)}function te(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+4));return d?(a.y=+d[0],c+=d[0].length):-1}function ue(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.y=ve(+d[0]),c+=d[0].length):-1}function ve(a){return a+(a>68?1900:2e3)}function we(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.m=d[0]-1,c+=d[0].length):-1}function xe(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.d=+d[0],c+=d[0].length):-1}function ye(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.H=+d[0],c+=d[0].length):-1}function ze(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.M=+d[0],c+=d[0].length):-1}function Ae(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.S=+d[0],c+=d[0].length):-1}function Be(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+3));return d?(a.L=+d[0],c+=d[0].length):-1}function Ce(a,b,c){var d=Og.get(b.substring(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}function De(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=~~(Math.abs(b)/60),e=Math.abs(b)%60;return c+Bg(d)+Bg(e)}function Ee(a){return a.toISOString()}function Fe(a,b,c){function d(b){var c=a(b),d=f(c,1);return d-b>b-c?c:d}function e(c){return b(c=a(new rg(c-1)),1),c}function f(a,c){return b(a=new rg(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;d>g;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;d>g;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{rg=he;var d=new he;return d._=a,g(d,b,c)}finally{rg=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Ge(a);return i.floor=i,i.round=Ge(d),i.ceil=Ge(e),i.offset=Ge(f),i.range=h,a}function Ge(a){return function(b,c){try{rg=he;var d=new he;return d._=b,a(d,c)._}finally{rg=Date}}}function He(a,b,c){function d(b){return a(b)}return d.invert=function(b){return Je(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(Je)},d.nice=function(a){return d.domain(Hb(d.domain(),function(){return a}))},d.ticks=function(c,e){var f=Ie(d.domain());if("function"!=typeof c){var g=f[1]-f[0],h=g/c,i=d3.bisect(Qg,h);if(i==Qg.length)return b.year(f,c);if(!i)return a.ticks(c).map(Je);Math.log(h/Qg[i-1])<Math.log(Qg[i]/h)&&--i,c=b[i],e=c[1],c=c[0].range}return c(f[0],new Date(+f[1]+1),e)},d.tickFormat=function(){return c},d.copy=function(){return He(a.copy(),b,c)},d3.rebind(d,a,"range","rangeRound","interpolate","clamp")}function Ie(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Je(a){return new Date(a)}function Ke(a){return function(b){for(var c=a.length-1,d=a[c];!d[1](b);)d=a[--c];return d[0](b)}}function Le(a){var b=new Date(a,0,1);return b.setFullYear(a),b}function Me(a){var b=a.getFullYear(),c=Le(b),d=Le(b+1);return b+(a-c)/(d-c)}function Ne(a){var b=new Date(Date.UTC(a,0,1));return b.setUTCFullYear(a),b}function Oe(a){var b=a.getUTCFullYear(),c=Ne(b),d=Ne(b+1);return b+(a-c)/(d-c)}Date.now||(Date.now=function(){return+new Date});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Pe){var Qe=CSSStyleDeclaration.prototype,Re=Qe.setProperty;Qe.setProperty=function(a,b,c){Re.call(this,a,b+"",c)}}d3={version:"2.10.3"};var Se=c;try{Se(document.documentElement.childNodes)[0].nodeType}catch(Te){Se=b}var Ue=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.map=function(a){var b=new d;for(var c in a)b.set(c,a[c]);return b},a(d,{has:function(a){return Ve+a in this},get:function(a){return this[Ve+a]},set:function(a,b){return this[Ve+a]=b},remove:function(a){return a=Ve+a,a in this&&delete this[a]},keys:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},values:function(){var a=[];return this.forEach(function(b,c){a.push(c)}),a},entries:function(){var a=[];return this.forEach(function(b,c){a.push({key:b,value:c})}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===We&&a.call(this,b.substring(1),this[b])}});var Ve="\0",We=Ve.charCodeAt(0);d3.functor=h,d3.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=i(a,b,b[c]);return a},d3.ascending=function(a,b){return b>a?-1:a>b?1:a>=b?0:0/0},d3.descending=function(a,b){return a>b?-1:b>a?1:b>=a?0:0/0},d3.mean=function(a,b){var c,d=a.length,e=0,f=-1,g=0;if(1===arguments.length)for(;++f<d;)j(c=a[f])&&(e+=(c-e)/++g);else for(;++f<d;)j(c=b.call(a,a[f],f))&&(e+=(c-e)/++g);return g?e:void 0},d3.median=function(a,b){return arguments.length>1&&(a=a.map(b)),a=a.filter(j),a.length?d3.quantile(a.sort(d3.ascending),.5):void 0},d3.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)
-}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},d3.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},d3.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g&&(null==(c=e=a[f])||c!=c);)c=e=void 0;for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),d>e&&(e=d))}else{for(;++f<g&&(null==(c=e=b.call(a,a[f],f))||c!=c);)c=void 0;for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),d>e&&(e=d))}return[c,e]},d3.random={normal:function(a,b){var c=arguments.length;return 2>c&&(b=1),1>c&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(a,b){var c=arguments.length;2>c&&(b=1),1>c&&(a=0);var d=d3.random.normal();return function(){return Math.exp(a+b*d())}},irwinHall:function(a){return function(){for(var b=0,c=0;a>c;c++)b+=Math.random();return b/a}}},d3.sum=function(a,b){var c,d=0,e=a.length,f=-1;if(1===arguments.length)for(;++f<e;)isNaN(c=+a[f])||(d+=c);else for(;++f<e;)isNaN(c=+b.call(a,a[f],f))||(d+=c);return d},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.transpose=function(a){return d3.zip.apply(d3,a)},d3.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=d3.min(arguments,k),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},d3.bisector=function(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;a.call(b,b[f],f)<c?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;c<a.call(b,b[f],f)?e=f:d=f+1}return d}}};var Xe=d3.bisector(function(a){return a});d3.bisectLeft=Xe.left,d3.bisect=d3.bisectRight=Xe.right,d3.first=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])>0&&(f=c);return f},d3.last=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])<=0&&(f=c);return f},d3.nest=function(){function a(b,h){if(h>=g.length)return e?e.call(f,b):c?b.sort(c):b;for(var i,j,k,l=-1,m=b.length,n=g[h++],o=new d,p={};++l<m;)(k=o.get(i=n(j=b[l])))?k.push(j):o.set(i,[j]);return o.forEach(function(b,c){p[b]=a(c,h)}),p}function b(a,c){if(c>=g.length)return a;var d,e=[],f=h[c++];for(d in a)e.push({key:d,values:b(a[d],c)});return f&&e.sort(function(a,b){return f(a.key,b.key)}),e}var c,e,f={},g=[],h=[];return f.map=function(b){return a(b,0)},f.entries=function(c){return b(a(c,0),0)},f.key=function(a){return g.push(a),f},f.sortKeys=function(a){return h[g.length-1]=a,f},f.sortValues=function(a){return c=a,f},f.rollup=function(a){return e=a,f},f},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){for(var c=[],d=-1,e=b.length;++d<e;)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c,d=[],e=[],f=-1,g=a.length;for(arguments.length<2&&(b=l);++f<g;)b.call(e,c=a[f],f)?e=[]:(e.length||d.push(e),e.push(c));return d},d3.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),1/0===(b-a)/c)throw new Error("infinite range");var d,e=[],f=n(Math.abs(c)),g=-1;if(a*=f,b*=f,c*=f,0>c)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},d3.requote=function(a){return a.replace(Ye,"\\$&")};var Ye=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?(c=b,b=null):b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),b&&d.setRequestHeader("Accept",b),d.onreadystatechange=function(){if(4===d.readyState){var a=d.status;c(!a&&d.response||a>=200&&300>a||304===a?d:null)}},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(null!=a){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)};var Ze={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:Ze,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.substring(0,b),a=a.substring(b+1)),Ze.hasOwnProperty(c)?{space:Ze[c],local:a}:a}},d3.dispatch=function(){for(var a=new o,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=p(a);return a},o.prototype.on=function(a,b){var c=a.indexOf("."),d="";return c>0&&(d=a.substring(c+1),a=a.substring(0,c)),arguments.length<2?this[a].on(d):this[a].on(d,b)},d3.format=function(a){var b=$e.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=1,k="",l=!1;switch(h&&(h=+h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4))),i){case"n":g=!0,i="g";break;case"%":j=100,k="%",i="f";break;case"p":j=100,k="%",i="r";break;case"d":l=!0,h=0;break;case"s":j=-1,i="r"}return"r"!=i||h||(i="g"),i=_e.get(i)||r,function(a){if(l&&a%1)return"";var b=0>a&&(a=-a)?"-":d;if(0>j){var m=d3.formatPrefix(a,h);a=m.scale(a),k=m.symbol}else a*=j;if(a=i(a,h),e){var n=a.length+b.length;f>n&&(a=new Array(f-n+1).join(c)+a),g&&(a=s(a)),a=b+a}else{g&&(a=s(a)),a=b+a;var n=a.length;f>n&&(a=new Array(f-n+1).join(c)+a)}return a+k}};var $e=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,_e=d3.map({g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return d3.round(a,b=q(a,b)).toFixed(Math.max(0,Math.min(20,b)))}}),af=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(t);d3.formatPrefix=function(a,b){var c=0;return a&&(0>a&&(a*=-1),b&&(a=d3.round(a,q(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((0>=c?c+1:c-1)/3)))),af[8+c/3]};var bf=y(2),cf=y(3),df=function(){return x},ef=d3.map({linear:df,poly:y,quad:function(){return bf},cubic:function(){return cf},sin:function(){return z},exp:function(){return A},circle:function(){return B},elastic:C,back:D,bounce:function(){return E}}),ff=d3.map({"in":x,out:v,"in-out":w,"out-in":function(a){return w(v(a))}});d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return c=ef.get(c)||df,d=ff.get(d)||x,u(d(c.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(a){var b=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate();return new I(c?c.matrix:hf)})(a)},I.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gf=180/Math.PI,hf={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(a,b){for(var c,d=d3.interpolators.length;--d>=0&&!(c=d3.interpolators[d](a,b)););return c},d3.interpolateNumber=function(a,b){return b-=a,function(c){return a+b*c}},d3.interpolateRound=function(a,b){return b-=a,function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f,g,h=0,i=0,j=[],k=[];for(jf.lastIndex=0,d=0;c=jf.exec(b);++d)c.index&&j.push(b.substring(h,i=c.index)),k.push({i:j.length,x:c[0]}),j.push(null),h=jf.lastIndex;for(h<b.length&&j.push(b.substring(h)),d=0,f=k.length;(c=jf.exec(a))&&f>d;++d)if(g=k[d],g.x==c[0]){if(g.i)if(null==j[g.i+1])for(j[g.i-1]+=g.x,j.splice(g.i,1),e=d+1;f>e;++e)k[e].i--;else for(j[g.i-1]+=g.x+j[g.i+1],j.splice(g.i,2),e=d+1;f>e;++e)k[e].i-=2;else if(null==j[g.i+1])j[g.i]=g.x;else for(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1),e=d+1;f>e;++e)k[e].i--;k.splice(d,1),f--,d--}else g.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(g.x));for(;f>d;)g=k.pop(),null==j[g.i+1]?j[g.i]=g.x:(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1)),f--;return 1===j.length?null==j[0]?k[0].x:function(){return b}:function(a){for(d=0;f>d;++d)j[(g=k[d]).i]=g.x(a);return j.join("")}},d3.interpolateTransform=function(a,b){var c,d=[],e=[],f=d3.transform(a),g=d3.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:d3.interpolateNumber(h[0],i[0])},{i:3,x:d3.interpolateNumber(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:d3.interpolateNumber(n[0],o[0])},{i:c-2,x:d3.interpolateNumber(n[1],o[1])})):(1!=o[0]||1!=o[1])&&d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+S(Math.round(c+f*a))+S(Math.round(d+g*a))+S(Math.round(e+h*a))}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return $(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateLab=function(a,b){a=d3.lab(a),b=d3.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return eb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateHcl=function(a,b){a=d3.hcl(a),b=d3.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return bb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateArray=function(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;h>c;++c)d.push(d3.interpolate(a[c],b[c]));for(;f>c;++c)e[c]=a[c];for(;g>c;++c)e[c]=b[c];return function(a){for(c=0;h>c;++c)e[c]=d[c](a);return e}},d3.interpolateObject=function(a,b){var c,d={},e={};for(c in a)c in b?d[c]=M(c)(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}};var jf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return("string"==typeof a||"string"==typeof b)&&d3.interpolateString(a+"",b+"")},function(a,b){return("string"==typeof b?lf.has(b)||/^(#|rgb\(|hsl\()/.test(b):b instanceof P)&&d3.interpolateRgb(a,b)},function(a,b){return!isNaN(a=+a)&&!isNaN(b=+b)&&d3.interpolateNumber(a,b)}],P.prototype.toString=function(){return this.rgb()+""},d3.rgb=function(a,b,c){return 1===arguments.length?a instanceof R?Q(a.r,a.g,a.b):T(""+a,Q,$):Q(~~a,~~b,~~c)};var kf=R.prototype=new P;kf.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&e>b&&(b=e),c&&e>c&&(c=e),d&&e>d&&(d=e),Q(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))):Q(e,e,e)},kf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Q(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},kf.hsl=function(){return U(this.r,this.g,this.b)},kf.toString=function(){return"#"+S(this.r)+S(this.g)+S(this.b)};var lf=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});lf.forEach(function(a,b){lf.set(a,T(b,Q,$))}),d3.hsl=function(a,b,c){return 1===arguments.length?a instanceof Z?Y(a.h,a.s,a.l):T(""+a,U,Y):Y(+a,+b,+c)};var mf=Z.prototype=new P;mf.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,this.l/a)},mf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,a*this.l)},mf.rgb=function(){return $(this.h,this.s,this.l)},d3.hcl=function(a,b,c){return 1===arguments.length?a instanceof ab?_(a.h,a.c,a.l):a instanceof db?fb(a.l,a.a,a.b):fb((a=V((a=d3.rgb(a)).r,a.g,a.b)).l,a.a,a.b):_(+a,+b,+c)};var nf=ab.prototype=new P;nf.brighter=function(a){return _(this.h,this.c,Math.min(100,this.l+of*(arguments.length?a:1)))},nf.darker=function(a){return _(this.h,this.c,Math.max(0,this.l-of*(arguments.length?a:1)))},nf.rgb=function(){return bb(this.h,this.c,this.l).rgb()},d3.lab=function(a,b,c){return 1===arguments.length?a instanceof db?cb(a.l,a.a,a.b):a instanceof ab?bb(a.l,a.c,a.h):V((a=d3.rgb(a)).r,a.g,a.b):cb(+a,+b,+c)};var of=18,pf=.95047,qf=1,rf=1.08883,sf=db.prototype=new P;sf.brighter=function(a){return cb(Math.min(100,this.l+of*(arguments.length?a:1)),this.a,this.b)},sf.darker=function(a){return cb(Math.max(0,this.l-of*(arguments.length?a:1)),this.a,this.b)},sf.rgb=function(){return eb(this.l,this.a,this.b)};var tf=function(a,b){return b.querySelector(a)},uf=function(a,b){return b.querySelectorAll(a)},vf=document.documentElement,wf=vf.matchesSelector||vf.webkitMatchesSelector||vf.mozMatchesSelector||vf.msMatchesSelector||vf.oMatchesSelector,xf=function(a,b){return wf.call(a,b)};"function"==typeof Sizzle&&(tf=function(a,b){return Sizzle(a,b)[0]||null},uf=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))},xf=Sizzle.matchesSelector);var yf=[];d3.selection=function(){return zf},d3.selection.prototype=yf,yf.select=function(a){var b,c,d,e,f=[];"function"!=typeof a&&(a=kb(a));for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return jb(f)},yf.selectAll=function(a){var b,c,d=[];"function"!=typeof a&&(a=lb(a));for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=Se(a.call(c,c.__data__,h))),b.parentNode=c);return jb(d)},yf.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=d3.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(mb(b,a[b]));return this}return this.each(mb(a,b))},yf.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=a.trim().split(/^|\s+/g)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.className,null!=b.baseVal&&(b=b.baseVal);++e<d;)if(!nb(a[e]).test(b))return!1;return!0}for(b in a)this.each(ob(b,a[b]));return this}return this.each(ob(a,b))},yf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.each(qb(c,a[c],b));return this}if(2>d)return window.getComputedStyle(this.node(),null).getPropertyValue(a);c=""}return this.each(qb(a,b,c))},yf.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(rb(b,a[b]));return this}return this.each(rb(a,b))},yf.text=function(a){return arguments.length<1?this.node().textContent:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a})},yf.html=function(a){return arguments.length<1?this.node().innerHTML:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a})},yf.append=function(a){function b(){return this.appendChild(document.createElementNS(this.namespaceURI,a))}function c(){return this.appendChild(document.createElementNS(a.space,a.local))}return a=d3.ns.qualify(a),this.select(a.local?c:b)},yf.insert=function(a,b){function c(){return this.insertBefore(document.createElementNS(this.namespaceURI,a),tf(b,this))}function d(){return this.insertBefore(document.createElementNS(a.space,a.local),tf(b,this))}return a=d3.ns.qualify(a),this.select(a.local?d:c)},yf.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},yf.data=function(a,b){function c(a,c){var e,f,g,h=a.length,l=c.length,m=Math.min(h,l),n=Math.max(h,l),o=[],p=[],q=[];if(b){var r,s=new d,t=[],u=c.length;for(e=-1;++e<h;)r=b.call(f=a[e],f.__data__,e),s.has(r)?q[u++]=f:s.set(r,f),t.push(r);for(e=-1;++e<l;)r=b.call(c,g=c[e],e),s.has(r)?(o[e]=f=s.get(r),f.__data__=g,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null),s.remove(r);for(e=-1;++e<h;)s.has(t[e])&&(q[e]=a[e])}else{for(e=-1;++e<m;)f=a[e],g=c[e],f?(f.__data__=g,o[e]=f,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null);for(;l>e;++e)p[e]=sb(c[e]),o[e]=q[e]=null;for(;n>e;++e)q[e]=a[e],p[e]=o[e]=null}p.update=o,p.parentNode=o.parentNode=q.parentNode=a.parentNode,i.push(p),j.push(o),k.push(q)}var e,f,g=-1,h=this.length;if(!arguments.length){for(a=new Array(h=(e=this[0]).length);++g<h;)(f=e[g])&&(a[g]=f.__data__);return a}var i=xb([]),j=jb([]),k=jb([]);if("function"==typeof a)for(;++g<h;)c(e=this[g],a.call(e,e.parentNode.__data__,g));else for(;++g<h;)c(e=this[g],a);return j.enter=function(){return i},j.exit=function(){return k},j},yf.datum=yf.map=function(a){return arguments.length<1?this.property("__data__"):this.property("__data__",a)},yf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d,d.__data__,h)&&b.push(d)}return jb(e)},yf.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},yf.sort=function(a){a=ub.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},yf.on=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b=!1);for(c in a)this.each(vb(c,a[c],b));return this}if(2>d)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(vb(a,b,c))},yf.each=function(a){return wb(this,function(b,c,d){a.call(b,b.__data__,c,d)})},yf.call=function(a){return a.apply(this,(arguments[0]=this,arguments)),this},yf.empty=function(){return!this.node()},yf.node=function(){for(var a=0,b=this.length;b>a;a++)for(var c=this[a],d=0,e=c.length;e>d;d++){var f=c[d];if(f)return f}return null},yf.transition=function(){for(var a,b,c=[],d=-1,e=this.length;++d<e;){c.push(a=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)a.push((b=f[g])?{node:b,delay:Hf,duration:If}:null)}return yb(c,Df||++Cf,Date.now())};var zf=jb([[document]]);zf[0].parentNode=vf,d3.select=function(a){return"string"==typeof a?zf.select(a):jb([[a]])},d3.selectAll=function(a){return"string"==typeof a?zf.selectAll(a):jb([Se(a)])};var Af=[];d3.selection.enter=xb,d3.selection.enter.prototype=Af,Af.append=yf.append,Af.insert=yf.insert,Af.empty=yf.empty,Af.node=yf.node,Af.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j)),c.__data__=f.__data__):b.push(null)}return jb(g)};var Bf=[],Cf=0,Df=0,Ef=0,Ff=250,Gf=d3.ease("cubic-in-out"),Hf=Ef,If=Ff,Jf=Gf;Bf.call=yf.call,d3.transition=function(a){return arguments.length?Df?a.transition():a:zf.transition()},d3.transition.prototype=Bf,Bf.select=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=kb(a));for(var f=-1,g=this.length;++f<g;){e.push(b=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(d=h[i])&&(c=a.call(d.node,d.node.__data__,i))?("__data__"in d.node&&(c.__data__=d.node.__data__),b.push({node:c,delay:d.delay,duration:d.duration})):b.push(null)}return yb(e,this.id,this.time).ease(this.ease())},Bf.selectAll=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=lb(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(d=h[i]){c=a.call(d.node,d.node.__data__,i),e.push(b=[]);for(var k=-1,l=c.length;++k<l;)b.push({node:c[k],delay:d.delay,duration:d.duration})}return yb(e,this.id,this.time).ease(this.ease())},Bf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d.node,d.node.__data__,h)&&b.push(d)}return yb(e,this.id,this.time).ease(this.ease())},Bf.attr=function(a,b){if(arguments.length<2){for(b in a)this.attrTween(b,Bb(a[b],b));return this}return this.attrTween(a,Bb(b,a))},Bf.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d===Mf?(this.removeAttribute(e),null):d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d===Mf?(this.removeAttributeNS(e.space,e.local),null):d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=d3.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Bf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.styleTween(c,Bb(a[c],c),b);return this}c=""}return this.styleTween(a,Bb(b,a),c)},Bf.styleTween=function(a,b,c){return arguments.length<3&&(c=""),this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f===Mf?(this.style.removeProperty(a),null):f&&function(b){this.style.setProperty(a,f(b),c)}})},Bf.text=function(a){return this.tween("text",function(b,c){this.textContent="function"==typeof a?a.call(this,b,c):a})},Bf.remove=function(){return this.each("end.transition",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},Bf.delay=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.delay=0|a.call(b=b.node,b.__data__,c,d)}:(a=0|a,function(b){b.delay=a}))},Bf.duration=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.duration=Math.max(1,0|a.call(b=b.node,b.__data__,c,d))}:(a=Math.max(1,0|a),function(b){b.duration=a}))},Bf.transition=function(){return this.select(f)},d3.tween=function(a,b){function c(c,d,e){var f=a.call(this,c,d);return null==f?""!=e&&Mf:e!=f&&b(e,f+"")}function d(c,d,e){return e!=a&&b(e,a)}return"function"==typeof a?c:null==a?Ab:(a+="",d)};var Kf,Lf,Mf={},Nf=0,Of={},Pf=null;d3.timer=function(a,b,c){if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}var d=Of[a.id];d&&d.callback===a?(d.then=c,d.delay=b):Of[a.id=++Nf]=Pf={callback:a,then:c,delay:b,next:Pf},Kf||(Lf=clearTimeout(Lf),Kf=1,Qf(Cb))},d3.timer.flush=function(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;Db()};var Qf=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.mouse=function(a){return Eb(a,G())};var Rf=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(a,b){return arguments.length<2&&(b=G().touches),b?Se(b).map(function(b){var c=Eb(a,b);return c.identifier=b.identifier,c}):[]},d3.scale={},d3.scale.linear=function(){return Jb([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Rb(d3.scale.linear(),Sb)};var Sf=d3.format(".0e");Sb.pow=function(a){return Math.pow(10,a)},Tb.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return Ub(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Wb([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Tf)},d3.scale.category20=function(){return d3.scale.ordinal().range(Uf)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Vf)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Wf)};var Tf=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Uf=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Vf=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Wf=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Xb([],[])},d3.scale.quantize=function(){return Yb(0,1,[0,1])},d3.scale.threshold=function(){return Zb([.5],[0,1])},d3.scale.identity=function(){return $b([0,1])},d3.svg={},d3.svg.arc=function(){function a(){var a=b.apply(this,arguments),f=c.apply(this,arguments),g=d.apply(this,arguments)+Xf,h=e.apply(this,arguments)+Xf,i=(g>h&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=Yf?a?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":a?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+a*m+","+a*n+"A"+a+","+a+" 0 "+j+",0 "+a*k+","+a*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var b=_b,c=ac,d=bc,e=cc;return a.innerRadius=function(c){return arguments.length?(b=h(c),a):b},a.outerRadius=function(b){return arguments.length?(c=h(b),a):c},a.startAngle=function(b){return arguments.length?(d=h(b),a):d},a.endAngle=function(b){return arguments.length?(e=h(b),a):e},a.centroid=function(){var a=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(d.apply(this,arguments)+e.apply(this,arguments))/2+Xf;return[Math.cos(f)*a,Math.sin(f)*a]},a};var Xf=-Math.PI/2,Yf=2*Math.PI-1e-6;d3.svg.line=function(){return dc(e)};var Zf=d3.map({linear:gc,"linear-closed":hc,"step-before":ic,"step-after":jc,basis:pc,"basis-open":qc,"basis-closed":rc,bundle:sc,cardinal:mc,"cardinal-open":kc,"cardinal-closed":lc,monotone:yc});Zf.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var $f=[0,2/3,1/3,0],_f=[0,1/3,2/3,0],ag=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=dc(zc);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},ic.reverse=jc,jc.reverse=ic,d3.svg.area=function(){return Ac(e)},d3.svg.area.radial=function(){var a=Ac(zc);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},d3.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=i.call(a,e,d),g=j.call(a,e,d)+Xf,h=k.call(a,e,d)+Xf;return{r:f,a0:g,a1:h,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(h),f*Math.sin(h)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Math.PI)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=Bc,g=Cc,i=Dc,j=bc,k=cc;return a.radius=function(b){return arguments.length?(i=h(b),a):i},a.source=function(b){return arguments.length?(f=h(b),a):f},a.target=function(b){return arguments.length?(g=h(b),a):g},a.startAngle=function(b){return arguments.length?(j=h(b),a):j},a.endAngle=function(b){return arguments.length?(k=h(b),a):k},a},d3.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=Bc,c=Cc,d=Ec;return a.source=function(c){return arguments.length?(b=h(c),a):b},a.target=function(b){return arguments.length?(c=h(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d},a},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=Ec,c=a.projection;return a.projection=function(a){return arguments.length?c(Fc(b=a)):b},a},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function a(a,d){return(bg.get(b.call(this,a,d))||Ic)(c.call(this,a,d))}var b=Hc,c=Gc;return a.type=function(c){return arguments.length?(b=h(c),a):b},a.size=function(b){return arguments.length?(c=h(b),a):c},a};var bg=d3.map({circle:Ic,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*dg)),c=b*dg;return"M0,"+-b+"L"+c+",0"+" 0,"+b+" "+-c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;
-return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});d3.svg.symbolTypes=bg.keys();var cg=Math.sqrt(3),dg=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function a(a){a.each(function(){var a,l=d3.select(this),m=null==j?c.ticks?c.ticks.apply(c,i):c.domain():j,n=null==b?c.tickFormat?c.tickFormat.apply(c,i):String:b,o=Lc(c,m,k),p=l.selectAll(".minor").data(o,String),q=p.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),r=d3.transition(p.exit()).style("opacity",1e-6).remove(),s=d3.transition(p).style("opacity",1),t=l.selectAll("g").data(m,String),u=t.enter().insert("g","path").style("opacity",1e-6),v=d3.transition(t.exit()).style("opacity",1e-6).remove(),w=d3.transition(t).style("opacity",1),x=Gb(c),y=l.selectAll(".domain").data([0]),z=(y.enter().append("path").attr("class","domain"),d3.transition(y)),A=c.copy(),B=this.__chart__||A;this.__chart__=A,u.append("line").attr("class","tick"),u.append("text");var C=u.select("line"),D=w.select("line"),E=t.select("text").text(n),F=u.select("text"),G=w.select("text");switch(d){case"bottom":a=Jc,q.attr("y2",f),s.attr("x2",0).attr("y2",f),C.attr("y2",e),F.attr("y",Math.max(e,0)+h),D.attr("x2",0).attr("y2",e),G.attr("x",0).attr("y",Math.max(e,0)+h),E.attr("dy",".71em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+g+"V0H"+x[1]+"V"+g);break;case"top":a=Jc,q.attr("y2",-f),s.attr("x2",0).attr("y2",-f),C.attr("y2",-e),F.attr("y",-(Math.max(e,0)+h)),D.attr("x2",0).attr("y2",-e),G.attr("x",0).attr("y",-(Math.max(e,0)+h)),E.attr("dy","0em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+-g+"V0H"+x[1]+"V"+-g);break;case"left":a=Kc,q.attr("x2",-f),s.attr("x2",-f).attr("y2",0),C.attr("x2",-e),F.attr("x",-(Math.max(e,0)+h)),D.attr("x2",-e).attr("y2",0),G.attr("x",-(Math.max(e,0)+h)).attr("y",0),E.attr("dy",".32em").attr("text-anchor","end"),z.attr("d","M"+-g+","+x[0]+"H0V"+x[1]+"H"+-g);break;case"right":a=Kc,q.attr("x2",f),s.attr("x2",f).attr("y2",0),C.attr("x2",e),F.attr("x",Math.max(e,0)+h),D.attr("x2",e).attr("y2",0),G.attr("x",Math.max(e,0)+h).attr("y",0),E.attr("dy",".32em").attr("text-anchor","start"),z.attr("d","M"+g+","+x[0]+"H0V"+x[1]+"H"+g)}if(c.ticks)u.call(a,B),w.call(a,A),v.call(a,A),q.call(a,B),s.call(a,A),r.call(a,A);else{var H=A.rangeBand()/2,I=function(a){return A(a)+H};u.call(a,I),w.call(a,I)}})}var b,c=d3.scale.linear(),d="bottom",e=6,f=6,g=6,h=3,i=[10],j=null,k=0;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b,a):d},a.ticks=function(){return arguments.length?(i=arguments,a):i},a.tickValues=function(b){return arguments.length?(j=b,a):j},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b,c){if(!arguments.length)return e;var d=arguments.length-1;return e=+b,f=d>1?+c:e,g=d>0?+arguments[d]:e,a},a.tickPadding=function(b){return arguments.length?(h=+b,a):h},a.tickSubdivide=function(b){return arguments.length?(k=+b,a):k},a},d3.svg.brush=function(){function a(f){f.each(function(){var f,g=d3.select(this),k=g.selectAll(".background").data([0]),l=g.selectAll(".extent").data([0]),m=g.selectAll(".resize").data(j,String);g.style("pointer-events","all").on("mousedown.brush",e).on("touchstart.brush",e),k.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),m.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return eg[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),m.style("display",a.empty()?"none":null),m.exit().remove(),h&&(f=Gb(h),k.attr("x",f[0]).attr("width",f[1]-f[0]),c(g)),i&&(f=Gb(i),k.attr("y",f[0]).attr("height",f[1]-f[0]),d(g)),b(g)})}function b(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+k[+/e$/.test(a)][0]+","+k[+/^s/.test(a)][1]+")"})}function c(a){a.select(".extent").attr("x",k[0][0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",k[1][0]-k[0][0])}function d(a){a.select(".extent").attr("y",k[0][1]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",k[1][1]-k[0][1])}function e(){function e(){var a=d3.event.changedTouches;return a?d3.touches(r,a)[0]:d3.mouse(r)}function j(){32==d3.event.keyCode&&(y||(p=null,z[0]-=k[1][0],z[1]-=k[1][1],y=2),F())}function l(){32==d3.event.keyCode&&2==y&&(z[0]+=k[1][0],z[1]+=k[1][1],y=0,F())}function m(){var a=e(),f=!1;q&&(a[0]+=q[0],a[1]+=q[1]),y||(d3.event.altKey?(p||(p=[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2]),z[0]=k[+(a[0]<p[0])][0],z[1]=k[+(a[1]<p[1])][1]):p=null),w&&n(a,h,0)&&(c(u),f=!0),x&&n(a,i,1)&&(d(u),f=!0),f&&(b(u),t({type:"brush",mode:y?"move":"resize"}))}function n(a,b,c){var d,e,g=Gb(b),h=g[0],i=g[1],j=z[c],l=k[1][c]-k[0][c];return y&&(h-=j,i-=l+j),d=Math.max(h,Math.min(i,a[c])),y?e=(d+=j)+l:(p&&(j=Math.max(h,Math.min(i,2*p[c]-d))),d>j?(e=d,d=j):e=j),k[0][c]!==d||k[1][c]!==e?(f=null,k[0][c]=d,k[1][c]=e,!0):void 0}function o(){m(),u.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),d3.select("body").style("cursor",null),A.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),t({type:"brushend"}),F()}var p,q,r=this,s=d3.select(d3.event.target),t=g.of(r,arguments),u=d3.select(r),v=s.datum(),w=!/^(n|s)$/.test(v)&&h,x=!/^(e|w)$/.test(v)&&i,y=s.classed("extent"),z=e(),A=d3.select(window).on("mousemove.brush",m).on("mouseup.brush",o).on("touchmove.brush",m).on("touchend.brush",o).on("keydown.brush",j).on("keyup.brush",l);if(y)z[0]=k[0][0]-z[0],z[1]=k[0][1]-z[1];else if(v){var B=+/w$/.test(v),C=+/^n/.test(v);q=[k[1-B][0]-z[0],k[1-C][1]-z[1]],z[0]=k[B][0],z[1]=k[C][1]}else d3.event.altKey&&(p=z.slice());u.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",s.style("cursor")),t({type:"brushstart"}),m(),F()}var f,g=H(a,"brushstart","brush","brushend"),h=null,i=null,j=fg[0],k=[[0,0],[0,0]];return a.x=function(b){return arguments.length?(h=b,j=fg[!h<<1|!i],a):h},a.y=function(b){return arguments.length?(i=b,j=fg[!h<<1|!i],a):i},a.extent=function(b){var c,d,e,g,j;return arguments.length?(f=[[0,0],[0,0]],h&&(c=b[0],d=b[1],i&&(c=c[0],d=d[0]),f[0][0]=c,f[1][0]=d,h.invert&&(c=h(c),d=h(d)),c>d&&(j=c,c=d,d=j),k[0][0]=0|c,k[1][0]=0|d),i&&(e=b[0],g=b[1],h&&(e=e[1],g=g[1]),f[0][1]=e,f[1][1]=g,i.invert&&(e=i(e),g=i(g)),e>g&&(j=e,e=g,g=j),k[0][1]=0|e,k[1][1]=0|g),a):(b=f||k,h&&(c=b[0][0],d=b[1][0],f||(c=k[0][0],d=k[1][0],h.invert&&(c=h.invert(c),d=h.invert(d)),c>d&&(j=c,c=d,d=j))),i&&(e=b[0][1],g=b[1][1],f||(e=k[0][1],g=k[1][1],i.invert&&(e=i.invert(e),g=i.invert(g)),e>g&&(j=e,e=g,g=j))),h&&i?[[c,e],[d,g]]:h?[c,d]:i&&[e,g])},a.clear=function(){return f=null,k[0][0]=k[0][1]=k[1][0]=k[1][1]=0,a},a.empty=function(){return h&&k[0][0]===k[1][0]||i&&k[0][1]===k[1][1]},d3.rebind(a,g,"on")};var eg={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fg=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function a(){this.on("mousedown.drag",b).on("touchstart.drag",b)}function b(){function a(){var a=h.parentNode;return k?d3.touches(a).filter(function(a){return a.identifier===k})[0]:d3.mouse(a)}function b(){if(!h.parentNode)return e();var b=a(),c=b[0]-l[0],d=b[1]-l[1];m|=c|d,l=b,F(),i({type:"drag",x:b[0]+g[0],y:b[1]+g[1],dx:c,dy:d})}function e(){i({type:"dragend"}),m&&(F(),d3.event.target===j&&n.on("click.drag",f,!0)),n.on(k?"touchmove.drag-"+k:"mousemove.drag",null).on(k?"touchend.drag-"+k:"mouseup.drag",null)}function f(){F(),n.on("click.drag",null)}var g,h=this,i=c.of(h,arguments),j=d3.event.target,k=d3.event.touches&&d3.event.changedTouches[0].identifier,l=a(),m=0,n=d3.select(window).on(k?"touchmove.drag-"+k:"mousemove.drag",b).on(k?"touchend.drag-"+k:"mouseup.drag",e,!0);d?(g=d.apply(h,arguments),g=[g.x-l[0],g.y-l[1]]):g=[0,0],k||F(),i({type:"dragstart"})}var c=H(a,"drag","dragstart","dragend"),d=null;return a.origin=function(b){return arguments.length?(d=b,a):d},d3.rebind(a,c,"on")},d3.behavior.zoom=function(){function a(){this.on("mousedown.zoom",g).on("mousewheel.zoom",h).on("mousemove.zoom",i).on("DOMMouseScroll.zoom",h).on("dblclick.zoom",j).on("touchstart.zoom",k).on("touchmove.zoom",l).on("touchend.zoom",k)}function b(a){return[(a[0]-t[0])/u,(a[1]-t[1])/u]}function c(a){return[a[0]*u+t[0],a[1]*u+t[1]]}function d(a){u=Math.max(v[0],Math.min(v[1],a))}function e(a,b){b=c(b),t[0]+=a[0]-b[0],t[1]+=a[1]-b[1]}function f(a){p&&p.domain(o.range().map(function(a){return(a-t[0])/u}).map(o.invert)),r&&r.domain(q.range().map(function(a){return(a-t[1])/u}).map(q.invert)),d3.event.preventDefault(),a({type:"zoom",scale:u,translate:t})}function g(){function a(){j=1,e(d3.mouse(g),l),f(h)}function c(){j&&F(),k.on("mousemove.zoom",null).on("mouseup.zoom",null),j&&d3.event.target===i&&k.on("click.zoom",d,!0)}function d(){F(),k.on("click.zoom",null)}var g=this,h=w.of(g,arguments),i=d3.event.target,j=0,k=d3.select(window).on("mousemove.zoom",a).on("mouseup.zoom",c),l=b(d3.mouse(g));window.focus(),F()}function h(){m||(m=b(d3.mouse(this))),d(Math.pow(2,.002*Mc())*u),e(d3.mouse(this),m),f(w.of(this,arguments))}function i(){m=null}function j(){var a=d3.mouse(this),c=b(a);d(d3.event.shiftKey?u/2:2*u),e(a,c),f(w.of(this,arguments))}function k(){var a=d3.touches(this),c=Date.now();if(n=u,m={},a.forEach(function(a){m[a.identifier]=b(a)}),F(),1===a.length){if(500>c-s){var g=a[0],h=b(a[0]);d(2*u),e(g,h),f(w.of(this,arguments))}s=c}}function l(){var a=d3.touches(this),b=a[0],c=m[b.identifier];if(g=a[1]){var g,h=m[g.identifier];b=[(b[0]+g[0])/2,(b[1]+g[1])/2],c=[(c[0]+h[0])/2,(c[1]+h[1])/2],d(d3.event.scale*n)}e(b,c),s=null,f(w.of(this,arguments))}var m,n,o,p,q,r,s,t=[0,0],u=1,v=hg,w=H(a,"zoom");return a.translate=function(b){return arguments.length?(t=b.map(Number),a):t},a.scale=function(b){return arguments.length?(u=+b,a):u},a.scaleExtent=function(b){return arguments.length?(v=null==b?hg:b.map(Number),a):v},a.x=function(b){return arguments.length?(p=b,o=b.copy(),a):p},a.y=function(b){return arguments.length?(r=b,q=b.copy(),a):r},d3.rebind(a,w,"on")};var gg,hg=[0,1/0];d3.layout={},d3.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Nc(a[c]));return b}},d3.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=d3.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(d3.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(2*Math.PI-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},d3.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=1/Math.sqrt(f*f+g*g);if(r>(e-c)*h){var i=b.charge*h*h;return a.px-=f*i,a.py-=g*i,!0}if(b.point&&isFinite(h)){var i=b.pointCharge*h*h;a.px-=f*i,a.py-=g*i}}return!b.charge}}function b(a){a.px=d3.event.x,a.py=d3.event.y,j.resume()}var c,d,f,g,i,j={},k=d3.dispatch("start","tick","end"),l=[1,1],m=.9,n=Vc,o=Wc,p=-30,q=.1,r=.8,s=[],t=[];return j.tick=function(){if((d*=.99)<.005)return k.end({type:"end",alpha:d=0}),!0;var b,c,e,h,j,n,o,r,u,v=s.length,w=t.length;for(c=0;w>c;++c)e=t[c],h=e.source,j=e.target,r=j.x-h.x,u=j.y-h.y,(n=r*r+u*u)&&(n=d*g[c]*((n=Math.sqrt(n))-f[c])/n,r*=n,u*=n,j.x-=r*(o=h.weight/(j.weight+h.weight)),j.y-=u*o,h.x+=r*(o=1-o),h.y+=u*o);if((o=d*q)&&(r=l[0]/2,u=l[1]/2,c=-1,o))for(;++c<v;)e=s[c],e.x+=(r-e.x)*o,e.y+=(u-e.y)*o;if(p)for(Uc(b=d3.geom.quadtree(s),d,i),c=-1;++c<v;)(e=s[c]).fixed||b.visit(a(e));for(c=-1;++c<v;)e=s[c],e.fixed?(e.x=e.px,e.y=e.py):(e.x-=(e.px-(e.px=e.x))*m,e.y-=(e.py-(e.py=e.y))*m);k.tick({type:"tick",alpha:d})},j.nodes=function(a){return arguments.length?(s=a,j):s},j.links=function(a){return arguments.length?(t=a,j):t},j.size=function(a){return arguments.length?(l=a,j):l},j.linkDistance=function(a){return arguments.length?(n=h(a),j):n},j.distance=j.linkDistance,j.linkStrength=function(a){return arguments.length?(o=h(a),j):o},j.friction=function(a){return arguments.length?(m=a,j):m},j.charge=function(a){return arguments.length?(p="function"==typeof a?a:+a,j):p},j.gravity=function(a){return arguments.length?(q=a,j):q},j.theta=function(a){return arguments.length?(r=a,j):r},j.alpha=function(a){return arguments.length?(d?d=a>0?a:0:a>0&&(k.start({type:"start",alpha:d=a}),d3.timer(j.tick)),j):d},j.start=function(){function a(a,d){for(var e,f=b(c),g=-1,h=f.length;++g<h;)if(!isNaN(e=f[g][a]))return e;return Math.random()*d}function b(){if(!e){for(e=[],d=0;k>d;++d)e[d]=[];for(d=0;m>d;++d){var a=t[d];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}return e[c]}var c,d,e,h,k=s.length,m=t.length,q=l[0],r=l[1];for(c=0;k>c;++c)(h=s[c]).index=c,h.weight=0;for(f=[],g=[],c=0;m>c;++c)h=t[c],"number"==typeof h.source&&(h.source=s[h.source]),"number"==typeof h.target&&(h.target=s[h.target]),f[c]=n.call(this,h,c),g[c]=o.call(this,h,c),++h.source.weight,++h.target.weight;for(c=0;k>c;++c)h=s[c],isNaN(h.x)&&(h.x=a("x",q)),isNaN(h.y)&&(h.y=a("y",r)),isNaN(h.px)&&(h.px=h.x),isNaN(h.py)&&(h.py=h.y);if(i=[],"function"==typeof p)for(c=0;k>c;++c)i[c]=+p.call(this,s[c],c);else for(c=0;k>c;++c)i[c]=p;return j.resume()},j.resume=function(){return j.alpha(.1)},j.stop=function(){return j.alpha(0)},j.drag=function(){c||(c=d3.behavior.drag().origin(e).on("dragstart",Qc).on("drag",b).on("dragend",Rc)),this.on("mouseover.force",Sc).on("mouseout.force",Tc).call(c)},d3.rebind(j,k,"on")},d3.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=d3.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},gd(c,d)},d3.layout.pie=function(){function a(f){var g=f.map(function(c,d){return+b.call(a,c,d)}),h=+("function"==typeof d?d.apply(this,arguments):d),i=(("function"==typeof e?e.apply(this,arguments):e)-d)/d3.sum(g),j=d3.range(f.length);null!=c&&j.sort(c===ig?function(a,b){return g[b]-g[a]}:function(a,b){return c(f[a],f[b])});var k=[];return j.forEach(function(a){var b;k[a]={data:f[a],value:b=g[a],startAngle:h,endAngle:h+=b*i}}),k}var b=Number,c=ig,d=0,e=2*Math.PI;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a};var ig={};d3.layout.stack=function(){function a(e,i){var j=e.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[g.call(a,b,c),h.call(a,b,c)]})}),l=c.call(a,k,i);j=d3.permute(j,l),k=d3.permute(k,l);var m,n,o,p=d.call(a,k,i),q=j.length,r=j[0].length;for(n=0;r>n;++n)for(f.call(a,j[0][n],o=p[n],k[0][n][1]),m=1;q>m;++m)f.call(a,j[m][n],o+=k[m-1][n][1],k[m][n][1]);return e}var b=e,c=$c,d=_c,f=Zc,g=Xc,h=Yc;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:jg.get(b)||$c,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:kg.get(b)||_c,a):d},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=b,a):h},a.out=function(b){return arguments.length?(f=b,a):f},a};var jg=d3.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(ad),f=a.map(bd),g=d3.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;d>b;++b)c=g[b],i>h?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return d3.range(a.length).reverse()},"default":$c}),kg=d3.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;f>c;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;m>c;++c){for(b=0,e=0;k>b;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];k>b;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);b>d;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,j>i&&(j=i)}for(c=0;m>c;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];if(d)for(b=0;e>b;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=g}for(c=0;f>c;++c)h[c]=0;return h},zero:_c});d3.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[d3.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=fd,e=dd;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=h(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return ed(a,b)}:h(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},d3.layout.hierarchy=function(){function a(b,g,h){var i=e.call(c,b,g),j=lg?b:{data:b};if(j.depth=g,h.push(j),i&&(k=i.length)){for(var k,l,m=-1,n=j.children=[],o=0,p=g+1;++m<k;)l=a(i[m],p,h),l.parent=j,n.push(l),o+=l.value;d&&n.sort(d),f&&(j.value=o)}else f&&(j.value=+f.call(c,b,g)||0);return j}function b(a,d){var e=a.children,g=0;if(e&&(h=e.length))for(var h,i=-1,j=d+1;++i<h;)g+=b(e[i],j);else f&&(g=+f.call(c,lg?a:a.data,d)||0);return f&&(a.value=g),g}function c(b){var c=[];return a(b,0,c),c}var d=jd,e=hd,f=id;return c.sort=function(a){return arguments.length?(d=a,c):d},c.children=function(a){return arguments.length?(e=a,c):e},c.value=function(a){return arguments.length?(f=a,c):f},c.revalue=function(a){return b(a,0),a},c};var lg=!1;d3.layout.pack=function(){function a(a,e){var f=b.call(this,a,e),g=f[0];g.x=0,g.y=0,Fd(g,function(a){a.r=Math.sqrt(a.value)}),Fd(g,pd);var h=d[0],i=d[1],j=Math.max(2*g.r/h,2*g.r/i);if(c>0){var k=c*j/2;Fd(g,function(a){a.r+=k}),Fd(g,pd),Fd(g,function(a){a.r-=k}),j=Math.max(2*g.r/h,2*g.r/i)}return sd(g,h/2,i/2,1/j),f}var b=d3.layout.hierarchy().sort(ld),c=0,d=[1,1];return a.size=function(b){return arguments.length?(d=b,a):d},a.padding=function(b){return arguments.length?(c=+b,a):c},gd(a,b)},d3.layout.cluster=function(){function a(a,e){var f,g=b.call(this,a,e),h=g[0],i=0;Fd(h,function(a){var b=a.children;b&&b.length?(a.x=vd(b),a.y=ud(b)):(a.x=f?i+=c(a,f):0,a.y=0,f=a)});var j=wd(h),k=xd(h),l=j.x-c(j,k)/2,m=k.x+c(k,j)/2;return Fd(h,function(a){a.x=(a.x-l)/(m-l)*d[0],a.y=(1-(h.y?a.y/h.y:1))*d[1]}),g}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.tree=function(){function a(a,e){function f(a,b){var d=a.children,e=a._tree;if(d&&(g=d.length)){for(var g,i,j,k=d[0],l=k,m=-1;++m<g;)j=d[m],f(j,i),l=h(j,i,l),i=j;Gd(a);var n=.5*(k._tree.prelim+j._tree.prelim);b?(e.prelim=b._tree.prelim+c(a,b),e.mod=e.prelim-n):e.prelim=n}else b&&(e.prelim=b._tree.prelim+c(a,b))}function g(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c&&(d=c.length)){var d,e=-1;for(b+=a._tree.mod;++e<d;)g(c[e],b)}}function h(a,b,d){if(b){for(var e,f=a,g=a,h=b,i=a.parent.children[0],j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m=i._tree.mod;h=Ad(h),f=zd(f),h&&f;)i=zd(i),g=Ad(g),g._tree.ancestor=a,e=h._tree.prelim+l-f._tree.prelim-j+c(h,f),e>0&&(Hd(Id(h,a,d),a,e),j+=e,k+=e),l+=h._tree.mod,j+=f._tree.mod,m+=i._tree.mod,k+=g._tree.mod;h&&!Ad(g)&&(g._tree.thread=h,g._tree.mod+=l-k),f&&!zd(i)&&(i._tree.thread=f,i._tree.mod+=j-m,d=a)}return d}var i=b.call(this,a,e),j=i[0];Fd(j,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),f(j),g(j,-j._tree.prelim);var k=Bd(j,Dd),l=Bd(j,Cd),m=Bd(j,Ed),n=k.x-c(k,l)/2,o=l.x+c(l,k)/2,p=m.depth||1;return Fd(j,function(a){a.x=(a.x-n)/(o-n)*d[0],a.y=a.depth/p*d[1],delete a._tree}),i}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(0>b?0:b),c.area=isNaN(d)||0>=d?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),n=1/0,o=Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,(h=d(k,o))<=n?(m.pop(),n=h):(k.area-=k.pop().area,e(k,o,j,!1),o=Math.min(j.dx,j.dy),k.length=k.area=0,n=1/0);k.length&&(e(k,o,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(f>c&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*n/d,d/(b*f*n)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=d3.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Jd,m=!1,n=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Jd(b):Kd(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Kd(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Jd:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(n=a,f):n},gd(f,h)},d3.csv=Ld(",","text/csv"),d3.tsv=Ld("	","text/tab-separated-values"),d3.geo={};var mg=Math.PI/180;d3.geo.azimuthal=function(){function a(a){var b,d=a[0]*mg-c,j=a[1]*mg,k=Math.cos(d),l=Math.sin(d),m=Math.cos(j),n=Math.sin(j),o="orthographic"!==g?f*n+e*m*k:null,p="stereographic"===g?1/(1+o):"gnomonic"===g?1/o:"equidistant"===g?(b=Math.acos(o),b?b/Math.sin(b):0):"equalarea"===g?Math.sqrt(2/(1+o)):1,q=p*m*l,r=p*(f*m*k-e*n);return[h*q+i[0],h*r+i[1]]}var b,c,d,e,f,g="orthographic",h=200,i=[480,250];return a.invert=function(a){var b=(a[0]-i[0])/h,d=(a[1]-i[1])/h,j=Math.sqrt(b*b+d*d),k="stereographic"===g?2*Math.atan(j):"gnomonic"===g?Math.atan(j):"equidistant"===g?j:"equalarea"===g?2*Math.asin(.5*j):Math.asin(j),l=Math.sin(k),m=Math.cos(k);return[(c+Math.atan2(b*l,j*e*m+d*f*l))/mg,Math.asin(m*f-(j?d*l*e/j:0))/mg]},a.mode=function(b){return arguments.length?(g=b+"",a):g},a.origin=function(g){return arguments.length?(b=g,c=b[0]*mg,d=b[1]*mg,e=Math.cos(d),f=Math.sin(d),a):b},a.scale=function(b){return arguments.length?(h=+b,a):h},a.translate=function(b){return arguments.length?(i=[+b[0],+b[1]],a):i},a.origin([0,0])},d3.geo.albers=function(){function a(a){var b=d*(mg*a[0]-c),g=Math.sqrt(e-2*d*Math.sin(mg*a[1]))/d;return[i*g*Math.sin(b)+j[0],i*(g*Math.cos(b)-f)+j[1]]}function b(){var b=mg*h[0],i=mg*h[1],j=mg*g[1],k=Math.sin(b),l=Math.cos(b);return c=mg*g[0],d=.5*(k+Math.sin(i)),e=l*l+2*d*k,f=Math.sqrt(e-2*d*Math.sin(j))/d,a}var c,d,e,f,g=[-98,38],h=[29.5,45.5],i=1e3,j=[480,250];return a.invert=function(a){var b=(a[0]-j[0])/i,g=(a[1]-j[1])/i,h=f+g,k=Math.atan2(b,h),l=Math.sqrt(b*b+h*h);return[(c+k/d)/mg,Math.asin((e-l*l*d*d)/(2*d))/mg]},a.origin=function(a){return arguments.length?(g=[+a[0],+a[1]],b()):g},a.parallels=function(a){return arguments.length?(h=[+a[0],+a[1]],b()):h},a.scale=function(b){return arguments.length?(i=+b,a):i},a.translate=function(b){return arguments.length?(j=[+b[0],+b[1]],a):j},b()},d3.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return(g>50?c:-140>f?d:21>g?e:b)(a)}var b=d3.geo.albers(),c=d3.geo.albers().origin([-160,60]).parallels([55,65]),d=d3.geo.albers().origin([-160,20]).parallels([8,18]),e=d3.geo.albers().origin([-60,10]).parallels([8,18]);return a.scale=function(f){return arguments.length?(b.scale(f),c.scale(.6*f),d.scale(f),e.scale(1.5*f),a.translate(b.translate())):b.scale()},a.translate=function(f){if(!arguments.length)return b.translate();var g=b.scale()/1e3,h=f[0],i=f[1];return b.translate(f),c.translate([h-400*g,i+170*g]),d.translate([h-190*g,i+200*g]),e.translate([h+580*g,i+430*g]),a},a.scale(b.scale())},d3.geo.bonne=function(){function a(a){var h=a[0]*mg-b,i=a[1]*mg-c;if(d){var j=e+d-i,k=h*Math.cos(i)/j;h=j*Math.sin(k),i=j*Math.cos(k)-e}else h*=Math.cos(i),i*=-1;return[f*h+g[0],f*i+g[1]]}var b,c,d,e,f=200,g=[480,250];return a.invert=function(a){var c=(a[0]-g[0])/f,h=(a[1]-g[1])/f;if(d){var i=e+h,j=Math.sqrt(c*c+i*i);h=e+d-j,c=b+j*Math.atan2(c,i)/Math.cos(h)}else h*=-1,c/=Math.cos(h);return[c/mg,h/mg]},a.parallel=function(b){return arguments.length?(e=1/Math.tan(d=b*mg),a):d/mg},a.origin=function(d){return arguments.length?(b=d[0]*mg,c=d[1]*mg,a):[b/mg,c/mg]},a.scale=function(b){return arguments.length?(f=+b,a):f},a.translate=function(b){return arguments.length?(g=[+b[0],+b[1]],a):g},a.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function a(a){var d=a[0]/360,e=-a[1]/360;return[b*d+c[0],b*e+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,-360*e]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.mercator=function(){function a(a){var d=a[0]/360,e=-(Math.log(Math.tan(Math.PI/4+a[1]*mg/2))/mg)/360;return[b*d+c[0],b*Math.max(-.5,Math.min(.5,e))+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,2*Math.atan(Math.exp(-360*e*mg))/mg-90]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.path=function(){function a(a){"function"==typeof f&&(g=Nd(f.apply(this,arguments))),j(a);var b=i.length?i.join(""):null;return i=[],b}function b(a){return h(a).join(",")}function c(a){for(var b=e(a[0]),c=0,d=a.length;++c<d;)b-=e(a[c]);return b}function d(a){for(var b=d3.geom.polygon(a[0].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e=d[0],f=d[1],g=c,i=0,j=a.length;++i<j;)b=d3.geom.polygon(a[i].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e-=d[0],f-=d[1],g-=c;return[e,f,6*g]}function e(a){return Math.abs(d3.geom.polygon(a.map(h)).area())}var f=4.5,g=Nd(f),h=d3.geo.albersUsa(),i=[],j=Md({FeatureCollection:function(a){for(var b=a.features,c=-1,d=b.length;++c<d;)i.push(j(b[c].geometry))},Feature:function(a){j(a.geometry)},Point:function(a){i.push("M",b(a.coordinates),g)},MultiPoint:function(a){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)i.push("M",b(c[d]),g)},LineString:function(a){var c=a.coordinates,d=-1,e=c.length;for(i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()},MultiLineString:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;){for(c=f[g],d=-1,e=c.length,i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()}},Polygon:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;)if(c=f[g],d=-1,(e=c.length-1)>0){for(i.push("M");++d<e;)i.push(b(c[d]),"L");i[i.length-1]="Z"}},MultiPolygon:function(a){for(var c,d,e,f,g,h,j=a.coordinates,k=-1,l=j.length;++k<l;)for(c=j[k],d=-1,e=c.length;++d<e;)if(f=c[d],g=-1,(h=f.length-1)>0){for(i.push("M");++g<h;)i.push(b(f[g]),"L");i[i.length-1]="Z"}},GeometryCollection:function(a){for(var b=a.geometries,c=-1,d=b.length;++c<d;)i.push(j(b[c]))}}),k=a.area=Md({FeatureCollection:function(a){for(var b=0,c=a.features,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b},Feature:function(a){return k(a.geometry)},Polygon:function(a){return c(a.coordinates)},MultiPolygon:function(a){for(var b=0,d=a.coordinates,e=-1,f=d.length;++e<f;)b+=c(d[e]);return b},GeometryCollection:function(a){for(var b=0,c=a.geometries,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b}},0),l=a.centroid=Md({Feature:function(a){return l(a.geometry)},Polygon:function(a){var b=d(a.coordinates);return[b[0]/b[2],b[1]/b[2]]},MultiPolygon:function(a){for(var b,c=a.coordinates,e=0,f=0,g=0,h=-1,i=c.length;++h<i;)b=d(c[h]),e+=b[0],f+=b[1],g+=b[2];return[e/g,f/g]}});return a.projection=function(b){return h=b,a},a.pointRadius=function(b){return"function"==typeof b?f=b:(f=+b,g=Nd(f)),a},a},d3.geo.bounds=function(a){var b=1/0,c=1/0,d=-1/0,e=-1/0;return Od(a,function(a,f){b>a&&(b=a),a>d&&(d=a),c>f&&(c=f),f>e&&(e=f)}),[[b,c],[d,e]]};var ng={Feature:Pd,FeatureCollection:Qd,GeometryCollection:Rd,LineString:Sd,MultiLineString:Td,MultiPoint:Sd,MultiPolygon:Ud,Point:Vd,Polygon:Wd};d3.geo.circle=function(){function a(){}function b(a){return i.distance(a)<h}function c(a){for(var b,c,e,f,g,j=-1,k=a.length,l=[];++j<k;)g=i.distance(e=a[j]),h>g?(c&&l.push($d(c,e)((f-h)/(f-g))),l.push(e),b=c=null):(c=e,!b&&l.length&&(l.push($d(l[l.length-1],c)((h-f)/(g-f))),b=c)),f=g;return b=a[0],c=l[0],!c||e[0]!==b[0]||e[1]!==b[1]||e[0]===c[0]&&e[1]===c[1]||l.push(c),d(l)}function d(a){for(var b,c,d,e=0,f=a.length,g=f?[a[0]]:a,h=i.source();++e<f;)for(d=i.source(a[e-1])(a[e]).coordinates,b=0,c=d.length;++b<c;)g.push(d[b]);return i.source(h),g}var f=[0,0],g=89.99,h=g*mg,i=d3.geo.greatArc().source(f).target(e);a.clip=function(a){return"function"==typeof f&&i.source(f.apply(this,arguments)),j(a)||null};var j=Md({FeatureCollection:function(a){var b=a.features.map(j).filter(e);return b&&(a=Object.create(a),a.features=b,a)},Feature:function(a){var b=j(a.geometry);return b&&(a=Object.create(a),a.geometry=b,a)},Point:function(a){return b(a.coordinates)&&a},MultiPoint:function(a){var c=a.coordinates.filter(b);return c.length&&{type:a.type,coordinates:c}},LineString:function(a){var b=c(a.coordinates);return b.length&&(a=Object.create(a),a.coordinates=b,a)},MultiLineString:function(a){var b=a.coordinates.map(c).filter(function(a){return a.length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},Polygon:function(a){var b=a.coordinates.map(c);return b[0].length&&(a=Object.create(a),a.coordinates=b,a)},MultiPolygon:function(a){var b=a.coordinates.map(function(a){return a.map(c)}).filter(function(a){return a[0].length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},GeometryCollection:function(a){var b=a.geometries.map(j).filter(e);return b.length&&(a=Object.create(a),a.geometries=b,a)
-}});return a.origin=function(b){return arguments.length?(f=b,"function"!=typeof f&&i.source(f),a):f},a.angle=function(b){return arguments.length?(h=(g=+b)*mg,a):g},d3.rebind(a,i,"precision")},d3.geo.greatArc=function(){function a(){for(var d=a.distance.apply(this,arguments),e=0,h=f/d,i=[b];(e+=h)<1;)i.push(g(e));return i.push(c),{type:"LineString",coordinates:i}}var b,c,d=Xd,e=Yd,f=6*mg,g=Zd();return a.distance=function(){return"function"==typeof d&&g.source(b=d.apply(this,arguments)),"function"==typeof e&&g.target(c=e.apply(this,arguments)),g.distance()},a.source=function(c){return arguments.length?(d=c,"function"!=typeof d&&g.source(b=d),a):d},a.target=function(b){return arguments.length?(e=b,"function"!=typeof e&&g.target(c=e),a):e},a.precision=function(b){return arguments.length?(f=b*mg,a):f/mg},a},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(a,b){var c=b||_d(a),d=[],e=c[0],f=c[1],g=0,h=0,i=0/0,j=0/0,k=0;do k=0,a(e-1,f-1)&&(k+=1),a(e,f-1)&&(k+=2),a(e-1,f)&&(k+=4),a(e,f)&&(k+=8),6===k?(g=-1===j?-1:1,h=0):9===k?(g=0,h=1===i?-1:1):(g=og[k],h=pg[k]),g!=i&&h!=j&&(d.push([e,f]),i=g,j=h),e+=g,f+=h;while(c[0]!=e||c[1]!=f);return d};var og=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,0/0],pg=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,0/0];d3.geom.hull=function(a){if(a.length<3)return[];var b,c,d,e,f,g,h,i,j,k,l=a.length,m=l-1,n=[],o=[],p=0;for(b=1;l>b;++b)a[b][1]<a[p][1]?p=b:a[b][1]==a[p][1]&&(p=a[b][0]<a[p][0]?b:p);for(b=0;l>b;++b)b!==p&&(e=a[b][1]-a[p][1],d=a[b][0]-a[p][0],n.push({angle:Math.atan2(e,d),index:b}));for(n.sort(function(a,b){return a.angle-b.angle}),j=n[0].angle,i=n[0].index,h=0,b=1;m>b;++b)c=n[b].index,j==n[b].angle?(d=a[i][0]-a[p][0],e=a[i][1]-a[p][1],f=a[c][0]-a[p][0],g=a[c][1]-a[p][1],d*d+e*e>=f*f+g*g?n[b].index=-1:(n[h].index=-1,j=n[b].angle,h=b,i=c)):(j=n[b].angle,h=b,i=c);for(o.push(p),b=0,c=0;2>b;++c)-1!==n[c].index&&(o.push(n[c].index),b++);for(k=o.length;m>c;++c)if(-1!==n[c].index){for(;!ae(o[k-2],o[k-1],n[c].index,a);)--k;o[k++]=n[c].index}var q=[];for(b=0;k>b;++b)q.push(a[o[b]]);return q},d3.geom.polygon=function(a){return a.area=function(){for(var b=0,c=a.length,d=a[c-1][0]*a[0][1],e=a[c-1][1]*a[0][0];++b<c;)d+=a[b-1][0]*a[b][1],e+=a[b-1][1]*a[b][0];return.5*(e-d)},a.centroid=function(b){var c,d,e=-1,f=a.length,g=0,h=0,i=a[f-1];for(arguments.length||(b=-1/(6*a.area()));++e<f;)c=i,i=a[e],d=c[0]*i[1]-i[0]*c[1],g+=(c[0]+i[0])*d,h+=(c[1]+i[1])*d;return[g*b,h*b]},a.clip=function(b){for(var c,d,e,f,g,h,i=-1,j=a.length,k=a[j-1];++i<j;){for(c=b.slice(),b.length=0,f=a[i],g=c[(e=c.length)-1],d=-1;++d<e;)h=c[d],be(h,k,f)?(be(g,k,f)||b.push(ce(g,h,k,f)),b.push(h)):be(g,k,f)&&b.push(ce(g,h,k,f)),g=h;k=f}return b},a},d3.geom.voronoi=function(a){var b=a.map(function(){return[]});return de(a,function(a){var c,d,e,f,g,h;1===a.a&&a.b>=0?(c=a.ep.r,d=a.ep.l):(c=a.ep.l,d=a.ep.r),1===a.a?(g=c?c.y:-1e6,e=a.c-a.b*g,h=d?d.y:1e6,f=a.c-a.b*h):(e=c?c.x:-1e6,g=a.c-a.a*e,f=d?d.x:1e6,h=a.c-a.a*f);var i=[e,g],j=[f,h];b[a.region.l.index].push(i,j),b[a.region.r.index].push(i,j)}),b.map(function(b,c){var d=a[c][0],e=a[c][1];return b.forEach(function(a){a.angle=Math.atan2(a[0]-d,a[1]-e)}),b.sort(function(a,b){return a.angle-b.angle}).filter(function(a,c){return!c||a.angle-b[c-1].angle>1e-10})})};var qg={l:"r",r:"l"};d3.geom.delaunay=function(a){var b=a.map(function(){return[]}),c=[];return de(a,function(c){b[c.region.l.index].push(a[c.region.r.index])}),b.forEach(function(b,d){var e=a[d],f=e[0],g=e[1];b.forEach(function(a){a.angle=Math.atan2(a[0]-f,a[1]-g)}),b.sort(function(a,b){return a.angle-b.angle});for(var h=0,i=b.length-1;i>h;h++)c.push([e,b[h],b[h+1]])}),c},d3.geom.quadtree=function(a,b,c,d,e){function f(a,b,c,d,e,f){if(!isNaN(b.x)&&!isNaN(b.y))if(a.leaf){var h=a.point;h?Math.abs(h.x-b.x)+Math.abs(h.y-b.y)<.01?g(a,b,c,d,e,f):(a.point=null,g(a,h,c,d,e,f),g(a,b,c,d,e,f)):a.point=b}else g(a,b,c,d,e,f)}function g(a,b,c,d,e,g){var h=.5*(c+e),i=.5*(d+g),j=b.x>=h,k=b.y>=i,l=(k<<1)+j;a.leaf=!1,a=a.nodes[l]||(a.nodes[l]=ee()),j?c=h:e=h,k?d=i:g=i,f(a,b,c,d,e,g)}var h,i=-1,j=a.length;if(j&&isNaN(a[0].x)&&(a=a.map(ge)),arguments.length<5)if(3===arguments.length)e=d=c,c=b;else{for(b=c=1/0,d=e=-1/0;++i<j;)h=a[i],h.x<b&&(b=h.x),h.y<c&&(c=h.y),h.x>d&&(d=h.x),h.y>e&&(e=h.y);var k=d-b,l=e-c;k>l?e=c+k:d=b+l}var m=ee();return m.add=function(a){f(m,a,b,c,d,e)},m.visit=function(a){fe(a,m,b,c,d,e)},a.forEach(m.add),m},d3.time={};var rg=Date,sg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];he.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){tg.setUTCDate.apply(this._,arguments)},setDay:function(){tg.setUTCDay.apply(this._,arguments)},setFullYear:function(){tg.setUTCFullYear.apply(this._,arguments)},setHours:function(){tg.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){tg.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){tg.setUTCMinutes.apply(this._,arguments)},setMonth:function(){tg.setUTCMonth.apply(this._,arguments)},setSeconds:function(){tg.setUTCSeconds.apply(this._,arguments)},setTime:function(){tg.setTime.apply(this._,arguments)}};var tg=Date.prototype,ug="%a %b %e %H:%M:%S %Y",vg="%m/%d/%y",wg="%H:%M:%S",xg=sg,yg=xg.map(ie),zg=["January","February","March","April","May","June","July","August","September","October","November","December"],Ag=zg.map(ie);d3.time.format=function(a){function b(b){for(var d,e,f=[],g=-1,h=0;++g<c;)37==a.charCodeAt(g)&&(f.push(a.substring(h,g),(e=Lg[d=a.charAt(++g)])?e(b):d),h=g+1);return f.push(a.substring(h,g)),f.join("")}var c=a.length;return b.parse=function(b){var c={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},d=je(c,a,b,0);if(d!=b.length)return null;"p"in c&&(c.H=c.H%12+12*c.p);var e=new rg;return e.setFullYear(c.y,c.m,c.d),e.setHours(c.H,c.M,c.S,c.L),e},b.toString=function(){return a},b};var Bg=d3.format("02d"),Cg=d3.format("03d"),Dg=d3.format("04d"),Eg=d3.format("2d"),Fg=ke(xg),Gg=ke(yg),Hg=ke(zg),Ig=le(zg),Jg=ke(Ag),Kg=le(Ag),Lg={a:function(a){return yg[a.getDay()]},A:function(a){return xg[a.getDay()]},b:function(a){return Ag[a.getMonth()]},B:function(a){return zg[a.getMonth()]},c:d3.time.format(ug),d:function(a){return Bg(a.getDate())},e:function(a){return Eg(a.getDate())},H:function(a){return Bg(a.getHours())},I:function(a){return Bg(a.getHours()%12||12)},j:function(a){return Cg(1+d3.time.dayOfYear(a))},L:function(a){return Cg(a.getMilliseconds())},m:function(a){return Bg(a.getMonth()+1)},M:function(a){return Bg(a.getMinutes())},p:function(a){return a.getHours()>=12?"PM":"AM"},S:function(a){return Bg(a.getSeconds())},U:function(a){return Bg(d3.time.sundayOfYear(a))},w:function(a){return a.getDay()},W:function(a){return Bg(d3.time.mondayOfYear(a))},x:d3.time.format(vg),X:d3.time.format(wg),y:function(a){return Bg(a.getFullYear()%100)},Y:function(a){return Dg(a.getFullYear()%1e4)},Z:De,"%":function(){return"%"}},Mg={a:me,A:ne,b:oe,B:pe,c:qe,d:xe,e:xe,H:ye,I:ye,L:Be,m:we,M:ze,p:Ce,S:Ae,x:re,X:se,y:ue,Y:te},Ng=/^\s*\d+/,Og=d3.map({am:0,pm:1});d3.time.format.utc=function(a){function b(a){try{rg=he;var b=new rg;return b._=a,c(b)}finally{rg=Date}}var c=d3.time.format(a);return b.parse=function(a){try{rg=he;var b=c.parse(a);return b&&b._}finally{rg=Date}},b.toString=c.toString,b};var Pg=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Ee:Pg,Ee.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Ee.toString=Pg.toString,d3.time.second=Fe(function(a){return new rg(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Fe(function(a){return new rg(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Fe(function(a){var b=a.getTimezoneOffset()/60;return new rg(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Fe(function(a){var b=new rg(1970,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(a){var b=d3.time.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},sg.forEach(function(a,b){a=a.toLowerCase(),b=7-b;var c=d3.time[a]=Fe(function(a){return(a=d3.time.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});d3.time[a+"s"]=c.range,d3.time[a+"s"].utc=c.utc.range,d3.time[a+"OfYear"]=function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Fe(function(a){return a=d3.time.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Fe(function(a){return a=d3.time.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Qg=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rg=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Sg=[[d3.time.format("%Y"),function(){return!0}],[d3.time.format("%B"),function(a){return a.getMonth()}],[d3.time.format("%b %d"),function(a){return 1!=a.getDate()}],[d3.time.format("%a %d"),function(a){return a.getDay()&&1!=a.getDate()}],[d3.time.format("%I %p"),function(a){return a.getHours()}],[d3.time.format("%I:%M"),function(a){return a.getMinutes()}],[d3.time.format(":%S"),function(a){return a.getSeconds()}],[d3.time.format(".%L"),function(a){return a.getMilliseconds()}]],Tg=d3.scale.linear(),Ug=Ke(Sg);Rg.year=function(a,b){return Tg.domain(a.map(Me)).ticks(b).map(Le)},d3.time.scale=function(){return He(d3.scale.linear(),Rg,Ug)};var Vg=Rg.map(function(a){return[a[0].utc,a[1]]}),Wg=[[d3.time.format.utc("%Y"),function(){return!0}],[d3.time.format.utc("%B"),function(a){return a.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(a){return 1!=a.getUTCDate()}],[d3.time.format.utc("%a %d"),function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],[d3.time.format.utc("%I %p"),function(a){return a.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(a){return a.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(a){return a.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(a){return a.getUTCMilliseconds()}]],Xg=Ke(Wg);Vg.year=function(a,b){return Tg.domain(a.map(Oe)).ticks(b).map(Ne)},d3.time.scale.utc=function(){return He(d3.scale.linear(),Vg,Xg)}}(),define("d3",function(){}),define("helpers",["d3"],function(){var a={};return a.imageUrl=function(a){return a},a.docs={docs:"http://docs.couchdb.org/en/latest/intro/api.html#documents",all_dbs:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=all_dbs#get--_all_dbs",replication_doc:"http://docs.couchdb.org/en/latest/replication/replicator.html#basics",design_doc:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#design-docs",view_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#view-functions",map_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#map-functions",reduce_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#reduce-and-rereduce-functions",api_reference:"http://docs.couchdb.org/en/latest/http-api.html",database_permission:"http://docs.couchdb.org/en/latest/api/database/security.html#db-security",stats:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#get--_stats",_active_tasks:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#active-tasks",log:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#log",config:"http://docs.couchdb.org/en/latest/config/index.html",views:"http://docs.couchdb.org/en/latest/intro/overview.html#views"},a.getDocUrl=function(b){return a.docs[b]||"#"},a.formatSize=function(a){var b=512;if(b>a)return a+" bytes";for(var c=["KB","MB","GB","TB","PB","EB","ZB","YB"],d=0;a>=b&&d<c.length;)d+=1,a/=1024;return a.toFixed(1)+" "+c[d-1]},a.formatDate=function(a){return format=d3.time.format("%b. %e at %H:%M%p"),format(new Date(1e3*a))},a}),define("mixins",["jquery","lodash"],function(a,b){var c={},d={};return c.addWindowResize=function(a,b){d[b]=a},c.removeWindowResize=function(a){delete d[a],c.initWindowResize()},c.initWindowResize=function(){window.onresize=function(){b.each(d,function(a){a()})}},c}),function(a,b){var c=a.Backbone;return"function"==typeof define&&define.amd?define("plugins/backbone.layoutmanager",["backbone","underscore","jquery"],function(){return b.apply(a,arguments)}):(c.Layout=b.call(a,c,a._,c.$),void 0)}("object"==typeof global?global:this,function(a,b,c){var d,e=this,f=a.View.prototype._configure,g=Array.prototype.push,h=Array.prototype.concat,i=Array.prototype.splice,j=a.View.extend({_render:function(a,b){var c=this,d=c.__manager__,e=b.beforeRender,f=b.deferred();return c.hasRendered&&c._removeViews(),d.callback=function(){delete d.isAsync,delete d.callback,c.trigger("beforeRender",c),a(c,b).render().then(function(){f.resolve()})},e&&e.call(c,c),d.isAsync||d.callback(),f.promise()},constructor:function(b){b=b||{},j.setupView(this,b),a.View.call(this,b)},async:function(){var a=this.__manager__;return a.isAsync=!0,a.callback},promise:function(){return this.__manager__.renderDeferred.promise()},renderViews:function(){var a=this,b=a.__manager__,c=a.getAllOptions(),d=c.deferred(),e=a.getViews().map(function(a){return a.render().__manager__.renderDeferred}).value();return b.renderDeferred=d.promise(),c.when(e).then(function(){d.resolveWith(a,[a])}),a},insertView:function(a,b){return b?this.setView(a,b,!0):this.setView(a,!0)},insertViews:function(a){return b.isArray(a)?this.setViews({"":a}):(b.each(a,function(c,d){a[d]=b.isArray(c)?c:[c]}),this.setViews(a))},getView:function(a){return null==a&&(a=arguments[1]),this.getViews(a).first().value()},getViews:function(a){var c;return"string"==typeof a?(a=this.sections[a]||a,c=this.views[a]||[],b.chain([].concat(c))):(c=b.chain(this.views).map(function(a){return b.isArray(a)?a:[a]},this).flatten(),"object"==typeof a?c.where(a):"function"==typeof a?c.filter(a):c)},removeView:function(a){return this.getViews(a).each(function(a){a.remove()})},setView:function(a,c,d){var e,f,g,i=this;if("string"!=typeof a&&(d=c,c=a,a=""),e=c.__manager__,!e)throw new Error("The argument associated with selector '"+a+"' is defined and a View.  Set `manage` property to true for "+"Backbone.View instances.");return f=c.getAllOptions(),e.parent=i,g=e.selector=i.sections[a]||a,b.result(c,"setup"),d?(i.views[g]=h.call([],i.views[a]||[],c),i.__manager__.insert=!0,c):(c.hasRendered&&f.partial(i.$el,c.$el,i.__manager__,e),i.removeView(a),i.views[g]=c)},setViews:function(a){return b.each(a,function(a,c){return b.isArray(a)?b.each(a,function(a){this.insertView(c,a)},this):(this.setView(c,a),void 0)},this),this},render:function(){function a(){function a(){var a=e.console,c=f.afterRender;c&&c.call(d,d),d.trigger("afterRender",d),h.noel&&d.$el.length>1&&b.isFunction(a.warn)&&!f.suppressWarnings&&(a.warn("`el: false` with multiple top level elements is not supported."),b.isFunction(a.trace)&&a.trace())}var c;return b.each(d.views,function(a,c){b.isArray(a)&&f.htmlBatch(d,a,c)}),i&&!h.insertedViaFragment&&(f.contains(i.el,d.el)||i.getAllOptions().partial(i.$el,d.$el,k,h)),d.delegateEvents(),d.hasRendered=!0,(c=h.queue.shift())?c():delete h.queue,k&&k.queue?i.once("afterRender",a):a(),l.resolveWith(d,[d])}function c(){var c=d.getAllOptions();d._render(j._viewRender,c).done(function(){if(!b.keys(d.views).length)return a();var e=b.map(d.views,function(a){var d=b.isArray(a);return d&&a.length?c.when(b.map(a,function(a){return a.__manager__.insertedViaFragment=!0,a.render().__manager__.renderDeferred})):d?a:a.render().__manager__.renderDeferred});c.when(e).done(a)})}var d=this,f=d.getAllOptions(),h=d.__manager__,i=h.parent,k=i&&i.__manager__,l=f.deferred();return h.queue?g.call(h.queue,c):(h.queue=[],c(d,l)),d.__manager__.renderDeferred=l,d},remove:function(){return j._removeView(this,!0),this._remove.apply(this,arguments)},getAllOptions:function(){return b.extend({},this,j.prototype.options,this.options)}},{_cache:{},_viewRender:function(a,d){function e(e){b.isString(e)&&(l.noel?(e=c.trim(e),k=c(e),a.$el.slice(1).remove(),a.$el.replaceWith(k),a.setElement(k,!1)):d.html(a.$el,e)),i.resolveWith(a,[a])}function f(b,c){var f;l.callback=function(a){delete l.isAsync,delete l.callback,e(a)},j.cache(g,c),c&&(f=d.renderTemplate.call(a,c,b)),l.isAsync||e(f)}var g,h,i,k,l=a.__manager__;return{render:function(){var c=a.serialize||d.serialize,e=a.template||d.template;return i=d.deferred(),b.isFunction(c)&&(c=c.call(a)),l.callback=function(a){delete l.isAsync,delete l.callback,f(c,a)},"string"==typeof e&&(g=d.prefix+e),(h=j.cache(g))?(f(c,h,g),i):("string"==typeof e?h=d.fetchTemplate.call(a,d.prefix+e):"function"==typeof e?h=e:null!=e&&(h=d.fetchTemplate.call(a,e)),l.isAsync||f(c,h),i)}}},_removeViews:function(a,b){"boolean"==typeof a&&(b=a,a=this),a=a||this,a.getViews().each(function(a){(a.hasRendered||b)&&j._removeView(a,b)})},_removeView:function(a,c){var d,e=a.__manager__,f=e.parent&&e.parent.__manager__,g="boolean"==typeof a.keep?a.keep:a.options.keep;if(!g&&f&&f.insert===!0||c){if(j.cleanViews(a),a._removeViews(!0),a.$el.remove(),!e.parent)return;if(d=e.parent.views[e.selector],b.isArray(d))return b.each(b.clone(d),function(a,b){a&&a.__manager__===e&&i.call(d,b,1)});delete e.parent.views[e.selector]}},cache:function(a,b){return a in this._cache&&null==b?this._cache[a]:null!=a&&null!=b?this._cache[a]=b:void 0},cleanViews:function(c){b.each(h.call([],c),function(c){var d;c.unbind(),c.model instanceof a.Model&&c.model.off(null,null,c),c.collection instanceof a.Collection&&c.collection.off(null,null,c),c.stopListening(),d=c.getAllOptions().cleanup,b.isFunction(d)&&d.call(c)})},configure:function(c){b.extend(j.prototype.options,c),c.manage&&(a.View.prototype.manage=!0),c.el===!1&&(a.View.prototype.el=!1),c.suppressWarnings===!0&&(a.View.prototype.suppressWarnings=!0)},setupView:function(c,e){b.each(h.call([],c),function(c){if(!c.__manager__){var f,g,i,k=j.prototype,l=b.pick(c,d);b.defaults(c,{views:{},sections:{},__manager__:{},_removeViews:j._removeViews,_removeView:j._removeView},j.prototype),e=c.options=b.defaults(e||{},c.options,k.options),i=b.pick(e,h.call(["events","sections"],b.values(e.events))),b.extend(c,i),b.extend(e,l),c._remove=a.View.prototype.remove,c.render=j.prototype.render,c.remove!==k.remove&&(c._remove=c.remove,c.remove=k.remove),f=e.views||c.views,b.keys(f).length&&(g=f,c.views={},c.setViews(g)),c.options.template?c.options.template=e.template:c.template&&(e.template=c.template)}})}});return j.VERSION="0.9.1",a.Layout=j,a.View.prototype._configure=function(a){var b,c;return("el"in a?a.el===!1:this.el===!1)&&(b=!0),c=f.apply(this,arguments),(a.manage||this.manage)&&j.setupView(this),this.__manager__&&(this.__manager__.noel=b,this.__manager__.suppressWarnings=a.suppressWarnings),c},j.prototype.options={prefix:"",deferred:function(){return c.Deferred()},fetchTemplate:function(a){return b.template(c(a).html())},renderTemplate:function(a,b){return a(b)},partial:function(a,b,c,d){var e;d.selector&&(c.noel?(e=a.filter(d.selector),a=e.length?e:a.find(d.selector)):a=a.find(d.selector)),c.insert?this.insert(a,b):this.html(a,b)},html:function(a,b){a.html(b)},htmlBatch:function(a,d,e){var f=a.__manager__,g={selector:e},h=b.reduce(d,function(b,d){var e="boolean"==typeof d.keep?d.keep:d.options.keep,f=e&&c.contains(a.el,d.el);return d.el&&!f&&b.push(d.el),b},[]);return this.partial(a.$el,c(h),f,g)},insert:function(a,b){a.append(b)},when:function(a){return c.when.apply(null,a)},contains:function(a,b){return c.contains(a,b)}},d=b.keys(j.prototype.options),j}),function(a){function b(b){var c=b.data;b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}function c(b){var c=b.target,d=a(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=this;if(f.clk=c,"image"==c.type)if(void 0!==b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function d(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}var e={};e.fileapi=void 0!==a("<input type='file'/>").get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b){function c(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;g>d;d++)f[d]=f[d].replace(/\+/g," "),e=f[d].split("="),h.push([decodeURIComponent(e[0]),decodeURIComponent(e[1])]);return h}function g(d){for(var e=new FormData,f=0;f<d.length;f++)e.append(d[f].name,d[f].value);if(b.extraData){var g=c(b.extraData);for(f=0;f<g.length;f++)g[f]&&e.append(g[f][0],g[f][1])}b.data=null;var h=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:i||"POST"});b.uploadProgress&&(h.xhr=function(){var a=jQuery.ajaxSettings.xhr();return a.upload&&a.upload.addEventListener("progress",function(a){var c=0,d=a.loaded||a.position,e=a.total;a.lengthComputable&&(c=Math.ceil(100*(d/e))),b.uploadProgress(a,d,e,c)},!1),a}),h.data=null;var j=h.beforeSend;return h.beforeSend=function(a,b){b.data=e,j&&j.call(this,a,b)},a.ajax(h)}function h(c){function e(a){var b=null;try{a.contentWindow&&(b=a.contentWindow.document)}catch(c){d("cannot get iframe.contentWindow document: "+c)}if(b)return b;try{b=a.contentDocument?a.contentDocument:a.document}catch(c){d("cannot get iframe.contentDocument: "+c),b=a.document}return b}function g(){function b(){try{var a=e(r).readyState;d("state = "+a),a&&"uninitialized"==a.toLowerCase()&&setTimeout(b,50)}catch(c){d("Server abort: ",c," (",c.name,")"),h(A),w&&clearTimeout(w),w=void 0}}var c=l.attr2("target"),f=l.attr2("action");x.setAttribute("target",o),i||x.setAttribute("method","POST"),f!=m.url&&x.setAttribute("action",m.url),m.skipEncodingOverride||i&&!/post/i.test(i)||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(w=setTimeout(function(){v=!0,h(z)},m.timeout));var g=[];try{if(m.extraData)for(var j in m.extraData)m.extraData.hasOwnProperty(j)&&(a.isPlainObject(m.extraData[j])&&m.extraData[j].hasOwnProperty("name")&&m.extraData[j].hasOwnProperty("value")?g.push(a('<input type="hidden" name="'+m.extraData[j].name+'">').val(m.extraData[j].value).appendTo(x)[0]):g.push(a('<input type="hidden" name="'+j+'">').val(m.extraData[j]).appendTo(x)[0]));m.iframeTarget||(q.appendTo("body"),r.attachEvent?r.attachEvent("onload",h):r.addEventListener("load",h,!1)),setTimeout(b,15);try{x.submit()}catch(k){var n=document.createElement("form").submit;n.apply(x)}}finally{x.setAttribute("action",f),c?x.setAttribute("target",c):l.removeAttr("target"),a(g).remove()}}function h(b){if(!s.aborted&&!F){if(E=e(r),E||(d("cannot access response document"),b=A),b===z&&s)return s.abort("timeout"),y.reject(s,"timeout"),void 0;if(b==A&&s)return s.abort("server abort"),y.reject(s,"error","server abort"),void 0;if(E&&E.location.href!=m.iframeSrc||v){r.detachEvent?r.detachEvent("onload",h):r.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"==m.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),setTimeout(h,250),void 0;var i=E.body?E.body:E.documentElement;s.responseText=i?i.innerHTML:null,s.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(m.dataType="xml"),s.getResponseHeader=function(a){var b={"content-type":m.dataType};return b[a]},i&&(s.status=Number(i.getAttribute("status"))||s.status,s.statusText=i.getAttribute("statusText")||s.statusText);var j=(m.dataType||"").toLowerCase(),k=/(json|script|text)/.test(j);if(k||m.textarea){var l=E.getElementsByTagName("textarea")[0];if(l)s.responseText=l.value,s.status=Number(l.getAttribute("status"))||s.status,s.statusText=l.getAttribute("statusText")||s.statusText;else if(k){var o=E.getElementsByTagName("pre")[0],p=E.getElementsByTagName("body")[0];o?s.responseText=o.textContent?o.textContent:o.innerText:p&&(s.responseText=p.textContent?p.textContent:p.innerText)}}else"xml"==j&&!s.responseXML&&s.responseText&&(s.responseXML=H(s.responseText));try{D=J(s,j,m)}catch(t){f="parsererror",s.error=c=t||f}}catch(t){d("error caught: ",t),f="error",s.error=c=t||f}s.aborted&&(d("upload aborted"),f=null),s.status&&(f=s.status>=200&&s.status<300||304===s.status?"success":"error"),"success"===f?(m.success&&m.success.call(m.context,D,"success",s),y.resolve(s.responseText,"success",s),n&&a.event.trigger("ajaxSuccess",[s,m])):f&&(void 0===c&&(c=s.statusText),m.error&&m.error.call(m.context,s,f,c),y.reject(s,"error",c),n&&a.event.trigger("ajaxError",[s,m,c])),n&&a.event.trigger("ajaxComplete",[s,m]),n&&!--a.active&&a.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,s,f),F=!0,m.timeout&&clearTimeout(w),setTimeout(function(){m.iframeTarget||q.remove(),s.responseXML=null},100)}}}var j,k,m,n,o,q,r,s,t,u,v,w,x=l[0],y=a.Deferred();if(c)for(k=0;k<p.length;k++)j=a(p[k]),f?j.prop("disabled",!1):j.removeAttr("disabled");if(m=a.extend(!0,{},a.ajaxSettings,b),m.context=m.context||m,o="jqFormIO"+(new Date).getTime(),m.iframeTarget?(q=a(m.iframeTarget),u=q.attr2("name"),u?o=u:q.attr2("name",o)):(q=a('<iframe name="'+o+'" src="'+m.iframeSrc+'" />'),q.css({position:"absolute",top:"-1000px",left:"-1000px"})),r=q[0],s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{r.contentWindow.document.execCommand&&r.contentWindow.document.execCommand("Stop")}catch(e){}q.attr("src",m.iframeSrc),s.error=c,m.error&&m.error.call(m.context,s,c,b),n&&a.event.trigger("ajaxError",[s,m,c]),m.complete&&m.complete.call(m.context,s,c)}},n=m.global,n&&0===a.active++&&a.event.trigger("ajaxStart"),n&&a.event.trigger("ajaxSend",[s,m]),m.beforeSend&&m.beforeSend.call(m.context,s,m)===!1)return m.global&&a.active--,y.reject(),y;if(s.aborted)return y.reject(),y;t=x.clk,t&&(u=t.name,u&&!t.disabled&&(m.extraData=m.extraData||{},m.extraData[u]=t.value,"image"==t.type&&(m.extraData[u+".x"]=x.clk_x,m.extraData[u+".y"]=x.clk_y)));var z=1,A=2,B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(m.extraData=m.extraData||{},m.extraData[C]=B),m.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=I(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var i,j,k,l=this;"function"==typeof b&&(b={success:b}),i=b.type||this.attr2("method"),j=b.url||this.attr2("action"),k="string"==typeof j?a.trim(j):"",k=k||window.location.href||"",k&&(k=(k.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:k,success:a.ajaxSettings.success,type:i||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var m={};if(this.trigger("form-pre-serialize",[this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var o,p=[],q=this.formToArray(b.semantic,p);if(b.data&&(b.extraData=b.data,o=a.param(b.data,n)),b.beforeSubmit&&b.beforeSubmit(q,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[q,this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var r=a.param(q,n);o&&(r=r?r+"&"+o:o),"GET"==b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+r,b.data=null):b.data=r;var s=[];if(b.resetForm&&s.push(function(){l.resetForm()}),b.clearForm&&s.push(function(){l.clearForm(b.includeHidden)}),!b.dataType&&b.target){var t=b.success||function(){};s.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(t,arguments)})}else b.success&&s.push(b.success);if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=s.length;g>f;f++)s[f].apply(e,[a,c,d||l,l])},b.error){var u=b.error;b.error=function(a,c,d){var e=b.context||this;u.apply(e,[a,c,d,l])}}if(b.complete){var v=b.complete;b.complete=function(a,c){var d=b.context||this;v.apply(d,[a,c,l])}}var w=a('input[type=file]:enabled[value!=""]',this),x=w.length>0,y="multipart/form-data",z=l.attr("enctype")==y||l.attr("encoding")==y,A=e.fileapi&&e.formdata;d("fileAPI :"+A);var B,C=(x||z)&&!A;b.iframe!==!1&&(b.iframe||C)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){B=h(q)}):B=h(q):B=(x||z)&&A?g(q):a.ajax(b),l.removeData("jqxhr").data("jqxhr",B);for(var D=0;D<p.length;D++)p[D]=null;return this.trigger("form-submit-notify",[this,b]),this},a.fn.ajaxForm=function(e){if(e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var f={s:this.selector,c:this.context};return!a.isReady&&f.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(f.s,f.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,b).bind("click.form-plugin",e,c)
-},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c){var d=[];if(0===this.length)return d;var f=this[0],g=b?f.getElementsByTagName("*"):f.elements;if(!g)return d;var h,i,j,k,l,m,n;for(h=0,m=g.length;m>h;h++)if(l=g[h],j=l.name,j&&!l.disabled)if(b&&f.clk&&"image"==l.type)f.clk==l&&(d.push({name:j,value:a(l).val(),type:l.type}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}));else if(k=a.fieldValue(l,!0),k&&k.constructor==Array)for(c&&c.push(l),i=0,n=k.length;n>i;i++)d.push({name:j,value:k[i]});else if(e.fileapi&&"file"==l.type){c&&c.push(l);var o=l.files;if(o.length)for(i=0;i<o.length;i++)d.push({name:j,value:o[i],type:l.type});else d.push({name:j,value:"",type:l.type})}else null!==k&&"undefined"!=typeof k&&(c&&c.push(l),d.push({name:j,value:k,type:l.type,required:l.required}));if(!b&&f.clk){var p=a(f.clk),q=p[0];j=q.name,j&&!q.disabled&&"image"==q.type&&(d.push({name:j,value:p.val()}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}))}return d},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;g>f;f++)c.push({name:d,value:e[f]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;e>d;d++){var f=this[d],g=a.fieldValue(f,b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==f&&-1==b.selectedIndex))return null;if("select"==f){var g=b.selectedIndex;if(0>g)return null;for(var h=[],i=b.options,j="select-one"==e,k=j?g+1:i.length,l=j?g:0;k>l;l++){var m=i[l];if(m.selected){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==d?/MSIE/.test(navigator.userAgent)?a(this).replaceWith(a(this).clone(!0)):a(this).val(""):b&&(b===!0&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})},a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"==c||"radio"==c)this.checked=b;else if("option"==this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}(jQuery),define("plugins/jquery.form",function(){}),define("app",["jquery","lodash","backbone","helpers","mixins","plugins/backbone.layoutmanager","plugins/jquery.form"],function(a,b,c,d,e){"undefined"==typeof console&&(console={log:function(){}});var f={root:"/",version:"0.0.1",mixins:e,host:window.location.protocol+"//"+window.location.host},g=window.JST=window.JST||{};return c.Layout.configure({manage:!0,prefix:"app/",renderTemplate:function(a,c){return a(b.extend(d,c))},fetchTemplate:function(c){var d;return c+=".html",g[c]?g[c]:(d=this.async(),a.ajax({url:f.root+c}).then(function(a){d(g[c]=b.template(a))}))}}),b.extend(f,{module:function(a){return b.extend({Views:{}},a)}},c.Events)}),!function(a){a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c),this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")}))},hide:function(b){b&&b.preventDefault(),b=a.Event("hide"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]===a.target||b.$element.has(a.target).length||b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){27==b.which&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);e||d.data("modal",e=new b(this,f)),"string"==typeof c?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function b(){a(".dropdown-backdrop").remove(),a(d).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}var d="[data-toggle=dropdown]",e=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};e.prototype={constructor:e,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",b),d.toggleClass("open")),f.focus(),!1},keydown:function(b){var e,f,g,h,i;if(/(38|40|27)/.test(b.keyCode)&&(e=a(this),b.preventDefault(),b.stopPropagation(),!e.is(".disabled, :disabled"))){if(g=c(e),h=g.hasClass("open"),!h||h&&27==b.keyCode)return 27==b.which&&g.find(d).focus(),e.click();f=a("[role=menu] li:not(.divider):visible a",g),f.length&&(i=f.index(f.filter(":focus")),38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<f.length-1&&i++,~i||(i=0),f.eq(i).focus())}}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new e(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=e,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",d,e.prototype.toggle).on("keydown.dropdown.data-api",d+", [role=menu]",e.prototype.keydown)}(window.jQuery),!function(a){function b(b,c){var d,e=a.proxy(this.process,this),f=a(b).is("body")?a(window):a(b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b,c=this;this.offsets=a([]),this.targets=a([]),b=this.$body.find(this.selector).map(function(){var b=a(this),d=b.data("target")||b.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},process:function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b,c,d,e=this.element,f=e.closest("ul:not(.dropdown-menu)"),g=e.attr("data-target");g||(g=e.attr("href"),g=g&&g.replace(/.*(?=#[^\s]*$)/,"")),e.parent("li").hasClass("active")||(b=f.find(".active:last a")[0],d=a.Event("show",{relatedTarget:b}),e.trigger(d),d.isDefaultPrevented()||(c=a(g),this.activate(e.parent("li"),f),this.activate(c,c.parent(),function(){e.trigger({type:"shown",relatedTarget:b})})))},activate:function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e):e(),f.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};return this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var c=this.tip(),d=a.Event("hide");return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=("function"==typeof c.content?c.content.call(b[0]):c.content)||b.attr("data-content")},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f="object"==typeof c&&c;e||d.data("popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b,c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.bottom,h=f.top,i="affix affix-top affix-bottom";"object"!=typeof f&&(g=h=f),"function"==typeof h&&(h=f.top()),"function"==typeof g&&(g=f.bottom()),b=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=g&&e.top+this.$element.height()>=c-g?"bottom":null!=h&&h>=d?"top":!1,this.affixed!==b&&(this.affixed=b,this.unpin="bottom"==b?e.top-d:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:"")))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof c&&c;e||d.data("affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);e||d.data("collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(b=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,b?this.process(b):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){for(var b,c=[],d=[],e=[];b=a.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?d.push(b):e.push(b):c.push(b);return c.concat(d,e)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(){var b=this.$menu.find(".active").removeClass("active"),c=b.next();c.length||(c=a(this.$menu.find("li")[0])),c.addClass("active")},prev:function(){var a=this.$menu.find(".active").removeClass("active"),b=a.prev();b.length||(b=this.$menu.find("li").last()),b.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b="function"==typeof this.$element[a]),b},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f="object"==typeof c&&c;e||d.data("typeahead",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this
-},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);b.data("typeahead")||b.typeahead(b.data())})}(window.jQuery),define("bootstrap",["jquery"],function(a){return function(){var b;return b||a.Bootstrap}}(this)),define("initialize",["app","lodash","bootstrap"],function(a,b){b.extend(a,{root:"/_utils/fauxton/",renderView:function(a,b,c,d,e){a.setView(b,new c(d)).render().then(e)},getParams:function(a){a&&("?"===a.substring(0,1)?a=a.substring(1):a.indexOf("?")>-1&&(a=a.split("?")[1]));var b=window.location.hash.split("?")[1];a=a||b||window.location.search.substring(1);var c,d={},e=/\+/g,f=/([^&=]+)=?([^&]*)/g,g=function(a){return decodeURIComponent(a.replace(e," "))},h=a;if(a)for(;c=f.exec(h);)d[g(c[1])]=g(c[2]);return d}})}),define("resizeColumns",["mixins"],function(a){var b=function(a){this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"};return b.prototype={getPrimaryNavWidth:function(){var a=$("body").hasClass("closeMenu")?64:224;return a},getPanelWidth:function(){var a=$("#sidebar-content").length>0?$("#sidebar-content").width():0;return this.getPrimaryNavWidth()+a},initialize:function(){var b=this;this.lazyLayout=_.debounce(b.onResizeHandler,300).bind(this),a.addWindowResize(this.lazyLayout,"animation"),a.initWindowResize(),this.onResizeHandler()},updateOptions:function(a){this.options={},this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"},turnOff:function(){a.removeWindowResize("animation")},cleanupCallback:function(){this.callback=null},onResizeHandler:function(){if(this.options.onResizeHandler)this.options.onResizeHandler();else{var a,b=window.innerWidth-this.getPanelWidth(),c=$("#sidebar-content").length>0?470:800;b>c&&1400>b?a=window.innerWidth-this.getPanelWidth():c>b?a=c:b>1400&&(a=1400),$(this.options.selectorElements).innerWidth(a)}this.options.callback&&this.options.callback()}},b}),define("modules/fauxton/base",["app","backbone","resizeColumns"],function(a,b,c){a.resizeColumns=new c({}),a.resizeColumns.onResizeHandler();var d=a.module();return d.Breadcrumbs=b.View.extend({template:"templates/fauxton/breadcrumbs",serialize:function(){var a=_.clone(this.crumbs);return{crumbs:a}},initialize:function(a){this.crumbs=a.crumbs}}),d.VersionInfo=b.Model.extend({url:a.host}),d.Footer=b.View.extend({template:"templates/fauxton/footer",initialize:function(){this.versionInfo=new d.VersionInfo},establish:function(){return[this.versionInfo.fetch()]},serialize:function(){return{version:this.versionInfo.get("version")}}}),d.NavBar=b.View.extend({className:"navbar",template:"templates/fauxton/nav_bar",navLinks:[{href:"#/_all_dbs",title:"Databases",icon:"fonticon-database",className:"databases"}],bottomNavLinks:[],footerNavLinks:[],serialize:function(){return{navLinks:this.navLinks,bottomNavLinks:this.bottomNavLinks,footerNavLinks:this.footerNavLinks}},addLink:function(a){a.top&&!a.bottomNav?this.navLinks.unshift(a):a.top&&a.bottomNav?this.bottomNavLinks.unshift(a):a.bottomNav?this.bottomNavLinks.push(a):a.footerNav?this.footerNavLinks.push(a):this.navLinks.push(a)},removeLink:function(a){var b=this.navlinks;a.bottomNav?b=this.bottomNavLinks:a.footerNav&&(b=this.footerNavLinks);var c=-1;_.each(b,function(b,d){b.title===a.title&&(c=d)}),-1!==c&&(b.splice(c,1),this.render())},afterRender:function(){function b(){d.toggleClass("closeMenu"),c=d.hasClass("closeMenu"),a.resizeColumns.onResizeHandler()}$('#primary-navbar li[data-nav-name="'+a.selectedHeader+'"]').addClass("active");var c=!0,d=$("body");$(".brand").off(),$(".brand").on({click:function(a){$(a.target).is("a")||b()}}),$("#primary-navbar").on("click",".nav a",function(){d.hasClass("closeMenu")||setTimeout(function(){d.addClass("closeMenu"),a.resizeColumns.onResizeHandler()},3e3)}),a.resizeColumns.initialize()},beforeRender:function(){this.addLinkViews()},addLinkViews:function(){var a=this;_.each(_.union(this.navLinks,this.bottomNavLinks),function(b){if(b.view){var c=b.establish||[];$.when.apply(null,c).then(function(){var c=b.bottomNav?"#bottom-nav-links":"#nav-links";a.insertView(c,b.view).render()})}},this)}}),d.ApiBar=b.View.extend({template:"templates/fauxton/api_bar",endpoint:"_all_docs",documentation:"docs",events:{"click .api-url-btn":"toggleAPIbar"},toggleAPIbar:function(a){var b=$(a.currentTarget).find("span");b.hasClass("fonticon-plus")?b.removeClass("fonticon-plus").addClass("fonticon-minus"):b.removeClass("fonticon-minus").addClass("fonticon-plus"),$(".api-navbar").toggle()},serialize:function(){return{endpoint:this.endpoint,documentation:this.documentation}},hide:function(){this.$el.addClass("hide")},show:function(){this.$el.removeClass("hide")},update:function(a){this.show(),this.endpoint=a[0],this.documentation=a[1],this.render()}}),d.Notification=b.View.extend({fadeTimer:5e3,initialize:function(a){this.msg=a.msg,this.type=a.type||"info",this.selector=a.selector,this.fade=void 0===a.fade?!0:a.fade,this.clear=a.clear,this.data=a.data||"",this.template=a.template||"templates/fauxton/notification"},serialize:function(){return{data:this.data,msg:this.msg,type:this.type}},delayedFade:function(){var a=this;this.fade&&setTimeout(function(){a.$el.fadeOut()},this.fadeTimer)},renderNotification:function(a){return a=a||this.selector,this.clear&&$(a).html(""),this.render().$el.appendTo(a),this.delayedFade(),this}}),d}),function(a,b,c){function d(a){return j(arguments,function(b,d){a[b]===c&&(a[b]=d)}),a}function e(a){return j(arguments,function(b,c){a[u][f(a,b)||b]=c}),a}function f(a,b){var d,e,f=a[u];if(f[b]!==c)return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),e=0;e<M[m];e++)if(d=M[e]+b,f[d]!==c)return d}function g(a,b){var c,d=[r,b,~~(100*a)].join("-"),e="{"+r+":"+a+"}";if(!N[d]){for(c=0;c<M[m];c++)try{O.insertRule("@"+(M[c]&&"-"+M[c].toLowerCase()+"-"||"")+"keyframes "+d+"{0%{"+r+":1}"+b+"%"+e+"to"+e+"}",O.cssRules[m])}catch(f){}N[d]=1}return d}function h(a,b,c){return c&&!c[B]&&h(a,c),a.insertBefore(b,c||null),a}function i(a){var c=b.createElement(a||"div");return j(arguments,function(a,b){c[a]=b}),c}function j(a,b){for(var c=~~((a[m]-1)/2),d=1;c>=d;d++)b(a[2*d-1],a[2*d])}var k,l="width",m="length",n="radius",o="lines",p="trail",q="color",r="opacity",s="speed",t="shadow",u="style",v="height",w="left",x="top",y="px",z="childNodes",A="firstChild",B="parentNode",C="position",D="relative",E="absolute",F="animation",G="transform",H="Origin",I="Timeout",J="coord",K="#000",L=u+"Sheets",M="webkit0Moz0ms0O".split(0),N={};h(b.getElementsByTagName("head")[0],i(u));var O=b[L][b[L][m]-1],P=function(a){this.opts=d(a||{},o,12,p,100,m,7,l,5,n,10,q,K,r,.25,s,1)},Q=P.prototype={spin:function(b){var c=this,d=c.el=c[o](c.opts);if(b&&h(b,e(d,w,~~(b.offsetWidth/2)+y,x,~~(b.offsetHeight/2)+y),b[A]),!k){var f=c.opts,g=0,i=20/f[s],j=(1-f[r])/(i*f[p]/100),l=i/f[o];!function m(){g++;for(var b=f[o];b;b--){var e=Math.max(1-(g+b*l)%i*j,f[r]);c[r](d,f[o]-b,e,f)}c[I]=c.el&&a["set"+I](m,50)}()}return c},stop:function(){var b=this,d=b.el;return a["clear"+I](b[I]),d&&d[B]&&d[B].removeChild(d),b.el=c,b}};Q[o]=function(a){function b(b,c){return e(i(),C,E,l,a[m]+a[l]+y,v,a[l]+y,"background",b,"boxShadow",c,G+H,w,G,"rotate("+~~(360/a[o]*j)+"deg) translate("+a[n]+y+",0)","borderRadius","100em")}for(var c,d=e(i(),C,D),f=g(a[r],a[p]),j=0;j<a[o];j++)c=e(i(),C,E,x,1+~(a[l]/2)+y,G,"translate3d(0,0,0)",F,f+" "+1/a[s]+"s linear infinite "+(1/a[o]/a[s]*j-1/a[s])+"s"),a[t]&&h(c,e(b(K,"0 0 4px "+K),x,2+y)),h(d,h(c,b(a[q],"0 0 1px rgba(0,0,0,.1)")));return d},Q[r]=function(a,b,c){a[z][b][u][r]=c};var R="behavior",S="url(#default#VML)",T="group0roundrect0fill0stroke".split(0);!function(){var a,b=e(i(T[0]),R,S);if(!f(b,G)&&b.adj){for(a=0;a<T[m];a++)O.addRule(T[a],R+":"+S);Q[o]=function(){function a(a,c,g){h(j,h(e(b(),"rotation",360/d[o]*a+"deg",w,~~c),h(e(i(T[1],"arcsize",1),l,f,v,d[l],w,d[n],x,-d[l]/2,"filter",g),i(T[2],q,d[q],r,d[r]),i(T[3],r,0))))}function b(){return e(i(T[0],J+"size",g+" "+g,J+H,-f+" "+-f),l,g,v,g)}var c,d=this.opts,f=d[m]+d[l],g=2*f,j=b(),k=~(d[m]+d[n]+d[l])+y;if(d[t])for(c=1;c<=d[o];c++)a(c,-2,"progid:DXImage"+G+".Microsoft.Blur(pixel"+n+"=2,make"+t+"=1,"+t+r+"=.3)");for(c=1;c<=d[o];c++)a(c);return h(e(i(),"margin",k+" 0 0 "+k,C,D),j)},Q[r]=function(a,b,c,d){d=d[t]&&d[o]||0,a[A][z][b+d][A][A][r]=c}}else k=f(b,F)}(),a.Spinner=P}(window,document),define("spin",function(){}),define("api",["app","modules/fauxton/base","spin"],function(a,b){var c=a.module();c.moduleExtensions={Routes:{}},c.addonExtensions={initialize:function(){}},c.excludedViewErrors=["Missing name in function declaration.","['{a}'] is better written in dot notation."],c.isIgnorableError=function(a){return _.contains(c.excludedViewErrors,a)},c.View=Backbone.View.extend({establish:function(){return null},loaderClassname:"loader",disableLoader:!1,forceRender:function(){this.hasRendered=!1}}),c.navigate=function(b,c){var d=_.extend({trigger:!0},c);a.router.navigate(b,d)},c.addHeaderLink=function(b){a.masterLayout.navBar.addLink(b)},c.removeHeaderLink=function(b){a.masterLayout.navBar.removeLink(b)},c.Deferred=function(){return $.Deferred()},c.when=function(a){return a instanceof Array?$.when.apply(null,a):$.when(a)},c.addRoute=function(b){a.router.route(b.route,b.name,b.callback)},c.triggerRouteEvent=function(b,c){a.router.triggerRouteEvent("route:"+b,c)},c.module=function(b){return a.module(_.extend(c.moduleExtensions,b))},c.addon=function(a){return c.module(c.addonExtensions,a)},c.addNotification=function(a){a=_.extend({msg:"Notification Event Triggered!",type:"info",selector:"#global-notifications"},a);var c=new b.Notification(a);return c.renderNotification()},c.UUID=Backbone.Model.extend({initialize:function(a){a=_.extend({count:1},a),this.count=a.count},url:function(){return a.host+"/_uuids?count="+this.count},next:function(){return this.get("uuids").pop()}}),c.Session=Backbone.Model.extend({url:"/_session",user:function(){var a=this.get("userCtx");return a&&a.name?{name:a.name,roles:a.roles}:null},fetchOnce:function(a){var b=_.extend({},a);return(!this._deferred||"rejected"===this._deferred.state()||b.forceFetch)&&(this._deferred=this.fetch()),this._deferred},fetchUser:function(a){var b=this,c=this.user();return this.fetchOnce(a).then(function(){var a=b.user();return c!==a?b.trigger("session:userChanged"):b.trigger("session:userFetched"),a})}}),c.setSession=function(b){return a.session=c.session=b,c.session.fetchUser()},c.setSession(new c.Session);var d=function(a){this._options=a,this.initialize.apply(this,arguments)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{authDeniedCb:function(){},initialize:function(){},authHandlerCb:function(){var a=$.Deferred();return a.resolve(),a},registerAuth:function(a){this.authHandlerCb=a},registerAuthDenied:function(a){this.authDeniedCb=a},checkAccess:function(a){var b=a||[],d=this;return c.session.fetchUser().then(function(){return c.when(d.authHandlerCb(c.session,b))})}}),c.auth=new d,c.RouteObject=function(a){this._options=a,this._configure(a||{}),this.initialize.apply(this,arguments),this.addEvents()};var e={};_.extend(e,Backbone.Events),c.RouteObject.on=function(a,b){e.on(a,b)},c.RouteObject.extend=Backbone.Model.extend;var f=["views","routes","events","roles","crumbs","layout","apiUrl","establish"];_.extend(c.RouteObject.prototype,Backbone.Events,{views:{},routes:{},events:{},crumbs:[],layout:"with_sidebar",apiUrl:null,disableLoader:!1,loaderClassname:"loader",renderedState:!1,establish:function(){},route:function(){},roles:[],initialize:function(){}},{renderWith:function(d,e){var f=this,g=_.bind(this.triggerBroadcast,this);this.renderedState||(e.setTemplate(this.layout),g("beforeFullRender"),$("#primary-navbar li").removeClass("active"),this.selectedHeader&&(a.selectedHeader=this.selectedHeader,$('#primary-navbar li[data-nav-name="'+this.selectedHeader+'"]').addClass("active"))),e.clearBreadcrumbs();var h=this.get("crumbs");h.length&&e.setBreadcrumbs(new b.Breadcrumbs({crumbs:h})),g("beforeEstablish"),c.when(this.establish()).then(function(){g("afterEstablish"),_.each(f.getViews(),function(a,b){a.hasRendered||(g("beforeRender",a,b),c.when(a.establish()).then(function(){e.setView(b,a),e.renderView(b),g("afterRender",a,b)},function(d){if(a.establishError={error:!0,reason:d},d){var f=JSON.parse(d.responseText).reason;c.addNotification({msg:"An Error occurred: "+f,type:"error"})}e.renderView(b)}))})}.bind(this),function(a){a&&c.addNotification({msg:"An Error occurred"+JSON.parse(a.responseText).reason,type:"error"})}),this.get("apiUrl")?e.apiBar.update(this.get("apiUrl")):e.apiBar.hide(),this.renderedState=!0,g("renderComplete")},triggerBroadcast:function(a){var b=Array.prototype.slice.call(arguments);this.trigger.apply(this,b),b.splice(0,1,a,this),e.trigger.apply(e,b)},get:function(a){return _.isFunction(this[a])?this[a]():this[a]},addEvents:function(a){a=a||this.get("events"),_.each(a,function(a,b){if(!_.isFunction(a)&&!_.isFunction(this[a]))throw new Error("Invalid method: "+a);a=_.isFunction(a)?a:this[a],this.on(b,a)},this)},_configure:function(a){_.each(_.intersection(_.keys(a),f),function(b){this[b]=a[b]},this)},getView:function(a){return this.views[a]},setView:function(a,b){return this.views[a]=b,b},getViews:function(){return this.views},removeViews:function(){_.each(this.views,function(a,b){a.remove(),delete this.views[b]},this)},getRouteUrls:function(){return _.keys(this.get("routes"))},hasRoute:function(a){return this.get("routes")[a]?!0:!1},routeCallback:function(a,b){var c,d=this.get("routes"),e=d[a];c="object"==typeof e?this[e.route]:this[e],c.apply(this,b)},getRouteRoles:function(a){var b=this.get("routes")[a];return"object"==typeof b&&b.roles?b.roles:this.roles}});var g;c.RouteObject.on("beforeEstablish",function(a){if(!a.disableLoader){var b={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};$(".spinner").length||$('<div class="spinner"></div>').appendTo("#app-container"),g=new Spinner(b).spin(),$(".spinner").append(g.el)}});var h;c.RouteObject.on("beforeRender",function(a,b,c){if(a.disableLoader||(g.stop(),$(".spinner").remove()),!b.disableLoader){var d={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};h=new Spinner(d).spin(),$('<div class="spinner"></div>').appendTo(c).append(h.el)}}),c.RouteObject.on("afterRender",function(a,b){b.disableLoader||h.stop()});var i=_.extend({},Backbone.Events);return c.registerExtension=function(a,b){i[a]||(i[a]=[]),i.trigger("add:"+a,b),i[a].push(b)},c.getExtensions=function(a){var b=i[a];return b||(b=[]),b},c.extensions=i,a.fauxtonAPI=c,a.fauxtonAPI}),define("modules/fauxton/layout",["backbone"],function(a){var b=function(b,c){this.navBar=b,this.apiBar=c,this.layout=new a.Layout({template:"templates/layouts/with_sidebar",views:{"#primary-navbar":this.navBar,"#api-navbar":this.apiBar},afterRender:function(){}}),this.layoutViews={},this.el=this.layout.el};return _.extend(b.prototype,{render:function(){return this.layout.render()},setTemplate:function(a){this.layout.template=a.prefix?a.prefix+a.name:"templates/layouts/"+a,_.each(this.layoutViews,function(a){a.remove()}),this.layoutViews={},this.render()},setTabs:function(a){this.tabs=this.layout.setView("#tabs",a),this.tabs.render()},setBreadcrumbs:function(a){this.breadcrumbs=this.layout.setView("#breadcrumbs",a),this.breadcrumbs.render()},clearBreadcrumbs:function(){this.breadcrumbs&&this.breadcrumbs.remove()},setView:function(a,b){this.layoutViews[a]=this.layout.setView(a,b,!1)},renderView:function(a){var b=this.layoutViews[a];return b?b.render():!1}}),b}),define("modules/documents/resources",["app","api"],function(a,b){var c=a.module();return c.Doc=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},url:function(b){return"app"===b?this.getDatabase().url("app")+"/"+this.safeID():a.host+"/"+this.getDatabase().id+"/"+this.id},initialize:function(a,b){this.collection&&this.collection.database?this.database=this.collection.database:b.database&&(this.database=b.database)},getDatabase:function(){return this.database?this.database:this.collection.database},validate:function(a){return this.id&&this.id!==a._id&&this.get("_rev")?"Cannot change a documents id.":void 0},docType:function(){return this.id.match(/^_design/)?"design doc":"doc"},isEditable:function(){return"reduction"!=this.docType()},isDdoc:function(){return"design doc"===this.docType()},hasViews:function(){if(!this.isDdoc())return!1;var a=this.get("doc");if(a)return a&&a.views&&_.keys(a.views).length>0;var b=this.get("views");return b&&_.keys(b).length>0},hasAttachments:function(){return!!this.get("_attachments")},getDdocView:function(a){if(!this.isDdoc()||!this.hasViews())return!1;var b=this.get("doc");return b?b.views[a]:this.get("views")[a]},setDdocView:function(a,b,c){if(!this.isDdoc())return!1;var d=this.get("views");return c?d[a]={map:b,reduce:c}:(d[a]||(d[a]={}),d[a].map=b),this.set({views:d}),!0},removeDdocView:function(a){if(!this.isDdoc())return!1;var b=this.get("views");delete b[a],this.set({views:b})},dDocModel:function(){if(!this.isDdoc())return!1;var a=this.get("doc");return a?new c.Doc(a,{database:this.database}):this},viewHasReduce:function(a){var b=this.getDdocView(a);return b&&b.reduce},safeID:function(){return this.id.replace("/","%2F")},destroy:function(){var a=this.url()+"?rev="+this.get("_rev");return $.ajax({url:a,dataType:"json",type:"DELETE"})},parse:function(a){return a.rev&&(a._rev=a.rev,delete a.rev),a.id&&("undefined"==typeof this.id&&(a._id=a.id),delete a.id),a.ok&&delete a.ok,a},prettyJSON:function(){var a=this.get("doc")?this.get("doc"):this;return JSON.stringify(a,null,"  ")},copy:function(a){return $.ajax({type:"COPY",url:"/"+this.database.id+"/"+this.id,headers:{Destination:a}})},isNewDoc:function(){return this.get("_rev")?!1:!0}}),c.DdocInfo=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database},url:function(b){return"app"===b?this.database.url("app")+"/"+this.safeID()+"/_info":a.host+"/"+this.database.id+"/"+this.id+"/_info"},safeID:function(){return this.id.replace("/","%2F")}}),c.ViewRow=Backbone.Model.extend({docType:function(){return this.id?this.id.match(/^_design/)?"design doc":"doc":"reduction"},documentation:function(){return"docs"},url:function(a){return this.isEditable()?this.collection.database.url(a)+"/"+this.id:!1},isEditable:function(){return"reduction"!=this.docType()},prettyJSON:function(){return JSON.stringify(this,null,"  ")}}),c.NewDoc=c.Doc.extend({fetch:function(){var a=new b.UUID,c=this.deferred=$.Deferred(),d=this;return a.fetch().done(function(){d.set("_id",a.next()),c.resolve()}),c.promise()}}),c.AllDocs=Backbone.Collection.extend({model:c.Doc,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=b.params,this.skipFirstItem=!1,this.on("remove",this.decrementTotalRows,this)},url:function(b){var c="";return this.params&&(c="?"+$.param(this.params)),"app"===b?"database/"+this.database.id+"/_all_docs"+c:a.host+"/"+this.database.id+"/_all_docs"+c},simple:function(){var a=this.map(function(a){return{_id:a.id,_rev:a.get("_rev")}});return new c.AllDocs(a,{database:this.database,params:this.params})},urlNextPage:function(a,b){if(!b){var c=this.last();b=c?c.id:""}return this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a+1,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},totalRows:function(){return this.viewMeta.total_rows||"unknown"},decrementTotalRows:function(){this.viewMeta.total_rows&&(this.viewMeta.total_rows=this.viewMeta.total_rows-1,this.trigger("totalRows:decrement"))},updateSeq:function(){return this.viewMeta.update_seq||!1},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},parse:function(a){var b=a.rows;return this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},this.skipFirstItem&&(b=b.splice(1)),_.map(b,function(a){return{_id:a.id,_rev:a.value.rev,value:a.value,key:a.key,doc:a.doc||void 0}})}}),c.IndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view",this.view=b.view,this.design=b.design.replace("_design/",""),this.skipFirstItem=!1},url:function(b){var c="";this.params&&(c="?"+$.param(this.params));var d=a.host;"app"===b&&(d="database");var e=[d,this.database.id,"_design",this.design,this.idxType,this.view];return e.join("/")+c},urlNextPage:function(a,b){return b||(b=this.last().id),this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.IndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design})},parse:function(a){var b=a.rows;return this.endTime=(new Date).getTime(),this.requestDuration=this.endTime-this.startTime,this.skipFirstItem&&(b=b.splice(1)),this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},_.map(b,function(a){return{value:a.value,key:a.key,doc:a.doc,id:a.id}})},buildAllDocs:function(){this.fetch()},fetch:function(){return this.startTime=(new Date).getTime(),Backbone.Collection.prototype.fetch.call(this)},allDocs:function(){return this.models},requestDurationInString:function(){var a,b,c,d,e,f=this.requestDuration;for(b=Math.floor(f/1e3),c=Math.floor(b/60),b=(b%60).toString(),b.length<2&&(b="0"+b),d=Math.floor(c/60).toString(),d.length<2&&(d="0"+d),c=(c%60).toString(),c.length<2&&(c="0"+c),e=d+":"+c+":"+b,a=(f%1e3).toString();a.length<3;)a="0"+a;return e+="."+a}}),c.PouchIndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.rows=b.rows,this.view=b.view,this.design=b.design.replace("_design/",""),this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view"},url:function(){return""},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.PouchIndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design,rows:this.rows})},fetch:function(){var a=b.Deferred();return this.reset(this.rows,{silent:!0}),this.viewMeta={total_rows:this.rows.length,offset:0,update_seq:!1},a.resolve(),a},recordStart:function(){return 1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},buildAllDocs:function(){this.fetch()},allDocs:function(){return this.models}}),c}),define("modules/databases/resources",["app","api","modules/documents/resources"],function(a,b,c){var d=b.module();return d.Model=Backbone.Model.extend({initialize:function(){this.status=new d.Status({database:this})},documentation:function(){return"all_dbs"},buildAllDocs:function(a){return this.allDocs=new c.AllDocs(null,{database:this,params:a}),this.allDocs},isNew:function(){return!1},url:function(b){return"index"===b?"/database/"+this.id+"/_all_docs":"web-index"===b?"#/database/"+encodeURIComponent(this.get("name"))+"/_all_docs?limit=100":"changes"===b?"/database/"+this.id+"/_changes?descending=true&limit=100&include_docs=true":"app"===b?"/database/"+this.id:a.host+"/"+this.id},buildChanges:function(a){return this.changes=new d.Changes({database:this,params:a}),this.changes}}),d.Changes=Backbone.Collection.extend({initialize:function(a){this.database=a.database,this.params=a.params},url:function(){var b="";return this.params&&(b="?"+$.param(this.params)),a.host+"/"+this.database.id+"/_changes"+b},parse:function(a){return this.last_seq=a.last_seq,a.results}}),d.Status=Backbone.Model.extend({url:function(){return a.host+"/"+this.database.id},initialize:function(a){this.database=a.database},numDocs:function(){return this.get("doc_count")},updateSeq:function(a){var b=this.get("update_seq");return a||"number"==typeof b?b:b?b.split("-")[0]:0},humanSize:function(){var a=-1,b=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"],c=this.diskSize();if(!c)return 0;do c/=1024,a++;while(c>1024);return Math.max(c,.1).toFixed(1)+b[a]},diskSize:function(){return this.get("disk_size")}}),d.List=Backbone.Collection.extend({model:d.Model,documentation:function(){return"all_dbs"},url:function(){return a.host+"/_all_dbs"},parse:function(a){return _.map(a,function(a){return{id:encodeURIComponent(a),name:a}})}}),d}),function(){function a(a){var b=function(a,b){return e("",a,b)},f=c;a&&(c[a]||(c[a]={}),f=c[a]),f.define&&f.define.packaged||(d.original=f.define,f.define=d,f.define.packaged=!0),f.require&&f.require.packaged||(e.original=f.require,f.require=b,f.require.packaged=!0)}var b="",c=function(){return this}();if(b||"undefined"==typeof requirejs){var d=function(a,b,c){return"string"!=typeof a?(d.original?d.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(c=b),d.modules||(d.modules={},d.payloads={}),d.payloads[a]=c,d.modules[a]=null,void 0)},e=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var d=[],f=0,h=b.length;h>f;++f){var i=g(a,b[f]);if(!i&&e.original)return e.original.apply(window,arguments);d.push(i)}c&&c.apply(null,d)}else{if("string"==typeof b){var j=g(a,b);return!j&&e.original?e.original.apply(window,arguments):(c&&c(),j)}if(e.original)return e.original.apply(window,arguments)}},f=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return f(a,c[0])+"!"+f(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&e!=b;){var e=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},g=function(a,b){b=f(a,b);var c=d.modules[b];if(!c){if(c=d.payloads[b],"function"==typeof c){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return e(b,a,c)},j=c(i,g,h);g=j||h.exports,d.modules[b]=g,delete d.payloads[b]}c=d.modules[b]=g||c}return c};a(b)}}(),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a){a("./regexp"),a("./es5-shim")}),define("ace/lib/regexp",["require","exports","module"],function(){function a(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function b(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}var c={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},d=void 0===c.exec.call(/()??/,"")[1],e=function(){var a=/^/g;return c.test.call(a,""),!a.lastIndex}();e&&d||(RegExp.prototype.exec=function(f){var g,h,i=c.exec.apply(this,arguments);if("string"==typeof f&&i){if(!d&&i.length>1&&b(i,"")>-1&&(h=RegExp(this.source,c.replace.call(a(this),"g","")),c.replace.call(f.slice(i.index),h,function(){for(var a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var j=1;j<i.length;j++)g=this._xregexp.captureNames[j-1],g&&(i[g]=i[j]);!e&&this.global&&!i[0].length&&this.lastIndex>i.index&&this.lastIndex--}return i},e||(RegExp.prototype.test=function(a){var b=c.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function a(){}function b(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function c(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if("function"!=typeof c)throw new TypeError("Function.prototype.bind called on incompatible "+c);var d=l.call(arguments,1),e=function(){if(this instanceof e){var a=c.apply(this,d.concat(l.call(arguments)));return Object(a)===a?a:this}return c.apply(b,d.concat(l.call(arguments)))};return c.prototype&&(a.prototype=c.prototype,e.prototype=new a,a.prototype=null),e});var d,e,f,g,h,i=Function.prototype.call,j=Array.prototype,k=Object.prototype,l=j.slice,m=i.bind(k.toString),n=i.bind(k.hasOwnProperty);if((h=n(k,"__defineGetter__"))&&(d=i.bind(k.__defineGetter__),e=i.bind(k.__defineSetter__),f=i.bind(k.__lookupGetter__),g=i.bind(k.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var b,c=[];return c.splice.apply(c,a(20)),c.splice.apply(c,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length,b+1==c.length?!0:void 0}()){var o=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?o.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(l.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=l.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),h=a+g,i=h+f-g,j=c-h,k=c-g;if(h>i)for(var m=0;j>m;++m)this[i+m]=this[h+m];else if(i>h)for(m=j;m--;)this[i+m]=this[h+m];if(f&&a===k)this.length=k,this.push.apply(this,e);else for(this.length=k+f,m=0;f>m;++m)this[a+m]=e[m]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==m(a)});var p=Object("a"),q="a"!=p[0]||!(0 in p);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError;for(;++e<f;)e in c&&a.call(d,c[e],e,b)}),Array.prototype.map||(Array.prototype.map=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=H(this),d=q&&"[object String]"==m(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break
-}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=0;for(arguments.length>1&&(e=c(arguments[1])),e=e>=0?e:Math.max(0,d+e);d>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=d-1;for(arguments.length>1&&(e=Math.min(e,c(arguments[1]))),e=e>=0?e:d-Math.abs(e);e>=0;e--)if(e in b&&a===b[e])return e;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:k)}),!Object.getOwnPropertyDescriptor){var r="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(r+a);if(n(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},h){var i=a.__proto__;a.__proto__=k;var d=f(a,b),e=g(a,b);if(a.__proto__=i,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var s;s=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=s();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var t=b({}),u="undefined"==typeof document||b(document.createElement("div"));if(!t||!u)var v=Object.defineProperty}if(!Object.defineProperty||v){var w="Property description must be an object: ",x="Object.defineProperty called on non-object: ",y="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(x+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(w+c);if(v)try{return v.call(Object,a,b,c)}catch(i){}if(n(c,"value"))if(h&&(f(a,b)||g(a,b))){var j=a.__proto__;a.__proto__=k,delete a[b],a[b]=c.value,a.__proto__=j}else a[b]=c.value;else{if(!h)throw new TypeError(y);n(c,"get")&&d(a,b,c.get),n(c,"set")&&e(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)n(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(z){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";n(a,b);)b+="?";a[b]=!0;var c=n(a,b);return delete a[b],c}),!Object.keys){var A=!0,B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=B.length;for(var D in{toString:null})A=!1;Object.keys=function I(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var I=[];for(var b in a)n(a,b)&&I.push(b);if(A)for(var c=0,d=C;d>c;c++){var e=B[c];n(a,e)&&I.push(e)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var E="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||E.trim()){E="["+E+"]";var F=new RegExp("^"+E+E+"*"),G=new RegExp(E+E+"*$");String.prototype.trim=function(){return String(this).replace(F,"").replace(G,"")}}var H=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),define("ace/lib/dom",["require","exports","module"],function(a,b){if("undefined"!=typeof document){var c="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||c,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c,d=0;if(b=b||document,b.createStyleSheet&&(c=b.styleSheets)){for(;d<c.length;)if(c[d++].owningElement.id===a)return!0}else if(c=b.getElementsByTagName("style"))for(;d<c.length;)if(c[d++].id===a)return!0;return!1},b.importCssString=function(a,d,e){if(e=e||document,d&&b.hasCssString(d,e))return null;var f;e.createStyleSheet?(f=e.createStyleSheet(),f.cssText=a,d&&(f.owningElement.id=d)):(f=e.createElementNS?e.createElementNS(c,"style"):e.createElement("style"),f.appendChild(e.createTextNode(a)),d&&(f.id=d),b.getDocumentHead(e).appendChild(f))},b.importCssStylsheet=function(a,c){if(c.createStyleSheet)c.createStyleSheet(a);else{var d=b.createElement("link");d.rel="stylesheet",d.href=a,b.getDocumentHead(c).appendChild(d)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"),10)+parseInt(b.computedStyle(a,"paddingRight"),10)+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"),10)+parseInt(b.computedStyle(a,"paddingBottom"),10)+a.clientHeight},void 0!==window.pageYOffset?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),b.computedStyle=window.getComputedStyle?function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(a){var c=b.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var d=b.createElement("ace_outer"),e=d.style;e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",e.display="block",d.appendChild(c);var f=a.documentElement;f.appendChild(d);var g=c.offsetWidth;e.overflow="scroll";var h=c.offsetWidth;return g==h&&(h=d.clientWidth),f.removeChild(d),g-h},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);return c.innerHTML=b,a.parentNode.replaceChild(c,a),c},"textContent"in document.documentElement?(b.setInnerText=function(a,b){a.textContent=b},b.getInnerText=function(a){return a.textContent}):(b.setInnerText=function(a,b){a.innerText=b},b.getInnerText=function(a){return a.innerText}),b.getParentWindow=function(a){return a.defaultView||a.parentWindow}}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(a,b){function c(a,b,c){var h=0;if(h=!e.isOpera||"KeyboardEvent"in window||!e.isMac?0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0):0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0),!e.isMac&&f){if((f[91]||f[92])&&(h|=8),f.altGr){if(3==(3&h))return;f.altGr=0}if(18===c||17===c){var i=b.location||b.keyLocation;if(17===c&&1===i)g=b.timeStamp;else if(18===c&&3===h&&2===i){var j=-g;g=b.timeStamp,j+=g,3>j&&(f.altGr=!0)}}}if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":h=2;break;case"Shift":h=4;break;case"Ctrl":h=1;break;default:h=8}c=0}return 8&h&&(91===c||93===c)&&(c=0),h||13!==c||!b.location&&3!==b.keyLocation||(a(b,h,-c),!b.defaultPrevented)?h||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,h,c):!1:void 0}var d=a("./keys"),e=a("./useragent");a("./dom"),b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c),void 0)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||a.ctrlKey&&e.isMac?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0)},b.addMouseWheelListener=function(a,c){if("onmousewheel"in a){var d=8;b.addListener(a,"mousewheel",function(a){void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/d,a.wheelY=-a.wheelDeltaY/d):(a.wheelX=0,a.wheelY=-a.wheelDelta/d),c(a)})}else"onwheel"in a?b.addListener(a,"wheel",function(a){a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0),c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,f){var g,h,i,j=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!=b.getButton(a)?j=0:a.detail>1?(j++,j>4&&(j=1)):j=1,e.isIE){var c=Math.abs(a.clientX-g)>5||Math.abs(a.clientY-h)>5;c&&(j=1),1==j&&(g=a.clientX,h=a.clientY)}if(d[f]("mousedown",a),j>4)j=0;else if(j>1)return d[f](k[j],a)}),e.isOldIE&&b.addListener(a,"dblclick",function(a){j=2,i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),d[f]("mousedown",a),d[f](k[j],a)})};var f=null,g=0;if(b.addCommandKeyListener=function(a,d){var g=b.addListener;if(e.isOldGecko||e.isOpera&&!("KeyboardEvent"in window)){var h=null;g(a,"keydown",function(a){h=a.keyCode}),g(a,"keypress",function(a){return c(d,a,h)})}else{var i=null;g(a,"keydown",function(a){f[a.keyCode]=!0;var b=c(d,a,a.keyCode);return i=a.defaultPrevented,b}),g(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),g(a,"keyup",function(a){f[a.keyCode]=null}),f||(f=Object.create(null),g(window,"focus",function(){f=Object.create(null)}))}},window.postMessage&&!e.isOldIE){var h=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+h;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame=b.nextFrame?b.nextFrame.bind(window):function(a){setTimeout(a,17)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(a,b){var c=a("./oop"),d=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var b in a.FUNCTION_KEYS){var d=a.FUNCTION_KEYS[b].toLowerCase();a[d]=parseInt(b,10)}return c.mixin(a,a.MODIFIER_KEYS),c.mixin(a,a.PRINTABLE_KEYS),c.mixin(a,a.FUNCTION_KEYS),a.enter=a["return"],a.escape=a.esc,a.del=a["delete"],a[173]="-",a}();c.mixin(b,d),b.keyCodeToString=function(a){return(d[a]||String.fromCharCode(a)).toLowerCase()}}),define("ace/lib/oop",["require","exports","module"],function(a,b){b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c];return a},b.implement=function(a,c){b.mixin(a,c)}}),define("ace/lib/useragent",["require","exports","module"],function(a,b){if(b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS},"object"==typeof navigator){var c=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),d=navigator.userAgent;b.isWin="win"==c,b.isMac="mac"==c,b.isLinux="linux"==c,b.isIE=("Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=window.controllers&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,b.isAIR=d.indexOf("AdobeAIR")>=0,b.isIPad=d.indexOf("iPad")>=0,b.isTouchPad=d.indexOf("TouchPad")>=0}}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/lang"),f=a("./lib/useragent"),g=a("./keyboard/textinput").TextInput,h=a("./mouse/mouse_handler").MouseHandler,i=a("./mouse/fold_handler").FoldHandler,j=a("./keyboard/keybinding").KeyBinding,k=a("./edit_session").EditSession,l=a("./search").Search,m=a("./range").Range,n=a("./lib/event_emitter").EventEmitter,o=a("./commands/command_manager").CommandManager,p=a("./commands/default_commands").commands,q=a("./config"),r=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.commands=new o(f.isMac?"mac":"win",p),this.textInput=new g(a.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new j(this),this.$mouseHandler=new h(this),new i(this),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=e.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(a,b){b._$emitInputEvent.schedule(31)}),this.setSession(b||new k("")),q.resetOptions(this),q._emit("editor",this)};!function(){c.implement(this,n),this.$initOperationListeners=function(){function a(a){return a[a.length-1]}this.selections=[],this.commands.on("exec",function(b){this.startOperation(b);var c=b.command;if("fileJump"==c.group){var d=this.prevOp;d&&"fileJump"==d.command.group||(this.lastFileJumpPos=a(this.selections))}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(a){var b=a.command;return"fileJump"==b.group&&this.lastFileJumpPos&&!this.curOp.selectionChanged?(this.selection.fromJSON(this.lastFileJumpPos),void 0):(this.endOperation(a),void 0)}.bind(this),!0),this.$opResetTimer=e.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(a){if(this.curOp){if(!a||this.curOp.command)return;this.prevOp=this.curOp}a||(this.previousCommand=null,a={}),this.$opResetTimer.schedule(),this.curOp={command:a.command||{},args:a.args},this.selections.push(this.selection.toJSON())},this.endOperation=function(){this.curOp&&(this.prevOp=this.curOp,this.curOp=null)},this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=["backspace","del","insertstring"],d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a){if(a)if("string"==typeof a){this.$keybindingId=a;var b=this;q.loadModule(["keybinding",a],function(c){b.$keybindingId==a&&b.keyBinding.setKeyboardHandler(c&&c.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:a,oldSession:b})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b)var c=new m(b.row,b.column,b.row,b.column+1);else if(a.session.$mode.getMatching)var c=a.session.$mode.getMatching(a.session);c&&(a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text"))},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var b,c=a.data,d=c.range;b=d.start.row==d.end.row&&"insertLines"!=c.action&&"removeLines"!=c.action?d.end.row:1/0,this.renderer.updateLines(d.start.row,b),this._emit("change",a),this.$cursorChange()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var a,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(a=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&(a=!1)),b.$highlightLineMarker&&!a)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&a){var c=new m(a.row,a.column,a.row,1/0);c.id=b.addMarker(c,"ace_active-line","screenLine"),b.$highlightLineMarker=c}else a&&(b.$highlightLineMarker.start.row=a.row,b.$highlightLineMarker.end.row=a.row,b.$highlightLineMarker.start.column=a.column,b._emit("changeBackMarker"))},this.onSelectionChange=function(){var a=this.session;if(a.$selectionMarker&&a.removeMarker(a.$selectionMarker),a.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var b=this.selection.getRange(),c=this.getSelectionStyle();a.$selectionMarker=a.addMarker(b,"ace_selection",c)}var d=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(d),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){this.$readOnly||(this._emit("paste",a),this.insert(a))},this.execCommand=function(a,b){this.commands.exec(a,this,b)},this.insert=function(a){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a!==e.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=e.text)}if("	"==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}}else{var f=this.getSelectionRange();d=this.session.remove(f),this.clearSelection()}if("\n"==a||"\r\n"==a){var g=b.getLine(d.row);if(d.column>g.search(/\S|$/)){var h=g.substr(d.column).search(/\S|$/);b.doc.removeInLine(d.row,d.column,d.column+h)}}this.clearSelection();var i=d.column,j=b.getState(d.row),g=b.getLine(d.row),k=c.checkOutdent(j,g,a);if(b.insert(d,a),e&&e.selection&&(2==e.selection.length?this.selection.setSelectionRange(new m(d.row,i+e.selection[0],d.row,i+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3]))),b.getDocument().isNewLine(a)){var l=c.getNextLineIndent(j,g.slice(0,d.column),b.getTabString());b.insert({row:d.row+1,column:0},l)}k&&c.autoOutdent(j,b,d.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);
-if(0==b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var c,d,e=this.session.getLine(a.row);b<e.length?(c=e.charAt(b)+e.charAt(b-1),d=new m(a.row,b-1,a.row,b+1)):(c=e.charAt(b-1)+e.charAt(b-2),d=new m(a.row,b-2,a.row,b)),this.session.replace(d,c)}}},this.toLowerCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toLowerCase()),this.selection.setSelectionRange(a)},this.toUpperCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toUpperCase()),this.selection.setSelectionRange(a)},this.indent=function(){var a=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last,"	"),void 0}if(b.start.column<b.end.column){var d=a.getTextRange(b);if(!/^\s+$/.test(d)){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last,"	"),void 0}}var f=a.getLine(b.start.row),g=b.start,h=a.getTabSize(),i=a.documentToScreenColumn(g.row,g.column);if(this.session.getUseSoftTabs())var j=h-i%h,k=e.stringRepeat(" ",j);else{for(var j=i%h;" "==f[b.start.column]&&j;)b.start.column--,j--;this.selection.setSelectionRange(b),k="	"}return this.insert(k)},this.blockIndent=function(){var a=this.$getSelectedRows();this.session.indentRows(a.first,a.last,"	")},this.blockOutdent=function(){var a=this.session.getSelection();this.session.outdentRows(a.getRange())},this.sortLines=function(){var a=this.$getSelectedRows(),b=this.session,c=[];for(e=a.first;e<=a.last;e++)c.push(b.getLine(e));c.sort(function(a,b){return a.toLowerCase()<b.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0});for(var d=new m(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex<b;){var e=c.exec(d);if(e.index<=b&&e.index+e[0].length>=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new m(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new m(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var a,b=this.$getSelectedRows();a=0===b.first||b.last+1<this.session.getLength()?new m(b.first,0,b.last+1,0):new m(b.first-1,this.session.getLine(b.first-1).length,b.last,this.session.getLine(b.last).length),this.session.remove(a),this.clearSelection()},this.duplicateSelection=function(){var a=this.selection,b=this.session,c=a.getRange(),d=a.isBackwards();if(c.isEmpty()){var e=c.start.row;b.duplicateLines(e,e)}else{var f=d?c.start:c.end,g=b.insert(f,b.getTextRange(c),!1);c.start=f,c.end=g,a.setSelectionRange(c,d)}},this.moveLinesDown=function(){this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})},this.moveLinesUp=function(){this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})},this.moveText=function(a,b,c){return this.session.moveText(a,b,c)},this.copyLinesUp=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b),0})},this.copyLinesDown=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})},this.$moveLines=function(a){var b=this.selection;if(!b.inMultiSelectMode||this.inVirtualSelectionMode){var c=b.toOrientedRange(),d=this.$getSelectedRows(c),e=a.call(this,d.first,d.last);c.moveBy(e,0),b.fromOrientedRange(c)}else{var f=b.rangeList.ranges;b.rangeList.detach(this.session);for(var g=f.length;g--;){for(var h=g,d=f[g].collapseRows(),i=d.end.row,j=d.start.row;g--;){var d=f[g].collapseRows();if(!(j-d.end.row<=1))break;j=d.end.row}g++;for(var e=a.call(this,j,i);h>=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,1==b?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):0==b&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a){var b=this.getCursorPosition(),c=this.session.getBracketRange(b);if(!c){if(c=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:b.row,column:b.column-1}}),!c)return;var d=c.start;d.row==b.row&&Math.abs(d.column-b.column)<2&&(c=this.session.getBracketRange(d))}d=c&&c.cursor||d,d&&(a?c&&c.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(d.row,d.column):(this.clearSelection(),this.moveCursorTo(d.row,d.column)))},this.gotoLine=function(a,b,c){this.selection.clearSelection(),this.session.unfold({row:a-1,column:b||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowFullyVisible(a-1)||this.scrollToLine(a-1,!0,c)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateRight=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateFileStart=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session),d=0;return c?(this.$tryReplace(c,a)&&(d=1),null!==c&&(this.selection.setSelectionRange(c),this.renderer.scrollSelectionIntoView(c.start,c.end)),d):d},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session),d=0;if(!c.length)return d;this.$blockScrolling+=1;var e=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var f=c.length-1;f>=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,d){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&c.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,d),f):(b.backwards?e.start=e.end:e.end=e.start,this.selection.setRange(e),void 0)},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),0!=b&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(a){if(a!==!1){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&c.isFocused()){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.top<g.height&&f.top+b.top+g.lineHeight>window.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking("smooth"==a),b.isBlinking=!this.$readOnly&&"wide"!=a)}}.call(r.prototype),q.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),b.Editor=r}),define("ace/lib/lang",["require","exports","module"],function(a,b){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var c=/^\s\s*/,d=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(c,"")},b.stringTrimRight=function(a){return a.replace(d,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)b[c]=a[c]&&"object"==typeof a[c]?this.copyObject(a[c]):a[c];return b},b.deepCopy=function(a){if("object"!=typeof a)return a;var b=a.constructor();for(var c in a)b[c]="object"==typeof a[c]?this.deepCopy(a[c]):a[c];return b},b.arrayToMap=function(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=1;return b},b.createMap=function(a){var b=Object.create(null);for(var c in a)b[c]=a[c];return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.escapeHTML=function(a){return a.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},b.getMatchOffsets=function(a,b){var c=[];return a.replace(b,function(a){c.push({offset:arguments[arguments.length-2],length:a.length})}),c},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){return d.cancel(),b=setTimeout(c,a||0),d};return d.schedule=d,d.call=function(){return this.cancel(),a(),d},d.cancel=function(){return clearTimeout(b),b=null,d},d},b.delayedCall=function(a,b){var c=null,d=function(){c=null,a()},e=function(a){c&&clearTimeout(c),c=setTimeout(d,a||b)};return e.delay=e,e.schedule=function(a){null==c&&(c=setTimeout(d,a||0))},e.call=function(){this.cancel(),a()},e.cancel=function(){c&&clearTimeout(c),c=null},e.isPending=function(){return c},e}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("../lib/dom"),f=a("../lib/lang"),g=d.isChrome<18,h=function(a,b){function h(a){if(!p){if(C)b=0,c=a?0:k.value.length-1;else var b=a?2:1,c=2;try{k.setSelectionRange(b,c)}catch(d){}}}function i(){p||(k.value=l,d.isWebKit&&v.schedule())}function j(){setTimeout(function(){q&&(k.style.cssText=q,q=""),null==b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=!0,b.renderer.$moveTextAreaToCursor())},0)}var k=e.createElement("textarea");k.className="ace_text-input",d.isTouchPad&&k.setAttribute("x-palm-disable-auto-cap",!0),k.wrap="off",k.autocorrect="off",k.autocapitalize="off",k.spellcheck=!1,k.style.opacity="0",a.insertBefore(k,a.firstChild);var l="",m=!1,n=!1,o=!1,p=!1,q="",r=!0;try{var s=document.activeElement===k}catch(t){}c.addListener(k,"blur",function(){b.onBlur(),s=!1}),c.addListener(k,"focus",function(){s=!0,b.onFocus(),h()}),this.focus=function(){k.focus()},this.blur=function(){k.blur()},this.isFocused=function(){return s};var u=f.delayedCall(function(){s&&h(r)}),v=f.delayedCall(function(){p||(k.value=l,s&&h())});d.isWebKit||b.addEventListener("changeSelection",function(){b.selection.isEmpty()!=r&&(r=!r,u.schedule())}),i(),s&&b.onFocus();var w=function(a){return 0===a.selectionStart&&a.selectionEnd===a.value.length};if(!k.setSelectionRange&&k.createTextRange&&(k.setSelectionRange=function(a,b){var c=this.createTextRange();c.collapse(!0),c.moveStart("character",a),c.moveEnd("character",b),c.select()},w=function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?b.text==a.value:!1}),d.isOldIE){var x=!1,y=function(a){if(!x){var b=k.value;if(!p&&b&&b!=l){if(a&&b==l[0])return z.schedule();E(b),x=!0,i(),x=!1}}},z=f.delayedCall(y);c.addListener(k,"propertychange",y);var A={13:1,27:1};c.addListener(k,"keyup",function(a){return!p||k.value&&!A[a.keyCode]||setTimeout(L,0),(k.value.charCodeAt(0)||0)<129?z.call():(p?K():J(),void 0)}),c.addListener(k,"keydown",function(){z.schedule(50)})}var B=function(){m?m=!1:n?n=!1:w(k)?(b.selectAll(),h()):C&&h(b.selection.isEmpty())},C=null;this.setInputHandler=function(a){C=a},this.getInputHandler=function(){return C};var D=!1,E=function(a){C&&(a=C(a),C=null),o?(h(),a&&b.onPaste(a),o=!1):a==l.charAt(0)?D&&b.execCommand("del",{source:"ace"}):(a.substring(0,2)==l?a=a.substr(2):a.charAt(0)==l.charAt(0)?a=a.substr(1):a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a&&b.onTextInput(a)),D&&(D=!1)},F=function(){if(!p){var a=k.value;E(a),i()}},G=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCut(),c.preventDefault(a))}f||(m=!0,k.value=d,k.select(),setTimeout(function(){m=!1,i(),h(),b.onCut()}))},H=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCopy(),c.preventDefault(a))}f||(n=!0,k.value=d,k.select(),setTimeout(function(){n=!1,i(),h(),b.onCopy()}))},I=function(a){var e=a.clipboardData||window.clipboardData;if(e){var f=e.getData("Text");f&&b.onPaste(f),d.isIE&&setTimeout(h),c.preventDefault(a)}else k.value="",o=!0};c.addCommandKeyListener(k,b.onCommandKey.bind(b)),c.addListener(k,"select",B),c.addListener(k,"input",F),c.addListener(k,"cut",G),c.addListener(k,"copy",H),c.addListener(k,"paste",I),"oncut"in k&&"oncopy"in k&&"onpaste"in k||c.addListener(a,"keydown",function(a){if((!d.isMac||a.metaKey)&&a.ctrlKey)switch(a.keyCode){case 67:H(a);break;case 86:I(a);break;case 88:G(a)}});var J=function(){p||(p={},b.onCompositionStart(),setTimeout(K,0),b.on("mousedown",L),b.selection.isEmpty()||(b.insert(""),b.session.markUndoGroup(),b.selection.clearSelection()),b.session.markUndoGroup())},K=function(){if(p){var a=k.value.replace(/\x01/g,"");if(p.lastValue!==a&&(b.onCompositionUpdate(a),p.lastValue&&b.undo(),p.lastValue=a,p.lastValue)){var c=b.selection.getRange();b.insert(p.lastValue),b.session.markUndoGroup(),p.range=b.selection.getRange(),b.selection.setRange(c),b.selection.clearSelection()}}},L=function(a){var c=p;p=!1;var d=setTimeout(function(){d=null;var a=k.value.replace(/\x01/g,"");p||(a==c.lastValue?i():!c.lastValue&&a&&(i(),E(a)))});C=function(a){return d&&clearTimeout(d),a=a.replace(/\x01/g,""),a==c.lastValue?"":(c.lastValue&&d&&b.undo(),a)},b.onCompositionEnd(),b.removeListener("mousedown",L),"compositionend"==a.type&&c.range&&b.selection.setRange(c.range)},M=f.delayedCall(K,50);if(c.addListener(k,"compositionstart",J),d.isGecko?c.addListener(k,"text",function(){M.schedule()}):(c.addListener(k,"keyup",function(){M.schedule()}),c.addListener(k,"keydown",function(){M.schedule()})),c.addListener(k,"compositionend",L),this.getElement=function(){return k},this.setReadOnly=function(a){k.readOnly=a},this.onContextMenu=function(a){D=!0,q||(q=k.style.cssText),k.style.cssText="z-index:100000;"+(d.isIE?"opacity:0.1;":""),h(b.selection.isEmpty()),b._emit("nativecontextmenu",{target:b,domEvent:a});var f=b.container.getBoundingClientRect(),g=e.computedStyle(b.container),i=f.top+(parseInt(g.borderTopWidth)||0),l=f.left+(parseInt(f.borderLeftWidth)||0),m=f.bottom-i-k.clientHeight,n=function(a){k.style.left=a.clientX-l-2+"px",k.style.top=Math.min(a.clientY-i-2,m)+"px"};n(a),"mousedown"==a.type&&(b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=null),d.isWin&&c.capture(b.container,n,j))},this.onContextMenuClose=j,!d.isGecko||d.isMac){var N=function(a){b.textInput.onContextMenu(a),j()};c.addListener(b.renderer.scroller,"contextmenu",N),c.addListener(k,"contextmenu",N)}};b.TextInput=h}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("./default_handlers").DefaultHandlers,f=a("./default_gutter_handler").GutterHandler,g=a("./mouse_event").MouseEvent,h=a("./dragdrop_handler").DragdropHandler,i=a("../config"),j=function(a){this.editor=a,new e(this),new f(this),new h(this);var b=a.renderer.getMouseEventTarget();c.addListener(b,"click",this.onMouseEvent.bind(this,"click")),c.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove")),c.addMultiMouseDownListener(b,[300,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(c.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[300,300,250],this,"onMouseEvent"),c.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[300,300,250],this,"onMouseEvent")),c.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var d=a.renderer.$gutter;c.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),c.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick")),c.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),c.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),c.addListener(b,"mousedown",function(){a.focus()}),c.addListener(d,"mousedown",function(b){return a.focus(),c.preventDefault(b)})};!function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new g(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new g(b,this.editor))},this.onMouseWheel=function(a,b){var c=new g(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var e=this.editor.renderer;e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=null);var f=this,g=function(a){f.x=a.clientX,f.y=a.clientY,b&&b(a)},h=function(a){clearInterval(j),i(),f[f.state+"End"]&&f[f.state+"End"](a),f.$clickSelection=null,null==e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=!0,e.$moveTextAreaToCursor()),f.isMousePressed=!1,f.onMouseEvent("mouseup",a)},i=function(){f[f.state]&&f[f.state]()};if(d.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){h(a)});c.capture(this.editor.container,g,h);var j=setInterval(i,20)}}.call(j.prototype),i.defineOptions(j.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0}}),b.MouseHandler=j}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){a.$clickSelection=null;var b=a.editor;b.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),b.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),b.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),b.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),b.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var c=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];c.forEach(function(b){a[b]=this[b]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}function e(a,b){if(a.start.row==a.end.row)var c=2*b.column-a.start.column-a.end.column;else if(a.start.row!=a.end.row-1||a.start.column||a.end.column)var c=2*b.row-a.start.row-a.end.row;else var c=b.column-4;return 0>c?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}a("../lib/dom"),a("../lib/event"),a("../lib/useragent");var f=0;!function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&(d.moveCursorToPosition(c),d.selection.clearSelection()),d.textInput.onContextMenu(a.domEvent),void 0}return!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(!b||this.$clickSelection||a.getShiftKey()||d.inMultiSelectMode?this.startSelect(c):b&&(this.mousedownEvent.time=(new Date).getTime(),this.startSelect(c)),this.captureMouse(a),a.preventDefault()):(this.mousedownEvent.time=(new Date).getTime(),this.setState("focusWait"),this.captureMouse(a),void 0)},this.startSelect=function(a){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var b=this.editor;setTimeout(function(){this.mousedownEvent.getShiftKey()?b.selection.selectToPosition(a):this.$clickSelection||(b.moveCursorToPosition(a),b.selection.clearSelection())}.bind(this),0),b.renderer.scroller.setCapture&&b.renderer.scroller.setCapture(),b.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var f=e(this.$clickSelection,c);c=f.cursor,a=f.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),f=c.selection[a](d.row,d.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(f.start),h=this.$clickSelection.comparePoint(f.end);if(-1==g&&0>=h)b=this.$clickSelection.end,(f.end.row!=d.row||f.end.column!=d.column)&&(d=f.start);else if(1==h&&g>=0)b=this.$clickSelection.start,(f.start.row!=d.row||f.start.column!=d.column)&&(d=f.end);else if(-1==g&&1==h)d=f.end,b=f.start;else{var i=e(this.$clickSelection,d);d=i.cursor,b=i.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=(new Date).getTime();(a>f||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);return e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.$clickSelection=e,this.setState("select"),void 0):(this.$clickSelection=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords"),void 0)},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines"),this.$clickSelection=c.selection.getLineRange(b.row)},this.onQuadClick=function(){var a=this.editor;a.selectAll(),this.$clickSelection=a.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getShiftKey()&&!a.getAccelKey()){var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}.call(c.prototype),b.DefaultHandlers=c}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(a,b){function c(a){function b(){l=d.createElement("div"),l.className="ace_gutter-tooltip",l.style.display="none",h.container.appendChild(l)}function c(){l||b();var a=k.getDocumentPosition().row,c=i.$annotations[a];if(!c)return f();var d=h.session.getLength();if(a==d){var e=h.renderer.pixelToScreenCoordinates(0,k.y).row,j=k.$pos;if(e>h.session.documentToScreenRow(j.row,j.column))return f()}m!=c&&(m=c.text.join("<br/>"),l.style.display="block",l.innerHTML=m,h.on("mousewheel",f),g(k))}function f(){j&&(j=clearTimeout(j)),m&&(l.style.display="none",m=null,h.removeEventListener("mousewheel",f))}function g(a){var b=h.renderer.$gutter.getBoundingClientRect();if(l.style.left=a.x+15+"px",a.y+3*h.renderer.lineHeight+15<b.bottom)l.style.bottom="",l.style.top=a.y+15+"px";else{l.style.top="";var c=window.innerHeight||document.documentElement.clientHeight;l.style.bottom=c-a.y+5+"px"}}var h=a.editor,i=h.renderer.$gutterLayer;
-a.editor.setDefaultHandler("guttermousedown",function(b){if(h.isFocused()&&0==b.getButton()){var c=i.getRegion(b);if("foldWidgets"!=c){var d=b.getDocumentPosition().row,e=h.session.selection;if(b.getShiftKey())e.selectTo(d,0);else{if(2==b.domEvent.detail)return h.selectAll(),b.preventDefault();a.$clickSelection=h.selection.getLineRange(d)}return a.setState("selectByLines"),a.captureMouse(b),b.preventDefault()}}});var j,k,l,m;a.editor.setDefaultHandler("guttermousemove",function(b){var e=b.domEvent.target||b.domEvent.srcElement;return d.hasCssClass(e,"ace_fold-widget")?f():(m&&g(b),k=b,j||(j=setTimeout(function(){j=null,k&&!a.isMousePressed?c():f()},50)),void 0)}),e.addListener(h.renderer.$gutter,"mouseout",function(){k=null,m&&!j&&(j=setTimeout(function(){j=null,f()},50))}),h.on("changeSession",f)}var d=a("../lib/dom"),e=a("../lib/event");b.GutterHandler=c}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){c.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){c.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return c.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=d.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(e.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){function b(a,b){var c=(new Date).getTime(),e=!b||a.row!=b.row,f=!b||a.column!=b.column;if(!C||e||f)q.$blockScrolling+=1,q.moveCursorToPosition(a),q.$blockScrolling-=1,C=c,D={x:u,y:v};else{var g=d(D.x,D.y,u,v);g>j?C=null:c-C>=i&&(q.renderer.scrollCursorIntoView(),C=null)}}function c(a,b){var c=(new Date).getTime(),d=q.renderer.layerConfig.lineHeight,e=q.renderer.layerConfig.characterWidth,f=q.renderer.scroller.getBoundingClientRect(),g={x:{left:u-f.left,right:f.right-u},y:{top:v-f.top,bottom:f.bottom-v}},i=Math.min(g.x.left,g.x.right),j=Math.min(g.y.top,g.y.bottom),k={row:a.row,column:a.column};2>=i/e&&(k.column+=g.x.left<g.x.right?-3:2),1>=j/d&&(k.row+=g.y.top<g.y.bottom?-1:1);var l=a.row!=k.row,m=a.column!=k.column,n=!b||a.row!=b.row;l||m&&!n?B?c-B>=h&&q.renderer.scrollCursorIntoView(k):B=c:B=null}function k(){var a=y;y=q.renderer.screenToTextCoordinates(u,v),b(y,a),c(y,a)}function l(){x=q.selection.toOrientedRange(),t=q.session.addMarker(x,"ace_selection",q.getSelectionStyle()),q.clearSelection(),q.isFocused()&&q.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),w=setInterval(k,20),F=0,f.addListener(document,"mousemove",n)}function m(){clearInterval(w),q.session.removeMarker(t),t=null,q.$blockScrolling+=1,q.selection.fromOrientedRange(x),q.$blockScrolling-=1,q.isFocused()&&!A&&q.renderer.$cursorLayer.setBlinking(!q.getReadOnly()),x=null,F=0,B=null,C=null,f.removeListener(document,"mousemove",n)}function n(){null==G&&(G=setTimeout(function(){null!=G&&t&&m()},20))}function o(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function p(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=g.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var f="none";return d&&b.indexOf(e)>=0?f="copy":c.indexOf(e)>=0?f="move":b.indexOf(e)>=0&&(f="copy"),f}var q=a.editor,r=e.createElement("img");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g.isOpera&&(r.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(b){a[b]=this[b]},this),q.addEventListener("mousedown",this.onMouseDown.bind(a));var t,u,v,w,x,y,z,A,B,C,D,E=q.container,F=0;this.onDragStart=function(a){if(this.cancelDrag||!E.draggable){var b=this;return setTimeout(function(){b.startSelect(),b.captureMouse(a)},0),a.preventDefault()}x=q.getSelectionRange();var c=a.dataTransfer;c.effectAllowed=q.getReadOnly()?"copy":"copyMove",g.isOpera&&(q.container.appendChild(r),r._top=r.offsetTop),c.setDragImage&&c.setDragImage(r,0,0),g.isOpera&&q.container.removeChild(r),c.clearData(),c.setData("Text",q.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(a){if(E.draggable=!1,A=!1,this.setState(null),!q.getReadOnly()){var b=a.dataTransfer.dropEffect;z||"move"!=b||q.session.remove(q.getSelectionRange()),q.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||l(),F++,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragOver=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||(l(),F++),null!==G&&(G=null),u=a.clientX,v=a.clientY,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragLeave=function(a){return F--,0>=F&&t?(m(),z=null,f.preventDefault(a)):void 0},this.onDrop=function(a){if(t){var b=a.dataTransfer;if(A)switch(z){case"move":x=x.contains(y.row,y.column)?{start:y,end:y}:q.moveText(x,y);break;case"copy":x=q.moveText(x,y,!0)}else{var c=b.getData("Text");x={start:y,end:q.session.insert(y,c)},q.focus(),z=null}return m(),f.preventDefault(a)}},f.addListener(E,"dragstart",this.onDragStart.bind(a)),f.addListener(E,"dragend",this.onDragEnd.bind(a)),f.addListener(E,"dragenter",this.onDragEnter.bind(a)),f.addListener(E,"dragover",this.onDragOver.bind(a)),f.addListener(E,"dragleave",this.onDragLeave.bind(a)),f.addListener(E,"drop",this.onDrop.bind(a));var G=null}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var e=a("../lib/dom"),f=a("../lib/event"),g=a("../lib/useragent"),h=200,i=200,j=5;!function(){this.dragWait=function(){var a=(new Date).getTime()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor.container;a.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(){var a=this.editor.container;if(g.isIE&&"dragReady"==this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>3&&a.dragDrop()}if("dragWait"===this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>0&&(a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){this.mousedownEvent.time=(new Date).getTime();var f=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),b.getDragDelay()){if(g.isWebKit){self.cancelDrag=!0;var h=b.container;h.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}.call(c.prototype),b.DragdropHandler=c}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(a,b,c){"no use strict";function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var e=a("./lib/lang"),f=a("./lib/oop"),g=a("./lib/net"),h=a("./lib/event_emitter").EventEmitter,i=function(){return this}(),j={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return j[a]},b.set=function(a,b){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);j[a]=b},b.all=function(){return e.copyObject(j)},f.implement(b,h),b.moduleUrl=function(a,b){if(j.$moduleUrls[a])return j.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=j[b+"Path"];return null==g?g=j.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return j.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,f;Array.isArray(c)&&(f=c[0],c=c[1]);try{e=a(c)}catch(h){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var i=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?(g.loadScript(b.moduleUrl(c,f),i),void 0):i()}},b.init=function(){if(j.packaged=a.packaged||c.packaged||i.define&&define.packaged,!i.document)return"";for(var e={},f="",g=document.getElementsByTagName("script"),h=0;h<g.length;h++){var k=g[h],l=k.src||k.getAttribute("src");if(l){for(var m=k.attributes,n=0,o=m.length;o>n;n++){var p=m[n];0===p.name.indexOf("data-ace-")&&(e[d(p.name.replace(/^data-ace-/,""))]=p.value)}var q=l.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);q&&(f=q[1])}}f&&(e.base=e.base||f,e.packaged=!0),e.basePath=e.base,e.workerPath=e.workerPath||e.base,e.modePath=e.modePath||e.base,e.themePath=e.themePath||e.base,delete e.base;for(var r in e)"undefined"!=typeof e[r]&&b.set(r,e[r])};var k={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return"undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0;if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0)}},l={};b.defineOptions=function(a,b,c){return a.$options||(l[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),f.implement(a,k),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value)})},b.setDefaultValue=function(a,c,d){var e=l[a]||(l[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var d=c.getDocumentHead(),e=document.createElement("script");e.src=a,d.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}}}),define("ace/lib/event_emitter",["require","exports","module"],function(a,b){var c={},d=function(){this.propagationStopped=!0},e=function(){this.defaultPrevented=!0};c._emit=c._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],f=this._defaultHandlers[a];if(c.length||f){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=d),b.preventDefault||(b.preventDefault=e),c=c.slice();for(var g=0;g<c.length&&(c[g](b,this),!b.propagationStopped);g++);return f&&!b.defaultPrevented?f(b,this):void 0}},c._signal=function(a,b){var c=(this._eventRegistry||{})[a];if(c){c=c.slice();for(var d=0;d<c.length;d++)c[d](b,this)}},c.once=function(a,b){var c=this;b&&this.addEventListener(a,function d(){c.removeEventListener(a,d),b.apply(null,arguments)})},c.setDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c||(c=this._defaultHandlers={_disabled_:{}}),c[a]){var d=c[a],e=c._disabled_[a];e||(c._disabled_[a]=e=[]),e.push(d);var f=e.indexOf(b);-1!=f&&e.splice(f,1)}c[a]=b},c.removeDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c){var d=c._disabled_[a];if(c[a]==b)c[a],d&&this.setDefaultHandler(a,d.pop());else if(d){var e=d.indexOf(b);-1!=e&&d.splice(e,1)}}},c.on=c.addEventListener=function(a,b,c){this._eventRegistry=this._eventRegistry||{};var d=this._eventRegistry[a];return d||(d=this._eventRegistry[a]=[]),-1==d.indexOf(b)&&d[c?"unshift":"push"](b),b},c.off=c.removeListener=c.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}},c.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(a,b){function c(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){var d=g.start.row,h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=c}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b){var c=a("../lib/keys"),d=a("../lib/event"),e=function(a){this.$editor=a,this.$data={},this.$handlers=[],this.setDefaultHandler(a.commands)};!function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,e){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,e),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,e),g&&e&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&d.stopEvent(e),g))););return g},this.onCommandKey=function(a,b,d){var e=c.keyCodeToString(d);this.$callKeyboardHandlers(b,e,d,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}.call(e.prototype),b.KeyBinding=e}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./config"),f=a("./lib/event_emitter").EventEmitter,g=a("./selection").Selection,h=a("./mode/text").Mode,i=a("./range").Range,j=a("./document").Document,k=a("./background_tokenizer").BackgroundTokenizer,l=a("./search_highlight").SearchHighlight,m=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new j(a)),this.setDocument(a),this.selection=new g(this),e.resetOptions(this),this.setMode(b),e._emit("session",this)};!function(){function b(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}c.implement(this,f),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],this.$screenRowCache=[],void 0;var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(b),this._emit("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var c,d=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=d.length-1,e=this.getLine(a).length;else for(var f=0;f<d.length&&(e+=d[f].value.length,!(e>=b));f++);return(c=d[f])?(c.index=f,c.start=e-c.value.length,c):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=d.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?d.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&0==a.column%this.$tabSize},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(a,b){void 0===b&&(b="ace_breakpoint"),b?this.$breakpoints[a]=b:delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(a){delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.addMarker=function(a,b,c,d){var e=this.$markerId++,f={range:a,type:c||"line",renderer:"function"==typeof c?c:null,clazz:b,inFront:!!d,id:e};return d?(this.$frontMarkers[e]=f,this._emit("changeFrontMarker")):(this.$backMarkers[e]=f,this._emit("changeBackMarker")),e},this.addDynamicMarker=function(a,b){if(a.update){var c=this.$markerId++;return a.id=c,a.inFront=!!b,b?(this.$frontMarkers[c]=a,this._emit("changeFrontMarker")):(this.$backMarkers[c]=a,this._emit("changeBackMarker")),a}},this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(b){var c=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete c[a],this._emit(b.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},this.highlight=function(a){if(!this.$searchHighlight){var b=new l(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(a)},this.highlightLines=function(a,b,c,d){"number"!=typeof b&&(c=b,b=a),c||(c="ace_step");var e=new i(a,0,b,1/0);return e.id=this.addMarker(e,c,"fullLine",d),e},this.setAnnotations=function(a){this.$annotations=a,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getWordRange=function(a,b){var c=this.getLine(a),d=!1;if(b>0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;g<c.length&&c.charAt(g).match(e);)g++;return new i(a,f,a,g)},this.getAWordRange=function(a,b){for(var c=this.getWordRange(a,b),d=this.getLine(c.end.row);d.charAt(c.end.column).match(/[ \t]/);)c.end.column+=1;return c},this.setNewLineMode=function(a){this.doc.setNewLineMode(a)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(a){this.setOption("useWorker",a)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(a){var b=a.data;this.bgTokenizer.start(b.first),this._emit("tokenizerUpdate",a)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(a,b){if(a&&"object"==typeof a){if(a.getTokenizer)return this.$onChangeMode(a);var c=a,d=c.path}else d=a||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[d]&&!c?(this.$onChangeMode(this.$modes[d]),b&&b(),void 0):(this.$modeId=d,e.loadModule(["mode",d],function(a){return this.$modeId!==d?b&&b():this.$modes[d]&&!c?this.$onChangeMode(this.$modes[d]):(a&&a.Mode&&(a=new a.Mode(c),c||(this.$modes[d]=a,a.$id=d),this.$onChangeMode(a),b&&b()),void 0)}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0),void 0)},this.$onChangeMode=function(a,b){if(b||(this.$modeId=a.$id),this.$mode!==a){this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var c=a.getTokenizer();if(void 0!==c.addEventListener){var d=this.onReloadTokenizer.bind(this);c.addEventListener("update",d)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(c);else{this.bgTokenizer=new k(c);var e=this;this.bgTokenizer.addEventListener("update",function(a){e._emit("tokenizerUpdate",a)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,this.$options.wrapMethod.set.call(this,this.$wrapMethod),b||(this.$setFolding(a.foldingRules),this._emit("changeMode"),this.bgTokenizer.start(0))}},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if("undefined"==typeof Worker||a.noWorker)this.$worker=null;else try{this.$worker=this.$mode.createWorker(this)}catch(b){console.log("Could not load worker"),console.log(b),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(a){this.$scrollTop===a||isNaN(a)||(this.$scrollTop=a,this._signal("changeScrollTop",a))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(a){this.$scrollLeft===a||isNaN(a)||(this.$scrollLeft=a,this._signal("changeScrollLeft",a))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;d<a.length;d++){var e=a[d];"doc"==e.group&&(this.doc.applyDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!1,c))}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.setUndoSelect=function(a){this.$undoSelect=a},this.$getUndoSelection=function(a,b,c){function d(a){var c="insertText"===a.action||"insertLines"===a.action;return b?!c:c}var e,f,g=a[0],h=!1;d(g)?(e=i.fromPoints(g.range.start,g.range.end),h=!0):(e=i.fromPoints(g.range.start,g.range.start),h=!1);for(var j=1;j<a.length;j++)g=a[j],d(g)?(f=g.range.start,-1==e.compare(f.row,f.column)&&e.setStart(g.range.start),f=g.range.end,1==e.compare(f.row,f.column)&&e.setEnd(g.range.end),h=!0):(f=g.range.start,-1==e.compare(f.row,f.column)&&(e=i.fromPoints(g.range.start,g.range.start)),h=!1);if(null!=c){0==i.comparePoints(c.start,e.start)&&(c.start.column+=e.end.column-e.start.column,c.end.column+=e.end.column-e.start.column);var k=c.compareRange(e);1==k?e.setStart(c.start):-1==k&&e.setEnd(c.end)}return e},this.replace=function(a,b){return this.doc.replace(a,b)},this.moveText=function(a,b,c){var d=this.getTextRange(a),e=this.getFoldsInRange(a),f=i.fromPoints(b,b);if(!c){this.remove(a);var g=a.start.row-a.end.row,h=g?-a.end.column:a.start.column-a.end.column;h&&(f.start.row==a.end.row&&f.start.column>a.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var j=a.start,k=f.start,g=k.row-j.row,h=k.column-j.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==j.row&&(a.start.column+=h),a.end.row==j.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new i(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&"	"==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new i(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);
-var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=[];for(var c=0;b>c;c++)this.$wrapData.push([]);this.$updateWrapData(0,b-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._emit("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b,c=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,b=a.data.lines?a.data.lines.length:f-e):b=f-e,this.$updating=!0,0!=b)if(-1!=d.indexOf("remove")){this[c?"$wrapData":"$rowLengthCache"].splice(e,b);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-b);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=h.row&&k.shiftRow(-b)}f=e}else{var n;if(c){n=[e,0];for(var o=0;b>o;o++)n.push([]);this.$wrapData.splice.apply(this.$wrapData,n)}else n=Array(b),n.unshift(e,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k.shiftRow(b),k.addRemoveChars(f,0,h.column-g.column)):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(b)),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=e&&k.shiftRow(b)}}else{b=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),b=-b);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,b)}return c&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,c?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var c,d,e=this.doc.getAllLines(),f=this.getTabSize(),g=this.$wrapData,h=this.$wrapLimit,i=a;for(b=Math.min(b,e.length-1);b>=i;)d=this.getFoldLine(i,d),d?(c=[],d.walk(function(a,b,d,f){var g;if(null!=a){g=this.$getDisplayTokens(a,c.length),g[0]=m;for(var h=1;h<g.length;h++)g[h]=n}else g=this.$getDisplayTokens(e[b].substring(f,d),c.length);c=c.concat(g)}.bind(this),d.end.row,e[d.end.row].length+1),g[d.start.row]=this.$computeWrapSplits(c,h,f),i=d.end.row+1):(c=this.$getDisplayTokens(e[i]),g[i]=this.$computeWrapSplits(c,h,f),i++)};var g=1,j=2,m=3,n=4,o=9,p=10,q=11,r=12;this.$computeWrapSplits=function(a,b){function c(b){var c=a.slice(f,b),e=c.length;c.join("").replace(/12/g,function(){e-=1}).replace(/2/g,function(){e-=1}),g+=e,d.push(g),f=b}if(0==a.length)return[];for(var d=[],e=a.length,f=0,g=0,h=this.$wrapAsCode;e-f>b;){var i=f+b;if(a[i-1]>=p&&a[i]>=p)c(i);else if(a[i]!=m&&a[i]!=n){for(var j=Math.max(i-(h?10:b-(b>>2)),f-1);i>j&&a[i]<m;)i--;if(h){for(;i>j&&a[i]<m;)i--;for(;i>j&&a[i]==o;)i--}else for(;i>j&&a[i]<p;)i--;i>j?c(++i):(i=f+b,c(i))}else{for(i;i!=f-1&&a[i]!=m;i--);if(i>f){c(i);continue}for(i=f+b;i<a.length&&a[i]==n;i++);if(i==a.length)break;c(i)}}return d},this.$getDisplayTokens=function(a,c){var d,e=[];c=c||0;for(var f=0;f<a.length;f++){var h=a.charCodeAt(f);if(9==h){d=this.getScreenTabSize(e.length+c),e.push(q);for(var i=1;d>i;i++)e.push(r)}else 32==h?e.push(p):h>39&&48>h||h>57&&64>h?e.push(o):h>=4352&&b(h)?e.push(g,j):e.push(g)}return e},this.$getStringScreenWidth=function(a,c,d){if(0==c)return[0,0];null==c&&(c=1/0),d=d||0;var e,f;for(f=0;f<a.length&&(e=a.charCodeAt(f),d+=9==e?this.getScreenTabSize(d):e>=4352&&b(e)?2:1,!(d>c));f++);return[d,f]},this.getRowLength=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,d,e=0,f=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],e=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(e),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(e),!(g+h-1>=a||e>=m));)g+=h,e++,e>o&&(e=n.end.row+1,n=this.getNextFoldLine(e,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(e),this.$screenRowCache.push(g));if(n&&n.start.row<=e)c=this.getFoldDisplayLine(n),e=n.start.row;else{if(a>=g+h||e>m)return{row:m,column:this.getLine(m).length};c=this.getLine(e),n=null}if(this.$useWrapMode){var p=this.$wrapData[e];p&&(d=p[a-g],a>g&&p.length&&(f=p[a-g-1]||p[p.length-1],c=c.substring(f)))}return f+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&f>=d&&(f=d-1),n?n.idxToPosition(f):{row:e,column:f}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){for(var p=this.$wrapData[e],q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var c=this.$wrapData.length,d=0,e=0,b=this.$foldData[e++],f=b?b.start.row:1/0;c>d;)a+=this.$wrapData[d].length+1,d++,d>f&&(d=b.end.row+1,b=this.$foldData[e++],f=b?b.start.row:1/0);else{a=this.getLength();for(var g=this.$foldData,e=0;e<g.length;e++)b=g[e],a-=b.end.row-b.start.row}return a}}.call(m.prototype),a("./edit_session/folding").Folding.call(m.prototype),a("./edit_session/bracket_match").BracketMatch.call(m.prototype),e.defineOptions(m.prototype,"session",{wrap:{set:function(a){if(a&&"off"!=a?"free"==a?a=!0:"printMargin"==a?a=-1:"string"==typeof a&&(a=parseInt(a,10)||!1):a=!1,this.$wrap!=a){if(a){var b="number"==typeof a?a:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1);this.$wrap=a}},get:function(){return this.getUseWrapMode()?this.getWrapLimitRange().min||"free":"off"},handlesSet:!0},wrapMethod:{set:function(a){this.$wrapAsCode="auto"==a?"text"!=this.$mode.type:"text"!=a},initialValue:"auto"},firstLineNumber:{set:function(){this._emit("changeBreakpoint")},initialValue:1},useWorker:{set:function(a){this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(a){isNaN(a)||this.$tabSize===a||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=a,this._emit("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(){this._emit("changeOverwrite")},initialValue:!1},newLineMode:{set:function(a){this.doc.setNewLineMode(a)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0}}),b.EditSession=m}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.lead.on("change",function(a){b._emit("changeCursor"),b.$isEmpty||b._emit("changeSelection"),b.$keepDesiredColumnOnChange||a.old.column==a.value.column||(b.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){b.$isEmpty||b._emit("changeSelection")})};!function(){c.implement(this,e),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(a,b){this.anchor.setPosition(a,b),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(a){if(this.$isEmpty)return this.moveCursorTo(this.lead.row,this.lead.column+a),void 0;var b=this.getSelectionAnchor(),c=this.getSelectionLead(),d=this.isBackwards();d&&0===b.column||this.setSelectionAnchor(b.row,b.column+a),(d||0!==c.column)&&this.$moveSelection(function(){this.moveCursorTo(c.row,c.column+a)})},this.isBackwards=function(){var a=this.anchor,b=this.lead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?f.fromPoints(b,b):this.isBackwards()?f.fromPoints(b,a):f.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var c,d="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(d);return e?(d=e.start.row,c=e.end.row):c=d,b===!0?new f(d,0,c,this.session.getLine(c).length):new f(d,0,c+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(0==b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column-c,b.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),b=this.lead;this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column,b.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.lead.row,b=this.lead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b||this.session.$useEmacsStyleLineStart||(d.column+=f[0].length),this.moveCursorToPosition(d)},this.moveCursorLineEnd=function(){var a=this.lead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==b.column){var c=this.session.getLine(b.row);if(b.column==c.length){var d=c.search(/\s+$/);d>0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a,b=this.lead.row,c=this.lead.column,d=this.doc.getLine(b),e=d.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(b,c,1);return f?(this.moveCursorTo(f.end.row,f.end.column),void 0):((a=this.session.nonTokenRe.exec(e))&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=d.substring(c)),c>=d.length?(this.moveCursorTo(b,d.length),this.moveCursorRight(),b<this.doc.getLength()-1&&this.moveCursorWordRight(),void 0):((a=this.session.tokenRe.exec(e))&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0))},this.moveCursorLongWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column),void 0;var e=this.session.getFoldStringAt(b,c,-1);null==e&&(e=this.doc.getLine(b).substring(0,c));var f,g=d.stringReverse(e);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(f=this.session.nonTokenRe.exec(g))&&(c-=this.session.nonTokenRe.lastIndex,g=g.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=c?(this.moveCursorTo(b,0),this.moveCursorLeft(),b>0&&this.moveCursorWordLeft(),void 0):((f=this.session.tokenRe.exec(g))&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0)},this.$shortWordEndIndex=function(a){var b,c,d=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))d=this.session.tokenRe.lastIndex;else{for(;(c=a[d])&&e.test(c);)d++;if(1>d)for(f.lastIndex=0;(c=a[d])&&!f.test(c);)if(f.lastIndex=0,d++,e.test(c)){if(d>2){d--;break}for(;(c=a[d])&&e.test(c);)d++;if(d>2)break}}return f.lastIndex=0,d},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var e=this.session.getLine(b).substring(0,c);if(0==c){do b--,e=this.doc.getLine(b);while(b>0&&/^\s*$/.test(e));c=e.length,/\s+$/.test(e)||(e="")}var f=d.stringReverse(e),g=this.$shortWordEndIndex(f);return this.moveCursorTo(b,c-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=f.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}.call(g.prototype),b.Selection=g}),define("ace/range",["require","exports","module"],function(a,b){var c=function(a,b){return a.row-b.row||a.column-b.column},d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};!function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?a<this.start.row?-1:a>this.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:b<this.start.column?-1:b>this.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.row<a)var c={row:a,column:0};if(this.start.row>b)var e={row:b+1,column:0};else if(this.start.row<a)var e={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(0==c)return this;if(-1==c)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return d.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)},this.moveBy=function(a,b){this.start.row+=a,this.start.column+=b,this.end.row+=a,this.end.column+=b}}.call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},d.comparePoints=c,d.comparePoints=function(a,b){return a.row-b.row||a.column-b.column},b.Range=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b){var c=a("../tokenizer").Tokenizer,d=a("./text_highlight_rules").TextHighlightRules,e=a("./behaviour").Behaviour,f=a("../unicode"),g=a("../lib/lang"),h=a("../token_iterator").TokenIterator,i=a("../range").Range,j=function(){this.HighlightRules=d,this.$behaviour=new e};!function(){this.tokenRe=new RegExp("^["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new c(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function e(a){for(var b=c;d>=b;b++)a(f.getLine(b),b)}var f=b.doc,h=!0,i=!0,j=1/0,k=b.getTabSize(),l=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var m=this.lineCommentStart.map(g.escapeRegExp).join("|"),n=this.lineCommentStart[0];else var m=g.escapeRegExp(this.lineCommentStart),n=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),l=b.getUseSoftTabs();var o=function(a,b){var c=a.match(m);if(c){var d=c[1].length,e=c[0].length;s(a,d,e)||" "!=c[0][e-1]||e--,f.removeInLine(b,d,e)}},p=n+" ",q=function(a,b){(!h||/\S/.test(a))&&(s(a,j,j)?f.insertInLine({row:b,column:j},p):f.insertInLine({row:b,column:j},n))},r=function(a){return m.test(a)},s=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(0!=d%k)return!1;for(var d=0;" "==a.charAt(c++);)d++;return k>2?d%k!=k-1:0==d%k}}else{if(!this.blockComment)return!1;var n=this.blockComment.start,t=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+g.escapeRegExp(n)+")"),u=new RegExp("(?:"+g.escapeRegExp(t)+")\\s*$"),q=function(a,b){r(a,b)||(!h||/\S/.test(a))&&(f.insertInLine({row:b,column:a.length},t),f.insertInLine({row:b,column:j},n))},o=function(a,b){var c;(c=a.match(u))&&f.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(m))&&f.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(m.test(a))return!0;for(var d=b.getTokens(c),e=0;e<d.length;e++)if("comment"===d[e].type)return!0}}var v=1/0;e(function(a,b){var c=a.search(/\S/);-1!==c?(j>c&&(j=c),i&&!r(a,b)&&(i=!1)):v>a.length&&(v=a.length)}),1/0==j&&(j=v,h=!1,i=!1),l&&0!=j%k&&(j=Math.floor(j/k)*k),e(i?o:q)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f=new h(b,d.row,d.column),g=f.getCurrentToken();b.selection;var j,k,l=b.selection.toOrientedRange();if(g&&/comment/.test(g.type)){for(var m,n;g&&/comment/.test(g.type);){var o=g.value.indexOf(e.start);if(-1!=o){var p=f.getCurrentTokenRow(),q=f.getCurrentTokenColumn()+o;m=new i(p,q,p,q+e.start.length);break}g=f.stepBackward()}for(var f=new h(b,d.row,d.column),g=f.getCurrentToken();g&&/comment/.test(g.type);){var o=g.value.indexOf(e.end);if(-1!=o){var p=f.getCurrentTokenRow(),q=f.getCurrentTokenColumn()+o;n=new i(p,q,p,q+e.end.length);break}g=f.stepForward()}n&&b.remove(n),m&&(b.remove(m),j=m.start.row,k=-e.start.length)}else k=e.start.length,j=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);l.start.row==j&&(l.start.column+=k),l.end.row==j&&(l.end.column+=k),b.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(a,b){return this.$getIndent(b)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;b<c.length;b++)!function(a){var d=c[b],e=a[d];a[c[b]]=function(){return this.$delegator(d,arguments,e)}}(this)},this.$delegator=function(a,b,c){var d=b[0];"string"!=typeof d&&(d=d[0]);for(var e=0;e<this.$embeds.length;e++)if(this.$modes[this.$embeds[e]]){var f=d.split(this.$embeds[e]);if(!f[0]&&f[1]){b[0]=f[1];var g=this.$modes[this.$embeds[e]];return g[a].apply(g,b)}}var h=c.apply(this,b);return c?h:void 0},this.transformAction=function(a,b){if(this.$behaviour){var c=this.$behaviour.getBehaviours();for(var d in c)if(c[d][b]){var e=c[d][b].apply(this,arguments);if(e)return e}}},this.getKeywords=function(a){if(!this.completionKeywords){var b=this.$tokenizer.rules,c=[];for(var d in b)for(var e=b[d],f=0,g=e.length;g>f;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){var a=this.$keywordList||this.$createKeywordList();return a.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})}}.call(j.prototype),b.Mode=j}),define("ace/tokenizer",["require","exports","module"],function(a,b){var c=1e3,d=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i<c.length;i++){var j=c[i];if(j.defaultToken&&(f.defaultToken=j.defaultToken),j.caseInsensitive&&(g="gi"),null!=j.regex){j.regex instanceof RegExp&&(j.regex=j.regex.toString().slice(1,-1));var k=j.regex,l=new RegExp("(?:("+k+")|(.))").exec("a").length-2;if(Array.isArray(j.token))if(1==j.token.length||1==l)j.token=j.token[0];else{if(l-1!=j.token.length)throw new Error("number of classes and regexp groups in '"+j.token+"'\n'"+j.regex+"' doesn't match\n"+(l-1)+"!="+j.token.length);j.tokenArray=j.token,j.token=null,j.onMatch=this.$arrayTokens}else"function"!=typeof j.token||j.onMatch||(j.onMatch=l>1?this.$applyToken:j.token);l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null),j.__proto__=null}}h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};!function(){this.$setMaxTokenCount=function(a){c=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var d=b.slice(0);b=d[0]}else var d=[];var e=b||"start",f=this.states[e],g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l={type:null,value:""};i=h.exec(a);){var m=g.defaultToken,n=null,o=i[0],p=h.lastIndex;if(p-o.length>k){var q=a.substring(k,p-o.length);l.type==m?l.value+=q:(l.type&&j.push(l),l={type:m,value:q})}for(var r=0;r<i.length-2;r++)if(void 0!==i[r+1]){n=f[g[r]],m=n.onMatch?n.onMatch(o,e,d):n.token,n.next&&(e="string"==typeof n.next?n.next:n.next(e,d),f=this.states[e],f||(window.console&&console.error&&console.error(e,"doesn't exist"),e="start",f=this.states[e]),g=this.matchMappings[e],k=p,h=this.regExps[e],h.lastIndex=p);
-break}if(o)if("string"==typeof m)n&&n.merge===!1||l.type!==m?(l.type&&j.push(l),l={type:m,value:o}):l.value+=o;else if(m){l.type&&j.push(l),l={type:null,value:""};for(var r=0;r<m.length;r++)j.push(m[r])}if(k==a.length)break;if(k=p,j.length>c){for(;k<a.length;)l.type&&j.push(l),l={value:a.substring(k,k+=2e3),type:"overflow"};e="start",d=[];break}}return l.type&&j.push(l),{tokens:j,state:d.length?d:e}}}.call(d.prototype),b.Tokenizer=d}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b){var c=a("../lib/lang"),d=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};!function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e<d.length;e++){var f=d[e];f.next&&("string"!=typeof f.next?f.nextState&&0!==f.nextState.indexOf(b)&&(f.nextState=b+f.nextState):0!==f.next.indexOf(b)&&(f.next=b+f.next))}this.$rules[b+c]=d}else for(var c in a)this.$rules[c]=a[c]},this.getRules=function(){return this.$rules},this.embedRules=function(a,b,d,e,f){var g=(new a).getRules();if(e)for(var h=0;h<e.length;h++)e[h]=b+e[h];else{e=[];for(var i in g)e.push(b+i)}if(this.addRules(g,b),d)for(var j=Array.prototype[f?"push":"unshift"],h=0;h<e.length;h++)j.apply(this.$rules[e[h]],c.deepCopy(d));this.$embeds||(this.$embeds=[]),this.$embeds.push(b)},this.getEmbeds=function(){return this.$embeds};var a=function(a,b){return"start"!=a&&b.unshift(this.nextState,a),this.nextState},b=function(a,b){return b[0]!==a?"start":(b.shift(),b.shift())};this.normalizeRules=function(){function c(f){var g=e[f];g.processed=!0;for(var h=0;h<g.length;h++){var i=g[h];!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var j=i.next||i.push;if(j&&Array.isArray(j)){var k=i.stateName;k||(k=i.token,"string"!=typeof k&&(k=k[0]||""),e[k]&&(k+=d++)),e[k]=j,i.next=k,c(k)}else"pop"==j&&(i.next=b);if(i.push&&(i.nextState=i.next||i.push,i.next=a,delete i.push),i.rules)for(var l in i.rules)e[l]?e[l].push&&e[l].push.apply(e[l],i.rules[l]):e[l]=i.rules[l];if(i.include||"string"==typeof i)var m=i.include||i,n=e[m];else Array.isArray(i)&&(n=i);if(n){var o=[h,1].concat(n);i.noEscape&&(o=o.filter(function(a){return!a.next})),g.splice.apply(g,o),h--,n=null}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}var d=0,e=this.$rules;Object.keys(e).forEach(c,this)},this.createKeywordMapper=function(a,b,c,d){var e=Object.create(null);return Object.keys(a).forEach(function(b){var f=a[b];c&&(f=f.toLowerCase());for(var g=f.split(d||"|"),h=g.length;h--;)e[g[h]]=b}),Object.getPrototypeOf(e)&&(e.__proto__=null),this.$keywordList=Object.keys(e),a=null,c?function(a){return e[a.toLowerCase()]||b}:function(a){return e[a]||b}},this.getKeywords=function(){return this.$keywords}}.call(d.prototype),b.TextHighlightRules=d}),define("ace/mode/behaviour",["require","exports","module"],function(a,b){var c=function(){this.$behaviours={}};!function(){this.add=function(a,b,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[a]:this.$behaviours[a]={}}this.$behaviours[a][b]=c},this.addBehaviours=function(a){for(var b in a)for(var c in a[b])this.add(b,c,a[b][c])},this.remove=function(a){this.$behaviours&&this.$behaviours[a]&&delete this.$behaviours[a]},this.inherit=function(a,b){if("function"==typeof a)var c=(new a).getBehaviours(b);else var c=a.getBehaviours(b);this.addBehaviours(c)},this.getBehaviours=function(a){if(a){for(var b={},c=0;c<a.length;c++)this.$behaviours[a[c]]&&(b[a[c]]=this.$behaviours[a[c]]);return b}return this.$behaviours}}.call(c.prototype),b.Behaviour=c}),define("ace/unicode",["require","exports","module"],function(a,b){function c(a){var c=/\w{4}/g;for(var d in a)b.packages[d]=a[d].replace(c,"\\u$&")}b.packages={},c({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),define("ace/token_iterator",["require","exports","module"],function(a,b){var c=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b);var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};!function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}.call(c.prototype),b.TokenIterator=c}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=a("./range").Range,f=a("./anchor").Anchor,g=function(a){this.$lines=[],0==a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};!function(){c.implement(this,d),this.setValue=function(a){var b=this.getLength();this.remove(new e(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new f(this,a,b)},this.$split=0=="aaa".split(/a/).length?function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length
-},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};if(b.length>65535){var c=this._insertLines(a,b.slice(65535));b=b.slice(0,65535)}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var f=new e(a,0,a+b.length,0),g={action:"insertLines",range:f,lines:b};return this._emit("change",{data:g}),c||f.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:e.fromPoints(a,c),text:this.getNewLineCharacter()};return this._emit("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},f={action:"insertText",range:e.fromPoints(a,d),text:b};return this._emit("change",{data:f}),d},this.remove=function(a){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,f=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),f>=d&&this._removeLines(d,f),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new e(a,b,a,c),f=this.getLine(a),g=f.substring(b,c),h=f.substring(0,b)+f.substring(c,f.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._emit("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new e(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new e(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),f={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._emit("change",{data:f}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new e(a,b.length,a+1,0),f=b+c;this.$lines.splice(a,2,f);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._emit("change",{data:g})},this.replace=function(a,b){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this.insertLines(d.start.row,c.lines):"insertText"==c.action?this.insert(d.start,c.text):"removeLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"removeText"==c.action&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}.call(g.prototype),b.Document=g}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};!function(){c.implement(this,d),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if(!(c.start.row==c.end.row&&c.start.row!=this.row||c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row<d&&(d+=g.row-f.row):"insertLines"===b.action?f.row<=d&&(d+=g.row-f.row):"removeText"===b.action?f.row===d&&f.column<e?e=g.column>=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row<d?(g.row===d&&(e=Math.max(0,e-g.column)+f.column),d-=g.row-f.row):g.row===d&&(d-=g.row-f.row,e=Math.max(0,e-g.column)+f.column):"removeLines"==b.action&&f.row<=d&&(g.row<=d?d-=g.row-f.row:(d=f.row,e=0)),this.setPosition(d,e,!0)}},this.setPosition=function(a,b,c){var d;if(d=c?{row:a,column:b}:this.$clipPositionToDocument(a,b),this.row!=d.row||this.column!=d.column){var e={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._emit("change",{old:e,value:d})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}.call(e.prototype)}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=function(a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var b=this;this.$worker=function(){if(b.running){for(var a=new Date,c=b.currentLine,d=-1,e=b.doc;b.lines[c];)c++;var f=c,g=e.getLength(),h=0;for(b.running=!1;g>c;){b.$tokenizeRow(c),d=c;do c++;while(b.lines[c]);if(h++,0==h%5&&new Date-a>20)return b.running=setTimeout(b.$worker,20),b.currentLine=c,void 0}b.currentLine=c,d>=f&&b.fireUpdateEvent(f,d)}}};!function(){c.implement(this,d),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._emit("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}.call(e.prototype),b.BackgroundTokenizer=e}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang");a("./lib/oop");var d=a("./range").Range,e=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};!function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,e,f){if(this.regExp)for(var g=f.firstRow,h=f.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=c.getMatchOffsets(e.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new d(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(e),this.clazz,f)}}}.call(e.prototype),b.SearchHighlight=e}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(a,b){function c(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;for(var e=d.folds,f=0;f<e.length;f++){var g=e[f];if(g.range.contains(a,b)){if(1==c&&g.range.isEnd(a,b))continue;if(-1==c&&g.range.isStart(a,b))continue;return g}}},this.getFoldsInRange=function(a){var b=a.start,c=a.end,d=this.$foldData,e=[];b.column+=1,c.column-=1;for(var f=0;f<d.length;f++){var g=d[f].range.compareRange(a);if(2!=g){if(-2==g)break;for(var h=d[f].folds,i=0;i<h.length;i++){var j=h[i];if(g=j.range.compareRange(a),-2==g)break;if(2!=g){if(42==g)break;e.push(j)}}}}return b.column-=1,c.column+=1,e},this.getAllFolds=function(){function a(a){b.push(a)}for(var b=[],c=this.$foldData,d=0;d<c.length;d++)for(var e=0;e<c[d].folds.length;e++)a(c[d].folds[e]);return b},this.getFoldStringAt=function(a,b,c,d){if(d=d||this.getFoldLine(a),!d)return null;for(var e,f,g={end:{column:0}},h=0;h<d.folds.length;h++){f=d.folds[h];var i=f.range.compareEnd(a,b);if(-1==i){e=this.getLine(f.start.row).substring(g.end.column,f.start.column);break}if(0===i)return null;g=f}return e||(e=this.getLine(f.start.row).substring(g.end.column)),-1==c?e.substring(0,b-g.end.column):1==c?e.substring(b-g.end.column):e},this.getFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.start.row<=a&&e.end.row>=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.end.row>=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e<c.length;e++){var f=c[e],g=f.end.row,h=f.start.row;if(g>=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c,d=this.$foldData,g=!1;a instanceof f?c=a:(c=new f(b,a),c.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(c.range);var h=c.start.row,i=c.start.column,j=c.end.row,k=c.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(c);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw new Error("A fold can't intersect already existing fold"+c.range+l.range);var n=this.getFoldsInRange(c.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){c.addSubFold(a)}));for(var o=0;o<d.length;o++){var p=d[o];if(j==p.start.row){p.addFold(c),g=!0;break}if(h==p.end.row){if(p.addFold(c),g=!0,!c.sameRow){var q=d[o+1];if(q&&q.start.row==j){p.merge(q);break}}break}if(j<=p.start.row)break}return g||(p=this.$addFoldLine(new e(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.start.row),this.$modified=!0,this._emit("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(a){var b=a.foldLine,c=b.start.row,d=b.end.row,e=this.$foldData,f=b.folds;if(1==f.length)e.splice(e.indexOf(b),1);else if(b.range.isEnd(a.end.row,a.end.column))f.pop(),b.end.row=f[f.length-1].end.row,b.end.column=f[f.length-1].end.column;else if(b.range.isStart(a.start.row,a.start.column))f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var g=b.split(a.start.row,a.start.column);f=g.folds,f.shift(),g.start.row=f[0].start.row,g.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,d):this.$updateRowLengthCache(c,d)),this.$modified=!0,this._emit("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);b.forEach(function(a){this.removeFold(a)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(b){a.restoreRange(b),this.addFold(b)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;if(null==a?(c=new d(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new d(a,0,a,this.getLine(a).length):"row"in a?d.fromPoints(a,a):a,e=this.getFoldsInRange(c),b)this.removeFolds(e);else for(;e.length;)this.expandFolds(e),e=this.getFoldsInRange(c)},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row,e=0),null==b&&(b=a.end.row,c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)})},this.toggleFold=function(a){var b,c,d=this.selection,e=d.getRange();if(e.isEmpty()){var f=e.start;if(b=this.getFoldAt(f.row,f.column))return this.expandFold(b),void 0;(c=this.findMatchingBracket(f))?1==e.comparePoint(c)?e.end=c:(e.start=c,e.start.column++,e.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==e.comparePoint(c)?e.end=c:e.start=c,e.start.column++):e=this.getCommentFoldRange(f.row,f.column)||e}else{var g=this.getFoldsInRange(e);if(a&&g.length)return this.expandFolds(g),void 0;1==g.length&&(b=g[0])}if(b||(b=this.getFoldAt(e.start.row,e.start.column)),b&&b.range.toString()==e.toString())return this.expandFold(b),void 0;var h="...";if(!e.isMultiLine()){if(h=this.getTextRange(e),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,e)},this.getCommentFoldRange=function(a,b,c){var e=new g(this,a,b),f=e.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var h=new d,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=e.stepBackward();while(f&&i.test(f.type));e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+2,e=new g(this,a,b),-1!=c){do f=e.stepForward();while(f&&i.test(f.type));f=e.stepBackward()}else f=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn()+f.value.length-2,h}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e),g=f.end.row;if(f&&f.isMultiLine()&&b>=g&&f.start.row>=a)try{var h=this.addFold("...",f);h.collapseChildren=c,e=g}catch(i){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var d,e=a-1;e>=0;){var f=c[e];if(null==f&&(f=c[e]=this.getFoldWidget(e)),"start"==f){var g=this.getFoldWidgetRange(e);if(d||(d=g),g&&g.end.row>=a)break}e--}return{range:-1!==e&&g,firstRange:d}},this.onFoldWidgetClick=function(a,b){var c=this.getFoldWidget(a),d=this.getLine(a);b=b.domEvent;var e=b.shiftKey,f=b.ctrlKey||b.metaKey,g=b.altKey,h="end"===c?-1:1,i=this.getFoldAt(a,-1===h?0:d.length,h);if(i)return e||f?this.removeFold(i):this.expandFold(i),void 0;var j=this.getFoldWidgetRange(a);if(j&&!j.isMultiLine()&&(i=this.getFoldAt(j.start.row,j.start.column,1),i&&j.isEqual(i.range)))return this.removeFold(i),void 0;if(g){var k=this.getParentFoldRangeData(a);if(k.range)var l=k.range.start.row+1,m=k.range.end.row;this.foldAll(l,m,f?1e4:0)}else if(e){var m=j?j.end.row:this.getLength();this.foldAll(a+1,j.end.row,f?1e4:0)}else j&&(f&&(j.collapseChildren=1e4),this.addFold("...",j));j||((b.target||b.srcElement).className+=" ace_invalid")},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=c}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b){function c(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var d=a("../range").Range;!function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d,e,f,g=0,h=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;j<h.length;j++){if(d=h[j],e=d.range.compareStart(b,c),-1==e)return a(null,b,c,g,i),void 0;if(f=a(null,d.start.row,d.start.column,g,i),f=!f&&a(d.placeholder,d.start.row,d.start.column,g),f||0==e)return;i=!d.sameRow,g=d.end.column}a(null,b,c,g,i)},this.getNextFoldTo=function(a,b){for(var c,d,e=0;e<this.folds.length;e++){if(c=this.folds[e],d=c.range.compareEnd(a,b),-1==d)return{fold:c,kind:"after"};if(0==d)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(a,b,c){var d,e,f=this.getNextFoldTo(a,b);if(f)if(d=f.fold,"inside"==f.kind&&d.start.column!=b&&d.start.row!=a)window.console&&window.console.log(a,b,d);else if(d.start.row==a){e=this.folds;var g=e.indexOf(d);for(0==g&&(this.start.column+=c),g;g<e.length;g++){if(d=e[g],d.start.column+=c,!d.sameRow)return;d.end.column+=c}this.end.column+=c}},this.split=function(a,b){var d=this.getNextFoldTo(a,b).fold,e=this.folds,f=this.foldData;if(!d)return null;var g=e.indexOf(d),h=e[g-1];this.end.row=h.end.row,this.end.column=h.end.column,e=e.splice(g,e.length-g);var i=new c(f,e);return f.splice(f.indexOf(this)+1,0,i),i},this.merge=function(a){for(var b=a.folds,c=0;c<b.length;c++)this.addFold(b[c]);var d=this.foldData;d.splice(d.indexOf(a),1)},this.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(b){a.push("  "+b.toString())}),a.push("]"),a.join("\n")},this.idxToPosition=function(a){for(var b,c=0,d=0;d<this.folds.length;d++){var b=this.folds[d];if(a-=b.start.column-c,0>a)return{row:b.start.row,column:b.start.column+a};if(a-=b.placeholder.length,0>a)return b.start;c=b.end.column}return{row:this.end.row,column:this.end.column+a}}}.call(c.prototype),b.FoldLine=c}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b){function c(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function d(a,b){c(a.start,b),c(a.end,b)}function e(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function f(a,b){e(a.start,b),e(a.end,b)}a("../range").Range;var g=a("../range_list").RangeList,h=a("../lib/oop"),i=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};h.inherits(i,g),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new i(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);d(a,this.start);for(var b=a.start.row,c=a.start.column,e=0,f=-1;e<this.subFolds.length&&(f=this.subFolds[e].range.compare(b,c),1==f);e++);var g=this.subFolds[e];if(0==f)return g.addSubFold(a);for(var b=a.range.end.row,c=a.range.end.column,h=e,f=-1;h<this.subFolds.length&&(f=this.subFolds[h].range.compare(b,c),1==f);h++);if(this.subFolds[h],0==f)throw new Error("A fold can't intersect already existing fold"+a.range+this.range);return this.subFolds.splice(e,h-e,a),a.setFoldLine(this.foldLine),a}},this.restoreRange=function(a){return f(a,this.start)}}.call(i.prototype)}),define("ace/range_list",["require","exports","module","ace/range"],function(a,b){var c=a("./range").Range,d=c.comparePoints,e=function(){this.ranges=[]};!function(){this.comparePoints=d,this.pointIndex=function(a,b,c){for(var e=this.ranges,f=c||0;f<e.length;f++){var g=e[f],h=d(a,g.end);if(!(h>0)){var i=d(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return d(a.start,b.start)});for(var c,e=b[0],f=1;f<b.length;f++){c=e,e=b[f];var g=d(c.end,e.start);0>g||(0!=g||c.isEmpty()||e.isEmpty())&&(d(c.end,e.end)<0&&(c.end.row=e.end.row,c.end.column=e.end.column),b.splice(f,1),a.push(e),e=c,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.row<a)return[];var d=this.pointIndex({row:a,column:0});0>d&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.row<e)){if(l.start.row>e)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}.call(e.prototype),b.RangeList=e}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b){function c(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var b,c=this.getLine(a.row),d=!0,f=c.charAt(a.column-1),g=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(g||(f=c.charAt(a.column),a={row:a.row,column:a.column+1},g=f&&f.match(/([\(\[\{])|([\)\]\}])/),d=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;b=e.fromPoints(a,h),d||(b.end.column++,b.start.column--),b.cursor=b.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;b=e.fromPoints(h,a),d||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var d=a("../token_iterator").TokenIterator,e=a("../range").Range;b.BracketMatch=c}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang"),d=a("./lib/oop"),e=a("./range").Range,f=function(){this.$options={}};!function(){this.set=function(a){return d.mixin(this.$options,a),this},this.getOptions=function(){return c.copyObject(this.$options)},this.setOptions=function(a){this.$options=a},this.find=function(a){var b=this.$matchIterator(a,this.$options);if(!b)return!1;var c=null;return b.forEach(function(a,b,d){if(a.start)c=a;else{var f=a.offset+(d||0);c=new e(b,f,b,f+a.length)}return!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var d=b.range,f=d?a.getLines(d.start.row,d.end.row):a.doc.getAllLines(),g=[],h=b.re;if(b.$isMultiLine)for(var i=h.length,j=f.length-i,k=h.offset||0;j>=k;k++){for(var l=0;i>l&&-1!=f[k+l].search(h[l]);l++);var m=f[k],n=f[k+i-1],o=m.match(h[0])[0].length,p=n.match(h[i-1])[0].length;g.push(new e(k,m.length-o,k+i-1,p))}else for(var q=0;q<f.length;q++)for(var r=c.getMatchOffsets(f[q],h),l=0;l<r.length;l++){var s=r[l];g.push(new e(q,s.offset,q,s.offset+s.length))}if(d){for(var t=d.start.column,u=d.start.column,q=0,l=g.length-1;l>q&&g[q].start.column<t&&g[q].start.row==d.start.row;)q++;for(;l>q&&g[l].end.column>u&&g[l].end.row==d.end.row;)l--;for(g=g.slice(q,l+1),q=0,l=g.length;l>q;q++)g[q].start.row+=d.start.row,g[q].end.row+=d.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];b[f]=g&&g.toLowerCase()!=g?b[f].toUpperCase():b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var d=this.$assembleRegExp(b);if(!d)return!1;var f,g=this,h=b.backwards;if(b.$isMultiLine)var i=d.length,j=function(b,c,g){var h=b.search(d[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(c+j),-1==b.search(d[j]))return;var k=b.match(d[i-1])[0].length,l=new e(c,h,c+i-1,k);return 1==d.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):g&&(l.start.column+=g),f(l)?!0:void 0}};else if(h)var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=g.length-1;h>=0;h--)if(f(g[h],b,e))return!0};else var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=0;h<g.length;h++)if(f(g[h],b,e))return!0};return{forEach:function(c){f=c,g.$lineIterator(a,b).forEach(j)}}},this.$assembleRegExp=function(a,b){if(a.needle instanceof RegExp)return a.re=a.needle;var d=a.needle;if(!a.needle)return a.re=!1;a.regExp||(d=c.escapeRegExp(d)),a.wholeWord&&(d="\\b"+d+"\\b");var e=a.caseSensitive?"g":"gi";if(a.$isMultiLine=!b&&/[\n\r]/.test(d),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(d,e);try{var f=new RegExp(d,e)}catch(g){f=!1}return a.re=f},this.$assembleMultilineRegExp=function(a,b){for(var c=a.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),d=[],e=0;e<c.length;e++)try{d.push(new RegExp(c[e],b))}catch(f){return!1}return""==c[0]?(d.shift(),d.offset=1):d.offset=0,d
-},this.$lineIterator=function(a,b){var c=1==b.backwards,d=0!=b.skipCurrent,e=b.range,f=b.start;f||(f=e?e[c?"end":"start"]:a.selection.getRange()),f.start&&(f=f[d!=c?"end":"start"]);var g=e?e.start.row:0,h=e?e.end.row:a.getLength()-1,i=c?function(c){var d=f.row,e=a.getLine(d).substring(0,f.column);if(!c(e,d)){for(d--;d>=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}.call(f.prototype),b.Search=f}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../keyboard/hash_handler").HashHandler,e=a("../lib/event_emitter").EventEmitter,f=function(a,b){d.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};c.inherits(f,d),function(){c.implement(this,e),this.exec=function(a,b,c){if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var d={editor:b,command:a,args:c},e=this._emit("exec",d);return this._signal("afterExec",d),e===!1?!1:!0},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(f.prototype),b.CommandManager=f}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){function c(a,b){if(this.platform=b||(e.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var c=!1,d=function(){c||(c=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return d(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(a){return d(),this.commandKeyBinding=a})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(a)}var d=a("../lib/keys"),e=a("../lib/useragent");!function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b="string"==typeof a?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.bindKey=function(a,b){if(a){if("function"==typeof b)return this.addCommand({exec:b,bindKey:a,name:b.name||a}),void 0;var c=this.commandKeyBinding;a.split("|").forEach(function(a){var d=this.parseKeys(a,b),e=d.hashId;(c[e]||(c[e]={}))[d.key]=b},this)}},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),c.name||(c.name=b),this.addCommand(c)}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(b){var c="string"==typeof b?b:b[this.platform];this.bindKey(c,a)}},this.parseKeys=function(a){-1!=a.indexOf(" ")&&(a=a.split(/\s+/).pop());var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),e=d[c];if(d.FUNCTION_KEYS[e])c=d.FUNCTION_KEYS[e].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var f=0,g=b.length;g--;){var h=d.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;f|=h}return{key:c,hashId:f}},this.findKeyCommand=function(a,b){var c=this.commandKeyBinding;return c[a]&&c[a][b]},this.handleKeyboard=function(a,b,c){return{command:this.findKeyCommand(b,c)}}}.call(c.prototype),b.HashHandler=c}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config"],function(a,b){function c(a,b){return{win:a,mac:b}}var d=a("../lib/lang"),e=a("../config");b.commands=[{name:"showSettingsMenu",bindKey:c("Ctrl-,","Command-,"),exec:function(a){e.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"selectall",bindKey:c("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:c(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:c("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:c("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},readOnly:!0},{name:"findnext",bindKey:c("Ctrl-K","Command-G"),exec:function(a){a.findNext()},readOnly:!0},{name:"findprevious",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},readOnly:!0},{name:"find",bindKey:c("Ctrl-F","Command-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:c("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotostart",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectup",bindKey:c("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:c("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:c("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotoend",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectdown",bindKey:c("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:c("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:c("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:c("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:c("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:c("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:c("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:c("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:c("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:c("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:c(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:c(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:c("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:c("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:c("Ctrl-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:c("Ctrl-Shift-P",null),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:c("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:c("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine"},{name:"toggleBlockComment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()}},{name:"movelinesup",bindKey:c("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()}},{name:"copylinesdown",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()}},{name:"movelinesdown",bindKey:c("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()}},{name:"del",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach"},{name:"cut_or_delete",bindKey:c("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?(a.remove("left"),void 0):!1},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:c("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach"},{name:"indent",bindKey:c("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach"},{name:"blockoutdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine"},{name:"blockindent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach"},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:c(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:c("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)}},{name:"touppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach"}]}),define("ace/undomanager",["require","exports","module"],function(a,b){var c=function(){this.reset()};!function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}.call(c.prototype),b.UndoManager=c}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/useragent","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom");a("./lib/useragent");var e=a("./config"),f=a("./layer/gutter").Gutter,g=a("./layer/marker").Marker,h=a("./layer/text").Text,i=a("./layer/cursor").Cursor,j=a("./scrollbar").ScrollBarH,k=a("./scrollbar").ScrollBarV,l=a("./renderloop").RenderLoop,m=a("./lib/event_emitter").EventEmitter,n=".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;color: black;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: auto;right: 0;top: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-h {position: absolute;overflow-x: auto;overflow-y: hidden;right: 0;left: 0;bottom: 0;z-index: 6;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}";
-d.importCssString(n,"ace_editor");var o=function(a,b){var c=this;this.container=a||d.createElement("div"),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=d.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=d.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=d.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new g(this.content);var m=this.$textLayer=new h(this.content);this.canvas=m.element,this.$markerFront=new g(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new k(this.container,this),this.scrollBarH=new j(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){c.updateCharacterSize(),c.onResize(!0),c._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),e.resetOptions(this),e._emit("renderer",this)};!function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,c.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session=a,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(this.session.setScrollTop(this.getScrollTop()),e|=this.CHANGE_SCROLL)),c&&(a||f.width!=c)&&(e=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=d.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=d.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2,b-=1}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c-=this.scrollBar.width,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-c-e)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-b-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setInnerWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$renderChanges=function(a,b){return this.$changes&&(a|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&(a||b)?this.$size.width?(this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL)&&(a|=this.$computeLayerConfig()),a&this.CHANGE_H_SCROLL&&(this.$updateScrollBarH(),this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$updateScrollBarV(),this.$updateScrollBarH(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender"),void 0):a&this.CHANGE_SCROLL?(this.$updateScrollBarV(),a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender"),void 0):(a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),(a&this.CHANGE_SIZE||a&this.CHANGE_LINES)&&(this.$updateScrollBarV(),this.$updateScrollBarH()),this._signal("afterRender"),void 0)):(this.$changes|=a,this.onResize(!0)):(this.$changes|=a,void 0)},this.$autosize=function(a){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a)),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size.height<=2*this.lineHeight,c=this.session.getScreenLength(),d=c*this.lineHeight,e=this.scrollTop%this.lineHeight,f=this.$size.scrollerHeight+this.lineHeight,g=this.$getLongestLine(),h=!b&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-g-2*this.$padding<0),i=this.$horizScroll!==h;i&&(this.$horizScroll=h,this.scrollBarH.setVisible(h)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>d-this.$size.scrollerHeight&&(d+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-d+this.$size.scrollerHeight));var j=!b&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-d<0),k=this.$vScroll!==j;k&&(this.$vScroll=j,this.scrollBarV.setVisible(j)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,d-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,g+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var l,m,n=Math.ceil(f/this.lineHeight)-1,o=Math.max(0,Math.round((this.scrollTop-e)/this.lineHeight)),p=o+n,q=this.lineHeight;o=a.screenToDocumentRow(o,0);var r=a.getFoldLine(o);r&&(o=r.start.row),l=a.documentToScreenRow(o,0),m=a.getRowLength(o)*q,p=Math.min(a.screenToDocumentRow(p,0),a.getLength()-1),f=this.$size.scrollerHeight+a.getRowLength(p)*q+m,e=this.scrollTop-l*q;var s=0;return(i||k)&&(s=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),k&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:o,firstRowScreen:l,lastRow:p,lineHeight:q,characterWidth:this.characterWidth,minHeight:f,maxHeight:d,offset:e,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-e+"px",this.content.style.marginTop=-e+"px",this.content.style.width=g+2*this.$padding+"px",this.content.style.height=f+"px",s},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||b<c.firstRow?void 0:1/0===b?(this.$showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c),void 0):(this.$textLayer.updateLines(c,a,b),!0)},this.$getLongestLine=function(){var a=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(a+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(a*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){this.$gutterLayer.removeGutterDecoration(a,b)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(a,b,c){this.scrollCursorIntoView(a,c),this.scrollCursorIntoView(b,c)},this.scrollCursorIntoView=function(a,b){if(0!==this.$size.scrollerHeight){var c=this.$cursorLayer.getPixelPosition(a),d=c.left,e=c.top,f=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;f>e?(b&&(e-=b*this.$size.scrollerHeight),0==e?e=-this.scrollMargin.top:0==e&&(e=+this.scrollMargin.bottom),this.session.setScrollTop(e)):f+this.$size.scrollerHeight<e+this.lineHeight&&(b&&(e+=b*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight-this.$size.scrollerHeight));var g=this.scrollLeft;g>d?(d<this.$padding+2*this.layerConfig.characterWidth&&(d=-this.scrollMargin.left),this.session.setScrollLeft(d)):g+this.$size.scrollerWidth<d+this.characterWidth?this.session.setScrollLeft(Math.round(d+this.characterWidth-this.$size.scrollerWidth)):g<=this.$padding&&d-g<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.session.setScrollTop(a*this.lineHeight)},this.alignCursor=function(a,b){"number"==typeof a&&(a={row:a,column:0});var c=this.$cursorLayer.getPixelPosition(a),d=this.$size.scrollerHeight-this.lineHeight,e=c.top-d*(b||0);return this.session.setScrollTop(e),e},this.STEPS=8,this.$calcSteps=function(a,b){var c=0,d=this.STEPS,e=[],f=function(a,b,c){return c*(Math.pow(a-1,3)+1)+b};for(c=0;d>c;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight);return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){d.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){d.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(d.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function c(c){if(f.$themeValue!=a)return b&&b();if(c.cssClass){d.importCssString(c.cssText,c.cssClass,f.container.ownerDocument),f.theme&&d.removeCssClass(f.container,f.theme.cssClass),f.$theme=c.cssClass,f.theme=c,d.addCssClass(f.container,c.cssClass),d.setCssClass(f.container,"ace_dark",c.isDark);var e="padding"in c?c.padding:4;f.$padding&&e!=f.$padding&&f.setPadding(e),f.$size&&(f.$size.width=0,f.onResize()),f._dispatchEvent("themeLoaded",{theme:c}),b&&b()}}var f=this;if(this.$themeValue=a,f._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)c(a);else{var g=a||"ace/theme/textmate";e.loadModule(["theme",g],c)}},this.getTheme=function(){return this.$themeValue},this.setStyle=function(a,b){d.setCssClass(this.container,a,0!=b)},this.unsetStyle=function(a){d.removeCssClass(this.container,a)},this.setMouseCursor=function(a){this.content.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}.call(o.prototype),e.defineOptions(o.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){d.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight(),void 0):(this.$gutterLineHighlight=d.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}}}),b.VirtualRenderer=o}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b){var c=a("../lib/dom"),d=a("../lib/oop"),e=a("../lib/lang"),f=a("../lib/event_emitter").EventEmitter,g=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};!function(){d.implement(this,f),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b,c,d=0;d<a.length;d++){var f=a[d],c=f.row,b=this.$annotations[c];b||(b=this.$annotations[c]={text:[]});var g=f.text;g=g?e.escapeHTML(g):f.html||"",-1===b.text.indexOf(g)&&b.text.push(g);var h=f.type;"error"==h?b.className=" ace_error":"warning"==h&&" ace_error"!=b.className?b.className=" ace_warning":"info"!=h||b.className||(b.className=" ace_info")}},this.$updateAnnotations=function(a){if(this.$annotations.length){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e);else if("removeText"==b.action||"removeLines"==b.action)this.$annotations.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.$annotations.splice.apply(this.$annotations,f)}}},this.update=function(a){for(var b=a.firstRow,d=a.lastRow,e=this.session.getNextFoldLine(b),f=e?e.start.row:1/0,g=this.$showFoldWidgets&&this.session.foldWidgets,h=this.session.$breakpoints,i=this.session.$decorations,j=this.session.$firstLineNumber,k=0,l=null,m=-1,n=b;;){if(n>f&&(n=e.end.row+1,e=this.session.getNextFoldLine(n,e),f=e?e.start.row:1/0),n>d){for(;this.$cells.length>m+1;)l=this.$cells.pop(),this.element.removeChild(l.element);break}l=this.$cells[++m],l||(l={element:null,textNode:null,foldWidget:null},l.element=c.createElement("div"),l.textNode=document.createTextNode(""),l.element.appendChild(l.textNode),this.element.appendChild(l.element),this.$cells[m]=l);var o="ace_gutter-cell ";h[n]&&(o+=h[n]),i[n]&&(o+=i[n]),this.$annotations[n]&&(o+=this.$annotations[n].className),l.element.className!=o&&(l.element.className=o);var p=this.session.getRowLength(n)*a.lineHeight+"px";p!=l.element.style.height&&(l.element.style.height=p);var q=k=n+j;if(q!=l.textNode.data&&(l.textNode.data=q),g){var r=g[n];null==r&&(r=g[n]=this.session.getFoldWidget(n))}if(r){l.foldWidget||(l.foldWidget=c.createElement("span"),l.element.appendChild(l.foldWidget));var o="ace_fold-widget ace_"+r;o+="start"==r&&n==f&&n<e.end.row?" ace_closed":" ace_open",l.foldWidget.className!=o&&(l.foldWidget.className=o);var p=a.lineHeight+"px";l.foldWidget.style.height!=p&&(l.foldWidget.style.height=p)}else null!=l.foldWidget&&(l.element.removeChild(l.foldWidget),l.foldWidget=null);n++}this.element.style.height=a.minHeight+"px",(this.$fixedWidth||this.session.$useWrapMode)&&(k=this.session.getLength());var s=k.toString().length*a.characterWidth,t=this.$padding||this.$computePadding();s+=t.left+t.right,s===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",s))},this.$fixedWidth=!1,this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(a){a?c.addCssClass(this.element,"ace_folding-enabled"):c.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var a=c.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(a.paddingLeft)+1||0,this.$padding.right=parseInt(a.paddingRight)||0,this.$padding},this.getRegion=function(a){var b=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();return a.x<b.left+c.left?"markers":this.$showFoldWidgets&&a.x>c.right-b.right?"foldWidgets":void 0}}.call(g.prototype),b.Gutter=g}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b){var c=a("../range").Range,d=a("../lib/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};!function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var e=this.markers[c];if(e.range){var f=e.range.clipRows(a.firstRow,a.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),e.renderer){var g=this.$getTop(f.start.row,a),h=this.$padding+f.start.column*a.characterWidth;e.renderer(b,f,h,g,a)}else"fullLine"==e.type?this.drawFullLineMarker(b,f,e.clazz,a):"screenLine"==e.type?this.drawScreenLineMarker(b,f,e.clazz,a):f.isMultiLine()?"text"==e.type?this.drawTextMarker(b,f,e.clazz,a):this.drawMultiLineMarker(b,f,e.clazz,a):this.drawSingleLineMarker(b,f,e.clazz+" ace_start",a)}else e.update(b,this,this.session,a)}this.element=d.setInnerHtml(this.element,b.join(""))}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,d,e,f){var g=b.start.row,h=new c(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,d+" ace_start",e,1,f),g=b.end.row,h=new c(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,d,e,0,f),g=b.start.row+1;g<b.end.row;g++)h.start.row=g,h.end.row=g,h.end.column=this.session.getScreenLastRowColumn(g),this.drawSingleLineMarker(a,h,d,e,1,f)},this.drawMultiLineMarker=function(a,b,c,d,e){var f=this.$padding,g=d.lineHeight,h=this.$getTop(b.start.row,d),i=f+b.start.column*d.characterWidth;e=e||"",a.push("<div class='",c," ace_start' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",i,"px;",e,"'></div>"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",j,"px;","top:",h,"px;","left:",f,"px;",e,"'></div>"),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",f,"px;",e,"'></div>"))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",h,"px;","top:",i,"px;","left:",j,"px;",f||"","'></div>")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")
-},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")}}.call(e.prototype),b.Marker=e}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../lib/dom"),e=a("../lib/lang"),f=a("../lib/useragent"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};!function(){c.implement(this,g),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=f.isIE||f.isOldGecko?function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=d.createElement("div"),c=b.style;if(c.width=c.height="auto",c.left=c.top=40*-a+"px",c.visibility="hidden",c.position="fixed",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=e.stringRepeat("Xy",a),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(b);else{for(var f=this.element.parentNode;!d.hasCssClass(f,"ace_editor");)f=f.parentNode;f.appendChild(b)}}if(!this.element.offsetWidth)return null;var c=this.$measureNode.style,g=d.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*a)};return 0==i.width||0==i.height?null:i}:function(){if(!this.$measureNode){var a=this.$measureNode=d.createElement("div"),b=a.style;b.width=b.height="auto",b.left=b.top="-100px",b.visibility="hidden",b.position="fixed",b.overflow="visible",b.whiteSpace="nowrap",a.innerHTML=e.stringRepeat("X",100);for(var c=this.element.parentNode;c&&!d.hasCssClass(c,"ace_editor");)c=c.parentNode;if(!c)return this.$measureNode=null;c.appendChild(a)}var f=this.$measureNode.getBoundingClientRect(),g={height:f.height,width:f.width/100};return 0==g.width||0==g.height?null:g},this.setSession=function(a){this.session=a,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+e.stringRepeat(" ",c-1)+"</span>"):b.push(e.stringRepeat(" ",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide";if(this.showInvisibles){d+=" ace_invisible";var f=e.stringRepeat(this.SPACE_CHAR,this.tabSize),g=this.TAB_CHAR+e.stringRepeat(" ",this.tabSize-1)}else var f=e.stringRepeat(" ",this.tabSize),g=f;this.$tabStrings[" "]="<span class='"+d+"'>"+f+"</span>",this.$tabStrings["	"]="<span class='"+d+"'>"+g+"</span>"}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var e=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0,i=a.firstRow;e>i;i++){var j=this.session.getFoldLine(i);if(j){if(j.containsRow(e)){e=j.start.row;break}i=j.end.row}h++}for(var i=e,j=this.session.getNextFoldLine(i),k=j?j.start.row:1/0;;){if(i>k&&(i=j.end.row+1,j=this.session.getNextFoldLine(i,j),k=j?j.start.row:1/0),i>f)break;var l=g[h++];if(l){var m=[];this.$renderLine(m,i,!this.$useLineGroups(),i==k?j:!1),d.setInnerHtml(l,m.join(""))}i++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow<a.firstRow)return this.update(a);if(a.lastRow<b.firstRow)return this.update(a);var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);d>0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRow<b.firstRow){var e=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1);c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)}if(a.lastRow>b.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var e=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>c)break;var i=d.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",e.appendChild(i);else for(var k=i.childNodes;k.length;)e.appendChild(k[0]);f++}return e},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,e=a.lastRow,f=c,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>e)break;this.$useLineGroups()&&b.push("<div class='ace_line_group'>"),this.$renderLine(b,f,!1,f==h?g:!1),this.$useLineGroups()&&b.push("</div>"),f++}this.element=d.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var f=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g){if(c)return f.showInvisibles?"<span class='ace_invisible'>"+e.stringRepeat(f.SPACE_CHAR,a.length)+"</span>":e.stringRepeat(" ",a.length);if("&"==a)return"&#38;";if("<"==a)return"&#60;";if("	"==a){var h=f.session.getScreenTabSize(b+g);return b+=h-1,f.$tabStrings[h]}if(" "==a){var i=f.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",j=f.showInvisibles?f.SPACE_CHAR:"";return b+=1,"<span class='"+i+"' style='width:"+2*f.config.characterWidth+"px'>"+j+"</span>"}return d?"<span class='ace_invisible ace_invalid'>"+f.SPACE_CHAR+"</span>":(b+=1,"<span class='ace_cjk' style='width:"+2*f.config.characterWidth+"px'>"+a+"</span>")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("<span class='",j,"'",k,">",i,"</span>")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(e.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):"	"==b[0]?(a.push(e.stringRepeat(this.$tabStrings["	"],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i<b.length;i++){var j=b[i],k=j.value;if(0==i&&this.displayIndentGuides){if(e=k.length,k=this.renderIndentGuide(a,k,g),!k)continue;e-=k.length}if(e+k.length<g)h=this.$renderToken(a,h,j,k),e+=k.length;else{for(;e+k.length>=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f<b.length;f++)d=b[f],e=d.value,c=this.$renderToken(a,c,d,e)},this.$renderLine=function(a,b,c,d){if(d||0==d||(d=this.session.getFoldLine(b)),d)var e=this.$getFoldLineTokens(b,d);else var e=this.session.getTokens(b);if(c||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("<span class='ace_invisible'>",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),c||a.push("</div>")},this.$getFoldLineTokens=function(a,b){function c(a,b,c){for(var d=0,f=0;f+a[d].value.length<b;)if(f+=a[d].value.length,d++,d==a.length)return;if(f!=b){var g=a[d].value.substring(b-f);g.length>c-b&&(g=g.substring(0,c-b)),e.push({type:a[d].type,value:g}),f=b+g.length,d+=1}for(;c>f&&d<a.length;){var g=a[d].value;g.length+f>c?e.push({type:a[d].type,value:g.substring(0,c-f)}):e.push(a[d]),f+=g.length,d+=1}}var d=this.session,e=[],f=d.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?e.push({type:"fold",value:a}):(i&&(f=d.getTokens(b)),f.length&&c(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),e},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}.call(h.prototype),b.Text=h}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("../lib/dom"),d=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors")};!function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,a?c.addCssClass(this.element,"ace_smooth-blinking"):c.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var a=c.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,c.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,c.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&c.removeCssClass(this.element,"ace_smooth-blinking");for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){c.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";b()}.bind(this),this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<-a.offset)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}.call(d.prototype),b.Cursor=d}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/event"),f=a("./lib/event_emitter").EventEmitter,g=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",e.addListener(this.element,"scroll",this.onScrollV.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)},h=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.height=b.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",e.addListener(this.element,"scroll",this.onScrollH.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)};!function(){c.implement(this,f),this.setVisible=function(a){a?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(a){this.element.style.height=a+"px"},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}.call(g.prototype),h.prototype=g.prototype,b.ScrollBar=g,b.ScrollBarV=g,b.ScrollBarH=h}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b){var c=a("./lib/event"),d=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};!function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending){this.pending=!0;var b=this;c.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}.call(d.prototype),b.RenderLoop=d}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(a,b){function c(a,b,c){return o.$options.wrap=!0,o.$options.needle=b,o.$options.backwards=-1==c,o.find(a)}function d(a,b){return a.row==b.row&&a.column==b.column}function e(a){a.$multiselectOnSessionChange||(a.$onAddRange=a.$onAddRange.bind(a),a.$onRemoveRange=a.$onRemoveRange.bind(a),a.$onMultiSelect=a.$onMultiSelect.bind(a),a.$onSingleSelect=a.$onSingleSelect.bind(a),a.$multiselectOnSessionChange=b.onSessionChange.bind(a),a.$multiselectOnSessionChange(a),a.on("changeSession",a.$multiselectOnSessionChange),a.on("mousedown",j),a.commands.addCommands(m.defaultCommands),f(a))}function f(a){function b(){d&&(a.renderer.setMouseCursor(""),d=!1)}var c=a.textInput.getElement(),d=!1;k.addListener(c,"keydown",function(c){18!=c.keyCode||c.ctrlKey||c.shiftKey||c.metaKey?d&&b():d||(a.renderer.setMouseCursor("crosshair"),d=!0)}),k.addListener(c,"keyup",b),k.addListener(c,"blur",b)}var g=a("./range_list").RangeList,h=a("./range").Range,i=a("./selection").Selection,j=a("./mouse/multi_select_handler").onMouseDown,k=a("./lib/event"),l=a("./lib/lang"),m=a("./commands/multi_select_commands");b.commands=m.defaultCommands.concat(m.multiSelectCommands);var n=a("./search").Search,o=new n,p=a("./edit_session").EditSession;!function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(a,b){if(a){if(!this.inMultiSelectMode&&0==this.rangeCount){var c=this.toOrientedRange();if(this.rangeList.add(c),this.rangeList.add(a),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(a);this.rangeList.removeAll(),this.rangeList.add(c),this.$onAddRange(c)}a.cursor||(a.cursor=a.end);var d=this.rangeList.add(a);return this.$onAddRange(a),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._emit("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._emit("removeRange",{ranges:a}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),e=c.start.row,f=c.end.row;if(e==f){if(d)var g=c.end,i=c.start;else var g=c.start,i=c.end;return this.addRange(h.fromPoints(i,i)),this.addRange(h.fromPoints(g,g)),void 0}var j=[],k=this.getLineRange(e,!0);k.start.column=c.start.column,j.push(k);for(var l=e+1;f>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(f,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),e=this.session.documentToScreenPosition(this.selectionAnchor),f=this.rectangularRangeBlock(d,e);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var e=[],f=a.column<b.column;if(f)var g=a.column,i=b.column;else var g=b.column,i=a.column;var j=a.row<b.row;if(j)var k=a.row,l=b.row;else var k=b.row,l=a.row;0>g&&(g=0),0>k&&(k=0),k==l&&(c=!0);for(var m=k;l>=m;m++){var n=h.fromPoints(this.session.screenToDocumentPosition(m,g),this.session.screenToDocumentPosition(m,i));if(n.isEmpty()){if(o&&d(n.end,o))break;var o=n.end}n.cursor=f?n.start:n.end,e.push(n)}if(j&&e.reverse(),!c){for(var p=e.length-1;e[p].isEmpty()&&p>0;)p--;if(p>0)for(var q=0;e[q].isEmpty();)q++;for(var r=p;r>=q;r--)e[r].isEmpty()&&e.splice(r,1)}return e}}.call(i.prototype);var q=a("./editor").Editor;!function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(m.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(m.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var d,e=this.session,f=this.selection,g=f.rangeList,h=f._eventRegistry;f._eventRegistry={};var j=new i(e);this.inVirtualSelectionMode=!0;for(var k=g.ranges.length;k--;){if(c)for(;k>0&&g.ranges[k].start.row==g.ranges[k-1].end.row;)k--;j.fromOrientedRange(g.ranges[k]),this.selection=e.selection=j;var l=a.exec(this,b||{});void 0==!d&&(d=l),j.toOrientedRange(g.ranges[k])}j.detach(),this.selection=e.selection=f,this.inVirtualSelectionMode=!1,f._eventRegistry=h,f.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;d<b.length;d++)c.push(this.session.getTextRange(b[d]));var e=this.session.getDocument().getNewLineCharacter();a=c.join(e),a.length==(c.length-1)*e.length&&(a="")}else this.selection.isEmpty()||(a=this.session.getTextRange(this.getSelectionRange()));return a},this.onPaste=function(a){if(!this.$readOnly){if(this._signal("paste",a),!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(a);var b=a.split(/\r\n|\r|\n/),c=this.selection.rangeList.ranges;if(b.length>c.length||b.length<2||!b[1])return this.commands.exec("insertstring",this,a);for(var d=c.length;d--;){var e=c[d];e.isEmpty()||this.session.remove(e),this.session.insert(e.start,b[d])}}},this.findAll=function(a,b,c){b=b||{},b.needle=a||b.needle,this.$search.set(b);var d=this.$search.findAll(this.session);if(!d.length)return 0;this.$blockScrolling+=1;var e=this.multiSelect;c||e.toSingleRange(d[0]);for(var f=d.length;f--;)e.addRange(d[f],!0);return this.$blockScrolling-=1,d.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,e=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(e.column=this.selection.$desiredColumn);var f=this.session.screenToDocumentPosition(e.row+a,e.column);if(c.isEmpty())var g=f;else var i=this.session.documentToScreenPosition(d?c.end:c.start),g=this.session.screenToDocumentPosition(i.row+a,i.column);if(d){var j=h.fromPoints(f,g);j.cursor=j.start}else{var j=h.fromPoints(g,f);j.cursor=j.end}if(j.desiredColumn=e.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b){var d=this.session,e=d.multiSelect,f=e.toOrientedRange();if(f.isEmpty()){var f=d.getWordRange(f.start.row,f.start.column);return f.cursor=-1==a?f.start:f.end,this.multiSelect.addRange(f),void 0}var g=d.getTextRange(f),h=c(d,g,a);h&&(h.cursor=-1==a?h.start:h.end,this.multiSelect.addRange(h)),b&&this.multiSelect.substractPoint(f.cursor)},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges;if(c.length){var d=-1,e=c.filter(function(a){return a.cursor.row==d?!0:(d=a.cursor.row,void 0)});b.$onRemoveRange(e);var f=0,g=1/0,i=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>f&&(f=c.column),g>e&&(g=e),e});c.forEach(function(b,c){var d=b.cursor,e=f-d.column,j=i[c]-g;e>j?a.insert(d,l.stringRepeat(" ",e-j)):a.remove(new h(d.row,d.column,d.row,d.column-e+j)),b.start.column=b.end.column=f,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var j=this.selection.getRange(),k=j.start.row,m=j.end.row,n=this.session.doc.removeLines(k,m);n=this.$reAlignText(n),this.session.doc.insertLines(k,n),j.start.column=0,j.end.column=n[n.length-1].length,this.selection.setRange(j)}},this.$reAlignText=function(a){function b(a){return l.stringRepeat(" ",a)}function c(a){return a[2]?b(f)+a[2]+b(g-a[2].length+h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function d(a){return a[2]?b(f+g-a[2].length)+a[2]+b(h," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function e(a){return a[2]?b(f)+a[2]+b(h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var f,g,h,i=!0,j=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==f?(f=b[1].length,g=b[2].length,h=b[3].length,b):(f+g+h!=b[1].length+b[2].length+b[3].length&&(j=!1),f!=b[1].length&&(i=!1),f>b[1].length&&(f=b[1].length),g<b[2].length&&(g=b[2].length),h>b[3].length&&(h=b[3].length),b):[a]}).map(i?j?d:c:e)}}.call(q.prototype),b.onSessionChange=function(a){var b=a.session;b.multiSelect||(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.removeEventListener("addRange",this.$onAddRange),c.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),c.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),c.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=e,a("./config").defineOptions(q.prototype,"editor",{enableMultiselect:{set:function(a){e(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",j)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",j))},value:!0}})}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(a,b){function c(a,b){return a.row==b.row&&a.column==b.column}function d(a){var b=a.domEvent,d=b.altKey,f=b.shiftKey,g=a.getAccelKey(),h=a.getButton();if(a.editor.inMultiSelectMode&&2==h)return a.editor.textInput.onContextMenu(a.domEvent),void 0;if(!g&&!d)return 0==h&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode(),void 0;var i=a.editor,j=i.selection,k=i.inMultiSelectMode,l=a.getDocumentPosition(),m=j.getCursor(),n=a.inSelection()||j.isEmpty()&&c(l,m),o=a.x,p=a.y,q=function(a){o=a.clientX,p=a.clientY},r=function(){var a=i.renderer.pixelToScreenCoordinates(o,p),b=s.screenToDocumentPosition(a.row,a.column);c(u,a)&&c(b,j.selectionLead)||(u=a,i.selection.moveCursorToPosition(b),i.selection.clearSelection(),i.renderer.scrollCursorIntoView(),i.removeSelectionMarkers(v),v=j.rectangularRangeBlock(u,t),v.forEach(i.addSelectionMarker,i),i.updateSelectionMarkers())},s=i.session,t=i.renderer.pixelToScreenCoordinates(o,p),u=t;if(!g||f||d||0!=h){if(d&&0==h){a.stop(),k&&!g?j.toSingleRange():!k&&g&&j.addRange();var v=[];f?(t=s.documentToScreenPosition(j.lead),r()):(j.moveCursorToPosition(l),j.clearSelection());var w=function(){clearInterval(y),i.removeSelectionMarkers(v);for(var a=0;a<v.length;a++)j.addRange(v[a])},x=r;e.capture(i.container,q,w);var y=setInterval(function(){x()},20);return a.preventDefault()}}else{if(!k&&n)return;if(!k){var z=j.toOrientedRange();i.addSelectionMarker(z)}var A=j.rangeList.rangeAtPoint(l);i.once("mouseup",function(){var a=j.toOrientedRange();A&&a.isEmpty()&&c(A.cursor,a.cursor)?j.substractPoint(a.cursor):(z&&(i.removeSelectionMarker(z),j.addRange(z)),j.addRange(a))
-})}}var e=a("../lib/event");b.onMouseDown=d}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(a,b){b.defaultCommands=[{name:"addCursorAbove",exec:function(a){a.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(a){a.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(a){a.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(a){a.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(a){a.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(a){a.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(a){a.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(a){a.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(a){a.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(a){a.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],b.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(a){a.exitMultiSelectMode()},readonly:!0,isAvailable:function(a){return a&&a.inMultiSelectMode}}];var c=a("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new c(b.multiSelectCommands)}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(a,b){var c=a("../lib/oop"),d=a("../lib/event_emitter").EventEmitter,e=a("../config"),f=function(b,c,d){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl);var f;if(e.get("packaged")||!a.toUrl)f=e.moduleUrl(c,"worker");else{var g=this.$normalizePath;f=g(a.toUrl("ace/worker/worker.js",null,"_"));var h={};b.forEach(function(b){h[b]=g(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(f),this.$worker.postMessage({init:!0,tlns:h,module:c,classname:d}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};!function(){c.implement(this,d),this.onError=function(a){throw window.console&&console.log&&console.log(a),a},this.onMessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log.apply(console,b.data);break;case"event":this._emit(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id])}},this.$normalizePath=function(a){return location.host?(a=a.replace(/^[a-z]+:\/\/[^\/]+/,""),a=location.protocol+"//"+location.host+("/"==a.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,"")):a},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,1))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))}}.call(f.prototype);var g=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var f=null,g=Object.create(d),h=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){h.messageBuffer.push(a),f&&setTimeout(i)};var i=function(){var a=h.messageBuffer.shift();a.command?f[a.command].apply(f,a.args):a.event&&g._emit(a.event,a.data)};g.postMessage=function(a){h.onMessage({data:a})},g.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},g.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},e.loadModule(["worker",b],function(a){for(f=new a[c](g);h.messageBuffer.length;)i()})};g.prototype=f.prototype,b.UIWorkerClient=g,b.WorkerClient=f}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b){var c=a("./range").Range,d=a("./lib/event_emitter").EventEmitter,e=a("./lib/oop"),f=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};!function(){e.implement(this,d),this.setup=function(){var a=this,b=this.doc,d=this.session,e=this.$pos;this.pos=b.createAnchor(e.row,e.column),this.markerId=d.addMarker(new c(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){d.removeMarker(a.markerId),a.markerId=d.addMarker(new c(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),d.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=a.addMarker(new c(d.row,d.column,d.row,d.column+b.length),b.othersClass,null,!1),d.on("change",function(e){a.removeMarker(d.markerId),d.markerId=a.addMarker(new c(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},this.onUpdate=function(a){var b=a.data,d=b.range;if(d.start.row===d.end.row&&d.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var e="insertText"===b.action?d.end.column-d.start.column:d.start.column-d.end.column;if(d.start.column>=this.pos.column&&d.start.column<=this.pos.column+this.length+1){var f=d.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.insert(i,b.text)}else if("removeText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.remove(new c(i.row,i.column,i.row,i.column-e))}d.start.column===this.pos.column&&"insertText"===b.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-e);for(var a=0;a<this.others.length;a++){var b=this.others[a],c={row:b.row,column:b.column-e};b.row===d.start.row&&d.start.column<b.column&&(c.column+=e),b.setPosition(c.row,c.column)}}.bind(this),0):d.start.column===this.pos.column&&"removeText"===b.action&&setTimeout(function(){for(var a=0;a<this.others.length;a++){var b=this.others[a];b.row===d.start.row&&d.start.column<b.column&&b.setPosition(b.row,b.column-e)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var g=0;g<this.others.length;g++)this.others[g]._emit("change",{value:this.others[g]})}this.$updating=!1}},this.onCursorChange=function(a){if(!this.$updating){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;a<this.others.length;a++)this.others[a].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var a=this.session.getUndoManager(),b=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;b>c;c++)a.undo(!0)}}.call(f.prototype),b.PlaceHolder=f}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b){var c=a("../../range").Range,d=b.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(a,b,d){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=d||f.length,i=a.getLength(),j=b,k=b;++b<i;){var l=a.getLine(b).search(e);if(-1!=l){if(g>=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new c(j,h,k,m)}}},this.openingBracketBlock=function(a,b,d,e,f){var g={row:d,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=this.getFoldWidget(a,h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),c.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,d,e){var f={row:d,column:e},g=a.$findOpeningBracket(b,f);return g?(g.column++,f.column--,c.fromPoints(g,f)):void 0}}.call(d.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b){b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var c=a("../lib/dom");c.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){a&&a.config.init(),window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}(),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/theme/textmate","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/dom"),d=a("./lib/event"),e=a("./editor").Editor,f=a("./edit_session").EditSession,g=a("./undomanager").UndoManager,h=a("./virtual_renderer").VirtualRenderer,i=a("./multi_select").MultiSelect;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./mode/folding/fold_mode"),a("./theme/textmate"),b.config=a("./config"),b.require=a,b.edit=function(a){if("string"==typeof a){var f=a,a=document.getElementById(f);if(!a)throw new Error("ace.edit can't find div #"+f)}if(a.env&&a.env.editor instanceof e)return a.env.editor;var g=b.createEditSession(c.getInnerText(a));a.innerHTML="";var j=new e(new h(a));new i(j),j.setSession(g);var k={document:g,editor:j,onResize:j.resize.bind(j,null)};return d.addListener(window,"resize",k.onResize),j.on("destroy",function(){d.removeListener(window,"resize",k.onResize)}),a.env=j.env=k,j},b.createEditSession=function(a,b){var c=new f(a,b);return c.setUndoManager(new g),c},b.EditSession=f,b.UndoManager=g}),define("modules/fauxton/components",["app","api","ace/ace"],function(a,b,c){var d=a.module();return d.Pagination=b.View.extend({template:"templates/fauxton/pagination",initialize:function(a){this.page=parseInt(a.page,10),this.perPage=a.perPage,this.total=a.total,this.totalPages=Math.ceil(this.total/this.perPage),this.urlFun=a.urlFun},serialize:function(){return{page:this.page,perPage:this.perPage,total:this.total,totalPages:this.totalPages,urlFun:this.urlFun}}}),d.IndexPagination=b.View.extend({template:"templates/fauxton/index_pagination",events:{"click a":"scrollTo","click a#next":"nextClicked","click a#previous":"previousClicked"},previousIds:[],scrollTo:function(){this.scrollToSelector&&$(this.scrollToSelector).animate({scrollTop:0},"slow")},initialize:function(a){this.previousUrlfn=a.previousUrlfn,this.nextUrlfn=a.nextUrlfn,this.canShowPreviousfn=a.canShowPreviousfn,this.canShowNextfn=a.canShowNextfn,this.scrollToSelector=a.scrollToSelector,_.bindAll(this)},previousClicked:function(a){a.preventDefault(),this.canShowPreviousfn()&&(b.navigate(this.previousUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","previous"))},nextClicked:function(a){if(a.preventDefault(),this.canShowNextfn()){var c=this.collection.first();c&&this.previousIds.push(c.id),b.navigate(this.nextUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","next")}},serialize:function(){return{canShowNextfn:this.canShowNextfn,canShowPreviousfn:this.canShowPreviousfn}}}),d.Typeahead=b.View.extend({initialize:function(a){this.source=a.source,_.bindAll(this)},afterRender:function(){this.$el.typeahead({source:this.source})}}),d.DbSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.dbLimit=a.dbLimit||30,_.bindAll(this)},source:function(b,c){var d=[a.host,"/_all_dbs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.dbLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){c(a)}})}}),d.DocSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.docLimit=a.docLimit||30,this.database=a.database,_.bindAll(this)},source:function(b,c){var d=[a.host,"/",this.database.id,"/_all_docs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.docLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){var b=_.map(a.rows,function(a){return a.id});c(b)}})}}),d.Editor=b.View.extend({initialize:function(a){this.editorId=a.editorId,this.mode=a.mode||"json",this.commands=a.commands,this.theme=a.theme||"crimson_editor",this.couchJSHINT=a.couchJSHINT},afterRender:function(){this.editor=c.edit(this.editorId),this.editor.setTheme("ace/theme/"+this.theme),this.editor.getSession().setMode("ace/mode/"+this.mode),this.editor.getSession().setUseWrapMode(!0),this.editor.setShowPrintMargin(!1),this.editor.gotoLine(2),this.addCommands(),this.couchJSHINT&&this.removeIncorrectAnnotations()},addCommands:function(){_.each(this.commands,function(a){this.editor.commands.addCommand(a)},this)},removeIncorrectAnnotations:function(){var a=this.editor;this.editor.getSession().on("changeAnnotation",function(){var c=a.getSession().getAnnotations(),d=_.reduce(c,function(a,c){return b.isIgnorableError(c.raw)||a.push(c),a},[]);c.length!==d.length&&a.getSession().setAnnotations(d)})},setValue:function(a,b){b=b?b:-1,this.editor.setValue(a,b)},getValue:function(){return this.editor.getValue()},getAnnotations:function(){return this.editor.getSession().getAnnotations()},hadValidCode:function(){var a=this.getAnnotations();return _.every(a,function(a){return b.isIgnorableError(a.raw)},this)}}),d}),define("modules/databases/views",["app","modules/fauxton/components","api"],function(a,b,c){var d={};return d.Item=c.View.extend({template:"templates/databases/item",tagName:"tr",serialize:function(){return{encoded:encodeURIComponent(this.model.get("name")),database:this.model}}}),d.List=c.View.extend({dbLimit:20,perPage:20,template:"templates/databases/list",events:{"click button.all":"selectAll","submit form.database-search":"switchDatabase"},initialize:function(){var b=a.getParams();this.page=b.page?parseInt(b.page,10):1},serialize:function(){return{databases:this.collection}},switchDatabase:function(a){a.preventDefault();var b=this.$el.find("input.search-query").val();if(b){var d=["/database/",encodeURIComponent(b),"/_all_docs?limit=10"].join("");c.navigate(d)}},paginated:function(){var a=(this.page-1)*this.perPage,b=this.page*this.perPage;return this.collection.slice(a,b)},beforeRender:function(){this.insertView("#newButton",new d.NewDatabaseButton({collection:this.collection})),_.each(this.paginated(),function(a){this.insertView("table.databases tbody",new d.Item({model:a}))},this),this.insertView("#database-pagination",new b.Pagination({page:this.page,perPage:this.perPage,total:this.collection.length,urlFun:function(a){return"#/_all_dbs?page="+a}}))},setPage:function(a){this.page=a||1},afterRender:function(){this.dbSearchTypeahead=new b.DbSearchTypeahead({dbLimit:this.dbLimit,el:"input.search-query"}),this.dbSearchTypeahead.render()},selectAll:function(a){$("input:checkbox").attr("checked",!$(a.target).hasClass("active"))}}),d.NewDatabaseButton=c.View.extend({template:"templates/databases/newdatabase",events:{"click a#new":"newDatabase"},newDatabase:function(){var b,d,e=prompt("Name of database","newdatabase");if(null!==e){if(0===e.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;d=new this.collection.model({id:encodeURIComponent(e),name:e}),b=c.addNotification({msg:"Creating database."}),d.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var d="#/database/"+e+"/_all_docs?limit=100";a.router.navigate(d,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}}}),d.Sidebar=c.View.extend({template:"templates/databases/sidebar",events:{"click a#new":"newDatabase","click a#owned":"showMine","click a#shared":"showShared"},newDatabase:function(){var b,d,e=prompt("Name of database","newdatabase");if(null!==e){if(0===e.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;d=new this.collection.model({id:encodeURIComponent(e),name:e}),b=c.addNotification({msg:"Creating database."}),d.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var d="#/database/"+e+"/_all_docs?limit=100";a.router.navigate(d,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}},showMine:function(){$.contribute("Show unshared databases","app/addons/databases/views.js")},showShared:function(){$.contribute("Show shared databases (e.g. continuous replications to/from the database)","app/addons/databases/views.js")}}),d}),define("modules/databases/routes",["app","api","modules/databases/resources","modules/databases/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",crumbs:[{name:"Databases",link:"/_all_dbs"}],routes:{"":"allDatabases","index.html":"allDatabases","_all_dbs(:params)":"allDatabases"},apiUrl:function(){return[this.databases.url(),this.databases.documentation()]},selectedHeader:"Databases",initialize:function(){this.databases=new c.List,this.deferred=b.Deferred()},allDatabases:function(){var b=a.getParams(),c=b.page;this.databasesView=this.setView("#dashboard-content",new d.List({collection:this.databases})),this.databasesView.setPage(c)},establish:function(){var a=this.databases,c=this.deferred;return a.fetch().done(function(){b.when(a.map(function(a){return a.status.fetch()})).always(function(){c.resolve()})}),[c]}});return c.RouteObjects=[e],c}),define("modules/databases/base",["app","api","modules/databases/routes","modules/databases/views"],function(a,b,c,d){return c.Views=d,c.databaseUrl=function(a){var b=_.isObject(a)?a.id:a;return["/database/",b,"/_all_docs?limit=10"].join("")},c}),define("modules/pouchdb/pouch.collate.js",["app","api","modules/pouchdb/pouch.collate.js"],function(){var a={};a.collate=function(a,f){var g=e(a),h=e(f);return 0!==g-h?g-h:null===a?0:"number"==typeof a?a-f:"boolean"==typeof a?f>a?-1:1:"string"==typeof a?b(a,f):Array.isArray(a)?d(a,f):"object"==typeof a?c(a,f):void 0};var b=function(a,b){return a===b?0:a>b?1:-1},c=function(b,c){for(var d=Object.keys(b),e=Object.keys(c),f=Math.min(d.length,e.length),g=0;f>g;g++){var h=a.collate(d[g],e[g]);if(0!==h)return h;if(h=a.collate(b[d[g]],c[e[g]]),0!==h)return h}return d.length===e.length?0:d.length>e.length?1:-1},d=function(b,c){for(var d=Math.min(b.length,c.length),e=0;d>e;e++){var f=a.collate(b[e],c[e]);if(0!==f)return f}return b.length===c.length?0:b.length>c.length?1:-1},e=function(a){var b=["boolean","number","string","object"];return-1!==b.indexOf(typeof a)?null===a?1:b.indexOf(typeof a)+2:Array.isArray(a)?4.5:void 0};return a}),define("modules/pouchdb/pouchdb.mapreduce.js",["app","api","modules/pouchdb/pouch.collate.js"],function(app,FauxtonAPI,Collate){var Pouch={};Pouch.collate=Collate.collate;var MapReduce=function(){function viewQuery(fun,options){function sum(a){return a.reduce(function(a,b){return a+b},0)}if(console.log("IN VIEW QUERY"),options.complete){var results=[],current=null,num_started=0,completed=!1,emit=function(a,b){var c={id:current.doc._id,key:a,value:b};if(!(options.startkey&&Pouch.collate(a,options.startkey)<0||options.endkey&&Pouch.collate(a,options.endkey)>0||options.key&&0!==Pouch.collate(a,options.key))){if(num_started++,options.include_docs)throw{error:"Include Docs not supported"};console.log("EMITTING: ",c),results.push(c)}};eval("fun.map = "+fun.map.toString()+";"),fun.reduce&&options.reduce&&(builtInReduce[fun.reduce]&&(console.log("built in reduce"),fun.reduce=builtInReduce[fun.reduce]),eval("fun.reduce = "+fun.reduce.toString()+";"));var conflicts="conflicts"in options?options.conflicts:!1,checkComplete=function(){if(console.log("check"),completed&&results.length==num_started){if(results.sort(function(a,b){return Pouch.collate(a.key,b.key)}),options.descending&&results.reverse(),options.reduce===!1)return options.complete(null,{rows:results});console.log("reducing",options);var a=[];results.forEach(function(b){var c=a[a.length-1]||null;return c&&0===Pouch.collate(c.key[0][0],b.key)?(c.key.push([b.key,b.id]),c.value.push(b.value),void 0):(a.push({key:[[b.key,b.id]],value:[b.value]}),void 0)}),a.forEach(function(a){a.value=fun.reduce(a.key,a.value)||null,a.key=a.key[0][0]}),console.log("GROUPs",a),options.complete(null,{rows:a})}};return options.docs?(_.each(options.docs,function(a){current={doc:a},fun.map.call(this,a)},this),completed=!0,checkComplete()):!1}}function query(a,b,c){if("function"==typeof b&&(c=b,b={}),c&&(b.complete=c),"object"==typeof a)return console.log("RUNNING VIEW QUERY",a,b,arguments),viewQuery(a,b);throw{error:"Shouldn't have gotten here"}}var builtInReduce={_sum:function(a,b){return sum(b)},_count:function(a,b,c){return c?sum(b):b.length},_stats:function(a,b){return{sum:sum(b),min:Math.min.apply(null,b),max:Math.max.apply(null,b),count:b.length,sumsqr:function(){_sumsqr=0;for(var a in b)_sumsqr+=b[a]*b[a];return _sumsqr}()}}};return{query:query}};return MapReduce._delete=function(){},MapReduce()}),define("modules/pouchdb/base",["app","api","modules/pouchdb/pouchdb.mapreduce.js"],function(a,b,c){var d={};return d.MapReduce=c,d.runViewQuery=function(a,c){var e=b.Deferred(),f=function(a,b){e.resolve(b)},g=_.extend(c,{complete:f});return d.MapReduce.query(a,g),e},d});var q=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function a(a){function b(a){var b=a.charCodeAt(0);if(92!==b)return b;var c=a.charAt(1);return(b=l[c])?b:c>="0"&&"7">=c?parseInt(a.substring(1),8):"u"===c||"x"===c?parseInt(a.substring(2),16):a.charCodeAt(1)}function c(a){return 32>a?(16>a?"\\x0":"\\x")+a.toString(16):(a=String.fromCharCode(a),("\\"===a||"-"===a||"["===a||"]"===a)&&(a="\\"+a),a)}function d(a){for(var d=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=[],e=[],f="^"===d[0],g=f?1:0,h=d.length;h>g;++g){var i=d[g];if(/\\[bdsw]/i.test(i))a.push(i);else{var j,i=b(i);h>g+2&&"-"===d[g+1]?(j=b(d[g+2]),g+=2):j=i,e.push([i,j]),65>j||i>122||(65>j||i>90||e.push([32|Math.max(65,i),32|Math.min(j,90)]),97>j||i>122||e.push([-33&Math.max(97,i),-33&Math.min(j,122)]))}}for(e.sort(function(a,b){return a[0]-b[0]||b[1]-a[1]}),d=[],i=[0/0,0/0],g=0;g<e.length;++g)h=e[g],h[0]<=i[1]+1?i[1]=Math.max(i[1],h[1]):d.push(i=h);for(e=["["],f&&e.push("^"),e.push.apply(e,a),g=0;g<d.length;++g)h=d[g],e.push(c(h[0])),h[1]>h[0]&&(h[1]+1>h[0]&&e.push("-"),e.push(c(h[1])));return e.push("]"),e.join("")}function e(a){for(var b=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=b.length,e=[],h=0,i=0;c>h;++h){var j=b[h];"("===j?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(e[j]=-1)}for(h=1;h<e.length;++h)-1===e[h]&&(e[h]=++f);for(i=h=0;c>h;++h)j=b[h],"("===j?(++i,void 0===e[i]&&(b[h]="(?:")):"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(b[h]="\\"+e[i]);for(i=h=0;c>h;++h)"^"===b[h]&&"^"!==b[h+1]&&(b[h]="");if(a.ignoreCase&&g)for(h=0;c>h;++h)j=b[h],a=j.charAt(0),j.length>=2&&"["===a?b[h]=d(j):"\\"!==a&&(b[h]=j.replace(/[A-Za-z]/g,function(a){return a=a.charCodeAt(0),"["+String.fromCharCode(-33&a,32|a)+"]"}));return b.join("")}for(var f=0,g=!1,h=!1,i=0,j=a.length;j>i;++i){var k=a[i];if(k.ignoreCase)h=!0;else if(/[a-z]/i.test(k.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){g=!0,h=!1;break}}for(var l={b:8,t:9,n:10,v:11,f:12,r:13},m=[],i=0,j=a.length;j>i;++i){if(k=a[i],k.global||k.multiline)throw Error(""+k);m.push("(?:"+e(k)+")")}return RegExp(m.join("|"),h?"gi":"g")}function b(a){function b(a){switch(a.nodeType){case 1:if(d.test(a.className))break;for(var c=a.firstChild;c;c=c.nextSibling)b(c);c=a.nodeName,("BR"===c||"LI"===c)&&(e[h]="\n",g[h<<1]=f++,g[1|h++<<1]=a);break;case 3:case 4:c=a.nodeValue,c.length&&(c=i?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[h]=c,g[h<<1]=f,f+=c.length,g[1|h++<<1]=a)}}var c,d=/(?:^|\s)nocode(?:\s|$)/,e=[],f=0,g=[],h=0;a.currentStyle?c=a.currentStyle.whiteSpace:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=c&&"pre"===c.substring(0,3);return b(a),{a:e.join("").replace(/\n$/,""),c:g}}function c(a,b,c,d){b&&(a={a:b,d:a},c(a),d.push.apply(d,a.e))}function d(b,d){function e(a){for(var b=a.d,j=[b,"pln"],k=0,l=a.a.match(f)||[],m={},n=0,o=l.length;o>n;++n){var p,q=l[n],r=m[q],s=void 0;if("string"==typeof r)p=!1;else{var t=g[q.charAt(0)];if(t)s=q.match(t[1]),r=t[0];else{for(p=0;i>p;++p)if(t=d[p],s=q.match(t[1])){r=t[0];break}s||(r="pln")}!(p=r.length>=5&&"lang-"===r.substring(0,5))||s&&"string"==typeof s[1]||(p=!1,r="src"),p||(m[q]=r)}if(t=k,k+=q.length,p){p=s[1];var u=q.indexOf(p),v=u+p.length;s[2]&&(v=q.length-s[2].length,u=v-p.length),r=r.substring(5),c(b+t,q.substring(0,u),e,j),c(b+t+u,p,h(r,p),j),c(b+t+v,q.substring(v),e,j)}else j.push(b+t,r)}a.e=j}var f,g={};!function(){for(var c=b.concat(d),e=[],h={},i=0,j=c.length;j>i;++i){var k=c[i],l=k[3];if(l)for(var m=l.length;--m>=0;)g[l.charAt(m)]=k;k=k[1],l=""+k,h.hasOwnProperty(l)||(e.push(k),h[l]=q)}e.push(/[\S\s]/),f=a(e)}();var i=d.length;return e}function e(a){var b=[],c=[];a.tripleQuotedStrings?b.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?b.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):b.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),a.verbatimStrings&&c.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var e=a.hashComments;return e&&(a.cStyleComments?(e>1?b.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):b.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),c.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):b.push(["com",/^#[^\n\r]*/,q,"#"])),a.cStyleComments&&(c.push(["com",/^\/\/[^\n\r]*/,q]),c.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),a.regexLiterals&&c.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(e=a.types)&&c.push(["typ",e]),a=(""+a.keywords).replace(/^ | $/g,""),a.length&&c.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]),b.push(["pln",/^\s+/,q," \r\n	 "]),c.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),d(b,c)}function f(a,b){function c(a){switch(a.nodeType){case 1:if(f.test(a.className))break;if("BR"===a.nodeName)d(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)c(a);
-break;case 3:case 4:if(i){var b=a.nodeValue,e=b.match(g);if(e){var j=b.substring(0,e.index);a.nodeValue=j,(b=b.substring(e.index+e[0].length))&&a.parentNode.insertBefore(h.createTextNode(b),a.nextSibling),d(a),j||a.parentNode.removeChild(a)}}}}function d(a){function b(a,c){var d=c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),f=a.nextSibling;e.appendChild(d);for(var g=f;g;g=f)f=g.nextSibling,e.appendChild(g)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var c,a=b(a.nextSibling,0);(c=a.parentNode)&&1===c.nodeType;)a=c;j.push(a)}var e,f=/(?:^|\s)nocode(?:\s|$)/,g=/\r\n?|\n/,h=a.ownerDocument;a.currentStyle?e=a.currentStyle.whiteSpace:window.getComputedStyle&&(e=h.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=e&&"pre"===e.substring(0,3);for(e=h.createElement("LI");a.firstChild;)e.appendChild(a.firstChild);for(var j=[e],k=0;k<j.length;++k)c(j[k]);b===(0|b)&&j[0].setAttribute("value",b);var l=h.createElement("OL");l.className="linenums";for(var m=Math.max(0,0|b-1)||0,k=0,n=j.length;n>k;++k)e=j[k],e.className="L"+(k+m)%10,e.firstChild||e.appendChild(h.createTextNode(" ")),l.appendChild(e);a.appendChild(l)}function g(a,b){for(var c=b.length;--c>=0;){var d=b[c];u.hasOwnProperty(d)?window.console&&console.warn("cannot override language handler %s",d):u[d]=a}}function h(a,b){return a&&u.hasOwnProperty(a)||(a=/^\s*</.test(b)?"default-markup":"default-code"),u[a]}function i(a){var c=a.g;try{var d=b(a.h),e=d.a;a.a=e,a.c=d.c,a.d=0,h(c,e)(a);var f=/\bMSIE\b/.test(navigator.userAgent),c=/\n/g,g=a.a,i=g.length,d=0,j=a.c,k=j.length,e=0,l=a.e,m=l.length,a=0;l[m]=i;var n,o;for(o=n=0;m>o;)l[o]!==l[o+2]?(l[n++]=l[o++],l[n++]=l[o++]):o+=2;for(m=n,o=n=0;m>o;){for(var p=l[o],q=l[o+1],r=o+2;m>=r+2&&l[r+1]===q;)r+=2;l[n++]=p,l[n++]=q,o=r}for(l.length=n;k>e;){var s,t=j[e+2]||i,u=l[a+2]||i,r=Math.min(t,u),v=j[e+1];if(1!==v.nodeType&&(s=g.substring(d,r))){f&&(s=s.replace(c,"\r")),v.nodeValue=s;var w=v.ownerDocument,x=w.createElement("SPAN");x.className=l[a+1];var y=v.parentNode;y.replaceChild(x,v),x.appendChild(v),t>d&&(j[e+1]=v=w.createTextNode(g.substring(r,t)),y.insertBefore(v,x.nextSibling))}d=r,d>=t&&(e+=2),d>=u&&(a+=2)}}catch(z){"console"in window&&console.log(z&&z.stack?z.stack:z)}}var j=["break,continue,do,else,for,if,return,while"],k=[[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[k,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[k,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],n=[m,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],k=[k,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],o=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],p=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],j=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],r=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,s=/\S/,t=e({keywords:[l,n,k,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+o,p,j],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),u={};g(t,["default-code"]),g(d([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),g(d([["pln",/^\s+/,q," 	\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),g(d([],[["atv",/^[\S\s]+/]]),["uq.val"]),g(e({keywords:l,hashComments:!0,cStyleComments:!0,types:r}),["c","cc","cpp","cxx","cyc","m"]),g(e({keywords:"null,true,false"}),["json"]),g(e({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:r}),["cs"]),g(e({keywords:m,cStyleComments:!0}),["java"]),g(e({keywords:j,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),g(e({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),g(e({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),g(e({keywords:p,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),g(e({keywords:k,cStyleComments:!0,regexLiterals:!0}),["js"]),g(e({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),g(d([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(a,b,c){var d=document.createElement("PRE");return d.innerHTML=a,c&&f(d,c),i({g:b,i:c,h:d}),d.innerHTML},window.prettyPrint=function(a){function b(){for(var c=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:1/0;l<d.length&&j.now()<c;l++){var e=d[l],g=e.className;if(g.indexOf("prettyprint")>=0){var h,n,g=g.match(m);if(n=!g){n=e;for(var o=void 0,p=n.firstChild;p;p=p.nextSibling)var q=p.nodeType,o=1===q?o?n:p:3===q?s.test(p.nodeValue)?n:o:o;n=(h=o===n?void 0:o)&&"CODE"===h.tagName}for(n&&(g=h.className.match(m)),g&&(g=g[1]),n=!1,o=e.parentNode;o;o=o.parentNode)if(("pre"===o.tagName||"code"===o.tagName||"xmp"===o.tagName)&&o.className&&o.className.indexOf("prettyprint")>=0){n=!0;break}n||((n=(n=e.className.match(/\blinenums\b(?::(\d+))?/))?n[1]&&n[1].length?+n[1]:!0:!1)&&f(e,n),k={g:g,h:e,i:n},i(k))}}l<d.length?setTimeout(b,250):a&&a()}for(var c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[],e=0;e<c.length;++e)for(var g=0,h=c[e].length;h>g;++g)d.push(c[e][g]);var c=q,j=Date;j.now||(j={now:function(){return+new Date}});var k,l=0,m=/\blang(?:uage)?-([\w.]+)(?!\S)/;b()},window.PR={createSimpleLexer:d,registerLangHandler:g,sourceDecorator:e,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}(),define("plugins/prettify",function(){}),define("modules/documents/views",["app","api","modules/fauxton/components","modules/documents/resources","modules/pouchdb/base","resizeColumns","plugins/prettify"],function(a,b,c,d,e){var f={};return f.Tabs=b.View.extend({template:"templates/documents/tabs",initialize:function(a){this.collection=a.collection,this.database=a.database,this.active_id=a.active_id},events:{"click #delete-database":"delete_database"},serialize:function(){return{changes_url:"#"+this.database.url("changes"),db_url:"#"+this.database.url("index")+"?limit=100"}},beforeRender:function(){this.insertView("#search",new f.SearchBox({collection:this.collection,database:this.database.id}))},afterRender:function(){this.active_id&&(this.$(".active").removeClass("active"),this.$("#"+this.active_id).addClass("active"))},delete_database:function(b){b.preventDefault();var c=confirm("Are you sure you want to delete this database?");if(c)return this.database.destroy().done(function(){a.router.navigate("#/_all_dbs",{trigger:!0})})}}),f.SearchBox=b.View.extend({template:"templates/documents/search",tagName:"form",initialize:function(a){this.collection=a.collection,this.database=a.database},afterRender:function(){var a=this.collection,c=this.$el,d=c.find("input#searchbox"),e=this.database;c.submit(function(a){a.preventDefault();var f=c.find("input#view").val().split("/"),g="#database/"+e+"/_design/";g+=f[0]+"/_view/"+f[1],""!==d.val()&&(g+='?startkey="'+d.val()+'"'),b.navigate(g)}),d.typeahead({source:function(){var b=_.map(a.pluck("doc"),function(a){return _.map(_.keys(a.views),function(b){return a._id.split("/")[1]+"/"+b})});return _.flatten(b)},minLength:3,updater:function(a){this.$element.removeClass("span12"),this.$element.addClass("span6"),this.$element.attr("placeholder","Search by view key"),$('<span class="add-on span6">'+a+"</span>").insertBefore(this.$element),$('<input type="hidden" id="view" value="'+a+'"/>').insertBefore(this.$element),$(".typehead").unbind()}})}}),f.UploadModal=b.View.extend({template:"templates/documents/upload_modal",disableLoader:!0,initialize:function(){_.bindAll(this)},events:{"click a#upload-btn":"uploadFile"},uploadFile:function(a){a.preventDefault();var b=this.model.get("_rev"),c=this,d=this.$("#file-upload");return b?0===$('input[type="file"]')[0].files.length?this.set_error_msg("Selected a file to be uploaded."):(this.$("#_rev").val(b),d.ajaxSubmit({url:this.model.url(),type:"POST",beforeSend:this.beforeSend,uploadProgress:this.uploadProgress,success:this.success,error:function(a){return console.log("ERR on upload",a),c.set_error_msg("Could not upload document: "+JSON.parse(a.responseText).reason)}}),void 0):this.set_error_msg("The document needs to be saved before adding an attachment.")},success:function(){var a=this.hideModal,c=this.$("#file-upload");b.triggerRouteEvent("reRenderDoc"),setTimeout(function(){c.clearForm(),a(),$(".modal-backdrop").remove()},1e3)},uploadProgress:function(a,b,c,d){this.$(".bar").css({width:d+"%"})},beforeSend:function(){this.$(".progress").removeClass("hide")},showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),f.DuplicateDocModal=b.View.extend({template:"templates/documents/duplicate_doc_modal",initialize:function(){_.bindAll(this)},events:{"click #duplicate-btn":"duplicate"},duplicate:function(a){a.preventDefault();var c=this.$("#dup-id").val();this.hideModal(),b.triggerRouteEvent("duplicateDoc",c)},_showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},showModal:function(){var a=this._showModal,c=this.setDefaultIdValue,d=new b.UUID;d.fetch().then(function(){c(d.next()),a()})},setDefaultIdValue:function(a){this.$("#dup-id").val(a)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),f.FieldEditorTabs=b.View.extend({template:"templates/documents/doc_field_editor_tabs",disableLoader:!0,initialize:function(a){this.selected=a.selected},events:{},updateSelected:function(a){this.selected=a,this.$(".active").removeClass("active"),this.$("#"+this.selected).addClass("active")},serialize:function(){var a=this.selected;return{doc:this.model,isNewDoc:this.model.isNewDoc(),isSelectedClass:function(b){return b&&b===a?"active":""}}},establish:function(){return[this.model.fetch()]}}),f.Document=b.View.extend({template:"templates/documents/all_docs_item",tagName:"tr",className:"all-docs-item",events:{"click button.delete":"destroy"},attributes:function(){return{"data-id":this.model.id}},serialize:function(){return{doc:this.model}},establish:function(){return[this.model.fetch()]},destroy:function(a){a.preventDefault();var c=this;return window.confirm("Are you sure you want to delete this doc?")?(this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),c.$el.fadeOut(function(){c.remove()}),c.model.collection.remove(c.model.id)},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})}),void 0):!1}}),f.Row=b.View.extend({template:"templates/documents/index_row_docular",tagName:"tr",events:{"click button.delete":"destroy"},destroy:function(a){a.preventDefault(),window.alert("Cannot delete a document generated from a view.")},serialize:function(){return{doc:this.model}}}),f.IndexItem=b.View.extend({template:"templates/documents/index_menu_item",tagName:"li",initialize:function(a){this.index=a.index,this.ddoc=a.ddoc,this.database=a.database,this.selected=!!a.selected},serialize:function(){return{index:this.index,ddoc:this.ddoc,database:this.database,selected:this.selected}},afterRender:function(){this.selected&&($("#sidenav ul.nav-list li").removeClass("active"),this.$el.addClass("active"))}}),f.AllDocsNumber=b.View.extend({template:"templates/documents/all_docs_number",initialize:function(a){this.newView=a.newView||!1,this.listenTo(this.collection,"totalRows:decrement",this.render)},serialize:function(){var a=0,b=0,c=!1;return this.newView||(a=this.collection.totalRows(),c=this.collection.updateSeq()),b=this.collection.recordStart(),{database:this.collection.database.id,updateSeq:c,offset:b,totalRows:a,numModels:this.collection.models.length+b-1}}}),f.AllDocsLayout=b.View.extend({template:"templates/documents/all_docs_layout",className:"row",initialize:function(a){this.database=a.database,this.params=a.params},events:{"click #toggle-query":"toggleQuery"},toggleQuery:function(){this.$("#query").toggle("fast")},beforeRender:function(){this.advancedOptions=this.insertView("#query",new f.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,hasReduce:!1,showPreview:!1,database:this.database})),this.$("#query").hide()},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params)},updateView:function(a,c){a.preventDefault();var d=c.errorParams,e=c.params;if(_.any(d))return _.map(d,function(a){return b.addNotification({msg:"JSON Parse Error on field: "+a.name,type:"error",selector:".advanced-options .errors-container"})}),b.addNotification({msg:"Make sure that strings are properly quoted and any other values are valid JSON structures",type:"warning",selector:".advanced-options .errors-container"}),!1;var f=window.location.hash.replace(/\?.*$/,"");f=f+"?"+$.param(e),b.navigate(f,{trigger:!1}),b.triggerRouteEvent("updateAllDocs",{allDocs:!0})},previewView:function(a){a.preventDefault()}}),f.AllDocsList=b.View.extend({template:"templates/documents/all_docs_list",events:{"click button.all":"selectAll","click button.bulk-delete":"bulkDelete","click #collapse":"collapse","change .row-select":"toggleTrash"},toggleTrash:function(){this.$(".row-select:checked").length>0?this.$(".bulk-delete").removeClass("disabled"):this.$(".bulk-delete").addClass("disabled")},initialize:function(a){this.nestedView=a.nestedView||f.Document,this.rows={},this.viewList=!!a.viewList,this.database=a.database,a.ddocInfo&&(this.designDocs=a.ddocInfo.designDocs,this.ddocID=a.ddocInfo.id),this.newView=a.newView||!1,this.expandDocs=!0,this.addPagination()},establish:function(){return this.newView?null:this.collection.fetch({reset:!0}).fail(function(){console.log("ERROR: ",arguments)})},selectAll:function(a){$("input:checkbox").prop("checked",!$(a.target).hasClass("active")).trigger("change")},serialize:function(){var a=!1;return this.collection.requestDurationInString&&(a=this.collection.requestDurationInString()),{viewList:this.viewList,requestDuration:a,expandDocs:this.expandDocs}},collapse:function(a){a.preventDefault(),this.expandDocs=this.expandDocs?!1:!0,this.render()},bulkDelete:function(){var a=this,c=this.$el.find("input.row-select:checked").parents("tr.all-docs-item").map(function(){return $(this).attr("data-id")}).get();return 0!==c.length&&window.confirm("Are you sure you want to delete these "+c.length+" docs?")?(_.each(c,function(c){var d=this.collection.get(c);d.destroy().then(function(){a.rows[c].$el.fadeOut(function(){$(this).remove()}),d.collection.remove(d.id),a.$(".bulk-delete").addClass("disabled")},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},this),void 0):!1},addPagination:function(){var a=this.collection;this.pagination=new c.IndexPagination({collection:this.collection,scrollToSelector:"#dashboard-content",previousUrlfn:function(){return a.urlPreviousPage(20,this.previousIds.pop())},canShowPreviousfn:function(){return 0===a.viewMeta.offset?!1:!0},canShowNextfn:function(){return 0===a.length||a.viewMeta.offset+a.length+2>=a.viewMeta.total_rows?!1:!0},nextUrlfn:function(){return a.urlNextPage(20)}})},beforeRender:function(){this.allDocsNumber=this.setView("#item-numbers",new f.AllDocsNumber({collection:this.collection,newView:this.newView})),this.insertView("#documents-pagination",this.pagination);var a=this.expandDocs?this.collection:this.collection.simple();a.each(function(a){this.rows[a.id]=this.insertView("table.all-docs tbody",new this.nestedView({model:a}))},this)},afterRender:function(){prettyPrint()}}),f.Doc=b.View.extend({template:"templates/documents/doc",events:{"click button.save-doc":"saveDoc","click button.delete":"destroy","click button.duplicate":"duplicate","click button.upload":"upload","click button.cancel-button":"goback"},disableLoader:!0,initialize:function(a){this.database=a.database,_.bindAll(this)},goback:function(){window.history.back()},destroy:function(){if(this.model.isNewDoc())return b.addNotification({msg:"This document has not been saved yet.",type:"warning"}),void 0;if(!window.confirm("Are you sure you want to delete this doc?"))return!1;var a=this.model.database;this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),b.navigate(a.url("index"))},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},beforeRender:function(){this.uploadModal=this.setView("#upload-modal",new f.UploadModal({model:this.model})),this.uploadModal.render(),this.duplicateModal=this.setView("#duplicate-modal",new f.DuplicateDocModal({model:this.model})),this.duplicateModal.render()},upload:function(a){return a.preventDefault(),this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before uploading an attachment.",type:"warning"}),void 0):(this.uploadModal.showModal(),void 0)},duplicate:function(a){return this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before duplicating it.",type:"warning"}),void 0):(a.preventDefault(),this.duplicateModal.showModal(),void 0)},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},establish:function(){var a=this.model.fetch(),c=this.database.id,d=$.Deferred();return a.then(function(){d.resolve()},function(a){404===a.status&&(b.addNotification({msg:"The document does not exist",type:"error",clear:!0}),b.navigate("/database/"+c+"/_all_docs?limit=20")),d.reject()}),d},saveDoc:function(){var a,c=this,d=this.getDocFromEditor();d?(this.getDocFromEditor(),a=b.addNotification({msg:"Saving document."}),this.model.save().then(function(){b.navigate("/database/"+c.database.id+"/"+c.model.id)}).fail(function(c){var d=JSON.parse(c.responseText).reason;a=b.addNotification({msg:"Save failed: "+d,type:"error",clear:!0,selector:"#doc .errors-container"})})):this.model.validationError&&"Cannot change a documents id."===this.model.validationError?(a=b.addNotification({msg:"Cannot save: Cannot change a documents _id, try Duplicate doc instead!",type:"error",selector:"#doc .errors-container"}),delete this.model.validationError):a=b.addNotification({msg:"Please fix the JSON errors and try again.",type:"error",selector:"#doc .errors-container"})},getDocFromEditor:function(){return this.hasValidCode()?(json=JSON.parse(this.editor.getValue()),this.model.set(json,{validate:!0}),this.model.validationError?!1:this.model):!1},hasValidCode:function(){var a=this.editor.getAnnotations();return 0===a.length},serialize:function(){return{doc:this.model,attachments:this.getAttachments()}},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):!1},afterRender:function(){var a=this.saveDoc;this.editor=new c.Editor({editorId:"editor-container",commands:[{name:"save",bindKey:{win:"Ctrl-S",mac:"Ctrl-S"},exec:function(){a()},readOnly:!0}]}),this.editor.render(),this.model.on("sync",this.updateValues,this)}}),f.DocFieldEditor=b.View.extend({template:"templates/documents/doc_field_editor",disableLoader:!0,events:{"click button.save":"saveDoc"},saveDoc:function(){b.addNotification({type:"warning",msg:"Save functionality coming soon."})},serialize:function(){return{doc:this.getModelWithoutAttachments(),attachments:this.getAttachments()}},getModelWithoutAttachments:function(){var a=this.model.toJSON();return delete a._attachments,a},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):[]},establish:function(){return[this.model.fetch()]}}),f.AdvancedOptions=b.View.extend({template:"templates/documents/advanced_options",className:"advanced-options well",initialize:function(a){this.database=a.database,this.ddocName=a.ddocName,this.viewName=a.viewName,this.updateViewFn=a.updateViewFn,this.previewFn=a.previewFn,this.hadReduce=a.hasReduce||!0,this.hasReduce="undefined"==typeof a.hasReduce?!0:a.hasReduce,this.showPreview="undefined"==typeof a.showPreview?!0:a.showPreview},events:{"change form.view-query-update input":"updateFilters","change form.view-query-update select":"updateFilters","submit form.view-query-update":"updateView","click button.preview":"previewView"},beforeRender:function(){if(this.viewName&&this.ddocName){var a=b.getExtensions("advancedOptions:ViewButton");_.each(a,function(a){this.insertView("#button-options",a),a.update(this.database,this.ddocName,this.viewName)},this)}},queryParams:function(){var a=this.$(".view-query-update"),b=_.filter(a.serializeArray(),function(a){return a.value}),c=["key","keys","startkey","endkey"],d=_.filter(b,function(a){if(!_.contains(c,a.name))return!1;try{return JSON.parse(a.value),!1}catch(b){return!0}});return{params:b,errorParams:d}},updateFilters:function(a){a.preventDefault();var b=$(a.currentTarget),c=b.attr("name");this.updateFiltersFor(c,b)},updateFiltersFor:function(a,c){var d=c.parents("form.view-query-update:first");switch(a){case"reduce":c.prop("checked")===!0?(d.find("input[name=include_docs]").prop("checked")===!0&&(d.find("input[name=include_docs]").prop("checked",!1),b.addNotification({msg:"include_docs has been disabled as you cannot include docs on a reduced view",type:"warn",selector:".view.show .all-docs-list.errors-container"})),d.find("input[name=include_docs]").prop("disabled",!0),d.find("select[name=group_level]").prop("disabled",!1)):(d.find("select[name=group_level]").prop("disabled",!0),d.find("input[name=include_docs]").prop("disabled",!1));break;case"include_docs":}},updateFromParams:function(a){var b=this.$el.find("form.view-query-update");_.each(a,function(a,c){var d;switch(c){case"limit":case"group_level":b.find("select[name='"+c+"']").val(a);break;case"include_docs":case"stale":case"descending":case"inclusive_end":b.find("input[name='"+c+"']").prop("checked",!0);break;case"reduce":d=b.find("input[name='"+c+"']"),"true"==a&&d.prop("checked",!0),this.updateFiltersFor(c,d);break;default:b.find("input[name='"+c+"']").val(a)}},this)},updateView:function(a){this.updateViewFn(a,this.queryParams())},previewView:function(a){this.previewFn(a,this.queryParams())},serialize:function(){return{hasReduce:this.hasReduce,showPreview:this.showPreview}}}),f.DesignDocSelector=b.View.extend({template:"templates/documents/design_doc_selector",events:{"change select#ddoc":"updateDesignDoc"},initialize:function(a){this.ddocName=a.ddocName,this.database=a.database,this.listenTo(this.collection,"add",this.ddocAdded)},ddocAdded:function(a){this.ddocName=a.id,this.render()},serialize:function(){return{ddocName:this.ddocName,ddocs:this.collection}},updateDesignDoc:function(){"new-doc"===this.$("#ddoc :selected").prop("id")?this.$("#new-ddoc-section").show():this.$("#new-ddoc-section").hide()},newDesignDoc:function(){return"new-doc"===this.$("#ddoc :selected").prop("id")},getCurrentDesignDoc:function(){if(this.newDesignDoc()){var a={_id:"_design/"+this.$("#new-ddoc").val(),views:{},language:"javascript"};return new d.Doc(a,{database:this.database})}var b=this.$("#ddoc").val();return this.collection.find(function(a){return a.id===b}).dDocModel()}}),f.ViewEditor=b.View.extend({template:"templates/documents/view_editor",builtinReduces:["_sum","_count","_stats"],events:{"click button.save":"saveView","click button.delete":"deleteView","change select#reduce-function-selector":"updateReduce","click #db-views-tabs-nav":"toggleIndexNav"},langTemplates:{javascript:{map:"function(doc) {\n  emit(doc._id, 1);\n}",reduce:"function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}"}},defaultLang:"javascript",initialize:function(a){this.newView=a.newView||!1,this.ddocs=a.ddocs,this.params=a.params,this.database=a.database,this.newView?this.viewName="newView":(this.ddocID=a.ddocInfo.id,this.viewName=a.viewName,this.ddocInfo=new d.DdocInfo({_id:this.ddocID},{database:this.database})),_.bindAll(this)},establish:function(){return this.ddocInfo?this.ddocInfo.fetch():void 0},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},updateReduce:function(){var a=$("#reduce-function-selector"),b=$(".control-group.reduce-function");"CUSTOM"==a.val()?(this.createReduceEditor(),b.show()):b.hide()},deleteView:function(a){if(a.preventDefault(),this.newView)return alert("Cannot delete a new view.");if(confirm("Are you sure you want to delete this view?")){var c,d=this,e=this.$("#index-name").val(),f=(this.$("#ddoc :selected").val(),this.getCurrentDesignDoc());f.removeDdocView(e),c=f.hasViews()?f.save():f.destroy(),c.then(function(){b.navigate("/database/"+d.database.id+"/_all_docs?limit=100"),b.triggerRouteEvent("reloadDesignDocs")})}},saveView:function(a){var c,d=this;if(a&&a.preventDefault(),this.hasValidCode()&&""!==this.$("#new-ddoc:visible").val()){var e=this.mapEditor.getValue(),f=this.reduceVal(),g=this.$("#index-name").val(),h=this.getCurrentDesignDoc(),i=h.id;this.viewName=g,c=b.addNotification({msg:"Saving document.",selector:"#define-view .errors-container"}),h.setDdocView(g,e,f),h.save().then(function(){if(b.addNotification({msg:"View has been saved.",type:"success",selector:"#define-view .errors-container"}),d.newView){var a="/database/"+d.database.id+"/"+i+"/_view/"+g;b.navigate(a,{trigger:!1}),b.triggerRouteEvent("reloadDesignDocs",{selectedTab:i.replace("_design/","")+"_"+g}),d.newView=!1}b.triggerRouteEvent("updateAllDocs",{ddoc:i,view:g})},function(a){var d=JSON.parse(a.responseText).reason;c=b.addNotification({msg:"Save failed: "+d,type:"error",clear:!0})})}else{var j=""===this.$("#new-ddoc:visible").val()?"Enter a design doc name":"Please fix the Javascript errors and try again.";c=b.addNotification({msg:j,type:"error",selector:"#define-view .errors-container"})}},previewView:function(a,c){var d=this,f=this.mapEditor.getValue(),g=this.reduceVal(),h=c.params,i=_.reduce(h,function(a,b){return a[b.name]=b.value,a},{reduce:!1});a.preventDefault(),b.addNotification({msg:"<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",type:"warning",selector:".advanced-options .errors-container",fade:!0});var j=b.Deferred();this.database.allDocs?j.resolve():(this.database.buildAllDocs({limit:"100",include_docs:!0}),j=this.database.allDocs.fetch()),j.then(function(){i.docs=d.database.allDocs.map(function(a){return a.get("doc")});var a=e.runViewQuery({map:f,reduce:g},i);a.then(function(a){b.triggerRouteEvent("updatePreviewDocs",{rows:a.rows,ddoc:d.getCurrentDesignDoc().id,view:d.viewName})})})},getCurrentDesignDoc:function(){return this.designDocSelector.getCurrentDesignDoc()},isCustomReduceEnabled:function(){return"CUSTOM"==$("#reduce-function-selector").val()},reduceVal:function(){var a=this.$("#reduce-function-selector :selected").val(),b="";return"CUSTOM"===a?b=this.reduceEditor.getValue():"NONE"!==a&&(b=a),b},hasValidCode:function(){return _.every(["mapEditor","reduceEditor"],function(a){var b=this[a];return"reduceEditor"!==a||this.isCustomReduceEnabled()?b.hadValidCode():!0},this)},toggleIndexNav:function(a){var b=this.$("#index"),c=this.$(a.target).attr("id");if("index-nav"===c){if(this.newView)return;b.toggle("slow");var d=this;setTimeout(function(){d.showEditors()},100)}else b.removeAttr("style")},serialize:function(){return{ddocs:this.ddocs,ddoc:this.model,ddocName:this.model.id,viewName:this.viewName,reduceFunStr:this.reduceFunStr,hasReduce:this.reduceFunStr,isCustomReduce:this.hasCustomReduce(),newView:this.newView,langTemplates:this.langTemplates.javascript}},hasCustomReduce:function(){return this.reduceFunStr&&!_.contains(this.builtinReduces,this.reduceFunStr)},createReduceEditor:function(){this.reduceEditor&&this.reduceEditor.remove(),this.reduceEditor=new c.Editor({editorId:"reduce-function",mode:"javascript",couchJSHINT:!0}),this.reduceEditor.render()},beforeRender:function(){this.newView?(this.reduceFunStr="_sum",this.model=0===this.ddocs.length?new d.Doc(null,{database:this.database}):this.ddocs.first().dDocModel(),this.ddocID=this.model.id):(this.model=this.ddocs.get(this.ddocID).dDocModel(),this.reduceFunStr=this.model.viewHasReduce(this.viewName),this.setView("#ddoc-info",new f.DdocInfo({model:this.ddocInfo}))),this.designDocSelector=this.setView(".design-doc-group",new f.DesignDocSelector({collection:this.ddocs,ddocName:this.model.id,database:this.database})),this.advancedOptions=this.insertView("#query",new f.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,database:this.database,viewName:this.viewName,ddocName:this.model.id}))},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params),this.designDocSelector.updateDesignDoc(),this.newView?this.showEditors():(this.$("#index").hide(),this.$("#index-nav").parent().removeClass("active"))
-},showEditors:function(){this.mapEditor=new c.Editor({editorId:"map-function",mode:"javascript",couchJSHINT:!0}),this.mapEditor.render(),this.hasCustomReduce()?this.createReduceEditor():$(".control-group.reduce-function").hide(),this.newView&&(this.mapEditor.setValue(this.langTemplates[this.defaultLang].map),this.reduceEditor.setValue(this.langTemplates[this.defaultLang].reduce))}}),f.JumpToDoc=b.View.extend({template:"templates/documents/jumpdoc",initialize:function(a){this.database=a.database},events:{"submit #jump-to-doc":"jumpToDoc","click #jump-to-doc-label":"jumpToDoc"},jumpToDoc:function(a){a.preventDefault();var c=this.$("#jump-to-doc-id").val();b.navigate("/database/"+this.database.id+"/"+c,{trigger:!0})},afterRender:function(){this.typeAhead=new c.DocSearchTypeahead({el:"#jump-to-doc-id",database:this.database}),this.typeAhead.render()}}),f.Sidebar=b.View.extend({template:"templates/documents/sidebar",events:{"click button#delete-database":"deleteDatabase"},initialize:function(a){this.database=a.database,this.showNewView=!0,a.ddocInfo&&(this.ddocID=a.ddocInfo.id,this.currView=a.ddocInfo.currView)},deleteDatabase:function(a){a.preventDefault();var c=confirm("Are you sure you want to delete this database?");if(c){var d=this.database.id;this.database.destroy().then(function(){b.navigate("#/_all_dbs"),b.addNotification({msg:"The database "+d+" has been deleted."})}).fail(function(a,c,d){b.addNotification({msg:"Could not delete the database, reason "+d+".",type:"error"})})}},serialize:function(){var a=b.getExtensions("docLinks");return{changes_url:"#"+this.database.url("changes"),permissions_url:"#"+this.database.url("app")+"/permissions",db_url:"#"+this.database.url("index")+"?limit=100",database:this.collection.database,database_url:"#"+this.database.url("app"),docLinks:a,showNewView:this.showNewView}},buildIndexList:function(a,b,c){_.each(_.keys(a),function(a){var d=this.ddocID=="_design/"+c;this.insertView("ul.nav."+b,new f.IndexItem({ddoc:c,index:a,database:this.collection.database.id,selected:d&&a==this.currView}))},this)},beforeRender:function(){this.collection.each(function(a){if(a.has("doc")){var b=a.id.split("/")[1];a.get("doc").views&&this.buildIndexList(a.get("doc").views,"views",b)}},this)},afterRender:function(){this.selectedTab&&this.setSelectedTab(this.selectedTab)},setSelectedTab:function(a){this.selectedTab=a,this.$("li").removeClass("active"),this.$("#"+a).parent().addClass("active")},toggleNewView:function(a){a!==this.showNewView&&(this.showNewView=a,this.render())}}),f.Indexed=b.View.extend({}),f.Changes=b.View.extend({template:"templates/documents/changes",establish:function(){return[this.model.changes.fetch()]},serialize:function(){return{changes:this.model.changes.toJSON(),database:this.model}},afterRender:function(){prettyPrint()}}),f.DdocInfo=b.View.extend({template:"templates/documents/ddoc_info",initialize:function(a){this.refreshTime=a.refreshTime||5e3,this.listenTo(this.model,"change",this.render)},serialize:function(){return{view_index:this.model.get("view_index")}},afterRender:function(){this.startRefreshInterval()},startRefreshInterval:function(){var a=this.model;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)},cleanup:function(){this.stopRefreshInterval()}}),d.Views=f,d}),define("modules/documents/routes",["app","api","modules/documents/views","modules/databases/base"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",disableLoader:!0,selectedHeader:"Databases",initialize:function(a,b,e){var f=e[0];this.docID=e[1]||"new",this.database=this.database||new d.Model({id:f}),this.doc=new c.Doc({_id:this.docID},{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({disableLoader:!0,selected:"code_editor",model:this.doc}))},routes:{"database/:database/:doc/code_editor":"code_editor","database/:database/:doc":"code_editor"},events:{"route:reRenderDoc":"reRenderDoc","route:duplicateDoc":"duplicateDoc"},crumbs:function(){return[{name:"Databases",link:"/_all_dbs"},{name:this.database.id,link:d.databaseUrl(this.database)},{name:this.docID,link:"#"}]},code_editor:function(){this.tabsView.updateSelected("code_editor"),this.docView=this.setView("#dashboard-content",new c.Views.Doc({model:this.doc,database:this.database}))},reRenderDoc:function(){this.docView.forceRender()},field_editor:function(){this.tabsView.updateSelected("field_editor"),this.docView=this.setView("#dashboard-content",new c.Views.DocFieldEditor({model:this.doc}))},duplicateDoc:function(a){var c=this.doc,d=this.docView,e=this.database;c.copy(a).then(function(){c.set({_id:a}),d.forceRender(),b.navigate("/database/"+e.id+"/"+a,{trigger:!0}),b.addNotification({msg:"Document has been duplicated."})},function(a){var c="Could not duplicate document, reason: "+a.responseText+".";b.addNotification({msg:c,type:"error"})})},apiUrl:function(){return[this.doc.url(),this.doc.documentation()]}}),f=e.extend({initialize:function(a,b,e){var f=e[0];this.database=this.database||new d.Model({id:f}),this.doc=new c.NewDoc(null,{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({selected:"code_editor",model:this.doc}))},crumbs:function(){return[{name:"Databases",link:"/_all_dbs"},{name:this.database.id,link:d.databaseUrl(this.database)},{name:"New",link:"#"}]},routes:{"database/:database/new":"code_editor"},selectedHeader:"Databases"}),g=b.RouteObject.extend({layout:"with_tabs_sidebar",selectedHeader:"Databases",routes:{"database/:database/_all_docs(:extra)":"allDocs","database/:database/_design/:ddoc/_view/:view":{route:"viewFn",roles:["_admin"]},"database/:database/new_view":"newViewEditor"},events:{"route:updateAllDocs":"updateAllDocsFromView","route:updatePreviewDocs":"updateAllDocsFromPreview","route:reloadDesignDocs":"reloadDesignDocs","route:paginate":"paginate"},initialize:function(b,e,f){var g=a.getParams();g.include_docs=!0,this.databaseName=encodeURIComponent(f[0]),this.data={database:new d.Model({id:this.databaseName})},this.data.designDocs=new c.AllDocs(null,{database:this.data.database,params:{startkey:'"_design"',endkey:'"_design1"',include_docs:!0}}),this.sidebar=this.setView("#sidebar-content",new c.Views.Sidebar({collection:this.data.designDocs,database:this.data.database}))},establish:function(){return this.data.designDocs.fetch()},allDocs:function(b,e){var f=a.getParams(e);f.include_docs=!0,this.data.database.buildAllDocs(f),f.startkey&&f.startkey.indexOf("_design")>-1?this.sidebar.setSelectedTab("design-docs"):this.sidebar.setSelectedTab("all-docs"),this.viewEditor&&this.viewEditor.remove(),this.listenTo(this.data.database.allDocs,"reset",this.checkExistingDocs),this.listenTo(this.data.database.allDocs,"remove",this.checkExistingDocs),this.toolsView=this.setView("#dashboard-upper-menu",new c.Views.JumpToDoc({database:this.data.database,collection:this.data.database.allDocs})),this.setView("#dashboard-upper-content",new c.Views.AllDocsLayout({database:this.data.database,collection:this.data.database.allDocs,params:f})),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({collection:this.data.database.allDocs})),this.crumbs=[{name:"Databases",link:"/_all_dbs"},{name:this.data.database.id,link:d.databaseUrl(this.data.database)}],this.apiUrl=[this.data.database.allDocs.url(),this.data.database.allDocs.documentation()]},viewFn:function(b,e,f){var g=a.getParams();f=f.replace(/\?.*$/,""),this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:e,view:f,params:g});var h={id:"_design/"+e,currView:f,designDocs:this.data.designDocs};this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({model:this.data.database,ddocs:this.data.designDocs,viewName:f,params:g,newView:!1,database:this.data.database,ddocInfo:h})),this.toolsView&&this.toolsView.remove(),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0,ddocInfo:h})),this.sidebar.setSelectedTab(e+"_"+f),this.crumbs=function(){return[{name:"Databases",link:"/_all_dbs"},{name:this.data.database.id,link:d.databaseUrl(this.data.database)},{name:e+"/"+f,link:this.data.indexedDocs.url()}]},this.apiUrl=[this.data.indexedDocs.url(),"docs"]},newViewEditor:function(){var b=a.getParams();this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({ddocs:this.data.designDocs,params:b,database:this.data.database,newView:!0})),this.sidebar.setSelectedTab("new-view"),this.crumbs=function(){return[{name:"Databases",link:"/_all_dbs"},{name:this.data.database.id,link:d.databaseUrl(this.data.database)},{name:"new"}]}},updateAllDocsFromView:function(b){var d=b.view,e=a.getParams(),f=b.ddoc;return b.allDocs?(e.include_docs=!0,this.data.database.buildAllDocs(e),void 0):(this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:f,view:d,params:a.getParams()}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0})),void 0)},updateAllDocsFromPreview:function(a){var b=a.view,d=a.rows,e=a.ddoc;this.data.indexedDocs=new c.PouchIndexCollection(null,{database:this.data.database,design:e,view:b,rows:d}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0}))},paginate:function(b){_.extend(this.documentsView.collection.params,a.getParams()),this.documentsView.forceRender(),this.documentsView.collection.skipFirstItem="next"===b?!0:!1},reloadDesignDocs:function(a){this.sidebar.forceRender(),a&&a.selectedTab&&this.sidebar.setSelectedTab(a.selectedTab)},checkExistingDocs:function(){this.data.database.allDocs.length>0?this.sidebar.toggleNewView(!0):this.sidebar.toggleNewView(!1)}}),h=b.RouteObject.extend({layout:"with_tabs",selectedHeader:"Databases",crumbs:function(){return[{name:"Databases",link:"/_all_dbs"},{name:this.database.id,link:d.databaseUrl(this.database)},{name:"_changes",link:"/_changes"}]},routes:{"database/:database/_changes(:params)":"changes"},initialize:function(b,e,f){this.databaseName=encodeURIComponent(f[0]),this.database=new d.Model({id:this.databaseName});var g=a.getParams();this.database.buildChanges(g),this.setView("#tabs",new c.Views.Tabs({collection:this.designDocs,database:this.database,active_id:"changes"}))},changes:function(){this.setView("#dashboard-content",new c.Views.Changes({model:this.database}))},apiUrl:function(){return[this.database.changes.url(),this.database.changes.documentation()]}});return c.RouteObjects=[e,f,g,h],c}),define("modules/documents/base",["app","api","modules/documents/routes"],function(a,b,c){return c}),define("addons/activetasks/resources",["app","backbone","modules/fauxton/base","d3"],function(a){var b={};return a.versionAPI,a.taskSortBy="type",b.Task=Backbone.Model.extend({initialize:function(){this.set({id:this.get("pid")})}}),b.Tasks=Backbone.Model.extend({alltypes:{all:"All tasks",replication:"Replication",database_compaction:" Database Compaction",indexer:"Indexer",view_compaction:"View Compaction"},documentation:"_active_tasks",url:function(){return a.host+"/_active_tasks"},fetch:function(a){var b=a||{};return b.cache=!1,Backbone.Model.prototype.fetch.call(this,b)},parse:function(a){var c=this.getUniqueTypes(a),d=this,e=_.reduce(c,function(c,e,f){return c[f]=new b.AllTasks(d.sortThis(a,f)),c},{});e.all=new b.AllTasks(a),this.set(e)},getUniqueTypes:function(a){var b=this.alltypes;return _.each(a,function(a){"undefined"==typeof b[a.type]&&(b[a.type]=a.type.replace(/_/g," "))},this),this.alltypes=b,b},sortThis:function(a,b){return _.filter(a,function(a){return a.type===b})},changeView:function(a){this.set({currentView:a})},getCurrentViewData:function(){var a=this.get("currentView");return this.get(a)},getDatabaseCompactions:function(){return this.get("databaseCompactions")},getIndexes:function(){return this.get("indexes")},getViewCompactions:function(){return this.get("viewCompactions")}}),b.AllTasks=Backbone.Collection.extend({model:b.Task,sortByColumn:function(b){a.taskSortBy=b,this.sort()},comparator:function(b){return b.get(a.taskSortBy)}}),b}),define("addons/activetasks/views",["app","api","addons/activetasks/resources"],function(a,b){var c={},d={},e={rate:"5",intervalId:null};return c.Events=_.extend(d,Backbone.Events),c.TabMenu=b.View.extend({template:"addons/activetasks/templates/tabs",events:{"click .task-tabs li":"requestByType","change #pollingRange":"changePollInterval"},establish:function(){return[this.model.fetch({reset:!0})]},serialize:function(){return{filters:this.model.alltypes}},afterRender:function(){this.$(".task-tabs").find("li").eq(0).addClass("active")},changePollInterval:function(a){var b=this.$(a.currentTarget).val();this.$('label[for="pollingRange"] span').text(b),e.rate=b,clearInterval(e.intervalId),d.trigger("update:poll")},cleanup:function(){clearInterval(e.intervalId)},requestByType:function(a){var b=a.currentTarget;datatype=this.$(b).attr("data-type"),this.$(".task-tabs").find("li").removeClass("active"),this.$(b).addClass("active"),this.model.changeView(datatype)}}),c.DataSection=b.View.extend({showData:function(){var a=this.model.getCurrentViewData();this.dataView?this.dataView.update(a,this.model.get("currentView").replace("_"," ")):this.dataView=this.insertView(new c.TableData({collection:a,currentView:this.model.get("currentView").replace("_"," ")}))},showDataAndRender:function(){this.showData(),this.dataView.render()},beforeRender:function(){this.showData()},establish:function(){return[this.model.fetch()]},setPolling:function(){var a=this;clearInterval(e.intervalId),e.intervalId=setInterval(function(){a.establish()},1e3*e.rate)},cleanup:function(){clearInterval(e.intervalId)},afterRender:function(){this.listenTo(this.model,"change",this.showDataAndRender),d.bind("update:poll",this.setPolling,this),this.setPolling()}}),c.TableData=b.View.extend({tagName:"table",className:"table table-bordered table-striped active-tasks",template:"addons/activetasks/templates/table",events:{"click th":"sortByType"},initialize:function(){currentView=this.options.currentView},sortByType:function(a){var b=a.currentTarget;datatype=$(b).attr("data-type"),this.collection.sortByColumn(datatype),this.render()},serialize:function(){return{currentView:currentView,collection:this.collection}},update:function(a,b){this.collection=a,this.currentView=b},beforeRender:function(){this.collection.forEach(function(a){this.insertView("#tasks_go_here",new c.TableDetail({model:a}))},this)}}),c.TableDetail=b.View.extend({tagName:"tr",template:"addons/activetasks/templates/tabledetail",initialize:function(){this.type=this.model.get("type")},getObject:function(){var a=this.model.get("database");return"replication"===this.type&&(a=this.model.get("source")+" to "+this.model.get("target")),a},getProgress:function(){var a="";return"indexer"===this.type&&(a="Processed "+this.model.get("changes_done")+" of "+this.model.get("total_changes")+" changes"),a},serialize:function(){return{model:this.model,objectField:this.getObject(),progress:this.getProgress()}}}),c}),define("addons/activetasks/routes",["app","api","addons/activetasks/resources","addons/activetasks/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"with_sidebar",routes:{"activetasks/:id":"defaultView",activetasks:"defaultView"},selectedHeader:"Active Tasks",crumbs:[{name:"Active tasks",link:"activetasks"}],apiUrl:function(){return[this.newtasks.url(),this.newtasks.documentation]},roles:["_admin"],defaultView:function(){this.newtasks=new c.Tasks({currentView:"all",id:"activeTasks"}),this.setView("#sidebar-content",new d.TabMenu({currentView:"all",model:this.newtasks})),this.setView("#dashboard-content",new d.DataSection({model:this.newtasks,currentView:"all"}))}});return c.RouteObjects=[e],c}),define("addons/activetasks/base",["app","api","addons/activetasks/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Active Tasks",icon:"fonticon-activetasks",href:"#/activetasks"})},c}),define("addons/config/resources",["app","api"],function(a,b){var c=b.addon();return c.Model=Backbone.Model.extend({}),c.OptionModel=Backbone.Model.extend({documentation:"config",url:function(){return a.host+"/_config/"+this.get("section")+"/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}}),c.Collection=Backbone.Collection.extend({model:c.Model,documentation:"config",url:function(){return a.host+"/_config"},parse:function(a){return _.map(a,function(a,b){return{section:b,options:_.map(a,function(a,b){return{name:b,value:a}})}})}}),c.ViewItem=b.View.extend({tagName:"tr",className:"config-item",template:"addons/config/templates/item",events:{"click .edit-button":"editValue","click #delete-value":"deleteValue","click #cancel-value":"cancelEdit","click #save-value":"saveValue"},deleteValue:function(){var a=confirm("Are you sure you want to delete this configuration value?");a&&(this.model.destroy(),this.remove())},editValue:function(){this.$("#show-value").hide(),this.$("#edit-value-form").show()},saveValue:function(){this.model.save({value:this.$(".value-input").val()}),this.render()},cancelEdit:function(){this.$("#edit-value-form").hide(),this.$("#show-value").show()},serialize:function(){return{option:this.model.toJSON()}}}),c.View=b.View.extend({template:"addons/config/templates/dashboard",events:{"click #add-section":"addSection","submit #add-section-form":"submitForm"},submitForm:function(a){a.preventDefault();var b=new c.OptionModel({section:this.$('input[name="section"]').val(),name:this.$('input[name="name"]').val(),value:this.$('input[name="value"]').val()});b.save();var d=this.collection.find(function(a){return a.get("section")===b.get("section")});d?d.get("options").push(b.attributes):this.collection.add({section:b.get("section"),options:[b.attributes]}),this.$("#add-section-modal").modal("hide"),this.render()},addSection:function(a){a.preventDefault(),this.$("#add-section-modal").modal({show:!0})},beforeRender:function(){this.collection.each(function(a){_.each(a.get("options"),function(b,d){this.insertView("table.config tbody",new c.ViewItem({model:new c.OptionModel({section:a.get("section"),name:b.name,value:b.value,index:d})}))},this)},this)},establish:function(){return[this.collection.fetch()]}}),c}),define("addons/config/routes",["app","api","addons/config/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",initialize:function(){this.configs=new c.Collection},roles:["_admin"],selectedHeader:"Config",crumbs:[{name:"Config",link:"_config"}],apiUrl:function(){return[this.configs.url(),this.configs.documentation]},routes:{_config:"config"},config:function(){this.setView("#dashboard-content",new c.View({collection:this.configs}))},establish:function(){return[this.configs.fetch()]}});return c.RouteObjects=[d],c}),define("addons/config/base",["app","api","addons/config/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Config",href:"#_config",icon:"fonticon-cog",className:"config"})},c}),define("addons/logs/resources",["app","api","backbone"],function(a,b,c){var d=b.addon();return d.Model=c.Model.extend({date:function(){var a=new Date(this.get("date")),b=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds(),c=a.toDateString().slice(4,10);return c+" "+b},logLevel:function(){return this.get("log_level").replace(/ /g,"")},pid:function(){return _.escape(this.get("pid"))},args:function(){return _.escape(this.get("args"))}}),d.Collection=c.Collection.extend({model:d.Model,initialize:function(){this.params={bytes:5e3}},documentation:"log",url:function(){return query="?"+$.param(this.params),a.host+"/_log"+query},fetch:function(a){return a=a?a:{},c.Collection.prototype.fetch.call(this,_.extend(a,{dataType:"html"}))},parse:function(a){var b=a.split(/\n/);return _.foldr(b,function(a,b){var c=b.match(/^\[(.*?)\]\s\[(.*?)\]\s\[(.*?)\]\s(.*)/);return c?(a.push({date:c[1],log_level:c[2],pid:c[3],args:c[4]}),a):a},[])}}),d.events={},_.extend(d.events,c.Events),d.Views.View=b.View.extend({template:"addons/logs/templates/dashboard",initialize:function(a){this.refreshTime=a.refreshTime||5e3,d.events.on("log:filter",this.filterLogs,this),d.events.on("log:remove",this.removeFilterLogs,this),this.filters=[],this.collection.on("add",function(){this.render()},this)},establish:function(){return[this.collection.fetch()]},serialize:function(){return{logs:new d.Collection(this.createFilteredCollection())}},afterRender:function(){this.startRefreshInterval()},cleanup:function(){this.stopRefreshInterval()},filterLogs:function(a){this.filters.push(a),this.render()},createFilteredCollection:function(){return _.reduce(this.filters,function(a,b){return _.filter(a,function(a){var c=!1;return _.each(a,function(a){a.toString().match(new RegExp(b))&&(c=!0)}),c})},this.collection.toJSON(),this)},removeFilterLogs:function(a){this.filters.splice(this.filters.indexOf(a),1),this.render()},startRefreshInterval:function(){var a=this.collection;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)}}),d.Views.FilterView=b.View.extend({template:"addons/logs/templates/sidebar",events:{"submit #log-filter-form":"filterLogs"},filterLogs:function(a){a.preventDefault();var b=this.$('input[name="filter"]'),c=b.val();d.events.trigger("log:filter",c),this.insertView("#filter-list",new d.Views.FilterItemView({filter:c})).render(),b.val("")}}),d.Views.FilterItemView=b.View.extend({template:"addons/logs/templates/filterItem",tagName:"li",initialize:function(a){this.filter=a.filter},events:{"click .remove-filter":"removeFilter"},serialize:function(){return{filter:this.filter}},removeFilter:function(a){a.preventDefault(),d.events.trigger("log:remove",this.filter),this.remove()}}),d}),define("addons/logs/routes",["app","api","addons/logs/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",crumbs:[{name:"Logs",link:"_log"}],routes:{_log:"showLog"},selectedHeader:"Log",roles:["_admin"],apiUrl:function(){return[this.logs.url(),this.logs.documentation]},initialize:function(){this.logs=new c.Collection,this.setView("#sidebar-content",new c.Views.FilterView({}))},showLog:function(){this.setView("#dashboard-content",new c.Views.View({collection:this.logs}))}});return c.RouteObjects=[d],c}),define("addons/logs/base",["app","api","addons/logs/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Log",href:"#_log",icon:"fonticon-log",className:"logs"})},c}),define("addons/stats/resources",["app","api","backbone","lodash","modules/fauxton/base"],function(a,b,c,d){var e=new b.addon;return e.Collection=Backbone.Collection.extend({model:Backbone.Model,documentation:"stats",url:a.host+"/_stats",parse:function(a){return d.flatten(d.map(a,function(a,b){return d.map(a,function(a,c){return d.extend({id:c,type:b},a)})}),!0)}}),e}),function(){function a(a,b){return new Date(b,a+1,0).getDate()}function b(a,b,c){return function(d,e,f){var g=a(d),h=[];if(d>g&&b(g),f>1)for(;e>g;){var i=new Date(+g);0===c(i)%f&&h.push(i),b(g)}else for(;e>g;)h.push(new Date(+g)),b(g);return h}}var c=window.nv||{};c.version="0.0.1a",c.dev=!0,window.nv=c,c.tooltip={},c.utils={},c.models={},c.charts={},c.graphs=[],c.logs={},c.dispatch=d3.dispatch("render_start","render_end"),c.dev&&(c.dispatch.on("render_start",function(){c.logs.startTime=+new Date}),c.dispatch.on("render_end",function(){c.logs.endTime=+new Date,c.logs.totalTime=c.logs.endTime-c.logs.startTime,c.log("total",c.logs.totalTime)})),c.log=function(){if(c.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(c.dev&&console.log&&Function.prototype.bind){var a=Function.prototype.bind.call(console.log,console);a.apply(console,arguments)}return arguments[arguments.length-1]},c.render=function(a){a=a||1,c.render.active=!0,c.dispatch.render_start(),setTimeout(function(){for(var b,d,e=0;a>e&&(d=c.render.queue[e]);e++)b=d.generate(),typeof d.callback==typeof Function&&d.callback(b),c.graphs.push(b);c.render.queue.splice(0,e),c.render.queue.length?setTimeout(arguments.callee,0):(c.render.active=!1,c.dispatch.render_end())},0)},c.render.active=!1,c.render.queue=[],c.addGraph=function(a){typeof arguments[0]==typeof Function&&(a={generate:arguments[0],callback:arguments[1]}),c.render.queue.push(a),c.render.active||c.render()},c.identity=function(a){return a},c.strip=function(a){return a.replace(/(\s|&)/g,"")},d3.time.monthEnd=function(a){return new Date(a.getFullYear(),a.getMonth(),0)},d3.time.monthEnds=b(d3.time.monthEnd,function(b){b.setUTCDate(b.getUTCDate()+1),b.setDate(a(b.getMonth()+1,b.getFullYear()))},function(a){return a.getMonth()}),function(){var a=window.nv.tooltip={};a.show=function(a,b,d,e,f,g){var h=document.createElement("div");h.className="nvtooltip "+(g?g:"xy-tooltip"),d=d||"s",e=e||20;var i=f;(!f||f.tagName.match(/g|svg/i))&&(i=document.getElementsByTagName("body")[0]),h.innerHTML=b,h.style.left=0,h.style.top=0,h.style.opacity=0,i.appendChild(h);var j,k,l=parseInt(h.offsetHeight),m=parseInt(h.offsetWidth),n=c.utils.windowSize().width,o=c.utils.windowSize().height,p=window.scrollY,q=window.scrollX;o=window.innerWidth>=document.body.scrollWidth?o:o-16,n=window.innerHeight>=document.body.scrollHeight?n:n-16;var r=function(a){var b=k;do isNaN(a.offsetTop)||(b+=a.offsetTop);while(a=a.offsetParent);return b},s=function(a){var b=j;do isNaN(a.offsetLeft)||(b+=a.offsetLeft);while(a=a.offsetParent);return b};switch(d){case"e":j=a[0]-m-e,k=a[1]-l/2;var t=s(h),u=r(h);q>t&&(j=a[0]+e>q?a[0]+e:q-t+j),p>u&&(k=p-u+k),u+l>p+o&&(k=p+o-u+k-l);break;case"w":j=a[0]+e,k=a[1]-l/2,t+m>n&&(j=a[0]-m-e),p>u&&(k=p+5),u+l>p+o&&(k=p-l-5);break;case"n":j=a[0]-m/2-5,k=a[1]+e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),u+l>p+o&&(k=p+o-u+k-l);break;case"s":j=a[0]-m/2,k=a[1]-l-e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),p>u&&(k=p)}return h.style.left=j+"px",h.style.top=k+"px",h.style.opacity=1,h.style.position="absolute",h.style.pointerEvents="none",h},a.cleanup=function(){for(var a=document.getElementsByClassName("nvtooltip"),b=[];a.length;)b.push(a[0]),a[0].style.transitionDelay="0 !important",a[0].style.opacity=0,a[0].className="nvtooltip-pending-removal";setTimeout(function(){for(;b.length;){var a=b.pop();a.parentNode.removeChild(a)}},500)}}(),c.utils.windowSize=function(){var a={width:640,height:480};return document.body&&document.body.offsetWidth&&(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight),"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth&&(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(a.width=window.innerWidth,a.height=window.innerHeight),a},c.utils.windowResize=function(a){var b=window.onresize;window.onresize=function(c){"function"==typeof b&&b(c),a(c)}},c.utils.getColor=function(a){return arguments.length?"[object Array]"===Object.prototype.toString.call(a)?function(b,c){return b.color||a[c%a.length]}:a:c.utils.defaultColor()},c.utils.defaultColor=function(){var a=d3.scale.category20().range();return function(b,c){return b.color||a[c%a.length]}},c.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return d||(d=c.length),"undefined"!=typeof a[f]?"function"==typeof a[f]?a[f]():a[f]:c[--d]}},c.utils.pjax=function(a,b){function d(d){d3.html(d,function(d){var e=d3.select(b).node();e.parentNode.replaceChild(d3.select(d).select(b).node(),e),c.utils.pjax(a,b)})}d3.selectAll(a).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},c.utils.calcApproxTextWidth=function(a){if(a instanceof d3.selection){var b=parseInt(a.style("font-size").replace("px","")),c=a.text().length;return.5*c*b}return 0},c.models.axis=function(){function a(e){return e.each(function(a){var e=d3.select(this),p=e.selectAll("g.nv-wrap.nv-axis").data([a]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");q.append("g");var r=p.select("g");null!==n?b.ticks(n):("top"==b.orient()||"bottom"==b.orient())&&b.ticks(Math.abs(f.range()[1]-f.range()[0])/100),d3.transition(r).call(b),o=o||b.scale();var s=b.tickFormat();null==s&&(s=o.tickFormat());var t=r.selectAll("text.nv-axislabel").data([g||null]);switch(t.exit().remove(),b.orient()){case"top":t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",0).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+f(a)+",0)"}).select("text").attr("dy","0em").attr("y",-b.tickPadding()).attr("text-anchor","middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate("+f.range()[b]+",0)"})}break;case"bottom":var w=36,x=30,y=r.selectAll("g").select("text");if(j%360){y.each(function(){var a=this.getBBox().width;a>x&&(x=a)});var z=Math.abs(Math.sin(j*Math.PI/180)),w=(z?z*x:x)+30;y.attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j%360>0?"start":"end")}t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",w).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data([f.domain()[0],f.domain()[f.domain().length-1]]);v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",b.tickPadding()).attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"})}l&&y.attr("transform",function(a,b){return"translate(0,"+(0==b%2?"0":"12")+")"});break;case"right":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(c.right,d)+12:-10).attr("x",k?f.range()[0]/2:b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+f(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",b.tickPadding()).attr("text-anchor","start").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(c.left,d)+12:-10).attr("x",k?-f.range()[0]/2:-b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+o(a)+")"
-}).select("text").attr("dy",".32em").attr("y",0).attr("x",-b.tickPadding()).attr("text-anchor","end").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}}if(t.text(function(a){return a}),!h||"left"!==b.orient()&&"right"!==b.orient()||(r.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(f(a)<f.range()[1]+10||f(a)>f.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),f.domain()[0]==f.domain()[1]&&0==f.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),h&&("top"===b.orient()||"bottom"===b.orient())){var A=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?A.push(f(a)-this.getBBox().width-4):A.push(f(a)+this.getBBox().width+4)}catch(c){b?A.push(f(a)-4):A.push(f(a)+4)}}),r.selectAll("g").each(function(a){(f(a)<A[0]||f(a)>A[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}i&&r.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a.__data__)/1e6)&&void 0!==a.__data__}).classed("zero",!0),o=f.copy()}),a}var b=d3.svg.axis(),c={top:0,right:0,bottom:0,left:0},d=75,e=60,f=d3.scale.linear(),g=null,h=!0,i=!0,j=0,k=!0,l=!1,m=!1,n=null;b.scale(f).orient("bottom").tickFormat(function(a){return a});var o;return a.axis=b,d3.rebind(a,b,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a.margin=function(b){return arguments.length?(c.top="undefined"!=typeof b.top?b.top:c.top,c.right="undefined"!=typeof b.right?b.right:c.right,c.bottom="undefined"!=typeof b.bottom?b.bottom:c.bottom,c.left="undefined"!=typeof b.left?b.left:c.left,a):c},a.width=function(b){return arguments.length?(d=b,a):d},a.ticks=function(b){return arguments.length?(n=b,a):n},a.height=function(b){return arguments.length?(e=b,a):e},a.axisLabel=function(b){return arguments.length?(g=b,a):g},a.showMaxMin=function(b){return arguments.length?(h=b,a):h},a.highlightZero=function(b){return arguments.length?(i=b,a):i},a.scale=function(c){return arguments.length?(f=c,b.scale(f),m="function"==typeof f.rangeBands,d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a):f},a.rotateYLabel=function(b){return arguments.length?(k=b,a):k},a.rotateLabels=function(b){return arguments.length?(j=b,a):j},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a},c.models.bullet=function(){function a(c){return c.each(function(a,c){var d=j-b.left-b.right,l=k-b.top-b.bottom,o=d3.select(this),p=f.call(this,a,c).slice().sort(d3.descending),q=g.call(this,a,c).slice().sort(d3.descending),r=h.call(this,a,c).slice().sort(d3.descending),s=d3.scale.linear().domain(d3.extent(d3.merge([i,p]))).range(e?[d,0]:[0,d]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(s.range()),this.__chart__=s;var t=d3.min(p),u=d3.max(p),v=p[1],w=o.selectAll("g.nv-wrap.nv-bullet").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),y=x.append("g"),z=w.select("g");y.append("rect").attr("class","nv-range nv-rangeMax"),y.append("rect").attr("class","nv-range nv-rangeAvg"),y.append("rect").attr("class","nv-range nv-rangeMin"),y.append("rect").attr("class","nv-measure"),y.append("path").attr("class","nv-markerTriangle"),w.attr("transform","translate("+b.left+","+b.top+")");var A=function(a){return Math.abs(s(a)-s(0))},B=function(a){return 0>a?s(a):s(0)};z.select("rect.nv-rangeMax").attr("height",l).attr("width",A(u>0?u:t)).attr("x",B(u>0?u:t)).datum(u>0?u:t),z.select("rect.nv-rangeAvg").attr("height",l).attr("width",A(v)).attr("x",B(v)).datum(v),z.select("rect.nv-rangeMin").attr("height",l).attr("width",A(u)).attr("x",B(u)).attr("width",A(u>0?t:u)).attr("x",B(u>0?t:u)).datum(u>0?t:u),z.select("rect.nv-measure").style("fill",m).attr("height",l/3).attr("y",l/3).attr("width",0>r?s(0)-s(r[0]):s(r[0])-s(0)).attr("x",B(r)).on("mouseover",function(){n.elementMouseover({value:r[0],label:"Current",pos:[s(r[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:r[0],label:"Current"})});var C=l/6;q[0]?z.selectAll("path.nv-markerTriangle").attr("transform",function(){return"translate("+s(q[0])+","+l/2+")"}).attr("d","M0,"+C+"L"+C+","+-C+" "+-C+","+-C+"Z").on("mouseover",function(){n.elementMouseover({value:q[0],label:"Previous",pos:[s(q[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:q[0],label:"Previous"})}):z.selectAll("path.nv-markerTriangle").remove(),w.selectAll(".nv-range").on("mouseover",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseover({value:a,label:c,pos:[s(a),l/2]})}).on("mouseout",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseout({value:a,label:c})})}),a}var b={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers},h=function(a){return a.measures},i=[0],j=380,k=30,l=null,m=c.utils.getColor(["#1f77b4"]),n=d3.dispatch("elementMouseover","elementMouseout");return a.dispatch=n,a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(f=b,a):f},a.markers=function(b){return arguments.length?(g=b,a):g},a.measures=function(b){return arguments.length?(h=b,a):h},a.forceX=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.bulletChart=function(){function a(c){return c.each(function(d,n){var r=d3.select(this),s=(j||parseInt(r.style("width"))||960)-f.left-f.right,t=k-f.top-f.bottom,u=this;if(a.update=function(){a(c)},a.container=this,!d||!g.call(this,d,n)){var v=r.selectAll(".nv-noData").data([o]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+s/2).attr("y",18+f.top+t/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove();var w=g.call(this,d,n).slice().sort(d3.descending),x=h.call(this,d,n).slice().sort(d3.descending),y=i.call(this,d,n).slice().sort(d3.descending),z=r.selectAll("g.nv-wrap.nv-bulletChart").data([d]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-bulletWrap"),B.append("g").attr("class","nv-titles"),z.attr("transform","translate("+f.left+","+f.top+")");var D=d3.scale.linear().domain([0,Math.max(w[0],x[0],y[0])]).range(e?[s,0]:[0,s]),E=this.__chart__||d3.scale.linear().domain([0,1/0]).range(D.range());this.__chart__=D;var F=B.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(k-f.top-f.bottom)/2+")");F.append("text").attr("class","nv-title").text(function(a){return a.title}),F.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),b.width(s).height(t);var G=C.select(".nv-bulletWrap");d3.transition(G).call(b);var H=l||D.tickFormat(s/100),I=C.selectAll("g.nv-tick").data(D.ticks(s/50),function(a){return this.textContent||H(a)}),J=I.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+E(a)+",0)"}).style("opacity",1e-6);J.append("line").attr("y1",t).attr("y2",7*t/6),J.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*t/6).text(H);var K=d3.transition(I).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1);K.select("line").attr("y1",t).attr("y2",7*t/6),K.select("text").attr("y",7*t/6),d3.transition(I.exit()).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1e-6).remove(),p.on("tooltipShow",function(a){a.key=d.title,m&&q(a,u.parentNode)})}),d3.timer.flush(),a}var b=c.models.bullet(),d="left",e=!1,f={top:5,right:40,bottom:20,left:120},g=function(a){return a.ranges},h=function(a){return a.markers},i=function(a){return a.measures},j=null,k=55,l=null,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3>"+"<p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide"),q=function(b,d){var e=b.pos[0]+(d.offsetLeft||0)+f.left,g=b.pos[1]+(d.offsetTop||0)+f.top,h=n(b.key,b.label,b.value,b,a);c.tooltip.show([e,g],h,b.value<0?"e":"w",null,d)};return b.dispatch.on("elementMouseover.tooltip",function(a){p.tooltipShow(a)}),b.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.bullet=b,d3.rebind(a,b,"color"),a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(g=b,a):g},a.markers=function(b){return arguments.length?(h=b,a):h},a.measures=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.cumulativeLineChart=function(){function a(c){return c.each(function(c){function s(){d3.select(a.container).style("cursor","ew-resize")}function C(){A.x=d3.event.x,A.i=Math.round(z.invert(A.x)),E()}function D(){d3.select(a.container).style("cursor","auto"),u.index=A.i,y.stateChange(u)}function E(){W.data([A]),F.call(a)}var F=d3.select(this).classed("nv-chart-"+t,!0),G=this,H=(m||parseInt(F.style("width"))||960)-k.left-k.right,I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom;if(a.update=function(){F.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var J;v={};for(J in u)v[J]=u[J]instanceof Array?u[J].slice(0):u[J]}var K=d3.behavior.drag().on("dragstart",s).on("drag",C).on("dragend",D);if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var L=F.selectAll(".nv-noData").data([w]);return L.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),L.attr("x",k.left+H/2).attr("y",k.top+I/2).text(function(a){return a}),a}if(F.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),r)f.yDomain(null);else{var M=c.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),N=[d3.min(M,function(a){return a[0]}),d3.max(M,function(a){return a[1]})];f.yDomain(N)}z.domain([0,c[0].values.length-1]).range([0,H]).clamp(!0);var c=b(A.i,c),O=F.selectAll("g.nv-wrap.nv-cumulativeLine").data([c]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),Q=O.select("g");if(P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-background"),P.append("g").attr("class","nv-linesWrap"),P.append("g").attr("class","nv-avgLinesWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),o&&(i.width(H),Q.select(".nv-legendWrap").datum(c).call(i),k.top!=i.height()&&(k.top=i.height()+i.legendBelowPadding(),I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),q){var R=[{key:"Re-scale y-axis",disabled:!r}];j.width(140).color(["#444","#444","#444"]),Q.select(".nv-controlsWrap").datum(R).attr("transform","translate(0,"+-k.top+")").call(j)}O.attr("transform","translate("+k.left+","+k.top+")");var S=c.filter(function(a){return a.tempDisabled});O.select(".tempDisabled").remove(),S.length&&O.append("text").attr("class","tempDisabled").attr("x",H/2).attr("y","-.71em").style("text-anchor","end").text(S.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),P.select(".nv-background").append("rect"),Q.select(".nv-background rect").attr("width",H).attr("height",I),f.y(function(a){return a.display.y}).width(H).height(I).color(c.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].tempDisabled}));var T=Q.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled&&!a.tempDisabled}));T.call(f),c.forEach(function(a,b){a.seriesIndex=b});var U=c.filter(function(a){return!a.disabled&&!!x(a)}),V=Q.select(".nv-avgLinesWrap").selectAll("line").data(U,function(a){return a.key});V.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.exit().remove();var W=T.selectAll(".nv-indexLine").data([A]);W.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).call(K),W.attr("transform",function(a){return"translate("+z(a.i)+",0)"}).attr("height",I),g.scale(d).ticks(Math.min(c[0].values.length,H/70)).tickSize(-I,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Q.select(".nv-x.nv-axis")).call(g),h.scale(e).ticks(I/36).tickSize(-H,0),d3.transition(Q.select(".nv-y.nv-axis")).call(h),Q.select(".nv-background rect").on("click",function(){A.x=d3.mouse(this)[0],A.i=Math.round(z.invert(A.x)),u.index=A.i,y.stateChange(u),E()}),f.dispatch.on("elementClick",function(a){A.i=a.pointIndex,A.x=z(A.i),u.index=A.i,y.stateChange(u),E()}),j.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r=!b.disabled,u.rescaleY=r,y.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,O.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),i.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),y.on("tooltipShow",function(a){p&&B(a,G.parentNode)}),y.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.index&&(A.i=b.index,A.x=z(A.i),u.index=b.index,W.data([A])),"undefined"!=typeof b.rescaleY&&(r=b.rescaleY),a.update()})}),a}function b(a,b){return b.map(function(b){if(!b.values)return b;var c=f.y()(b.values[a],a);return-.95>c?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(f.y()(a,b)-c)/(1+c)},a}),b)})}var d,e,f=c.models.line(),g=c.models.axis(),h=c.models.axis(),i=c.models.legend(),j=c.models.legend(),k={top:30,right:30,bottom:50,left:60},l=c.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!0,s=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},t=f.id(),u={index:0,rescaleY:r},v=null,w="No Data Available.",x=function(a){return a.average},y=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.orient("bottom").tickPadding(7),h.orient("left");var z=d3.scale.linear(),A={i:0,x:0},B=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=g.tickFormat()(f.x()(b.point,b.pointIndex)),k=h.tickFormat()(f.y()(b.point,b.pointIndex)),l=s(b.series.key,j,k,b,a);c.tooltip.show([e,i],l,null,null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+k.left,a.pos[1]+k.top],y.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){y.tooltipHide(a)}),y.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=y,a.lines=f,a.legend=i,a.xAxis=g,a.yAxis=h,d3.rebind(a,f,"defined","isArea","x","y","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.margin=function(b){return arguments.length?(k.top="undefined"!=typeof b.top?b.top:k.top,k.right="undefined"!=typeof b.right?b.right:k.right,k.bottom="undefined"!=typeof b.bottom?b.bottom:k.bottom,k.left="undefined"!=typeof b.left?b.left:k.left,a):k},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(l=c.utils.getColor(b),i.color(l),a):l},a.rescaleY=function(a){return arguments.length?r=a:r},a.showControls=function(b){return arguments.length?(q=b,a):q},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(s=b,a):s},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a.average=function(b){return arguments.length?(x=b,a):x},a},c.models.discreteBar=function(){function a(c){return c.each(function(a){var c=h-g.left-g.right,j=i-g.top-g.bottom,u=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var v=b&&d?[]:a.map(function(a){return a.values.map(function(a,b){return{x:m(a,b),y:n(a,b),y0:a.y0}})});k.domain(b||d3.merge(v).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(d||d3.extent(d3.merge(v).map(function(a){return a.y}).concat(o))),q?l.range([j-(l.domain()[0]<0?12:0),l.domain()[1]>0?12:0]):l.range([j,0]),e=e||k,f=f||l.copy().range([l(0),l(0)]);var w=u.selectAll("g.nv-wrap.nv-discretebar").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),y=x.append("g");w.select("g"),y.append("g").attr("class","nv-groups"),w.attr("transform","translate("+g.left+","+g.top+")");var z=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.75);var A=z.selectAll("g.nv-bar").data(function(a){return a.values});A.exit().remove();var B=A.enter().append("g").attr("transform",function(a,b){return"translate("+(k(m(a,b))+.05*k.rangeBand())+", "+l(0)+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),s.elementMouseover({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),s.elementMouseout({value:n(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){s.elementClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){s.elementDblClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()});B.append("rect").attr("height",0).attr("width",.9*k.rangeBand()/a.length),q?(B.append("text").attr("text-anchor","middle"),A.select("text").attr("x",.9*k.rangeBand()/2).attr("y",function(a,b){return n(a,b)<0?l(n(a,b))-l(0)+12:-4}).text(function(a,b){return r(n(a,b))})):A.selectAll("text").remove(),A.attr("class",function(a,b){return n(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||p(a,b)}).style("stroke",function(a,b){return a.color||p(a,b)}).select("rect").attr("class",t).attr("width",.9*k.rangeBand()/a.length),d3.transition(A).attr("transform",function(a,b){var c=k(m(a,b))+.05*k.rangeBand(),d=n(a,b)<0?l(0):l(0)-l(n(a,b))<1?l(0)-1:l(n(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(l(n(a,b))-l(0))||1)}),e=k.copy(),f=l.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=Math.floor(1e4*Math.random()),k=d3.scale.ordinal(),l=d3.scale.linear(),m=function(a){return a.x},n=function(a){return a.y},o=[0],p=c.utils.defaultColor(),q=!1,r=d3.format(",.2f"),s=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),t="discreteBar";return a.dispatch=s,a.x=function(b){return arguments.length?(m=b,a):m},a.y=function(b){return arguments.length?(n=b,a):n},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceY=function(b){return arguments.length?(o=b,a):o},a.color=function(b){return arguments.length?(p=c.utils.getColor(b),a):p},a.id=function(b){return arguments.length?(j=b,a):j},a.showValues=function(b){return arguments.length?(q=b,a):q},a.valueFormat=function(b){return arguments.length?(r=b,a):r},a.rectClass=function(b){return arguments.length?(t=b,a):t},a},c.models.discreteBarChart=function(){function a(c){return c.each(function(c){var k=d3.select(this),n=this,r=(i||parseInt(k.style("width"))||960)-h.left-h.right,s=(j||parseInt(k.style("height"))||400)-h.top-h.bottom;if(a.update=function(){p.beforeUpdate(),k.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var t=k.selectAll(".nv-noData").data([o]);return t.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),t.attr("x",h.left+r/2).attr("y",h.top+s/2).text(function(a){return a}),a}k.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var u=k.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([c]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+h.left+","+h.top+")"),e.width(r).height(s);var y=x.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(y).call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",b.rangeBand()*(l?2:1)).attr("height",16).attr("x",-b.rangeBand()/(l?1:2)),f.scale(b).ticks(r/100).tickSize(-s,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").transition().duration(0).call(f);var z=x.select(".nv-x.nv-axis").selectAll("g");l&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(0==c%2?"5":"17")+")"}),g.scale(d).ticks(s/36).tickSize(-r,0),d3.transition(x.select(".nv-y.nv-axis")).call(g),p.on("tooltipShow",function(a){m&&q(a,n.parentNode)})}),a}var b,d,e=c.models.discreteBar(),f=c.models.axis(),g=c.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=c.utils.getColor(),l=!1,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3>"+"<p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate");f.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var q=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=n(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+h.left,a.pos[1]+h.top],p.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.discretebar=e,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","id","showValues","valueFormat"),a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),e.color(k),a):k},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.distribution=function(){function a(c){return c.each(function(a){var c=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),k=d3.select(this);b=b||j;var l=k.selectAll("g.nv-distribution").data([a]),m=l.enter().append("g").attr("class","nvd3 nv-distribution");m.append("g");var n=l.select("g");l.attr("transform","translate("+d.left+","+d.top+")");var o=n.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});o.enter().append("g"),o.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var p=o.selectAll("line.nv-dist"+g).data(function(a){return a.values});p.enter().append("line").attr(g+"1",function(a,c){return b(h(a,c))}).attr(g+"2",function(a,c){return b(h(a,c))}),d3.transition(o.exit().selectAll("line.nv-dist"+g)).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),p.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(c+"1",0).attr(c+"2",f),d3.transition(p).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),b=j.copy()}),a}var b,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=c.utils.defaultColor(),j=d3.scale.linear();return a.margin=function(b){return arguments.length?(d.top="undefined"!=typeof b.top?b.top:d.top,d.right="undefined"!=typeof b.right?b.right:d.right,d.bottom="undefined"!=typeof b.bottom?b.bottom:d.bottom,d.left="undefined"!=typeof b.left?b.left:d.left,a):d},a.width=function(b){return arguments.length?(e=b,a):e},a.axis=function(b){return arguments.length?(g=b,a):g},a.size=function(b){return arguments.length?(f=b,a):f},a.getData=function(b){return arguments.length?(h=d3.functor(b),a):h},a.scale=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),a):i},a},c.models.historicalBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,s=g-e.top-e.bottom,t=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(m))),o?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||d3.extent(a[0].values.map(l).concat(n))).range([s,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var u=t.selectAll("g.nv-wrap.nv-bar").data([a[0].values]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-bar"),w=v.append("defs"),x=v.append("g"),y=u.select("g");x.append("g").attr("class","nv-bars"),u.attr("transform","translate("+e.left+","+e.top+")"),t.on("click",function(a,b){r.chartClick({data:a,index:b,pos:d3.event,id:h})}),w.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),u.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",s),y.attr("clip-path",p?"url(#nv-chart-clip-path-"+h+")":"");var z=u.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a});z.exit().remove(),z.enter().append("rect").attr("x",0).attr("y",function(a,b){return j(Math.max(0,l(a,b)))}).attr("height",function(a,b){return Math.abs(j(l(a,b))-j(0))}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),r.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),r.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){r.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){r.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}),z.attr("fill",function(a,b){return q(a,b)}).attr("class",function(a,b,c){return(l(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).attr("transform",function(b,d){return"translate("+(i(k(b,d))-.45*(c/a[0].values.length))+",0)"}).attr("width",.9*(c/a[0].values.length)),d3.transition(z).attr("y",function(a,b){return l(a,b)<0?j(0):j(0)-j(l(a,b))<1?j(0)-1:j(l(a,b))}).attr("height",function(a,b){return Math.max(Math.abs(j(l(a,b))-j(0)),1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=[],n=[0],o=!1,p=!0,q=c.utils.defaultColor(),r=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=r,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(m=b,a):m},a.forceY=function(b){return arguments.length?(n=b,a):n},a.padData=function(b){return arguments.length?(o=b,a):o},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.historicalBarChart=function(){function a(c){return c.each(function(r){var x=d3.select(this),y=this,z=(k||parseInt(x.style("width"))||960)-i.left-i.right,A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom;if(a.update=function(){a(c)},a.container=this,s.disabled=r.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]
-}if(!(r&&r.length&&r.filter(function(a){return a.values.length}).length)){var C=x.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",i.left+z/2).attr("y",i.top+A/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=x.selectAll("g.nv-wrap.nv-lineChart").data([r]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),F=D.select("g");E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),m&&(h.width(z),F.select(".nv-legendWrap").datum(r).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom),D.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),D.attr("transform","translate("+i.left+","+i.top+")"),p&&F.select(".nv-y.nv-axis").attr("transform","translate("+z+",0)"),e.width(z).height(A).color(r.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!r[b].disabled}));var G=F.select(".nv-barsWrap").datum(r.filter(function(a){return!a.disabled}));d3.transition(G).call(e),n&&(f.scale(b).tickSize(-A,0),F.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),F.select(".nv-x.nv-axis").transition().call(f)),o&&(g.scale(d).ticks(A/36).tickSize(-z,0),F.select(".nv-y.nv-axis").transition().duration(0).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r.filter(function(a){return!a.disabled}).length||r.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),c.transition().call(a)}),h.dispatch.on("legendDblclick",function(b){r.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(r.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),c.call(a)})}),a}var b,d,e=c.models.historicalBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:90,bottom:50,left:90},j=c.utils.defaultColor(),k=null,l=null,m=!1,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.bars=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.indentedTree=function(){function a(b){return b.each(function(b){function c(b,d,e){return d3.event.stopPropagation(),d3.event.shiftKey&&!e?(d3.event.shiftKey=!1,b.values&&b.values.forEach(function(a){(a.values||a._values)&&c(a,0,!0)}),!0):g(b)?(b.values?(b._values=b.values,b.values=null):(b.values=b._values,b._values=null),a.update(),void 0):!0}function d(a){return a._values&&a._values.length?n:a.values&&a.values.length?o:""}function f(a){return a._values&&a._values.length}function g(a){var b=a.values||a._values;return b&&b.length}var r=1,s=d3.select(this),t=d3.layout.tree().children(function(a){return a.values}).size([e,k]);a.update=function(){s.transition().duration(600).call(a)},b[0]||(b[0]={key:j});var u=t.nodes(b[0]),v=d3.select(this).selectAll("div").data([[u]]),w=v.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree"),x=w.append("table"),y=v.select("table").attr("width","100%").attr("class",m);if(h){var z=x.append("thead"),A=z.append("tr");l.forEach(function(a){A.append("th").attr("width",a.width?a.width:"10%").style("text-align","numeric"==a.type?"right":"left").append("span").text(a.label)})}var B=y.selectAll("tbody").data(function(a){return a});B.enter().append("tbody"),r=d3.max(u,function(a){return a.depth}),t.size([e,r*k]);var C=B.selectAll("tr").data(function(a){return a.filter(function(a){return i&&!a.children?i(a):!0})},function(a){return a.id||a.id||++q});C.exit().remove(),C.select("img.nv-treeicon").attr("src",d).classed("folded",f);var D=C.enter().append("tr");l.forEach(function(a,b){var e=D.append("td").style("padding-left",function(a){return(b?0:a.depth*k+12+(d(a)?0:16))+"px"},"important").style("text-align","numeric"==a.type?"right":"left");0==b&&e.append("img").classed("nv-treeicon",!0).classed("nv-folded",f).attr("src",d).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(a){return d(a)?"inline-block":"none"}).on("click",c),e.append("span").attr("class",d3.functor(a.classes)).text(function(b){return a.format?a.format(b):b[a.key]||"-"}),a.showCount&&(e.append("span").attr("class","nv-childrenCount"),C.selectAll("span.nv-childrenCount").text(function(a){return a.values&&a.values.length||a._values&&a._values.length?"("+(a.values&&a.values.filter(function(a){return i?i(a):!0}).length||a._values&&a._values.filter(function(a){return i?i(a):!0}).length||0)+")":""})),a.click&&e.select("span").on("click",a.click)}),C.order().on("click",function(a){p.elementClick({row:this,data:a,pos:[a.x,a.y]})}).on("dblclick",function(a){p.elementDblclick({row:this,data:a,pos:[a.x,a.y]})}).on("mouseover",function(a){p.elementMouseover({row:this,data:a,pos:[a.x,a.y]})}).on("mouseout",function(a){p.elementMouseout({row:this,data:a,pos:[a.x,a.y]})})}),a}var b={top:0,right:0,bottom:0,left:0},d=960,e=500,f=c.utils.defaultColor(),g=Math.floor(1e4*Math.random()),h=!0,i=!1,j="No Data Available.",k=20,l=[{key:"key",label:"Name",type:"text"}],m=null,n="images/grey-plus.png",o="images/grey-minus.png",p=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),q=0;return a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.color=function(b){return arguments.length?(f=c.utils.getColor(b),scatter.color(f),a):f},a.id=function(b){return arguments.length?(g=b,a):g},a.header=function(b){return arguments.length?(h=b,a):h},a.noData=function(b){return arguments.length?(j=b,a):j},a.filterZero=function(b){return arguments.length?(i=b,a):i},a.columns=function(b){return arguments.length?(l=b,a):l},a.tableClass=function(b){return arguments.length?(m=b,a):m},a.iconOpen=function(b){return arguments.length?(n=b,a):n},a.iconClose=function(b){return arguments.length?(o=b,a):o},a},c.models.legend=function(){function a(a,b,c,d,e,f,g,h,i){var j;return j="M"+(a+e)+","+b,j+="h"+(c-2*e),g?j+="a"+e+","+e+" 0 0 1 "+e+","+e:(j+="h"+e,j+="v"+e),j+="v"+(d-2*e),i?j+="a"+e+","+e+" 0 0 1 "+-e+","+e:(j+="v"+e,j+="h"+-e),j+="h"+(2*e-c),h?j+="a"+e+","+e+" 0 0 1 "+-e+","+-e:(j+="h"+-e,j+="v"+-e),j+="v"+(2*e-d),f?j+="a"+e+","+e+" 0 0 1 "+e+","+-e:(j+="v"+-e,j+="h"+e),j+="z"}function b(n){return n.each(function(b){var n=e-d.left-d.right,o=d3.select(this),p=o.selectAll("g.nv-legend").data([b]);p.enter().append("g").attr("class","nvd3 nv-legend").append("g");var q=p.select("g");p.attr("transform","translate("+d.left+","+d.top+")");var r=q.selectAll(".nv-series").data(function(a){return a}),s=r.enter().append("g").attr("class","nv-series").on("mouseover",function(a,b){j.legendMouseover(a,b)}).on("mouseout",function(a,b){j.legendMouseout(a,b)}).on("click",function(a,b){j.legendClick(a,b)}).on("dblclick",function(a,b){j.legendDblclick(a,b)});if(s.append("path"),s.append("circle").style("stroke-width",2).attr("r",5),s.append("text").attr("text-anchor","start").attr("dy",".33em").attr("dx","12"),r.classed("disabled",function(a){return a.disabled}),r.exit().remove(),r.select("circle").style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),r.select("text").text(g),i){var t=[];r.each(function(){var a=d3.select(this).select("text"),b=a.node().getComputedTextLength()||c.utils.calcApproxTextWidth(a);t.push(b+l)});for(var u=0,v=0,w=[];n>v&&u<t.length;)w[u]=t[u],v+=t[u++];for(;v>n&&u>1;){for(w=[],u--,k=0;k<t.length;k++)t[k]>(w[k%u]||0)&&(w[k%u]=t[k]);v=w.reduce(function(a,b){return a+b})}for(var x=[],y=0,z=0;u>y;y++)x[y]=z,z+=w[y];r.attr("transform",function(a,b){return"translate("+x[b%u]+","+(5+20*Math.floor(b/u))+")"}).select("path").attr("d",function(b,c){var d=!1,e=!1;return 0==c?d=!0:c==t.length-1&&(e=!0),a(-14,-14,t[c],28,m,d,e,d,e)}),q.attr("transform","translate("+(e-d.right-v)+","+d.top+")"),f=d.top+d.bottom+20*Math.ceil(t.length/u)}else{var A,B=5,C=5,D=0;r.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+28;return A=C,e<d.left+d.right+A+a&&(C=A=5,B+=20),C+=a,C>D&&(D=C),"translate("+A+","+B+")"}),q.attr("transform","translate("+(e-d.right-D)+","+d.top+")"),f=d.top+d.bottom+B+15}}),b}var d={top:5,right:0,bottom:5,left:0},e=400,f=20,g=function(a){return a.key},h=c.utils.defaultColor(),i=!0,j=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout"),l=28,m=0,n=20;return b.dispatch=j,b.svgComputedTextPadding=function(a){return arguments.length?(l=a,b):l},b.roundedRecRadius=function(a){return arguments.length?(m=a,b):m},b.legendBelowPadding=function(a){return arguments.length?(n=a,b):n},b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.height=function(a){return arguments.length?(f=a,b):f},b.key=function(a){return arguments.length?(g=a,b):g},b.color=function(a){return arguments.length?(h=c.utils.getColor(a),b):h},b.align=function(a){return arguments.length?(i=a,b):i},b},c.models.line=function(){function a(c){return c.each(function(a){var c=g-f.left-f.right,r=h-f.top-f.bottom,s=d3.select(this);b=e.xScale(),d=e.yScale(),p=p||b,q=q||d;var t=s.selectAll("g.nv-wrap.nv-line").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-groups"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+f.left+","+f.top+")"),e.width(c).height(r);var y=t.select(".nv-scatterWrap");d3.transition(y).call(e),v.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),t.select("#nv-edge-clip-"+e.id()+" rect").attr("width",c).attr("height",r),x.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":""),y.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":"");var z=t.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return i(a,b)}).style("stroke",function(a,b){return i(a,b)}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.5);var A=z.selectAll("path.nv-area").data(function(a){return m(a)?[a]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y0(function(a,b){return q(k(a,b))}).y1(function(){return q(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(z.exit().selectAll("path.nv-area")).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(A).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])});var B=z.selectAll("path.nv-line").data(function(a){return[a.values]});B.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y(function(a,b){return q(k(a,b))})),d3.transition(z.exit().selectAll("path.nv-line")).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),d3.transition(B).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),p=b.copy(),q=d.copy()}),a}var b,d,e=c.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=c.utils.defaultColor(),j=function(a){return a.x},k=function(a){return a.y},l=function(a,b){return!isNaN(k(a,b))&&null!==k(a,b)},m=function(a){return a.area},n=!1,o="linear";e.size(16).sizeDomain([16,256]);var p,q;return a.dispatch=e.dispatch,a.scatter=e,d3.rebind(a,e,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius","padData"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.x=function(b){return arguments.length?(j=b,e.x(b),a):j},a.y=function(b){return arguments.length?(k=b,e.y(b),a):k},a.clipEdge=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),e.color(i),a):i},a.interpolate=function(b){return arguments.length?(o=b,a):o},a.defined=function(b){return arguments.length?(l=b,a):l},a.isArea=function(b){return arguments.length?(m=d3.functor(b),a):m},a},c.models.lineChart=function(){function a(c){return c.each(function(c){var r=d3.select(this),x=this,y=(k||parseInt(r.style("width"))||960)-i.left-i.right,z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom;if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=r.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",i.left+y/2).attr("y",i.top+z/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=r.selectAll("g.nv-wrap.nv-lineChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),E=C.select("g");D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-legendWrap"),m&&(h.width(y),E.select(".nv-legendWrap").datum(c).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom),C.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),C.attr("transform","translate("+i.left+","+i.top+")"),p&&E.select(".nv-y.nv-axis").attr("transform","translate("+y+",0)"),e.width(y).height(z).color(c.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!c[b].disabled}));var F=E.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(F).call(e),n&&(f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(E.select(".nv-x.nv-axis")).call(f)),o&&(g.scale(d).ticks(z/36).tickSize(-y,0),d3.transition(E.select(".nv-y.nv-axis")).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,C.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,x.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),a.update()})}),a}var b,d,e=c.models.line(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:20,bottom:50,left:60},j=c.utils.defaultColor(),k=null,l=null,m=!0,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.lines=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.linePlusBarChart=function(){function a(c){return c.each(function(c){var o=d3.select(this),p=this,t=(m||parseInt(o.style("width"))||960)-l.left-l.right,z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom;if(a.update=function(){o.transition().call(a)},u.disabled=c.map(function(a){return!!a.disabled}),!v){var A;v={};for(A in u)v[A]=u[A]instanceof Array?u[A].slice(0):u[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=o.selectAll(".nv-noData").data([w]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",l.left+t/2).attr("y",l.top+z/2).text(function(a){return a}),a}o.selectAll(".nv-noData").remove();var C=c.filter(function(a){return!a.disabled&&a.bar}),D=c.filter(function(a){return!a.bar});b=D.filter(function(a){return!a.disabled}).length&&D.filter(function(a){return!a.disabled})[0].values.length?f.xScale():g.xScale(),d=g.yScale(),e=f.yScale();var E=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([c]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y1 nv-axis"),F.append("g").attr("class","nv-y2 nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),r&&(k.width(t/2),G.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(k),l.top!=k.height()&&(l.top=k.height()+k.legendBelowPadding(),z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom),G.select(".nv-legendWrap").attr("transform","translate("+t/2+","+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),f.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar})),g.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar}));var H=G.select(".nv-barsWrap").datum(C.length?C:[{values:[]}]),I=G.select(".nv-linesWrap").datum(D[0]&&!D[0].disabled?D:[{values:[]}]);d3.transition(H).call(g),d3.transition(I).call(f),h.scale(b).ticks(t/100).tickSize(-z,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(G.select(".nv-x.nv-axis")).call(h),i.scale(d).ticks(z/36).tickSize(-t,0),d3.transition(G.select(".nv-y1.nv-axis")).style("opacity",C.length?1:0).call(i),j.scale(e).ticks(z/36).tickSize(C.length?0:-t,0),G.select(".nv-y2.nv-axis").style("opacity",D.length?1:0).attr("transform","translate("+t+",0)"),d3.transition(G.select(".nv-y2.nv-axis")).call(j),k.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),k.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),x.on("tooltipShow",function(a){s&&y(a,p.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),a.update()})}),a}var b,d,e,f=c.models.line(),g=c.models.historicalBar(),h=c.models.axis(),i=c.models.axis(),j=c.models.axis(),k=c.models.legend(),l={top:30,right:60,bottom:50,left:60},m=null,n=null,o=function(a){return a.x},p=function(a){return a.y},q=c.utils.defaultColor(),r=!0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},u={},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.padData(!0),f.clipEdge(!1).padData(!0),h.orient("bottom").tickPadding(7).highlightZero(!1),i.orient("left"),j.orient("right");var y=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),g=b.pos[1]+(d.offsetTop||0),k=h.tickFormat()(f.x()(b.point,b.pointIndex)),l=(b.series.bar?i:j).tickFormat()(f.y()(b.point,b.pointIndex)),m=t(b.series.key,k,l,b,a);c.tooltip.show([e,g],m,b.value<0?"n":"s",null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.legend=k,a.lines=f,a.bars=g,a.xAxis=h,a.y1Axis=i,a.y2Axis=j,d3.rebind(a,f,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(o=b,f.x(b),g.x(b),a):o},a.y=function(b){return arguments.length?(p=b,f.y(b),g.y(b),a):p},a.margin=function(b){return arguments.length?(l.top="undefined"!=typeof b.top?b.top:l.top,l.right="undefined"!=typeof b.right?b.right:l.right,l.bottom="undefined"!=typeof b.bottom?b.bottom:l.bottom,l.left="undefined"!=typeof b.left?b.left:l.left,a):l},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),k.color(q),a):q},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.lineWithFocusChart=function(){function a(c){return c.each(function(c){function x(a){var b=+("e"==a),c=b?1:-1,d=H/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"Z"+"M"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function B(){n.empty()||n.extent(v),P.data([n.empty()?e.domain():v]).each(function(a){var c=e(a[0])-b.range()[0],d=b.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>c?0:c),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function C(){v=n.empty()?null:n.extent(),extent=n.empty()?e.domain():n.extent(),z.brush({extent:extent,brush:n}),B();var a=L.select(".nv-focus .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}).map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return g.x()(a,b)>=extent[0]&&g.x()(a,b)<=extent[1]})}}));d3.transition(a).call(g),d3.transition(L.select(".nv-focus .nv-x.nv-axis")).call(i),d3.transition(L.select(".nv-focus .nv-y.nv-axis")).call(j)}var D=d3.select(this),E=this,F=(r||parseInt(D.style("width"))||960)-o.left-o.right,G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t,H=t-p.top-p.bottom;if(a.update=function(){D.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var I=D.selectAll(".nv-noData").data([y]);return I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),I.attr("x",o.left+F/2).attr("y",o.top+G/2).text(function(a){return a}),a}D.selectAll(".nv-noData").remove(),b=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var J=D.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([c]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),L=J.select("g");K.append("g").attr("class","nv-legendWrap");var M=K.append("g").attr("class","nv-focus");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-linesWrap");var N=K.append("g").attr("class","nv-context");N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-linesWrap"),N.append("g").attr("class","nv-brushBackground"),N.append("g").attr("class","nv-x nv-brush"),u&&(m.width(F),L.select(".nv-legendWrap").datum(c).call(m),o.top!=m.height()&&(o.top=m.height()+m.legendBelowPadding(),G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t),L.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")")),J.attr("transform","translate("+o.left+","+o.top+")"),g.width(F).height(G).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled})),h.defined(g.defined()).width(F).height(H).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-context").attr("transform","translate(0,"+(G+o.bottom+p.top)+")");var O=L.select(".nv-context .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(O).call(h),i.scale(b).ticks(F/100).tickSize(-G,0),j.scale(d).ticks(G/36).tickSize(-F,0),L.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+G+")"),n.x(e).on("brush",C),v&&n.extent(v);var P=L.select(".nv-brushBackground").selectAll("g").data([v||n.extent()]),Q=P.enter().append("g");Q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",H),Q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",H),gBrush=L.select(".nv-x.nv-brush").call(n),gBrush.selectAll("rect").attr("height",H),gBrush.selectAll(".resize").append("path").attr("d",x),C(),k.scale(e).ticks(F/100).tickSize(-H,0),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(L.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f).ticks(H/36).tickSize(-F,0),d3.transition(L.select(".nv-context .nv-y.nv-axis")).call(l),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".nv-series").classed("disabled",!1),a}),D.transition().call(a)}),z.on("tooltipShow",function(a){w&&A(a,E.parentNode)})}),a}var b,d,e,f,g=c.models.line(),h=c.models.line(),i=c.models.axis(),j=c.models.axis(),k=c.models.axis(),l=c.models.axis(),m=c.models.legend(),n=d3.svg.brush(),o={top:30,right:30,bottom:30,left:60},p={top:0,right:30,bottom:20,left:60},q=c.utils.defaultColor(),r=null,s=null,t=100,u=!0,v=null,w=!0,x=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},y="No Data Available.",z=d3.dispatch("tooltipShow","tooltipHide","brush");g.clipEdge(!0),h.interactive(!1),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left");var A=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),h=i.tickFormat()(g.x()(b.point,b.pointIndex)),k=j.tickFormat()(g.y()(b.point,b.pointIndex)),l=x(b.series.key,h,k,b,a);c.tooltip.show([e,f],l,null,null,d)};return g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+o.left,a.pos[1]+o.top],z.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){z.tooltipHide(a)}),z.on("tooltipHide",function(){w&&c.tooltip.cleanup()}),a.dispatch=z,a.legend=m,a.lines=g,a.lines2=h,a.xAxis=i,a.yAxis=j,a.x2Axis=k,a.y2Axis=l,d3.rebind(a,g,"defined","isArea","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.x=function(b){return arguments.length?(g.x(b),h.x(b),a):g.x
-},a.y=function(b){return arguments.length?(g.y(b),h.y(b),a):g.y},a.margin=function(b){return arguments.length?(o.top="undefined"!=typeof b.top?b.top:o.top,o.right="undefined"!=typeof b.right?b.right:o.right,o.bottom="undefined"!=typeof b.bottom?b.bottom:o.bottom,o.left="undefined"!=typeof b.left?b.left:o.left,a):o},a.margin2=function(b){return arguments.length?(p=b,a):p},a.width=function(b){return arguments.length?(r=b,a):r},a.height=function(b){return arguments.length?(s=b,a):s},a.height2=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),m.color(q),a):q},a.showLegend=function(b){return arguments.length?(u=b,a):u},a.tooltips=function(b){return arguments.length?(w=b,a):w},a.tooltipContent=function(b){return arguments.length?(x=b,a):x},a.interpolate=function(b){return arguments.length?(g.interpolate(b),h.interpolate(b),a):g.interpolate()},a.noData=function(b){return arguments.length?(y=b,a):y},a.xTickFormat=function(b){return arguments.length?(i.tickFormat(b),k.tickFormat(b),a):i.tickFormat()},a.yTickFormat=function(b){return arguments.length?(j.tickFormat(b),l.tickFormat(b),a):j.tickFormat()},a},c.models.linePlusBarWithFocusChart=function(){function a(c){return c.each(function(c){function G(a){var b=+("e"==a),c=b?1:-1,d=Q/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"Z"+"M"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function K(){u.empty()||u.extent(E),bb.data([u.empty()?e.domain():E]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function L(){E=u.empty()?null:u.extent(),b=u.empty()?e.domain():u.extent(),I.brush({extent:b,brush:u}),K(),l.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),j.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var a=Y.select(".nv-focus .nv-barsWrap").datum(S.length?S.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return l.x()(a,c)>=b[0]&&l.x()(a,c)<=b[1]})}}):[{values:[]}]),h=Y.select(".nv-focus .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return j.x()(a,c)>=b[0]&&j.x()(a,c)<=b[1]})}}));d=S.length?l.xScale():j.xScale(),n.scale(d).ticks(O/100).tickSize(-P,0),n.domain([Math.ceil(b[0]),Math.floor(b[1])]),d3.transition(Y.select(".nv-x.nv-axis")).call(n),d3.transition(a).call(l),d3.transition(h).call(j),Y.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f).ticks(P/36).tickSize(-O,0),Y.select(".nv-focus .nv-y1.nv-axis").style("opacity",S.length?1:0),q.scale(g).ticks(P/36).tickSize(S.length?0:-O,0),Y.select(".nv-focus .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+d.range()[1]+",0)"),d3.transition(Y.select(".nv-focus .nv-y1.nv-axis")).call(p),d3.transition(Y.select(".nv-focus .nv-y2.nv-axis")).call(q)}var M=d3.select(this),N=this,O=(x||parseInt(M.style("width"))||960)-v.left-v.right,P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z,Q=z-w.top-w.bottom;if(a.update=function(){M.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var R=M.selectAll(".nv-noData").data([H]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",v.left+O/2).attr("y",v.top+P/2).text(function(a){return a}),a}M.selectAll(".nv-noData").remove();var S=c.filter(function(a){return!a.disabled&&a.bar}),T=c.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var U=c.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),V=c.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,O]),e.domain(d3.extent(d3.merge(U.concat(V)),function(a){return a.x})).range([0,O]);var W=M.selectAll("g.nv-wrap.nv-linePlusBar").data([c]),X=W.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),Y=W.select("g");X.append("g").attr("class","nv-legendWrap");var Z=X.append("g").attr("class","nv-focus");Z.append("g").attr("class","nv-x nv-axis"),Z.append("g").attr("class","nv-y1 nv-axis"),Z.append("g").attr("class","nv-y2 nv-axis"),Z.append("g").attr("class","nv-barsWrap"),Z.append("g").attr("class","nv-linesWrap");var $=X.append("g").attr("class","nv-context");$.append("g").attr("class","nv-x nv-axis"),$.append("g").attr("class","nv-y1 nv-axis"),$.append("g").attr("class","nv-y2 nv-axis"),$.append("g").attr("class","nv-barsWrap"),$.append("g").attr("class","nv-linesWrap"),$.append("g").attr("class","nv-brushBackground"),$.append("g").attr("class","nv-x nv-brush"),D&&(t.width(O/2),Y.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(t),v.top!=t.height()&&(v.top=t.height()+t.legendBelowPadding(),P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z),Y.select(".nv-legendWrap").attr("transform","translate("+O/2+","+-v.top+")")),W.attr("transform","translate("+v.left+","+v.top+")"),m.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),k.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var _=Y.select(".nv-context .nv-barsWrap").datum(S.length?S:[{values:[]}]),ab=Y.select(".nv-context .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T);Y.select(".nv-context").attr("transform","translate(0,"+(P+v.bottom+w.top)+")"),d3.transition(_).call(m),d3.transition(ab).call(k),u.x(e).on("brush",L),E&&u.extent(E);var bb=Y.select(".nv-brushBackground").selectAll("g").data([E||u.extent()]),cb=bb.enter().append("g");cb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",Q),cb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",Q);var db=Y.select(".nv-x.nv-brush").call(u);db.selectAll("rect").attr("height",Q),db.selectAll(".resize").append("path").attr("d",G),o.ticks(O/100).tickSize(-Q,0),Y.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-x.nv-axis")).call(o),r.scale(h).ticks(Q/36).tickSize(-O,0),Y.select(".nv-context .nv-y1.nv-axis").style("opacity",S.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-y1.nv-axis")).call(r),s.scale(i).ticks(Q/36).tickSize(S.length?0:-O,0),Y.select(".nv-context .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),d3.transition(Y.select(".nv-context .nv-y2.nv-axis")).call(s),t.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,W.selectAll(".nv-series").classed("disabled",!1),a}),a.update()}),I.on("tooltipShow",function(a){F&&J(a,N.parentNode)}),L()}),a}var b,d,e,f,g,h,i,j=c.models.line(),k=c.models.line(),l=c.models.historicalBar(),m=c.models.historicalBar(),n=c.models.axis(),o=c.models.axis(),p=c.models.axis(),q=c.models.axis(),r=c.models.axis(),s=c.models.axis(),t=c.models.legend(),u=d3.svg.brush(),v={top:30,right:30,bottom:30,left:60},w={top:0,right:30,bottom:20,left:60},x=null,y=null,z=100,A=function(a){return a.x},B=function(a){return a.y},C=c.utils.defaultColor(),D=!0,E=null,F=!0,G=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},H="No Data Available.",I=d3.dispatch("tooltipShow","tooltipHide","brush");j.clipEdge(!0),k.interactive(!1),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right");var J=function(d,e){b&&(d.pointIndex+=Math.ceil(b[0]));var f=d.pos[0]+(e.offsetLeft||0),g=d.pos[1]+(e.offsetTop||0),h=n.tickFormat()(j.x()(d.point,d.pointIndex)),i=(d.series.bar?p:q).tickFormat()(j.y()(d.point,d.pointIndex)),k=G(d.series.key,h,i,d,a);c.tooltip.show([f,g],k,d.value<0?"n":"s",null,e)};return j.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),j.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),l.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),I.on("tooltipHide",function(){F&&c.tooltip.cleanup()}),a.dispatch=I,a.legend=t,a.lines=j,a.lines2=k,a.bars=l,a.bars2=m,a.xAxis=n,a.x2Axis=o,a.y1Axis=p,a.y2Axis=q,a.y3Axis=r,a.y4Axis=s,d3.rebind(a,j,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(A=b,j.x(b),l.x(b),a):A},a.y=function(b){return arguments.length?(B=b,j.y(b),l.y(b),a):B},a.margin=function(b){return arguments.length?(v.top="undefined"!=typeof b.top?b.top:v.top,v.right="undefined"!=typeof b.right?b.right:v.right,v.bottom="undefined"!=typeof b.bottom?b.bottom:v.bottom,v.left="undefined"!=typeof b.left?b.left:v.left,a):v},a.width=function(b){return arguments.length?(x=b,a):x},a.height=function(b){return arguments.length?(y=b,a):y},a.color=function(b){return arguments.length?(C=c.utils.getColor(b),t.color(C),a):C},a.showLegend=function(b){return arguments.length?(D=b,a):D},a.tooltips=function(b){return arguments.length?(F=b,a):F},a.tooltipContent=function(b){return arguments.length?(G=b,a):G},a.noData=function(b){return arguments.length?(H=b,a):H},a.brushExtent=function(b){return arguments.length?(E=b,a):E},a},c.models.multiBar=function(){function a(c){return c.each(function(a){var c=i-h.left-h.right,y=j-h.top-h.bottom,z=d3.select(this);t&&a.length&&(t=[{values:a[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),r&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(!a.length&&t?t:a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),r&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e,e-=b.size):(b.y1=b.size+d,d+=b.size)})});var A=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});k.domain(d3.merge(A).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(e||d3.extent(d3.merge(A).map(function(a){return r?a.y>0?a.y1:a.y1+a.y:a.y}).concat(p))).range([y,0]),(k.domain()[0]===k.domain()[1]||l.domain()[0]===l.domain()[1])&&(singlePoint=!0),k.domain()[0]===k.domain()[1]&&(k.domain()[0]?k.domain([k.domain()[0]-.01*k.domain()[0],k.domain()[1]+.01*k.domain()[1]]):k.domain([-1,1])),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]+.01*l.domain()[0],l.domain()[1]-.01*l.domain()[1]]):l.domain([-1,1])),f=f||k,g=g||l;var B=z.selectAll("g.nv-wrap.nv-multibar").data([a]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-groups"),B.attr("transform","translate("+h.left+","+h.top+")"),D.append("clipPath").attr("id","nv-edge-clip-"+m).append("rect"),B.select("#nv-edge-clip-"+m+" rect").attr("width",c).attr("height",y),F.attr("clip-path",q?"url(#nv-edge-clip-"+m+")":"");var G=B.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),G.exit().selectAll("rect.nv-bar").transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return r?g(a.y0):g(0)}).attr("height",0).remove(),G.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return s(a,b)}).style("stroke",function(a,b){return s(a,b)}),d3.transition(G).style("stroke-opacity",1).style("fill-opacity",.75);var H=G.selectAll("rect.nv-bar").data(function(b){return t&&!a.length?t.values:b.values});H.exit().remove(),H.enter().append("rect").attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(b,c,d){return r?0:d*k.rangeBand()/a.length}).attr("y",function(a){return g(r?a.y0:0)}).attr("height",0).attr("width",k.rangeBand()/(r?1:a.length)),H.style("fill",function(a,b,c){return s(a,c,b)}).style("stroke",function(a,b,c){return s(a,c,b)}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),H.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+k(n(a,b))+",0)"}),u&&(b||(b=a.map(function(){return!0})),H.style("fill",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),r?H.transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return l(r?a.y1:0)}).attr("height",function(a){return Math.max(Math.abs(l(a.y+(r?a.y0:0))-l(r?a.y0:0)),1)}).each("end",function(){d3.select(this).transition().duration(w).attr("x",function(b){return r?0:b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/(r?1:a.length))}):d3.transition(H).duration(w).delay(function(b,c){return c*v/a[0].values.length}).attr("x",function(b){return b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/a.length).each("end",function(){d3.select(this).transition().duration(w).attr("y",function(a,b){return o(a,b)<0?l(0):l(0)-l(o(a,b))<1?l(0)-1:l(o(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(l(o(a,b))-l(0)),1)||0})}),f=k.copy(),g=l.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=d3.scale.ordinal(),l=d3.scale.linear(),m=Math.floor(1e4*Math.random()),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=!0,r=!1,s=c.utils.defaultColor(),t=!1,u=null,v=1200,w=500,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(r=b,a):r},a.clipEdge=function(b){return arguments.length?(q=b,a):q},a.color=function(b){return arguments.length?(s=c.utils.getColor(b),a):s},a.barColor=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(m=b,a):m},a.hideable=function(b){return arguments.length?(t=b,a):t},a.delay=function(b){return arguments.length?(v=b,a):v},a.drawTime=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarChart=function(){function a(c){return c.each(function(c){var t=d3.select(this),A=this,B=(k||parseInt(t.style("width"))||960)-j.left-j.right,C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom;if(a.update=function(){t.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var E=t.selectAll(".nv-noData").data([w]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",j.left+B/2).attr("y",j.top+C/2).text(function(a){return a}),a}t.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var F=t.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([c]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),o&&(h.width(B-y()),e.barColor()&&c.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),H.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-j.top+")")),n){var I=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(i)}F.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(c.map(function(a){return a.disabled})).width(B).height(C).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled}));var J=H.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(J).call(e),f.scale(b).ticks(B/100).tickSize(-C,0),H.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(H.select(".nv-x.nv-axis")).call(f);var K=H.select(".nv-x.nv-axis > g").selectAll("g");if(K.selectAll("line, text").style("opacity",1),q){var L=function(a,b){return"translate("+a+","+b+")"},M=5,N=17;K.selectAll("text").attr("transform",function(a,b,c){return L(0,0==c%2?M:N)});var O=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;H.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return L(0,0===b||0!==O%2?N:M)})}p&&K.filter(function(a,b){return 0!==b%Math.ceil(c[0].values.length/(B/100))}).selectAll("text, line").style("opacity",0),r&&K.selectAll("text").attr("transform","rotate("+r+" 0,0)").attr("text-anchor",r>0?"start":"end"),H.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1),g.scale(d).ticks(C/36).tickSize(-B,0),d3.transition(H.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,F.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),a.update()}}),x.on("tooltipShow",function(a){s&&z(a,A.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),u.stacked=b.stacked),a.update()})}),a}var b,d,e=c.models.multiBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=!1,r=0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" on "+b+"</p>"},u={stacked:!1},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),y=function(){return n?180:0};e.stacked(!1),f.orient("bottom").tickPadding(7).highlightZero(!0).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var z=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=t(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],x.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","stacked","delay","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.reduceXTicks=function(b){return arguments.length?(p=b,a):p},a.rotateLabels=function(b){return arguments.length?(r=b,a):r},a.staggerLabels=function(b){return arguments.length?(q=b,a):q},a.tooltip=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarHorizontal=function(){function a(c){return c.each(function(a){var c=i-h.left-h.right,k=j-h.top-h.bottom;d3.select(this),s&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),s&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var w=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});l.domain(d||d3.merge(w).map(function(a){return a.x})).rangeBands([0,k],.1),m.domain(e||d3.extent(d3.merge(w).map(function(a){return s?a.y>0?a.y1+a.y:a.y1:a.y}).concat(p))),t&&!s?m.range([m.domain()[0]<0?u:0,c-(m.domain()[1]>0?u:0)]):m.range([0,c]),f=f||l,g=g||d3.scale.linear().domain(m.domain()).range([m(0),m(0)]);var y=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([a]),z=y.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");z.append("defs");var A=z.append("g");y.select("g"),A.append("g").attr("class","nv-groups"),y.attr("transform","translate("+h.left+","+h.top+")");var B=y.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});B.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(B.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),B.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return q(a,b)}).style("stroke",function(a,b){return q(a,b)}),d3.transition(B).style("stroke-opacity",1).style("fill-opacity",.75);var C=B.selectAll("g.nv-bar").data(function(a){return a.values});C.exit().remove();var D=C.enter().append("g").attr("transform",function(b,c,d){return"translate("+g(s?b.y0:0)+","+(s?0:d*l.rangeBand()/a.length+l(n(b,c)))+")"});D.append("rect").attr("width",0).attr("height",l.rangeBand()/(s?1:a.length)),C.on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[m(o(b,c)+(s?b.y0:0)),l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),D.append("text"),t&&!s?(C.select("text").attr("text-anchor",function(a,b){return o(a,b)<0?"end":"start"}).attr("y",l.rangeBand()/(2*a.length)).attr("dy",".32em").text(function(a,b){return v(o(a,b))}),d3.transition(C).select("text").attr("x",function(a,b){return o(a,b)<0?-4:m(o(a,b))-m(0)+4})):C.selectAll("text").text(""),C.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}),r&&(b||(b=a.map(function(){return!0})),C.style("fill",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),s?d3.transition(C).attr("transform",function(a,b){return"translate("+m(a.y1)+","+l(n(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(m(o(a,b)+a.y0)-m(a.y0))}).attr("height",l.rangeBand()):d3.transition(C).attr("transform",function(b,c){return"translate("+(o(b,c)<0?m(o(b,c)):m(0))+","+(b.series*l.rangeBand()/a.length+l(n(b,c)))+")"}).select("rect").attr("height",l.rangeBand()/a.length).attr("width",function(a,b){return Math.max(Math.abs(m(o(a,b))-m(0)),1)}),f=l.copy(),g=m.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=Math.floor(1e4*Math.random()),l=d3.scale.ordinal(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=c.utils.defaultColor(),r=null,s=!1,t=!1,u=60,v=d3.format(",.2f"),w=1200,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(s=b,a):s},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.barColor=function(b){return arguments.length?(r=c.utils.getColor(b),a):r},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(k=b,a):k},a.delay=function(b){return arguments.length?(w=b,a):w},a.showValues=function(b){return arguments.length?(t=b,a):t},a.valueFormat=function(b){return arguments.length?(v=b,a):v},a.valuePadding=function(b){return arguments.length?(u=b,a):u},a},c.models.multiBarHorizontalChart=function(){function a(c){return c.each(function(p){var r=d3.select(this),y=this,z=(k||parseInt(r.style("width"))||960)-j.left-j.right,A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom;if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=p.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]}if(!(p&&p.length&&p.filter(function(a){return a.values.length}).length)){var C=r.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",j.left+z/2).attr("y",j.top+A/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=r.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([p]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),F=D.select("g");if(E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),E.append("g").attr("class","nv-controlsWrap"),o&&(h.width(z-w()),e.barColor()&&p.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),F.select(".nv-legendWrap").datum(p).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom),F.select(".nv-legendWrap").attr("transform","translate("+w()+","+-j.top+")")),n){var G=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(w()).color(["#444","#444","#444"]),F.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(i)}D.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(p.map(function(a){return a.disabled})).width(z).height(A).color(p.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!p[b].disabled}));var H=F.select(".nv-barsWrap").datum(p.filter(function(a){return!a.disabled}));d3.transition(H).call(e),f.scale(b).ticks(A/24).tickSize(-z,0),d3.transition(F.select(".nv-x.nv-axis")).call(f);var I=F.select(".nv-x.nv-axis").selectAll("g");I.selectAll("line, text").style("opacity",1),g.scale(d).ticks(z/100).tickSize(-A,0),F.select(".nv-y.nv-axis").attr("transform","translate(0,"+A+")"),d3.transition(F.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,p.filter(function(a){return!a.disabled}).length||p.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){p.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(G=G.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}s.stacked=e.stacked(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){q&&x(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(p.forEach(function(a,c){a.disabled=b.disabled[c]
-}),s.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),s.stacked=b.stacked),c.call(a)})}),a}var b,d,e=c.models.multiBarHorizontal(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend().height(30),i=c.models.legend().height(30),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+" - "+b+"</h3>"+"<p>"+c+"</p>"},s={stacked:p},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=function(){return n?180:0};e.stacked(p),f.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f"));var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=r(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"e":"w",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.multiChart=function(){function a(c){return c.each(function(c){var j=d3.select(this),y=this;a.update=function(){j.transition().call(a)},a.container=this;var z=(f||parseInt(j.style("width"))||960)-d.left-d.right,A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom,B=c.filter(function(a){return!a.disabled&&"line"==a.type&&1==a.yAxis}),C=c.filter(function(a){return!a.disabled&&"line"==a.type&&2==a.yAxis}),D=c.filter(function(a){return!a.disabled&&"bar"==a.type&&1==a.yAxis}),E=c.filter(function(a){return!a.disabled&&"bar"==a.type&&2==a.yAxis}),F=c.filter(function(a){return!a.disabled&&"area"==a.type&&1==a.yAxis}),G=c.filter(function(a){return!a.disabled&&"area"==a.type&&2==a.yAxis}),H=c.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),I=c.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});b.domain(d3.extent(d3.merge(H.concat(I)),function(a){return a.x})).range([0,z]);var J=j.selectAll("g.wrap.multiChart").data([c]),K=J.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");K.append("g").attr("class","x axis"),K.append("g").attr("class","y1 axis"),K.append("g").attr("class","y2 axis"),K.append("g").attr("class","lines1Wrap"),K.append("g").attr("class","lines2Wrap"),K.append("g").attr("class","bars1Wrap"),K.append("g").attr("class","bars2Wrap"),K.append("g").attr("class","stack1Wrap"),K.append("g").attr("class","stack2Wrap"),K.append("g").attr("class","legendWrap");var L=J.select("g");h&&(v.width(z/2),L.select(".legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(v),d.top!=v.height()&&(d.top=v.height()+v.legendBelowPadding(),A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom),L.select(".legendWrap").attr("transform","translate("+z/2+","+-d.top+")")),m.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"line"==c[b].type})),n.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"line"==c[b].type})),o.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"bar"==c[b].type})),p.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"bar"==c[b].type})),q.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"area"==c[b].type})),r.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"area"==c[b].type})),L.attr("transform","translate("+d.left+","+d.top+")");var M=L.select(".lines1Wrap").datum(B),N=L.select(".bars1Wrap").datum(D),O=L.select(".stack1Wrap").datum(F),P=L.select(".lines2Wrap").datum(C),Q=L.select(".bars2Wrap").datum(E),R=L.select(".stack2Wrap").datum(G),S=F.length?F.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],T=G.length?G.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];k.domain(d3.extent(d3.merge(H).concat(S),function(a){return a.y})).range([0,A]),l.domain(d3.extent(d3.merge(I).concat(T),function(a){return a.y})).range([0,A]),m.yDomain(k.domain()),o.yDomain(k.domain()),q.yDomain(k.domain()),n.yDomain(l.domain()),p.yDomain(l.domain()),r.yDomain(l.domain()),F.length&&d3.transition(O).call(q),G.length&&d3.transition(R).call(r),D.length&&d3.transition(N).call(o),E.length&&d3.transition(Q).call(p),B.length&&d3.transition(M).call(m),C.length&&d3.transition(P).call(n),s.ticks(z/100).tickSize(-A,0),L.select(".x.axis").attr("transform","translate(0,"+A+")"),d3.transition(L.select(".x.axis")).call(s),t.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y1.axis")).call(t),u.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y2.axis")).call(u),L.select(".y2.axis").style("opacity",I.length?1:0).attr("transform","translate("+b.range()[1]+",0)"),v.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".series").classed("disabled",!1),a}),a.update()}),w.on("tooltipShow",function(a){i&&x(a,y.parentNode)})}),a}var b,d={top:30,right:20,bottom:50,left:60},e=d3.scale.category20().range(),f=null,g=null,h=!0,i=!0,j=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" at "+b+"</p>"},b=d3.scale.linear(),k=d3.scale.linear(),l=d3.scale.linear(),m=c.models.line().yScale(k),n=c.models.line().yScale(l),o=c.models.multiBar().stacked(!1).yScale(k),p=c.models.multiBar().stacked(!1).yScale(l),q=c.models.stackedArea().yScale(k),r=c.models.stackedArea().yScale(l),s=c.models.axis().scale(b).orient("bottom").tickPadding(5),t=c.models.axis().scale(k).orient("left"),u=c.models.axis().scale(l).orient("right"),v=c.models.legend().height(30),w=d3.dispatch("tooltipShow","tooltipHide"),x=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),g=s.tickFormat()(m.x()(b.point,b.pointIndex)),h=(2==b.series.yAxis?u:t).tickFormat()(m.y()(b.point,b.pointIndex)),i=j(b.series.key,g,h,b,a);c.tooltip.show([e,f],i,void 0,void 0,d.offsetParent)};return m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),o.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),o.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),p.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),p.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),q.dispatch.on("tooltipShow",function(a){return Math.round(100*q.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),q.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),r.dispatch.on("tooltipShow",function(a){return Math.round(100*r.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),r.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),w.on("tooltipHide",function(){i&&c.tooltip.cleanup()}),a.dispatch=w,a.lines1=m,a.lines2=n,a.bars1=o,a.bars2=p,a.stack1=q,a.stack2=r,a.xAxis=s,a.yAxis1=t,a.yAxis2=u,a.x=function(b){return arguments.length?(getX=b,m.x(b),o.x(b),a):getX},a.y=function(b){return arguments.length?(getY=b,m.y(b),o.y(b),a):getY},a.margin=function(b){return arguments.length?(d=b,a):d},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(b){return arguments.length?(e=b,v.color(b),a):e},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(i=b,a):i},a.tooltipContent=function(b){return arguments.length?(j=b,a):j},a},c.models.ohlcBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,u=g-e.top-e.bottom,w=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(q))),s?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||[d3.min(a[0].values.map(p).concat(r)),d3.max(a[0].values.map(o).concat(r))]).range([u,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var x=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([a[0].values]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),z=y.append("defs"),A=y.append("g"),B=x.select("g");A.append("g").attr("class","nv-ticks"),x.attr("transform","translate("+e.left+","+e.top+")"),w.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:h})}),z.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),x.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",u),B.attr("clip-path",t?"url(#nv-chart-clip-path-"+h+")":"");var C=x.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});C.exit().remove(),C.enter().append("path").attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(b,d){var e=.9*(c/a[0].values.length);return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"}).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),v.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),v.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){v.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}),C.attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(C).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).attr("d",function(b,d){var e=.9*(c/a[0].values.length);return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=function(a){return a.open},n=function(a){return a.close},o=function(a){return a.high},p=function(a){return a.low},q=[],r=[],s=!1,t=!0,u=c.utils.defaultColor(),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.open=function(b){return arguments.length?(m=b,a):m},a.close=function(b){return arguments.length?(n=b,a):n},a.high=function(b){return arguments.length?(o=b,a):o},a.low=function(b){return arguments.length?(p=b,a):p},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(q=b,a):q},a.forceY=function(b){return arguments.length?(r=b,a):r},a.padData=function(b){return arguments.length?(s=b,a):s},a.clipEdge=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.pie=function(){function a(c){return c.each(function(a){function c(a){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,q||(a.innerRadius=0);var b=d3.interpolate(this._current,a);return this._current=b(0),function(a){return D(b(a))}}var i=d-b.left-b.right,l=e-b.top-b.bottom,w=Math.min(i,l)/2,x=w-w/5,y=d3.select(this),z=y.selectAll(".nv-wrap.nv-pie").data([f(a[0])]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+j),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-pie"),z.attr("transform","translate("+b.left+","+b.top+")"),C.select(".nv-pie").attr("transform","translate("+i/2+","+l/2+")"),y.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:j})});var D=d3.svg.arc().outerRadius(x);s&&D.startAngle(s),t&&D.endAngle(t),q&&D.innerRadius(w*u);var E=d3.layout.pie().sort(null).value(function(a){return a.disabled?0:h(a)}),F=z.select(".nv-pie").selectAll(".nv-slice").data(E);F.exit().remove();var G=F.enter().append("g").attr("class","nv-slice").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({label:g(a.data),value:h(a.data),point:a.data,pointIndex:b,pos:[d3.event.pageX,d3.event.pageY],id:j})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({label:g(a.data),value:h(a.data),point:a.data,index:b,id:j})}).on("click",function(a,b){v.elementClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()});if(F.attr("fill",function(a,b){return k(a,b)}).attr("stroke",function(a,b){return k(a,b)}),G.append("path").each(function(a){this._current=a}),d3.transition(F.select("path")).attr("d",D).attrTween("d",c),m){var H=d3.svg.arc().innerRadius(0);n&&(H=D),o&&(H=d3.svg.arc().outerRadius(D.outerRadius())),G.append("g").classed("nv-label",!0).each(function(a){var b=d3.select(this);b.attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),b.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),b.append("text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}),F.select(".nv-label").transition().attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),F.each(function(a){var b=d3.select(this);b.select(".nv-label text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").text(function(a){var b=(a.endAngle-a.startAngle)/(2*Math.PI);return a.value&&b>p?g(a.data):""});var c=b.select("text").node().getBBox();b.select(".nv-label rect").attr("width",c.width+10).attr("height",c.height+10).attr("transform",function(){return"translate("+[c.x-5,c.y-5]+")"})})}}),a}var b={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.values},g=function(a){return a.x},h=function(a){return a.y},i=function(a){return a.description},j=Math.floor(1e4*Math.random()),k=c.utils.defaultColor(),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p=.02,q=!1,r=!1,s=!1,t=!1,u=.5,v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.values=function(b){return arguments.length?(f=b,a):f},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=d3.functor(b),a):h},a.description=function(b){return arguments.length?(i=b,a):i},a.showLabels=function(b){return arguments.length?(m=b,a):m},a.labelSunbeamLayout=function(b){return arguments.length?(r=b,a):r},a.donutLabelsOutside=function(b){return arguments.length?(o=b,a):o},a.pieLabelsOutside=function(b){return arguments.length?(n=b,a):n},a.donut=function(b){return arguments.length?(q=b,a):q},a.donutRatio=function(b){return arguments.length?(u=b,a):u},a.startAngle=function(b){return arguments.length?(s=b,a):s},a.endAngle=function(b){return arguments.length?(t=b,a):t},a.id=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),a):k},a.valueFormat=function(b){return arguments.length?(l=b,a):l},a.labelThreshold=function(b){return arguments.length?(p=b,a):p},a},c.models.pieChart=function(){function a(c){return c.each(function(c){var i=d3.select(this),j=(f||parseInt(i.style("width"))||960)-e.left-e.right,k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom;if(a.update=function(){i.transition().call(a)},a.container=this,l.disabled=c[0].map(function(a){return!!a.disabled}),!m){var p;m={};for(p in l)m[p]=l[p]instanceof Array?l[p].slice(0):l[p]}if(!c[0]||!c[0].length){var q=i.selectAll(".nv-noData").data([n]);return q.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),q.attr("x",e.left+j/2).attr("y",e.top+k/2).text(function(a){return a}),a}i.selectAll(".nv-noData").remove();var r=i.selectAll("g.nv-wrap.nv-pieChart").data([c]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),t=r.select("g");s.append("g").attr("class","nv-pieWrap"),s.append("g").attr("class","nv-legendWrap"),h&&(d.width(j).key(b.x()),r.select(".nv-legendWrap").datum(b.values()(c[0])).call(d),e.top!=d.height()&&(e.top=d.height()+d.legendBelowPadding(),k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom),r.select(".nv-legendWrap").attr("transform","translate(0,"+-e.top+")")),r.attr("transform","translate("+e.left+","+e.top+")"),b.width(j).height(k);var u=t.select(".nv-pieWrap").datum(c);d3.transition(u).call(b),d.dispatch.on("legendClick",function(d){d.disabled=!d.disabled,b.values()(c[0]).filter(function(a){return!a.disabled}).length||b.values()(c[0]).map(function(a){return a.disabled=!1,r.selectAll(".nv-series").classed("disabled",!1),a}),l.disabled=c[0].map(function(a){return!!a.disabled}),o.stateChange(l),a.update()}),b.dispatch.on("elementMouseout.tooltip",function(a){o.tooltipHide(a)}),o.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c[0].forEach(function(a,c){a.disabled=b.disabled[c]}),l.disabled=b.disabled),a.update()})}),a}var b=c.models.pie(),d=c.models.legend(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=!0,i=c.utils.defaultColor(),j=!0,k=function(a,b){return"<h3>"+a+"</h3>"+"<p>"+b+"</p>"},l={},m=null,n="No Data Available.",o=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),p=function(d,e){var f=b.description()(d.point)||b.x()(d.point),g=d.pos[0]+(e&&e.offsetLeft||0),h=d.pos[1]+(e&&e.offsetTop||0),i=b.valueFormat()(b.y()(d.point)),j=k(f,i,d,a);c.tooltip.show([g,h],j,d.value<0?"n":"s",null,e)};return b.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],o.tooltipShow(a)}),o.on("tooltipShow",function(a){j&&p(a)}),o.on("tooltipHide",function(){j&&c.tooltip.cleanup()}),a.legend=d,a.dispatch=o,a.pie=b,d3.rebind(a,b,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","donut","donutRatio","labelThreshold"),a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(e){return arguments.length?(i=c.utils.getColor(e),d.color(i),b.color(i),a):i},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(j=b,a):j},a.tooltipContent=function(b){return arguments.length?(k=b,a):k},a.state=function(b){return arguments.length?(l=b,a):l},a.defaultState=function(b){return arguments.length?(m=b,a):m},a.noData=function(b){return arguments.length?(n=b,a):n},a},c.models.scatter=function(){function a(c){return c.each(function(a){function c(){if(!w)return!1;var b=d3.merge(a.map(function(a,b){return a.values.map(function(a,c){var d=o(a,c)+1e-7*Math.random(),e=p(a,c)+1e-7*Math.random();return[l(d),m(e),b,c,a]}).filter(function(a,b){return y(a[4],b)})}));if(K===!0){if(C){var c=Q.select("defs").selectAll(".nv-point-clips").data([k]).enter();c.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+k);var d=Q.select("#nv-points-clip-"+k).selectAll("circle").data(b);d.enter().append("circle").attr("r",D),d.exit().remove(),d.attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}),Q.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+k+")")}b.length&&(b.push([l.range()[0]-20,m.range()[0]-20,null,null]),b.push([l.range()[1]+20,m.range()[1]+20,null,null]),b.push([l.range()[0]-20,m.range()[0]+20,null,null]),b.push([l.range()[1]+20,m.range()[1]-20,null,null]));var e=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),f=d3.geom.voronoi(b).map(function(a,c){return{data:e.clip(a),series:b[c][2],point:b[c][3]}}),j=Q.select(".nv-point-paths").selectAll("path").data(f);j.enter().append("path").attr("class",function(a,b){return"nv-path-"+b}),j.exit().remove(),j.attr("d",function(a){return 0===a.data.length?"M 0 0":"M"+a.data.join("L")+"Z"}),j.on("click",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementClick({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseover",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseover({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseout",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseout({point:d,series:c,seriesIndex:b.series,pointIndex:b.point})})}else Q.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementClick({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseover",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseover({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseout",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseout({point:e,series:d,seriesIndex:b.series,pointIndex:c})});L=!1}var M=h-g.left-g.right,N=i-g.top-g.bottom,O=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var P=E&&F&&G?[]:d3.merge(a.map(function(a){return a.values.map(function(a,b){return{x:o(a,b),y:p(a,b),size:q(a,b)}})}));l.domain(E||d3.extent(P.map(function(a){return a.x}).concat(t))),z&&a[0]?l.range([(M*A+M)/(2*a[0].values.length),M-M*(1+A)/(2*a[0].values.length)]):l.range([0,M]),m.domain(F||d3.extent(P.map(function(a){return a.y}).concat(u))).range([N,0]),n.domain(G||d3.extent(P.map(function(a){return a.size}).concat(v))).range(H||[16,256]),(l.domain()[0]===l.domain()[1]||m.domain()[0]===m.domain()[1])&&(I=!0),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1])),isNaN(l.domain()[0])&&l.domain([-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),b=b||l,d=d||m,e=e||n;var Q=O.selectAll("g.nv-wrap.nv-scatter").data([a]),R=Q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k+(I?" nv-single-point":"")),S=R.append("defs"),T=R.append("g"),U=Q.select("g");T.append("g").attr("class","nv-groups"),T.append("g").attr("class","nv-point-paths"),Q.attr("transform","translate("+g.left+","+g.top+")"),S.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),Q.select("#nv-edge-clip-"+k+" rect").attr("width",M).attr("height",N),U.attr("clip-path",B?"url(#nv-edge-clip-"+k+")":""),L=!0;var V=Q.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});if(V.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(V.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),V.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(V).style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5),s){var W=V.selectAll("circle.nv-point").data(function(a){return a.values},x);W.enter().append("circle").attr("cx",function(a,c){return b(o(a,c))}).attr("cy",function(a,b){return d(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)}),W.exit().remove(),V.exit().selectAll("path.nv-point").transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)})}else{var W=V.selectAll("path.nv-point").data(function(a){return a.values});W.enter().append("path").attr("transform",function(a,c){return"translate("+b(o(a,c))+","+d(p(a,c))+")"}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))})),W.exit().remove(),d3.transition(V.exit().selectAll("path.nv-point")).attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))}))}clearTimeout(f),f=setTimeout(c,300),b=l.copy(),d=m.copy(),e=n.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=c.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=function(a){return a.size||1},r=function(a){return a.shape||"circle"},s=!0,t=[],u=[],v=[],w=!0,x=null,y=function(a){return!a.notActive},z=!1,A=.1,B=!1,C=!0,D=function(){return 25},E=null,F=null,G=null,H=null,I=!1,J=d3.dispatch("elementClick","elementMouseover","elementMouseout"),K=!0,L=!1;return J.on("elementMouseover.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!0)}),J.on("elementMouseout.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!1)}),a.dispatch=J,a.x=function(b){return arguments.length?(o=d3.functor(b),a):o},a.y=function(b){return arguments.length?(p=d3.functor(b),a):p},a.size=function(b){return arguments.length?(q=d3.functor(b),a):q},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.zScale=function(b){return arguments.length?(n=b,a):n},a.xDomain=function(b){return arguments.length?(E=b,a):E},a.yDomain=function(b){return arguments.length?(F=b,a):F},a.sizeDomain=function(b){return arguments.length?(G=b,a):G},a.sizeRange=function(b){return arguments.length?(H=b,a):H},a.forceX=function(b){return arguments.length?(t=b,a):t},a.forceY=function(b){return arguments.length?(u=b,a):u},a.forceSize=function(b){return arguments.length?(v=b,a):v},a.interactive=function(b){return arguments.length?(w=b,a):w},a.pointKey=function(b){return arguments.length?(x=b,a):x},a.pointActive=function(b){return arguments.length?(y=b,a):y},a.padData=function(b){return arguments.length?(z=b,a):z},a.padDataOuter=function(b){return arguments.length?(A=b,a):A},a.clipEdge=function(b){return arguments.length?(B=b,a):B},a.clipVoronoi=function(b){return arguments.length?(C=b,a):C
-},a.useVoronoi=function(b){return arguments.length?(K=b,K===!1&&(C=!1),a):K},a.clipRadius=function(b){return arguments.length?(D=b,a):D},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),a):j},a.shape=function(b){return arguments.length?(r=b,a):r},a.onlyCircles=function(b){return arguments.length?(s=b,a):s},a.id=function(b){return arguments.length?(k=b,a):k},a.singlePoint=function(b){return arguments.length?(I=b,a):I},a},c.models.scatterChart=function(){function a(c){return c.each(function(c){function y(){if(w)return Q.select(".nv-point-paths").style("pointer-events","all"),!1;Q.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(v).focus(a[0]),o.distortion(v).focus(a[1]),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e),Q.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),Q.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var z=d3.select(this),A=this,J=(k||parseInt(z.style("width"))||960)-j.left-j.right,K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom;if(a.update=function(){z.transition().call(a)},B.disabled=c.map(function(a){return!!a.disabled}),!C){var L;C={};for(L in B)C[L]=B[L]instanceof Array?B[L].slice(0):B[L]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var M=z.selectAll(".nv-noData").data([E]);return M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),M.attr("x",j.left+J/2).attr("y",j.top+K/2).text(function(a){return a}),a}z.selectAll(".nv-noData").remove(),F=F||n,G=G||o;var N=z.selectAll("g.nv-wrap.nv-scatterChart").data([c]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),P=O.append("g"),Q=N.select("g");if(P.append("rect").attr("class","nvd3 nv-background"),P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-scatterWrap"),P.append("g").attr("class","nv-distWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),t&&(f.width(J/2),N.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom),N.select(".nv-legendWrap").attr("transform","translate("+J/2+","+-j.top+")")),u&&(g.width(180).color(["#444"]),Q.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(g)),N.attr("transform","translate("+j.left+","+j.top+")"),b.width(J).height(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})).xDomain(null).yDomain(null),N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),p){var R=n.domain()[1]-n.domain()[0];b.xDomain([n.domain()[0]-p*R,n.domain()[1]+p*R])}if(q){var S=o.domain()[1]-o.domain()[0];b.yDomain([o.domain()[0]-q*S,o.domain()[1]+q*S])}N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),d.scale(n).ticks(d.ticks()&&d.ticks().length?d.ticks():J/100).tickSize(-K,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()&&e.ticks().length?e.ticks():K/36).tickSize(-J,0),Q.select(".nv-y.nv-axis").call(e),r&&(h.getData(b.x()).scale(n).width(J).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),Q.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),s&&(i.getData(b.y()).scale(o).width(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),Q.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(Q.select(".nv-background").attr("width",J).attr("height",K),Q.select(".nv-background").on("mousemove",y),Q.select(".nv-background").on("click",function(){w=!w}),b.dispatch.on("elementClick.freezeFisheye",function(){w=!w})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,v=c.disabled?0:2.5,Q.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),Q.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(v).focus(0),o.distortion(v).focus(0),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e)):w=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,N.selectAll(".nv-series").classed("disabled",!1),a}),B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",function(){return a.pos[1]-K}),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],D.tooltipShow(a)}),D.on("tooltipShow",function(a){x&&H(a,A.parentNode)}),D.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),B.disabled=b.disabled),a.update()}),F=n.copy(),G=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=0,q=0,r=!1,s=!1,t=!0,u=!!d3.fisheye,v=0,w=!1,x=!0,y=function(a,b){return"<strong>"+b+"</strong>"},z=function(a,b,c){return"<strong>"+c+"</strong>"},A=null,B={},C=null,D=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var F,G,H=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=y&&c.tooltip.show([k,l],y(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=z&&c.tooltip.show([m,p],z(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=A&&c.tooltip.show([h,i],A(f.series.key,q,r,f,a),f.value<0?"n":"s",null,g)},I=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){D.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),D.on("tooltipHide",function(){x&&c.tooltip.cleanup()}),a.dispatch=D,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(r=b,a):r},a.showDistY=function(b){return arguments.length?(s=b,a):s},a.showControls=function(b){return arguments.length?(u=b,a):u},a.showLegend=function(b){return arguments.length?(t=b,a):t},a.fisheye=function(b){return arguments.length?(v=b,a):v},a.xPadding=function(b){return arguments.length?(p=b,a):p},a.yPadding=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(x=b,a):x},a.tooltipContent=function(b){return arguments.length?(A=b,a):A},a.tooltipXContent=function(b){return arguments.length?(y=b,a):y},a.tooltipYContent=function(b){return arguments.length?(z=b,a):z},a.state=function(b){return arguments.length?(B=b,a):B},a.defaultState=function(b){return arguments.length?(C=b,a):C},a.noData=function(b){return arguments.length?(E=b,a):E},a},c.models.scatterPlusLineChart=function(){function a(c){return c.each(function(c){function w(){if(u)return O.select(".nv-point-paths").style("pointer-events","all"),!1;O.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(t).focus(a[0]),o.distortion(t).focus(a[1]),O.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e),O.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),O.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var x=d3.select(this),y=this,H=(k||parseInt(x.style("width"))||960)-j.left-j.right,I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom;if(a.update=function(){x.transition().call(a)},a.container=this,z.disabled=c.map(function(a){return!!a.disabled}),!A){var J;A={};for(J in z)A[J]=z[J]instanceof Array?z[J].slice(0):z[J]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var K=x.selectAll(".nv-noData").data([C]);return K.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),K.attr("x",j.left+H/2).attr("y",j.top+I/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),n=b.xScale(),o=b.yScale(),D=D||n,E=E||o;var L=x.selectAll("g.nv-wrap.nv-scatterChart").data([c]),M=L.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),N=M.append("g"),O=L.select("g");N.append("rect").attr("class","nvd3 nv-background"),N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-scatterWrap"),N.append("g").attr("class","nv-regressionLinesWrap"),N.append("g").attr("class","nv-distWrap"),N.append("g").attr("class","nv-legendWrap"),N.append("g").attr("class","nv-controlsWrap"),L.attr("transform","translate("+j.left+","+j.top+")"),r&&(f.width(H/2),L.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom),L.select(".nv-legendWrap").attr("transform","translate("+H/2+","+-j.top+")")),s&&(g.width(180).color(["#444"]),O.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(g)),b.width(H).height(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),L.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+b.id()+")");var P=L.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});P.enter().append("g").attr("class","nv-regLines").append("line").attr("class","nv-regLine").style("stroke-opacity",0),P.selectAll(".nv-regLines line").attr("x1",n.range()[0]).attr("x2",n.range()[1]).attr("y1",function(a){return o(n.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return o(n.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return m(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),d.scale(n).ticks(d.ticks()?d.ticks():H/100).tickSize(-I,0),O.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()?e.ticks():I/36).tickSize(-H,0),O.select(".nv-y.nv-axis").call(e),p&&(h.getData(b.x()).scale(n).width(H).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),O.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),q&&(i.getData(b.y()).scale(o).width(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),O.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(O.select(".nv-background").attr("width",H).attr("height",I),O.select(".nv-background").on("mousemove",w),O.select(".nv-background").on("click",function(){u=!u}),b.dispatch.on("elementClick.freezeFisheye",function(){u=!u})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,t=c.disabled?0:2.5,O.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),O.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(t).focus(0),o.distortion(t).focus(0),O.select(".nv-scatterWrap").call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e)):u=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,L.selectAll(".nv-series").classed("disabled",!1),a}),z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos[1]-I),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],B.tooltipShow(a)}),B.on("tooltipShow",function(a){v&&F(a,y.parentNode)}),B.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),z.disabled=b.disabled),a.update()}),D=n.copy(),E=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=!1,q=!1,r=!0,s=!!d3.fisheye,t=0,u=!1,v=!0,w=function(a,b){return"<strong>"+b+"</strong>"},x=function(a,b,c){return"<strong>"+c+"</strong>"},y=function(a,b,c,d){return"<h3>"+a+"</h3>"+"<p>"+d+"</p>"},z={},A=null,B=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var D,E,F=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=w&&c.tooltip.show([k,l],w(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=x&&c.tooltip.show([m,p],x(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=y&&c.tooltip.show([h,i],y(f.series.key,q,r,f.point.tooltip,f,a),f.value<0?"n":"s",null,g)},G=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){B.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),B.on("tooltipHide",function(){v&&c.tooltip.cleanup()}),a.dispatch=B,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(p=b,a):p},a.showDistY=function(b){return arguments.length?(q=b,a):q},a.showControls=function(b){return arguments.length?(s=b,a):s},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.fisheye=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(v=b,a):v},a.tooltipContent=function(b){return arguments.length?(y=b,a):y},a.tooltipXContent=function(b){return arguments.length?(w=b,a):w},a.tooltipYContent=function(b){return arguments.length?(x=b,a):x},a.state=function(b){return arguments.length?(z=b,a):z},a.defaultState=function(b){return arguments.length?(A=b,a):A},a.noData=function(b){return arguments.length?(C=b,a):C},a},c.models.sparkline=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,h=g-e.top-e.bottom,n=d3.select(this);i.domain(b||d3.extent(a,k)).range([0,c]),j.domain(d||d3.extent(a,l)).range([h,0]);var o=n.selectAll("g.nv-wrap.nv-sparkline").data([a]),p=o.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");p.append("g"),o.select("g"),o.attr("transform","translate("+e.left+","+e.top+")");var q=o.selectAll("path").data(function(a){return[a]});q.enter().append("path"),q.exit().remove(),q.style("stroke",function(a,b){return a.color||m(a,b)}).attr("d",d3.svg.line().x(function(a,b){return i(k(a,b))}).y(function(a,b){return j(l(a,b))}));var r=o.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return l(a,b)}),d=b(c.lastIndexOf(j.domain()[1])),e=b(c.indexOf(j.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});r.enter().append("circle"),r.exit().remove(),r.attr("cx",function(a){return i(k(a,a.pointIndex))}).attr("cy",function(a){return j(l(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return k(a,a.pointIndex)==i.domain()[1]?"nv-point nv-currentValue":l(a,a.pointIndex)==j.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),a}var b,d,e={top:2,right:0,bottom:2,left:0},f=400,g=32,h=!0,i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=c.utils.getColor(["#000"]);return a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.x=function(b){return arguments.length?(k=d3.functor(b),a):k},a.y=function(b){return arguments.length?(l=d3.functor(b),a):l},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.animate=function(b){return arguments.length?(h=b,a):h},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.sparklinePlus=function(){function a(c){return c.each(function(m){function q(){if(!j){var a=A.selectAll(".nv-hoverValue").data(i),c=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+b(e.x()(m[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(c.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),c.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),A.select(".nv-hoverValue .nv-xValue").text(k(e.x()(m[i[0]],i[0]))),c.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),A.select(".nv-hoverValue .nv-yValue").text(l(e.y()(m[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;f<a.length;f++)Math.abs(e.x()(a[f],f)-b)<c&&(c=Math.abs(e.x()(a[f],f)-b),d=f);return d}if(!j){var c=d3.mouse(this)[0]-f.left;i=[a(m,Math.round(b.invert(c)))],q()}}var s=d3.select(this),t=(g||parseInt(s.style("width"))||960)-f.left-f.right,u=(h||parseInt(s.style("height"))||400)-f.top-f.bottom;if(a.update=function(){a(c)},a.container=this,!m||!m.length){var v=s.selectAll(".nv-noData").data([p]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+t/2).attr("y",f.top+u/2).text(function(a){return a}),a}s.selectAll(".nv-noData").remove();var w=e.y()(m[m.length-1],m.length-1);b=e.xScale(),d=e.yScale();var x=s.selectAll("g.nv-wrap.nv-sparklineplus").data([m]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),z=y.append("g"),A=x.select("g");z.append("g").attr("class","nv-sparklineWrap"),z.append("g").attr("class","nv-valueWrap"),z.append("g").attr("class","nv-hoverArea"),x.attr("transform","translate("+f.left+","+f.top+")");var B=A.select(".nv-sparklineWrap");e.width(t).height(u),B.call(e);var C=A.select(".nv-valueWrap"),D=C.selectAll(".nv-currentValue").data([w]);D.enter().append("text").attr("class","nv-currentValue").attr("dx",o?-8:8).attr("dy",".9em").style("text-anchor",o?"end":"start"),D.attr("x",t+(o?f.right:0)).attr("y",n?function(a){return d(a)}:0).style("fill",e.color()(m[m.length-1],m.length-1)).text(l(w)),z.select(".nv-hoverArea").append("rect").on("mousemove",r).on("click",function(){j=!j}).on("mouseout",function(){i=[],q()}),A.select(".nv-hoverArea rect").attr("transform",function(){return"translate("+-f.left+","+-f.top+")"}).attr("width",t+f.left+f.right).attr("height",u+f.top)}),a}var b,d,e=c.models.sparkline(),f={top:15,right:100,bottom:10,left:50},g=null,h=null,i=[],j=!1,k=d3.format(",r"),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p="No Data Available.";return a.sparkline=e,d3.rebind(a,e,"x","y","xScale","yScale","color"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.xTickFormat=function(b){return arguments.length?(k=b,a):k},a.yTickFormat=function(b){return arguments.length?(l=b,a):l},a.showValue=function(b){return arguments.length?(m=b,a):m},a.alignValue=function(b){return arguments.length?(n=b,a):n},a.rightAlignValue=function(b){return arguments.length?(o=b,a):o},a.noData=function(b){return arguments.length?(p=b,a):p},a},c.models.stackedArea=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,l=g-e.top-e.bottom,s=d3.select(this);b=q.xScale(),d=q.yScale(),a=a.map(function(a){return a.values=a.values.map(function(b,c){return b.index=c,b.stackedY=a.disabled?0:k(b,c),b}),a}),a=d3.layout.stack().order(n).offset(m).values(function(a){return a.values}).x(j).y(function(a){return a.stackedY}).out(function(a,b,c){a.display={y:c,y0:b}})(a);var t=s.selectAll("g.nv-wrap.nv-stackedarea").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-areaWrap"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+e.left+","+e.top+")"),q.width(c).height(l).x(j).y(function(a){return a.display.y+a.display.y0}).forceY([0]).color(a.map(function(a,b){return a.color||h(a,b)}).filter(function(b,c){return!a[c].disabled}));var y=x.select(".nv-scatterWrap").datum(a.filter(function(a){return!a.disabled}));y.call(q),v.append("clipPath").attr("id","nv-edge-clip-"+i).append("rect"),t.select("#nv-edge-clip-"+i+" rect").attr("width",c).attr("height",l),x.attr("clip-path",p?"url(#nv-edge-clip-"+i+")":"");var z=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y+a.display.y0)}).interpolate(o),A=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y0)}),B=x.select(".nv-areaWrap").selectAll("path.nv-area").data(function(a){return a});B.enter().append("path").attr("class",function(a,b){return"nv-area nv-area-"+b}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),r.areaMouseover({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),r.areaMouseout({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("click",function(a,b){d3.select(this).classed("hover",!1),r.areaClick({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}),B.exit().attr("d",function(a,b){return A(a.values,b)}).remove(),B.style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),B.attr("d",function(a,b){return z(a.values,b)}),q.dispatch.on("elementMouseover.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!0)}),q.dispatch.on("elementMouseout.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=c.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=function(a){return a.x},k=function(a){return a.y},l="stack",m="zero",n="default",o="linear",p=!1,q=c.models.scatter(),r=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");return q.size(2.2).sizeDomain([2.2,2.2]),q.dispatch.on("elementClick.area",function(a){r.areaClick(a)}),q.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],r.tooltipShow(a)}),q.dispatch.on("elementMouseout.tooltip",function(a){r.tooltipHide(a)}),a.dispatch=r,a.scatter=q,d3.rebind(a,q,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius"),a.x=function(b){return arguments.length?(j=d3.functor(b),a):j},a.y=function(b){return arguments.length?(k=d3.functor(b),a):k},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(h=c.utils.getColor(b),a):h},a.offset=function(b){return arguments.length?(m=b,a):m},a.order=function(b){return arguments.length?(n=b,a):n},a.style=function(b){if(!arguments.length)return l;switch(l=b){case"stack":a.offset("zero"),a.order("default");break;case"stream":a.offset("wiggle"),a.order("inside-out");break;case"stream-center":a.offset("silhouette"),a.order("inside-out");break;case"expand":a.offset("expand"),a.order("default")}return a},a.interpolate=function(a){return arguments.length?o=a:o},a},c.models.stackedAreaChart=function(){function a(c){return c.each(function(c){var m=d3.select(this),q=this,y=(k||parseInt(m.style("width"))||960)-j.left-j.right,z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom;if(a.update=function(){m.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=m.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",j.left+y/2).attr("y",j.top+z/2).text(function(a){return a}),a}m.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=m.selectAll("g.nv-wrap.nv-stackedAreaChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),E=C.select("g");if(D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-stackedWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-controlsWrap"),o&&(h.width(y-w),E.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-legendWrap").attr("transform","translate("+w+","+-j.top+")")),n){var F=[{key:"Stacked",disabled:"zero"!=e.offset()},{key:"Stream",disabled:"wiggle"!=e.offset()},{key:"Expanded",disabled:"expand"!=e.offset()}];i.width(w).color(["#444","#444","#444"]),E.select(".nv-controlsWrap").datum(F).call(i),j.top!=Math.max(i.height(),h.height())&&(j.top=Math.max(i.height(),h.height()),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-controlsWrap").attr("transform","translate(0,"+-j.top+")")}C.attr("transform","translate("+j.left+","+j.top+")"),e.width(y).height(z);var G=E.select(".nv-stackedWrap").datum(c);G.call(e),f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+z+")"),E.select(".nv-x.nv-axis").transition().duration(0).call(f),g.scale(d).ticks("wiggle"==e.offset()?0:z/36).tickSize(-y,0).setTickFormat("expand"==e.offset()?d3.format("%"):r),E.select(".nv-y.nv-axis").transition().duration(0).call(g),e.dispatch.on("areaClick.toggle",function(b){c=1===c.filter(function(a){return!a.disabled}).length?c.map(function(a){return a.disabled=!1,a}):c.map(function(a,c){return a.disabled=c!=b.seriesIndex,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(F=F.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Stacked":e.style("stack");break;case"Stream":e.style("stream");break;case"Expanded":e.style("expand")}s.style=e.style(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){p&&x(a,q.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),"undefined"!=typeof b.style&&e.style(b.style),a.update()
-})}),a}var b,d,e=c.models.stackedArea(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:25,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=function(a,b,c){return"<h3>"+a+"</h3>"+"<p>"+c+" on "+b+"</p>"},r=d3.format(",.2f"),s={style:e.style()},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=250;f.orient("bottom").tickPadding(7),g.orient("left"),e.scatter.pointActive(function(a){return!!Math.round(100*e.y()(a))});var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=q(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("tooltipShow",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("tooltipHide",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=v,a.stacked=e,a.legend=h,a.controls=i,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","size","xScale","yScale","xDomain","yDomain","sizeDomain","interactive","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):getWidth},a.height=function(b){return arguments.length?(l=b,a):getHeight},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),e.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(q=b,a):q},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},g.setTickFormat=g.tickFormat,g.tickFormat=function(a){return arguments.length?(r=a,g):r},a}}(),define("nv.d3",function(){}),define("addons/stats/views",["app","api","addons/stats/resources","d3","nv.d3"],function(a,b,c){return Views={},datatypeEventer={},_.extend(datatypeEventer,Backbone.Events),Views.Legend=b.View.extend({tagName:"ul",template:"addons/stats/templates/legend",serialize:function(){return{legend_items:this.collection.toJSON()}}}),Views.Pie=b.View.extend({className:"datatype-section",template:"addons/stats/templates/pie_table",initialize:function(a){this.datatype=a.datatype},serialize:function(){return{statistics:this.collection.where({type:this.datatype}),datatype:this.datatype}},afterRender:function(){var a=(this.collection,"#"+this.datatype+"_graph"),b=_.map(this.collection.where({type:this.datatype}),function(a){var b={y:a.get("sum")||0,key:a.id};return b});b=_.filter(b,function(a){return a.y>0}),b=_.sortBy(b,function(a){return-a.y}),nv.addGraph(function(){var c=550,d=400,e=nv.models.pieChart().x(function(a){return a.key}).y(function(a){return a.y}).showLabels(!0).showLegend(!1).values(function(a){return a}).color(d3.scale.category10().range()).width(c).height(d);return d3.select(a).datum([b]).transition().duration(300).attr("width",c).attr("height",d).call(e),e}),this.$el.addClass(this.datatype+"_section")}}),Views.StatSelect=b.View.extend({className:"nav nav-tabs nav-stacked",tagName:"ul",template:"addons/stats/templates/statselect",initialize:function(){this.rows=[]},events:{"click .datatype-select":"datatype_selected"},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},afterRender:function(){this.$(".datatype-select").first().addClass("active")},datatype_selected:function(a){var b=$(a.currentTarget);a.preventDefault(),a.stopPropagation(),this.$(".datatype-select").removeClass("active"),b.addClass("active"),datatypeEventer.trigger("datatype-select",b.attr("data-type-select"))}}),Views.Statistics=b.View.extend({template:"addons/stats/templates/stats",initialize:function(){this.rows=[],datatypeEventer.on("datatype-select",this.display_datatype,this)},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},beforeRender:function(){_.each(_.uniq(this.collection.pluck("type")),function(a){this.rows[a]=this.insertView(".datatypes",new Views.Pie({collection:this.collection,datatype:a}))},this)},afterRender:function(){this.$(".datatype-section").hide().first().toggle()},display_datatype:function(a){this.$(".datatype-section").hide(),this.$("."+a+"_section").show()}}),c.Views=Views,c}),define("addons/stats/routes",["app","api","addons/stats/views"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",routes:{stats:"showStats",_stats:"showStats"},crumbs:[{name:"Statistics",link:"_stats"}],selectedHeader:"Statistics",initialize:function(){this.stats=new c.Collection,this.setView("#sidebar-content",new Views.StatSelect({collection:this.stats}))},showStats:function(){this.setView("#dashboard-content",new Views.Statistics({collection:this.stats}))},establish:function(){return[this.stats.fetch()]},apiUrl:function(){return[this.stats.url,this.stats.documentation]}});return c.RouteObjects=[d],c}),define("addons/stats/base",["app","api","addons/stats/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Statistics",href:"#stats",icon:"fonticon-stats",className:"stats"})},c}),define("addons/replication/resources",["app","api","addons/activetasks/resources"],function(a){var b={};return b.DBModel=Backbone.Model.extend({label:function(){return this.get("name")}}),b.DBList=Backbone.Collection.extend({model:b.DBModel,url:function(){return a.host+"/_all_dbs"},parse:function(a){return _.map(a,function(a){return{id:a,name:a}})}}),b.Task=Backbone.Model.extend({}),b.Tasks=Backbone.Collection.extend({model:b.Task,url:function(){return a.host+"/_active_tasks"},parse:function(a){return _.filter(a,function(a){return"replication"===a.type})}}),b.Replicate=Backbone.Model.extend({documentation:"replication_doc",url:function(){return a.host+"/_replicate"}}),b}),define("addons/replication/views",["app","api","modules/fauxton/components","addons/replication/resources"],function(a,b,c,d){var e={},f={},g={rate:5,intervalId:null};return _.extend(f,Backbone.Events),e.ReplicationForm=b.View.extend({template:"addons/replication/templates/form",events:{"submit #replication":"validate","click .btn-group .btn":"showFields","click .swap":"swapFields","click .options":"toggleAdvancedOptions"},initialize:function(a){this.status=a.status,this.selectedDB=a.selectedDB,this.newRepModel=new d.Replicate({})},afterRender:function(){this.dbSearchTypeahead=new c.DbSearchTypeahead({dbLimit:30,el:"input#to_name"}),this.dbSearchTypeahead.render()},beforeRender:function(){this.insertView("#replicationStatus",new e.ReplicationList({collection:this.status}))},cleanup:function(){clearInterval(g.intervalId)},enableFields:function(){this.$el.find("input","select").attr("disabled",!1)},disableFields:function(){this.$el.find("input:hidden","select:hidden").attr("disabled",!0)},showFields:function(a){var b=this.$(a.currentTarget),c=b.val();"local"===c?b.parents(".form_set").addClass("local"):b.parents(".form_set").removeClass("local")},establish:function(){return[this.collection.fetch(),this.status.fetch()]},validate:function(a){a.preventDefault();var c;if(this.formValidation())c=b.addNotification({msg:"Please enter every field.",type:"error",clear:!0});else if(this.$("input#to_name").is(":visible")&&!this.$("input[name=create_target]").is(":checked")){var d=this.collection.where({name:this.$("input#to_name").val()});0===d.length&&(c=b.addNotification({msg:"This database doesn't exist. Check create target if you want to create it.",type:"error",clear:!0}))}else this.submit(a)},formValidation:function(){for(var a=this.$el.find("input:visible"),b=!1,c=0;c<a.length;c++)("http://"==a[c].value||""===a[c].value)&&(b=!0);return b},serialize:function(){return{databases:this.collection.toJSON(),selectedDB:this.selectedDB}},startReplication:function(a){var c=this;this.newRepModel.save(a,{success:function(a){b.addNotification({msg:"Replication from "+a.get("source")+" to "+a.get("target")+" has begun.",type:"success",clear:!0}),c.updateButtonText(!1),f.trigger("update:tasks")},error:function(a,d){var e=JSON.parse(d.responseText);b.addNotification({msg:e.reason,type:"error",clear:!0}),c.updateButtonText(!1)}}),this.enableFields()},updateButtonText:function(a){var b=this.$("#replication button[type=submit]");a?b.text("Starting replication...").attr("disabled",!0):b.text("Replication").attr("disabled",!1)},submit:function(a){this.disableFields();var b={};_.map(this.$(a.currentTarget).serializeArray(),function(a){""!==a.value&&(b[a.name]="true"===a.value?!0:a.value.replace(/\s/g,"").toLowerCase())}),this.updateButtonText(!0),this.startReplication(b)},swapFields:function(a){a.preventDefault();var b=this.$("#from_name"),c=this.$("#to_name"),d=this.$("#to_url"),e=this.$("#from_url"),f=b.val(),g=e.val(),h=c.val(),i=d.val();b.val(h),c.val(f),e.val(i),d.val(g)}}),e.ReplicationList=b.View.extend({tagName:"ul",initialize:function(){f.bind("update:tasks",this.establish,this),this.listenTo(this.collection,"reset",this.render),this.$el.prepend("<li class='header'><h4>Active Replication Tasks</h4></li>")},establish:function(){return[this.collection.fetch({reset:!0})]},setPolling:function(){var a=this;this.cleanup(),g.intervalId=setInterval(function(){a.establish()},1e3*g.rate)},cleanup:function(){clearInterval(g.intervalId)},beforeRender:function(){this.collection.forEach(function(a){this.insertView(new e.replicationItem({model:a}))},this)},showHeader:function(){this.collection.length>0?this.$el.parent().addClass("showHeader"):this.$el.parent().removeClass("showHeader")},afterRender:function(){this.showHeader(),this.setPolling()}}),e.replicationItem=b.View.extend({tagName:"li",className:"row",template:"addons/replication/templates/progress",events:{"click .cancel":"cancelReplication"},initialize:function(){this.newRepModel=new d.Replicate({})},establish:function(){return[this.model.fetch()]},cancelReplication:function(a){var c=this.$(a.currentTarget),d=c.attr("data-rep-id");this.newRepModel.save({replication_id:d,cancel:!0},{success:function(){b.addNotification({msg:"Replication stopped.",type:"success",clear:!0})},error:function(a,c){var d=JSON.parse(c.responseText);b.addNotification({msg:d.reason,type:"error",clear:!0})}})},afterRender:function(){this.model.get("continuous")&&this.$el.addClass("continuous")},serialize:function(){return{progress:this.model.get("progress"),target:this.model.get("target"),source:this.model.get("source"),continuous:this.model.get("continuous"),repid:this.model.get("replication_id")}}}),e}),define("addons/replication/route",["app","api","addons/replication/resources","addons/replication/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",roles:["_admin"],routes:{replication:"defaultView","replication/:dbname":"defaultView"},selectedHeader:"Replication",apiUrl:function(){return[this.replication.url(),this.replication.documentation]},crumbs:[{name:"Replicate changes from: ",link:"replication"}],defaultView:function(a){this.databases=new c.DBList({}),this.tasks=new c.Tasks({id:"ReplicationTasks"}),this.replication=new c.Replicate({}),this.setView("#dashboard-content",new d.ReplicationForm({selectedDB:a||"",collection:this.databases,status:this.tasks}))}});return c.RouteObjects=[e],c}),define("addons/replication/base",["app","api","addons/replication/route"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Replication",href:"#/replication",icon:"fonticon-replicate"})},c}),define("addons/contribute/base",["jquery","lodash"],function(a){a.contribute=function(){console.log("contribute!contribute!monorail!contribute!")}}),define("addons/auth/resources",["app","api"],function(a,b){var c=new b.addon,d=Backbone.Model.extend({url:function(){return a.host+"/_config/admins/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}});return c.Session=b.Session.extend({url:"/_session",initialize:function(a){a||(a={}),this.messages=_.extend({},{missingCredentials:"Username or password cannot be blank.",passwordsNotMatch:"Passwords do not match.",incorrectCredentials:"Incorrect username or password.",loggedIn:"You have been logged in.",adminCreated:"Couchdb admin created",changePassword:"Your password has been updated."},a.messages)},isAdminParty:function(){var a=this.get("userCtx");return!a.name&&a.roles.indexOf("_admin")>-1?!0:!1},isLoggedIn:function(){var a=this.get("userCtx");return a.name?!0:!1},userRoles:function(){var a=this.user();return a&&a.roles?a.roles:[]},matchesRoles:function(a){if(0===a.length)return!0;var b=_.intersection(this.userRoles(),a).length;return b>0?!0:!1},validateUser:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)){var e=b.Deferred();return e.rejectWith(this,[d]),e}},validatePasswords:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)||a!==c){var e=b.Deferred();return e.rejectWith(this,[d]),e}},createAdmin:function(a,b,c){var e=this,f=this.validateUser(a,b,this.messages.missingCredentials);if(f)return f;var g=new d({name:a,value:b});return g.save().then(function(){return c?e.login(a,b):e.fetchUser({forceFetch:!0})})},login:function(a,b){var c=this.validateUser(a,b,this.messages.missingCredentials);if(c)return c;var d=this;return $.ajax({cache:!1,type:"POST",url:"/_session",dataType:"json",data:{name:a,password:b}}).then(function(){return d.fetchUser({forceFetch:!0})})},logout:function(){var a=this;return $.ajax({type:"DELETE",url:"/_session",dataType:"json",username:"_",password:"_"}).then(function(){return a.fetchUser({forceFetch:!0})})},changePassword:function(a,b){var c=this.validatePasswords(a,b,this.messages.passwordsNotMatch);if(c)return c;var e=this,f=(this.get("info"),this.get("userCtx")),g=new d({name:f.name,value:a});return g.save().then(function(){return e.login(f.name,a)})}}),c.CreateAdminView=b.View.extend({template:"addons/auth/templates/create_admin",initialize:function(a){a=a||{},this.login_after=a.login_after===!1?!1:!0},events:{"submit #create-admin-form":"createAdmin"},createAdmin:function(a){a.preventDefault();var c=this,d=this.$("#username").val(),e=this.$("#password").val(),f=this.model.createAdmin(d,e,this.login_after);f.then(function(){b.addNotification({msg:b.session.messages.adminCreated}),c.login_after?b.navigate("/"):(c.$("#username").val(""),c.$("#password").val(""))}),f.fail(function(a){b.addNotification({msg:"Could not create admin. Reason"+a+".",type:"error"})})}}),c.LoginView=b.View.extend({template:"addons/auth/templates/login",events:{"submit #login":"login"},login:function(a){a.preventDefault();var c=this.$("#username").val(),d=this.$("#password").val(),e=this.model.login(c,d);e.then(function(){b.addNotification({msg:b.session.messages.loggedIn}),b.navigate("/")}),e.fail(function(a,c,d){d=3===arguments.length?b.session.messages.incorrectCredentials:a,b.addNotification({msg:d,type:"error"})})}}),c.ChangePassword=b.View.extend({template:"addons/auth/templates/change_password",events:{"submit #change-password":"changePassword"},changePassword:function(){event.preventDefault();var a=this,c=this.$("#password").val(),d=this.$("#password-confirm").val(),e=this.model.changePassword(c,d);e.done(function(){b.addNotification({msg:b.session.messages.changePassword}),a.$("#password").val(""),a.$("#password-confirm").val("")}),e.fail(function(a,c,d){arguments.length<3&&(d=a),b.addNotification({msg:a,type:"error"})})}}),c.NavLink=b.View.extend({template:"addons/auth/templates/nav_link_title",tagName:"li",beforeRender:function(){this.listenTo(this.model,"change",this.render)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NavDropDown=b.View.extend({template:"addons/auth/templates/nav_dropdown",beforeRender:function(){this.listenTo(this.model,"change",this.render)},setTab:function(a){this.selectedTab=a,this.$(".active").removeClass("active");var b=this.$('a[data-select="'+a+'"]');b.parent().addClass("active")},afterRender:function(){this.selectedTab&&this.setTab(this.selectedTab)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NoAccessView=b.View.extend({template:"addons/auth/templates/noAccess"}),c}),define("addons/auth/routes",["app","api","addons/auth/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",routes:{login:"login",logout:"logout",createAdmin:"createAdmin",noAccess:"noAccess"},login:function(){this.crumbs=[{name:"Login",link:"#"}],this.setView("#dashboard-content",new c.LoginView({model:b.session}))},logout:function(){b.addNotification({msg:"You have been logged out."}),b.session.logout().then(function(){b.navigate("/")})},changePassword:function(){this.crumbs=[{name:"Change Password",link:"#"}],this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},createAdmin:function(){this.crumbs=[{name:"Create Admin",link:"#"}],this.setView("#dashboard-content",new c.CreateAdminView({model:b.session}))},noAccess:function(){this.crumbs=[{name:"Access Denied",link:"#"}],this.setView("#dashboard-content",new c.NoAccessView),this.apiUrl="noAccess"}}),e=b.RouteObject.extend({layout:"with_sidebar",routes:{changePassword:{route:"changePassword",roles:["_admin","_reader","_replicator"]},addAdmin:{roles:["_admin"],route:"addAdmin"}},initialize:function(){this.navDrop=this.setView("#sidebar-content",new c.NavDropDown({model:b.session}))},changePassword:function(){this.navDrop.setTab("change-password"),this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},addAdmin:function(){this.navDrop.setTab("add-admin"),this.setView("#dashboard-content",new c.CreateAdminView({login_after:!1,model:b.session}))},crumbs:[{name:"User Management",link:"#"}]});return c.RouteObjects=[d,e],c}),define("addons/auth/base",["app","api","addons/auth/routes"],function(a,b,c){return c.session=new c.Session,b.setSession(c.session),c.initialize=function(){c.navLink=new c.NavLink({model:c.session}),b.addHeaderLink({title:"Auth",href:"#_auth",view:c.navLink,icon:"fonticon-user",bottomNav:!0,establish:[b.session.fetchUser()]});var a=function(a,b){var c=$.Deferred();return a.isAdminParty()?c.resolve():a.matchesRoles(b)?c.resolve():c.reject(),[c]},d=function(){b.navigate("/noAccess")};b.auth.registerAuth(a),b.auth.registerAuthDenied(d),b.session.on("change",function(){b.session.isLoggedIn()?b.addHeaderLink({footerNav:!0,href:"#logout",title:"Logout",icon:"",className:"logout"}):b.removeHeaderLink({title:"Logout",footerNav:!0})})},c}),define("addons/recipes/base",["app","api","modules/databases/base","modules/documents/base"],function(a,b,c,d){$.fn.serializeObject=function(){var a={},b=this.serializeArray();return $.each(b,function(){this.name.match(/\[\]$/)&&(a[this.name]=[]),a[this.name]?(a[this.name].push||(a[this.name]=[a[this.name]]),a[this.name].push(this.value||"")):a[this.name]=this.value||""}),a};var e="recipes_dev",f=b.module();return f.RouteObjects=[],f.Model=d.Doc.extend({placeholder:"http://placehold.it/260x180",defaults:{title:"",description:"",ingredients:[],steps:""},dget:function(a){return console.log("DEGET YO",this),this.get("doc")?this.get("doc")[a]:this.get(a)},steps:function(){var a=this.dget("steps");return a?a.split(/[\n]+/):!1},ingredients:function(){console.log("LE INGREDIENTS",this.dget("ingredients"));var a=this.dget("ingredients");return _.any(a)?a:!1},image:function(){var a=this.dget("_attachments"),b=_.keys(a)[0];return b?this.url()+"/"+b:this.placeholder},url:function(b){return console.log("FETCHING URL: "+b,this.isNewDoc(),this.toJSON()),"app"===b?"#/recipes/r/"+this.safeID():this.id?a.host+"/"+this.getDatabase().id+"/"+this.id:a.host+"/"+this.getDatabase().id}}),f.Container=Backbone.Model.extend({initialize:function(a){this.rdb=new c.Model({id:a.recipesDB}),this.rdb.buildAllDocs({include_docs:!0}),window.rrr=this},fetchRecipes:function(){return[this.rdb.allDocs.fetch()]},allRecipes:function(){if(this.recipes)return this.recipes;var a=_.filter(this.rdb.allDocs.models,function(a){return!a.id.match(/^_design/)});return this.recipes=_.map(a,function(a){return new f.Model(a.toJSON(),{database:this.rdb})},this),this.recipes}}),f.Views.Container=b.View.extend({template:"addons/recipes/templates/container",setActive:function(a){this.active=a,console.log("SETTING ACTIVE: "+a,this.$("ul.recipe-nav li."+a)),console.log(this.$("ul.recipe-nav li.active")),this.$("ul.recipe-nav li.active").removeClass("active"),this.$("ul.recipe-nav li."+a).addClass("active")},afterRender:function(){this.$("ul.recipe-nav li.active").removeClass("active"),this.$("ul.recipe-nav li."+this.active).addClass("active")}}),f.Views.Item=b.View.extend({template:"addons/recipes/templates/item",serialize:function(){return{recipe:this.model,url:this.model.url("app")}}}),f.Views.List=b.View.extend({template:"addons/recipes/templates/list",serialize:function(){return{recipes:this.model}},beforeRender:function(){console.log("RENDERING RECIPES: ",this.model,this.model.allRecipes()),_.each(this.model.allRecipes(),function(a){console.log("ADDING RECIPE: ",a),this.insertView("#recipes",new f.Views.Item({model:a}))},this)},afterRender:function(){console.log("FINISHED RENDERING",this.$el)},establish:function(){return this.model.fetchRecipes()}}),f.Views.Recipe=b.View.extend({template:"addons/recipes/templates/recipe",establish:function(){return[this.model.fetch()]},serialize:function(){return console.log("SHOW RECIPE",this.model),{recipe:this.model,url:this.model.dget("url")}}}),f.Views.New=b.View.extend({template:"addons/recipes/templates/new",events:{"submit form.new-recipe":"saveRecipe","click button.add-ingredient":"addIngredient"},serialize:function(){return console.log("NEW RECIPE",this.model),{recipe:this.model}},addIngredient:function(){var a='<input type="text" class="input-xxlarge" name="ingredients" placeholder="Ingredient">';console.log("ADDING INGREDIENT",this.$("form.new-recipe .ingredients")),this.$("form.new-recipe .ingredients").append(a)},saveRecipe:function(a){a.preventDefault();var c=$(a.currentTarget),d=this;console.log("GOT FORM",c.serializeObject()),this.model.set(c.serializeObject()),this.model.save().done(function(){b.navigate(d.model.url("app")),b.addNotification({msg:"Successfully saved your recipe!",type:"success"})})},beforeRender:function(){this.uploadModal=this.setView("#upload-modal",new d.Views.UploadModal({model:this.model}))}}),f.RouteObjects.push(b.RouteObject.extend({layout:"one_pane",routes:{recipes:"defaultView","recipes/new":"newRecipe","recipes/r/:id":"showRecipe"},selectedHeader:"Recipes",initialize:function(){this.recipesContainer=this.setView("#dashboard-content",new f.Views.Container),this.recipes=new f.Container({recipesDB:e})},defaultView:function(){this.recipesContainer.setActive("recipes-list"),console.log("CONTENT VIEW",$("#dashboard-content")),this.setView("#recipes-content",new f.Views.List({model:this.recipes}))},newRecipe:function(){this.recipesContainer.setActive("recipes-new"),this.setView("#recipes-content",new f.Views.New({model:new f.Model(null,{database:this.recipes.rdb})}))},showRecipe:function(a){this.recipesContainer.setActive("recipes-list"),this.setView("#recipes-content",new f.Views.Recipe({model:new f.Model({_id:a},{database:this.recipes.rdb})}))}})),f.initialize=function(){b.addHeaderLink({title:"Recipes",icon:"fonticon-activetasks",href:"#/recipes"})},f}),define("load_addons",["addons/activetasks/base","addons/config/base","addons/logs/base","addons/stats/base","addons/replication/base","addons/contribute/base","addons/auth/base","addons/recipes/base"],function(){var a={addons:arguments};return a}),define("router",["require","app","initialize","api","modules/fauxton/base","modules/fauxton/layout","modules/databases/base","modules/documents/base","modules/pouchdb/base","load_addons"],function(a,b,c,d,e,f,g,h,i,j){var k=[g,h],l=b.router=Backbone.Router.extend({routes:{},addModuleRouteObject:function(a){var c=this,e=this.masterLayout,f=a.prototype.getRouteUrls();_.each(f,function(f){this.route(f,f.toString(),function(){var g=Array.prototype.slice.call(arguments),h=a.prototype.getRouteRoles(f),i=b.auth.checkAccess(h);i.then(function(){c.activeRouteObject&&c.activeRouteObject.hasRoute(f)||(c.activeRouteObject&&c.activeRouteObject.removeViews(),c.activeRouteObject=new a(f,e,g));var b=c.activeRouteObject;b.routeCallback(f,g),b.renderWith(f,e,g)},function(){d.auth.authDeniedCb()})})},this)},setModuleRoutes:function(){_.each(k,function(a){a&&_.each(a.RouteObjects,this.addModuleRouteObject,this)},this),_.each(j.addons,function(a){a&&(a.initialize(),a.RouteObjects&&_.each(a.RouteObjects,this.addModuleRouteObject,this))},this)},initialize:function(){this.navBar=b.navBar=new e.NavBar,this.apiBar=b.apiBar=new e.ApiBar,this.auth=b.auth=d.auth,b.session=d.session,b.masterLayout=this.masterLayout=new f(this.navBar,this.apiBar),b.footer=new e.Footer({el:"#footer-content"}),this.setModuleRoutes(),$("#app-container").html(this.masterLayout.el),this.masterLayout.render(),$.when.apply(null,b.footer.establish()).done(function(){b.footer.render()})},triggerRouteEvent:function(a,b){if(this.activeRouteObject){var c=[a].concat(b);this.activeRouteObject.trigger.apply(this.activeRouteObject,c),this.activeRouteObject.renderWith(c,this.masterLayout,b)}}});return l}),require(["app","router"],function(a,b){a.router=new b,Backbone.history.start({pushState:!1,root:a.root}),$(document).on("click","a:not([data-bypass])",function(b){var c={prop:$(this).prop("href"),attr:$(this).attr("href")},d=location.protocol+"//"+location.host+a.root;c.prop&&c.prop.slice(0,d.length)===d&&(b.preventDefault(),Backbone.history.navigate(c.attr,!0))})}),define("main",function(){}),require.config({deps:["main"],paths:{libs:"../assets/js/libs",plugins:"../assets/js/plugins",jquery:"../assets/js/libs/jquery",lodash:"../assets/js/libs/lodash",backbone:"../assets/js/libs/backbone","backbone.layoutmanger":"../assets/js/plugins/backbone.layoutmanager",bootstrap:"../assets/js/libs/bootstrap",spin:"../assets/js/libs/spin.min",d3:"../assets/js/libs/d3","nv.d3":"../assets/js/libs/nv.d3",ace:"../assets/js/libs/ace"},baseUrl:"/",map:{"*":{underscore:"lodash"}},shim:{backbone:{deps:["lodash","jquery"],exports:"Backbone"},bootstrap:{deps:["jquery"],exports:"Bootstrap"},"plugins/prettify":[],"plugins/jquery.form":["jquery"]}}),define("config",function(){});
\ No newline at end of file
+var requirejs,require,define;!function(global){function isFunction(a){return"[object Function]"===ostring.call(a)}function isArray(a){return"[object Array]"===ostring.call(a)}function each(a,b){if(a){var c;for(c=0;c<a.length&&(!a[c]||!b(a[c],c,a));c+=1);}}function eachReverse(a,b){if(a){var c;for(c=a.length-1;c>-1&&(!a[c]||!b(a[c],c,a));c-=1);}}function hasProp(a,b){return hasOwn.call(a,b)}function getOwn(a,b){return hasProp(a,b)&&a[b]}function eachProp(a,b){var c;for(c in a)if(hasProp(a,c)&&b(a[c],c))break}function mixin(a,b,c,d){return b&&eachProp(b,function(b,e){(c||!hasProp(a,e))&&(d&&"string"!=typeof b?(a[e]||(a[e]={}),mixin(a[e],b,c,d)):a[e]=b)}),a}function bind(a,b){return function(){return b.apply(a,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(a){throw a}function getGlobal(a){if(!a)return a;var b=global;return each(a.split("."),function(a){b=b[a]}),b}function makeError(a,b,c,d){var e=new Error(b+"\nhttp://requirejs.org/docs/errors.html#"+a);return e.requireType=a,e.requireModules=d,c&&(e.originalError=c),e}function newContext(a){function b(a){var b,c;for(b=0;a[b];b+=1)if(c=a[b],"."===c)a.splice(b,1),b-=1;else if(".."===c){if(1===b&&(".."===a[2]||".."===a[0]))break;b>0&&(a.splice(b-1,2),b-=2)}}function c(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p=c&&c.split("/"),q=p,r=x.map,s=r&&r["*"];if(a&&"."===a.charAt(0)&&(c?(q=getOwn(x.pkgs,c)?p=[c]:p.slice(0,p.length-1),a=q.concat(a.split("/")),b(a),f=getOwn(x.pkgs,e=a[0]),a=a.join("/"),f&&a===e+"/"+f.main&&(a=e)):0===a.indexOf("./")&&(a=a.substring(2))),d&&r&&(p||s)){for(h=a.split("/"),i=h.length;i>0;i-=1){if(k=h.slice(0,i).join("/"),p)for(j=p.length;j>0;j-=1)if(g=getOwn(r,p.slice(0,j).join("/")),g&&(g=getOwn(g,k))){l=g,m=i;break}if(l)break;!n&&s&&getOwn(s,k)&&(n=getOwn(s,k),o=i)}!l&&n&&(l=n,m=o),l&&(h.splice(0,m,l),a=h.join("/"))}return a}function d(a){isBrowser&&each(scripts(),function(b){return b.getAttribute("data-requiremodule")===a&&b.getAttribute("data-requirecontext")===u.contextName?(b.parentNode.removeChild(b),!0):void 0})}function e(a){var b=getOwn(x.paths,a);return b&&isArray(b)&&b.length>1?(d(a),b.shift(),u.require.undef(a),u.require([a]),!0):void 0}function f(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function g(a,b,d,e){var g,h,i,j,k=null,l=b?b.name:null,m=a,n=!0,o="";return a||(n=!1,a="_@r"+(E+=1)),j=f(a),k=j[0],a=j[1],k&&(k=c(k,l,e),h=getOwn(C,k)),a&&(k?o=h&&h.normalize?h.normalize(a,function(a){return c(a,l,e)}):c(a,l,e):(o=c(a,l,e),j=f(o),k=j[0],o=j[1],d=!0,g=u.nameToUrl(o))),i=!k||h||d?"":"_unnormalized"+(F+=1),{prefix:k,name:o,parentMap:b,unnormalized:!!i,url:g,originalName:m,isDefine:n,id:(k?k+"!"+o:o)+i}}function h(a){var b=a.id,c=getOwn(y,b);return c||(c=y[b]=new u.Module(a)),c}function i(a,b,c){var d=a.id,e=getOwn(y,d);!hasProp(C,d)||e&&!e.defineEmitComplete?(e=h(a),e.error&&"error"===b?c(e.error):e.on(b,c)):"defined"===b&&c(C[d])}function j(a,b){var c=a.requireModules,d=!1;b?b(a):(each(c,function(b){var c=getOwn(y,b);c&&(c.error=a,c.events.error&&(d=!0,c.emit("error",a)))}),d||req.onError(a))}function k(){globalDefQueue.length&&(apsp.apply(B,[B.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function l(a){delete y[a],delete z[a]}function m(a,b,c){var d=a.map.id;a.error?a.emit("error",a.error):(b[d]=!0,each(a.depMaps,function(d,e){var f=d.id,g=getOwn(y,f);!g||a.depMatched[e]||c[f]||(getOwn(b,f)?(a.defineDep(e,C[f]),a.check()):m(g,b,c))}),c[d]=!0)}function n(){var a,b,c,f,g=1e3*x.waitSeconds,h=g&&u.startTime+g<(new Date).getTime(),i=[],k=[],l=!1,o=!0;if(!s){if(s=!0,eachProp(z,function(c){if(a=c.map,b=a.id,c.enabled&&(a.isDefine||k.push(c),!c.error))if(!c.inited&&h)e(b)?(f=!0,l=!0):(i.push(b),d(b));else if(!c.inited&&c.fetched&&a.isDefine&&(l=!0,!a.prefix))return o=!1}),h&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=u.contextName,j(c);o&&each(k,function(a){m(a,{},{})}),h&&!f||!l||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,n()},50)),s=!1}}function o(a){hasProp(C,a[0])||h(g(a[0],null,!0)).init(a[1],a[2])}function p(a,b,c,d){a.detachEvent&&!isOpera?d&&a.detachEvent(d,b):a.removeEventListener(c,b,!1)}function q(a){var b=a.currentTarget||a.srcElement;return p(b,u.onScriptLoad,"load","onreadystatechange"),p(b,u.onScriptError,"error"),{node:b,id:b&&b.getAttribute("data-requiremodule")}}function r(){var a;for(k();B.length;){if(a=B.shift(),null===a[0])return j(makeError("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));o(a)}}var s,t,u,v,w,x={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},y={},z={},A={},B=[],C={},D={},E=1,F=1;return v={require:function(a){return a.require?a.require:a.require=u.makeRequire(a.map)},exports:function(a){return a.usingExports=!0,a.map.isDefine?a.exports?a.exports:a.exports=C[a.map.id]={}:void 0},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){var b,c=getOwn(x.pkgs,a.map.id);return b=c?getOwn(x.config,a.map.id+"/"+c.main):getOwn(x.config,a.map.id),b||{}},exports:C[a.map.id]}}},t=function(a){this.events=getOwn(A,a.id)||{},this.map=a,this.shim=getOwn(x.shim,a.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},t.prototype={init:function(a,b,c,d){d=d||{},this.inited||(this.factory=b,c?this.on("error",c):this.events.error&&(c=bind(this,function(a){this.emit("error",a)})),this.depMaps=a&&a.slice(0),this.errback=c,this.inited=!0,this.ignore=d.ignore,d.enabled||this.enabled?this.enable():this.check())},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0,u.startTime=(new Date).getTime();var a=this.map;return this.shim?(u.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return a.prefix?this.callPlugin():this.load()})),void 0):a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;D[a]||(D[a]=!0,u.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id,d=this.depExports,e=this.exports,f=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(f)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{e=u.execCb(c,f,d,e)}catch(g){a=g}else e=u.execCb(c,f,d,e);if(this.map.isDefine&&(b=this.module,b&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports)),a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",j(this.error=a)}else e=f;this.exports=e,this.map.isDefine&&!this.ignore&&(C[c]=e,req.onResourceLoad&&req.onResourceLoad(u,this.map,this.depMaps)),l(c),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=g(a.prefix);this.depMaps.push(d),i(d,"defined",bind(this,function(d){var e,f,k,m=this.map.name,n=this.map.parentMap?this.map.parentMap.name:null,o=u.makeRequire(a.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(d.normalize&&(m=d.normalize(m,function(a){return c(a,n,!0)})||""),f=g(a.prefix+"!"+m,this.map.parentMap),i(f,"defined",bind(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),k=getOwn(y,f.id),k&&(this.depMaps.push(f),this.events.error&&k.on("error",bind(this,function(a){this.emit("error",a)})),k.enable()),void 0):(e=bind(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),e.error=bind(this,function(a){this.inited=!0,this.error=a,a.requireModules=[b],eachProp(y,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&l(a.map.id)}),j(a)}),e.fromText=bind(this,function(c,d){var f=a.name,i=g(f),k=useInteractive;d&&(c=d),k&&(useInteractive=!1),h(i),hasProp(x.config,b)&&(x.config[f]=x.config[b]);try{req.exec(c)}catch(l){return j(makeError("fromtexteval","fromText eval for "+b+" failed: "+l,l,[b]))}k&&(useInteractive=!0),this.depMaps.push(i),u.completeLoad(f),o([f],e)}),d.load(a.name,o,e,x),void 0)})),u.enable(d,this),this.pluginMaps[d.id]=d},enable:function(){z[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(a,b){var c,d,e;if("string"==typeof a){if(a=g(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[b]=a,e=getOwn(v,a.id))return this.depExports[b]=e(this),void 0;this.depCount+=1,i(a,"defined",bind(this,function(a){this.defineDep(b,a),this.check()})),this.errback&&i(a,"error",bind(this,this.errback))}c=a.id,d=y[c],hasProp(v,c)||!d||d.enabled||u.enable(a,this)})),eachProp(this.pluginMaps,bind(this,function(a){var b=getOwn(y,a.id);b&&!b.enabled&&u.enable(a,this)})),this.enabling=!1,this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]),c.push(b)},emit:function(a,b){each(this.events[a],function(a){a(b)}),"error"===a&&delete this.events[a]}},u={config:x,contextName:a,registry:y,defined:C,urlFetched:D,defQueue:B,Module:t,makeModuleMap:g,nextTick:req.nextTick,onError:j,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=x.pkgs,c=x.shim,d={paths:!0,config:!0,map:!0};eachProp(a,function(a,b){d[b]?"map"===b?(x.map||(x.map={}),mixin(x[b],a,!0,!0)):mixin(x[b],a,!0):x[b]=a}),a.shim&&(eachProp(a.shim,function(a,b){isArray(a)&&(a={deps:a}),!a.exports&&!a.init||a.exportsFn||(a.exportsFn=u.makeShimExports(a)),c[b]=a}),x.shim=c),a.packages&&(each(a.packages,function(a){var c;a="string"==typeof a?{name:a}:a,c=a.location,b[a.name]={name:a.name,location:c||a.name,main:(a.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),x.pkgs=b),eachProp(y,function(a,b){a.inited||a.map.unnormalized||(a.map=g(b))}),(a.deps||a.callback)&&u.require(a.deps||[],a.callback)},makeShimExports:function(a){function b(){var b;return a.init&&(b=a.init.apply(global,arguments)),b||a.exports&&getGlobal(a.exports)}return b},makeRequire:function(b,d){function e(c,f,i){var k,l,m;return d.enableBuildCallback&&f&&isFunction(f)&&(f.__requireJsBuild=!0),"string"==typeof c?isFunction(f)?j(makeError("requireargs","Invalid require call"),i):b&&hasProp(v,c)?v[c](y[b.id]):req.get?req.get(u,c,b,e):(l=g(c,b,!1,!0),k=l.id,hasProp(C,k)?C[k]:j(makeError("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+a+(b?"":". Use require([])")))):(r(),u.nextTick(function(){r(),m=h(g(null,b)),m.skipMap=d.skipMap,m.init(c,f,i,{enabled:!0}),n()}),e)}return d=d||{},mixin(e,{isBrowser:isBrowser,toUrl:function(a){var d,e=a.lastIndexOf("."),f=a.split("/")[0],g="."===f||".."===f;return-1!==e&&(!g||e>1)&&(d=a.substring(e,a.length),a=a.substring(0,e)),u.nameToUrl(c(a,b&&b.id,!0),d,!0)},defined:function(a){return hasProp(C,g(a,b,!1,!0).id)},specified:function(a){return a=g(a,b,!1,!0).id,hasProp(C,a)||hasProp(y,a)}}),b||(e.undef=function(a){k();var c=g(a,b,!0),d=getOwn(y,a);delete C[a],delete D[c.url],delete A[a],d&&(d.events.defined&&(A[a]=d.events),l(a))}),e},enable:function(a){var b=getOwn(y,a.id);b&&h(a).enable()},completeLoad:function(a){var b,c,d,f=getOwn(x.shim,a)||{},g=f.exports;for(k();B.length;){if(c=B.shift(),null===c[0]){if(c[0]=a,b)break;b=!0}else c[0]===a&&(b=!0);o(c)}if(d=getOwn(y,a),!b&&!hasProp(C,a)&&d&&!d.inited){if(!(!x.enforceDefine||g&&getGlobal(g)))return e(a)?void 0:j(makeError("nodefine","No define call for "+a,null,[a]));o([a,f.deps||[],f.exportsFn])}n()},nameToUrl:function(a,b,c){var d,e,f,g,h,i,j,k,l;if(req.jsExtRegExp.test(a))k=a+(b||"");else{for(d=x.paths,e=x.pkgs,h=a.split("/"),i=h.length;i>0;i-=1){if(j=h.slice(0,i).join("/"),f=getOwn(e,j),l=getOwn(d,j)){isArray(l)&&(l=l[0]),h.splice(0,i,l);break}if(f){g=a===f.name?f.location+"/"+f.main:f.location,h.splice(0,i,g);break}}k=h.join("/"),k+=b||(/\?/.test(k)||c?"":".js"),k=("/"===k.charAt(0)||k.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+k}return x.urlArgs?k+((-1===k.indexOf("?")?"?":"&")+x.urlArgs):k},load:function(a,b){req.load(u,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||readyRegExp.test((a.currentTarget||a.srcElement).readyState)){interactiveScript=null;var b=q(a);u.completeLoad(b.id)}},onScriptError:function(a){var b=q(a);return e(b.id)?void 0:j(makeError("scripterror","Script error for: "+b.id,a,[b.id]))}},u.require=u.makeRequire(),u}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(a){return"interactive"===a.readyState?interactiveScript=a:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.6",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(a,b,c,d){var e,f,g=defContextName;return isArray(a)||"string"==typeof a||(f=a,isArray(b)?(a=b,b=c,c=d):a=[]),f&&f.context&&(g=f.context),e=getOwn(contexts,g),e||(e=contexts[g]=req.s.newContext(g)),f&&e.configure(f),e.require(a,b,c)},req.config=function(a){return req(a)},req.nextTick="undefined"!=typeof setTimeout?function(a){setTimeout(a,4)}:function(a){a()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(a){req[a]=function(){var b=contexts[defContextName];return b.require[a].apply(b,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.load=function(a,b,c){var d,e=a&&a.config||{};if(isBrowser)return d=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),d.type=e.scriptType||"text/javascript",d.charset="utf-8",d.async=!0,d.setAttribute("data-requirecontext",a.contextName),d.setAttribute("data-requiremodule",b),!d.attachEvent||d.attachEvent.toString&&d.attachEvent.toString().indexOf("[native code")<0||isOpera?(d.addEventListener("load",a.onScriptLoad,!1),d.addEventListener("error",a.onScriptError,!1)):(useInteractive=!0,d.attachEvent("onreadystatechange",a.onScriptLoad)),d.src=c,currentlyAddingScript=d,baseElement?head.insertBefore(d,baseElement):head.appendChild(d),currentlyAddingScript=null,d;if(isWebWorker)try{importScripts(c),a.completeLoad(b)}catch(f){a.onError(makeError("importscripts","importScripts failed for "+b+" at "+c,f,[b]))}},isBrowser&&eachReverse(scripts(),function(a){return head||(head=a.parentNode),dataMain=a.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(a,b,c){var d,e;"string"!=typeof a&&(c=b,b=a,a=null),isArray(b)||(c=b,b=null),!b&&isFunction(c)&&(b=[],c.length&&(c.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(a,c){b.push(c)}),b=(1===c.length?["require"]:["require","exports","module"]).concat(b))),useInteractive&&(d=currentlyAddingScript||getInteractiveScript(),d&&(a||(a=d.getAttribute("data-requiremodule")),e=contexts[d.getAttribute("data-requirecontext")])),(e?e.defQueue:globalDefQueue).push([a,b,c])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),this.JST=this.JST||{},this.JST["app/templates/databases/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n  <a href="#/database/'+(null==(__t=encoded)?"":__t)+"/_all_docs?limit="+(null==(__t=docLimit)?"":__t)+'">'+(null==(__t=database.get("name"))?"":__t)+"</a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n  <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/new/'+(null==(__t=encoded)?"":__t)+'"></a>\n  <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=encoded)?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/templates/databases/list.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="result-tools" style="">\n  <div id="newButton" class="pull-left"></div>\n  <form id="jump-to-db" class="navbar-form pull-right input-append database-search">\n    <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name"></input>\n    <button class="fonticon-search btn button red " type="submit"></button>\n  </form>\n\n\n</div>\n<table class="databases table table-striped">\n  <thead>\n    <th>Name</th>\n    <th>Size</th>\n    <th># of Docs</th>\n    <th>Update Seq</th>\n    <th>Actions</th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n<div id="database-pagination"></div>\n';return __p},this.JST["app/templates/databases/newdatabase.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a class="button new" id="new"><i class="icon fonticon-new-database"></i>Add New Database</a>\n\n\n';return __p},this.JST["app/templates/databases/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n  <a href="http://couchdb.org" target="_blank"><img src="img/couchdblogo.png"/></a>\n  <br/>\n</div>\n<hr>\n<ul class="nav nav-list">\n  <!-- <li class="nav-header">Database types</li> -->\n  <li class="active"><a class="toggle-view" id="owned">Your databases</a></li>\n  <li><a class="btn new" id="new"><i class="icon-plus"></i> New database</a></li>\n</ul>\n<hr>\n\n<div>\n  <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/CouchDB" data-widget-id="314360971646869505">Tweets by @CouchDB</a>\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>\n\n</div>\n';return __p},this.JST["app/templates/documents/advanced_options.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="errors-container"></div>\n<form class="view-query-update custom-inputs">\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <input name="key" class="span6" type="text" placeholder="Key">\n        <input name="keys" class="span6" type="text" placeholder="Keys">\n      </div>\n    </div>\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <input name="startkey" class="span6" type="text" placeholder="Start Key">\n        <input name="endkey" class="span6" type="text" placeholder="End Key">\n      </div>\n    </div>\n  </div>\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div class="controls controls-row">\n        <div class="checkbox inline">  \n          <input id="check1" type="checkbox" name="include_docs" value="true">  \n          <label name="include_docs" for="check1">Include Docs</label>  \n          ',__p+=hasReduce?'\n          <input id="check2" name="reduce" type="checkbox" value="true">\n          <label for="check2">Reduce</label>  \n        </div> \n        <label id="select1" class="drop-down inline">\n          Group Level:\n          <select id="select1" disabled name="group_level" class="input-small">\n            <option value="0">None</option>\n            <option value="1">1</option>\n            <option value="2">2</option>\n            <option value="3">3</option>\n            <option value="4">4</option>\n            <option value="5">5</option>\n            <option value="6">6</option>\n            <option value="7">7</option>\n            <option value="8">8</option>\n            <option value="9">9</option>\n            <option value="999" selected="selected">exact</option>\n          </select>\n        </label>\n        ':"\n        </div>\n        ",__p+='\n\n        <div class="checkbox inline">  \n          <input id="check3" name="stale" type="checkbox" value="ok">\n          <label for="check3">Stale</label>\n          <input id="check4" name="descending" type="checkbox" value="true">  \n          <label for="check4">Descending</label>  \n        </div> \n        <label class="drop-down inline">\n          Limit:\n          <select name="limit" class="input-small">\n            <option>5</option>\n            <option selected="selected">10</option>\n            <option>25</option>\n            <option>50</option>\n            <option>100</option>\n          </select>\n        </label>\n        <div class="checkbox inline">  \n          <input id="check5" name="inclusive_end" type="checkbox" value="false">\n          <label for="check5">Disable Inclusive End</label>\n          <input id="check6" name="update_seq" type="checkbox" value="true">  \n          <label for="check6">Update Sequence</label>  \n        </div>\n      </div>\n    </div>\n  </div>\n  <div class="controls-group">\n    <div class="row-fluid">\n      <div id="button-options" class="controls controls-row">\n        <button type="submit" class="button green">Query</button>\n        ',showPreview&&(__p+='\n        <button class="button btn-info preview">Browser Preview</button>\n        '),__p+="\n      </div>\n    </div>\n  </div>\n</form>\n</div>\n\n";return __p},this.JST["app/templates/documents/all_docs_item.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox" class="row-select"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n    ",doc.isEditable()&&(__p+='\n      <div class="btn-group">\n        <a href="#'+(null==(__t=doc.url("web-index"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n      </div>\n    '),__p+="\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/all_docs_layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>\n</ul>\n<div class="tab-content">\n  <div class="tab-pane" id="query">\n  </div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_list.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n  ',viewList||(__p+='\n    <div class="row">\n      <div class="btn-toolbar span6">\n        <button type="button" class="btn all" data-toggle="button">✓ All</button>\n        <button class="btn btn-small disabled bulk-delete"><i class="icon-trash"></i></button>\n        ',__p+=expandDocs?'\n        <button id="collapse" class="btn"><i class="icon-minus"></i> Collapse</button>\n        ':'\n        <button id="collapse" class="btn"><i class="icon-plus"></i> Expand</button>\n        ',__p+="\n      </div>\n    </div>\n  "),__p+='\n  <p>\n\n  <div id="item-numbers"> </div>\n\n  ',requestDuration&&(__p+='\n    <span class="view-request-duration">\n    View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n    </span>\n  "),__p+='\n  </p>\n  <table class="all-docs table table-striped table-condensed">\n    <tbody></tbody>\n  </table>\n  <div id="documents-pagination"></div>\n</div>\n';return __p},this.JST["app/templates/documents/all_docs_number.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+="unknown"===totalRows?'\n  Showing 0 documents. <a href="#/database/'+(null==(__t=database)?"":__t)+'/new"> Create your first document.</a>\n':"\n  Showing "+(null==(__t=offset)?"":__t)+" - "+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n",__p+="\n",updateSeq&&(__p+="\n  -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n"),__p+="\n";return __p},this.JST["app/templates/documents/changes.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<table id="changes-table" class="table">\n  <thead>\n    <th id="seq"> seq </th>\n    <th> id </th>\n    <th id="changes"> changes </th>\n    <th id="deleted"> deleted? </th>\n  </thead>\n  <tbody>\n  ',_.each(changes,function(a){__p+="\n    <tr>\n      <td> "+(null==(__t=a.seq)?"":__t)+" </td>\n      ",__p+=a.deleted?"\n        <td> "+(null==(__t=a.id)?"":__t)+" </td>\n      ":'\n        <td> <a href="#'+(null==(__t=database.url("app"))?"":__t)+"/"+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</a> </td>\n      ",__p+='\n        <td> \n          <pre class="prettyprint">  '+__e(JSON.stringify({changes:a.changes,doc:a.doc},null," "))+" </pre>\n      </td>\n      <td>"+(null==(__t=a.deleted?"true":"false")?"":__t)+"</td>\n    </tr>\n  "}),__p+="\n  </tbody>\n</table>\n";return __p},this.JST["app/templates/documents/ddoc_info.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join
+}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div>\n  <h2> Design Doc MetaData </h2>\n  <div class="row-fluid">\n	',i=0,_.map(view_index,function(a,b){__p+="\n		",i%2==0&&(__p+='\n			<div class="row-fluid">\n		'),__p+='\n	    <div class="span6 well-item"><strong> '+(null==(__t=b)?"":__t)+"</strong> : "+(null==(__t=a)?"":__t)+"  </div>\n	    ",i%2==1&&(__p+="\n			</div>\n		"),__p+="\n	  	",++i}),__p+="\n  </div>\n</div>\n";return __p},this.JST["app/templates/documents/design_doc_selector.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span3">\n  <label for="ddoc">Save to Design Document <a href="'+(null==(__t=getDocUrl("design_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n  <select id="ddoc">\n    <optgroup label="Select a document">\n      <option value="new-doc">New document</option>\n      ',ddocs.each(function(a){__p+="\n      ",__p+=a.id===ddocName?'\n      <option selected="selected" value="'+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</option>\n      ":'\n      <option value="'+(null==(__t=a.id)?"":__t)+'">'+(null==(__t=a.id)?"":__t)+"</option>\n      ",__p+="\n      "}),__p+='\n    </optgroup>\n  </select>\n</div>\n\n<div id="new-ddoc-section" class="span5" style="display:none">\n  <label class="control-label" for="new-ddoc"> _design/ </label>\n  <div class="controls">\n    <input type="text" id="new-ddoc" placeholder="newDesignDoc">\n  </div>\n</div>\n';return __p},this.JST["app/templates/documents/doc.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc">\n  <div class="errors-container"></div>\n   \n<div class="row doc-editor-buttons"> \n  <div class="span3">\n    <button class="save-doc button green btn-medium save fonticon-circle-check" type="button">Save</button>\n    <button class="button cancel-button gray btn-medium">Back to _all_docs</button>\n  </div>\n\n  <div class="span7">\n    ',attachments&&(__p+='\n    <div class="btn-group">\n      <a class="button gray btn-medium dropdown-toggle btn" data-bypass="true" data-toggle="dropdown" href="#">\n        View Attachments\n        <span class="caret"></span>\n      </a>\n      <ul class="dropdown-menu">\n        ',_.each(attachments,function(a){__p+='\n        <li>\n        <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> <strong> '+(null==(__t=a.fileName)?"":__t)+" </strong> -\n          <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n        </a>\n        </li>\n        "}),__p+="\n      </ul>\n    </div>\n    "),__p+=' \n    <button class="button gray btn-medium  upload"><i class="icon-circle-arrow-up"></i> Upload Attachment</button>\n    <button class="button gray btn-medium duplicate"><i class="icon-repeat"></i> Duplicate document</button>\n  </div>\n\n  <button class="button red btn-medium delete"><i class="icon-trash"></i></button>\n  </ul>\n\n<div id="upload-modal"> </div>\n<div id="duplicate-modal"> </div> \n</div>\n\n  <div id="editor-container" class="doc-code">'+__e(JSON.stringify(doc.attributes,null,"  "))+"</div>\n\n</div>\n";return __p},this.JST["app/templates/documents/doc_field_editor.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="doc-field-editor">\n  <div class="tools">\n\n    <div class="btn-toolbar pull-left">\n      <button class="btn btn-small all">&#x2713; All</button>\n      <button class="btn btn-small disabled delete"><i class="icon-trash"></i> Delete field</button>\n      <button class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</button>\n    </div>\n    <div class="btn-toolbar pull-right">\n      <button class="btn btn-small cancel button cancel-button outlineGray fonticon-circle-x">Cancel</button>\n      <button class="btn btn-small save button green fonticon-circle-check">Save</button>\n    </div>\n  </div>\n\n  <div class="clearfix"></div>\n  <!-- <hr style="margin-top: 0"/> -->\n\n  <table class="table table-striped  table-condensed">\n    <thead>\n      <tr>\n        <th class="select">\n        </th>\n        <th>Key</th>\n        <th>Value</th>\n      </tr>\n    </thead>\n    <tbody>\n      <tr style="display:none">\n        <td class="select"><input type="checkbox" /></td>\n        <td class="key"><input type="text" class="input-large" value=\'\' /></td>\n        <td class="value"><input type="text" class="input-xxlarge" value=\'\' /></td>\n      </tr>\n      ',_.each(doc,function(a,b){__p+='\n        <tr>\n          <td class="select"><input type="checkbox" /></td>\n          <td class="key">\n            <input type="text" class="input-large" name="doc['+(null==(__t=b)?"":__t)+']" value="'+(null==(__t=b)?"":__t)+'" />\n          </td>\n          <td class="value"><input type="text" class="input-xxlarge" value=\''+(null==(__t=JSON.stringify(a))?"":__t)+"' /></td>\n        </tr>\n      "}),__p+='\n        <tr>\n          <th colspan="3">\n            Attachments\n          </th>\n        </tr>\n      ',_.each(attachments,function(a){__p+='\n        <tr>\n          <td class="select"><input type="checkbox" /></td>\n          <td colspan="2">\n            <a href="'+(null==(__t=a.url)?"":__t)+'" target="_blank"> '+(null==(__t=a.fileName)?"":__t)+" </a>\n            <span> "+(null==(__t=a.contentType)?"":__t)+", "+(null==(__t=formatSize(a.size))?"":__t)+" </span>\n          </td>\n        </tr>\n      "}),__p+='\n    </tbody>\n  </table>\n  <a class="btn btn-small new" style="margin-left: 64px"><i class="icon-plus"></i> New field</a>\n\n</div>\n';return __p},this.JST["app/templates/documents/doc_field_editor_tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<!--<ul class="nav nav-tabs">\n  <li id="field_editor" class="'+(null==(__t=isSelectedClass("field_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/field_editor">Doc fields</a></li>\n  <li id="code_editor" class="'+(null==(__t=isSelectedClass("code_editor"))?"":__t)+'"><a href="#'+(null==(__t=doc.url("app"))?"":__t)+'/code_editor"><i class="icon-pencil"> </i> Code editor</a>\n  </li>\n</ul>-->\n';return __p},this.JST["app/templates/documents/duplicate_doc_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Duplicate Document</h3>\n  </div>\n  <div class="modal-body">\n    <div id="modal-error" class="hide alert alert-error"/>\n    <form id="file-upload" class="form" method="post">\n      <p class="help-block">\n      Set new documents ID:\n      </p>\n      <input id="dup-id" type="text" class="input-xlarge">\n    </form>\n\n  </div>\n  <div class="modal-footer">\n    <a href="#" data-dismiss="modal" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n    <a href="#" id="duplicate-btn" class="btn btn-primary button green save fonticon-circle-check">Duplicate</a>\n  </div>\n</div>\n\n\n';return __p},this.JST["app/templates/documents/edit_tools.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="view show">\n  <p>\n    Showing 1-'+(null==(__t=numModels)?"":__t)+" of "+(null==(__t=totalRows)?"":__t)+" rows\n    ",updateSeq&&(__p+="\n      -- Update Sequence: "+(null==(__t=updateSeq)?"":__t)+"\n    "),__p+="\n    ",requestDuration&&(__p+='\n  <span class="view-request-duration">\n    View request duration: <strong> '+(null==(__t=requestDuration)?"":__t)+" </strong> \n   </span>\n   "),__p+='\n  </p>\n  <table class="all-docs table table-striped table-condensed">\n    <tbody></tbody>\n  </table>\n  <!--\n  <div class="pagination pagination-centered">\n    <ul>\n      <li class="disabled"><a href="#">&laquo;</a></li>\n      <li class="active"><a href="#">1</a></li>\n      <li><a href="#">2</a></li>\n      <li><a href="#">3</a></li>\n      <li><a href="#">4</a></li>\n      <li><a href="#">5</a></li>\n      <li><a href="#">&raquo;</a></li>\n    </ul>\n  </div>\n  -->\n\n</div>\n';return __p},this.JST["app/templates/documents/index_menu_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<a id="'+(null==(__t=ddoc_clean)?"":__t)+"_"+(null==(__t=index_clean)?"":__t)+'" href="#database/'+(null==(__t=database_encoded)?"":__t)+"/_design/"+(null==(__t=ddoc_encoded)?"":__t)+"/_view/"+(null==(__t=index_encoded)?"":__t)+'" class="toggle-view">\n  '+(null==(__t=ddoc)?"":__t)+'<span class="divider">/</span>'+(null==(__t=index)?"":__t)+"\n</a>\n";return __p},this.JST["app/templates/documents/index_row_docular.html"]=function(obj){obj||(obj={});{var __t,__p="",__e=_.escape;Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(doc.prettyJSON())+"</pre>\n    ",doc.isEditable()&&(__p+='\n      <div class="btn-group">\n        <a href="#'+(null==(__t=doc.url("app"))?"":__t)+'" class="btn btn-small edits">Edit '+(null==(__t=doc.docType())?"":__t)+'</a>\n        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button>\n      </div>\n    '),__p+="\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/index_row_tabular.html"]=function(obj){obj||(obj={});var __p="",__e=_.escape;with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td class="select"><input type="checkbox"></td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(JSON.stringify(doc.get("key")))+'</pre>\n  </div>\n</td>\n<td>\n  <div>\n    <pre class="prettyprint">'+__e(JSON.stringify(doc.get("value")))+"</pre>\n  </div>\n</td>\n";return __p},this.JST["app/templates/documents/jumpdoc.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="jump-to-doc" class="form-inline input-append" >\n  <input type="text" id="jump-to-doc-id" class="input-large" placeholder="Document ID"></input>\n\n  <button class="fonticon-search btn button red " type="submit"></button>\n</form>\n';return __p},this.JST["app/templates/documents/search.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<input id="searchbox" type="text" class="span12" placeholder="Search by doc id, view key or search index">';return __p},this.JST["app/templates/documents/sidebar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n  <header class="row-fluid">\n    <div class="span12">\n      <div class="btn-group">\n        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">\n          Docs\n          <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu">\n          <!-- dropdown menu links -->\n          <li><a class="icon-file" href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n          <li><a class="icon-lock" href="'+(null==(__t=permissions_url)?"":__t)+'">Permissions</a></li>\n          <li><a class="icon-forward" href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n          ',_.each(docLinks,function(a){__p+='\n          <li><a class="'+(null==(__t=a.icon)?"":__t)+'" href="'+(null==(__t=database_url+"/"+a.url)?"":__t)+'">'+(null==(__t=a.title)?"":__t)+"</a></li>\n          "}),__p+='\n        </ul>\n      </div>\n\n      <div class="btn-group">\n        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">\n          New\n          <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu">\n          <!-- dropdown menu links -->\n          <li>\n          <a id="doc" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new">Document</a>\n          </li>\n          <li>\n          <a href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view">Secondary Index</a>\n           ',_.each(newLinks,function(a){__p+='\n           <a href="#'+(null==(__t=database.url("app"))?"":__t)+"/"+(null==(__t=a.url)?"":__t)+'"> '+(null==(__t=a.name)?"":__t)+"</a>\n           "}),__p+='\n          </li>\n        </ul>\n      </div>\n        <button id="delete-database" class="btn"><i class="icon-trash"></i> Database</button>\n    </div>\n  </header>\n\n  <nav>\n    <ul class="nav nav-list">\n      <li class="active"><a id="all-docs" href="#'+(null==(__t=database.url("index"))?"":__t)+"?limit="+(null==(__t=docLimit)?"":__t)+'" class="toggle-view"> All documents</a></li>\n      <li><a id="design-docs" href=\'#'+(null==(__t=database.url("index"))?"":__t)+"?limit="+(null==(__t=docLimit)?"":__t)+'&startkey="_design"&endkey="_e"\'  class="toggle-view"> All design docs</a></li>\n    </ul>\n    <ul class="nav nav-list views">\n      <li class="nav-header">Secondary Indexes</li>\n      <li><a id="new-view" href="#'+(null==(__t=database.url("app"))?"":__t)+'/new_view" class="new"><i class="icon-plus"></i> New</a></li>\n    </ul>\n    <div id="extension-navs"></div>\n  </nav>\n</div>\n';return __p},this.JST["app/templates/documents/tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="nav nav-tabs">\n  <li class="active"><a href="'+(null==(__t=db_url)?"":__t)+'">Docs</a></li>\n  <li id="changes"><a  href="'+(null==(__t=changes_url)?"":__t)+'">Changes</a></li>\n</ul>\n';return __p},this.JST["app/templates/documents/upload_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Upload an Attachment</h3>\n  </div>\n  <div class="modal-body">\n    <div id="modal-error" class="alert alert-error hide" style="font-size: 16px;"> </div>\n    <form id="file-upload" class="form" method="post">\n      <p class="help-block">\n      Please select the file you want to upload as an attachment to this document. \n      Please note that this will result in the immediate creation of a new revision of the document, \n      so it\'s not necessary to save the document after the upload.\n      </p>\n      <input id="_attachments" type="file" name="_attachments">\n      <input id="_rev" type="hidden" name="_rev" value="" >\n      <br/>\n    </form>\n\n    <div class="progress progress-info">\n      <div class="bar" style="width: 0%"></div>\n    </div>\n  </div>\n  <div class="modal-footer">\n    <a href="#" data-dismiss="modal" data-bypass="true" class="btn button cancel-button outlineGray fonticon-circle-x">Cancel</a>\n    <a href="#" id="upload-btn" data-bypass="true" class="btn btn-primary button green save fonticon-circle-check">Upload</a>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/documents/view_editor.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n  <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n    <li class="active"> <a data-bypass="true" id="index-nav" class="fonticon-wrench fonticon" data-toggle="tab" href="#index">',__p+=newView?"Create Index ":"Edit Index ",__p+="</a></li>\n    ",newView||(__p+='\n    <li><a data-bypass="true" id="query-nav" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Query Options</a></li>\n    <li><a data-bypass="true" id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>\n    '),__p+='\n  </ul>\n  <div class="all-docs-list errors-container"></div>\n  <div class="tab-content">\n    <div class="tab-pane active" id="index">\n      <div id="define-view" class="ddoc-alert well">\n        <div class="errors-container"></div>\n        <form class="form-horizontal view-query-save">\n\n          <div class="control-group design-doc-group">\n          </div>\n\n          <div class="control-group">\n            <label for="index-name">Index name <a href="'+(null==(__t=getDocUrl("view_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n            <input type="text" id="index-name" value="'+(null==(__t=viewName)?"":__t)+'" placeholder="Index name" />\n          </div>\n\n\n          <div class="control-group">\n            <label for="map-function">Map function <a href="'+(null==(__t=getDocUrl("map_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n            ',__p+=newView?'\n            <div class="js-editor" id="map-function">'+(null==(__t=langTemplates.map)?"":__t)+"</div>\n            ":'\n            <div class="js-editor" id="map-function">'+(null==(__t=ddoc.get("views")[viewName].map)?"":__t)+"</div>\n            ",__p+='\n          </div>\n\n\n          <div class="control-group">\n            <label for="reduce-function-selector">Reduce (optional) <a href="'+(null==(__t=getDocUrl("reduce_functions"))?"":__t)+'" target="_blank"><i class="icon-question-sign"></i></a></label>\n\n            <select id="reduce-function-selector">\n              <option value="" '+(null==(__t=reduceFunStr?"":'selected="selected"')?"":__t)+">None</option>\n              ",_.each(["_sum","_count","_stats"],function(a){__p+='\n              <option value="'+(null==(__t=a)?"":__t)+'" ',a==reduceFunStr&&(__p+="selected"),__p+=">"+(null==(__t=a)?"":__t)+"</option>\n              "}),__p+='\n              <option value="CUSTOM" ',isCustomReduce&&(__p+="selected"),__p+='>Custom Reduce function</option>\n            </select>\n          </div>\n\n          <div class="control-group reduce-function">\n            <label for="reduce-function">Custom Reduce function</label>\n            ',__p+=newView?'\n            <div class="js-editor" id="reduce-function">'+(null==(__t=langTemplates.reduce)?"":__t)+"</div>\n            ":'\n            <div class="js-editor" id="reduce-function">'+(null==(__t=ddoc.get("views")[viewName].reduce)?"":__t)+"</div>\n            ",__p+='\n          </div>\n\n          <div class="control-group">\n            <button class="button green save fonticon-circle-check">Save &amp; Build Index</button>\n            <button class="button btn-info preview">Preview</button>\n            ',newView||(__p+='\n            <button class="button delete outlineGray fonticon-circle-x">Delete</button>\n            '),__p+='\n          </div>\n          <div class="clearfix"></div>\n        </form>\n      </div>\n    </div>\n    <div class="tab-pane" id="metadata">\n      <div id="ddoc-info" class="well"> </div>\n    </div>\n    <div class="tab-pane" id="query">\n    </div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/api_bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<button class="button api-url-btn">\n  API URL \n  <span class="fonticon-plus icon"></span>\n</button>\n<div class="api-navbar" style="display: none">\n    <div class="input-prepend input-append">\n      <span class="add-on">\n        API reference\n        <a href="'+(null==(__t=getDocUrl(documentation))?"":__t)+'" target="_blank">\n          <i class="icon-question-sign"></i>\n        </a>\n      </span>\n      <input type="text" class="input-xxlarge" value="'+(null==(__t=endpoint)?"":__t)+'">\n      <a href="'+(null==(__t=endpoint)?"":__t)+'" target="_blank" class="btn">Show me</a>\n    </div>\n</div>\n';return __p},this.JST["app/templates/fauxton/breadcrumbs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<ul class="breadcrumb">\n  ',_.each(_.initial(crumbs),function(a){__p+='\n    <li>\n      <a href="#'+(null==(__t=a.link)?"":__t)+'">'+(null==(__t=a.name)?"":__t)+'</a>\n      <span class="divider fonticon fonticon-carrot"> </span>\n    </li>\n  '}),__p+="\n  ";var last=_.last(crumbs)||{name:""};__p+='\n  <li class="active">'+(null==(__t=last.name)?"":__t)+"</li>\n</ul>\n"}return __p},this.JST["app/templates/fauxton/footer.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<p>Fauxton on <a href="http://couchdb.apache.org/">Apache CouchDB</a> '+(null==(__t=version)?"":__t)+"</p>\n";return __p},this.JST["app/templates/fauxton/index_pagination.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n  <ul>\n    <li ',canShowPreviousfn()||(__p+=' class="disabled" '),__p+='>\n       <a id="previous" href="#"> Previous </a>\n     </li>\n     <li ',canShowNextfn()||(__p+=' class="disabled" '),__p+='>\n       <a id="next" href="#"> Next </a></li>\n  </ul>\n</div>\n\n';return __p},this.JST["app/templates/fauxton/nav_bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="brand">\n  <div class="burger">\n    <div><!-- * --></div>\n    <div><!-- * --></div>\n    <div><!-- * --></div>\n  </div>\n  <div class="icon">Apache Fauxton</div>\n</div>\n\n<nav id="main_navigation">\n  <ul id="nav-links" class="nav pull-right">\n    ',_.each(navLinks,function(a){__p+="\n    ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'" >\n          <a href="'+(null==(__t=a.href)?"":__t)+'">\n            <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n            '+(null==(__t=a.title)?"":__t)+"\n          </a>\n        </li>\n    ")
+}),__p+='\n  </ul>\n\n  <div id="footer-links">\n\n    <ul id="bottom-nav-links" class="nav">\n        <li data-nav-name= "Documentation">\n            <a href="'+(null==(__t=getDocUrl("docs"))?"":__t)+'" target="_blank">\n              <span class="fonticon-bookmark fonticon"></span>\n                Documentation\n            </a>\n        </li>\n\n\n      ',_.each(bottomNavLinks,function(a){__p+="\n      ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n            <a href="'+(null==(__t=a.href)?"":__t)+'">\n              <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n              '+(null==(__t=a.title)?"":__t)+"\n            </a>\n        </li>\n      ")}),__p+='\n    </ul>\n\n    <ul id="footer-nav-links" class="nav">\n      ',_.each(footerNavLinks,function(a){__p+="\n      ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n            <a href="'+(null==(__t=a.href)?"":__t)+'">\n              <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n              '+(null==(__t=a.title)?"":__t)+"\n            </a>\n        </li>\n      ")}),__p+="\n    </ul>\n\n  </div>\n</nav>\n\n\n\n";return __p},this.JST["app/templates/fauxton/notification.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="alert alert-'+(null==(__t=type)?"":__t)+'">\n  <button type="button" class="close" data-dismiss="alert">×</button>\n  '+(null==(__t=msg)?"":__t)+"\n</div>\n";return __p},this.JST["app/templates/fauxton/pagination.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="pagination pagination-centered">\n  <ul>\n    ',__p+=page>1?'\n    <li> <a href="'+(null==(__t=urlFun(page-1))?"":__t)+'">&laquo;</a></li>\n    ':'\n      <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&laquo;</a></li>\n    ',__p+="\n    ",_.each(_.range(1,totalPages+1),function(a){__p+="\n      <li ",page==a&&(__p+='class="active"'),__p+='> <a href="'+(null==(__t=urlFun(a))?"":__t)+'">'+(null==(__t=a)?"":__t)+"</a></li>\n    "}),__p+="\n    ",__p+=totalPages>page?'\n      <li><a href="'+(null==(__t=urlFun(page+1))?"":__t)+'">&raquo;</a></li>\n    ':'\n      <li class="disabled"> <a href="'+(null==(__t=urlFun(page))?"":__t)+'">&raquo;</a></li>\n    ',__p+="\n  </ul>\n</div>\n";return __p},this.JST["app/templates/layouts/one_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row"></div>\n    <div id="dashboard-content" class="window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/one_pane_notabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid one-pane">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n    <div id="dashboard-content" class="window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/two_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row"></div>\n    <div id="left-content" class="span6"></div>\n    <div id="right-content" class="span6"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_right_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n  <div class="fixed-header">\n    <div id="breadcrumbs"></div>\n    <div id="api-navbar"></div>\n  </div>\n  <div class="with-sidebar-right content-area">\n    <div id="dashboard-content" class="list"></div>\n    <div id="sidebar-content" class="sidebar pull-right window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n<header class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</header>\n  <div class="with-sidebar content-area">\n    <div id="sidebar-content" class="sidebar"></div>\n    <div id="dashboard-content" class="list window-resizeable"></div>\n  </div>\n</div>\n\n';return __p},this.JST["app/templates/layouts/with_tabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<div class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</div>\n\n  <div class="row-fluid content-area">\n  	<div id="tabs" class="row-fluid"></div>\n    <div id="dashboard-content" class="list span12 window-resizeable"></div>\n  </div>\n\n\n';return __p},this.JST["app/templates/layouts/with_tabs_sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid">\n\n<header class="fixed-header">\n  <div id="breadcrumbs"></div>\n  <div id="api-navbar"></div>\n</header>\n\n\n  <div class="with-sidebar content-area">\n\n    <div id="tabs" class="row-fluid"></div>\n\n    <aside id="sidebar-content" class="sidebar"></aside>\n\n    <section id="dashboard-content" class="list pull-right window-resizeable">\n      <div class="inner">\n        <div id="dashboard-upper-menu" class="window-resizeable"></div>\n        <div id="dashboard-upper-content"></div>\n\n        <div id="dashboard-lower-content"></div>\n      </div>\n    </section>\n\n  </div>\n\n\n';return __p},this.JST["app/addons/account/templates/accountactivity.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n	",user.noHistory()?__p+="\n	  <h2>Here's your usage so far this month.</h2>\n	":(__p+='\n	    <p class="lead usage-links ',past&&(__p+=" past-active "),__p+='">Your usage: \n	    <!-- <a class="current-month" href="#">So far this month</a> | <a class="last-month" href="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</a> -->\n	    <div class="btn-group usage-links-toggle" data-toggle="buttons-radio">\n	      <button type="button" class="button active" value="current-month" data-url="#/account/usage" >So far this month</button>\n	      <button type="button" class="button" value"last-month" data-url="#/account/usage/'+(null==(__t=year)?"":__t)+"/"+(null==(__t=month)?"":__t)+'">Last month</button>\n	    </div>\n	    </p>\n	'),__p+='\n	<div id="messaging"></div>\n</header>\n\n<section id="summary" class="row activity-pane">\n	<div id="tabs-container">\n		<div id="bill" class="row-fluid"></div>\n		<div id="usage" class=""></div>\n	</div>\n</section>\n';return __p},this.JST["app/addons/account/templates/accountdashboard.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid accountDash">\n  <div class="with-sidebar content-area">\n    <div id="sidebar-content" class="sidebar"></div>\n    <div id="dashboard-content" class="list window-resizeable"></div>\n  </div>\n</div>\n';return __p},this.JST["app/addons/account/templates/accountinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<header>\n  <h2>Account information</h2>\n</header>\n<form id="accountinfoForm">\n  <div class="controls controls-row">\n    <label for="firstname">First name</label>\n    <input type="text" id="firstname" name="first_name" tabindex="1" placeholder="name here" value="'+(null==(__t=first)?"":__t)+'">\n  </div>\n\n  <div class="controls controls-row">\n    <label for="lastname">Last Name</label>\n    <input type="text" id="lastname" name="last_name" tabindex="2" placeholder="Last name" value="'+(null==(__t=last)?"":__t)+'">\n  </div>\n\n  <div class="controls controls-row">\n    <label for="company">Company</label>\n    <input type="text" id="company" name="company" tabindex="3" placeholder="your company" value="'+(null==(__t=company)?"":__t)+'">\n  </div>\n\n  <div class="controls controls-row">\n    <label for="email">Email</label>\n    <input type="text" id="email" name="email" tabindex="4" placeholder="info@cloudant.com" value="'+(null==(__t=email)?"":__t)+'">\n  </div>\n\n  <div class="form-actions">\n   <input class="button green" type="submit" tabindex="5" value="Save Changes"/>\n  </div>\n</form>\n\n';return __p},this.JST["app/addons/account/templates/activitytabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="bill" class="row-fluid"></div>\n<div id="usage" class=""></div>\n';return __p},this.JST["app/addons/account/templates/announcements.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<header>\n    <h2>Welcome to the new Cloudant Dashboard</h2>\n    <p>December 18, 2013</p>\n    <p>\n    Before we get to what’s new, a little business: if for some reason you need to use it, the <a href="https://cloudant.com/dashboard" target="_blank">old Cloudant dashboard</a> will remain online until March 2014. (For security reasons, you\'ll need to sign in again.)\n    </p>\n</header>\n    <div class="activity-pane">\n        <h4>\n            Behold!\n        </h4>\n        <p>\n            Now, on to the new features we’re thrilled to share with you...\n        </p>\n\n        <hr />\n\n        <h4>\n            Support\n        </h4>\n        <p>\n            New to the Cloudant customer experience is <a href="#/support">a bona fide support portal</a>, where you can create and reply to support cases.\n        </p>\n        <p>\n            <img src="/dashboard.assets/img/Screenshot-support.png"; alt="Active and closed cases in the Cloudant support portal." style="border: 1px solid #ccc" />\n        </p>\n\n        <hr />\n\n        <h4>\n            Replication\n        </h4>\n        <p>\n            <a href="#/replication">Replication</a> has never been this easy. Just pick source and target databases with the handy autocomplete fields, click Replicate, and authenticate with your Cloudant password. That’s it.\n        </p>\n        <p>\n            <img src="/dashboard.assets/img/Screenshot-replication.png"; alt="Autocomplete fields for source and target databases make replication easy at Cloudant." style="border: 1px solid #ccc" />\n        </p>\n\n        <hr />\n\n        <h4>\n            Code Editors\n        </h4>\n        <p>\n            The fields for editing JavaScript are now feature-rich code editors with syntax checking. This measure, along with the tooling in secondary indexes, help prevent MapReduce mistakes and JSON formatting no-nos.\n        </p>\n        <p>\n            <img src="/dashboard.assets/img/Screenshot-code-editors.png"; alt="JavaScript code editors in the Databases section of the Cloudant dashboard." style="border: 1px solid #ccc" />\n        </p>\n\n        <hr />\n\n        <h4>\n            Secondary Indexes\n        </h4>\n        <p>\n            The secondary indexes inside your Cloudant databases are now preview-able. Just click “Preview” to view a temporary result in your browser. When what you see is what you want, kick off the indexing job on the server with the “Save &amp; Build Index” button.\n        </p>\n        <p>\n            <img src="/dashboard.assets/img/Screenshot-preview.png"; alt="Preview secondary indexes before saving them to save time." style="border: 1px solid #ccc" />\n        </p>\n\n        <hr />\n\n        <h4>\n            Search Indexes\n        </h4>\n        <p>\n            The new search index interface brings the power of Lucene full-text search to the dashboard. \n        </p>\n        <p>\n            <img src="/dashboard.assets/img/Screenshot-search.png"; alt="Query your Cloudant search indexes right from the dashboard." style="border: 1px solid #ccc" />\n        </p>\n        <p>\n            If you haven’t tried Cloudant Search yet, run through the <a href="https://cloudant.com/for-developers/search/"; target="_blank">Search API demo</a> in For Developers first, and come back here to check it out.\n        </p>\n        <hr />\n        <p>\n            We hope you enjoy the new dashboard, and all of the new features. When you have feedback, please share it. <a href="#/support">The Support portal</a> is the perfect place for that.\n        </p>\n\n        <p>\n            Happy dashboarding!\n        </p>\n    </div>\n';return __p},this.JST["app/addons/account/templates/bill.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n  <li class="span3 active" style="margin-left: 0" data-tab="#heavy-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Heavy HTTP</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=writes.cost)?"":__t)+'</span>\n      <div class="operator">+</div>\n    </div>  \n    </div>\n  </li>\n  <li class="span3" data-tab="#light-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Light HTTP</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=reads.cost)?"":__t)+'</span>\n      <div class="operator">+</div>\n    </div>  \n    </div>\n  </li>\n  <li class="span3" data-tab="#data-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Data Volume</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=data_vol.cost)?"":__t)+'</span>\n      <div class="operator">=</div>\n    </div> \n    </div>\n  </li>\n  <!-- TOTAL -->\n  <div class="span3 total">\n      <div id="bill-summary"></div>\n      <div id="bill-message"></div>\n      <div class="learn-more">\n        <a href="https://cloudant.com/pricing/">Learn about Cloudant pricing</a>\n      </div>\n  </div>\n  \n';return __p},this.JST["app/addons/account/templates/billbreakdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<p>\n	"+(null==(__t=count)?"":__t)+" "+(null==(__t=label)?"":__t)+" so far this month @\n	"+(null==(__t=costString)?"":__t)+" = $"+(null==(__t=cost)?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/account/templates/billmessage.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)user.underThirty()?__p+='\n<div class="alert alert-info">\n	<p>Lucky you! Your first 30 days are free. We won\'t start charging you for usage until '+(null==(__t=endDate)?"":__t)+'. <a href="#account/payment">Add a credit card.</a></p> \n</div>\n':freeUsage?__p+='\n<div class="alert alert-info">\n		We\'ll not charge you for this month if your usage remains below\n		$'+(null==(__t=chargingThreshold)?"":__t)+".\n</div>\n":(__p+='\n	<div class="alert">\n		Your usage this month has exceeded $5. At the end of this billing period (end of the month), we will charge you for your usage. 	',onFile||(__p+='<a href="#account/payment">Add a credit card.</a>'),__p+=" \n	</div>\n"),__p+="\n";return __p},this.JST["app/addons/account/templates/billsummary.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<div>\nFor period ending <strong>"+(null==(__t=bill_date)?"":__t)+'</strong>\n  <span class="cost green"><span class="super">$</span>'+(null==(__t=total)?"":__t)+"</span>\n</div>\n";return __p},this.JST["app/addons/account/templates/forgotpassword.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n  <h2>Forgot Password</h2>\n</header>\n<form class="form-horizontal" id="passwordForm">\n  <div class="control-group">\n    <label for="username" class="control-label">Username</label>\n    <div class="controls">\n      <input type="username" id="username" tabindex="1" name="username">\n    </div>\n  </div>\n  <div class="form-actions">\n    <button class="button green">Send me my password</button>\n  </div>\n</form>\n\n\n';return __p},this.JST["app/addons/account/templates/locationinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<header>\n  <h2>Choose a location of your data</h2>\n  <p>Select a new location for your data, and click submit. Note that data moves are asynchronous—you won\'t experience any downtime, but it may take some time for changes to propagate. We will email you when the operation is complete.</p>\n</header>\n<form class="form-horizontal" id="locationForm">\n  <div class="control-group">\n    <h4>US East</h4>\n    ',_.each(east,function(a){__p+='\n      <label class="radio">\n        <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n        <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n      </label> \n    "}),__p+="\n\n    <h4>US Midwest</h4>\n    ",_.each(midwest,function(a){__p+='\n      <label class="radio">\n        <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n        <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n      </label> \n    "}),__p+="\n\n    <h4>US West</h4>\n    ",_.each(west,function(a){__p+='\n      <label class="radio">\n        <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n        <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n      </label> \n    "}),__p+="\n\n    <h4>Europe</h4>\n    ",_.each(europe,function(a){__p+='\n      <label class="radio">\n        <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n        <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n      </label> \n    "}),__p+="\n\n    <h4>Southeast Asia</h4>\n    ",_.each(asia,function(a){__p+='\n      <label class="radio">\n        <input type="radio" name="cluster" value="'+(null==(__t=a.get("id"))?"":__t)+'" ',location===a.get("id")&&(__p+=' checked="" '),__p+=" >\n        <strong>"+(null==(__t=a.get("cluster"))?"":__t)+"</strong>—"+(null==(__t=a.get("host"))?"":__t)+"\n      </label> \n    "}),__p+='\n  </div>\n  <div class="form-actions">\n    <button class="button green">Save changes</button>\n  </div>\n</form>\n';return __p},this.JST["app/addons/account/templates/newuser.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<div class="alert alert-block">\n<p class="new-user">Hi '+(null==(__t=user.get("username"))?"":__t)+", we haven't yet taken a snapshot of your usage, so we don't yet have usage to report to you. We'll be able to show you your usage within the hour.</p>\n<p>Learn about <a href=\"https://cloudant.com/pricing\">Cloudant pricing</a>.</p>\n</div>\n";return __p},this.JST["app/addons/account/templates/passwordinfo.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n  <h2>Password</h2>\n  <p>Change your password.</p>\n</header>\n<form id="passwordForm">\n  <div class="controls controls-row">\n    <label for="password">Current password</label>\n    <input type="password" id="password" tabindex="1" name="old_password">\n  </div>\n  <hr>\n  <div class="controls controls-row">\n    <label for="new-password">New password</label>\n    <input type="password" id="new-password" name="password" tabindex="2" >\n    <span class="help-block"></span>\n  </div>\n  <div class="controls controls-row">\n    <label for="new-password-confirm">Confirm new password</label>\n    <input type="password" id="new-password-confirm" name="new_password-confirm" tabindex="3">\n    <span class="help-block"></span>\n  </div>\n  <div class="form-actions">\n    <button class="button green" type="submit" disabled tabindex="4">Save changes</button>\n  </div>\n</form>\n\n\n';return __p},this.JST["app/addons/account/templates/paymentinfo.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n  <h2>Credit Card</h2>\n	",__p+=onFile?"\n		<p>Here's the credit card we have on file:</p>\n		\n		<p class='card-type'>Payment Type: <span >"+(null==(__t=type)?"":__t)+" •••• •••• •••• "+(null==(__t=last4)?"":__t)+'</span>\n		</p>\n\n		<button href="#" class="button blue toggleForm icon-credit-card">Update your credit card</button>\n	':'\n		<p>Cloudant accepts American Express, Discover, MasterCard and Visa. <a href="https://cloudant.com/pricing/">Billing FAQs</a></p> \n	',__p+='\n</header>\n\n\n<form id="billing-form" class="',onFile&&(__p+="hide"),__p+='">\n	<span class="cards"></span>\n	<div class="controls controls-row">\n		<label for="creditname">Name on card</label>\n		<input type="text" name="creditname" id="creditname"  class="span6" tabindex="1"/>\n	</div>\n	<div class="controls controls-row">\n		<label for="credit">Card number</label>\n		<input type="text" placeholder="Credit card number" name="credit" id="credit" class="span4" tabindex="2"/>\n	</div>\n	<div class="controls controls-row">\n		<div class="span3 expiresRow">\n			<label for="month">Expires</label>\n			<input type="text" placeholder="MM" name="month" id="month" class="span1" tabindex="3"/>\n			<input type="text" placeholder="YYYY" name="year" id="year" class="span2" tabindex="4"/>\n		</div>\n		<div class="span2 cvcRow">\n			<label for="cvc">Card code</label>\n			<input type="text" placeholder="CVC" name="cvc" id="cvc" class="span1" tabindex="5"/>\n		</div>\n\n	</div>\n\n\n	<div class="form-actions">\n		<button class="button green" type="submit" disabled="true"  tabindex="6">Save</button>\n		<button type="button" class="button cancel-button outlineGray"  tabindex="7">Cancel</button>\n	</div>\n</form>\n';return __p},this.JST["app/addons/account/templates/plot.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+="<svg style='width:500px; height:270px;' />\n";return __p},this.JST["app/addons/account/templates/sidebartabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<header>\n  <h4>Account Name</h4> \n  <h1>"+(null==(__t=username)?"":__t)+'</h1>\n</header>\n\n<ul class="nav nav-tabs nav-stacked">\n  <li class="active">\n  <a data-type-select="announcements" href="#account/announcements">\n    <span class="icon-bullhorn"></span>\n    Announcements\n  </a>\n  </li>\n  <li>\n  <a data-type-select="usage" href="#account/usage">\n    <span class="cloudant-dashboard"></span>\n    Usage\n  </a>\n  </li>\n  <li>\n  <a data-type-select="info" href="#account/info">\n    <span class="cloudant-profile"></span>\n    Profile\n  </a>\n  </li>\n  <li>\n  <a data-type-select="password" href="#account/password">\n    <span class="icon-lock"></span>\n    Password\n  </a>\n  </li>\n  <li>\n  <a data-type-select="payment" href="#account/payment">\n    <span class="icon-credit-card"></span>\n    Credit Card\n  </a>\n  </li>\n  <li>\n  <a data-type-select="data-location" href="#account/data-location">\n    <span class="icon-map-marker"></span>\n    Location for your data\n  </a>\n  </li>\n  <li>\n  <a data-type-select="virtual-hosts" href="#account/virtual-hosts">\n    <span class="icon-sitemap"></span>\n    Virtual Hosts\n  </a>\n  </li>\n</ul>\n';return __p},this.JST["app/addons/account/templates/supportinfo.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header>\n  <h2>Support level</h2>\n  <p>Select the support level that best meets your needs. Changes to your support level must be confirmed via email. <a href="https://cloudant.com/for-developers/faq/account/" target="_blank">Learn more about support and billing</a>.</p>\n</header>\n<form class="form-horizontal " id="supportForm">\n  <div class="control-group">\n    <label class="control-label">I\'d like my support level to be...</label>\n    <div class="controls">\n      <label class="radio">\n        <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked="checked">\n        <strong>Silver</strong>—this is great and you get it by default at no additional cost.\n      </label>\n      <label class="radio">\n        <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">\n        <strong>Gold</strong>—this is for customers who want x, y and z and it\'s an additional <strong>$N/mo</strong>.\n      </label>\n    </div>\n  </div>\n  <div class="form-actions">\n    <button class="button green">Save changes</button>\n  </div>\n</form>\n';return __p},this.JST["app/addons/account/templates/usage.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+=error?'\n<div id="heavy-tab" class="tab-pane active">\n  Sorry, something has gone wrong. :(\n</div>\n<div id="light-tab" class="tab-pane">\n    Sorry, something has gone wrong. :(\n</div>\n<div id="data-tab" class="tab-pane">\n    Sorry, something has gone wrong. :(\n</div>\n':'\n\n  <div id="heavy-tab" class="tab-pane active">\n    <p>Heavy HTTP requests are more processing-intensive than light HTTP requests.</p>\n    <div id="heavy" class="graph"></div>\n    <div id="heavy-breakdown"></div>\n  </div>\n  <div id="light-tab" class="tab-pane">\n    <p>Light HTTP requests require less processing than heavy HTTP requests.</p>\n    <div id="light" class="graph"></div>\n		<div id="light-breakdown"></div>\n  </div>\n  <div id="data-tab" class="tab-pane">\n    <p>The data volume of your DB, search and view indexes so far this month.</p>\n    <div id="data" class="graph"></div>\n		<div id="data-breakdown"></div>\n    <p>Storing 1GB for a month costs $1. Your data cost is calculated pro rata, based on hourly snapshots of the data in your account.</p>\n  </div>\n\n',__p+="\n\n";return __p},this.JST["app/addons/account/templates/virtualhostitem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<a class="span3 hostname" href="'+(null==(__t=hostname)?"":__t)+'"> '+(null==(__t=hostname)?"":__t)+' </a> <span class="span5 path">→ '+(null==(__t=userurl)?"":__t)+' </span> \n\n<button class="button delete-vhost red" tabindex="3" value="Create">Delete</button>\n\n\n';return __p},this.JST["app/addons/account/templates/virtualhosts.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<header>\n  <h2>Add Virtual Hosts</h2>\n  <p>Virtual hosts allow you to map your own domain to a Cloudant server, or to a specific path within it. Once you’ve added a hostname here, update your DNS record to point to <strong>"+(null==(__t=userurl)?"":__t)+'</strong> using CNAME.</p>\n</header>\n<form class="form-horizontal" id="virtualhostsForm">\n  <div class="control-group">\n    <input type="text" id="hostname" class="input-large" tabindex="1" name="vhostname" placeholder="Hostname">\n    →\n    <div class="input-prepend">\n      <span class="add-on"> '+(null==(__t=userurl)?"":__t)+'/ </span>\n      <input type="text" id="path" class="input-medium" tabindex="2" placeholder="Path (optional)">\n    </div>\n    <button class="button green" type="submit" tabindex="3" value="Create">Add</button>\n  </div>\n</form>\n\n<section id="yourVirtualHosts">\n\n</section>\n\n';
+return __p},this.JST["app/addons/activetasks/templates/detail.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="progress progress-striped active">\n  <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n</div>\n<p>\n	"+(null==(__t=model.get("type").replace("_"," "))?"":__t)+" on\n	"+(null==(__t=model.get("node"))?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/activetasks/templates/table.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===collection.length?"\n   <tr> \n    <td>\n      <p>No tasks.</p>\n    </td>\n  </tr>\n":'\n\n  <thead>\n    <tr>\n      <th data-type="type">Type</th>\n      <th data-type="node">Object</th>\n      <th data-type="started_on">Started on</th>\n      <th data-type="updated_on">Last updated on</th>\n      <th data-type="pid">PID</th>\n      <th data-type="progress" width="200">Status</th>\n    </tr>\n  </thead>\n\n  <tbody id="tasks_go_here">\n\n  </tbody>\n\n',__p+="\n";return __p},this.JST["app/addons/activetasks/templates/tabledetail.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<td>\n  '+(null==(__t=model.get("type"))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=objectField)?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=formatDate(model.get("started_on")))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=formatDate(model.get("updated_on")))?"":__t)+"\n</td>\n<td>\n  "+(null==(__t=model.get("pid"))?"":__t)+'\n</td>\n<td>\n	<div class="progress progress-striped active">\n	  <div class="bar" style="width: '+(null==(__t=model.get("progress"))?"":__t)+'%;">'+(null==(__t=model.get("progress"))?"":__t)+"%</div>\n\n	</div>\n	<p>"+(null==(__t=progress)?"":__t)+" </p>\n</td>\n";return __p},this.JST["app/addons/activetasks/templates/tabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj){__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n\n\n\n<div id="sidenav">\n  <header class="row-fluid">\n    <h3>Filter by: </h3>\n  </header>\n\n  <nav>\n		<ul class="task-tabs nav nav-list">\n		  ';for(var filter in filters)__p+='\n		      <li data-type="'+(null==(__t=filter)?"":__t)+'">\n			      <a>\n			      		'+(null==(__t=filters[filter])?"":__t)+"\n			      </a>\n		    </li>\n		  ";__p+='\n		</ul>\n		<ul class="nav nav-list views">\n			<li class="nav-header">Polling interval</li>\n			<li>\n				<input id="pollingRange" type="range"\n				       min="1"\n				       max="30"\n				       step="1"\n				       value="5"/>\n				<label for="pollingRange"><span>5</span> second(s)</label>\n			</li>\n		</ul>\n  </nav>\n</div>\n'}return __p},this.JST["app/addons/auth/templates/change_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n  <h2> Change Password </h2>\n  <form id="change-password">\n    <p class="help-block">\n    Enter your new password.\n    </p>\n    <input id="password" type="password" name="password" placeholder= "New Password:" size="24">\n    <br/>\n    <input id="password-confirm" type="password" name="password_confirm" placeholder= "Verify New Password" size="24">\n    <button type="submit" class="btn btn-primary">Change</button>\n  </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/create_admin.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="span12">\n  <h2> Add Admin </h2>\n  <form id="create-admin-form">\n    <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n    <br/>\n    <input id="password" type="password" name="password" placeholder= "Password" size="24">\n    <p class="help-block">\n    Before a server admin is configured, all clients have admin privileges.\n    This is fine when HTTP access is restricted \n    to trusted users. <strong>If end-users will be accessing this CouchDB, you must\n      create an admin account to prevent accidental (or malicious) data loss.</strong>\n    </p>\n    <p class="help-block">Server admins can create and destroy databases, install \n    and update _design documents, run the test suite, and edit all aspects of CouchDB \n    configuration.\n    </p>\n    <p class="help-block">Non-admin users have read and write access to all databases, which\n    are controlled by validation functions. CouchDB can be configured to block all\n    access to anonymous users.\n    </p>\n    <button type="submit" href="#" id="create-admin" class="btn btn-primary">Create Admin</button>\n  </form>\n</div>\n';return __p},this.JST["app/addons/auth/templates/login.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="span12">\n  <form id="login">\n    <p class="help-block">\n      Login to CouchDB with your name and password.\n    </p>\n    <input id="username" type="text" name="name" placeholder= "Username:" size="24">\n    <br/>\n    <input id="password" type="password" name="password" placeholder= "Password" size="24">\n    <br/>\n    <button id="submit" class="btn" type="submit"> Login </button>\n  </form>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_dropdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sidenav">\n<header class="row-fluid">\n  <h3> '+(null==(__t=user.name)?"":__t)+' </h3>\n</header>\n<nav>\n<ul class="nav nav-list">\n  <li class="active" ><a data-select="change-password" id="user-change-password" href="#changePassword"> Change Password </a></li>\n  <li ><a data-select="add-admin" href="#addAdmin"> Create Admins </a></li>\n</ul>\n</nav>\n</div>\n\n';return __p},this.JST["app/addons/auth/templates/nav_link_title.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n',__p+=admin_party?'\n  <a id="user-create-admin" href="#createAdmin"> \n  	<span class="fonticon-user fonticon"></span>\n  	Admin Party! \n  </a>\n':user?'\n  <a  href="#changePassword" >\n  	<span class="fonticon-user fonticon"></span> \n  	'+(null==(__t=user.name)?"":__t)+" \n	</a>\n":'\n  <a  href="#login" >  \n  	<span class="fonticon-user fonticon"></span> \n  	Login \n  </a>\n',__p+="\n\n\n";return __p},this.JST["app/addons/auth/templates/noAccess.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n\n<div class="span12">\n  <h2> Access Denied </h2>\n  <p> You do not have permission to view this page. <br/> You might need to <a href="#login"> login </a> to view this page/ </p>\n  \n</div>\n';return __p},this.JST["app/addons/cloudantauth/templates/forgot_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="brand">\n  <svg width="347" height="80">\n      <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png"  width="347" height="80"/>\n  </svg>\n</div>\n\n<form id="forgot">\n  <p>\n    <label for="user_login">Forgot your Password?<br></label>\n      <input id="username" type="text" name="name" placeholder="Enter your username" size="24">\n  </p>\n  <button id="submit" class="button btn-large blue" type="submit">Reset your password</button>\n</form>\n';return __p},this.JST["app/addons/cloudantauth/templates/login.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<div class="brand">\n  <svg width="347" height="80">\n      <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png"  width="347" height="80"/>\n  </svg>\n</div>\n\n<form id="login">\n  <p>\n    <label for="user_login">Username<br></label>\n      <input id="username" type="text" name="name" value="'+(null==(__t=username)?"":__t)+'" disabled size="24">\n  </p>\n  <p>\n    <label for="user_pass">Password<br></label>\n    <input id="password" type="password" name="password" placeholder= "Password" size="24">\n  </p>\n  <button id="submit" class="button btn-large blue" type="submit"> Sign in </button>\n  <a href="#forgot">Forgot Password?</a>\n</form>\n';return __p},this.JST["app/addons/cloudantauth/templates/login_pane.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<div id="login">\n	<div id="login-wrapper"></div>\n</div>\n';return __p},this.JST["app/addons/cloudantauth/templates/nav_dropdown.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+="<!-- dropdown menu links -->\n  ",__p+=user?'\n  <li> <a id="user-change-password" href="#"> Change Password </a> </li>\n  <li> <a id="user-logout" href="#"> Logout </a> </li> \n  ':'\n  <li> <a id="user-login" href="#"> Login </a> </li> \n  ',__p+="\n\n";return __p},this.JST["app/addons/cloudantauth/templates/reset_password.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<div class="brand">\n  <svg width="347" height="80">\n      <image xlink:href="/dashboard.assets/img/logo-blue.svg" src="/dashboard.assets/img/logo-blue.png"  width="347" height="80"/>\n  </svg>\n</div>\n',""!==token?(__p+='\n<form id="reset">\n  <p>\n    <label for="user_login">Choose a new password: <br></label>\n    <input id="username" type="text" name="username" placeholder="Enter your username" size="24">\n    <input id="password" type="password" name="password" placeholder="Enter a new password" size="24">\n    <input id="password_confirm" type="password" name="password_confirm" placeholder="Confirm password" size="24">\n    <input id="token" type="hidden" name="token" value="',__p+='">\n  </p>\n  <button id="submit" class="button btn-large blue" type="submit">Reset your password</button>\n</form>\n'):__p+='\n  <div class="alert alert-warning">\n  	<Strong>Missing token!</strong> Check your email, or try to <a href="#forgot">reset</a> again.\n  </div>\n',__p+="\n";return __p},this.JST["app/addons/cloudantdatabases/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td>\n  <a href="'+(null==(__t=database.url("web-index"))?"":__t)+'">'+(null==(__t=database.get("name"))?"":__t)+" </a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n  <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/new/'+(null==(__t=database.get("name"))?"":__t)+'"></a>\n  <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=database.get("name"))?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/layout.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<ul class="nav nav-tabs shared-tabs">\n  <li class="'+(null==(__t=isActive("your-database"))?"":__t)+'"><a href="#your-database" data-toggle="tab" class="fonticon-user">Your Databases</a></li>\n  <li class="'+(null==(__t=isActive("shared-database"))?"":__t)+'"><a href="#shared-database" data-toggle="tab" class="fonticon-users">Shared Databases</a></li>\n</ul>\n<div class="tab-content dashboard-tab-content">\n  <div class="tab-pane '+(null==(__t=isActive("your-database"))?"":__t)+'" id="your-database"></div>\n  <div class="tab-pane '+(null==(__t=isActive("shared-database"))?"":__t)+'" id="shared-database"></div>\n</div>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/list.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="result-tools">\n  <div id="newButton" class="pull-left"></div>\n  <form id="jump-to-db" class="navbar-form pull-right input-append database-search">\n    <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name"></input>\n    <button class="fonticon-search btn button red " type="submit"></button>\n  </form>\n</div>\n<table class="databases table table-striped">\n  <thead>\n    <th>Name</th>\n    <th>Size</th>\n    <th># of Docs</th>\n    <th>Update Seq</th>\n    <th>Actions</th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n<div id="database-pagination"></div>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/shared_dbs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<p class="alert alert-info">\n<strong>Coming soon.</strong> \nTo access your shared databases, <a href="https://cloudant.com/dashboard">visit the old dashboard</a>. (If you\'re signed out there, you will have to sign in again.)</p>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/shared_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td>\n  <a href="'+(null==(__t=database.url("web-index"))?"":__t)+'" target="_blank">'+(null==(__t=database.get("name"))?"":__t)+" </a>\n</td>\n<td>"+(null==(__t=database.status.humanSize())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.numDocs())?"":__t)+"</td>\n<td>"+(null==(__t=database.status.updateSeq())?"":__t)+'</td>\n<td>\n  <a class="db-actions btn fonticon-replicate set-replication-start" title="Replicate '+(null==(__t=database.get("name"))?"":__t)+'" href="#/replication/'+(null==(__t=database.get("name"))?"":__t)+'"></a>\n  <a class="db-actions btn icon-lock set-permissions" title="Set permissions for '+(null==(__t=database.get("name"))?"":__t)+'" href="#/database/'+(null==(__t=database.get("name"))?"":__t)+'/permissions"></a>\n</td>\n';return __p},this.JST["app/addons/cloudantdatabases/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<div class="row-fluid">\n<a class="btn new" id="new"><i class="icon-plus"></i> New database</a>\n</div>\n<hr>\n<ul class="nav nav-list">\n  <!-- <li class="nav-header">Database types</li> -->\n  <li class="active"><a class="toggle-view" id="owned">Your databases</a></li>\n</ul>\n<hr>';return __p},this.JST["app/addons/cloudantdocuments/templates/api_generation.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<h2> API Keys </h2>\n<p> API keys are credentials for programmatic access to databases you choose. \nYou can manage permissions and share databases just like you would with regular Cloudant users.\n</p>\n<a id="generate-api" class="button green"> Generate API key </a>\n<div id="result">\n  <div id="alert-api" style="display:none" class="alert alert-block">\n    <h4>Generating API key!</h4>\n    Cloudant is currently generating your api key.\n  </div>\n  <div id="key-info" style="display:none">\n    <dl>\n      <dt>Key</dt>\n      <dd id="key"></dd>\n      <dt>Password</dt>\n      <dd id="password"></dd>\n    </dl>\n    \n    <div id="alert-api" class="alert alert-block">\n      Please make a note of the password now. For security reasons, we will not store it for you to retrieve in the future.\n  </div>\n\n  </div>\n  \n\n</div>\n';return __p},this.JST["app/addons/cloudantdocuments/templates/permission_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)_.each(roles,function(a){__p+="\n<td>\n  <input ","_admin"===a&&(__p+=' class="admin" '),__p+=' data-role="'+(null==(__t=a)?"":__t)+'"  type="checkbox" ',user[a]&&(__p+=' checked="checked" '),__p+=" > </input> \n</td>\n"}),__p+='\n<td data-name="'+(null==(__t=user.name)?"":__t)+'"> '+(null==(__t=username)?"":__t)+'\n </td>\n <td class="td-hover-show">\n 	',"nobody"!==user.name&&(__p+='\n   <span class="delete-user hover-show cloudant-x fonticon"></span>\n  '),__p+="\n </td>\n";return __p},this.JST["app/addons/cloudantdocuments/templates/permissions.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<p> Cloudant users and API keys with permissions on this database. </p>\n<table class="permissions-table table">\n  <thead>\n    <tr>\n      ',_.each(roles,function(a){__p+="\n      <th> "+(null==(__t=_.values(a)[0])?"":__t)+" </th>\n      "}),__p+='\n      <th class="names"> </th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody id="userRoles">\n  <tr>\n    ',_.each(roles,function(a){__p+='\n    <td><input data-role="'+(null==(__t=_.keys(a)[0])?"":__t)+'" type="checkbox" disabled checked="checked"> </input> </td>\n    '}),__p+='\n    <td data-name="'+(null==(__t=username)?"":__t)+'" > '+(null==(__t=username)?"":__t)+" </td>\n  </tr>\n  </tbody>\n</table>\n\n",showNonLoggedInUsers&&(__p+='\n<h3> Virtual Hosts </h3>\n<p> Permissions for this database when accessing it from another domain. </p>\n<table class="permissions-table table">\n  <thead>\n    <tr>\n      ',_.each(roles,function(a){__p+="\n      <th> "+(null==(__t=_.values(a)[0])?"":__t)+" </th>\n      "}),__p+='\n      <th class="names"> </th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody id="nonLoggedInuserRoles">\n  </tbody>\n</table>\n'),__p+="\n";return __p},this.JST["app/addons/cloudantdocuments/templates/permissions_layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="span8">\n  <div id="permissions"></div>\n  <h3> Share Database </h3>\n  <form id="form-grant-rights" class="form form-inline form-search">\n    <input type="text" class="input-medium" placeholder=\'Username or API key\'>\n    <button class="button blue btn-small" type="submit"> Grant rights </button>\n  </form>\n</div>\n<div id="api" class="span3 offset1">\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/active.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n	<a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n		'+(null==(__t=docid)?"":__t)+"\n	</a>\n</td>\n\n<td>\n	"+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n	"+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n	<span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n			"+(null==(__t=continuous)?"":__t)+'\n	</span>\n</td>\n\n\n<td>\n	<div class="progress progress-striped active">\n	  <div class="bar" style="width: '+(null==(__t=progress||0)?"":__t)+'%;">'+(null==(__t=progress||"0")?"":__t)+'%</div>\n	</div>\n</td>\n\n<td>\n	<button class="cancel button red fonticon-circle-x delete" data-source="'+(null==(__t=source)?"":__t)+'"  data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Cancel</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/complete.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n	<a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n		'+(null==(__t=docid)?"":__t)+"\n	</a>\n</td>\n\n<td>\n	"+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n	"+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n	<span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n			"+(null==(__t=continuous)?"":__t)+'\n	</span>\n</td>\n\n\n<td>\n	<span class="green fonticon-check">\n		'+(null==(__t=status)?"":__t)+'\n	</span>\n</td>\n\n<td>\n	<button class="retry button green fonticon-replicate " data-source="'+(null==(__t=source)?"":__t)+'"  data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Again?</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/error.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<td>\n	<a href="#database/_replicator/'+(null==(__t=docid)?"":__t)+'">\n		'+(null==(__t=docid)?"":__t)+"\n	</a>\n</td>\n\n<td>\n	"+(null==(__t=source)?"":__t)+"\n</td> \n\n<td>\n	"+(null==(__t=target)?"":__t)+"\n</td>\n\n<td>\n	<span class='",continuous&&(__p+="icon-refresh "),__p+="'>\n			"+(null==(__t=continuous)?"":__t)+'\n	</span>\n</td>\n\n\n<td>\n	<button class="validate button red fonticon-x " data-source="'+(null==(__t=source)?"":__t)+'"  data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Find Errors</a>\n</td>\n\n<td>\n	<button class=" button green fonticon-replicate retry" data-source="'+(null==(__t=source)?"":__t)+'"  data-doc-id="'+(null==(__t=docid)?"":__t)+'" data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Retry</a>\n</td>\n';return __p},this.JST["app/addons/cloudantreplication/templates/form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<form id="replication" class="form-horizontal">\n	<div class="control-group" id="step4">\n		<label class="control-label">_id <br>\n			<small>(optional)</small>\n		</label>\n		<div class="source controls">\n			<input type="text" id="repID" name="_id" size="30" value="" data-validation="optional" placeholder="e.g. my_rep">\n		</div>\n	</div>\n	<!-- SOURCE -->\n	<div class="control-group" >\n		<label class="control-label">SOURCE DATABASE:</label>\n		<div class="source controls">\n			<div id="source_form"></div>\n		</div>\n\n	</div>\n\n	<div class="control-group">\n		<label class="control-label">TARGET DATABASE:</label>\n		<div class="target controls">\n			<div class="btn-group toggle-btns" id="create_target">\n\n				<label for="existing-target" class="btn active">\n					Existing Database  \n				</label>\n				\n				<label for="new-target" class="btn">\n					New Database\n				</label>\n\n				<input type="radio" id="existing-target" name="create_target" class="next" checked="checked" value="false">\n				<input type="radio" id="new-target" name="create_target" class="next" value="true">\n	\n			</div>\n		</div>\n	</div>\n\n	<!--TARGET-->\n	<div class="control-group">\n		<div class="target controls">\n			<div id="target_form"></div>\n			<label for="continuous">\n				<input type="checkbox" name="continuous" value="true" id="continuous">\n				Make this replication continuous.\n			</label>\n		</div>\n	</div>\n\n	<div class="control-group">\n		<div class="actions target controls">\n			<button class="button green save btn-large fonticon-replicate" type="submit" >Replicate</button>\n		</div>\n	</div>\n\n</form>\n\n<div class="password_modal"></div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/localremotetabs.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='\n<ul class="nav nav-tabs" id="'+(null==(__t=type)?"":__t)+'Tabs">\n  <li class="active">\n  	<a href="#" class="btn local-btn" data-bypass="true" data-tab="'+(null==(__t=type)?"":__t)+'_local">\n  		',__p+=newDB?"Create a new database locally ":" My Databases ",__p+='\n  	</a>\n  </li>\n  <li>\n  	<a  href="#" class="btn remote-btn" data-bypass="true" data-tab="'+(null==(__t=type)?"":__t)+'_remote">\n  		',__p+=newDB?"Create a new remote database ":" Remote Database ",__p+='\n  	</a>\n  </li>\n</ul>\n\n<div class="tab-content small-tabs">\n	<div class="tab-pane active" id="'+(null==(__t=type)?"":__t)+'_local">\n		<input type="text" id="to_name" name="'+(null==(__t=type)?"":__t)+'" autofocus size="30" placeholder="',__p+=newDB?"Name your database":"Start typing to select a "+(null==(__t=type)?"":__t)+" database",__p+='" class="',newDB||(__p+="auto"),__p+='">\n	</div>\n\n	<div class="tab-pane" id="'+(null==(__t=type)?"":__t)+'_remote">\n		<input type="text" id="'+(null==(__t=type)?"":__t)+'_url" name="'+(null==(__t=type)?"":__t)+'" size="30" class="next" placeholder="http://" >\n		<small>e.g. http://username:password@cloudant.com/database</small>\n	</div>\n</div>\n\n<div id="options-here"></div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/nope.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<td colspan="5">\nYou have no '+(null==(__t=type)?"":__t)+" replications\n</td>\n\n";return __p},this.JST["app/addons/cloudantreplication/templates/options.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='\n<span class="options off">Advanced Options</span>\n<div class="advancedOptions hide">\n	<h4>Apply filters</h4>\n	<p>Sometimes you don\'t want to transfer all documents from source to target. You can include one or more filter functions in a design document on the source and then tell the replicator to use them.</p>\n	<label for="filter">Enter the design doc and filter name</label>\n	<input type="text" placeholder="myddoc/myfilter" name="filter" id="filter"/>\n	<label for="query">Add query parameters (optional)</label>\n	<input type="text" placeholder=\'{"key":"value"}\' name="query_params" id="query"/>\n\n	<hr>\n	<h4>Named Document Replication</h4>\n	<p>Sometimes you only want to replicate some documents. For this simple case you do not need to write a filter function. Simply add the list of keys, separated by commas.</p>\n	<input type="text" placeholder="foo, bar, baz" name="doc_ids" id="doc_ids"/>\n\n	<hr>\n	<h4>Replicate through a proxy</h4>\n	<p>Pass a "proxy" argument in the replication data to have replication go through an HTTP proxy</p>\n	<input type="text" placeholder="http://localhost:8888" name="proxy" id="proxy"/>\n\n</div>\n\n';return __p},this.JST["app/addons/cloudantreplication/templates/password_modal.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div class="modal-header">\n  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n  <h3>Password: </h3>\n</div>\n<div class="modal-body">\n  <p>Replication requires authentication.</p>\n\n    <input name="password" type="password" placeholder="Enter your Cloudant password"/>\n\n</div>\n<div class="modal-footer">\n  <a class="button green continue-button" data-bypass="true">Continue Replication</a>\n  <a data-dismiss="modal" class="button cancel-button outlineGray" data-bypass="true"> Cancel</a>\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/sidebar_no_header.html"]=function(obj){obj||(obj={});
+{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid supportDash">\n  <div class="with-sidebar content-area">\n    <div id="sidebar-content" class="sidebar"></div>\n    <div id="dashboard-content" class="list window-resizeable"></div>\n  </div>\n</div>\n';return __p},this.JST["app/addons/cloudantreplication/templates/sidebartabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header class="support-sidebar replication-sidebar">\n	<a data-type-select="new" href="#replication/new" id="case-button" class="button blue round-btn cloudant-circle-plus"> \n			New Replication\n	</a>\n</header>\n\n\n <ul class="nav nav-tabs nav-stacked replication-nav-stacked">\n	<li>\n		<a data-type-select="active" href="#replication/active">Active Replications</a>\n	</li>\n	<li>\n		<a data-type-select="errors" href="#replication/errors">Errors</a>\n	</li>\n	<li>\n		<a data-type-select="complete" href="#replication/complete">Completed Replications</a>\n	</li>\n</ul>\n';return __p},this.JST["app/addons/cloudantreplication/templates/statustable.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='  <thead>\n  	<th>Doc ID</th>\n    <th>Source</th>\n    <th>Target</th>\n    <th>Continuous?</th>\n    <th>Status</th>\n    <th>Actions</th>\n  </thead>\n  <tbody id="replication-status">\n  </tbody>\n';return __p},this.JST["app/addons/cloudantreplication/templates/validator.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+='<td colspan="6">\n	<button class="close">&times;</button>\n	<p>Here are the basic issues that might have occurred. If your replication passes this test, look at it in the docs for other issues or contact us.</p>\n	<dl class="dl-horizontal replication-validator">\n\n		<dt>Does your replication have a Source?</dt>  \n		<dd class="validate-source">\n			',__p+=source?' \n				<span class="fonticon-circle-check green">YES</span> \n			':' \n				<span class="fonticon-x red">NO</span>\n			',__p+="\n		</dd>\n\n		",model.isURL("source")||(__p+='\n			<dt>Is your source a full url?</dt>\n			<dd class="validate-target">\n					<span class="fonticon-x red"></span>\n					When passing in source and target the reference must be a full URL.  e.g:  <code>http://username.cloudant.com/dbname</code>\n			</dd>\n		'),__p+='\n\n		<dt>Does your replication have a Target?</dt>\n		<dd class="validate-target">\n			',__p+=target?' \n				<span class="fonticon-circle-check green">YES</span> \n			':' \n				<span class="fonticon-x red">NO</span>\n			',__p+="\n		</dd>\n\n\n\n		",model.isURL("target")||(__p+='\n			<dt>Is your target a full url?</dt>\n			<dd class="validate-target">\n					<span class="fonticon-x red"></span>\n					When passing in source and target the reference must be a full URL.  e.g:  <code>http://username.cloudant.com/dbname</code>\n			</dd>\n		'),__p+="\n\n		",__p+="\n\n		",__p+='\n\n		<dt>Does your replication have a user_ctx?</dt>\n		<dd class="validate-user">\n			',__p+=user_ctx?' \n				<span class="fonticon-circle-check green">YES</span> \n			':' \n				<span class="fonticon-x red">NO</span>\n				The user_ctx property is mandatory for cloudant. It is provided by default when submitting a replication in the client. \n				Example: \n				<pre>\n				{\n				  "_id": "my_rep",\n				  "source":  "http://bserver.com:5984/foo",\n				  "target":  "bar",\n				  "continuous":  true,\n				  "user_ctx": {\n				      "name": "joe",\n				      "roles": ["erlanger", "researcher"]\n				  }\n				}\n				</pre>\n			',__p+='\n		</dd>\n\n	</dl>\n\n	<p>If everything passed, here are additional things to check: </p>\n	<dl class="dl-horizontal replication-validator">\n		<dt>Have you authenticated?</dt>\n		<dd><p>In order to access target and source databases, you must authenticate with the proper username &amp; password.  You can authenticate in the database url, e.g. <code>http://username:password@username.cloudant.com/foo</code></p>\n\n\n		<p>Or when posting to _replicator, include headers if you wish to encrypt your passwords. </p>\n<pre>\n{\n	//...\n	source: {\n		url: "http://username.cloudant.com/foo",\n		headers: {\n			"Authorization": "BASIC dXNlcm5hbWU6cGFzc3dvcmQ="\n		}\n	}\n}\n</pre>\n		</dd>\n\n		<dt>Make sure remote databases exist: </dt>\n		<dd>Replicating from a database that isn\'t hosted under this account? Make sure that the database exists.</dd>\n\n\n\n	</dl>\n\n\n\n</td>\n';return __p},this.JST["app/addons/compaction/templates/compact_view.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\nCompact View\n';return __p},this.JST["app/addons/compaction/templates/layout.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<div class="row">\n  <div class="span12 compaction-option">\n    <h3> Compact Database </h3>\n    <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>\n    <button id="compact-db" class="btn btn-large btn-primary"> Run </button>\n  </div>\n</div>\n\n<div class="row">\n  <div class="span12 compaction-option">\n    <h3> Cleanup Views </h3>\n    <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>\n    <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>\n  </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/dashboard.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row">\n  <div class="span2 offset10">\n    <button id="add-section" href="#" class="button button-margin">\n      <i class="icon-plus icon-white"> </i>\n      Add Section\n    </button>\n  </div>\n</div>\n<table class="config table table-striped table-bordered">\n  <thead>\n    <th id="config-section"> Section </th>\n    <th id="config-option"> Option </th>\n    <th id="config-value"> Value </th>\n    <th id="config-trash"></th>\n  </thead>\n  <tbody>\n  </tbody>\n</table>\n<div id="add-section-modal" class="modal hide fade">\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Create Config Option</h3>\n  </div>\n  <div class="modal-body">\n    <form id="add-section-form" class="form well">\n      <label>Section</label>\n      <input type="text" name="section" placeholder="Section">\n      <span class="help-block">Enter an existing section name to add to it.</span>\n      <input type="text" name="name" placeholder="Name">\n      <br/>\n      <input type="text" name="value" placeholder="Value">\n      <div class="modal-footer">\n        <button type="button" class="btn" data-dismiss="modal">Cancel</button>\n        <button type="submit" class="btn btn-primary"> Save </button>\n      </div>\n    </form>\n  </div>\n</div>\n';return __p},this.JST["app/addons/config/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',__p+=0===option.index?"\n<th> "+(null==(__t=option.section)?"":__t)+" </th>\n":"\n<td></td>\n",__p+="\n<td> "+(null==(__t=option.name)?"":__t)+' </td>\n<td>\n  <div id="show-value">\n    '+(null==(__t=option.value)?"":__t)+' <button class="edit-button"> Edit </button>\n  </div>\n  <div id="edit-value-form" style="display:none">\n    <input class="value-input" type="text" value="'+(null==(__t=option.value)?"":__t)+'" />\n    <button id="save-value" class="btn btn-success btn-small"> Save </button>\n    <button id="cancel-value" class="btn btn-danger btn-small"> Cancel </button>\n  </div>\n</td>\n<td id="delete-value"> <i class="icon-trash"> </i> </td>\n';return __p},this.JST["app/addons/dashboard/templates/accountactivity.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="<header>\n	",user.noHistory()?__p+="\n	  <h2>Here's your usage so far this month.</h2>\n	":(__p+='\n	    <p class="lead usage-links ',past&&(__p+=" past-active "),__p+='">Your usage: \n	    <!-- <a class="current-month" href="#">So far this month</a> | <a class="last-month" href="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</a> -->\n	    <div class="btn-group usage-links-toggle" data-toggle="buttons-radio">\n	      <button type="button" class="button active" value="current-month" data-url="#" >So far this month</button>\n	      <button type="button" class="button" value"last-month" data-url="#/history/2013/'+(null==(__t=month)?"":__t)+'">Last month</button>\n	    </div>\n	    </p>\n	'),__p+='\n	<div id="messaging"></div>\n</header>\n\n<section id="summary" class="row activity-pane">\n	<div id="tabs-container">\n		<div id="bill" class="row-fluid"></div>\n		<div id="usage" class=""></div>\n	</div>\n</section>\n';return __p},this.JST["app/addons/dashboard/templates/activitytabs.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="bill" class="row-fluid"></div>\n<div id="usage" class=""></div>\n';return __p},this.JST["app/addons/dashboard/templates/bill.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n  <li class="span3 active" style="margin-left: 0" data-tab="#heavy-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Heavy HTTP</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=writes.cost)?"":__t)+'</span>\n      <div class="operator">+</div>\n    </div>  \n    </div>\n  </li>\n  <li class="span3" data-tab="#light-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Light HTTP</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=reads.cost)?"":__t)+'</span>\n      <div class="operator">+</div>\n    </div>  \n    </div>\n  </li>\n  <li class="span3" data-tab="#data-tab">\n    <div class="indicator-wrapper"> \n      <div class="indicator"> \n    </div>\n    <div class="content">\n      <p>Data Volume</p>\n      <span class="cost"><span class="super">$</span>'+(null==(__t=data_vol.cost)?"":__t)+'</span>\n      <div class="operator">=</div>\n    </div> \n    </div>\n  </li>\n  <!-- TOTAL -->\n  <div class="span3 total">\n      <div id="bill-summary"></div>\n      <div id="bill-message"></div>\n      <div class="learn-more">\n        <a href="https://cloudant.com/for-developers/faq/account/">Learn about Cloudant pricing</a>\n      </div>\n  </div>\n  ';return __p},this.JST["app/addons/dashboard/templates/billbreakdown.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<p>\n	"+(null==(__t=count)?"":__t)+" "+(null==(__t=label)?"":__t)+" so far this month @\n	"+(null==(__t=costString)?"":__t)+" = $"+(null==(__t=cost)?"":__t)+"\n</p>\n";return __p},this.JST["app/addons/dashboard/templates/billmessage.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)user.underThirty()?__p+='\n<div class="alert alert-info">\n	<p>Lucky you! Your first 30 days are free. We won\'t start charging you for usage until '+(null==(__t=endDate)?"":__t)+'. <a href="#account/payment">Add a credit card.</a></p> \n</div>\n':freeUsage?__p+='\n<div class="alert alert-info">\n		We\'ll not charge you for this month if your usage remains below\n		$'+(null==(__t=chargingThreshold)?"":__t)+".\n</div>\n":(__p+='\n	<div class="alert">\n		Your usage this month has exceeded $5. At the end of this billing period (end of the month), we will charge you for your usage. 	',onFile||(__p+='<a href="#account/payment">Add a credit card.</a>'),__p+=" \n	</div>\n"),__p+="\n";return __p},this.JST["app/addons/dashboard/templates/billsummary.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+="<div>\nFor period ending <strong>"+(null==(__t=bill_date)?"":__t)+'</strong>\n  <span class="cost green"><span class="super">$</span>'+(null==(__t=total)?"":__t)+"</span>\n</div>\n";return __p},this.JST["app/addons/dashboard/templates/newuser.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<div class="alert alert-block">\n<p class="new-user">Hi '+(null==(__t=user.get("username"))?"":__t)+", we haven't yet taken a snapshot of your usage, so we don't yet have usage to report to you. We'll be able to show you your usage within the hour.</p>\n<p>Learn about <a href=\"https://cloudant.com/pricing\">Cloudant pricing</a>.</p>\n</div>\n";return __p},this.JST["app/addons/dashboard/templates/plot.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+="<svg style='width:500px; height:270px;' />\n";return __p},this.JST["app/addons/dashboard/templates/usage.html"]=function(obj){obj||(obj={});{var __p="";_.escape,Array.prototype.join}with(obj)__p+=error?'\n<div id="heavy-tab" class="tab-pane active">\n  Sorry, something has gone wrong. :(\n</div>\n<div id="light-tab" class="tab-pane">\n    Sorry, something has gone wrong. :(\n</div>\n<div id="data-tab" class="tab-pane">\n    Sorry, something has gone wrong. :(\n</div>\n':'\n\n  <div id="heavy-tab" class="tab-pane active">\n    <p>Heavy HTTP requests are more processing-intensive than light HTTP requests.</p>\n    <div id="heavy" class="graph"></div>\n    <div id="heavy-breakdown"></div>\n  </div>\n  <div id="light-tab" class="tab-pane">\n    <p>Light HTTP requests require less processing than heavy HTTP requests.</p>\n    <div id="light" class="graph"></div>\n		<div id="light-breakdown"></div>\n  </div>\n  <div id="data-tab" class="tab-pane">\n    <p>The data volume of your DB, search and view indexes so far this month.</p>\n    <div id="data" class="graph"></div>\n		<div id="data-breakdown"></div>\n    <p>Storing 1GB for a month costs $1. Your data cost is calculated pro rata, based on hourly snapshots of the data in your account.</p>\n  </div>\n\n',__p+="\n\n";return __p},this.JST["app/addons/exampleAuth/templates/noAccess.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid" >\n  <div class="span6 offset4">\n  <h3> You do not have permission to view this page </h3>\n</div>\n</div>\n';return __p},this.JST["app/addons/logs/templates/dashboard.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n <h2> CouchDB Logs </h2>\n  <table class="table table-bordered" >\n  <thead>\n    <tr>\n      <th class="Date">Date</th>\n      <th class="Log Level">Log Value</th>\n      <th class="Pid">Pid</th>\n      <th class="Args">Url</th>\n    </tr>\n  </thead>\n\n  <tbody>\n    ',logs.each(function(a){__p+='\n    <tr class="'+(null==(__t=a.logLevel())?"":__t)+'">\n      <td>\n        <!-- TODO: better format the date -->\n        '+(null==(__t=a.date())?"":__t)+"\n      </td>\n      <td>\n        "+(null==(__t=a.logLevel())?"":__t)+"\n      </td>\n      <td>\n        "+(null==(__t=a.pid())?"":__t)+"\n      </td>\n      <td>\n        <!-- TODO: split the line, maybe put method in it's own column -->\n        "+(null==(__t=a.args())?"":__t)+"\n      </td>\n    </tr>\n    "}),__p+="\n  </tbody>\n</table>\n";return __p},this.JST["app/addons/logs/templates/filterItem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span class="label label-info"> '+(null==(__t=filter)?"":__t)+'  </span>\n<a class="label label-info remove-filter" href="#">&times;</a>\n';return __p},this.JST["app/addons/logs/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="log-sidebar">\n  <header>Log Filter</header>\n  <form class="form-inline" id="log-filter-form">\n    <fieldset>\n      <input type="text" name="filter" placeholder="Type a filter to sort the logs by">\n      <!-- TODO: filter by method -->\n      <!-- TODO: correct removed filter behaviour -->\n      <button type="submit" class="btn">Filter</button>\n      <span class="help-block"> <h6> Eg. debug or <1.4.1> or any regex </h6> </span>\n    </fieldset>\n  </form>\n  <ul id="filter-list"></ul>\n</div>\n';return __p},this.JST["app/addons/permissions/templates/item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<span> '+(null==(__t=item)?"":__t)+' </span>\n<button type="button" class="close">&times;</button>\n\n';return __p},this.JST["app/addons/permissions/templates/permissions.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div id="sections"> </div>\n';return __p},this.JST["app/addons/permissions/templates/section.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<header class="border-hdr">\n<h3> '+(null==(__t=section)?"":__t)+' </h3>\n<p id="help"> '+(null==(__t=help)?"":__t)+' <a href="'+(null==(__t=getDocUrl("database_permission"))?"":__t)+'" target="_blank"><i class="icon-question-sign"> </i> </a></p>\n</header>\n\n<div class="row">\n  <div class="span6">\n    <header>\n      <h4> Users </h4>\n      <p>Specify users who will have '+(null==(__t=section)?"":__t)+' access to this database.</p>\n    </header>\n    <form class="permission-item-form form-inline">\n      <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="names" type="text" class="item input-small" placeholder="Add Name">\n      <button type="submit" class="button btn green fonticon-circle-plus">Add Name</button>\n    </form>\n    <ul class="clearfix unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-names">\n    </ul>\n  </div>\n  <div class="span6">\n    <header>\n      <h4> Roles </h4>\n      <p>All users under the following role(s) will have '+(null==(__t=section)?"":__t)+' access.</p>\n    </header>\n\n\n    <form class="permission-item-form form-inline">\n      <input data-section="'+(null==(__t=section)?"":__t)+'" data-type="roles" type="text" class="item input-small" placeholder="Add Role">\n      <button type="submit" class="button btn green fonticon-circle-plus">Add Role</button>\n    </form>\n    <ul class="unstyled permission-items span10" id="'+(null==(__t=section)?"":__t)+'-items-roles">\n    </ul>\n  </div>\n</div>\n';return __p},this.JST["app/addons/plugins/templates/plugins.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\n\nLicensed under the Apache License, Version 2.0 (the "License"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n-->\n    <div id="content">\n      <div class="row">\n        <h2>GeoCouch</h2>\n        <p>Version: <strong>couchdb1.2.x_v0.3.0-11-g66e6219</strong></p>\n        <p>Author: Volker Mische</p>\n        <p>\n          Available Erlang Versions:\n          <ul>\n            <li>CouchDB 1.4.0-XXX R15B01</li>\n          </ul>\n        </p>\n        <p>\n          <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"D5QPhrJTAifM42DXqAj4RxzfEtI="}}\' data-name="geocouch" data-version="couchdb1.2.x_v0.3.0-16-g66e6219">Install GeoCouch Now</button>\n        </p>\n      </div>\n      <div class="row">\n        <h2>CouchPerUser</h2>\n        <p>Version: <strong>1.0.0</strong></p>\n        <p>Author: Bob Ippolito</p>\n        <p>\n          Available Erlang Versions:\n          <ul>\n            <li>CouchDB 1.4.0-XXX R15B01</li>\n          </ul>\n        </p>\n        <p>\n          <button href="#" class="install-plugin" data-url="http://people.apache.org/~jan" data-checksums=\'{"1.4.0": {"R15B03":"Aj3mjC6M75NA62q5/xkP0tl8Hws="}}\' data-name="couchperuser" data-version="1.0.0">Install CouchPerUser Now</button>\n        </p>\n      </div>\n    </div>\n  </div></body>\n  <script>\n    $(\'.install-plugin\').each(function() {\n      var button = $(this);\n      var name = button.data(\'name\');\n      var version = button.data(\'version\');\n      $.get("/_config/plugins/" + name + "/", function(body, textStatus) {\n        body = JSON.parse(body);\n        if(body == version) {\n          button.html(\'Already Installed. Click to Uninstall\');\n          button.data(\'delete\', true);\n        } else {\n          button.html(\'Other Version Installed: \' + body);\n          button.attr(\'disabled\', true);\n        }\n      });\n    });\n\n    $(\'.install-plugin\').click(function(event) {\n      var button = $(this);\n      var delete_plugin = button.data(\'delete\') || false;\n      var plugin_spec = JSON.stringify({\n        name: button.data(\'name\'),\n        url: button.data(\'url\'),\n        version: button.data(\'version\'),\n        checksums: button.data(\'checksums\'),\n        "delete": delete_plugin\n      });\n      var url = \'/_plugins\'\n      $.ajax({\n        url: url,\n        type: \'POST\',\n        data: plugin_spec,\n        contentType: \'application/json\', // what we send to the server\n        dataType: \'json\', // expected from the server\n        processData: false, // keep our precious JSON\n        success: function(data, textStatus, jqXhr) {\n          if(textStatus == "success") {\n            var action = delete_plugin ? \'Uninstalled\' : \'Installed\';\n            button.html(\'Sucessfully \' + action);\n            button.attr(\'disabled\', true);\n          } else {\n            button.html(textStatus);\n          }\n        },\n        beforeSend: function(xhr) {\n          xhr.setRequestHeader(\'Accept\', \'application/json\');\n        },\n      });\n    });\n  </script>\n  <style type="text/css">\n  .row {\n    background-color: #FFF;\n    padding:1em;\n    margin-bottom:1em;\n  }\n  </style>';return __p},this.JST["app/addons/replication/templates/form.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<form id="replication" class="form-horizontal">\n		<div class="from form_set  local">\n			<div class="btn-group">\n			  <button class="btn local-btn" type="button" value="local">Local</button>\n			  <button class="btn remote-btn" type="button" value="remote">Remote</button>\n			</div>\n\n			<div class="from_local local_option">\n				<select id="from_name" name="source">\n					',_.each(databases,function(a){__p+='\n					   <option value="'+(null==(__t=a.name)?"":__t)+'" ',selectedDB==a.name&&(__p+="selected"),__p+=" >"+(null==(__t=a.name)?"":__t)+"</option>\n					"}),__p+='\n				</select>\n			</div>\n			<div class="from_to_remote remote_option">\n				<input type="text" id="from_url" name="source" size="30" value="http://">\n			</div>\n		</div>\n\n		<div class="form_set middle">\n			<span class="circle "></span>\n				<a href="#" title="Switch Target and Source" class="swap">\n					<span class="fonticon-swap-arrows"></span>\n				</a>\n			</span>\n		</div>\n\n		<div class="to form_set local">\n			<div class="btn-group">\n			  <button class="btn local-btn" type="button" value="local">Local</button>\n			  <button class="btn remote-btn" type="button" value="remote">Remote</button>\n			</div>\n			<div class="to_local local_option">\n				<input type="text" id="to_name" name="target" size="30" placeholder="database name">\n			</div>\n\n			<div class="to_remote remote_option">\n				<input type="text" id="to_url" name="target" size="30" value="http://">\n			</div>\n		</div>\n\n\n	<div class="actions">\n		<div class="control-group">\n			<label for="continuous">\n				<input type="checkbox" name="continuous" value="true" id="continuous">\n				Continuous\n			</label>\n\n			<label for="createTarget">\n				<input type="checkbox" name="create_target" value="true" id="createTarget">\n				Create Target <a href="'+(null==(__t=getDocUrl("replication_doc"))?"":__t)+'" target="_blank"><i class="icon-question-sign" rel="tooltip" title="Create the target database"></i></a>\n			</label>\n		</div>\n\n		<button class="btn btn-success btn-large save" type="submit">Replicate</button>\n	</div>\n</form>\n\n<div id="replicationStatus"></div>\n';return __p},this.JST["app/addons/replication/templates/progress.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<p class="span6 break">Replicating <strong>'+(null==(__t=source)?"":__t)+"</strong> to <strong>"+(null==(__t=target)?"":__t)+'</strong></p>\n\n<div class="span4 progress progress-striped active">\n  <div class="bar" style="width: '+(null==(__t=progress||0)?"":__t)+'%;">'+(null==(__t=progress||"0")?"":__t)+'%</div>\n</div>\n\n<span class="span1">\n	<button class="cancel btn btn-danger btn-large delete" data-source="'+(null==(__t=source)?"":__t)+'"  data-rep-id="'+(null==(__t=repid)?"":__t)+'" data-continuous="'+(null==(__t=continuous)?"":__t)+'" data-target="'+(null==(__t=target)?"":__t)+'">Cancel</a>\n</span>\n';
+return __p},this.JST["app/addons/search/templates/analyzer_multiple.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<input type="text" name="analyzer-name" id="analyzer-name" value="perfield"/>\n\n<label for="analyzer-default">\n	Default\n</label>\n\n<select name="analyzer-default" id="analyzer-default">\n	<option value="keyword">keyword </option> \n	<option value="simple">simple </option> \n	<option value="whitespace">whitespace </option> \n	<option value="arabic">arabic </option> \n	<option value="bulgarian">bulgarian </option> \n	<option value="brazilian">brazilian </option> \n	<option value="catalan">catalan </option> \n	<option value="cjk">cjk </option> \n	<option value="chinese">chinese </option> \n	<option value="czech">czech </option> \n	<option value="danish">danish </option> \n	<option value="german">german </option> \n	<option value="greek"> greek</option> \n	<option value="english">english </option> \n	<option value="spanish">spanish </option> \n	<option value="basque">basque </option> \n	<option value="persian">persian </option> \n	<option value="finnish">finnish </option> \n	<option value="french">french </option> \n	<option value="irish"> irish</option> \n	<option value="galician">galician </option> \n	<option value="hindi">hindi </option> \n	<option value="hungarian">hungarian </option> \n	<option value="armenian" >armenian </option> \n	<option value="indonesian">indonesian </option> \n	<option value="italian" >italian </option> \n	<option value="japanese" >japanese </option> \n	<option value="latvian">latvian </option> \n	<option value="dutch" >dutch </option> \n	<option value="norwegian">norwegian </option> \n	<option value="polish">polish </option> \n	<option value="portuguese">portuguese </option> \n	<option value="romanian">romanian </option> \n	<option value="russian" >russian </option> \n	<option value="classic">classic </option> \n	<option value="standard">standard </option> \n	<option value="email">email </option> \n	<option value="swedish" >swedish </option> \n	<option value="thai">thai </option> \n	<option value="turkish">turkish </option> \n</select>\n\n<label for="analyzer-fields">\n	Fields\n</label>\n<select multiple="multiple" name="analyzer-fields" id="analyzer-fields">\n<option value="keyword">keyword </option> \n	<option value="simple">simple </option> \n	<option value="whitespace">whitespace </option> \n	<option value="arabic">arabic </option> \n	<option value="bulgarian">bulgarian </option> \n	<option value="brazilian">brazilian </option> \n	<option value="catalan">catalan </option> \n	<option value="cjk">cjk </option> \n	<option value="chinese">chinese </option> \n	<option value="czech">czech </option> \n	<option value="danish">danish </option> \n	<option value="german">german </option> \n	<option value="greek"> greek</option> \n	<option value="english">english </option> \n	<option value="spanish">spanish </option> \n	<option value="basque">basque </option> \n	<option value="persian">persian </option> \n	<option value="finnish">finnish </option> \n	<option value="french">french </option> \n	<option value="irish"> irish</option> \n	<option value="galician">galician </option> \n	<option value="hindi">hindi </option> \n	<option value="hungarian">hungarian </option> \n	<option value="armenian" >armenian </option> \n	<option value="indonesian">indonesian </option> \n	<option value="italian" >italian </option> \n	<option value="japanese" >japanese </option> \n	<option value="latvian">latvian </option> \n	<option value="dutch" >dutch </option> \n	<option value="norwegian">norwegian </option> \n	<option value="polish">polish </option> \n	<option value="portuguese">portuguese </option> \n	<option value="romanian">romanian </option> \n	<option value="russian" >russian </option> \n	<option value="classic">classic </option> \n	<option value="standard">standard </option> \n	<option value="email">email </option> \n	<option value="swedish" >swedish </option> \n	<option value="thai">thai </option> \n	<option value="turkish">turkish </option> \n</select>\n';return __p},this.JST["app/addons/search/templates/analyzer_single.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<label for="analyzer-default">\n	Type\n</label>\n<select name="analyzer-default" id="analyzer-default">\n<option value="standard" selected="selected">Standard</option>\n<option value="keyword">Keyword </option>\n<option value="simple">Simple</option>\n<option value="whitespace">Whitespace </option>\n<option value="classic">Classic</option>\n<option value="email">Email</option>\n<optgroup label="Language-specific">\n<option value="arabic">Arabic</option>\n<option value="armenian">Armenian</option>\n<option value="basque">Basque</option>\n<option value="bulgarian">Bulgarian</option>\n<option value="brazilian">Brazilian</option>\n<option value="catalan">Catalan</option>\n<option value="cjk">Cjk</option>\n<option value="chinese">Chinese</option>\n<option value="czech">Czech</option>\n<option value="danish">Danish</option>\n<option value="dutch">Dutch</option>\n<option value="english">English</option>\n<option value="finnish">Finnish</option>\n<option value="french">French</option>\n<option value="galician">Galician</option>\n<option value="german">German</option>\n<option value="greek">Greek</option>\n<option value="hindi">Hindi</option>\n<option value="hungarian">Hungarian</option>\n<option value="indonesian">Indonesian</option>\n<option value="irish">Irish</option>\n<option value="italian">Italian</option>\n<option value="japanese">Japanese</option>\n<option value="latvian">Latvian</option>\n<option value="norwegian">Norwegian</option>\n<option value="persian">Persian</option>\n<option value="polish">Polish</option>\n<option value="portuguese">Portuguese</option>\n<option value="romanian">Romanian</option>\n<option value="russian">Russian</option>\n<option value="spanish">Spanish</option>\n<option value="swedish">Swedish</option>\n<option value="thai">Thai</option>\n<option value="turkish">Turkish</option>\n</optgroup>\n</select>\n';return __p},this.JST["app/addons/search/templates/index_menu_item.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<a href="#database/'+(null==(__t=database)?"":__t)+"/_design/"+(null==(__t=ddoc)?"":__t)+"/_search/"+(null==(__t=index)?"":__t)+'" id="'+(null==(__t=ddoc)?"":__t)+"_"+(null==(__t=index)?"":__t)+'" class="toggle-view">\n  <i class="icon-search"></i> '+(null==(__t=ddoc)?"":__t)+'<span class="divider">/</span>'+(null==(__t=index)?"":__t)+"\n</a>\n";return __p},this.JST["app/addons/search/templates/preview_form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<form id="preview">\n  <div class="input-append">\n    <input class="span2" id="queryText" type="text"  placeholder="Enter your search query term"/>\n    <button class="btn green button" type="submit">Query</button>\n  </div>\n</form>\n\n<table class="table" style="width:100%" id="preview-results">\n  <tbody>\n  </tbody>\n\n</table>\n';return __p},this.JST["app/addons/search/templates/preview_item.html"]=function(obj){obj||(obj={});var __p="",__e=_.escape;with(obj)__p+='<td>\n  <div>\n    <pre class="prettyprint">'+__e(result.prettyJSON())+"</pre>\n  </div>\n</td>\n";return __p},this.JST["app/addons/search/templates/search_index_form.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='  <ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">\n    <li class=""> <a id="index-nav" data-bypass="true" class="fonticon-wrench fonticon" data-toggle="tab" href="',newSearch||(__p+="#search-index-form"),__p+='"> \n      ',__p+=newSearch?"Create Search Index ":"Edit Search Index ",__p+='</a>\n    </li>\n  </ul>\n\n\n  <div class="all-docs-list errors-container"></div>\n  <div class="tab-content">\n    <div class="tab-pane active" id="search-index-form">\n      <div class="ddoc-alert well">\n        <div class="errors-container"></div>\n\n        <form class="form-horizontal search-query-save" id="search-index">\n\n          <div class="control-group design-doc-group"> </div>\n          <div class="control-group">\n            <label for="search-name">Index name</label>\n            <input type="text" id="search-name" value="'+(null==(__t=indexName)?"":__t)+'"/>\n          </div>\n\n          <div class="control-group search-function">\n            <label for="search-function">Search index function</label>\n            <div class="js-editor" id="search-function"></div>\n          </div>\n  \n          <div class="well well-small">\n            <div class="control-group">\n              <label for="search-analyzer">Analyzer</label>\n            </div>\n            <!--insert analyzer-->\n            <div id="analyzer-type" class="control-group"></div>\n          </div>\n\n\n          <div class="control-group">\n            <button class="button green save fonticon-circle-check">Save &amp; Build Index</button>\n            ',newSearch||(__p+='\n            <button class="button delete outlineGray fonticon-circle-x">Delete</button>\n            '),__p+='\n          </div>\n          <div class="clearfix"></div>\n        </form>\n\n      </div>\n    </div>\n  </div>\n\n';return __p},this.JST["app/addons/search/templates/search_menu.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<li class="nav-header">Search Indexes\n</li>\n<li>\n  <a id="new-search" href="#database/'+(null==(__t=database)?"":__t)+'/new_search" class="new">\n    <i class="icon-plus"></i> New\n  </a>\n</li>\n';return __p},this.JST["app/addons/stats/templates/by_method.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<h2>By Method <small>GET, POST, PUT, DELETE</small></h2>\n<div id="httpd_request_methods"></div>\n';return __p},this.JST["app/addons/stats/templates/pie_table.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="row-fluid">\n    <h2>  '+(null==(__t=datatype)?"":__t)+' </h2>\n</div>\n\n<div class="row-fluid">\n  <div>\n    <table class="table table-condensed table-striped">\n      <thead>\n        <tr>\n          <th> Description </th>\n          <th> current </th>\n          <th>  sum </th>\n          <th>  mean </th>\n          <th>  stddev </th>\n          <th>  min </th>\n          <th>  max </th>\n        </tr>\n      </thead>\n      ',_.each(statistics,function(a){a.get("sum")&&(__p+="\n      <tr>\n        <td>"+(null==(__t=a.get("description"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("current"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("sum"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("mean"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("stddev"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("min"))?"":__t)+"</td>\n        <td>"+(null==(__t=a.get("max"))?"":__t)+"</td>\n      </tr>\n      ")}),__p+='\n    </table>\n  </div>\n\n  <div class="span5" style="height:430px;min-width: 430px">\n    <center>\n      <svg id="'+(null==(__t=datatype)?"":__t)+'_graph"></svg>\n    </center>\n  </div>\n</div>\n';return __p},this.JST["app/addons/stats/templates/stats.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n<div class="datatypes">\n</div>\n';return __p},this.JST["app/addons/stats/templates/statselect.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n\n',_.each(datatypes,function(a){__p+='\n<li> \n<a href="#stats" class="datatype-select" data-type-select="'+(null==(__t=a)?"":__t)+'"> \n  '+(null==(__t=a)?"":__t)+'\n  <i class="icon-chevron-right" style="float:right"></i>\n</a>\n</li>\n'}),__p+="\n";return __p},this.JST["app/addons/style/templates/footer.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<div class="row-fluid">\n  <div>\n    <div class="row-fluid company-resources">\n\n      <div class="span2">\n        <h3>Company</h3>\n        <ul class="unstyled">\n          <li>\n            <a href="http://cloudant.com/about-us/">About Us</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/about-us/team/">Team</a> / <a href="http://cloudant.com/about-us/jobs/"><strong>Jobs</strong></a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/customers/">Customers</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/about-us/partners/">Partners</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/about-us/news-room/">News</a> / <a href="http://cloudant.com/about-us/events/">Events</a>\n          </li>\n        </ul>\n      </div>\n\n      <div class="span2">\n        <h3>&nbsp;</h3>\n        <ul class="unstyled">\n          <li>\n            <a href="http://cloudant.com/#home-why-cloudant">Why Cloudant?</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/#home-product">Product</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/#home-service">Service</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/#home-pricing">Pricing</a>\n          </li>\n          <li>\n            <a href="http://bigcouch.cloudant.com" target="_blank">BigCouch</a>\n          </li>\n        </ul>\n      </div>\n\n      <div class="span2">\n        <h3>Resources</h3>\n        <ul class="unstyled">\n          <li>\n            <a href="http://cloudant.com/resources/case-studies/">Case Studies</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/resources/white-papers/">White Papers</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/resources/webinars/">Webinars</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/resources/videos/">Videos</a>\n          </li>\n        </ul>\n      </div>\n\n      <div class="span2">\n        <h3>For Developers</h3>\n        <ul class="unstyled">\n          <li>\n            <a href="http://cloudant.com/for-developers/views/">MapReduce</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/for-developers/search/">Lucene Search</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/for-developers/examples/">Example Apps</a>\n          </li>\n          <li>\n            <a href="http://cloudant.com/for-developers/faq/">FAQs</a>\n          </li>\n        </ul>\n      </div>\n\n      <div class="span2">\n        <h3>Connect</h3>\n        <ul class="unstyled">\n          <li>\n            <a href="http://cloudant.com/blog/">Blog</a> / <a href="http://feeds.feedburner.com/cloudantnews">RSS</a>\n          </li>\n          <li>\n            <a href="http://webchat.freenode.net?channels=cloudant&amp;uio=MTE9MTk117">#cloudant on IRC</a>\n          </li>\n          <li>\n            <a href="http://twitter.com/cloudant">Twitter</a>\n          </li>\n          <li>\n            <a href="http://github.com/cloudant">Github</a>\n          </li>\n        </ul>\n      </div>\n\n      <div class="span2">\n        <h3>&nbsp;</h3>\n            <a href="http://cloudant.com/about-us/contact-us/">Contact Us</a>\n      </div>\n\n    </div>\n  </div>\n\n</div>\n<div class="row-fluid copyright">\n  <div class="span4">\n    <p>\n      Cloudant Dashboard '+(null==(__t=version)?"":__t)+'\n    </p>\n  </div>\n  <div class="span2">\n    <a href="http://cloudant.com/terms/">Terms Of Service</a>\n  </div>\n  <div class="span2">\n    <a href="http://cloudant.com/privacy/">Privacy</a>\n  </div>\n</div>\n';return __p},this.JST["app/addons/style/templates/nav-bar.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<a class="brand" href="#">\n  <div class="icon"><!-- * --></div>\n</a>\n<nav id="main_navigation">\n  <ul id="nav-links" class="nav">\n    ',_.each(navLinks,function(a){__p+="\n      ",a.view||(__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n          <a href="'+(null==(__t=a.href)?"":__t)+'">\n            <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n            '+(null==(__t=a.title)?"":__t)+"\n          </a>\n        </li>\n      "),__p+="\n    "}),__p+='\n    <li data-nav-name=\'documentation\'>\n      <a href="https://docs.cloudant.com/" target="_blank">\n        <span class="fonticon-bookmark fonticon"></span>\n        Documentation\n      </a>\n  </ul>\n\n  <div id="footer-links">\n\n    <ul id="bottom-nav-links" class="nav">\n      ',_.each(bottomNavLinks,function(a){__p+='\n        <li data-nav-name= "'+(null==(__t=a.title)?"":__t)+'">\n            <a href="'+(null==(__t=a.href)?"":__t)+'">\n            <span class="'+(null==(__t=a.icon)?"":__t)+' fonticon"></span>\n            '+(null==(__t=a.title)?"":__t)+"\n          </a>\n        </li>\n      "}),__p+='\n    </ul>\n\n    <ul id="footer-nav-links" class="nav">\n<!--       <li>\n        <a href="#logout" class="logout">Logout</a>\n      </li> -->\n<!--       <li>\n        <a class="see-footer">More...</a>\n      </li>  -->\n    </ul>\n    \n    <ul id="toggle-nav">\n      <li>\n        <span class="cloudant-arrow_left fonticon"></span>\n      </li> \n    </ul>\n\n  </div>\n</nav>\n\n';return __p},this.JST["app/addons/style/templates/nav_link_title.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='<a href="#logout">\n	Logout\n	<span class="username"> '+(null==(__t=username)?"":__t)+' \n		<span class="cluster">\n		</span>\n	</span>\n</a>\n';return __p},this.JST["app/addons/style/templates/new_portal_modal.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n  <div class="modal-header">\n    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n    <h3>Hi, '+(null==(__t=username)?"":__t)+'.  Welcome to your new dashboard.</h3>\n  </div>\n  <div class="modal-body">\n    <p>There\'s a lot that\'s new  around here, including improved <a href="#support">Support</a> and <a href="#replication">Replication</a> functionality, and an updated UI for your <a href="#_all_dbs">Databases</a>, too.</p>\n    <p>If you prefer the old dash for certain things? No problem.  We\'ll keep <a href="https://cloudant.com/dashboard">the old dashboard</a> online until Feb 28th</p>\n    <div class="actions">\n      <a href="#account/announcements"  class="button blue cancel-button">Take a look at what\'s new</a>\n      <a href="#" data-dismiss="modal"  class="button cancel-button outlineGray">Close</a>\n    </div>\n  </div>\n\n';return __p},this.JST["app/addons/support/templates/closedtickets.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+="\n",0===tickets.length?__p+="\n	<div>\n		<p>You have no closed tickets.</p>\n	</div>\n":(__p+="\n	",_.each(tickets,function(a){__p+="\n	<div>\n		<h3> \n			CLOSED: \n			 "+(null==(__t=a.get("title"))?"":__t)+" \n			<span>- Case "+(null==(__t=a.get("caseID"))?"":__t)+'</span> \n		</h3>\n		<p><a target="_blank" href="http://cloudant.fogbugz.com/default.asp?'+(null==(__t=a.id)?"":__t)+'">View the full ticket</a></p>\n	</div>\n'}),__p+="\n"),__p+="\n";return __p},this.JST["app/addons/support/templates/detailedticket.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)model.get("responses")?(__p+='\n\n	<div class="support-seperator newest">\n		<h2>'+(null==(__t=model.get("title"))?"":__t)+'</h2>\n	</div>\n\n	<div id="discussion"></div>\n\n',showReply&&(__p+='\n	<div class="editcase window-resizeable">\n		<div class="edit-toggle">\n			<button class="openEdit button blue cloudant-pencil" value="Reply">Reply</button>\n			<button class="cancel-button button noOutlineLightblue cloudant-x" value="Close">Close</button>\n		</div>\n		<form id="edit"  enctype="multipart/form-data">\n			<header>From '+(null==(__t=username)?"":__t)+' \n				<span class="date">'+(null==(__t=model.humanDate())?"":__t)+" "+(null==(__t=model.getTime())?"":__t)+' </span>\n			</header>\n			<textarea name="body" class="input-xxlarge input-xxtall" id="editBody" placeholder="Detailed comments here"></textarea>\n\n			<span class="attachment-name"></span>\n			<div class="form-buttons">\n				<button type="submit" class="button green cloudant-circle-check" value="Submit">Submit</button>\n				<a class="button cancel-button outlineGray cloudant-circle-x" value="Cancel">Cancel</a>\n				<label class="fileContainer attach-file button attach-file noOutlineLightblue cloudant-paperclip"> Attach a file\n			    <input class="file" type="file" name="attachments" />\n				</label>\n			</div>\n\n		</form>\n	</div>\n'),__p+="\n\n"):__p+="\n	<p>This case cannot be found.</p>\n",__p+="\n";return __p},this.JST["app/addons/support/templates/discussionvolley.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape,Array.prototype.join}with(obj)__p+='<!-- HEADER -->\n<div class="row-fluid time-stamp">\n	<div class="span3">\n		<h4 class="meta">\n			<div class="date">\n				'+(null==(__t=model.humanDate())?"":__t)+'\n				<div class="time">\n				'+(null==(__t=model.getTime())?"":__t)+'\n				</div>\n			</div>\n		</h4>\n	</div>\n	<div class="span8">\n		<h4>\n			<div class="person"><span class="edited">From</span> '+(null==(__t=user)?"":__t)+'\n			</div>\n		</h4>\n	</div>\n</div>\n<!-- CONTENT -->\n<div class="row-fluid content">\n	<div class="span8 offset3">\n		<pre>'+(null==(__t=model.get("content"))?"":__t)+"</pre>\n		",model.get("attachments")&&(__p+='\n		<ul class="unstyled">\n			',_.each(attachments,function(a){__p+='\n				<li class="cloudant-paperclip">\n					<a href="/_api/v2/support/tickets/'+(null==(__t=caseid)?"":__t)+"/files/"+(null==(__t=a.source)?"":__t)+'" target="_blank">'+(null==(__t=a.name)?"":__t)+"</a>\n				</li>\n			"}),__p+="\n		</ul>\n		"),__p+="\n		\n		",first&&showReply&&(__p+='\n			<button class="openEdit button outlineGray cloudant-pencil" value="Reply">Reply</button>\n		'),__p+="\n	</div>\n</div>\n";return __p},this.JST["app/addons/support/templates/form.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<header class="newticket"> \n	<h3>New Case</h3>\n	<div class="callout">\n		<p>Submit a case, and our support staff will reply via email as soon as possible.</p>\n	</div>\n</header>\n<form id="support-form" class="newticket" enctype="multipart/form-data">\n	<label for="subject">Issue</label>\n	<input id="subject"  type="text" name="title" class="input-xxlarge" tabindex="1" />\n\n	<label for="comments">Details</label>\n	<textarea id="comments" name="body" class="input-xxlarge input-xxtall" tabindex="2" ></textarea>\n	<input type="hidden" name="priority" value="3"/>\n	<p>Please describe your issue in as much detail as possible.</p>\n	<label class="fileContainer attach-file button attach-file noOutlineLightblue cloudant-paperclip"> Attach a file\n    <input class="file" type="file" name="attachments" />\n	</label>\n	<span class="attachment-name"></span>\n	<div class="form-buttons">\n		<button type="submit" class="button green cloudant-circle-check" value="Submit" tabindex="3">Submit</button>\n	</div>\n</form>\n';return __p},this.JST["app/addons/support/templates/sidebar.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='  <div id="sidebar-menu">\n		<ul id="nav-tickets" class="nav nav-tabs nav-stacked">\n		</ul>\n  </div>\n\n<header class="support-sidebar">\n  <a href="#/support/new-ticket" id="case-button" class="button blue round-btn cloudant-circle-plus"> New Case</a>\n  <ul id="nav-tickets-header" class="nav nav-tabs nav-stacked">\n      <li class="header">\n        <div class="ticket-case-id">Case</div>\n        <div class="ticket-title">Title</div>\n        <div class="ticket-status">Status</div>\n      </li>\n  </ul>\n</header>\n';return __p},this.JST["app/addons/support/templates/sidebaritem.html"]=function(obj){obj||(obj={});{var __t,__p="";_.escape}with(obj)__p+='\n<a href="#/support/'+(null==(__t=ticket.get("id"))?"":__t)+'" class="ticket">\n	<div class="ticket-case-id">\n		'+(null==(__t=ticket.get("caseID"))?"":__t)+'\n	</div>\n	<div class="ticket-title">\n		'+(null==(__t=ticket.get("title"))?"":__t)+'\n	</div>\n	<div class="ticket-status '+(null==(__t=status)?"":__t)+'">\n	'+(null==(__t=status)?"":__t)+"\n	</div>\n</a>\n";return __p},this.JST["app/addons/support/templates/support.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<div id="primary-navbar"></div>\n<div id="dashboard" class="container-fluid supportDash">\n  <div class="with-sidebar content-area">\n    <div id="sidebar-content" class="sidebar support-sidebar-hack"></div>\n    <div id="dashboard-content" class="support-content-hack list window-resizeable"></div>\n  </div>\n</div>\n';return __p},this.JST["app/addons/verifyinstall/templates/main.html"]=function(obj){obj||(obj={});{var __p="";_.escape}with(obj)__p+='<!--\nLicensed under the Apache License, Version 2.0 (the "License"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n-->\n<button id="start" class="btn btn-large btn-success"> Verify Installation </button>\n<div id="error"> </div>\n\n<table id="test-score" class="table table-striped table-bordered" >\n  <thead>\n    <tr>\n      <th> Test </th>\n      <th> Status </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td> Create Database </td>\n      <td id="create-database" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Create Document </td>\n      <td id="create-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Update Document </td>\n      <td id="update-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Delete Document </td>\n      <td id="delete-document" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Create View </td>\n      <td id="create-view" class="status">  </td>\n    </tr>\n    <tr>\n      <td> Replication </td>\n      <td id="replicate" class="status">  </td>\n    </tr>\n  </tbody>\n</table>\n';return __p},define("initialize",[],function(){var a={root:"/_utils/fauxton/",version:"1.0",host:"../.."};return a}),function(a,b){function c(a){var b=a.length,c=kb.type(a);return kb.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function d(a){var b=zb[a]={};return kb.each(a.match(mb)||[],function(a,c){b[c]=!0}),b}function e(a,c,d,e){if(kb.acceptData(a)){var f,g,h=kb.expando,i=a.nodeType,j=i?kb.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||d!==b||"string"!=typeof c)return k||(k=i?a[h]=bb.pop()||kb.guid++:h),j[k]||(j[k]=i?{}:{toJSON:kb.noop}),("object"==typeof c||"function"==typeof c)&&(e?j[k]=kb.extend(j[k],c):j[k].data=kb.extend(j[k].data,c)),g=j[k],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[kb.camelCase(c)]=d),"string"==typeof c?(f=g[c],null==f&&(f=g[kb.camelCase(c)])):f=g,f}}function f(a,b,c){if(kb.acceptData(a)){var d,e,f=a.nodeType,g=f?kb.cache:a,i=f?a[kb.expando]:kb.expando;if(g[i]){if(b&&(d=c?g[i]:g[i].data)){kb.isArray(b)?b=b.concat(kb.map(b,kb.camelCase)):b in d?b=[b]:(b=kb.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!h(d):!kb.isEmptyObject(d))return}(c||(delete g[i].data,h(g[i])))&&(f?kb.cleanData([a],!0):kb.support.deleteExpando||g!=g.window?delete g[i]:g[i]=null)}}}function g(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(Bb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Ab.test(d)?kb.parseJSON(d):d}catch(f){}kb.data(a,c,d)}else d=b}return d}function h(a){var b;for(b in a)if(("data"!==b||!kb.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function i(){return!0}function j(){return!1}function k(){try{return Y.activeElement}catch(a){}}function l(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function m(a,b,c){if(kb.isFunction(b))return kb.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return kb.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(Qb.test(b))return kb.filter(b,a,c);b=kb.filter(b,a)}return kb.grep(a,function(a){return kb.inArray(a,b)>=0!==c})}function n(a){var b=Ub.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function o(a,b){return kb.nodeName(a,"table")&&kb.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function p(a){return a.type=(null!==kb.find.attr(a,"type"))+"/"+a.type,a}function q(a){var b=ec.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function r(a,b){for(var c,d=0;null!=(c=a[d]);d++)kb._data(c,"globalEval",!b||kb._data(b[d],"globalEval"))}function s(a,b){if(1===b.nodeType&&kb.hasData(a)){var c,d,e,f=kb._data(a),g=kb._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)kb.event.add(b,c,h[c][d])}g.data&&(g.data=kb.extend({},g.data))}}function t(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!kb.support.noCloneEvent&&b[kb.expando]){e=kb._data(b);for(d in e.events)kb.removeEvent(b,d,e.handle);b.removeAttribute(kb.expando)}"script"===c&&b.text!==a.text?(p(b).text=a.text,q(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),kb.support.html5Clone&&a.innerHTML&&!kb.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&bc.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)
+}}function u(a,c){var d,e,f=0,g=typeof a.getElementsByTagName!==W?a.getElementsByTagName(c||"*"):typeof a.querySelectorAll!==W?a.querySelectorAll(c||"*"):b;if(!g)for(g=[],d=a.childNodes||a;null!=(e=d[f]);f++)!c||kb.nodeName(e,c)?g.push(e):kb.merge(g,u(e,c));return c===b||c&&kb.nodeName(a,c)?kb.merge([a],g):g}function v(a){bc.test(a.type)&&(a.defaultChecked=a.checked)}function w(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=yc.length;e--;)if(b=yc[e]+c,b in a)return b;return d}function x(a,b){return a=b||a,"none"===kb.css(a,"display")||!kb.contains(a.ownerDocument,a)}function y(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=kb._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&x(d)&&(f[g]=kb._data(d,"olddisplay",C(d.nodeName)))):f[g]||(e=x(d),(c&&"none"!==c||!e)&&kb._data(d,"olddisplay",e?c:kb.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function z(a,b,c){var d=rc.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function A(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=kb.css(a,c+xc[f],!0,e)),d?("content"===c&&(g-=kb.css(a,"padding"+xc[f],!0,e)),"margin"!==c&&(g-=kb.css(a,"border"+xc[f]+"Width",!0,e))):(g+=kb.css(a,"padding"+xc[f],!0,e),"padding"!==c&&(g+=kb.css(a,"border"+xc[f]+"Width",!0,e)));return g}function B(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=kc(a),g=kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=lc(a,b,f),(0>e||null==e)&&(e=a.style[b]),sc.test(e))return e;d=g&&(kb.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+A(a,b,c||(g?"border":"content"),d,f)+"px"}function C(a){var b=Y,c=uc[a];return c||(c=D(a,b),"none"!==c&&c||(jc=(jc||kb("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(jc[0].contentWindow||jc[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),c=D(a,b),jc.detach()),uc[a]=c),c}function D(a,b){var c=kb(b.createElement(a)).appendTo(b.body),d=kb.css(c[0],"display");return c.remove(),d}function E(a,b,c,d){var e;if(kb.isArray(b))kb.each(b,function(b,e){c||Ac.test(a)?d(a,e):E(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==kb.type(b))d(a,b);else for(e in b)E(a+"["+e+"]",b[e],c,d)}function F(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(mb)||[];if(kb.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function G(a,b,c,d){function e(h){var i;return f[h]=!0,kb.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===Rc;return e(b.dataTypes[0])||!f["*"]&&e("*")}function H(a,c){var d,e,f=kb.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&kb.extend(!0,a,d),a}function I(a,c,d){for(var e,f,g,h,i=a.contents,j=a.dataTypes;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function J(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function K(){try{return new a.XMLHttpRequest}catch(b){}}function L(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function M(){return setTimeout(function(){$c=b}),$c=kb.now()}function N(a,b,c){for(var d,e=(ed[b]||[]).concat(ed["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function O(a,b,c){var d,e,f=0,g=dd.length,h=kb.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$c||M(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:kb.extend({},b),opts:kb.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$c||M(),duration:c.duration,tweens:[],createTween:function(b,c){var d=kb.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(P(k,j.opts.specialEasing);g>f;f++)if(d=dd[f].call(j,a,k,j.opts))return d;return kb.map(k,N,j),kb.isFunction(j.opts.start)&&j.opts.start.call(a,j),kb.fx.timer(kb.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function P(a,b){var c,d,e,f,g;for(c in a)if(d=kb.camelCase(c),e=b[d],f=a[c],kb.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=kb.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Q(a,b,c){var d,e,f,g,h,i,j=this,k={},l=a.style,m=a.nodeType&&x(a),n=kb._data(a,"fxshow");c.queue||(h=kb._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,j.always(function(){j.always(function(){h.unqueued--,kb.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[l.overflow,l.overflowX,l.overflowY],"inline"===kb.css(a,"display")&&"none"===kb.css(a,"float")&&(kb.support.inlineBlockNeedsLayout&&"inline"!==C(a.nodeName)?l.zoom=1:l.display="inline-block")),c.overflow&&(l.overflow="hidden",kb.support.shrinkWrapBlocks||j.always(function(){l.overflow=c.overflow[0],l.overflowX=c.overflow[1],l.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ad.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(m?"hide":"show"))continue;k[d]=n&&n[d]||kb.style(a,d)}if(!kb.isEmptyObject(k)){n?"hidden"in n&&(m=n.hidden):n=kb._data(a,"fxshow",{}),f&&(n.hidden=!m),m?kb(a).show():j.done(function(){kb(a).hide()}),j.done(function(){var b;kb._removeData(a,"fxshow");for(b in k)kb.style(a,b,k[b])});for(d in k)g=N(m?n[d]:0,d,j),d in n||(n[d]=g.start,m&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function R(a,b,c,d,e){return new R.prototype.init(a,b,c,d,e)}function S(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=xc[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function T(a){return kb.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var U,V,W=typeof b,X=a.location,Y=a.document,Z=Y.documentElement,$=a.jQuery,_=a.$,ab={},bb=[],cb="1.10.2",db=bb.concat,eb=bb.push,fb=bb.slice,gb=bb.indexOf,hb=ab.toString,ib=ab.hasOwnProperty,jb=cb.trim,kb=function(a,b){return new kb.fn.init(a,b,V)},lb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,mb=/\S+/g,nb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ob=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,pb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,qb=/^[\],:{}\s]*$/,rb=/(?:^|:|,)(?:\s*\[)+/g,sb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,tb=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ub=/^-ms-/,vb=/-([\da-z])/gi,wb=function(a,b){return b.toUpperCase()},xb=function(a){(Y.addEventListener||"load"===a.type||"complete"===Y.readyState)&&(yb(),kb.ready())},yb=function(){Y.addEventListener?(Y.removeEventListener("DOMContentLoaded",xb,!1),a.removeEventListener("load",xb,!1)):(Y.detachEvent("onreadystatechange",xb),a.detachEvent("onload",xb))};kb.fn=kb.prototype={jquery:cb,constructor:kb,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:ob.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof kb?c[0]:c,kb.merge(this,kb.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:Y,!0)),pb.test(e[1])&&kb.isPlainObject(c))for(e in c)kb.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=Y.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=Y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):kb.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),kb.makeArray(a,this))},selector:"",length:0,toArray:function(){return fb.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){var b=kb.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return kb.each(this,a,b)},ready:function(a){return kb.ready.promise().done(a),this},slice:function(){return this.pushStack(fb.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},map:function(a){return this.pushStack(kb.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:eb,sort:[].sort,splice:[].splice},kb.fn.init.prototype=kb.fn,kb.extend=kb.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||kb.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(kb.isPlainObject(d)||(c=kb.isArray(d)))?(c?(c=!1,g=a&&kb.isArray(a)?a:[]):g=a&&kb.isPlainObject(a)?a:{},h[e]=kb.extend(k,g,d)):d!==b&&(h[e]=d));return h},kb.extend({expando:"jQuery"+(cb+Math.random()).replace(/\D/g,""),noConflict:function(b){return a.$===kb&&(a.$=_),b&&a.jQuery===kb&&(a.jQuery=$),kb},isReady:!1,readyWait:1,holdReady:function(a){a?kb.readyWait++:kb.ready(!0)},ready:function(a){if(a===!0?!--kb.readyWait:!kb.isReady){if(!Y.body)return setTimeout(kb.ready);kb.isReady=!0,a!==!0&&--kb.readyWait>0||(U.resolveWith(Y,[kb]),kb.fn.trigger&&kb(Y).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===kb.type(a)},isArray:Array.isArray||function(a){return"array"===kb.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"==typeof a||"function"==typeof a?ab[hb.call(a)]||"object":typeof a},isPlainObject:function(a){var c;if(!a||"object"!==kb.type(a)||a.nodeType||kb.isWindow(a))return!1;try{if(a.constructor&&!ib.call(a,"constructor")&&!ib.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(kb.support.ownLast)for(c in a)return ib.call(a,c);for(c in a);return c===b||ib.call(a,c)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Y;var d=pb.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=kb.buildFragment([a],b,e),e&&kb(e).remove(),kb.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=kb.trim(b),b&&qb.test(b.replace(sb,"@").replace(tb,"]").replace(rb,"")))?new Function("return "+b)():(kb.error("Invalid JSON: "+b),void 0)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||kb.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&kb.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(ub,"ms-").replace(vb,wb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;g>f&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:jb&&!jb.call(" ")?function(a){return null==a?"":jb.call(a)}:function(a){return null==a?"":(a+"").replace(nb,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?kb.merge(d,"string"==typeof a?[a]:a):eb.call(d,a)),d},inArray:function(a,b,c){var d;if(b){if(gb)return gb.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;g>f;f++)e=b(a[f],f,d),null!=e&&(i[i.length]=e);else for(f in a)e=b(a[f],f,d),null!=e&&(i[i.length]=e);return db.apply([],i)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(f=a[c],c=a,a=f),kb.isFunction(a)?(d=fb.call(arguments,2),e=function(){return a.apply(c||this,d.concat(fb.call(arguments)))},e.guid=a.guid=a.guid||kb.guid++,e):b},access:function(a,c,d,e,f,g,h){var i=0,j=a.length,k=null==d;if("object"===kb.type(d)){f=!0;for(i in d)kb.access(a,c,i,d[i],!0,g,h)}else if(e!==b&&(f=!0,kb.isFunction(e)||(h=!0),k&&(h?(c.call(a,e),c=null):(k=c,c=function(a,b,c){return k.call(kb(a),c)})),c))for(;j>i;i++)c(a[i],d,h?e:e.call(a[i],i,c(a[i],d)));return f?a:k?c.call(a):j?c(a[0],d):g},now:function(){return(new Date).getTime()},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),kb.ready.promise=function(b){if(!U)if(U=kb.Deferred(),"complete"===Y.readyState)setTimeout(kb.ready);else if(Y.addEventListener)Y.addEventListener("DOMContentLoaded",xb,!1),a.addEventListener("load",xb,!1);else{Y.attachEvent("onreadystatechange",xb),a.attachEvent("onload",xb);var c=!1;try{c=null==a.frameElement&&Y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!kb.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}yb(),kb.ready()}}()}return U.promise(b)},kb.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){ab["[object "+b+"]"]=b.toLowerCase()}),V=kb(Y),function(a,b){function c(a,b,c,d){var e,f,g,h,i,j,k,l,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],!a||"string"!=typeof a)return c;if(1!==(h=b.nodeType)&&9!==h)return[];if(I&&!d){if(e=tb.exec(a))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return ab.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&x.getElementsByClassName&&b.getElementsByClassName)return ab.apply(c,b.getElementsByClassName(g)),c}if(x.qsa&&(!J||!J.test(a))){if(l=k=N,o=b,p=9===h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=m(a),(k=b.getAttribute("id"))?l=k.replace(wb,"\\$&"):b.setAttribute("id",l),l="[id='"+l+"'] ",i=j.length;i--;)j[i]=l+n(j[i]);o=nb.test(a)&&b.parentNode||b,p=j.join(",")}if(p)try{return ab.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{k||b.removeAttribute("id")}}}return v(a.replace(jb,"$1"),b,c,d)}function d(){function a(c,d){return b.push(c+=" ")>z.cacheLength&&delete a[b.shift()],a[c]=d}var b=[];return a}function e(a){return a[N]=!0,a}function f(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)z.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||X)-(~a.sourceIndex||X);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function i(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function j(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return e(function(b){return b=+b,e(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(){}function m(a,b){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=z.preFilter;h;){(!d||(e=lb.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=mb.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(jb," ")}),h=h.slice(d.length));for(g in z.filter)!(e=rb[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return b?h.length:h?c.error(a):S(a,i).slice(0)}function n(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function o(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=P+" "+f;if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e)if(j=b[N]||(b[N]={}),(i=j[d])&&i[0]===k){if((h=i[1])===!0||h===y)return h===!0}else if(i=j[d]=[k],i[1]=a(b,c,g)||y,i[1]===!0)return!0}}function p(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function r(a,b,c,d,f,g){return d&&!d[N]&&(d=r(d)),f&&!f[N]&&(f=r(f,g)),e(function(e,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=e||u(b||"*",h.nodeType?[h]:h,[]),r=!a||!e&&b?p:q(p,m,a,h,i),s=c?f||(e?a:o||d)?[]:g:r;if(c&&c(r,s,h,i),d)for(j=q(s,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(s[n[k]]=!(r[n[k]]=l));if(e){if(f||a){if(f){for(j=[],k=s.length;k--;)(l=s[k])&&j.push(r[k]=l);f(null,s=[],j,i)}for(k=s.length;k--;)(l=s[k])&&(j=f?cb.call(e,l):m[k])>-1&&(e[j]=!(g[j]=l))}}else s=q(s===g?s.splice(o,s.length):s),f?f(null,g,s,i):ab.apply(g,s)})}function s(a){for(var b,c,d,e=a.length,f=z.relative[a[0].type],g=f||z.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return cb.call(b,a)>-1},g,!0),k=[function(a,c,d){return!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d))}];e>h;h++)if(c=z.relative[a[h].type])k=[o(p(k),c)];else{if(c=z.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;e>d&&!z.relative[a[d].type];d++);return r(h>1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(jb,"$1"),c,d>h&&s(a.slice(h,d)),e>d&&s(a=a.slice(d)),e>d&&n(a))}k.push(c)}return p(k)}function t(a,b){var d=0,f=b.length>0,g=a.length>0,h=function(e,h,i,j,k){var l,m,n,o=[],p=0,r="0",s=e&&[],t=null!=k,u=D,v=e||g&&z.find.TAG("*",k&&h.parentNode||h),w=P+=null==u?1:Math.random()||.1;for(t&&(D=h!==G&&h,y=d);null!=(l=v[r]);r++){if(g&&l){for(m=0;n=a[m++];)if(n(l,h,i)){j.push(l);break}t&&(P=w,y=++d)}f&&((l=!n&&l)&&p--,e&&s.push(l))}if(p+=r,f&&r!==p){for(m=0;n=b[m++];)n(s,o,h,i);if(e){if(p>0)for(;r--;)s[r]||o[r]||(o[r]=$.call(j));o=q(o)}ab.apply(j,o),t&&!e&&o.length>0&&p+b.length>1&&c.uniqueSort(j)}return t&&(P=w,D=u),s};return f?e(h):h}function u(a,b,d){for(var e=0,f=b.length;f>e;e++)c(a,b[e],d);return d}function v(a,b,c,d){var e,f,g,h,i,j=m(a);if(!d&&1===j.length){if(f=j[0]=j[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&x.getById&&9===b.nodeType&&I&&z.relative[f[1].type]){if(b=(z.find.ID(g.matches[0].replace(xb,yb),b)||[])[0],!b)return c;a=a.slice(f.shift().value.length)}for(e=rb.needsContext.test(a)?0:f.length;e--&&(g=f[e],!z.relative[h=g.type]);)if((i=z.find[h])&&(d=i(g.matches[0].replace(xb,yb),nb.test(f[0].type)&&b.parentNode||b))){if(f.splice(e,1),a=d.length&&n(f),!a)return ab.apply(c,d),c;break}}return C(a,j)(d,b,!I,c,nb.test(a)),c}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+-new Date,O=a.document,P=0,Q=0,R=d(),S=d(),T=d(),U=!1,V=function(a,b){return a===b?(U=!0,0):0},W=typeof b,X=1<<31,Y={}.hasOwnProperty,Z=[],$=Z.pop,_=Z.push,ab=Z.push,bb=Z.slice,cb=Z.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},db="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",eb="[\\x20\\t\\r\\n\\f]",fb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",gb=fb.replace("w","w#"),hb="\\["+eb+"*("+fb+")"+eb+"*(?:([*^$|!~]?=)"+eb+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+gb+")|)|)"+eb+"*\\]",ib=":("+fb+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+hb.replace(3,8)+")*)|.*)\\)|)",jb=new RegExp("^"+eb+"+|((?:^|[^\\\\])(?:\\\\.)*)"+eb+"+$","g"),lb=new RegExp("^"+eb+"*,"+eb+"*"),mb=new RegExp("^"+eb+"*([>+~]|"+eb+")"+eb+"*"),nb=new RegExp(eb+"*[+~]"),ob=new RegExp("="+eb+"*([^\\]'\"]*)"+eb+"*\\]","g"),pb=new RegExp(ib),qb=new RegExp("^"+gb+"$"),rb={ID:new RegExp("^#("+fb+")"),CLASS:new RegExp("^\\.("+fb+")"),TAG:new RegExp("^("+fb.replace("w","w*")+")"),ATTR:new RegExp("^"+hb),PSEUDO:new RegExp("^"+ib),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+eb+"*(even|odd|(([+-]|)(\\d*)n|)"+eb+"*(?:([+-]|)"+eb+"*(\\d+)|))"+eb+"*\\)|)","i"),bool:new RegExp("^(?:"+db+")$","i"),needsContext:new RegExp("^"+eb+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+eb+"*((?:-\\d)?\\d*)"+eb+"*\\)|)(?=[^-]|$)","i")},sb=/^[^{]+\{\s*\[native \w/,tb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ub=/^(?:input|select|textarea|button)$/i,vb=/^h\d$/i,wb=/'|\\/g,xb=new RegExp("\\\\([\\da-f]{1,6}"+eb+"?|("+eb+")|.)","ig"),yb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{ab.apply(Z=bb.call(O.childNodes),O.childNodes),Z[O.childNodes.length].nodeType}catch(zb){ab={apply:Z.length?function(a,b){_.apply(a,bb.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}B=c.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},x=c.support={},F=c.setDocument=function(a){var b=a?a.ownerDocument||a:O,c=b.defaultView;return b!==G&&9===b.nodeType&&b.documentElement?(G=b,H=b.documentElement,I=!B(b),c&&c.attachEvent&&c!==c.top&&c.attachEvent("onbeforeunload",function(){F()}),x.attributes=f(function(a){return a.className="i",!a.getAttribute("className")}),x.getElementsByTagName=f(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),x.getElementsByClassName=f(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),x.getById=f(function(a){return H.appendChild(a).id=N,!b.getElementsByName||!b.getElementsByName(N).length}),x.getById?(z.find.ID=function(a,b){if(typeof b.getElementById!==W&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){return a.getAttribute("id")===b}}):(delete z.find.ID,z.filter.ID=function(a){var b=a.replace(xb,yb);return function(a){var c=typeof a.getAttributeNode!==W&&a.getAttributeNode("id");return c&&c.value===b}}),z.find.TAG=x.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==W?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},z.find.CLASS=x.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==W&&I?b.getElementsByClassName(a):void 0},K=[],J=[],(x.qsa=sb.test(b.querySelectorAll))&&(f(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||J.push("\\["+eb+"*(?:value|"+db+")"),a.querySelectorAll(":checked").length||J.push(":checked")}),f(function(a){var c=b.createElement("input");c.setAttribute("type","hidden"),a.appendChild(c).setAttribute("t",""),a.querySelectorAll("[t^='']").length&&J.push("[*^$]="+eb+"*(?:''|\"\")"),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(x.matchesSelector=sb.test(L=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&f(function(a){x.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ib)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),M=sb.test(H.contains)||H.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},V=H.compareDocumentPosition?function(a,c){if(a===c)return U=!0,0;var d=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return d?1&d||!x.sortDetached&&c.compareDocumentPosition(a)===d?a===b||M(O,a)?-1:c===b||M(O,c)?1:E?cb.call(E,a)-cb.call(E,c):0:4&d?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,i=[a],j=[c];if(a===c)return U=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:E?cb.call(E,a)-cb.call(E,c):0;if(f===g)return h(a,c);for(d=a;d=d.parentNode;)i.unshift(d);for(d=c;d=d.parentNode;)j.unshift(d);for(;i[e]===j[e];)e++;return e?h(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},b):G},c.matches=function(a,b){return c(a,null,null,b)},c.matchesSelector=function(a,b){if((a.ownerDocument||a)!==G&&F(a),b=b.replace(ob,"='$1']"),!(!x.matchesSelector||!I||K&&K.test(b)||J&&J.test(b)))try{var d=L.call(a,b);if(d||x.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return c(b,G,null,[a]).length>0},c.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},c.attr=function(a,c){(a.ownerDocument||a)!==G&&F(a);var d=z.attrHandle[c.toLowerCase()],e=d&&Y.call(z.attrHandle,c.toLowerCase())?d(a,c,!I):b;return e===b?x.attributes||!I?a.getAttribute(c):(e=a.getAttributeNode(c))&&e.specified?e.value:null:e},c.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},c.uniqueSort=function(a){var b,c=[],d=0,e=0;if(U=!x.detectDuplicates,E=!x.sortStable&&a.slice(0),a.sort(V),U){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return a},A=c.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=A(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=A(b);return c},z=c.selectors={cacheLength:50,createPseudo:e,match:rb,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(xb,yb),a[3]=(a[4]||a[5]||"").replace(xb,yb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||c.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&c.error(a[0]),a},PSEUDO:function(a){var c,d=!a[5]&&a[2];return rb.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:d&&pb.test(d)&&(c=m(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(a[0]=a[0].slice(0,c),a[2]=d.slice(0,c)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(xb,yb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+eb+")"+a+"("+eb+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==W&&a.getAttribute("class")||"")})},ATTR:function(a,b,d){return function(e){var f=c.attr(e,a);return null==f?"!="===b:b?(f+="","="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&f.indexOf(d)>-1:"$="===b?d&&f.slice(-d.length)===d:"~="===b?(" "+f+" ").indexOf(d)>-1:"|="===b?f===d||f.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var d,f=z.pseudos[a]||z.setFilters[a.toLowerCase()]||c.error("unsupported pseudo: "+a);return f[N]?f(b):f.length>1?(d=[a,a,"",b],z.setFilters.hasOwnProperty(a.toLowerCase())?e(function(a,c){for(var d,e=f(a,b),g=e.length;g--;)d=cb.call(a,e[g]),a[d]=!(c[d]=e[g])}):function(a){return f(a,0,d)}):f}},pseudos:{not:e(function(a){var b=[],c=[],d=C(a.replace(jb,"$1"));return d[N]?e(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:e(function(a){return function(b){return c(a,b).length>0}}),contains:e(function(a){return function(b){return(b.textContent||b.innerText||A(b)).indexOf(a)>-1}}),lang:e(function(a){return qb.test(a||"")||c.error("unsupported lang: "+a),a=a.replace(xb,yb).toLowerCase(),function(b){var c;do if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!z.pseudos.empty(a)},header:function(a){return vb.test(a.nodeName)},input:function(a){return ub.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[0>c?c+b:c]}),even:k(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:k(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:k(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},z.pseudos.nth=z.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})z.pseudos[w]=i(w);for(w in{submit:!0,reset:!0})z.pseudos[w]=j(w);l.prototype=z.filters=z.pseudos,z.setFilters=new l,C=c.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=m(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);
+f=T(a,t(e,d))}return f},x.sortStable=N.split("").sort(V).join("")===N,x.detectDuplicates=U,F(),x.sortDetached=f(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),x.attributes&&f(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g(db,function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&d.specified?d.value:a[b]===!0?b.toLowerCase():null}),kb.find=c,kb.expr=c.selectors,kb.expr[":"]=kb.expr.pseudos,kb.unique=c.uniqueSort,kb.text=c.getText,kb.isXMLDoc=c.isXML,kb.contains=c.contains}(a);var zb={};kb.Callbacks=function(a){a="string"==typeof a?zb[a]||d(a):kb.extend({},a);var c,e,f,g,h,i,j=[],k=!a.once&&[],l=function(b){for(e=a.memory&&b,f=!0,h=i||0,i=0,g=j.length,c=!0;j&&g>h;h++)if(j[h].apply(b[0],b[1])===!1&&a.stopOnFalse){e=!1;break}c=!1,j&&(k?k.length&&l(k.shift()):e?j=[]:m.disable())},m={add:function(){if(j){var b=j.length;!function d(b){kb.each(b,function(b,c){var e=kb.type(c);"function"===e?a.unique&&m.has(c)||j.push(c):c&&c.length&&"string"!==e&&d(c)})}(arguments),c?g=j.length:e&&(i=b,l(e))}return this},remove:function(){return j&&kb.each(arguments,function(a,b){for(var d;(d=kb.inArray(b,j,d))>-1;)j.splice(d,1),c&&(g>=d&&g--,h>=d&&h--)}),this},has:function(a){return a?kb.inArray(a,j)>-1:!(!j||!j.length)},empty:function(){return j=[],g=0,this},disable:function(){return j=k=e=b,this},disabled:function(){return!j},lock:function(){return k=b,e||m.disable(),this},locked:function(){return!k},fireWith:function(a,b){return!j||f&&!k||(b=b||[],b=[a,b.slice?b.slice():b],c?k.push(b):l(b)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!f}};return m},kb.extend({Deferred:function(a){var b=[["resolve","done",kb.Callbacks("once memory"),"resolved"],["reject","fail",kb.Callbacks("once memory"),"rejected"],["notify","progress",kb.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return kb.Deferred(function(c){kb.each(b,function(b,f){var g=f[0],h=kb.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&kb.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?kb.extend(a,d):d}},e={};return d.pipe=d.then,kb.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=fb.call(arguments),g=f.length,h=1!==g||a&&kb.isFunction(a.promise)?g:0,i=1===h?a:kb.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?fb.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&kb.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),kb.support=function(b){var c,d,e,f,g,h,i,j,k,l=Y.createElement("div");if(l.setAttribute("className","t"),l.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=l.getElementsByTagName("*")||[],d=l.getElementsByTagName("a")[0],!d||!d.style||!c.length)return b;f=Y.createElement("select"),h=f.appendChild(Y.createElement("option")),e=l.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b.getSetAttribute="t"!==l.className,b.leadingWhitespace=3===l.firstChild.nodeType,b.tbody=!l.getElementsByTagName("tbody").length,b.htmlSerialize=!!l.getElementsByTagName("link").length,b.style=/top/.test(d.getAttribute("style")),b.hrefNormalized="/a"===d.getAttribute("href"),b.opacity=/^0.5/.test(d.style.opacity),b.cssFloat=!!d.style.cssFloat,b.checkOn=!!e.value,b.optSelected=h.selected,b.enctype=!!Y.createElement("form").enctype,b.html5Clone="<:nav></:nav>"!==Y.createElement("nav").cloneNode(!0).outerHTML,b.inlineBlockNeedsLayout=!1,b.shrinkWrapBlocks=!1,b.pixelPosition=!1,b.deleteExpando=!0,b.noCloneEvent=!0,b.reliableMarginRight=!0,b.boxSizingReliable=!0,e.checked=!0,b.noCloneChecked=e.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!h.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}e=Y.createElement("input"),e.setAttribute("value",""),b.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),b.radioValue="t"===e.value,e.setAttribute("checked","t"),e.setAttribute("name","t"),g=Y.createDocumentFragment(),g.appendChild(e),b.appendChecked=e.checked,b.checkClone=g.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).click());for(k in{submit:!0,change:!0,focusin:!0})l.setAttribute(i="on"+k,"t"),b[k+"Bubbles"]=i in a||l.attributes[i].expando===!1;l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===l.style.backgroundClip;for(k in kb(b))break;return b.ownLast="0"!==k,kb(function(){var c,d,e,f="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",g=Y.getElementsByTagName("body")[0];g&&(c=Y.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=l.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",j=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",b.reliableHiddenOffsets=j&&0===e[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",kb.swap(g,null!=g.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===l.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(l,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,d=l.appendChild(Y.createElement("div")),d.style.cssText=l.style.cssText=f,d.style.marginRight=d.style.width="0",l.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof l.style.zoom!==W&&(l.innerHTML="",l.style.cssText=f+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==l.offsetWidth,b.inlineBlockNeedsLayout&&(g.style.zoom=1)),g.removeChild(c),c=l=e=d=null)}),c=f=g=h=d=e=null,b}({});var Ab=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Bb=/([A-Z])/g;kb.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?kb.cache[a[kb.expando]]:a[kb.expando],!!a&&!h(a)},data:function(a,b,c){return e(a,b,c)},removeData:function(a,b){return f(a,b)},_data:function(a,b,c){return e(a,b,c,!0)},_removeData:function(a,b){return f(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&kb.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),kb.fn.extend({data:function(a,c){var d,e,f=null,h=0,i=this[0];if(a===b){if(this.length&&(f=kb.data(i),1===i.nodeType&&!kb._data(i,"parsedAttrs"))){for(d=i.attributes;h<d.length;h++)e=d[h].name,0===e.indexOf("data-")&&(e=kb.camelCase(e.slice(5)),g(i,e,f[e]));kb._data(i,"parsedAttrs",!0)}return f}return"object"==typeof a?this.each(function(){kb.data(this,a)}):arguments.length>1?this.each(function(){kb.data(this,a,c)}):i?g(i,a,kb.data(i,a)):null},removeData:function(a){return this.each(function(){kb.removeData(this,a)})}}),kb.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=kb._data(a,b),c&&(!d||kb.isArray(c)?d=kb._data(a,b,kb.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=kb.queue(a,b),d=c.length,e=c.shift(),f=kb._queueHooks(a,b),g=function(){kb.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return kb._data(a,c)||kb._data(a,c,{empty:kb.Callbacks("once memory").add(function(){kb._removeData(a,b+"queue"),kb._removeData(a,c)})})}}),kb.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?kb.queue(this[0],a):c===b?this:this.each(function(){var b=kb.queue(this,a,c);kb._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&kb.dequeue(this,a)})},dequeue:function(a){return this.each(function(){kb.dequeue(this,a)})},delay:function(a,b){return a=kb.fx?kb.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=kb.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=kb._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var Cb,Db,Eb=/[\t\r\n\f]/g,Fb=/\r/g,Gb=/^(?:input|select|textarea|button|object)$/i,Hb=/^(?:a|area)$/i,Ib=/^(?:checked|selected)$/i,Jb=kb.support.getSetAttribute,Kb=kb.support.input;kb.fn.extend({attr:function(a,b){return kb.access(this,kb.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){kb.removeAttr(this,a)})},prop:function(a,b){return kb.access(this,kb.prop,a,b,arguments.length>1)},removeProp:function(a){return a=kb.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=kb.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(kb.isFunction(a))return this.each(function(b){kb(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(mb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?kb.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):kb.isFunction(a)?this.each(function(c){kb(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=kb(this),f=a.match(mb)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===W||"boolean"===c)&&(this.className&&kb._data(this,"__className__",this.className),this.className=this.className||a===!1?"":kb._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(Eb," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=kb.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,kb(this).val()):a,null==f?f="":"number"==typeof f?f+="":kb.isArray(f)&&(f=kb.map(f,function(a){return null==a?"":a+""})),d=kb.valHooks[this.type]||kb.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=kb.valHooks[f.type]||kb.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(Fb,""):null==c?"":c)}}}),kb.extend({valHooks:{option:{get:function(a){var b=kb.find.attr(a,"value");return null!=b?b:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(kb.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&kb.nodeName(c.parentNode,"optgroup"))){if(b=kb(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=kb.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=kb.inArray(kb(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,c,d){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return typeof a.getAttribute===W?kb.prop(a,c,d):(1===g&&kb.isXMLDoc(a)||(c=c.toLowerCase(),e=kb.attrHooks[c]||(kb.expr.match.bool.test(c)?Db:Cb)),d===b?e&&"get"in e&&null!==(f=e.get(a,c))?f:(f=kb.find.attr(a,c),null==f?b:f):null!==d?e&&"set"in e&&(f=e.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d):(kb.removeAttr(a,c),void 0))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(mb);if(f&&1===a.nodeType)for(;c=f[e++];)d=kb.propFix[c]||c,kb.expr.match.bool.test(c)?Kb&&Jb||!Ib.test(c)?a[d]=!1:a[kb.camelCase("default-"+c)]=a[d]=!1:kb.attr(a,c,""),a.removeAttribute(Jb?c:d)},attrHooks:{type:{set:function(a,b){if(!kb.support.radioValue&&"radio"===b&&kb.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!kb.isXMLDoc(a),g&&(c=kb.propFix[c]||c,f=kb.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var b=kb.find.attr(a,"tabindex");return b?parseInt(b,10):Gb.test(a.nodeName)||Hb.test(a.nodeName)&&a.href?0:-1}}}}),Db={set:function(a,b,c){return b===!1?kb.removeAttr(a,c):Kb&&Jb||!Ib.test(c)?a.setAttribute(!Jb&&kb.propFix[c]||c,c):a[kb.camelCase("default-"+c)]=a[c]=!0,c}},kb.each(kb.expr.match.bool.source.match(/\w+/g),function(a,c){var d=kb.expr.attrHandle[c]||kb.find.attr;kb.expr.attrHandle[c]=Kb&&Jb||!Ib.test(c)?function(a,c,e){var f=kb.expr.attrHandle[c],g=e?b:(kb.expr.attrHandle[c]=b)!=d(a,c,e)?c.toLowerCase():null;return kb.expr.attrHandle[c]=f,g}:function(a,c,d){return d?b:a[kb.camelCase("default-"+c)]?c.toLowerCase():null}}),Kb&&Jb||(kb.attrHooks.value={set:function(a,b,c){return kb.nodeName(a,"input")?(a.defaultValue=b,void 0):Cb&&Cb.set(a,b,c)}}),Jb||(Cb={set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},kb.expr.attrHandle.id=kb.expr.attrHandle.name=kb.expr.attrHandle.coords=function(a,c,d){var e;return d?b:(e=a.getAttributeNode(c))&&""!==e.value?e.value:null},kb.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&d.specified?d.value:b},set:Cb.set},kb.attrHooks.contenteditable={set:function(a,b,c){Cb.set(a,""===b?!1:b,c)}},kb.each(["width","height"],function(a,b){kb.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),kb.support.hrefNormalized||kb.each(["href","src"],function(a,b){kb.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),kb.support.style||(kb.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),kb.support.optSelected||(kb.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),kb.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){kb.propFix[this.toLowerCase()]=this}),kb.support.enctype||(kb.propFix.enctype="encoding"),kb.each(["radio","checkbox"],function(){kb.valHooks[this]={set:function(a,b){return kb.isArray(b)?a.checked=kb.inArray(kb(a).val(),b)>=0:void 0}},kb.support.checkOn||(kb.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var Lb=/^(?:input|select|textarea)$/i,Mb=/^key/,Nb=/^(?:mouse|contextmenu)|click/,Ob=/^(?:focusinfocus|focusoutblur)$/,Pb=/^([^.]*)(?:\.(.+)|)$/;kb.event={global:{},add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r=kb._data(a);if(r){for(d.handler&&(j=d,d=j.handler,f=j.selector),d.guid||(d.guid=kb.guid++),(h=r.events)||(h=r.events={}),(l=r.handle)||(l=r.handle=function(a){return typeof kb===W||a&&kb.event.triggered===a.type?b:kb.event.dispatch.apply(l.elem,arguments)},l.elem=a),c=(c||"").match(mb)||[""],i=c.length;i--;)g=Pb.exec(c[i])||[],o=q=g[1],p=(g[2]||"").split(".").sort(),o&&(k=kb.event.special[o]||{},o=(f?k.delegateType:k.bindType)||o,k=kb.event.special[o]||{},m=kb.extend({type:o,origType:q,data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&kb.expr.match.needsContext.test(f),namespace:p.join(".")},j),(n=h[o])||(n=h[o]=[],n.delegateCount=0,k.setup&&k.setup.call(a,e,p,l)!==!1||(a.addEventListener?a.addEventListener(o,l,!1):a.attachEvent&&a.attachEvent("on"+o,l))),k.add&&(k.add.call(a,m),m.handler.guid||(m.handler.guid=d.guid)),f?n.splice(n.delegateCount++,0,m):n.push(m),kb.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=kb.hasData(a)&&kb._data(a);if(q&&(k=q.events)){for(b=(b||"").match(mb)||[""],j=b.length;j--;)if(h=Pb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=kb.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||kb.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)kb.event.remove(a,n+b[j],c,d,!0);kb.isEmptyObject(k)&&(delete q.handle,kb._removeData(a,"events"))}},trigger:function(c,d,e,f){var g,h,i,j,k,l,m,n=[e||Y],o=ib.call(c,"type")?c.type:c,p=ib.call(c,"namespace")?c.namespace.split("."):[];if(i=l=e=e||Y,3!==e.nodeType&&8!==e.nodeType&&!Ob.test(o+kb.event.triggered)&&(o.indexOf(".")>=0&&(p=o.split("."),o=p.shift(),p.sort()),h=o.indexOf(":")<0&&"on"+o,c=c[kb.expando]?c:new kb.Event(o,"object"==typeof c&&c),c.isTrigger=f?2:3,c.namespace=p.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:kb.makeArray(d,[c]),k=kb.event.special[o]||{},f||!k.trigger||k.trigger.apply(e,d)!==!1)){if(!f&&!k.noBubble&&!kb.isWindow(e)){for(j=k.delegateType||o,Ob.test(j+o)||(i=i.parentNode);i;i=i.parentNode)n.push(i),l=i;l===(e.ownerDocument||Y)&&n.push(l.defaultView||l.parentWindow||a)}for(m=0;(i=n[m++])&&!c.isPropagationStopped();)c.type=m>1?j:k.bindType||o,g=(kb._data(i,"events")||{})[c.type]&&kb._data(i,"handle"),g&&g.apply(i,d),g=h&&i[h],g&&kb.acceptData(i)&&g.apply&&g.apply(i,d)===!1&&c.preventDefault();if(c.type=o,!f&&!c.isDefaultPrevented()&&(!k._default||k._default.apply(n.pop(),d)===!1)&&kb.acceptData(e)&&h&&e[o]&&!kb.isWindow(e)){l=e[h],l&&(e[h]=null),kb.event.triggered=o;try{e[o]()}catch(q){}kb.event.triggered=b,l&&(e[h]=l)}return c.result}},dispatch:function(a){a=kb.event.fix(a);var c,d,e,f,g,h=[],i=fb.call(arguments),j=(kb._data(this,"events")||{})[a.type]||[],k=kb.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=kb.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,d=((kb.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;i>g;g++)e=c[g],d=e.selector+" ",f[d]===b&&(f[d]=e.needsContext?kb(d,this).index(j)>=0:kb.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return i<c.length&&h.push({elem:this,handlers:c.slice(i)}),h},fix:function(a){if(a[kb.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Nb.test(e)?this.mouseHooks:Mb.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new kb.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||Y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f,g=c.button,h=c.fromElement;return null==a.pageX&&null!=c.clientX&&(e=a.target.ownerDocument||Y,f=e.documentElement,d=e.body,a.pageX=c.clientX+(f&&f.scrollLeft||d&&d.scrollLeft||0)-(f&&f.clientLeft||d&&d.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||d&&d.scrollTop||0)-(f&&f.clientTop||d&&d.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?c.toElement:h),a.which||g===b||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==k()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===k()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return kb.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return kb.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=kb.extend(new kb.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?kb.event.trigger(e,null,b):kb.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},kb.removeEvent=Y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===W&&(a[d]=null),a.detachEvent(d,c))},kb.Event=function(a,b){return this instanceof kb.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?i:j):this.type=a,b&&kb.extend(this,b),this.timeStamp=a&&a.timeStamp||kb.now(),this[kb.expando]=!0,void 0):new kb.Event(a,b)},kb.Event.prototype={isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=i,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=i,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()}},kb.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){kb.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!kb.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),kb.support.submitBubbles||(kb.event.special.submit={setup:function(){return kb.nodeName(this,"form")?!1:(kb.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=kb.nodeName(c,"input")||kb.nodeName(c,"button")?c.form:b;d&&!kb._data(d,"submitBubbles")&&(kb.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),kb._data(d,"submitBubbles",!0))}),void 0)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&kb.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return kb.nodeName(this,"form")?!1:(kb.event.remove(this,"._submit"),void 0)}}),kb.support.changeBubbles||(kb.event.special.change={setup:function(){return Lb.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(kb.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),kb.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),kb.event.simulate("change",this,a,!0)})),!1):(kb.event.add(this,"beforeactivate._change",function(a){var b=a.target;Lb.test(b.nodeName)&&!kb._data(b,"changeBubbles")&&(kb.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||kb.event.simulate("change",this.parentNode,a,!0)}),kb._data(b,"changeBubbles",!0))}),void 0)},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return kb.event.remove(this,"._change"),!Lb.test(this.nodeName)}}),kb.support.focusinBubbles||kb.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){kb.event.simulate(b,a.target,kb.event.fix(a),!0)};kb.event.special[b]={setup:function(){0===c++&&Y.addEventListener(a,d,!0)},teardown:function(){0===--c&&Y.removeEventListener(a,d,!0)}}}),kb.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(g in a)this.on(g,c,d,a[g],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=j;else if(!e)return this;return 1===f&&(h=e,e=function(a){return kb().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=kb.guid++)),this.each(function(){kb.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,kb(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=j),this.each(function(){kb.event.remove(this,a,d,c)})},trigger:function(a,b){return this.each(function(){kb.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?kb.event.trigger(a,b,c,!0):void 0}});var Qb=/^.[^:#\[\.,]*$/,Rb=/^(?:parents|prev(?:Until|All))/,Sb=kb.expr.match.needsContext,Tb={children:!0,contents:!0,next:!0,prev:!0};kb.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(kb(a).filter(function(){for(b=0;e>b;b++)if(kb.contains(d[b],this))return!0}));for(b=0;e>b;b++)kb.find(a,d[b],c);return c=this.pushStack(e>1?kb.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=kb(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(kb.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(m(this,a||[],!0))},filter:function(a){return this.pushStack(m(this,a||[],!1))},is:function(a){return!!m(this,"string"==typeof a&&Sb.test(a)?kb(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Sb.test(a)||"string"!=typeof a?kb(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&kb.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?kb.unique(f):f)},index:function(a){return a?"string"==typeof a?kb.inArray(this[0],kb(a)):kb.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?kb(a,b):kb.makeArray(a&&a.nodeType?[a]:a),d=kb.merge(this.get(),c);return this.pushStack(kb.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),kb.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return kb.dir(a,"parentNode")},parentsUntil:function(a,b,c){return kb.dir(a,"parentNode",c)},next:function(a){return l(a,"nextSibling")},prev:function(a){return l(a,"previousSibling")},nextAll:function(a){return kb.dir(a,"nextSibling")},prevAll:function(a){return kb.dir(a,"previousSibling")},nextUntil:function(a,b,c){return kb.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return kb.dir(a,"previousSibling",c)},siblings:function(a){return kb.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return kb.sibling(a.firstChild)},contents:function(a){return kb.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:kb.merge([],a.childNodes)}},function(a,b){kb.fn[a]=function(c,d){var e=kb.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=kb.filter(d,e)),this.length>1&&(Tb[a]||(e=kb.unique(e)),Rb.test(a)&&(e=e.reverse())),this.pushStack(e)}}),kb.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?kb.find.matchesSelector(d,a)?[d]:[]:kb.find.matches(a,kb.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!kb(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Ub="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,Wb=new RegExp("<(?:"+Ub+")[\\s/>]","i"),Xb=/^\s+/,Yb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Zb=/<([\w:]+)/,$b=/<tbody/i,_b=/<|&#?\w+;/,ac=/<(?:script|style|link)/i,bc=/^(?:checkbox|radio)$/i,cc=/checked\s*(?:[^=]|=\s*.checked.)/i,dc=/^$|\/(?:java|ecma)script/i,ec=/^true\/(.*)/,fc=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,gc={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:kb.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},hc=n(Y),ic=hc.appendChild(Y.createElement("div"));gc.optgroup=gc.option,gc.tbody=gc.tfoot=gc.colgroup=gc.caption=gc.thead,gc.th=gc.td,kb.fn.extend({text:function(a){return kb.access(this,function(a){return a===b?kb.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=o(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?kb.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||kb.cleanData(u(c)),c.parentNode&&(b&&kb.contains(c.ownerDocument,c)&&r(u(c,"script")),c.parentNode.removeChild(c));
+return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&kb.cleanData(u(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&kb.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return kb.clone(this,a,b)})},html:function(a){return kb.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Vb,""):b;if(!("string"!=typeof a||ac.test(a)||!kb.support.htmlSerialize&&Wb.test(a)||!kb.support.leadingWhitespace&&Xb.test(a)||gc[(Zb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Yb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(kb.cleanData(u(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=kb.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),kb(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=db.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,l=this,m=k-1,n=a[0],o=kb.isFunction(n);if(o||!(1>=k||"string"!=typeof n||kb.support.checkClone)&&cc.test(n))return this.each(function(d){var e=l.eq(d);o&&(a[0]=n.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(i=kb.buildFragment(a,this[0].ownerDocument,!1,!c&&this),d=i.firstChild,1===i.childNodes.length&&(i=d),d)){for(g=kb.map(u(i,"script"),p),f=g.length;k>j;j++)e=i,j!==m&&(e=kb.clone(e,!0,!0),f&&kb.merge(g,u(e,"script"))),b.call(this[j],e,j);if(f)for(h=g[g.length-1].ownerDocument,kb.map(g,q),j=0;f>j;j++)e=g[j],dc.test(e.type||"")&&!kb._data(e,"globalEval")&&kb.contains(h,e)&&(e.src?kb._evalUrl(e.src):kb.globalEval((e.text||e.textContent||e.innerHTML||"").replace(fc,"")));i=d=null}return this}}),kb.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){kb.fn[a]=function(a){for(var c,d=0,e=[],f=kb(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),kb(f[d])[b](c),eb.apply(e,c.get());return this.pushStack(e)}}),kb.extend({clone:function(a,b,c){var d,e,f,g,h,i=kb.contains(a.ownerDocument,a);if(kb.support.html5Clone||kb.isXMLDoc(a)||!Wb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ic.innerHTML=a.outerHTML,ic.removeChild(f=ic.firstChild)),!(kb.support.noCloneEvent&&kb.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||kb.isXMLDoc(a)))for(d=u(f),h=u(a),g=0;null!=(e=h[g]);++g)d[g]&&t(e,d[g]);if(b)if(c)for(h=h||u(a),d=d||u(f),g=0;null!=(e=h[g]);g++)s(e,d[g]);else s(a,f);return d=u(f,"script"),d.length>0&&r(d,!i&&u(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=n(b),o=[],p=0;l>p;p++)if(f=a[p],f||0===f)if("object"===kb.type(f))kb.merge(o,f.nodeType?[f]:f);else if(_b.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Zb.exec(f)||["",""])[1].toLowerCase(),k=gc[i]||gc._default,h.innerHTML=k[1]+f.replace(Yb,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!kb.support.leadingWhitespace&&Xb.test(f)&&o.push(b.createTextNode(Xb.exec(f)[0])),!kb.support.tbody)for(f="table"!==i||$b.test(f)?"<table>"!==k[1]||$b.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)kb.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(kb.merge(o,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else o.push(b.createTextNode(f));for(h&&m.removeChild(h),kb.support.appendChecked||kb.grep(u(o,"input"),v),p=0;f=o[p++];)if((!d||-1===kb.inArray(f,d))&&(g=kb.contains(f.ownerDocument,f),h=u(m.appendChild(f),"script"),g&&r(h),c))for(e=0;f=h[e++];)dc.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=kb.expando,i=kb.cache,j=kb.support.deleteExpando,k=kb.event.special;null!=(c=a[g]);g++)if((b||kb.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?kb.event.remove(c,d):kb.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==W?c.removeAttribute(h):c[h]=null,bb.push(e))}},_evalUrl:function(a){return kb.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),kb.fn.extend({wrapAll:function(a){if(kb.isFunction(a))return this.each(function(b){kb(this).wrapAll(a.call(this,b))});if(this[0]){var b=kb(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return kb.isFunction(a)?this.each(function(b){kb(this).wrapInner(a.call(this,b))}):this.each(function(){var b=kb(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=kb.isFunction(a);return this.each(function(c){kb(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){kb.nodeName(this,"body")||kb(this).replaceWith(this.childNodes)}).end()}});var jc,kc,lc,mc=/alpha\([^)]*\)/i,nc=/opacity\s*=\s*([^)]*)/,oc=/^(top|right|bottom|left)$/,pc=/^(none|table(?!-c[ea]).+)/,qc=/^margin/,rc=new RegExp("^("+lb+")(.*)$","i"),sc=new RegExp("^("+lb+")(?!px)[a-z%]+$","i"),tc=new RegExp("^([+-])=("+lb+")","i"),uc={BODY:"block"},vc={position:"absolute",visibility:"hidden",display:"block"},wc={letterSpacing:0,fontWeight:400},xc=["Top","Right","Bottom","Left"],yc=["Webkit","O","Moz","ms"];kb.fn.extend({css:function(a,c){return kb.access(this,function(a,c,d){var e,f,g={},h=0;if(kb.isArray(c)){for(f=kc(a),e=c.length;e>h;h++)g[c[h]]=kb.css(a,c[h],!1,f);return g}return d!==b?kb.style(a,c,d):kb.css(a,c)},a,c,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){x(this)?kb(this).show():kb(this).hide()})}}),kb.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=lc(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":kb.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=kb.camelCase(c),j=a.style;if(c=kb.cssProps[i]||(kb.cssProps[i]=w(j,i)),h=kb.cssHooks[c]||kb.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=tc.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(kb.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||kb.cssNumber[i]||(d+="px"),kb.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=kb.camelCase(c);return c=kb.cssProps[i]||(kb.cssProps[i]=w(a.style,i)),h=kb.cssHooks[c]||kb.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=lc(a,c,e)),"normal"===g&&c in wc&&(g=wc[c]),""===d||d?(f=parseFloat(g),d===!0||kb.isNumeric(f)?f||0:g):g}}),a.getComputedStyle?(kc=function(b){return a.getComputedStyle(b,null)},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||kb.contains(a.ownerDocument,a)||(i=kb.style(a,c)),sc.test(i)&&qc.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):Y.documentElement.currentStyle&&(kc=function(a){return a.currentStyle},lc=function(a,c,d){var e,f,g,h=d||kc(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),sc.test(i)&&!oc.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),kb.each(["height","width"],function(a,b){kb.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&pc.test(kb.css(a,"display"))?kb.swap(a,vc,function(){return B(a,b,d)}):B(a,b,d):void 0},set:function(a,c,d){var e=d&&kc(a);return z(a,c,d?A(a,b,d,kb.support.boxSizing&&"border-box"===kb.css(a,"boxSizing",!1,e),e):0)}}}),kb.support.opacity||(kb.cssHooks.opacity={get:function(a,b){return nc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=kb.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===kb.trim(f.replace(mc,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=mc.test(f)?f.replace(mc,e):f+" "+e)}}),kb(function(){kb.support.reliableMarginRight||(kb.cssHooks.marginRight={get:function(a,b){return b?kb.swap(a,{display:"inline-block"},lc,[a,"marginRight"]):void 0}}),!kb.support.pixelPosition&&kb.fn.position&&kb.each(["top","left"],function(a,b){kb.cssHooks[b]={get:function(a,c){return c?(c=lc(a,b),sc.test(c)?kb(a).position()[b]+"px":c):void 0}}})}),kb.expr&&kb.expr.filters&&(kb.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!kb.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||kb.css(a,"display"))},kb.expr.filters.visible=function(a){return!kb.expr.filters.hidden(a)}),kb.each({margin:"",padding:"",border:"Width"},function(a,b){kb.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+xc[d]+b]=f[d]||f[d-2]||f[0];return e}},qc.test(a)||(kb.cssHooks[a+b].set=z)});var zc=/%20/g,Ac=/\[\]$/,Bc=/\r?\n/g,Cc=/^(?:submit|button|image|reset|file)$/i,Dc=/^(?:input|select|textarea|keygen)/i;kb.fn.extend({serialize:function(){return kb.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=kb.prop(this,"elements");return a?kb.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!kb(this).is(":disabled")&&Dc.test(this.nodeName)&&!Cc.test(a)&&(this.checked||!bc.test(a))}).map(function(a,b){var c=kb(this).val();return null==c?null:kb.isArray(c)?kb.map(c,function(a){return{name:b.name,value:a.replace(Bc,"\r\n")}}):{name:b.name,value:c.replace(Bc,"\r\n")}}).get()}}),kb.param=function(a,c){var d,e=[],f=function(a,b){b=kb.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=kb.ajaxSettings&&kb.ajaxSettings.traditional),kb.isArray(a)||a.jquery&&!kb.isPlainObject(a))kb.each(a,function(){f(this.name,this.value)});else for(d in a)E(d,a[d],c,f);return e.join("&").replace(zc,"+")},kb.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){kb.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),kb.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Ec,Fc,Gc=kb.now(),Hc=/\?/,Ic=/#.*$/,Jc=/([?&])_=[^&]*/,Kc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mc=/^(?:GET|HEAD)$/,Nc=/^\/\//,Oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Pc=kb.fn.load,Qc={},Rc={},Sc="*/".concat("*");try{Fc=X.href}catch(Tc){Fc=Y.createElement("a"),Fc.href="",Fc=Fc.href}Ec=Oc.exec(Fc.toLowerCase())||[],kb.fn.load=function(a,c,d){if("string"!=typeof a&&Pc)return Pc.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),kb.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&kb.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?kb("<div>").append(kb.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},kb.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){kb.fn[b]=function(a){return this.on(b,a)}}),kb.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fc,type:"GET",isLocal:Lc.test(Ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Sc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":kb.parseJSON,"text xml":kb.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?H(H(a,kb.ajaxSettings),b):H(kb.ajaxSettings,a)},ajaxPrefilter:F(Qc),ajaxTransport:F(Rc),ajax:function(a,c){function d(a,c,d,e){var f,l,s,t,v,x=c;2!==u&&(u=2,i&&clearTimeout(i),k=b,h=e||"",w.readyState=a>0?4:0,f=a>=200&&300>a||304===a,d&&(t=I(m,w,d)),t=J(m,t,w,f),f?(m.ifModified&&(v=w.getResponseHeader("Last-Modified"),v&&(kb.lastModified[g]=v),v=w.getResponseHeader("etag"),v&&(kb.etag[g]=v)),204===a||"HEAD"===m.type?x="nocontent":304===a?x="notmodified":(x=t.state,l=t.data,s=t.error,f=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),w.status=a,w.statusText=(c||x)+"",f?p.resolveWith(n,[l,x,w]):p.rejectWith(n,[w,x,s]),w.statusCode(r),r=b,j&&o.trigger(f?"ajaxSuccess":"ajaxError",[w,m,f?l:s]),q.fireWith(n,[w,x]),j&&(o.trigger("ajaxComplete",[w,m]),--kb.active||kb.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,j,k,l,m=kb.ajaxSetup({},c),n=m.context||m,o=m.context&&(n.nodeType||n.jquery)?kb(n):kb.event,p=kb.Deferred(),q=kb.Callbacks("once memory"),r=m.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!l)for(l={};b=Kc.exec(h);)l[b[1].toLowerCase()]=b[2];b=l[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?h:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return k&&k.abort(b),d(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,m.url=((a||m.url||Fc)+"").replace(Ic,"").replace(Nc,Ec[1]+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=kb.trim(m.dataType||"*").toLowerCase().match(mb)||[""],null==m.crossDomain&&(e=Oc.exec(m.url.toLowerCase()),m.crossDomain=!(!e||e[1]===Ec[1]&&e[2]===Ec[2]&&(e[3]||("http:"===e[1]?"80":"443"))===(Ec[3]||("http:"===Ec[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=kb.param(m.data,m.traditional)),G(Qc,m,c,w),2===u)return w;j=m.global,j&&0===kb.active++&&kb.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Mc.test(m.type),g=m.url,m.hasContent||(m.data&&(g=m.url+=(Hc.test(g)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=Jc.test(g)?g.replace(Jc,"$1_="+Gc++):g+(Hc.test(g)?"&":"?")+"_="+Gc++)),m.ifModified&&(kb.lastModified[g]&&w.setRequestHeader("If-Modified-Since",kb.lastModified[g]),kb.etag[g]&&w.setRequestHeader("If-None-Match",kb.etag[g])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",m.contentType),w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Sc+"; q=0.01":""):m.accepts["*"]);for(f in m.headers)w.setRequestHeader(f,m.headers[f]);if(m.beforeSend&&(m.beforeSend.call(n,w,m)===!1||2===u))return w.abort();v="abort";for(f in{success:1,error:1,complete:1})w[f](m[f]);if(k=G(Rc,m,c,w)){w.readyState=1,j&&o.trigger("ajaxSend",[w,m]),m.async&&m.timeout>0&&(i=setTimeout(function(){w.abort("timeout")},m.timeout));try{u=1,k.send(s,d)}catch(x){if(!(2>u))throw x;d(-1,x)}}else d(-1,"No Transport");return w},getJSON:function(a,b,c){return kb.get(a,b,c,"json")},getScript:function(a,c){return kb.get(a,b,c,"script")}}),kb.each(["get","post"],function(a,c){kb[c]=function(a,d,e,f){return kb.isFunction(d)&&(f=f||e,e=d,d=b),kb.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),kb.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return kb.globalEval(a),a}}}),kb.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),kb.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=Y.head||kb("head")[0]||Y.documentElement;return{send:function(b,e){c=Y.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Uc=[],Vc=/(=)\?(?=&|$)|\?\?/;kb.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Uc.pop()||kb.expando+"_"+Gc++;return this[a]=!0,a}}),kb.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Vc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=kb.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Vc,"$1"+f):c.jsonp!==!1&&(c.url+=(Hc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||kb.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Uc.push(f)),h&&kb.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Wc,Xc,Yc=0,Zc=a.ActiveXObject&&function(){var a;for(a in Wc)Wc[a](b,!0)};kb.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&K()||L()}:K,Xc=kb.ajaxSettings.xhr(),kb.support.cors=!!Xc&&"withCredentials"in Xc,Xc=kb.support.ajax=!!Xc,Xc&&kb.ajaxTransport(function(c){if(!c.crossDomain||kb.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=kb.noop,Zc&&delete Wc[g]),e)4!==i.readyState&&i.abort();else{l={},h=i.status,j=i.getAllResponseHeaders(),"string"==typeof i.responseText&&(l.text=i.responseText);try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Yc,Zc&&(Wc||(Wc={},kb(a).unload(Zc)),Wc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var $c,_c,ad=/^(?:toggle|show|hide)$/,bd=new RegExp("^(?:([+-])=|)("+lb+")([a-z%]*)$","i"),cd=/queueHooks$/,dd=[Q],ed={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bd.exec(b),f=e&&e[3]||(kb.cssNumber[a]?"":"px"),g=(kb.cssNumber[a]||"px"!==f&&+d)&&bd.exec(kb.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,kb.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};kb.Animation=kb.extend(O,{tweener:function(a,b){kb.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ed[c]=ed[c]||[],ed[c].unshift(b)},prefilter:function(a,b){b?dd.unshift(a):dd.push(a)}}),kb.Tween=R,R.prototype={constructor:R,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(kb.cssNumber[c]?"":"px")},cur:function(){var a=R.propHooks[this.prop];return a&&a.get?a.get(this):R.propHooks._default.get(this)},run:function(a){var b,c=R.propHooks[this.prop];return this.pos=b=this.options.duration?kb.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=kb.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){kb.fx.step[a.prop]?kb.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[kb.cssProps[a.prop]]||kb.cssHooks[a.prop])?kb.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},kb.each(["toggle","show","hide"],function(a,b){var c=kb.fn[b];kb.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(S(b,!0),a,d,e)}}),kb.fn.extend({fadeTo:function(a,b,c,d){return this.filter(x).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=kb.isEmptyObject(a),f=kb.speed(b,c,d),g=function(){var b=O(this,kb.extend({},a),f);(e||kb._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=kb.timers,g=kb._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cd.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&kb.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=kb._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=kb.timers,g=d?d.length:0;for(c.finish=!0,kb.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),kb.each({slideDown:S("show"),slideUp:S("hide"),slideToggle:S("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){kb.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),kb.speed=function(a,b,c){var d=a&&"object"==typeof a?kb.extend({},a):{complete:c||!c&&b||kb.isFunction(a)&&a,duration:a,easing:c&&b||b&&!kb.isFunction(b)&&b};return d.duration=kb.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in kb.fx.speeds?kb.fx.speeds[d.duration]:kb.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){kb.isFunction(d.old)&&d.old.call(this),d.queue&&kb.dequeue(this,d.queue)},d},kb.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},kb.timers=[],kb.fx=R.prototype.init,kb.fx.tick=function(){var a,c=kb.timers,d=0;for($c=kb.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||kb.fx.stop(),$c=b},kb.fx.timer=function(a){a()&&kb.timers.push(a)&&kb.fx.start()},kb.fx.interval=13,kb.fx.start=function(){_c||(_c=setInterval(kb.fx.tick,kb.fx.interval))},kb.fx.stop=function(){clearInterval(_c),_c=null},kb.fx.speeds={slow:600,fast:200,_default:400},kb.fx.step={},kb.expr&&kb.expr.filters&&(kb.expr.filters.animated=function(a){return kb.grep(kb.timers,function(b){return a===b.elem}).length}),kb.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){kb.offset.setOffset(this,a,b)});var c,d,e={top:0,left:0},f=this[0],g=f&&f.ownerDocument;if(g)return c=g.documentElement,kb.contains(c,f)?(typeof f.getBoundingClientRect!==W&&(e=f.getBoundingClientRect()),d=T(g),{top:e.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0),left:e.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):e},kb.offset={setOffset:function(a,b,c){var d=kb.css(a,"position");"static"===d&&(a.style.position="relative");var e,f,g=kb(a),h=g.offset(),i=kb.css(a,"top"),j=kb.css(a,"left"),k=("absolute"===d||"fixed"===d)&&kb.inArray("auto",[i,j])>-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),kb.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},kb.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===kb.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),kb.nodeName(a[0],"html")||(c=a.offset()),c.top+=kb.css(a[0],"borderTopWidth",!0),c.left+=kb.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-kb.css(d,"marginTop",!0),left:b.left-c.left-kb.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Z;a&&!kb.nodeName(a,"html")&&"static"===kb.css(a,"position");)a=a.offsetParent;return a||Z})}}),kb.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);kb.fn[a]=function(e){return kb.access(this,function(a,e,f){var g=T(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?kb(g).scrollLeft():f,d?f:kb(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),kb.each({Height:"height",Width:"width"},function(a,c){kb.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){kb.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return kb.access(this,function(c,d,e){var f;return kb.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?kb.css(c,d,h):kb.style(c,d,e,h)},c,g?e:b,g,null)}})}),kb.fn.size=function(){return this.length},kb.fn.andSelf=kb.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=kb:(a.jQuery=a.$=kb,"function"==typeof define&&define.amd&&define("jquery",[],function(){return kb}))}(window),function(a){function b(a,b,c){for(var d=(c||0)-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function c(a,b){var c=a.index,d=b.index;if(a=a.criteria,b=b.criteria,a!==b){if(a>b||"undefined"==typeof a)return 1;if(b>a||"undefined"==typeof b)return-1}return d>c?-1:1}function d(a){return"\\"+oc[a]}function e(){}function f(a){return a instanceof f?a:new g(a)}function g(a){this.__wrapped__=a}function h(a,b,c,d){function e(){var d=arguments,k=g?this:b;if(f||(a=b[h]),c.length&&(d=d.length?(d=Nc.call(d),j?d.concat(c):c.concat(d)):c),this instanceof e){k=i(a.prototype);var l=a.apply(k,d);return A(l)?l:k}return a.apply(k,d)}var f=z(a),g=!c,h=b;if(g){var j=d;c=b}else if(!f){if(!d)throw new TypeError;b=a}return e}function i(a){return A(a)?Fc(a):{}}function j(a){return Uc[a]}function k(){var a=(a=f.indexOf)===jb?b:a;return a}function l(a){return Vc[a]}function m(a){return Dc.call(a)==ec}function n(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)a[e]=d[e]}return a}function o(a){return A(a)?Rc(a)?Nc.call(a):n({},a):a}function p(a){if(!a)return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)null==a[e]&&(a[e]=d[e])}return a}function q(a){var b=[];return Wc(a,function(a,c){z(a)&&b.push(c)}),b.sort()}function r(a,b){return a?Ac.call(a,b):!1}function s(a){for(var b=-1,c=Tc(a),d=c.length,e={};++b<d;){var f=c[b];e[a[f]]=f}return e}function t(a){return a===!0||a===!1||Dc.call(a)==gc}function u(a){return a?"object"==typeof a&&Dc.call(a)==hc:!1}function v(a){return a?1===a.nodeType:!1}function w(a){if(!a)return!0;if(Rc(a)||F(a))return!a.length;for(var b in a)if(Ac.call(a,b))return!1;return!0}function x(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,g=typeof b;if(a===a&&(!a||"function"!=e&&"object"!=e)&&(!b||"function"!=g&&"object"!=g))return!1;if(null==a||null==b)return a===b;var h=Dc.call(a),i=Dc.call(b);if(h!=i)return!1;switch(h){case gc:case hc:return+a==+b;case jc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case lc:case mc:return a==String(b)}var j=h==fc;if(!j){if(a instanceof f||b instanceof f)return x(a.__wrapped__||a,b.__wrapped__||b,c,d);if(h!=kc)return!1;var k=a.constructor,l=b.constructor;if(k!=l&&!(z(k)&&k instanceof k&&z(l)&&l instanceof l))return!1}c||(c=[]),d||(d=[]);for(var m=c.length;m--;)if(c[m]==a)return d[m]==b;var n=!0,o=0;if(c.push(a),d.push(b),j){if(o=b.length,n=o==a.length)for(;o--&&(n=x(a[o],b[o],c,d)););return n}return Wc(b,function(b,e,f){return Ac.call(f,e)?(o++,!(n=Ac.call(a,e)&&x(a[e],b,c,d))&&Zb):void 0}),n&&Wc(a,function(a,b,c){return Ac.call(c,b)?!(n=--o>-1)&&Zb:void 0}),n}function y(a){return Hc(a)&&!Ic(parseFloat(a))}function z(a){return"function"==typeof a}function A(a){return!(!a||!nc[typeof a])}function B(a){return D(a)&&a!=+a}function C(a){return null===a}function D(a){return"number"==typeof a||Dc.call(a)==jc}function E(a){return!(!a||!nc[typeof a])&&Dc.call(a)==lc}function F(a){return"string"==typeof a||Dc.call(a)==mc}function G(a){return"undefined"==typeof a}function H(a){var b=k(),c=yc.apply(sc,Nc.call(arguments,1)),d={};return Wc(a,function(a,e){b(c,e)<0&&(d[e]=a)}),d}function I(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function J(a){for(var b=-1,c=yc.apply(sc,Nc.call(arguments,1)),d=c.length,e={};++b<d;){var f=c[b];f in a&&(e[f]=a[f])}return e}function K(a){for(var b=-1,c=Tc(a),d=c.length,e=Array(d);++b<d;)e[b]=a[c[b]];return e}function L(a,b){var c=k(),d=a?a.length:0,e=!1;return d&&"number"==typeof d?e=c(a,b)>-1:Xc(a,function(a){return(e=a===b)&&Zb}),e}function M(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),Ac.call(d,c)?d[c]++:d[c]=1}),d}function N(a,b,c){var d=!0;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&(d=!!b(a[e],e,a)););else Xc(a,function(a,c,e){return!(d=!!b(a,c,e))&&Zb});return d}function O(a,b,c){var d=[];b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f;){var g=a[e];b(g,e,a)&&d.push(g)}else Xc(a,function(a,c,e){b(a,c,e)&&d.push(a)});return d}function P(a,b,c){b=Ab(b,c);var d=-1,e=a?a.length:0;if("number"!=typeof e){var f;return Xc(a,function(a,c,d){return b(a,c,d)?(f=a,Zb):void 0}),f}for(;++d<e;){var g=a[d];if(b(g,d,a))return g}}function Q(a,b){return eb(a,b,!0)}function R(a,b,c){var d=-1,e=a?a.length:0;if(b=b&&"undefined"==typeof c?b:Ab(b,c),"number"==typeof e)for(;++d<e&&b(a[d],d,a)!==Zb;);else Xc(a,b)}function S(a,b,c){var d={};return b=Ab(b,c),R(a,function(a,c,e){c=String(b(a,c,e)),(Ac.call(d,c)?d[c]:d[c]=[]).push(a)}),d}function T(a,b){var c=Nc.call(arguments,2),d=-1,e="function"==typeof b,f=a?a.length:0,g=Array("number"==typeof f?f:0);return R(a,function(a){g[++d]=(e?b:a[b]).apply(a,c)}),g}function U(a,b,c){var d=-1,e=a?a.length:0;if(b=Ab(b,c),"number"==typeof e)for(var f=Array(e);++d<e;)f[d]=b(a[d],d,a);else f=[],Xc(a,function(a,c,e){f[++d]=b(a,c,e)});return f}function V(a,b,c){var d=-1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);g>d&&(d=g,e=a)});else for(;++f<g;){var h=a[f];h>e&&(e=h)}return e}function W(a,b,c){var d=1/0,e=d,f=-1,g=a?a.length:0;if(b||"number"!=typeof g)b=Ab(b,c),R(a,function(a,c,f){var g=b(a,c,f);d>g&&(d=g,e=a)});else for(;++f<g;){var h=a[f];e>h&&(e=h)}return e}function X(a,b){var c=-1,d=a?a.length:0;if("number"==typeof d)for(var e=Array(d);++c<d;)e[c]=a[c][b];return e||U(a,b)}function Y(a,b,c,d){if(!a)return c;var e=arguments.length<3;b=Ab(b,d,4);var f=-1,g=a.length;if("number"==typeof g)for(e&&(c=a[++f]);++f<g;)c=b(c,a[f],f,a);else Xc(a,function(a,d,f){c=e?(e=!1,a):b(c,a,d,f)});return c}function Z(a,b,c,d){var e=a,f=a?a.length:0,g=arguments.length<3;
+if("number"!=typeof f){var h=Tc(a);f=h.length}return b=Ab(b,d,4),R(a,function(a,d,i){d=h?h[--f]:--f,c=g?(g=!1,e[d]):b(c,e[d],d,i)}),c}function $(a,b,c){return b=Ab(b,c),O(a,function(a,c,d){return!b(a,c,d)})}function _(a){var b=-1,c=a?a.length:0,d=Array("number"==typeof c?c:0);return R(a,function(a){var c=zc(Mc()*(++b+1));d[b]=d[c],d[c]=a}),d}function ab(a){var b=a?a.length:0;return"number"==typeof b?b:Tc(a).length}function bb(a,b,c){var d;b=Ab(b,c);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&!(d=b(a[e],e,a)););else Xc(a,function(a,c,e){return(d=b(a,c,e))&&Zb});return!!d}function cb(a,b,d){var e=-1,f=a?a.length:0,g=Array("number"==typeof f?f:0);for(b=Ab(b,d),R(a,function(a,c,d){g[++e]={criteria:b(a,c,d),index:e,value:a}}),f=g.length,g.sort(c);f--;)g[f]=g[f].value;return g}function db(a){return Rc(a)?Nc.call(a):a&&"number"==typeof a.length?U(a):K(a)}function eb(a,b,c){return c&&w(b)?null:(c?P:O)(a,b)}function fb(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function gb(a){for(var b=-1,c=k(),d=a.length,e=yc.apply(sc,Nc.call(arguments,1)),f=[];++b<d;){var g=a[b];c(e,g)<0&&f.push(g)}return f}function hb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=-1;for(b=Ab(b,c);++f<e&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[0];return Nc.call(a,0,Lc(Kc(0,d),e))}}function ib(a,b){for(var c=-1,d=a?a.length:0,e=[];++c<d;){var f=a[c];Rc(f)?Bc.apply(e,b?f:ib(f)):e.push(f)}return e}function jb(a,c,d){if("number"==typeof d){var e=a?a.length:0;d=0>d?Kc(0,e+d):d||0}else if(d){var f=qb(a,c);return a[f]===c?f:-1}return a?b(a,c,d):-1}function kb(a,b,c){if(!a)return[];var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return Nc.call(a,0,Lc(Kc(0,e-d),e))}function lb(a){var b=arguments,c=b.length,d=-1,e=k(),f=a?a.length:0,g=[];a:for(;++d<f;){var h=a[d];if(e(g,h)<0){for(var i=c;--i;)if(e(b[i],h)<0)continue a;g.push(h)}}return g}function mb(a,b,c){if(a){var d=0,e=a.length;if("number"!=typeof b&&null!=b){var f=e;for(b=Ab(b,c);f--&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a[e-1];return Nc.call(a,Kc(0,e-d))}}function nb(a,b,c){var d=a?a.length:0;for("number"==typeof c&&(d=(0>c?Kc(0,d+c):Lc(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function ob(a,b,c){a=+a||0,c=+c||1,null==b&&(b=a,a=0);for(var d=-1,e=Kc(0,wc((b-a)/c)),f=Array(e);++d<e;)f[d]=a,a+=c;return f}function pb(a,b,c){if("number"!=typeof b&&null!=b){var d=0,e=-1,f=a?a.length:0;for(b=Ab(b,c);++e<f&&b(a[e],e,a);)d++}else d=null==b||c?1:Kc(0,b);return Nc.call(a,d)}function qb(a,b,c,d){var e=0,f=a?a.length:e;for(c=c?Ab(c,d,1):Kb,b=c(b);f>e;){var g=e+f>>>1;c(a[g])<b?e=g+1:f=g}return e}function rb(a){return Rc(a)||(arguments[0]=a?Nc.call(a):sc),sb(yc.apply(sc,arguments))}function sb(a,b,c,d){var e=-1,f=k(),g=a?a.length:0,h=[],i=h;for("boolean"!=typeof b&&null!=b&&(d=c,c=b,b=!1),null!=c&&(i=[],c=Ab(c,d));++e<g;){var j=a[e],l=c?c(j,e,a):j;(b?!e||i[i.length-1]!==l:f(i,l)<0)&&(c&&i.push(l),h.push(j))}return h}function tb(a){return gb(a,Nc.call(arguments,1))}function ub(a){for(var b=-1,c=a?V(X(arguments,"length")):0,d=Array(0>c?0:c);++b<c;)d[b]=X(arguments,b);return d}function vb(a,b){for(var c=-1,d=a?a.length:0,e={};++c<d;){var f=a[c];b?e[f]=b[c]:e[f[0]]=f[1]}return e}function wb(a,b){return 1>a?b():function(){return--a<1?b.apply(this,arguments):void 0}}function xb(a,b){return Qc.fastBind||Ec&&arguments.length>2?Ec.call.apply(Ec,arguments):h(a,b,Nc.call(arguments,2))}function yb(a){for(var b=arguments.length>1?yc.apply(sc,Nc.call(arguments,1)):q(a),c=-1,d=b.length;++c<d;){var e=b[c];a[e]=xb(a[e],a)}return a}function zb(){var a=arguments;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Ab(a,b,c){if(null==a)return Kb;var d=typeof a;if("function"!=d){if("object"!=d)return function(b){return b[a]};var e=Tc(a);return function(b){for(var c=e.length,d=!1;c--&&(d=b[e[c]]===a[e[c]]););return d}}return"undefined"==typeof b?a:1===c?function(c){return a.call(b,c)}:2===c?function(c,d){return a.call(b,c,d)}:4===c?function(c,d,e,f){return a.call(b,c,d,e,f)}:function(c,d,e){return a.call(b,c,d,e)}}function Bb(a,b,c){function d(){h=null,c||(f=a.apply(g,e))}var e,f,g,h=null;return function(){var i=c&&!h;return e=arguments,g=this,xc(h),h=Cc(d,b),i&&(f=a.apply(g,e)),f}}function Cb(a){var b=Nc.call(arguments,1);return Cc(function(){a.apply(Xb,b)},1)}function Db(a,b){var c=Nc.call(arguments,2);return Cc(function(){a.apply(Xb,c)},b)}function Eb(a,b){var c={};return function(){var d=$b+(b?b.apply(this,arguments):arguments[0]);return Ac.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}}function Fb(a){var b,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Gb(a){return h(a,Nc.call(arguments,1))}function Hb(a,b){function c(){g=new Date,h=null,e=a.apply(f,d)}var d,e,f,g=0,h=null;return function(){var i=new Date,j=b-(i-g);return d=arguments,f=this,0>=j?(xc(h),h=null,g=i,e=a.apply(f,d)):h||(h=Cc(c,j)),e}}function Ib(a,b){return function(){var c=[a];return Bc.apply(c,arguments),b.apply(this,c)}}function Jb(a){return null==a?"":String(a).replace(cc,j)}function Kb(a){return a}function Lb(a){R(q(a),function(b){var c=f[b]=a[b];f.prototype[b]=function(){var a=[this.__wrapped__];Bc.apply(a,arguments);var b=c.apply(f,a);return this.__chain__&&(b=new g(b),b.__chain__=!0),b}})}function Mb(){return a._=uc,this}function Nb(a,b){null==a&&null==b&&(b=1),a=+a||0,null==b?(b=a,a=0):b=+b||0;var c=Mc();return a%1||b%1?a+Lc(c*(b-a+parseFloat("1e-"+((c+"").length-1))),b):a+zc(c*(b-a+1))}function Ob(a,b){var c=a?a[b]:null;return z(c)?a[b]():c}function Pb(a,b,c){var e=f.templateSettings;a||(a=""),c=p({},c,e);var g=0,h="__p += '",i=c.variable,j=RegExp((c.escape||bc).source+"|"+(c.interpolate||bc).source+"|"+(c.evaluate||bc).source+"|$","g");a.replace(j,function(b,c,e,f,i){return h+=a.slice(g,i).replace(dc,d),c&&(h+="' +\n_.escape("+c+") +\n'"),f&&(h+="';\n"+f+";\n__p += '"),e&&(h+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),g=i+b.length,b}),h+="';\n",i||(i="obj",h="with ("+i+" || {}) {\n"+h+"\n}\n"),h="function("+i+") {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n"+h+"return __p\n}";try{var k=Function("_","return "+h)(f)}catch(l){throw l.source=h,l}return b?k(b):(k.source=h,k)}function Qb(a,b,c){for(var d=-1,e=Array(a>-1?a:0);++d<a;)e[d]=b.call(c,d);return e}function Rb(a){return null==a?"":String(a).replace(_b,l)}function Sb(a){var b=++Yb+"";return a?a+b:b}function Tb(a){return a=new g(a),a.__chain__=!0,a}function Ub(a,b){return b(a),a}function Vb(){return this.__chain__=!0,this}function Wb(){return this.__wrapped__}var Xb,Yb=0,Zb={},$b=+new Date+"",_b=/&(?:amp|lt|gt|quot|#39);/g,ac=/<%=([\s\S]+?)%>/g,bc=/($^)/,cc=/[&<>"']/g,dc=/['\n\r\t\u2028\u2029\\]/g,ec="[object Arguments]",fc="[object Array]",gc="[object Boolean]",hc="[object Date]",ic="[object Function]",jc="[object Number]",kc="[object Object]",lc="[object RegExp]",mc="[object String]",nc={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},oc={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},pc=nc[typeof exports]&&exports,qc=nc[typeof module]&&module&&module.exports==pc&&module,rc=nc[typeof global]&&global;!rc||rc.global!==rc&&rc.window!==rc||(a=rc);var sc=[],tc=Object.prototype,uc=(String.prototype,a._),vc=RegExp("^"+String(tc.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),wc=Math.ceil,xc=a.clearTimeout,yc=sc.concat,zc=Math.floor,Ac=tc.hasOwnProperty,Bc=sc.push,Cc=(tc.propertyIsEnumerable,a.setTimeout),Dc=tc.toString,Ec=vc.test(Ec=Dc.bind)&&Ec,Fc=vc.test(Fc=Object.create)&&Fc,Gc=vc.test(Gc=Array.isArray)&&Gc,Hc=a.isFinite,Ic=a.isNaN,Jc=vc.test(Jc=Object.keys)&&Jc,Kc=Math.max,Lc=Math.min,Mc=Math.random,Nc=sc.slice,Oc=vc.test(a.attachEvent),Pc=Ec&&!/\n|true/.test(Ec+Oc);g.prototype=f.prototype;var Qc={};if(function(){var a={0:1,length:1};Qc.fastBind=Ec&&!Pc,Qc.spliceObjects=(sc.splice.call(a,0,1),!a[0])}(1),f.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ac,variable:""},!Fc)var i=function(a){if(A(a)){e.prototype=a;var b=new e;e.prototype=null}return b||{}};m(arguments)||(m=function(a){return a?Ac.call(a,"callee"):!1});var Rc=Gc||function(a){return a?"object"==typeof a&&Dc.call(a)==fc:!1},Sc=function(a){var b,c=a,d=[];if(!c)return d;if(!nc[typeof a])return d;for(b in c)Ac.call(c,b)&&d.push(b);return d},Tc=Jc?function(a){return A(a)?Jc(a):[]}:Sc,Uc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vc=s(Uc),Wc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(b(d[c],c,a)===Zb)return e;return e},Xc=function(a,b){var c,d=a,e=d;if(!d)return e;if(!nc[typeof d])return e;for(c in d)if(Ac.call(d,c)&&b(d[c],c,a)===Zb)return e;return e};z(/x/)&&(z=function(a){return"function"==typeof a&&Dc.call(a)==ic}),f.after=wb,f.bind=xb,f.bindAll=yb,f.compact=fb,f.compose=zb,f.countBy=M,f.debounce=Bb,f.defaults=p,f.defer=Cb,f.delay=Db,f.difference=gb,f.filter=O,f.flatten=ib,f.forEach=R,f.functions=q,f.groupBy=S,f.initial=kb,f.intersection=lb,f.invert=s,f.invoke=T,f.keys=Tc,f.map=U,f.max=V,f.memoize=Eb,f.min=W,f.omit=H,f.once=Fb,f.pairs=I,f.partial=Gb,f.pick=J,f.pluck=X,f.range=ob,f.reject=$,f.rest=pb,f.shuffle=_,f.sortBy=cb,f.tap=Ub,f.throttle=Hb,f.times=Qb,f.toArray=db,f.union=rb,f.uniq=sb,f.values=K,f.where=eb,f.without=tb,f.wrap=Ib,f.zip=ub,f.collect=U,f.drop=pb,f.each=R,f.extend=n,f.methods=q,f.object=vb,f.select=O,f.tail=pb,f.unique=sb,f.chain=Tb,f.clone=o,f.contains=L,f.escape=Jb,f.every=N,f.find=P,f.has=r,f.identity=Kb,f.indexOf=jb,f.isArguments=m,f.isArray=Rc,f.isBoolean=t,f.isDate=u,f.isElement=v,f.isEmpty=w,f.isEqual=x,f.isFinite=y,f.isFunction=z,f.isNaN=B,f.isNull=C,f.isNumber=D,f.isObject=A,f.isRegExp=E,f.isString=F,f.isUndefined=G,f.lastIndexOf=nb,f.mixin=Lb,f.noConflict=Mb,f.random=Nb,f.reduce=Y,f.reduceRight=Z,f.result=Ob,f.size=ab,f.some=bb,f.sortedIndex=qb,f.template=Pb,f.unescape=Rb,f.uniqueId=Sb,f.all=N,f.any=bb,f.detect=P,f.findWhere=Q,f.foldl=Y,f.foldr=Z,f.include=L,f.inject=Y,f.first=hb,f.last=mb,f.take=hb,f.head=hb,f.VERSION="1.3.1",Lb(f),f.prototype.chain=Vb,f.prototype.value=Wb,R(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__;return b.apply(a,arguments),Qc.spliceObjects||0!==a.length||delete a[0],this}}),R(["concat","join","slice"],function(a){var b=sc[a];f.prototype[a]=function(){var a=this.__wrapped__,c=b.apply(a,arguments);return this.__chain__&&(c=new g(c),c.__chain__=!0),c}}),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(a._=f,define("lodash",[],function(){return f})):pc&&!pc.nodeType?qc?(qc.exports=f)._=f:pc._=f:a._=f}(this),function(){var a,b=this,c=b.Backbone,d=[],e=d.push,f=d.slice,g=d.splice;a="undefined"!=typeof exports?exports:b.Backbone={},a.VERSION="1.0.0";var h=b._;h||"undefined"==typeof require||(h=require("underscore")),a.$=b.jQuery||b.Zepto||b.ender||b.$,a.noConflict=function(){return b.Backbone=c,this},a.emulateHTTP=!1,a.emulateJSON=!1;var i=a.Events={on:function(a,b,c){if(!k(this,"on",a,[b,c])||!b)return this;this._events||(this._events={});var d=this._events[a]||(this._events[a]=[]);return d.push({callback:b,context:c,ctx:c||this}),this},once:function(a,b,c){if(!k(this,"once",a,[b,c])||!b)return this;var d=this,e=h.once(function(){d.off(a,e),b.apply(this,arguments)});return e._callback=b,this.on(a,e,c)},off:function(a,b,c){var d,e,f,g,i,j,l,m;if(!this._events||!k(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events={},this;for(g=a?[a]:h.keys(this._events),i=0,j=g.length;j>i;i++)if(a=g[i],f=this._events[a]){if(this._events[a]=d=[],b||c)for(l=0,m=f.length;m>l;l++)e=f[l],(b&&b!==e.callback&&b!==e.callback._callback||c&&c!==e.context)&&d.push(e);d.length||delete this._events[a]}return this},trigger:function(a){if(!this._events)return this;var b=f.call(arguments,1);if(!k(this,"trigger",a,b))return this;var c=this._events[a],d=this._events.all;return c&&l(c,b),d&&l(d,arguments),this},stopListening:function(a,b,c){var d=this._listeners;if(!d)return this;var e=!b&&!c;"object"==typeof b&&(c=this),a&&((d={})[a._listenerId]=a);for(var f in d)d[f].off(b,c,this),e&&delete this._listeners[f];return this}},j=/\s+/,k=function(a,b,c,d){if(!c)return!0;if("object"==typeof c){for(var e in c)a[b].apply(a,[e,c[e]].concat(d));return!1}if(j.test(c)){for(var f=c.split(j),g=0,h=f.length;h>g;g++)a[b].apply(a,[f[g]].concat(d));return!1}return!0},l=function(a,b){var c,d=-1,e=a.length,f=b[0],g=b[1],h=b[2];switch(b.length){case 0:for(;++d<e;)(c=a[d]).callback.call(c.ctx);return;case 1:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f);return;case 2:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g);return;case 3:for(;++d<e;)(c=a[d]).callback.call(c.ctx,f,g,h);return;default:for(;++d<e;)(c=a[d]).callback.apply(c.ctx,b)}},m={listenTo:"on",listenToOnce:"once"};h.each(m,function(a,b){i[b]=function(b,c,d){var e=this._listeners||(this._listeners={}),f=b._listenerId||(b._listenerId=h.uniqueId("l"));return e[f]=b,"object"==typeof c&&(d=this),b[a](c,d,this),this}}),i.bind=i.on,i.unbind=i.off,h.extend(a,i);var n=a.Model=function(a,b){var c,d=a||{};b||(b={}),this.cid=h.uniqueId("c"),this.attributes={},h.extend(this,h.pick(b,o)),b.parse&&(d=this.parse(d,b)||{}),(c=h.result(this,"defaults"))&&(d=h.defaults({},d,c)),this.set(d,b),this.changed={},this.initialize.apply(this,arguments)},o=["url","urlRoot","collection"];h.extend(n.prototype,i,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return h.clone(this.attributes)},sync:function(){return a.sync.apply(this,arguments)},get:function(a){return this.attributes[a]},escape:function(a){return h.escape(this.get(a))},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e,f,g,i,j,k,l;if(null==a)return this;if("object"==typeof a?(e=a,c=b):(e={})[a]=b,c||(c={}),!this._validate(e,c))return!1;f=c.unset,i=c.silent,g=[],j=this._changing,this._changing=!0,j||(this._previousAttributes=h.clone(this.attributes),this.changed={}),l=this.attributes,k=this._previousAttributes,this.idAttribute in e&&(this.id=e[this.idAttribute]);for(d in e)b=e[d],h.isEqual(l[d],b)||g.push(d),h.isEqual(k[d],b)?delete this.changed[d]:this.changed[d]=b,f?delete l[d]:l[d]=b;if(!i){g.length&&(this._pending=!0);for(var m=0,n=g.length;n>m;m++)this.trigger("change:"+g[m],this,l[g[m]],c)}if(j)return this;if(!i)for(;this._pending;)this._pending=!1,this.trigger("change",this,c);return this._pending=!1,this._changing=!1,this},unset:function(a,b){return this.set(a,void 0,h.extend({},b,{unset:!0}))},clear:function(a){var b={};for(var c in this.attributes)b[c]=void 0;return this.set(b,h.extend({},a,{unset:!0}))},hasChanged:function(a){return null==a?!h.isEmpty(this.changed):h.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?h.clone(this.changed):!1;var b,c=!1,d=this._changing?this._previousAttributes:this.attributes;for(var e in a)h.isEqual(d[e],b=a[e])||((c||(c={}))[e]=b);return c},previous:function(a){return null!=a&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=this,c=a.success;return a.success=function(d){return b.set(b.parse(d,a),a)?(c&&c(b,d,a),b.trigger("sync",b,d,a),void 0):!1},L(this,a),this.sync("read",this,a)},save:function(a,b,c){var d,e,f,g=this.attributes;if(null==a||"object"==typeof a?(d=a,c=b):(d={})[a]=b,!(!d||c&&c.wait||this.set(d,c)))return!1;if(c=h.extend({validate:!0},c),!this._validate(d,c))return!1;d&&c.wait&&(this.attributes=h.extend({},g,d)),void 0===c.parse&&(c.parse=!0);var i=this,j=c.success;return c.success=function(a){i.attributes=g;var b=i.parse(a,c);return c.wait&&(b=h.extend(d||{},b)),h.isObject(b)&&!i.set(b,c)?!1:(j&&j(i,a,c),i.trigger("sync",i,a,c),void 0)},L(this,c),e=this.isNew()?"create":c.patch?"patch":"update","patch"===e&&(c.attrs=d),f=this.sync(e,this,c),d&&c.wait&&(this.attributes=g),f},destroy:function(a){a=a?h.clone(a):{};var b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(a.success=function(e){(a.wait||b.isNew())&&d(),c&&c(b,e,a),b.isNew()||b.trigger("sync",b,e,a)},this.isNew())return a.success(),!1;L(this,a);var e=this.sync("delete",this,a);return a.wait||d(),e},url:function(){var a=h.result(this,"urlRoot")||h.result(this.collection,"url")||K();return this.isNew()?a:a+("/"===a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(a){return this._validate({},h.extend(a||{},{validate:!0}))},_validate:function(a,b){if(!b.validate||!this.validate)return!0;a=h.extend({},this.attributes,a);var c=this.validationError=this.validate(a,b)||null;return c?(this.trigger("invalid",this,c,h.extend(b||{},{validationError:c})),!1):!0}});var p=["keys","values","pairs","invert","pick","omit"];h.each(p,function(a){n.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.attributes),h[a].apply(h,b)}});var q=a.Collection=function(a,b){b||(b={}),b.url&&(this.url=b.url),b.model&&(this.model=b.model),void 0!==b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,h.extend({silent:!0},b))},r={add:!0,remove:!0,merge:!0},s={add:!0,merge:!1,remove:!1};h.extend(q.prototype,i,{model:n,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},sync:function(){return a.sync.apply(this,arguments)},add:function(a,b){return this.set(a,h.defaults(b||{},s))},remove:function(a,b){a=h.isArray(a)?a.slice():[a],b||(b={});var c,d,e,f;for(c=0,d=a.length;d>c;c++)f=this.get(a[c]),f&&(delete this._byId[f.id],delete this._byId[f.cid],e=this.indexOf(f),this.models.splice(e,1),this.length--,b.silent||(b.index=e,f.trigger("remove",f,this,b)),this._removeReference(f));return this},set:function(a,b){b=h.defaults(b||{},r),b.parse&&(a=this.parse(a,b)),h.isArray(a)||(a=a?[a]:[]);var c,d,f,i,j,k=b.at,l=this.comparator&&null==k&&b.sort!==!1,m=h.isString(this.comparator)?this.comparator:null,n=[],o=[],p={};for(c=0,d=a.length;d>c;c++)(f=this._prepareModel(a[c],b))&&((i=this.get(f))?(b.remove&&(p[i.cid]=!0),b.merge&&(i.set(f.attributes,b),l&&!j&&i.hasChanged(m)&&(j=!0))):b.add&&(n.push(f),f.on("all",this._onModelEvent,this),this._byId[f.cid]=f,null!=f.id&&(this._byId[f.id]=f)));if(b.remove){for(c=0,d=this.length;d>c;++c)p[(f=this.models[c]).cid]||o.push(f);o.length&&this.remove(o,b)}if(n.length&&(l&&(j=!0),this.length+=n.length,null!=k?g.apply(this.models,[k,0].concat(n)):e.apply(this.models,n)),j&&this.sort({silent:!0}),b.silent)return this;for(c=0,d=n.length;d>c;c++)(f=n[c]).trigger("add",f,this,b);return j&&this.trigger("sort",this,b),this},reset:function(a,b){b||(b={});for(var c=0,d=this.models.length;d>c;c++)this._removeReference(this.models[c]);return b.previousModels=this.models,this._reset(),this.add(a,h.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),this},push:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:this.length},b)),a},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return a=this._prepareModel(a,b),this.add(a,h.extend({at:0},b)),a},shift:function(a){var b=this.at(0);return this.remove(b,a),b},slice:function(a,b){return this.models.slice(a,b)},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a.cid||a]},at:function(a){return this.models[a]},where:function(a,b){return h.isEmpty(a)?b?void 0:[]:this[b?"find":"filter"](function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},findWhere:function(a){return this.where(a,!0)},sort:function(a){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return a||(a={}),h.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(h.bind(this.comparator,this)),a.silent||this.trigger("sort",this,a),this},sortedIndex:function(a,b,c){b||(b=this.comparator);var d=h.isFunction(b)?b:function(a){return a.get(b)};return h.sortedIndex(this.models,a,d,c)},pluck:function(a){return h.invoke(this.models,"get",a)},fetch:function(a){a=a?h.clone(a):{},void 0===a.parse&&(a.parse=!0);var b=a.success,c=this;return a.success=function(d){var e=a.reset?"reset":"set";c[e](d,a),b&&b(c,d,a),c.trigger("sync",c,d,a)},L(this,a),this.sync("read",this,a)},create:function(a,b){if(b=b?h.clone(b):{},!(a=this._prepareModel(a,b)))return!1;b.wait||this.add(a,b);var c=this,d=b.success;return b.success=function(e){b.wait&&c.add(a,b),d&&d(a,e,b)},a.save(null,b),a},parse:function(a){return a},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,b){if(a instanceof n)return a.collection||(a.collection=this),a;b||(b={}),b.collection=this;var c=new this.model(a,b);return c._validate(a,b)?c:(this.trigger("invalid",this,a,b),!1)},_removeReference:function(a){this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!==a&&"remove"!==a||c===this)&&("destroy"===a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],null!=b.id&&(this._byId[b.id]=b)),this.trigger.apply(this,arguments))}});var t=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(t,function(a){q.prototype[a]=function(){var b=f.call(arguments);return b.unshift(this.models),h[a].apply(h,b)}});var u=["groupBy","countBy","sortBy"];h.each(u,function(a){q.prototype[a]=function(b,c){var d=h.isFunction(b)?b:function(a){return a.get(b)};return h[a](this.models,d,c)}});var v=a.View=function(a){this.cid=h.uniqueId("view"),this._configure(a||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];h.extend(v.prototype,i,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(b,c){return this.$el&&this.undelegateEvents(),this.$el=b instanceof a.$?b:a.$(b),this.el=this.$el[0],c!==!1&&this.delegateEvents(),this},delegateEvents:function(a){if(!a&&!(a=h.result(this,"events")))return this;this.undelegateEvents();for(var b in a){var c=a[b];if(h.isFunction(c)||(c=this[a[b]]),c){var d=b.match(w),e=d[1],f=d[2];c=h.bind(c,this),e+=".delegateEvents"+this.cid,""===f?this.$el.on(e,c):this.$el.on(e,f,c)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(a){this.options&&(a=h.extend({},h.result(this,"options"),a)),h.extend(this,h.pick(a,x)),this.options=a},_ensureElement:function(){if(this.el)this.setElement(h.result(this,"el"),!1);else{var b=h.extend({},h.result(this,"attributes"));this.id&&(b.id=h.result(this,"id")),this.className&&(b["class"]=h.result(this,"className"));var c=a.$("<"+h.result(this,"tagName")+">").attr(b);this.setElement(c,!1)}}}),a.sync=function(b,c,d){var e=y[b];h.defaults(d||(d={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var f={type:e,dataType:"json"};if(d.url||(f.url=h.result(c,"url")||K()),null!=d.data||!c||"create"!==b&&"update"!==b&&"patch"!==b||(f.contentType="application/json",f.data=JSON.stringify(d.attrs||c.toJSON(d))),d.emulateJSON&&(f.contentType="application/x-www-form-urlencoded",f.data=f.data?{model:f.data}:{}),d.emulateHTTP&&("PUT"===e||"DELETE"===e||"PATCH"===e)){f.type="POST",d.emulateJSON&&(f.data._method=e);var g=d.beforeSend;d.beforeSend=function(a){return a.setRequestHeader("X-HTTP-Method-Override",e),g?g.apply(this,arguments):void 0}}"GET"===f.type||d.emulateJSON||(f.processData=!1),"PATCH"!==f.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(f.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=d.xhr=a.ajax(h.extend(f,d));return c.trigger("request",c,i,d),i};var y={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var z=a.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},A=/\((.*?)\)/g,B=/(\(\?)?:\w+/g,C=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(z.prototype,i,{initialize:function(){},route:function(b,c,d){h.isRegExp(b)||(b=this._routeToRegExp(b)),h.isFunction(c)&&(d=c,c=""),d||(d=this[c]);var e=this;return a.history.route(b,function(f){var g=e._extractParameters(b,f);d&&d.apply(e,g),e.trigger.apply(e,["route:"+c].concat(g)),e.trigger("route",c,g),a.history.trigger("route",e,c,g)}),this},navigate:function(b,c){return a.history.navigate(b,c),this},_bindRoutes:function(){if(this.routes){this.routes=h.result(this,"routes");for(var a,b=h.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(D,"\\$&").replace(A,"(?:$1)?").replace(B,function(a,b){return b?a:"([^/]+)"}).replace(C,"(.*?)"),new RegExp("^"+a+"$")},_extractParameters:function(a,b){var c=a.exec(b).slice(1);return h.map(c,function(a){return a?decodeURIComponent(a):null})}});var E=a.History=function(){this.handlers=[],h.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},F=/^[#\/]|\s+$/g,G=/^\/+|\/+$/g,H=/msie [\w.]+/,I=/\/$/;E.started=!1,h.extend(E.prototype,i,{interval:50,getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=this.location.pathname;var c=this.root.replace(I,"");a.indexOf(c)||(a=a.substr(c.length))}else a=this.getHash();return a.replace(F,"")},start:function(b){if(E.started)throw new Error("Backbone.history has already been started");E.started=!0,this.options=h.extend({},{root:"/"},this.options,b),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var c=this.getFragment(),d=document.documentMode,e=H.exec(navigator.userAgent.toLowerCase())&&(!d||7>=d);this.root=("/"+this.root+"/").replace(G,"/"),e&&this._wantsHashChange&&(this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(c)),this._hasPushState?a.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!e?a.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=c;var f=this.location,g=f.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!g?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&g&&f.hash&&(this.fragment=this.getHash().replace(F,""),this.history.replaceState({},document.title,this.root+this.fragment+f.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),E.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();return a===this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe))),a===this.fragment?!1:(this.iframe&&this.navigate(a),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(a){var b=this.fragment=this.getFragment(a),c=h.any(this.handlers,function(a){return a.route.test(b)?(a.callback(b),!0):void 0});return c},navigate:function(a,b){if(!E.started)return!1;if(b&&b!==!0||(b={trigger:b}),a=this.getFragment(a||""),this.fragment!==a){this.fragment=a;var c=this.root+a;if(this._hasPushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,c);else{if(!this._wantsHashChange)return this.location.assign(c);this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getFragment(this.getHash(this.iframe))&&(b.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,a,b.replace))}b.trigger&&this.loadUrl(a)}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),a.history=new E;var J=function(a,b){var c,d=this;c=a&&h.has(a,"constructor")?a.constructor:function(){return d.apply(this,arguments)},h.extend(c,d,b);var e=function(){this.constructor=c};return e.prototype=d.prototype,c.prototype=new e,a&&h.extend(c.prototype,a),c.__super__=d.prototype,c};n.extend=q.extend=z.extend=v.extend=E.extend=J;var K=function(){throw new Error('A "url" property or function must be specified')},L=function(a,b){var c=b.error;b.error=function(d){c&&c(a,d,b),a.trigger("error",a,d,b)}}}.call(this),define("backbone",["lodash","jquery"],function(a){return function(){var b;return b||a.Backbone}}(this)),!function(a){a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c),this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")}))},hide:function(b){b&&b.preventDefault();b=a.Event("hide"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]===a.target||b.$element.has(a.target).length||b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){27==b.which&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;
+if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);e||d.data("modal",e=new b(this,f)),"string"==typeof c?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function b(){a(".dropdown-backdrop").remove(),a(d).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}var d="[data-toggle=dropdown]",e=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};e.prototype={constructor:e,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",b),d.toggleClass("open")),f.focus(),!1},keydown:function(b){var e,f,g,h,i;if(/(38|40|27)/.test(b.keyCode)&&(e=a(this),b.preventDefault(),b.stopPropagation(),!e.is(".disabled, :disabled"))){if(g=c(e),h=g.hasClass("open"),!h||h&&27==b.keyCode)return 27==b.which&&g.find(d).focus(),e.click();f=a("[role=menu] li:not(.divider):visible a",g),f.length&&(i=f.index(f.filter(":focus")),38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<f.length-1&&i++,~i||(i=0),f.eq(i).focus())}}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new e(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=e,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",d,e.prototype.toggle).on("keydown.dropdown.data-api",d+", [role=menu]",e.prototype.keydown)}(window.jQuery),!function(a){function b(b,c){var d,e=a.proxy(this.process,this),f=a(b).is("body")?a(window):a(b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b,c=this;this.offsets=a([]),this.targets=a([]),b=this.$body.find(this.selector).map(function(){var b=a(this),d=b.data("target")||b.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},process:function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b,c,d,e=this.element,f=e.closest("ul:not(.dropdown-menu)"),g=e.attr("data-target");g||(g=e.attr("href"),g=g&&g.replace(/.*(?=#[^\s]*$)/,"")),e.parent("li").hasClass("active")||(b=f.find(".active:last a")[0],d=a.Event("show",{relatedTarget:b}),e.trigger(d),d.isDefaultPrevented()||(c=a(g),this.activate(e.parent("li"),f),this.activate(c,c.parent(),function(){e.trigger({type:"shown",relatedTarget:b})})))},activate:function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e):e(),f.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};return this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show),void 0):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide),void 0):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var c=this.tip(),d=a.Event("hide");return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=("function"==typeof c.content?c.content.call(b[0]):c.content)||b.attr("data-content")},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f="object"==typeof c&&c;e||d.data("popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b,c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.bottom,h=f.top,i="affix affix-top affix-bottom";"object"!=typeof f&&(g=h=f),"function"==typeof h&&(h=f.top()),"function"==typeof g&&(g=f.bottom()),b=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=g&&e.top+this.$element.height()>=c-g?"bottom":null!=h&&h>=d?"top":!1,this.affixed!==b&&(this.affixed=b,this.unpin="bottom"==b?e.top-d:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:"")))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof c&&c;e||d.data("affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);e||d.data("collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(b=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,b?this.process(b):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){for(var b,c=[],d=[],e=[];b=a.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?d.push(b):e.push(b):c.push(b);return c.concat(d,e)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(){var b=this.$menu.find(".active").removeClass("active"),c=b.next();c.length||(c=a(this.$menu.find("li")[0])),c.addClass("active")},prev:function(){var a=this.$menu.find(".active").removeClass("active"),b=a.prev();b.length||(b=this.$menu.find("li").last()),b.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b="function"==typeof this.$element[a]),b},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f="object"==typeof c&&c;e||d.data("typeahead",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);b.data("typeahead")||b.typeahead(b.data())})}(window.jQuery),define("bootstrap",["jquery"],function(a){return function(){var b;return b||a.Bootstrap}}(this)),function(){function a(a,b){try{for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}catch(d){a.prototype=b}}function b(a){for(var b=-1,c=a.length,d=[];++b<c;)d.push(a[b]);return d}function c(a){return Array.prototype.slice.call(a)}function d(){}function e(a){return a}function f(){return this}function g(){return!0}function h(a){return"function"==typeof a?a:function(){return a}}function i(a,b,c){return function(){var d=c.apply(b,arguments);return arguments.length?a:d}}function j(a){return null!=a&&!isNaN(a)}function k(a){return a.length}function l(a){return null==a}function m(a){return a.trim().replace(/\s+/g," ")}function n(a){for(var b=1;a*b%1;)b*=10;return b}function o(){}function p(a){function b(){for(var b,d=c,e=-1,f=d.length;++e<f;)(b=d[e].on)&&b.apply(this,arguments);return a}var c=[],e=new d;return b.on=function(b,d){var f,g=e.get(b);return arguments.length<2?g&&g.on:(g&&(g.on=null,c=c.slice(0,f=c.indexOf(g)).concat(c.slice(f+1)),e.remove(b)),d&&c.push(e.set(b,{on:d})),a)},b}function q(a,b){return b-(a?1+Math.floor(Math.log(a+Math.pow(10,1+Math.floor(Math.log(a)/Math.LN10)-b))/Math.LN10):1)}function r(a){return a+""}function s(a){for(var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];b>0;)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function t(a,b){var c=Math.pow(10,3*Math.abs(8-b));return{scale:b>8?function(a){return a/c}:function(a){return a*c},symbol:a}}function u(a){return function(b){return 0>=b?0:b>=1?1:a(b)}}function v(a){return function(b){return 1-a(1-b)}}function w(a){return function(b){return.5*(.5>b?a(2*b):2-a(2-2*b))}}function x(a){return a}function y(a){return function(b){return Math.pow(b,a)}}function z(a){return 1-Math.cos(a*Math.PI/2)}function A(a){return Math.pow(2,10*(a-1))}function B(a){return 1-Math.sqrt(1-a*a)}function C(a,b){var c;return arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a),function(d){return 1+a*Math.pow(2,10*-d)*Math.sin(2*(d-c)*Math.PI/b)}}function D(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function E(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function F(){d3.event.stopPropagation(),d3.event.preventDefault()}function G(){for(var a,b=d3.event;a=b.sourceEvent;)b=a;return b}function H(a){for(var b=new o,c=0,d=arguments.length;++c<d;)b[arguments[c]]=p(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=d3.event;e.target=a,d3.event=e,b[e.type].apply(c,d)}finally{d3.event=f}}},b}function I(a){var b=[a.a,a.b],c=[a.c,a.d],d=K(b),e=J(b,c),f=K(L(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*gf,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*gf:0}function J(a,b){return a[0]*b[0]+a[1]*b[1]}function K(a){var b=Math.sqrt(J(a,a));return b&&(a[0]/=b,a[1]/=b),b}function L(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function M(a){return"transform"==a?d3.interpolateTransform:d3.interpolate}function N(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return(c-a)*b}}function O(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function P(){}function Q(a,b,c){return new R(a,b,c)}function R(a,b,c){this.r=a,this.g=b,this.b=c}function S(a){return 16>a?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function T(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/i.exec(a))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(X(e[0]),X(e[1]),X(e[2]))}return(f=lf.get(a))?b(f.r,f.g,f.b):(null!=a&&"#"===a.charAt(0)&&(4===a.length?(g=a.charAt(1),g+=g,h=a.charAt(2),h+=h,i=a.charAt(3),i+=i):7===a.length&&(g=a.substring(1,3),h=a.substring(3,5),i=a.substring(5,7)),g=parseInt(g,16),h=parseInt(h,16),i=parseInt(i,16)),b(g,h,i))}function U(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=.5>i?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(c>b?6:0):b==g?(c-a)/h+2:(a-b)/h+4,d*=60):e=d=0,Y(d,e,i)}function V(a,b,c){a=W(a),b=W(b),c=W(c);var d=hb((.4124564*a+.3575761*b+.1804375*c)/pf),e=hb((.2126729*a+.7151522*b+.072175*c)/qf),f=hb((.0193339*a+.119192*b+.9503041*c)/rf);return cb(116*e-16,500*(d-e),200*(e-f))}function W(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function X(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Y(a,b,c){return new Z(a,b,c)}function Z(a,b,c){this.h=a,this.s=b,this.l=c}function $(a,b,c){function d(a){return a>360?a-=360:0>a&&(a+=360),60>a?f+(g-f)*a/60:180>a?g:240>a?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a%=360,0>a&&(a+=360),b=0>b?0:b>1?1:b,c=0>c?0:c>1?1:c,g=.5>=c?c*(1+b):c+b-c*b,f=2*c-g,Q(e(a+120),e(a),e(a-120))}function _(a,b,c){return new ab(a,b,c)}function ab(a,b,c){this.h=a,this.c=b,this.l=c}function bb(a,b,c){return cb(c,Math.cos(a*=Math.PI/180)*b,Math.sin(a)*b)}function cb(a,b,c){return new db(a,b,c)}function db(a,b,c){this.l=a,this.a=b,this.b=c}function eb(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=gb(e)*pf,d=gb(d)*qf,f=gb(f)*rf,Q(ib(3.2404542*e-1.5371385*d-.4985314*f),ib(-.969266*e+1.8760108*d+.041556*f),ib(.0556434*e-.2040259*d+1.0572252*f))}function fb(a,b,c){return _(Math.atan2(c,b)/Math.PI*180,Math.sqrt(b*b+c*c),a)}function gb(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function hb(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ib(a){return Math.round(255*(.00304>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function jb(a){return Ue(a,yf),a}function kb(a){return function(){return tf(a,this)}}function lb(a){return function(){return uf(a,this)}}function mb(a,b){function c(){this.removeAttribute(a)}function d(){this.removeAttributeNS(a.space,a.local)}function e(){this.setAttribute(a,b)}function f(){this.setAttributeNS(a.space,a.local,b)}function g(){var c=b.apply(this,arguments);null==c?this.removeAttribute(a):this.setAttribute(a,c)}function h(){var c=b.apply(this,arguments);null==c?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)
+}return a=d3.ns.qualify(a),null==b?a.local?d:c:"function"==typeof b?a.local?h:g:a.local?f:e}function nb(a){return new RegExp("(?:^|\\s+)"+d3.requote(a)+"(?:\\s+|$)","g")}function ob(a,b){function c(){for(var c=-1;++c<e;)a[c](this,b)}function d(){for(var c=-1,d=b.apply(this,arguments);++c<e;)a[c](this,d)}a=a.trim().split(/\s+/).map(pb);var e=a.length;return"function"==typeof b?d:c}function pb(a){var b=nb(a);return function(c,d){if(e=c.classList)return d?e.add(a):e.remove(a);var e=c.className,f=null!=e.baseVal,g=f?e.baseVal:e;d?(b.lastIndex=0,b.test(g)||(g=m(g+" "+a),f?e.baseVal=g:c.className=g)):g&&(g=m(g.replace(b," ")),f?e.baseVal=g:c.className=g)}}function qb(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);null==d?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return null==b?d:"function"==typeof b?f:e}function rb(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);null==c?delete this[a]:this[a]=c}return null==b?c:"function"==typeof b?e:d}function sb(a){return{__data__:a}}function tb(a){return function(){return xf(this,a)}}function ub(a){return arguments.length||(a=d3.ascending),function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function vb(a,b,c){function d(){var b=this[f];b&&(this.removeEventListener(a,b,b.$),delete this[f])}function e(){function e(a){var c=d3.event;d3.event=a,h[0]=g.__data__;try{b.apply(g,h)}finally{d3.event=c}}var g=this,h=arguments;d.call(this),this.addEventListener(a,this[f]=e,e.$=c),e._=b}var f="__on"+a,g=a.indexOf(".");return g>0&&(a=a.substring(0,g)),b?e:d}function wb(a,b){for(var c=0,d=a.length;d>c;c++)for(var e,f=a[c],g=0,h=f.length;h>g;g++)(e=f[g])&&b(e,g,c);return a}function xb(a){return Ue(a,Af),a}function yb(a,b,c){Ue(a,Bf);var e=new d,f=d3.dispatch("start","end"),g=Jf;return a.id=b,a.time=c,a.tween=function(b,c){return arguments.length<2?e.get(b):(null==c?e.remove(b):e.set(b,c),a)},a.ease=function(b){return arguments.length?(g="function"==typeof b?b:d3.ease.apply(d3,arguments),a):g},a.each=function(b,c){return arguments.length<2?zb.call(a,b):(f.on(b,c),a)},d3.timer(function(d){return wb(a,function(a,h){function i(d){return o.active>b?k():(o.active=b,e.forEach(function(b,c){(c=c.call(a,p,h))&&l.push(c)}),f.start.call(a,p,h),j(d)||d3.timer(j,0,c),1)}function j(c){if(o.active!==b)return k();for(var d=(c-m)/n,e=g(d),i=l.length;i>0;)l[--i].call(a,e);return d>=1?(k(),Df=b,f.end.call(a,p,h),Df=0,1):void 0}function k(){return--o.count||delete a.__transition__,1}var l=[],m=a.delay,n=a.duration,o=(a=a.node).__transition__||(a.__transition__={active:0,count:0}),p=a.__data__;++o.count,d>=m?i(d):d3.timer(i,m,c)})},0,c),a}function zb(a){var b=Df,c=Jf,d=Hf,e=If;return Df=this.id,Jf=this.ease(),wb(this,function(b,c,d){Hf=b.delay,If=b.duration,a.call(b=b.node,b.__data__,c,d)}),Df=b,Jf=c,Hf=d,If=e,this}function Ab(a,b,c){return""!=c&&Mf}function Bb(a,b){return d3.tween(a,M(b))}function Cb(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=Db()-b;d>24?(isFinite(d)&&(clearTimeout(Lf),Lf=setTimeout(Cb,d)),Kf=0):(Kf=1,Qf(Cb))}function Db(){for(var a=null,b=Pf,c=1/0;b;)b.flush?(delete Of[b.callback.id],b=a?a.next=b.next:Pf=b.next):(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function Eb(a,b){var c=a.ownerSVGElement||a;if(c.createSVGPoint){var d=c.createSVGPoint();if(0>Rf&&(window.scrollX||window.scrollY)){c=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var e=c[0][0].getScreenCTM();Rf=!(e.f||e.e),c.remove()}return Rf?(d.x=b.pageX,d.y=b.pageY):(d.x=b.clientX,d.y=b.clientY),d=d.matrixTransform(a.getScreenCTM().inverse()),[d.x,d.y]}var f=a.getBoundingClientRect();return[b.clientX-f.left-a.clientLeft,b.clientY-f.top-a.clientTop]}function Fb(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Gb(a){return a.rangeExtent?a.rangeExtent():Fb(a.range())}function Hb(a,b){var c,d=0,e=a.length-1,f=a[d],g=a[e];return f>g&&(c=d,d=e,e=c,c=f,f=g,g=c),(b=b(g-f))&&(a[d]=b.floor(f),a[e]=b.ceil(g)),a}function Ib(){return Math}function Jb(a,b,c,d){function e(){var e=Math.min(a.length,b.length)>2?Qb:Pb,i=d?O:N;return g=e(a,b,i,c),h=e(b,a,i,d3.interpolate),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(d3.interpolateRound)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return Nb(a,b)},f.tickFormat=function(b){return Ob(a,b)},f.nice=function(){return Hb(a,Lb),e()},f.copy=function(){return Jb(a,b,c,d)},e()}function Kb(a,b){return d3.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Lb(a){return a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1),a&&{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function Mb(a,b){var c=Fb(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return.15>=f?e*=10:.35>=f?e*=5:.75>=f&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function Nb(a,b){return d3.range.apply(d3,Mb(a,b))}function Ob(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Mb(a,b)[2])/Math.LN10+.01))+"f")}function Pb(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function Qb(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;for(a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());++g<=h;)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function Rb(a,b){function c(c){return a(b(c))}var d=b.pow;return c.invert=function(b){return d(a.invert(b))},c.domain=function(e){return arguments.length?(b=e[0]<0?Tb:Sb,d=b.pow,a.domain(e.map(b)),c):a.domain().map(d)},c.nice=function(){return a.domain(Hb(a.domain(),Ib)),c},c.ticks=function(){var c=Fb(a.domain()),e=[];if(c.every(isFinite)){var f=Math.floor(c[0]),g=Math.ceil(c[1]),h=d(c[0]),i=d(c[1]);if(b===Tb)for(e.push(d(f));f++<g;)for(var j=9;j>0;j--)e.push(d(f)*j);else{for(;g>f;f++)for(var j=1;10>j;j++)e.push(d(f)*j);e.push(d(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},c.tickFormat=function(a,e){if(arguments.length<2&&(e=Sf),arguments.length<1)return e;var f,g=Math.max(.1,a/c.ticks().length),h=b===Tb?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil);return function(a){return a/d(h(b(a)+f))<=g?e(a):""}},c.copy=function(){return Rb(a.copy(),b)},Kb(c,a)}function Sb(a){return Math.log(0>a?0:a)/Math.LN10}function Tb(a){return-Math.log(a>0?0:-a)/Math.LN10}function Ub(a,b){function c(b){return a(d(b))}var d=Vb(b),e=Vb(1/b);return c.invert=function(b){return e(a.invert(b))},c.domain=function(b){return arguments.length?(a.domain(b.map(d)),c):a.domain().map(e)},c.ticks=function(a){return Nb(c.domain(),a)},c.tickFormat=function(a){return Ob(c.domain(),a)},c.nice=function(){return c.domain(Hb(c.domain(),Lb))},c.exponent=function(a){if(!arguments.length)return b;var f=c.domain();return d=Vb(b=a),e=Vb(1/b),c.domain(f)},c.copy=function(){return Ub(a.copy(),b)},Kb(c,a)}function Vb(a){return function(b){return 0>b?-Math.pow(-b,a):Math.pow(b,a)}}function Wb(a,b){function c(b){return g[((f.get(b)||f.set(b,a.push(b)))-1)%g.length]}function e(b,c){return d3.range(a.length).map(function(a){return b+c*a})}var f,g,h;return c.domain=function(e){if(!arguments.length)return a;a=[],f=new d;for(var g,h=-1,i=e.length;++h<i;)f.has(g=e[h])||f.set(g,a.push(g));return c[b.t].apply(c,b.a)},c.range=function(a){return arguments.length?(g=a,h=0,b={t:"range",a:arguments},c):g},c.rangePoints=function(d,f){arguments.length<2&&(f=0);var i=d[0],j=d[1],k=(j-i)/(Math.max(1,a.length-1)+f);return g=e(a.length<2?(i+j)/2:i+k*f/2,k),h=0,b={t:"rangePoints",a:arguments},c},c.rangeBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=(l-k)/(a.length-f+2*i);return g=e(k+m*i,m),j&&g.reverse(),h=m*(1-f),b={t:"rangeBands",a:arguments},c},c.rangeRoundBands=function(d,f,i){arguments.length<2&&(f=0),arguments.length<3&&(i=f);var j=d[1]<d[0],k=d[j-0],l=d[1-j],m=Math.floor((l-k)/(a.length-f+2*i)),n=l-k-(a.length-f)*m;return g=e(k+Math.round(n/2),m),j&&g.reverse(),h=Math.round(m*(1-f)),b={t:"rangeRoundBands",a:arguments},c},c.rangeBand=function(){return h},c.rangeExtent=function(){return Fb(b.a[0])},c.copy=function(){return Wb(a,b)},c.domain(a)}function Xb(a,b){function c(){var c=0,f=(a.length,b.length);for(e=[];++c<f;)e[c-1]=d3.quantile(a,c/f);return d}function d(a){return isNaN(a=+a)?0/0:b[d3.bisect(e,a)]}var e;return d.domain=function(b){return arguments.length?(a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),c()):a},d.range=function(a){return arguments.length?(b=a,c()):b},d.quantiles=function(){return e},d.copy=function(){return Xb(a,b)},c()}function Yb(a,b,c){function d(b){return c[Math.max(0,Math.min(g,Math.floor(f*(b-a))))]}function e(){return f=c.length/(b-a),g=c.length-1,d}var f,g;return d.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],e()):[a,b]},d.range=function(a){return arguments.length?(c=a,e()):c},d.copy=function(){return Yb(a,b,c)},e()}function Zb(a,b){function c(c){return b[d3.bisect(a,c)]}return c.domain=function(b){return arguments.length?(a=b,c):a},c.range=function(a){return arguments.length?(b=a,c):b},c.copy=function(){return Zb(a,b)},c}function $b(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return Nb(a,b)},b.tickFormat=function(b){return Ob(a,b)},b.copy=function(){return $b(a)},b}function _b(a){return a.innerRadius}function ac(a){return a.outerRadius}function bc(a){return a.startAngle}function cc(a){return a.endAngle}function dc(a){function b(b){function g(){k.push("M",f(a(l),j))}for(var i,k=[],l=[],m=-1,n=b.length,o=h(c),p=h(d);++m<n;)e.call(this,i=b[m],m)?l.push([+o.call(this,i,m),+p.call(this,i,m)]):l.length&&(g(),l=[]);return l.length&&g(),k.length?k.join(""):null}var c=ec,d=fc,e=g,f=gc,i=f.key,j=.7;return b.x=function(a){return arguments.length?(c=a,b):c},b.y=function(a){return arguments.length?(d=a,b):d},b.defined=function(a){return arguments.length?(e=a,b):e},b.interpolate=function(a){return arguments.length?(i="function"==typeof a?f=a:(f=Zf.get(a)||gc).key,b):i},b.tension=function(a){return arguments.length?(j=a,b):j},b}function ec(a){return a[0]}function fc(a){return a[1]}function gc(a){return a.join("L")}function hc(a){return gc(a)+"Z"}function ic(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function jc(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b<c;)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function kc(a,b){return a.length<4?gc(a):a[1]+nc(a.slice(1,a.length-1),oc(a,b))}function lc(a,b){return a.length<3?gc(a):a[0]+nc((a.push(a[0]),a),oc([a[a.length-2]].concat(a,[a[1]]),b))}function mc(a,b){return a.length<3?gc(a):a[0]+nc(a,oc(a,b))}function nc(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return gc(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;if(c&&(d+="Q"+(f[0]-2*g[0]/3)+","+(f[1]-2*g[1]/3)+","+f[0]+","+f[1],e=a[1],i=2),b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+2*h[0]/3)+","+(f[1]+2*h[1]/3)+","+k[0]+","+k[1]}return d}function oc(a,b){for(var c,d=[],e=(1-b)/2,f=a[0],g=a[1],h=1,i=a.length;++h<i;)c=f,f=g,g=a[h],d.push([e*(g[0]-c[0]),e*(g[1]-c[1])]);return d}function pc(a){if(a.length<3)return gc(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];for(uc(i,g,h);++b<c;)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);for(b=-1;++b<2;)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),uc(i,g,h);return i.join("")}function qc(a){if(a.length<4)return gc(a);for(var b,c=[],d=-1,e=a.length,f=[0],g=[0];++d<3;)b=a[d],f.push(b[0]),g.push(b[1]);for(c.push(tc(ag,f)+","+tc(ag,g)),--d;++d<e;)b=a[d],f.shift(),f.push(b[0]),g.shift(),g.push(b[1]),uc(c,f,g);return c.join("")}function rc(a){for(var b,c,d=-1,e=a.length,f=e+4,g=[],h=[];++d<4;)c=a[d%e],g.push(c[0]),h.push(c[1]);for(b=[tc(ag,g),",",tc(ag,h)],--d;++d<f;)c=a[d%e],g.shift(),g.push(c[0]),h.shift(),h.push(c[1]),uc(b,g,h);return b.join("")}function sc(a,b){var c=a.length-1;if(c)for(var d,e,f=a[0][0],g=a[0][1],h=a[c][0]-f,i=a[c][1]-g,j=-1;++j<=c;)d=a[j],e=j/c,d[0]=b*d[0]+(1-b)*(f+e*h),d[1]=b*d[1]+(1-b)*(g+e*i);return pc(a)}function tc(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function uc(a,b,c){a.push("C",tc($f,b),",",tc($f,c),",",tc(_f,b),",",tc(_f,c),",",tc(ag,b),",",tc(ag,c))}function vc(a,b){return(b[1]-a[1])/(b[0]-a[0])}function wc(a){for(var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=vc(e,f);++b<c;)d[b]=(g+(g=vc(e=f,f=a[b+1])))/2;return d[b]=g,d}function xc(a){for(var b,c,d,e,f=[],g=wc(a),h=-1,i=a.length-1;++h<i;)b=vc(a[h],a[h+1]),Math.abs(b)<1e-6?g[h]=g[h+1]=0:(c=g[h]/b,d=g[h+1]/b,e=c*c+d*d,e>9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function yc(a){return a.length<3?gc(a):a[0]+nc(a,xc(a))}function zc(a){for(var b,c,d,e=-1,f=a.length;++e<f;)b=a[e],c=b[0],d=b[1]+Xf,b[0]=c*Math.cos(d),b[1]=c*Math.sin(d);return a}function Ac(a){function b(b){function g(){q.push("M",j(a(s),n),m,l(a(r.reverse()),n),"Z")}for(var k,o,p,q=[],r=[],s=[],t=-1,u=b.length,v=h(c),w=h(e),x=c===d?function(){return o}:h(d),y=e===f?function(){return p}:h(f);++t<u;)i.call(this,k=b[t],t)?(r.push([o=+v.call(this,k,t),p=+w.call(this,k,t)]),s.push([+x.call(this,k,t),+y.call(this,k,t)])):r.length&&(g(),r=[],s=[]);return r.length&&g(),q.length?q.join(""):null}var c=ec,d=ec,e=0,f=fc,i=g,j=gc,k=j.key,l=j,m="L",n=.7;return b.x=function(a){return arguments.length?(c=d=a,b):d},b.x0=function(a){return arguments.length?(c=a,b):c},b.x1=function(a){return arguments.length?(d=a,b):d},b.y=function(a){return arguments.length?(e=f=a,b):f},b.y0=function(a){return arguments.length?(e=a,b):e},b.y1=function(a){return arguments.length?(f=a,b):f},b.defined=function(a){return arguments.length?(i=a,b):i},b.interpolate=function(a){return arguments.length?(k="function"==typeof a?j=a:(j=Zf.get(a)||gc).key,l=j.reverse||j,m=j.closed?"M":"L",b):k},b.tension=function(a){return arguments.length?(n=a,b):n},b}function Bc(a){return a.source}function Cc(a){return a.target}function Dc(a){return a.radius}function Ec(a){return[a.x,a.y]}function Fc(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+Xf;return[c*Math.cos(d),c*Math.sin(d)]}}function Gc(){return 64}function Hc(){return"circle"}function Ic(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+-b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"}function Jc(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function Kc(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function Lc(a,b,c){if(d=[],c&&b.length>1){for(var d,e,f,g=Fb(a.domain()),h=-1,i=b.length,j=(b[1]-b[0])/++c;++h<i;)for(e=c;--e>0;)(f=+b[h]-e*j)>=g[0]&&d.push(f);for(--h,e=0;++e<c&&(f=+b[h]+e*j)<g[1];)d.push(f)}return d}function Mc(){gg||(gg=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a,b=d3.event;try{gg.scrollTop=1e3,gg.dispatchEvent(b),a=1e3-gg.scrollTop}catch(c){a=b.wheelDelta||5*-b.detail}return a}function Nc(a){for(var b=a.source,c=a.target,d=Pc(b,c),e=[b];b!==d;)b=b.parent,e.push(b);for(var f=e.length;c!==d;)e.splice(f,0,c),c=c.parent;return e}function Oc(a){for(var b=[],c=a.parent;null!=c;)b.push(a),a=c,c=c.parent;return b.push(a),b}function Pc(a,b){if(a===b)return a;for(var c=Oc(a),d=Oc(b),e=c.pop(),f=d.pop(),g=null;e===f;)g=e,e=c.pop(),f=d.pop();return g}function Qc(a){a.fixed|=2}function Rc(a){a.fixed&=1}function Sc(a){a.fixed|=4}function Tc(a){a.fixed&=3}function Uc(a,b,c){var d=0,e=0;if(a.charge=0,!a.leaf)for(var f,g=a.nodes,h=g.length,i=-1;++i<h;)f=g[i],null!=f&&(Uc(f,b,c),a.charge+=f.charge,d+=f.charge*f.cx,e+=f.charge*f.cy);if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function Vc(){return 20}function Wc(){return 1}function Xc(a){return a.x}function Yc(a){return a.y}function Zc(a,b,c){a.y0=b,a.y=c}function $c(a){return d3.range(a.length)}function _c(a){for(var b=-1,c=a[0].length,d=[];++b<c;)d[b]=0;return d}function ad(a){for(var b,c=1,d=0,e=a[0][1],f=a.length;f>c;++c)(b=a[c][1])>e&&(d=c,e=b);return d}function bd(a){return a.reduce(cd,0)}function cd(a,b){return a+b[1]}function dd(a,b){return ed(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ed(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function fd(a){return[d3.min(a),d3.max(a)]}function gd(a,b){return d3.rebind(a,b,"sort","children","value"),a.links=kd,a.nodes=function(b){return lg=!0,(a.nodes=a)(b)},a}function hd(a){return a.children}function id(a){return a.value}function jd(a,b){return b.value-a.value}function kd(a){return d3.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function ld(a,b){return a.value-b.value}function md(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function nd(a,b){a._pack_next=b,b._pack_prev=a}function od(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return e*e-c*c-d*d>.001}function pd(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-1/0,m=1/0,n=-1/0;if(c.forEach(qd),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],td(d,e,f),b(f),md(d,f),d._pack_prev=f,md(f,e),e=d._pack_next,g=3;j>g;g++){td(d,e,f=c[g]);var o=0,p=1,q=1;for(h=e._pack_next;h!==e;h=h._pack_next,p++)if(od(h,f)){o=1;break}if(1==o)for(i=d._pack_prev;i!==h._pack_prev&&!od(i,f);i=i._pack_prev,q++);o?(q>p||p==q&&e.r<d.r?nd(d,e=h):nd(d=i,e),g--):(md(d,f),e=f,b(f))}var r=(k+l)/2,s=(m+n)/2,t=0;for(g=0;j>g;g++)f=c[g],f.x-=r,f.y-=s,t=Math.max(t,f.r+Math.sqrt(f.x*f.x+f.y*f.y));a.r=t,c.forEach(rd)}}function qd(a){a._pack_next=a._pack_prev=a}function rd(a){delete a._pack_next,delete a._pack_prev}function sd(a,b,c,d){var e=a.children;if(a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d,e)for(var f=-1,g=e.length;++f<g;)sd(e[f],b,c,d)}function td(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f)){var g=b.r+c.r,h=e*e+f*f;g*=g,d*=d;var i=.5+(d-g)/(2*h),j=Math.sqrt(Math.max(0,2*g*(d+h)-(d-=h)*d-g*g))/(2*h);c.x=a.x+i*e+j*f,c.y=a.y+i*f-j*e}else c.x=a.x+d,c.y=a.y}function ud(a){return 1+d3.max(a,function(a){return a.y})}function vd(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function wd(a){var b=a.children;return b&&b.length?wd(b[0]):a}function xd(a){var b,c=a.children;return c&&(b=c.length)?xd(c[b-1]):a}function yd(a,b){return a.parent==b.parent?1:2}function zd(a){var b=a.children;return b&&b.length?b[0]:a._tree.thread}function Ad(a){var b,c=a.children;return c&&(b=c.length)?c[b-1]:a._tree.thread}function Bd(a,b){var c=a.children;if(c&&(e=c.length))for(var d,e,f=-1;++f<e;)b(d=Bd(c[f],b),a)>0&&(a=d);return a}function Cd(a,b){return a.x-b.x}function Dd(a,b){return b.x-a.x}function Ed(a,b){return a.depth-b.depth}function Fd(a,b){function c(a,d){var e=a.children;if(e&&(g=e.length))for(var f,g,h=null,i=-1;++i<g;)f=e[i],c(f,h),h=f;b(a,d)}c(a,null)}function Gd(a){for(var b,c=0,d=0,e=a.children,f=e.length;--f>=0;)b=e[f]._tree,b.prelim+=c,b.mod+=c,c+=b.shift+(d+=b.change)}function Hd(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function Id(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function Jd(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Kd(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return 0>e&&(c+=e/2,e=0),0>f&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Ld(a,b){function c(a,d){d3.text(a,b,function(a){d(a&&c.parse(a))})}function d(b){return b.map(e).join(a)}function e(a){return g.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}var f=new RegExp("\r\n|["+a+"\r\n]","g"),g=new RegExp('["'+a+"\n]"),h=a.charCodeAt(0);return c.parse=function(a){var b;return c.parseRows(a,function(a,c){if(c){for(var d={},e=-1,f=b.length;++e<f;)d[b[e]]=a[e];return d}return b=a,null})},c.parseRows=function(a,b){function c(){if(f.lastIndex>=a.length)return i;if(e)return e=!1,g;var b=f.lastIndex;if(34===a.charCodeAt(b)){for(var c=b;c++<a.length;)if(34===a.charCodeAt(c)){if(34!==a.charCodeAt(c+1))break;c++}f.lastIndex=c+2;var d=a.charCodeAt(c+1);return 13===d?(e=!0,10===a.charCodeAt(c+2)&&f.lastIndex++):10===d&&(e=!0),a.substring(b+1,c).replace(/""/g,'"')}var j=f.exec(a);return j?(e=j[0].charCodeAt(0)!==h,a.substring(b,j.index)):(f.lastIndex=a.length,a.substring(b))}var d,e,g={},i={},j=[],k=0;for(f.lastIndex=0;(d=c())!==i;){for(var l=[];d!==g&&d!==i;)l.push(d),d=c();(!b||(l=b(l,k++)))&&j.push(l)}return j},c.format=function(a){return a.map(d).join("\n")},c}function Md(a,b){return function(c){return c&&a.hasOwnProperty(c.type)?a[c.type](c):b}}function Nd(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Od(a,b){ng.hasOwnProperty(a.type)&&ng[a.type](a,b)}function Pd(a,b){Od(a.geometry,b)}function Qd(a,b){for(var c=a.features,d=0,e=c.length;e>d;d++)Od(c[d].geometry,b)}function Rd(a,b){for(var c=a.geometries,d=0,e=c.length;e>d;d++)Od(c[d],b)}function Sd(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Td(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Ud(a,b){for(var c=a.coordinates,d=0,e=c.length;e>d;d++)for(var f=c[d][0],g=0,h=f.length;h>g;g++)b.apply(null,f[g])}function Vd(a,b){b.apply(null,a.coordinates)}function Wd(a,b){for(var c=a.coordinates[0],d=0,e=c.length;e>d;d++)b.apply(null,c[d])}function Xd(a){return a.source}function Yd(a){return a.target}function Zd(){function a(a){var b=Math.sin(a*=n)*o,c=Math.sin(n-a)*o,d=c*f+b*l,h=c*g+b*m,i=c*e+b*k;return[Math.atan2(h,d)/mg,Math.atan2(i,Math.sqrt(d*d+h*h))/mg]}var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return a.distance=function(){return null==n&&(o=1/Math.sin(n=Math.acos(Math.max(-1,Math.min(1,e*k+d*j*Math.cos(h-b)))))),n},a.source=function(h){var i=Math.cos(b=h[0]*mg),j=Math.sin(b);return d=Math.cos(c=h[1]*mg),e=Math.sin(c),f=d*i,g=d*j,n=null,a},a.target=function(b){var c=Math.cos(h=b[0]*mg),d=Math.sin(h);return j=Math.cos(i=b[1]*mg),k=Math.sin(i),l=j*c,m=j*d,n=null,a},a}function $d(a,b){var c=Zd().source(a).target(b);return c.distance(),c}function _d(a){for(var b=0,c=0;;){if(a(b,c))return[b,c];0===b?(b=c+1,c=0):(b-=1,c+=1)}}function ae(a,b,c,d){var e,f,g,h,i,j,k;return e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1],(k-g)*(h-f)-(i-g)*(j-f)>0}function be(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function ce(a,b,c,d){var e=a[0],f=b[0],g=c[0],h=d[0],i=a[1],j=b[1],k=c[1],l=d[1],m=e-g,n=f-e,o=h-g,p=i-k,q=j-i,r=l-k,s=(o*p-r*m)/(r*n-o*q);return[e+s*n,i+s*q]}function de(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));return b=b.l},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return null==a.edge?c.bottomSite:a.edge.region[qg[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;return c.c=a.x*d+a.y*e+.5*(d*d+e*e),f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e),c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f,g,h=(c.c*d.b-d.c*c.b)/e,i=(d.c*c.a-c.c*d.a)/e,j=c.region.r,k=d.region.r;j.y<k.y||j.y==k.y&&j.x<k.x?(f=a,g=c):(f=b,g=d);var l=h>=g.region.r.x;return l&&"l"===f.side||!l&&"r"===f.side?null:{x:h,y:i}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&"l"===a.side)return 1;if(!e&&"r"===a.side)return 0;if(1===c.a){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;if(!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1)),!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return"l"===a.side?i:!i},endPoint:function(a,c,d){a.ep[c]=d,a.ep[qg[c]]&&b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;g>d;d++){var h=e[d];if(!(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x))break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;d>b&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return 0===f.list.length},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;d>b;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.list.shift();for(var g,h,i,j,k,l,m,n,o,p,q,r,s,t=c.list.shift();;)if(f.empty()||(g=f.min()),t&&(f.empty()||t.y<g.y||t.y==g.y&&t.x<g.x))h=d.leftBound(t),i=d.right(h),m=d.rightRegion(h),r=e.bisect(m,t),l=d.createHalfEdge(r,"l"),d.insert(h,l),p=e.intersect(h,l),p&&(f.del(h),f.insert(h,p,e.distance(p,t))),h=l,l=d.createHalfEdge(r,"r"),d.insert(h,l),p=e.intersect(l,i),p&&f.insert(l,p,e.distance(p,t)),t=c.list.shift();else{if(f.empty())break;h=f.extractMin(),j=d.left(h),i=d.right(h),k=d.right(i),m=d.leftRegion(h),n=d.rightRegion(i),q=h.vertex,e.endPoint(h.edge,h.side,q),e.endPoint(i.edge,i.side,q),d.del(h),f.del(i),d.del(i),s="l",m.y>n.y&&(o=m,m=n,n=o,s="r"),r=e.bisect(m,n),l=d.createHalfEdge(r,s),d.insert(j,l),e.endPoint(r,qg[s],q),p=e.intersect(j,l),p&&(f.del(j),f.insert(j,p,e.distance(p,m))),p=e.intersect(l,k),p&&f.insert(l,p,e.distance(p,m))}for(h=d.right(d.leftEnd);h!=d.rightEnd;h=d.right(h))b(h.edge)}function ee(){return{leaf:!0,nodes:[],point:null}}function fe(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=.5*(c+e),h=.5*(d+f),i=b.nodes;i[0]&&fe(a,i[0],c,d,g,h),i[1]&&fe(a,i[1],g,d,e,h),i[2]&&fe(a,i[2],c,h,g,f),i[3]&&fe(a,i[3],g,h,e,f)}}function ge(a){return{x:a[0],y:a[1]}}function he(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ie(a){return a.substring(0,3)}function je(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;h>g;){if(d>=i)return-1;if(e=b.charCodeAt(g++),37==e){if(f=Mg[b.charAt(g++)],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function ke(a){return new RegExp("^(?:"+a.map(d3.requote).join("|")+")","i")}function le(a){for(var b=new d,c=-1,e=a.length;++c<e;)b.set(a[c].toLowerCase(),c);return b}function me(a,b,c){Gg.lastIndex=0;var d=Gg.exec(b.substring(c));return d?c+=d[0].length:-1}function ne(a,b,c){Fg.lastIndex=0;var d=Fg.exec(b.substring(c));return d?c+=d[0].length:-1}function oe(a,b,c){Jg.lastIndex=0;var d=Jg.exec(b.substring(c));return d?(a.m=Kg.get(d[0].toLowerCase()),c+=d[0].length):-1}function pe(a,b,c){Hg.lastIndex=0;var d=Hg.exec(b.substring(c));return d?(a.m=Ig.get(d[0].toLowerCase()),c+=d[0].length):-1}function qe(a,b,c){return je(a,Lg.c.toString(),b,c)}function re(a,b,c){return je(a,Lg.x.toString(),b,c)}function se(a,b,c){return je(a,Lg.X.toString(),b,c)}function te(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+4));return d?(a.y=+d[0],c+=d[0].length):-1}function ue(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.y=ve(+d[0]),c+=d[0].length):-1}function ve(a){return a+(a>68?1900:2e3)}function we(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.m=d[0]-1,c+=d[0].length):-1}function xe(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.d=+d[0],c+=d[0].length):-1}function ye(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.H=+d[0],c+=d[0].length):-1}function ze(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.M=+d[0],c+=d[0].length):-1}function Ae(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+2));return d?(a.S=+d[0],c+=d[0].length):-1}function Be(a,b,c){Ng.lastIndex=0;var d=Ng.exec(b.substring(c,c+3));return d?(a.L=+d[0],c+=d[0].length):-1}function Ce(a,b,c){var d=Og.get(b.substring(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}function De(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=~~(Math.abs(b)/60),e=Math.abs(b)%60;return c+Bg(d)+Bg(e)}function Ee(a){return a.toISOString()}function Fe(a,b,c){function d(b){var c=a(b),d=f(c,1);return d-b>b-c?c:d}function e(c){return b(c=a(new rg(c-1)),1),c}function f(a,c){return b(a=new rg(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)for(;d>g;)c(g)%f||h.push(new Date(+g)),b(g,1);else for(;d>g;)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{rg=he;var d=new he;return d._=a,g(d,b,c)}finally{rg=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=Ge(a);return i.floor=i,i.round=Ge(d),i.ceil=Ge(e),i.offset=Ge(f),i.range=h,a}function Ge(a){return function(b,c){try{rg=he;var d=new he;return d._=b,a(d,c)._}finally{rg=Date}}}function He(a,b,c){function d(b){return a(b)}return d.invert=function(b){return Je(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(Je)},d.nice=function(a){return d.domain(Hb(d.domain(),function(){return a}))},d.ticks=function(c,e){var f=Ie(d.domain());if("function"!=typeof c){var g=f[1]-f[0],h=g/c,i=d3.bisect(Qg,h);if(i==Qg.length)return b.year(f,c);if(!i)return a.ticks(c).map(Je);Math.log(h/Qg[i-1])<Math.log(Qg[i]/h)&&--i,c=b[i],e=c[1],c=c[0].range}return c(f[0],new Date(+f[1]+1),e)},d.tickFormat=function(){return c},d.copy=function(){return He(a.copy(),b,c)},d3.rebind(d,a,"range","rangeRound","interpolate","clamp")}function Ie(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function Je(a){return new Date(a)}function Ke(a){return function(b){for(var c=a.length-1,d=a[c];!d[1](b);)d=a[--c];return d[0](b)}}function Le(a){var b=new Date(a,0,1);return b.setFullYear(a),b}function Me(a){var b=a.getFullYear(),c=Le(b),d=Le(b+1);return b+(a-c)/(d-c)}function Ne(a){var b=new Date(Date.UTC(a,0,1));return b.setUTCFullYear(a),b}function Oe(a){var b=a.getUTCFullYear(),c=Ne(b),d=Ne(b+1);return b+(a-c)/(d-c)}Date.now||(Date.now=function(){return+new Date});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Pe){var Qe=CSSStyleDeclaration.prototype,Re=Qe.setProperty;Qe.setProperty=function(a,b,c){Re.call(this,a,b+"",c)}}d3={version:"2.10.3"};var Se=c;try{Se(document.documentElement.childNodes)[0].nodeType}catch(Te){Se=b}var Ue=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.map=function(a){var b=new d;for(var c in a)b.set(c,a[c]);return b},a(d,{has:function(a){return Ve+a in this},get:function(a){return this[Ve+a]},set:function(a,b){return this[Ve+a]=b},remove:function(a){return a=Ve+a,a in this&&delete this[a]},keys:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},values:function(){var a=[];
+return this.forEach(function(b,c){a.push(c)}),a},entries:function(){var a=[];return this.forEach(function(b,c){a.push({key:b,value:c})}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===We&&a.call(this,b.substring(1),this[b])}});var Ve="\x00",We=Ve.charCodeAt(0);d3.functor=h,d3.rebind=function(a,b){for(var c,d=1,e=arguments.length;++d<e;)a[c=arguments[d]]=i(a,b,b[c]);return a},d3.ascending=function(a,b){return b>a?-1:a>b?1:a>=b?0:0/0},d3.descending=function(a,b){return a>b?-1:b>a?1:b>=a?0:0/0},d3.mean=function(a,b){var c,d=a.length,e=0,f=-1,g=0;if(1===arguments.length)for(;++f<d;)j(c=a[f])&&(e+=(c-e)/++g);else for(;++f<d;)j(c=b.call(a,a[f],f))&&(e+=(c-e)/++g);return g?e:void 0},d3.median=function(a,b){return arguments.length>1&&(a=a.map(b)),a=a.filter(j),a.length?d3.quantile(a.sort(d3.ascending),.5):void 0},d3.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&c>d&&(c=d)}return c},d3.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e<f&&(null==(c=a[e])||c!=c);)c=void 0;for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f&&(null==(c=b.call(a,a[e],e))||c!=c);)c=void 0;for(;++e<f;)null!=(d=b.call(a,a[e],e))&&d>c&&(c=d)}return c},d3.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f<g&&(null==(c=e=a[f])||c!=c);)c=e=void 0;for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),d>e&&(e=d))}else{for(;++f<g&&(null==(c=e=b.call(a,a[f],f))||c!=c);)c=void 0;for(;++f<g;)null!=(d=b.call(a,a[f],f))&&(c>d&&(c=d),d>e&&(e=d))}return[c,e]},d3.random={normal:function(a,b){var c=arguments.length;return 2>c&&(b=1),1>c&&(a=0),function(){var c,d,e;do c=2*Math.random()-1,d=2*Math.random()-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(a,b){var c=arguments.length;2>c&&(b=1),1>c&&(a=0);var d=d3.random.normal();return function(){return Math.exp(a+b*d())}},irwinHall:function(a){return function(){for(var b=0,c=0;a>c;c++)b+=Math.random();return b/a}}},d3.sum=function(a,b){var c,d=0,e=a.length,f=-1;if(1===arguments.length)for(;++f<e;)isNaN(c=+a[f])||(d+=c);else for(;++f<e;)isNaN(c=+b.call(a,a[f],f))||(d+=c);return d},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.transpose=function(a){return d3.zip.apply(d3,a)},d3.zip=function(){if(!(d=arguments.length))return[];for(var a=-1,b=d3.min(arguments,k),c=new Array(b);++a<b;)for(var d,e=-1,f=c[a]=new Array(d);++e<d;)f[e]=arguments[e][a];return c},d3.bisector=function(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;a.call(b,b[f],f)<c?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);e>d;){var f=d+e>>>1;c<a.call(b,b[f],f)?e=f:d=f+1}return d}}};var Xe=d3.bisector(function(a){return a});d3.bisectLeft=Xe.left,d3.bisect=d3.bisectRight=Xe.right,d3.first=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])>0&&(f=c);return f},d3.last=function(a,b){var c,d=0,e=a.length,f=a[0];for(1===arguments.length&&(b=d3.ascending);++d<e;)b.call(a,f,c=a[d])<=0&&(f=c);return f},d3.nest=function(){function a(b,h){if(h>=g.length)return e?e.call(f,b):c?b.sort(c):b;for(var i,j,k,l=-1,m=b.length,n=g[h++],o=new d,p={};++l<m;)(k=o.get(i=n(j=b[l])))?k.push(j):o.set(i,[j]);return o.forEach(function(b,c){p[b]=a(c,h)}),p}function b(a,c){if(c>=g.length)return a;var d,e=[],f=h[c++];for(d in a)e.push({key:d,values:b(a[d],c)});return f&&e.sort(function(a,b){return f(a.key,b.key)}),e}var c,e,f={},g=[],h=[];return f.map=function(b){return a(b,0)},f.entries=function(c){return b(a(c,0),0)},f.key=function(a){return g.push(a),f},f.sortKeys=function(a){return h[g.length-1]=a,f},f.sortValues=function(a){return c=a,f},f.rollup=function(a){return e=a,f},f},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){for(var c=[],d=-1,e=b.length;++d<e;)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c,d=[],e=[],f=-1,g=a.length;for(arguments.length<2&&(b=l);++f<g;)b.call(e,c=a[f],f)?e=[]:(e.length||d.push(e),e.push(c));return d},d3.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=n(Math.abs(c)),g=-1;if(a*=f,b*=f,c*=f,0>c)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)<b;)e.push(d/f);return e},d3.requote=function(a){return a.replace(Ye,"\\$&")};var Ye=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?(c=b,b=null):b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),b&&d.setRequestHeader("Accept",b),d.onreadystatechange=function(){if(4===d.readyState){var a=d.status;c(!a&&d.response||a>=200&&300>a||304===a?d:null)}},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(null!=a){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)};var Ze={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:Ze,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.substring(0,b),a=a.substring(b+1)),Ze.hasOwnProperty(c)?{space:Ze[c],local:a}:a}},d3.dispatch=function(){for(var a=new o,b=-1,c=arguments.length;++b<c;)a[arguments[b]]=p(a);return a},o.prototype.on=function(a,b){var c=a.indexOf("."),d="";return c>0&&(d=a.substring(c+1),a=a.substring(0,c)),arguments.length<2?this[a].on(d):this[a].on(d,b)},d3.format=function(a){var b=$e.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=1,k="",l=!1;switch(h&&(h=+h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4))),i){case"n":g=!0,i="g";break;case"%":j=100,k="%",i="f";break;case"p":j=100,k="%",i="r";break;case"d":l=!0,h=0;break;case"s":j=-1,i="r"}return"r"!=i||h||(i="g"),i=_e.get(i)||r,function(a){if(l&&a%1)return"";var b=0>a&&(a=-a)?"-":d;if(0>j){var m=d3.formatPrefix(a,h);a=m.scale(a),k=m.symbol}else a*=j;if(a=i(a,h),e){var n=a.length+b.length;f>n&&(a=new Array(f-n+1).join(c)+a),g&&(a=s(a)),a=b+a}else{g&&(a=s(a)),a=b+a;var n=a.length;f>n&&(a=new Array(f-n+1).join(c)+a)}return a+k}};var $e=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,_e=d3.map({g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return d3.round(a,b=q(a,b)).toFixed(Math.max(0,Math.min(20,b)))}}),af=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(t);d3.formatPrefix=function(a,b){var c=0;return a&&(0>a&&(a*=-1),b&&(a=d3.round(a,q(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,3*Math.floor((0>=c?c+1:c-1)/3)))),af[8+c/3]};var bf=y(2),cf=y(3),df=function(){return x},ef=d3.map({linear:df,poly:y,quad:function(){return bf},cubic:function(){return cf},sin:function(){return z},exp:function(){return A},circle:function(){return B},elastic:C,back:D,bounce:function(){return E}}),ff=d3.map({"in":x,out:v,"in-out":w,"out-in":function(a){return w(v(a))}});d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return c=ef.get(c)||df,d=ff.get(d)||x,u(d(c.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(a){var b=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate();return new I(c?c.matrix:hf)})(a)},I.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gf=180/Math.PI,hf={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(a,b){for(var c,d=d3.interpolators.length;--d>=0&&!(c=d3.interpolators[d](a,b)););return c},d3.interpolateNumber=function(a,b){return b-=a,function(c){return a+b*c}},d3.interpolateRound=function(a,b){return b-=a,function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f,g,h=0,i=0,j=[],k=[];for(jf.lastIndex=0,d=0;c=jf.exec(b);++d)c.index&&j.push(b.substring(h,i=c.index)),k.push({i:j.length,x:c[0]}),j.push(null),h=jf.lastIndex;for(h<b.length&&j.push(b.substring(h)),d=0,f=k.length;(c=jf.exec(a))&&f>d;++d)if(g=k[d],g.x==c[0]){if(g.i)if(null==j[g.i+1])for(j[g.i-1]+=g.x,j.splice(g.i,1),e=d+1;f>e;++e)k[e].i--;else for(j[g.i-1]+=g.x+j[g.i+1],j.splice(g.i,2),e=d+1;f>e;++e)k[e].i-=2;else if(null==j[g.i+1])j[g.i]=g.x;else for(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1),e=d+1;f>e;++e)k[e].i--;k.splice(d,1),f--,d--}else g.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(g.x));for(;f>d;)g=k.pop(),null==j[g.i+1]?j[g.i]=g.x:(j[g.i]=g.x+j[g.i+1],j.splice(g.i+1,1)),f--;return 1===j.length?null==j[0]?k[0].x:function(){return b}:function(a){for(d=0;f>d;++d)j[(g=k[d]).i]=g.x(a);return j.join("")}},d3.interpolateTransform=function(a,b){var c,d=[],e=[],f=d3.transform(a),g=d3.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(d.push("translate(",null,",",null,")"),e.push({i:1,x:d3.interpolateNumber(h[0],i[0])},{i:3,x:d3.interpolateNumber(h[1],i[1])})):i[0]||i[1]?d.push("translate("+i+")"):d.push(""),j!=k?(j-k>180?k+=360:k-j>180&&(j+=360),e.push({i:d.push(d.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(j,k)})):k&&d.push(d.pop()+"rotate("+k+")"),l!=m?e.push({i:d.push(d.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(l,m)}):m&&d.push(d.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(c=d.push(d.pop()+"scale(",null,",",null,")"),e.push({i:c-4,x:d3.interpolateNumber(n[0],o[0])},{i:c-2,x:d3.interpolateNumber(n[1],o[1])})):(1!=o[0]||1!=o[1])&&d.push(d.pop()+"scale("+o+")"),c=e.length,function(a){for(var b,f=-1;++f<c;)d[(b=e[f]).i]=b.x(a);return d.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+S(Math.round(c+f*a))+S(Math.round(d+g*a))+S(Math.round(e+h*a))}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return $(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateLab=function(a,b){a=d3.lab(a),b=d3.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return eb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateHcl=function(a,b){a=d3.hcl(a),b=d3.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return f>180?f-=360:-180>f&&(f+=360),function(a){return bb(c+f*a,d+g*a,e+h*a)+""}},d3.interpolateArray=function(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;h>c;++c)d.push(d3.interpolate(a[c],b[c]));for(;f>c;++c)e[c]=a[c];for(;g>c;++c)e[c]=b[c];return function(a){for(c=0;h>c;++c)e[c]=d[c](a);return e}},d3.interpolateObject=function(a,b){var c,d={},e={};for(c in a)c in b?d[c]=M(c)(a[c],b[c]):e[c]=a[c];for(c in b)c in a||(e[c]=b[c]);return function(a){for(c in d)e[c]=d[c](a);return e}};var jf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return("string"==typeof a||"string"==typeof b)&&d3.interpolateString(a+"",b+"")},function(a,b){return("string"==typeof b?lf.has(b)||/^(#|rgb\(|hsl\()/.test(b):b instanceof P)&&d3.interpolateRgb(a,b)},function(a,b){return!isNaN(a=+a)&&!isNaN(b=+b)&&d3.interpolateNumber(a,b)}],P.prototype.toString=function(){return this.rgb()+""},d3.rgb=function(a,b,c){return 1===arguments.length?a instanceof R?Q(a.r,a.g,a.b):T(""+a,Q,$):Q(~~a,~~b,~~c)};var kf=R.prototype=new P;kf.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return b||c||d?(b&&e>b&&(b=e),c&&e>c&&(c=e),d&&e>d&&(d=e),Q(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))):Q(e,e,e)},kf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Q(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},kf.hsl=function(){return U(this.r,this.g,this.b)},kf.toString=function(){return"#"+S(this.r)+S(this.g)+S(this.b)};var lf=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});lf.forEach(function(a,b){lf.set(a,T(b,Q,$))}),d3.hsl=function(a,b,c){return 1===arguments.length?a instanceof Z?Y(a.h,a.s,a.l):T(""+a,U,Y):Y(+a,+b,+c)};var mf=Z.prototype=new P;mf.brighter=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,this.l/a)},mf.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),Y(this.h,this.s,a*this.l)},mf.rgb=function(){return $(this.h,this.s,this.l)},d3.hcl=function(a,b,c){return 1===arguments.length?a instanceof ab?_(a.h,a.c,a.l):a instanceof db?fb(a.l,a.a,a.b):fb((a=V((a=d3.rgb(a)).r,a.g,a.b)).l,a.a,a.b):_(+a,+b,+c)};var nf=ab.prototype=new P;nf.brighter=function(a){return _(this.h,this.c,Math.min(100,this.l+of*(arguments.length?a:1)))},nf.darker=function(a){return _(this.h,this.c,Math.max(0,this.l-of*(arguments.length?a:1)))},nf.rgb=function(){return bb(this.h,this.c,this.l).rgb()},d3.lab=function(a,b,c){return 1===arguments.length?a instanceof db?cb(a.l,a.a,a.b):a instanceof ab?bb(a.l,a.c,a.h):V((a=d3.rgb(a)).r,a.g,a.b):cb(+a,+b,+c)};var of=18,pf=.95047,qf=1,rf=1.08883,sf=db.prototype=new P;sf.brighter=function(a){return cb(Math.min(100,this.l+of*(arguments.length?a:1)),this.a,this.b)},sf.darker=function(a){return cb(Math.max(0,this.l-of*(arguments.length?a:1)),this.a,this.b)},sf.rgb=function(){return eb(this.l,this.a,this.b)};var tf=function(a,b){return b.querySelector(a)},uf=function(a,b){return b.querySelectorAll(a)},vf=document.documentElement,wf=vf.matchesSelector||vf.webkitMatchesSelector||vf.mozMatchesSelector||vf.msMatchesSelector||vf.oMatchesSelector,xf=function(a,b){return wf.call(a,b)};"function"==typeof Sizzle&&(tf=function(a,b){return Sizzle(a,b)[0]||null},uf=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))},xf=Sizzle.matchesSelector);var yf=[];d3.selection=function(){return zf},d3.selection.prototype=yf,yf.select=function(a){var b,c,d,e,f=[];"function"!=typeof a&&(a=kb(a));for(var g=-1,h=this.length;++g<h;){f.push(b=[]),b.parentNode=(d=this[g]).parentNode;for(var i=-1,j=d.length;++i<j;)(e=d[i])?(b.push(c=a.call(e,e.__data__,i)),c&&"__data__"in e&&(c.__data__=e.__data__)):b.push(null)}return jb(f)},yf.selectAll=function(a){var b,c,d=[];"function"!=typeof a&&(a=lb(a));for(var e=-1,f=this.length;++e<f;)for(var g=this[e],h=-1,i=g.length;++h<i;)(c=g[h])&&(d.push(b=Se(a.call(c,c.__data__,h))),b.parentNode=c);return jb(d)},yf.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=d3.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(mb(b,a[b]));return this}return this.each(mb(a,b))},yf.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=a.trim().split(/^|\s+/g)).length,e=-1;if(b=c.classList){for(;++e<d;)if(!b.contains(a[e]))return!1}else for(b=c.className,null!=b.baseVal&&(b=b.baseVal);++e<d;)if(!nb(a[e]).test(b))return!1;return!0}for(b in a)this.each(ob(b,a[b]));return this}return this.each(ob(a,b))},yf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.each(qb(c,a[c],b));return this}if(2>d)return window.getComputedStyle(this.node(),null).getPropertyValue(a);c=""}return this.each(qb(a,b,c))},yf.property=function(a,b){if(arguments.length<2){if("string"==typeof a)return this.node()[a];for(b in a)this.each(rb(b,a[b]));return this}return this.each(rb(a,b))},yf.text=function(a){return arguments.length<1?this.node().textContent:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.textContent=null==b?"":b}:null==a?function(){this.textContent=""}:function(){this.textContent=a})},yf.html=function(a){return arguments.length<1?this.node().innerHTML:this.each("function"==typeof a?function(){var b=a.apply(this,arguments);this.innerHTML=null==b?"":b}:null==a?function(){this.innerHTML=""}:function(){this.innerHTML=a})},yf.append=function(a){function b(){return this.appendChild(document.createElementNS(this.namespaceURI,a))}function c(){return this.appendChild(document.createElementNS(a.space,a.local))}return a=d3.ns.qualify(a),this.select(a.local?c:b)},yf.insert=function(a,b){function c(){return this.insertBefore(document.createElementNS(this.namespaceURI,a),tf(b,this))}function d(){return this.insertBefore(document.createElementNS(a.space,a.local),tf(b,this))}return a=d3.ns.qualify(a),this.select(a.local?d:c)},yf.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},yf.data=function(a,b){function c(a,c){var e,f,g,h=a.length,l=c.length,m=Math.min(h,l),n=Math.max(h,l),o=[],p=[],q=[];if(b){var r,s=new d,t=[],u=c.length;for(e=-1;++e<h;)r=b.call(f=a[e],f.__data__,e),s.has(r)?q[u++]=f:s.set(r,f),t.push(r);for(e=-1;++e<l;)r=b.call(c,g=c[e],e),s.has(r)?(o[e]=f=s.get(r),f.__data__=g,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null),s.remove(r);for(e=-1;++e<h;)s.has(t[e])&&(q[e]=a[e])}else{for(e=-1;++e<m;)f=a[e],g=c[e],f?(f.__data__=g,o[e]=f,p[e]=q[e]=null):(p[e]=sb(g),o[e]=q[e]=null);for(;l>e;++e)p[e]=sb(c[e]),o[e]=q[e]=null;for(;n>e;++e)q[e]=a[e],p[e]=o[e]=null}p.update=o,p.parentNode=o.parentNode=q.parentNode=a.parentNode,i.push(p),j.push(o),k.push(q)}var e,f,g=-1,h=this.length;if(!arguments.length){for(a=new Array(h=(e=this[0]).length);++g<h;)(f=e[g])&&(a[g]=f.__data__);return a}var i=xb([]),j=jb([]),k=jb([]);if("function"==typeof a)for(;++g<h;)c(e=this[g],a.call(e,e.parentNode.__data__,g));else for(;++g<h;)c(e=this[g],a);return j.enter=function(){return i},j.exit=function(){return k},j},yf.datum=yf.map=function(a){return arguments.length<1?this.property("__data__"):this.property("__data__",a)},yf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]),b.parentNode=(c=this[f]).parentNode;for(var h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d,d.__data__,h)&&b.push(d)}return jb(e)},yf.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c,d=this[a],e=d.length-1,f=d[e];--e>=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},yf.sort=function(a){a=ub.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},yf.on=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b=!1);for(c in a)this.each(vb(c,a[c],b));return this}if(2>d)return(d=this.node()["__on"+a])&&d._;c=!1}return this.each(vb(a,b,c))},yf.each=function(a){return wb(this,function(b,c,d){a.call(b,b.__data__,c,d)})},yf.call=function(a){return a.apply(this,(arguments[0]=this,arguments)),this},yf.empty=function(){return!this.node()},yf.node=function(){for(var a=0,b=this.length;b>a;a++)for(var c=this[a],d=0,e=c.length;e>d;d++){var f=c[d];if(f)return f}return null},yf.transition=function(){for(var a,b,c=[],d=-1,e=this.length;++d<e;){c.push(a=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)a.push((b=f[g])?{node:b,delay:Hf,duration:If}:null)}return yb(c,Df||++Cf,Date.now())};var zf=jb([[document]]);zf[0].parentNode=vf,d3.select=function(a){return"string"==typeof a?zf.select(a):jb([[a]])},d3.selectAll=function(a){return"string"==typeof a?zf.selectAll(a):jb([Se(a)])};var Af=[];d3.selection.enter=xb,d3.selection.enter.prototype=Af,Af.append=yf.append,Af.insert=yf.insert,Af.empty=yf.empty,Af.node=yf.node,Af.select=function(a){for(var b,c,d,e,f,g=[],h=-1,i=this.length;++h<i;){d=(e=this[h]).update,g.push(b=[]),b.parentNode=e.parentNode;for(var j=-1,k=e.length;++j<k;)(f=e[j])?(b.push(d[j]=c=a.call(e.parentNode,f.__data__,j)),c.__data__=f.__data__):b.push(null)}return jb(g)};var Bf=[],Cf=0,Df=0,Ef=0,Ff=250,Gf=d3.ease("cubic-in-out"),Hf=Ef,If=Ff,Jf=Gf;Bf.call=yf.call,d3.transition=function(a){return arguments.length?Df?a.transition():a:zf.transition()},d3.transition.prototype=Bf,Bf.select=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=kb(a));for(var f=-1,g=this.length;++f<g;){e.push(b=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(d=h[i])&&(c=a.call(d.node,d.node.__data__,i))?("__data__"in d.node&&(c.__data__=d.node.__data__),b.push({node:c,delay:d.delay,duration:d.duration})):b.push(null)}return yb(e,this.id,this.time).ease(this.ease())},Bf.selectAll=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=lb(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(d=h[i]){c=a.call(d.node,d.node.__data__,i),e.push(b=[]);for(var k=-1,l=c.length;++k<l;)b.push({node:c[k],delay:d.delay,duration:d.duration})}return yb(e,this.id,this.time).ease(this.ease())},Bf.filter=function(a){var b,c,d,e=[];"function"!=typeof a&&(a=tb(a));for(var f=0,g=this.length;g>f;f++){e.push(b=[]);for(var c=this[f],h=0,i=c.length;i>h;h++)(d=c[h])&&a.call(d.node,d.node.__data__,h)&&b.push(d)}return yb(e,this.id,this.time).ease(this.ease())},Bf.attr=function(a,b){if(arguments.length<2){for(b in a)this.attrTween(b,Bb(a[b],b));return this}return this.attrTween(a,Bb(b,a))},Bf.attrTween=function(a,b){function c(a,c){var d=b.call(this,a,c,this.getAttribute(e));return d===Mf?(this.removeAttribute(e),null):d&&function(a){this.setAttribute(e,d(a))}}function d(a,c){var d=b.call(this,a,c,this.getAttributeNS(e.space,e.local));return d===Mf?(this.removeAttributeNS(e.space,e.local),null):d&&function(a){this.setAttributeNS(e.space,e.local,d(a))}}var e=d3.ns.qualify(a);return this.tween("attr."+a,e.local?d:c)},Bf.style=function(a,b,c){var d=arguments.length;if(3>d){if("string"!=typeof a){2>d&&(b="");for(c in a)this.styleTween(c,Bb(a[c],c),b);return this}c=""}return this.styleTween(a,Bb(b,a),c)},Bf.styleTween=function(a,b,c){return arguments.length<3&&(c=""),this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f===Mf?(this.style.removeProperty(a),null):f&&function(b){this.style.setProperty(a,f(b),c)}})},Bf.text=function(a){return this.tween("text",function(b,c){this.textContent="function"==typeof a?a.call(this,b,c):a})},Bf.remove=function(){return this.each("end.transition",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},Bf.delay=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.delay=0|a.call(b=b.node,b.__data__,c,d)}:(a=0|a,function(b){b.delay=a}))},Bf.duration=function(a){return wb(this,"function"==typeof a?function(b,c,d){b.duration=Math.max(1,0|a.call(b=b.node,b.__data__,c,d))}:(a=Math.max(1,0|a),function(b){b.duration=a}))},Bf.transition=function(){return this.select(f)},d3.tween=function(a,b){function c(c,d,e){var f=a.call(this,c,d);return null==f?""!=e&&Mf:e!=f&&b(e,f+"")}function d(c,d,e){return e!=a&&b(e,a)}return"function"==typeof a?c:null==a?Ab:(a+="",d)};var Kf,Lf,Mf={},Nf=0,Of={},Pf=null;d3.timer=function(a,b,c){if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}var d=Of[a.id];d&&d.callback===a?(d.then=c,d.delay=b):Of[a.id=++Nf]=Pf={callback:a,then:c,delay:b,next:Pf},Kf||(Lf=clearTimeout(Lf),Kf=1,Qf(Cb))},d3.timer.flush=function(){for(var a,b=Date.now(),c=Pf;c;)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;Db()};var Qf=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.mouse=function(a){return Eb(a,G())};var Rf=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(a,b){return arguments.length<2&&(b=G().touches),b?Se(b).map(function(b){var c=Eb(a,b);return c.identifier=b.identifier,c}):[]},d3.scale={},d3.scale.linear=function(){return Jb([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Rb(d3.scale.linear(),Sb)};var Sf=d3.format(".0e");Sb.pow=function(a){return Math.pow(10,a)},Tb.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return Ub(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Wb([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Tf)},d3.scale.category20=function(){return d3.scale.ordinal().range(Uf)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Vf)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Wf)};var Tf=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Uf=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Vf=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Wf=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Xb([],[])},d3.scale.quantize=function(){return Yb(0,1,[0,1])},d3.scale.threshold=function(){return Zb([.5],[0,1])},d3.scale.identity=function(){return $b([0,1])},d3.svg={},d3.svg.arc=function(){function a(){var a=b.apply(this,arguments),f=c.apply(this,arguments),g=d.apply(this,arguments)+Xf,h=e.apply(this,arguments)+Xf,i=(g>h&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=Yf?a?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":a?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+a*m+","+a*n+"A"+a+","+a+" 0 "+j+",0 "+a*k+","+a*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0Z"}var b=_b,c=ac,d=bc,e=cc;return a.innerRadius=function(c){return arguments.length?(b=h(c),a):b},a.outerRadius=function(b){return arguments.length?(c=h(b),a):c},a.startAngle=function(b){return arguments.length?(d=h(b),a):d},a.endAngle=function(b){return arguments.length?(e=h(b),a):e},a.centroid=function(){var a=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(d.apply(this,arguments)+e.apply(this,arguments))/2+Xf;return[Math.cos(f)*a,Math.sin(f)*a]},a};var Xf=-Math.PI/2,Yf=2*Math.PI-1e-6;d3.svg.line=function(){return dc(e)};var Zf=d3.map({linear:gc,"linear-closed":hc,"step-before":ic,"step-after":jc,basis:pc,"basis-open":qc,"basis-closed":rc,bundle:sc,cardinal:mc,"cardinal-open":kc,"cardinal-closed":lc,monotone:yc});Zf.forEach(function(a,b){b.key=a,b.closed=/-closed$/.test(a)});var $f=[0,2/3,1/3,0],_f=[0,1/3,2/3,0],ag=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=dc(zc);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},ic.reverse=jc,jc.reverse=ic,d3.svg.area=function(){return Ac(e)},d3.svg.area.radial=function(){var a=Ac(zc);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},d3.svg.chord=function(){function a(a,h){var i=b(this,f,a,h),j=b(this,g,a,h);return"M"+i.p0+d(i.r,i.p1,i.a1-i.a0)+(c(i,j)?e(i.r,i.p1,i.r,i.p0):e(i.r,i.p1,j.r,j.p0)+d(j.r,j.p1,j.a1-j.a0)+e(j.r,j.p1,i.r,i.p0))+"Z"}function b(a,b,c,d){var e=b.call(a,c,d),f=i.call(a,e,d),g=j.call(a,e,d)+Xf,h=k.call(a,e,d)+Xf;return{r:f,a0:g,a1:h,p0:[f*Math.cos(g),f*Math.sin(g)],p1:[f*Math.cos(h),f*Math.sin(h)]}}function c(a,b){return a.a0==b.a0&&a.a1==b.a1}function d(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Math.PI)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=Bc,g=Cc,i=Dc,j=bc,k=cc;return a.radius=function(b){return arguments.length?(i=h(b),a):i},a.source=function(b){return arguments.length?(f=h(b),a):f},a.target=function(b){return arguments.length?(g=h(b),a):g},a.startAngle=function(b){return arguments.length?(j=h(b),a):j},a.endAngle=function(b){return arguments.length?(k=h(b),a):k},a},d3.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=Bc,c=Cc,d=Ec;return a.source=function(c){return arguments.length?(b=h(c),a):b},a.target=function(b){return arguments.length?(c=h(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d
+},a},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=Ec,c=a.projection;return a.projection=function(a){return arguments.length?c(Fc(b=a)):b},a},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function a(a,d){return(bg.get(b.call(this,a,d))||Ic)(c.call(this,a,d))}var b=Hc,c=Gc;return a.type=function(c){return arguments.length?(b=h(c),a):b},a.size=function(b){return arguments.length?(c=h(b),a):c},a};var bg=d3.map({circle:Ic,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*dg)),c=b*dg;return"M0,"+-b+"L"+c+",0 0,"+b+" "+-c+",0Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cg),c=b*cg/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});d3.svg.symbolTypes=bg.keys();var cg=Math.sqrt(3),dg=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function a(a){a.each(function(){var a,l=d3.select(this),m=null==j?c.ticks?c.ticks.apply(c,i):c.domain():j,n=null==b?c.tickFormat?c.tickFormat.apply(c,i):String:b,o=Lc(c,m,k),p=l.selectAll(".minor").data(o,String),q=p.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),r=d3.transition(p.exit()).style("opacity",1e-6).remove(),s=d3.transition(p).style("opacity",1),t=l.selectAll("g").data(m,String),u=t.enter().insert("g","path").style("opacity",1e-6),v=d3.transition(t.exit()).style("opacity",1e-6).remove(),w=d3.transition(t).style("opacity",1),x=Gb(c),y=l.selectAll(".domain").data([0]),z=(y.enter().append("path").attr("class","domain"),d3.transition(y)),A=c.copy(),B=this.__chart__||A;this.__chart__=A,u.append("line").attr("class","tick"),u.append("text");var C=u.select("line"),D=w.select("line"),E=t.select("text").text(n),F=u.select("text"),G=w.select("text");switch(d){case"bottom":a=Jc,q.attr("y2",f),s.attr("x2",0).attr("y2",f),C.attr("y2",e),F.attr("y",Math.max(e,0)+h),D.attr("x2",0).attr("y2",e),G.attr("x",0).attr("y",Math.max(e,0)+h),E.attr("dy",".71em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+g+"V0H"+x[1]+"V"+g);break;case"top":a=Jc,q.attr("y2",-f),s.attr("x2",0).attr("y2",-f),C.attr("y2",-e),F.attr("y",-(Math.max(e,0)+h)),D.attr("x2",0).attr("y2",-e),G.attr("x",0).attr("y",-(Math.max(e,0)+h)),E.attr("dy","0em").attr("text-anchor","middle"),z.attr("d","M"+x[0]+","+-g+"V0H"+x[1]+"V"+-g);break;case"left":a=Kc,q.attr("x2",-f),s.attr("x2",-f).attr("y2",0),C.attr("x2",-e),F.attr("x",-(Math.max(e,0)+h)),D.attr("x2",-e).attr("y2",0),G.attr("x",-(Math.max(e,0)+h)).attr("y",0),E.attr("dy",".32em").attr("text-anchor","end"),z.attr("d","M"+-g+","+x[0]+"H0V"+x[1]+"H"+-g);break;case"right":a=Kc,q.attr("x2",f),s.attr("x2",f).attr("y2",0),C.attr("x2",e),F.attr("x",Math.max(e,0)+h),D.attr("x2",e).attr("y2",0),G.attr("x",Math.max(e,0)+h).attr("y",0),E.attr("dy",".32em").attr("text-anchor","start"),z.attr("d","M"+g+","+x[0]+"H0V"+x[1]+"H"+g)}if(c.ticks)u.call(a,B),w.call(a,A),v.call(a,A),q.call(a,B),s.call(a,A),r.call(a,A);else{var H=A.rangeBand()/2,I=function(a){return A(a)+H};u.call(a,I),w.call(a,I)}})}var b,c=d3.scale.linear(),d="bottom",e=6,f=6,g=6,h=3,i=[10],j=null,k=0;return a.scale=function(b){return arguments.length?(c=b,a):c},a.orient=function(b){return arguments.length?(d=b,a):d},a.ticks=function(){return arguments.length?(i=arguments,a):i},a.tickValues=function(b){return arguments.length?(j=b,a):j},a.tickFormat=function(c){return arguments.length?(b=c,a):b},a.tickSize=function(b,c){if(!arguments.length)return e;var d=arguments.length-1;return e=+b,f=d>1?+c:e,g=d>0?+arguments[d]:e,a},a.tickPadding=function(b){return arguments.length?(h=+b,a):h},a.tickSubdivide=function(b){return arguments.length?(k=+b,a):k},a},d3.svg.brush=function(){function a(f){f.each(function(){var f,g=d3.select(this),k=g.selectAll(".background").data([0]),l=g.selectAll(".extent").data([0]),m=g.selectAll(".resize").data(j,String);g.style("pointer-events","all").on("mousedown.brush",e).on("touchstart.brush",e),k.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),m.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return eg[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),m.style("display",a.empty()?"none":null),m.exit().remove(),h&&(f=Gb(h),k.attr("x",f[0]).attr("width",f[1]-f[0]),c(g)),i&&(f=Gb(i),k.attr("y",f[0]).attr("height",f[1]-f[0]),d(g)),b(g)})}function b(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+k[+/e$/.test(a)][0]+","+k[+/^s/.test(a)][1]+")"})}function c(a){a.select(".extent").attr("x",k[0][0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",k[1][0]-k[0][0])}function d(a){a.select(".extent").attr("y",k[0][1]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",k[1][1]-k[0][1])}function e(){function e(){var a=d3.event.changedTouches;return a?d3.touches(r,a)[0]:d3.mouse(r)}function j(){32==d3.event.keyCode&&(y||(p=null,z[0]-=k[1][0],z[1]-=k[1][1],y=2),F())}function l(){32==d3.event.keyCode&&2==y&&(z[0]+=k[1][0],z[1]+=k[1][1],y=0,F())}function m(){var a=e(),f=!1;q&&(a[0]+=q[0],a[1]+=q[1]),y||(d3.event.altKey?(p||(p=[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2]),z[0]=k[+(a[0]<p[0])][0],z[1]=k[+(a[1]<p[1])][1]):p=null),w&&n(a,h,0)&&(c(u),f=!0),x&&n(a,i,1)&&(d(u),f=!0),f&&(b(u),t({type:"brush",mode:y?"move":"resize"}))}function n(a,b,c){var d,e,g=Gb(b),h=g[0],i=g[1],j=z[c],l=k[1][c]-k[0][c];return y&&(h-=j,i-=l+j),d=Math.max(h,Math.min(i,a[c])),y?e=(d+=j)+l:(p&&(j=Math.max(h,Math.min(i,2*p[c]-d))),d>j?(e=d,d=j):e=j),k[0][c]!==d||k[1][c]!==e?(f=null,k[0][c]=d,k[1][c]=e,!0):void 0}function o(){m(),u.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null),d3.select("body").style("cursor",null),A.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),t({type:"brushend"}),F()}var p,q,r=this,s=d3.select(d3.event.target),t=g.of(r,arguments),u=d3.select(r),v=s.datum(),w=!/^(n|s)$/.test(v)&&h,x=!/^(e|w)$/.test(v)&&i,y=s.classed("extent"),z=e(),A=d3.select(window).on("mousemove.brush",m).on("mouseup.brush",o).on("touchmove.brush",m).on("touchend.brush",o).on("keydown.brush",j).on("keyup.brush",l);if(y)z[0]=k[0][0]-z[0],z[1]=k[0][1]-z[1];else if(v){var B=+/w$/.test(v),C=+/^n/.test(v);q=[k[1-B][0]-z[0],k[1-C][1]-z[1]],z[0]=k[B][0],z[1]=k[C][1]}else d3.event.altKey&&(p=z.slice());u.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",s.style("cursor")),t({type:"brushstart"}),m(),F()}var f,g=H(a,"brushstart","brush","brushend"),h=null,i=null,j=fg[0],k=[[0,0],[0,0]];return a.x=function(b){return arguments.length?(h=b,j=fg[!h<<1|!i],a):h},a.y=function(b){return arguments.length?(i=b,j=fg[!h<<1|!i],a):i},a.extent=function(b){var c,d,e,g,j;return arguments.length?(f=[[0,0],[0,0]],h&&(c=b[0],d=b[1],i&&(c=c[0],d=d[0]),f[0][0]=c,f[1][0]=d,h.invert&&(c=h(c),d=h(d)),c>d&&(j=c,c=d,d=j),k[0][0]=0|c,k[1][0]=0|d),i&&(e=b[0],g=b[1],h&&(e=e[1],g=g[1]),f[0][1]=e,f[1][1]=g,i.invert&&(e=i(e),g=i(g)),e>g&&(j=e,e=g,g=j),k[0][1]=0|e,k[1][1]=0|g),a):(b=f||k,h&&(c=b[0][0],d=b[1][0],f||(c=k[0][0],d=k[1][0],h.invert&&(c=h.invert(c),d=h.invert(d)),c>d&&(j=c,c=d,d=j))),i&&(e=b[0][1],g=b[1][1],f||(e=k[0][1],g=k[1][1],i.invert&&(e=i.invert(e),g=i.invert(g)),e>g&&(j=e,e=g,g=j))),h&&i?[[c,e],[d,g]]:h?[c,d]:i&&[e,g])},a.clear=function(){return f=null,k[0][0]=k[0][1]=k[1][0]=k[1][1]=0,a},a.empty=function(){return h&&k[0][0]===k[1][0]||i&&k[0][1]===k[1][1]},d3.rebind(a,g,"on")};var eg={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fg=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function a(){this.on("mousedown.drag",b).on("touchstart.drag",b)}function b(){function a(){var a=h.parentNode;return k?d3.touches(a).filter(function(a){return a.identifier===k})[0]:d3.mouse(a)}function b(){if(!h.parentNode)return e();var b=a(),c=b[0]-l[0],d=b[1]-l[1];m|=c|d,l=b,F(),i({type:"drag",x:b[0]+g[0],y:b[1]+g[1],dx:c,dy:d})}function e(){i({type:"dragend"}),m&&(F(),d3.event.target===j&&n.on("click.drag",f,!0)),n.on(k?"touchmove.drag-"+k:"mousemove.drag",null).on(k?"touchend.drag-"+k:"mouseup.drag",null)}function f(){F(),n.on("click.drag",null)}var g,h=this,i=c.of(h,arguments),j=d3.event.target,k=d3.event.touches&&d3.event.changedTouches[0].identifier,l=a(),m=0,n=d3.select(window).on(k?"touchmove.drag-"+k:"mousemove.drag",b).on(k?"touchend.drag-"+k:"mouseup.drag",e,!0);d?(g=d.apply(h,arguments),g=[g.x-l[0],g.y-l[1]]):g=[0,0],k||F(),i({type:"dragstart"})}var c=H(a,"drag","dragstart","dragend"),d=null;return a.origin=function(b){return arguments.length?(d=b,a):d},d3.rebind(a,c,"on")},d3.behavior.zoom=function(){function a(){this.on("mousedown.zoom",g).on("mousewheel.zoom",h).on("mousemove.zoom",i).on("DOMMouseScroll.zoom",h).on("dblclick.zoom",j).on("touchstart.zoom",k).on("touchmove.zoom",l).on("touchend.zoom",k)}function b(a){return[(a[0]-t[0])/u,(a[1]-t[1])/u]}function c(a){return[a[0]*u+t[0],a[1]*u+t[1]]}function d(a){u=Math.max(v[0],Math.min(v[1],a))}function e(a,b){b=c(b),t[0]+=a[0]-b[0],t[1]+=a[1]-b[1]}function f(a){p&&p.domain(o.range().map(function(a){return(a-t[0])/u}).map(o.invert)),r&&r.domain(q.range().map(function(a){return(a-t[1])/u}).map(q.invert)),d3.event.preventDefault(),a({type:"zoom",scale:u,translate:t})}function g(){function a(){j=1,e(d3.mouse(g),l),f(h)}function c(){j&&F(),k.on("mousemove.zoom",null).on("mouseup.zoom",null),j&&d3.event.target===i&&k.on("click.zoom",d,!0)}function d(){F(),k.on("click.zoom",null)}var g=this,h=w.of(g,arguments),i=d3.event.target,j=0,k=d3.select(window).on("mousemove.zoom",a).on("mouseup.zoom",c),l=b(d3.mouse(g));window.focus(),F()}function h(){m||(m=b(d3.mouse(this))),d(Math.pow(2,.002*Mc())*u),e(d3.mouse(this),m),f(w.of(this,arguments))}function i(){m=null}function j(){var a=d3.mouse(this),c=b(a);d(d3.event.shiftKey?u/2:2*u),e(a,c),f(w.of(this,arguments))}function k(){var a=d3.touches(this),c=Date.now();if(n=u,m={},a.forEach(function(a){m[a.identifier]=b(a)}),F(),1===a.length){if(500>c-s){var g=a[0],h=b(a[0]);d(2*u),e(g,h),f(w.of(this,arguments))}s=c}}function l(){var a=d3.touches(this),b=a[0],c=m[b.identifier];if(g=a[1]){var g,h=m[g.identifier];b=[(b[0]+g[0])/2,(b[1]+g[1])/2],c=[(c[0]+h[0])/2,(c[1]+h[1])/2],d(d3.event.scale*n)}e(b,c),s=null,f(w.of(this,arguments))}var m,n,o,p,q,r,s,t=[0,0],u=1,v=hg,w=H(a,"zoom");return a.translate=function(b){return arguments.length?(t=b.map(Number),a):t},a.scale=function(b){return arguments.length?(u=+b,a):u},a.scaleExtent=function(b){return arguments.length?(v=null==b?hg:b.map(Number),a):v},a.x=function(b){return arguments.length?(p=b,o=b.copy(),a):p},a.y=function(b){return arguments.length?(r=b,q=b.copy(),a):r},d3.rebind(a,w,"on")};var gg,hg=[0,1/0];d3.layout={},d3.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c<d;)b.push(Nc(a[c]));return b}},d3.layout.chord=function(){function a(){var a,j,l,m,n,o={},p=[],q=d3.range(f),r=[];for(c=[],d=[],a=0,m=-1;++m<f;){for(j=0,n=-1;++n<f;)j+=e[m][n];p.push(j),r.push(d3.range(f)),a+=j}for(g&&q.sort(function(a,b){return g(p[a],p[b])}),h&&r.forEach(function(a,b){a.sort(function(a,c){return h(e[b][a],e[b][c])})}),a=(2*Math.PI-k*f)/a,j=0,m=-1;++m<f;){for(l=j,n=-1;++n<f;){var s=q[m],t=r[s][n],u=e[s][t],v=j,w=j+=u*a;o[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}d[s]={index:s,startAngle:l,endAngle:j,value:(j-l)/a},j+=k}for(m=-1;++m<f;)for(n=m-1;++n<f;){var x=o[m+"-"+n],y=o[n+"-"+m];(x.value||y.value)&&c.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}i&&b()}function b(){c.sort(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var c,d,e,f,g,h,i,j={},k=0;return j.matrix=function(a){return arguments.length?(f=(e=a)&&e.length,c=d=null,j):e},j.padding=function(a){return arguments.length?(k=a,c=d=null,j):k},j.sortGroups=function(a){return arguments.length?(g=a,c=d=null,j):g},j.sortSubgroups=function(a){return arguments.length?(h=a,c=null,j):h},j.sortChords=function(a){return arguments.length?(i=a,c&&b(),j):i},j.chords=function(){return c||a(),c},j.groups=function(){return d||a(),d},j},d3.layout.force=function(){function a(a){return function(b,c,d,e){if(b.point!==a){var f=b.cx-a.x,g=b.cy-a.y,h=1/Math.sqrt(f*f+g*g);if(r>(e-c)*h){var i=b.charge*h*h;return a.px-=f*i,a.py-=g*i,!0}if(b.point&&isFinite(h)){var i=b.pointCharge*h*h;a.px-=f*i,a.py-=g*i}}return!b.charge}}function b(a){a.px=d3.event.x,a.py=d3.event.y,j.resume()}var c,d,f,g,i,j={},k=d3.dispatch("start","tick","end"),l=[1,1],m=.9,n=Vc,o=Wc,p=-30,q=.1,r=.8,s=[],t=[];return j.tick=function(){if((d*=.99)<.005)return k.end({type:"end",alpha:d=0}),!0;var b,c,e,h,j,n,o,r,u,v=s.length,w=t.length;for(c=0;w>c;++c)e=t[c],h=e.source,j=e.target,r=j.x-h.x,u=j.y-h.y,(n=r*r+u*u)&&(n=d*g[c]*((n=Math.sqrt(n))-f[c])/n,r*=n,u*=n,j.x-=r*(o=h.weight/(j.weight+h.weight)),j.y-=u*o,h.x+=r*(o=1-o),h.y+=u*o);if((o=d*q)&&(r=l[0]/2,u=l[1]/2,c=-1,o))for(;++c<v;)e=s[c],e.x+=(r-e.x)*o,e.y+=(u-e.y)*o;if(p)for(Uc(b=d3.geom.quadtree(s),d,i),c=-1;++c<v;)(e=s[c]).fixed||b.visit(a(e));for(c=-1;++c<v;)e=s[c],e.fixed?(e.x=e.px,e.y=e.py):(e.x-=(e.px-(e.px=e.x))*m,e.y-=(e.py-(e.py=e.y))*m);k.tick({type:"tick",alpha:d})},j.nodes=function(a){return arguments.length?(s=a,j):s},j.links=function(a){return arguments.length?(t=a,j):t},j.size=function(a){return arguments.length?(l=a,j):l},j.linkDistance=function(a){return arguments.length?(n=h(a),j):n},j.distance=j.linkDistance,j.linkStrength=function(a){return arguments.length?(o=h(a),j):o},j.friction=function(a){return arguments.length?(m=a,j):m},j.charge=function(a){return arguments.length?(p="function"==typeof a?a:+a,j):p},j.gravity=function(a){return arguments.length?(q=a,j):q},j.theta=function(a){return arguments.length?(r=a,j):r},j.alpha=function(a){return arguments.length?(d?d=a>0?a:0:a>0&&(k.start({type:"start",alpha:d=a}),d3.timer(j.tick)),j):d},j.start=function(){function a(a,d){for(var e,f=b(c),g=-1,h=f.length;++g<h;)if(!isNaN(e=f[g][a]))return e;return Math.random()*d}function b(){if(!e){for(e=[],d=0;k>d;++d)e[d]=[];for(d=0;m>d;++d){var a=t[d];e[a.source.index].push(a.target),e[a.target.index].push(a.source)}}return e[c]}var c,d,e,h,k=s.length,m=t.length,q=l[0],r=l[1];for(c=0;k>c;++c)(h=s[c]).index=c,h.weight=0;for(f=[],g=[],c=0;m>c;++c)h=t[c],"number"==typeof h.source&&(h.source=s[h.source]),"number"==typeof h.target&&(h.target=s[h.target]),f[c]=n.call(this,h,c),g[c]=o.call(this,h,c),++h.source.weight,++h.target.weight;for(c=0;k>c;++c)h=s[c],isNaN(h.x)&&(h.x=a("x",q)),isNaN(h.y)&&(h.y=a("y",r)),isNaN(h.px)&&(h.px=h.x),isNaN(h.py)&&(h.py=h.y);if(i=[],"function"==typeof p)for(c=0;k>c;++c)i[c]=+p.call(this,s[c],c);else for(c=0;k>c;++c)i[c]=p;return j.resume()},j.resume=function(){return j.alpha(.1)},j.stop=function(){return j.alpha(0)},j.drag=function(){c||(c=d3.behavior.drag().origin(e).on("dragstart",Qc).on("drag",b).on("dragend",Rc)),this.on("mouseover.force",Sc).on("mouseout.force",Tc).call(c)},d3.rebind(j,k,"on")},d3.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++j<g;)a(h=f[j],c,i=h.value*d,e),c+=i}}function b(a){var c=a.children,d=0;if(c&&(e=c.length))for(var e,f=-1;++f<e;)d=Math.max(d,b(c[f]));return 1+d}function c(c,f){var g=d.call(this,c,f);return a(g[0],0,e[0],e[1]/b(g[0])),g}var d=d3.layout.hierarchy(),e=[1,1];return c.size=function(a){return arguments.length?(e=a,c):e},gd(c,d)},d3.layout.pie=function(){function a(f){var g=f.map(function(c,d){return+b.call(a,c,d)}),h=+("function"==typeof d?d.apply(this,arguments):d),i=(("function"==typeof e?e.apply(this,arguments):e)-d)/d3.sum(g),j=d3.range(f.length);null!=c&&j.sort(c===ig?function(a,b){return g[b]-g[a]}:function(a,b){return c(f[a],f[b])});var k=[];return j.forEach(function(a){var b;k[a]={data:f[a],value:b=g[a],startAngle:h,endAngle:h+=b*i}}),k}var b=Number,c=ig,d=0,e=2*Math.PI;return a.value=function(c){return arguments.length?(b=c,a):b},a.sort=function(b){return arguments.length?(c=b,a):c},a.startAngle=function(b){return arguments.length?(d=b,a):d},a.endAngle=function(b){return arguments.length?(e=b,a):e},a};var ig={};d3.layout.stack=function(){function a(e,i){var j=e.map(function(c,d){return b.call(a,c,d)}),k=j.map(function(b){return b.map(function(b,c){return[g.call(a,b,c),h.call(a,b,c)]})}),l=c.call(a,k,i);j=d3.permute(j,l),k=d3.permute(k,l);var m,n,o,p=d.call(a,k,i),q=j.length,r=j[0].length;for(n=0;r>n;++n)for(f.call(a,j[0][n],o=p[n],k[0][n][1]),m=1;q>m;++m)f.call(a,j[m][n],o+=k[m-1][n][1],k[m][n][1]);return e}var b=e,c=$c,d=_c,f=Zc,g=Xc,h=Yc;return a.values=function(c){return arguments.length?(b=c,a):b},a.order=function(b){return arguments.length?(c="function"==typeof b?b:jg.get(b)||$c,a):c},a.offset=function(b){return arguments.length?(d="function"==typeof b?b:kg.get(b)||_c,a):d},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=b,a):h},a.out=function(b){return arguments.length?(f=b,a):f},a};var jg=d3.map({"inside-out":function(a){var b,c,d=a.length,e=a.map(ad),f=a.map(bd),g=d3.range(d).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(b=0;d>b;++b)c=g[b],i>h?(h+=f[c],j.push(c)):(i+=f[c],k.push(c));return k.reverse().concat(j)},reverse:function(a){return d3.range(a.length).reverse()},"default":$c}),kg=d3.map({silhouette:function(a){var b,c,d,e=a.length,f=a[0].length,g=[],h=0,i=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];d>h&&(h=d),g.push(d)}for(c=0;f>c;++c)i[c]=(h-g[c])/2;return i},wiggle:function(a){var b,c,d,e,f,g,h,i,j,k=a.length,l=a[0],m=l.length,n=[];for(n[0]=i=j=0,c=1;m>c;++c){for(b=0,e=0;k>b;++b)e+=a[b][c][1];for(b=0,f=0,h=l[c][0]-l[c-1][0];k>b;++b){for(d=0,g=(a[b][c][1]-a[b][c-1][1])/(2*h);b>d;++d)g+=(a[d][c][1]-a[d][c-1][1])/h;f+=g*a[b][c][1]}n[c]=i-=e?f/e*h:0,j>i&&(j=i)}for(c=0;m>c;++c)n[c]-=j;return n},expand:function(a){var b,c,d,e=a.length,f=a[0].length,g=1/e,h=[];for(c=0;f>c;++c){for(b=0,d=0;e>b;b++)d+=a[b][c][1];if(d)for(b=0;e>b;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=g}for(c=0;f>c;++c)h[c]=0;return h},zero:_c});d3.layout.histogram=function(){function a(a,f){for(var g,h,i=[],j=a.map(c,this),k=d.call(this,j,f),l=e.call(this,k,j,f),f=-1,m=j.length,n=l.length-1,o=b?1:1/m;++f<n;)g=i[f]=[],g.dx=l[f+1]-(g.x=l[f]),g.y=0;if(n>0)for(f=-1;++f<m;)h=j[f],h>=k[0]&&h<=k[1]&&(g=i[d3.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=fd,e=dd;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=h(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return ed(a,b)}:h(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},d3.layout.hierarchy=function(){function a(b,g,h){var i=e.call(c,b,g),j=lg?b:{data:b};if(j.depth=g,h.push(j),i&&(k=i.length)){for(var k,l,m=-1,n=j.children=[],o=0,p=g+1;++m<k;)l=a(i[m],p,h),l.parent=j,n.push(l),o+=l.value;d&&n.sort(d),f&&(j.value=o)}else f&&(j.value=+f.call(c,b,g)||0);return j}function b(a,d){var e=a.children,g=0;if(e&&(h=e.length))for(var h,i=-1,j=d+1;++i<h;)g+=b(e[i],j);else f&&(g=+f.call(c,lg?a:a.data,d)||0);return f&&(a.value=g),g}function c(b){var c=[];return a(b,0,c),c}var d=jd,e=hd,f=id;return c.sort=function(a){return arguments.length?(d=a,c):d},c.children=function(a){return arguments.length?(e=a,c):e},c.value=function(a){return arguments.length?(f=a,c):f},c.revalue=function(a){return b(a,0),a},c};var lg=!1;d3.layout.pack=function(){function a(a,e){var f=b.call(this,a,e),g=f[0];g.x=0,g.y=0,Fd(g,function(a){a.r=Math.sqrt(a.value)}),Fd(g,pd);var h=d[0],i=d[1],j=Math.max(2*g.r/h,2*g.r/i);if(c>0){var k=c*j/2;Fd(g,function(a){a.r+=k}),Fd(g,pd),Fd(g,function(a){a.r-=k}),j=Math.max(2*g.r/h,2*g.r/i)}return sd(g,h/2,i/2,1/j),f}var b=d3.layout.hierarchy().sort(ld),c=0,d=[1,1];return a.size=function(b){return arguments.length?(d=b,a):d},a.padding=function(b){return arguments.length?(c=+b,a):c},gd(a,b)},d3.layout.cluster=function(){function a(a,e){var f,g=b.call(this,a,e),h=g[0],i=0;Fd(h,function(a){var b=a.children;b&&b.length?(a.x=vd(b),a.y=ud(b)):(a.x=f?i+=c(a,f):0,a.y=0,f=a)});var j=wd(h),k=xd(h),l=j.x-c(j,k)/2,m=k.x+c(k,j)/2;return Fd(h,function(a){a.x=(a.x-l)/(m-l)*d[0],a.y=(1-(h.y?a.y/h.y:1))*d[1]}),g}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.tree=function(){function a(a,e){function f(a,b){var d=a.children,e=a._tree;if(d&&(g=d.length)){for(var g,i,j,k=d[0],l=k,m=-1;++m<g;)j=d[m],f(j,i),l=h(j,i,l),i=j;Gd(a);var n=.5*(k._tree.prelim+j._tree.prelim);b?(e.prelim=b._tree.prelim+c(a,b),e.mod=e.prelim-n):e.prelim=n}else b&&(e.prelim=b._tree.prelim+c(a,b))}function g(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c&&(d=c.length)){var d,e=-1;for(b+=a._tree.mod;++e<d;)g(c[e],b)}}function h(a,b,d){if(b){for(var e,f=a,g=a,h=b,i=a.parent.children[0],j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m=i._tree.mod;h=Ad(h),f=zd(f),h&&f;)i=zd(i),g=Ad(g),g._tree.ancestor=a,e=h._tree.prelim+l-f._tree.prelim-j+c(h,f),e>0&&(Hd(Id(h,a,d),a,e),j+=e,k+=e),l+=h._tree.mod,j+=f._tree.mod,m+=i._tree.mod,k+=g._tree.mod;h&&!Ad(g)&&(g._tree.thread=h,g._tree.mod+=l-k),f&&!zd(i)&&(i._tree.thread=f,i._tree.mod+=j-m,d=a)}return d}var i=b.call(this,a,e),j=i[0];Fd(j,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),f(j),g(j,-j._tree.prelim);var k=Bd(j,Dd),l=Bd(j,Cd),m=Bd(j,Ed),n=k.x-c(k,l)/2,o=l.x+c(l,k)/2,p=m.depth||1;return Fd(j,function(a){a.x=(a.x-n)/(o-n)*d[0],a.y=a.depth/p*d[1],delete a._tree}),i}var b=d3.layout.hierarchy().sort(null).value(null),c=yd,d=[1,1];return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(d=b,a):d},gd(a,b)},d3.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e<f;)d=(c=a[e]).value*(0>b?0:b),c.area=isNaN(d)||0>=d?0:d}function b(c){var f=c.children;if(f&&f.length){var g,h,i,j=l(c),k=[],m=f.slice(),n=1/0,o=Math.min(j.dx,j.dy);for(a(m,j.dx*j.dy/c.value),k.area=0;(i=m.length)>0;)k.push(g=m[i-1]),k.area+=g.area,(h=d(k,o))<=n?(m.pop(),n=h):(k.area-=k.pop().area,e(k,o,j,!1),o=Math.min(j.dx,j.dy),k.length=k.area=0,n=1/0);k.length&&(e(k,o,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++g<h;)(c=a[g].area)&&(f>c&&(f=c),c>e&&(e=c));return d*=d,b*=b,d?Math.max(b*e*n/d,d/(b*f*n)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++f<g;)e=a[f],e.x=h,e.y=j,e.dy=k,h+=e.dx=Math.min(c.x+c.dx-h,k?i(e.area/k):0);e.z=!0,e.dx+=c.x+c.dx-h,c.y+=k,c.dy-=k}else{for((d||k>c.dx)&&(k=c.dx);++f<g;)e=a[f],e.x=h,e.y=j,e.dx=k,j+=e.dy=Math.min(c.y+c.dy-j,k?i(e.area/k):0);e.z=!1,e.dy+=c.y+c.dy-j,c.x+=k,c.dx-=k}}function f(d){var e=g||h(d),f=e[0];return f.x=0,f.y=0,f.dx=j[0],f.dy=j[1],g&&h.revalue(f),a([f],f.dx*f.dy/f.value),(g?c:b)(f),m&&(g=e),e}var g,h=d3.layout.hierarchy(),i=Math.round,j=[1,1],k=null,l=Jd,m=!1,n=.5*(1+Math.sqrt(5));return f.size=function(a){return arguments.length?(j=a,f):j},f.padding=function(a){function b(b){var c=a.call(f,b,b.depth);return null==c?Jd(b):Kd(b,"number"==typeof c?[c,c,c,c]:c)}function c(b){return Kd(b,a)}if(!arguments.length)return k;var d;return l=null==(k=a)?Jd:"function"==(d=typeof a)?b:"number"===d?(a=[a,a,a,a],c):c,f},f.round=function(a){return arguments.length?(i=a?Math.round:Number,f):i!=Number},f.sticky=function(a){return arguments.length?(m=a,g=null,f):m},f.ratio=function(a){return arguments.length?(n=a,f):n},gd(f,h)},d3.csv=Ld(",","text/csv"),d3.tsv=Ld("	","text/tab-separated-values"),d3.geo={};var mg=Math.PI/180;d3.geo.azimuthal=function(){function a(a){var b,d=a[0]*mg-c,j=a[1]*mg,k=Math.cos(d),l=Math.sin(d),m=Math.cos(j),n=Math.sin(j),o="orthographic"!==g?f*n+e*m*k:null,p="stereographic"===g?1/(1+o):"gnomonic"===g?1/o:"equidistant"===g?(b=Math.acos(o),b?b/Math.sin(b):0):"equalarea"===g?Math.sqrt(2/(1+o)):1,q=p*m*l,r=p*(f*m*k-e*n);return[h*q+i[0],h*r+i[1]]}var b,c,d,e,f,g="orthographic",h=200,i=[480,250];return a.invert=function(a){var b=(a[0]-i[0])/h,d=(a[1]-i[1])/h,j=Math.sqrt(b*b+d*d),k="stereographic"===g?2*Math.atan(j):"gnomonic"===g?Math.atan(j):"equidistant"===g?j:"equalarea"===g?2*Math.asin(.5*j):Math.asin(j),l=Math.sin(k),m=Math.cos(k);return[(c+Math.atan2(b*l,j*e*m+d*f*l))/mg,Math.asin(m*f-(j?d*l*e/j:0))/mg]},a.mode=function(b){return arguments.length?(g=b+"",a):g},a.origin=function(g){return arguments.length?(b=g,c=b[0]*mg,d=b[1]*mg,e=Math.cos(d),f=Math.sin(d),a):b},a.scale=function(b){return arguments.length?(h=+b,a):h},a.translate=function(b){return arguments.length?(i=[+b[0],+b[1]],a):i},a.origin([0,0])},d3.geo.albers=function(){function a(a){var b=d*(mg*a[0]-c),g=Math.sqrt(e-2*d*Math.sin(mg*a[1]))/d;return[i*g*Math.sin(b)+j[0],i*(g*Math.cos(b)-f)+j[1]]}function b(){var b=mg*h[0],i=mg*h[1],j=mg*g[1],k=Math.sin(b),l=Math.cos(b);return c=mg*g[0],d=.5*(k+Math.sin(i)),e=l*l+2*d*k,f=Math.sqrt(e-2*d*Math.sin(j))/d,a}var c,d,e,f,g=[-98,38],h=[29.5,45.5],i=1e3,j=[480,250];return a.invert=function(a){var b=(a[0]-j[0])/i,g=(a[1]-j[1])/i,h=f+g,k=Math.atan2(b,h),l=Math.sqrt(b*b+h*h);return[(c+k/d)/mg,Math.asin((e-l*l*d*d)/(2*d))/mg]},a.origin=function(a){return arguments.length?(g=[+a[0],+a[1]],b()):g},a.parallels=function(a){return arguments.length?(h=[+a[0],+a[1]],b()):h},a.scale=function(b){return arguments.length?(i=+b,a):i},a.translate=function(b){return arguments.length?(j=[+b[0],+b[1]],a):j},b()},d3.geo.albersUsa=function(){function a(a){var f=a[0],g=a[1];return(g>50?c:-140>f?d:21>g?e:b)(a)}var b=d3.geo.albers(),c=d3.geo.albers().origin([-160,60]).parallels([55,65]),d=d3.geo.albers().origin([-160,20]).parallels([8,18]),e=d3.geo.albers().origin([-60,10]).parallels([8,18]);return a.scale=function(f){return arguments.length?(b.scale(f),c.scale(.6*f),d.scale(f),e.scale(1.5*f),a.translate(b.translate())):b.scale()},a.translate=function(f){if(!arguments.length)return b.translate();var g=b.scale()/1e3,h=f[0],i=f[1];return b.translate(f),c.translate([h-400*g,i+170*g]),d.translate([h-190*g,i+200*g]),e.translate([h+580*g,i+430*g]),a},a.scale(b.scale())},d3.geo.bonne=function(){function a(a){var h=a[0]*mg-b,i=a[1]*mg-c;if(d){var j=e+d-i,k=h*Math.cos(i)/j;h=j*Math.sin(k),i=j*Math.cos(k)-e}else h*=Math.cos(i),i*=-1;return[f*h+g[0],f*i+g[1]]}var b,c,d,e,f=200,g=[480,250];return a.invert=function(a){var c=(a[0]-g[0])/f,h=(a[1]-g[1])/f;if(d){var i=e+h,j=Math.sqrt(c*c+i*i);h=e+d-j,c=b+j*Math.atan2(c,i)/Math.cos(h)}else h*=-1,c/=Math.cos(h);return[c/mg,h/mg]},a.parallel=function(b){return arguments.length?(e=1/Math.tan(d=b*mg),a):d/mg},a.origin=function(d){return arguments.length?(b=d[0]*mg,c=d[1]*mg,a):[b/mg,c/mg]},a.scale=function(b){return arguments.length?(f=+b,a):f},a.translate=function(b){return arguments.length?(g=[+b[0],+b[1]],a):g},a.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function a(a){var d=a[0]/360,e=-a[1]/360;return[b*d+c[0],b*e+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,-360*e]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.mercator=function(){function a(a){var d=a[0]/360,e=-(Math.log(Math.tan(Math.PI/4+a[1]*mg/2))/mg)/360;return[b*d+c[0],b*Math.max(-.5,Math.min(.5,e))+c[1]]}var b=500,c=[480,250];return a.invert=function(a){var d=(a[0]-c[0])/b,e=(a[1]-c[1])/b;return[360*d,2*Math.atan(Math.exp(-360*e*mg))/mg-90]},a.scale=function(c){return arguments.length?(b=+c,a):b},a.translate=function(b){return arguments.length?(c=[+b[0],+b[1]],a):c},a},d3.geo.path=function(){function a(a){"function"==typeof f&&(g=Nd(f.apply(this,arguments))),j(a);var b=i.length?i.join(""):null;return i=[],b}function b(a){return h(a).join(",")}function c(a){for(var b=e(a[0]),c=0,d=a.length;++c<d;)b-=e(a[c]);return b}function d(a){for(var b=d3.geom.polygon(a[0].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e=d[0],f=d[1],g=c,i=0,j=a.length;++i<j;)b=d3.geom.polygon(a[i].map(h)),c=b.area(),d=b.centroid(0>c?(c*=-1,1):-1),e-=d[0],f-=d[1],g-=c;return[e,f,6*g]}function e(a){return Math.abs(d3.geom.polygon(a.map(h)).area())}var f=4.5,g=Nd(f),h=d3.geo.albersUsa(),i=[],j=Md({FeatureCollection:function(a){for(var b=a.features,c=-1,d=b.length;++c<d;)i.push(j(b[c].geometry))},Feature:function(a){j(a.geometry)},Point:function(a){i.push("M",b(a.coordinates),g)},MultiPoint:function(a){for(var c=a.coordinates,d=-1,e=c.length;++d<e;)i.push("M",b(c[d]),g)},LineString:function(a){var c=a.coordinates,d=-1,e=c.length;for(i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()},MultiLineString:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;){for(c=f[g],d=-1,e=c.length,i.push("M");++d<e;)i.push(b(c[d]),"L");i.pop()}},Polygon:function(a){for(var c,d,e,f=a.coordinates,g=-1,h=f.length;++g<h;)if(c=f[g],d=-1,(e=c.length-1)>0){for(i.push("M");++d<e;)i.push(b(c[d]),"L");i[i.length-1]="Z"}},MultiPolygon:function(a){for(var c,d,e,f,g,h,j=a.coordinates,k=-1,l=j.length;++k<l;)for(c=j[k],d=-1,e=c.length;++d<e;)if(f=c[d],g=-1,(h=f.length-1)>0){for(i.push("M");++g<h;)i.push(b(f[g]),"L");i[i.length-1]="Z"}},GeometryCollection:function(a){for(var b=a.geometries,c=-1,d=b.length;++c<d;)i.push(j(b[c]))}}),k=a.area=Md({FeatureCollection:function(a){for(var b=0,c=a.features,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b},Feature:function(a){return k(a.geometry)},Polygon:function(a){return c(a.coordinates)},MultiPolygon:function(a){for(var b=0,d=a.coordinates,e=-1,f=d.length;++e<f;)b+=c(d[e]);return b},GeometryCollection:function(a){for(var b=0,c=a.geometries,d=-1,e=c.length;++d<e;)b+=k(c[d]);return b}},0),l=a.centroid=Md({Feature:function(a){return l(a.geometry)},Polygon:function(a){var b=d(a.coordinates);return[b[0]/b[2],b[1]/b[2]]},MultiPolygon:function(a){for(var b,c=a.coordinates,e=0,f=0,g=0,h=-1,i=c.length;++h<i;)b=d(c[h]),e+=b[0],f+=b[1],g+=b[2];return[e/g,f/g]}});return a.projection=function(b){return h=b,a},a.pointRadius=function(b){return"function"==typeof b?f=b:(f=+b,g=Nd(f)),a},a},d3.geo.bounds=function(a){var b=1/0,c=1/0,d=-1/0,e=-1/0;return Od(a,function(a,f){b>a&&(b=a),a>d&&(d=a),c>f&&(c=f),f>e&&(e=f)}),[[b,c],[d,e]]};var ng={Feature:Pd,FeatureCollection:Qd,GeometryCollection:Rd,LineString:Sd,MultiLineString:Td,MultiPoint:Sd,MultiPolygon:Ud,Point:Vd,Polygon:Wd};d3.geo.circle=function(){function a(){}function b(a){return i.distance(a)<h}function c(a){for(var b,c,e,f,g,j=-1,k=a.length,l=[];++j<k;)g=i.distance(e=a[j]),h>g?(c&&l.push($d(c,e)((f-h)/(f-g))),l.push(e),b=c=null):(c=e,!b&&l.length&&(l.push($d(l[l.length-1],c)((h-f)/(g-f))),b=c)),f=g;return b=a[0],c=l[0],!c||e[0]!==b[0]||e[1]!==b[1]||e[0]===c[0]&&e[1]===c[1]||l.push(c),d(l)}function d(a){for(var b,c,d,e=0,f=a.length,g=f?[a[0]]:a,h=i.source();++e<f;)for(d=i.source(a[e-1])(a[e]).coordinates,b=0,c=d.length;++b<c;)g.push(d[b]);return i.source(h),g}var f=[0,0],g=89.99,h=g*mg,i=d3.geo.greatArc().source(f).target(e);a.clip=function(a){return"function"==typeof f&&i.source(f.apply(this,arguments)),j(a)||null};var j=Md({FeatureCollection:function(a){var b=a.features.map(j).filter(e);
+return b&&(a=Object.create(a),a.features=b,a)},Feature:function(a){var b=j(a.geometry);return b&&(a=Object.create(a),a.geometry=b,a)},Point:function(a){return b(a.coordinates)&&a},MultiPoint:function(a){var c=a.coordinates.filter(b);return c.length&&{type:a.type,coordinates:c}},LineString:function(a){var b=c(a.coordinates);return b.length&&(a=Object.create(a),a.coordinates=b,a)},MultiLineString:function(a){var b=a.coordinates.map(c).filter(function(a){return a.length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},Polygon:function(a){var b=a.coordinates.map(c);return b[0].length&&(a=Object.create(a),a.coordinates=b,a)},MultiPolygon:function(a){var b=a.coordinates.map(function(a){return a.map(c)}).filter(function(a){return a[0].length});return b.length&&(a=Object.create(a),a.coordinates=b,a)},GeometryCollection:function(a){var b=a.geometries.map(j).filter(e);return b.length&&(a=Object.create(a),a.geometries=b,a)}});return a.origin=function(b){return arguments.length?(f=b,"function"!=typeof f&&i.source(f),a):f},a.angle=function(b){return arguments.length?(h=(g=+b)*mg,a):g},d3.rebind(a,i,"precision")},d3.geo.greatArc=function(){function a(){for(var d=a.distance.apply(this,arguments),e=0,h=f/d,i=[b];(e+=h)<1;)i.push(g(e));return i.push(c),{type:"LineString",coordinates:i}}var b,c,d=Xd,e=Yd,f=6*mg,g=Zd();return a.distance=function(){return"function"==typeof d&&g.source(b=d.apply(this,arguments)),"function"==typeof e&&g.target(c=e.apply(this,arguments)),g.distance()},a.source=function(c){return arguments.length?(d=c,"function"!=typeof d&&g.source(b=d),a):d},a.target=function(b){return arguments.length?(e=b,"function"!=typeof e&&g.target(c=e),a):e},a.precision=function(b){return arguments.length?(f=b*mg,a):f/mg},a},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(a,b){var c=b||_d(a),d=[],e=c[0],f=c[1],g=0,h=0,i=0/0,j=0/0,k=0;do k=0,a(e-1,f-1)&&(k+=1),a(e,f-1)&&(k+=2),a(e-1,f)&&(k+=4),a(e,f)&&(k+=8),6===k?(g=-1===j?-1:1,h=0):9===k?(g=0,h=1===i?-1:1):(g=og[k],h=pg[k]),g!=i&&h!=j&&(d.push([e,f]),i=g,j=h),e+=g,f+=h;while(c[0]!=e||c[1]!=f);return d};var og=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,0/0],pg=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,0/0];d3.geom.hull=function(a){if(a.length<3)return[];var b,c,d,e,f,g,h,i,j,k,l=a.length,m=l-1,n=[],o=[],p=0;for(b=1;l>b;++b)a[b][1]<a[p][1]?p=b:a[b][1]==a[p][1]&&(p=a[b][0]<a[p][0]?b:p);for(b=0;l>b;++b)b!==p&&(e=a[b][1]-a[p][1],d=a[b][0]-a[p][0],n.push({angle:Math.atan2(e,d),index:b}));for(n.sort(function(a,b){return a.angle-b.angle}),j=n[0].angle,i=n[0].index,h=0,b=1;m>b;++b)c=n[b].index,j==n[b].angle?(d=a[i][0]-a[p][0],e=a[i][1]-a[p][1],f=a[c][0]-a[p][0],g=a[c][1]-a[p][1],d*d+e*e>=f*f+g*g?n[b].index=-1:(n[h].index=-1,j=n[b].angle,h=b,i=c)):(j=n[b].angle,h=b,i=c);for(o.push(p),b=0,c=0;2>b;++c)-1!==n[c].index&&(o.push(n[c].index),b++);for(k=o.length;m>c;++c)if(-1!==n[c].index){for(;!ae(o[k-2],o[k-1],n[c].index,a);)--k;o[k++]=n[c].index}var q=[];for(b=0;k>b;++b)q.push(a[o[b]]);return q},d3.geom.polygon=function(a){return a.area=function(){for(var b=0,c=a.length,d=a[c-1][0]*a[0][1],e=a[c-1][1]*a[0][0];++b<c;)d+=a[b-1][0]*a[b][1],e+=a[b-1][1]*a[b][0];return.5*(e-d)},a.centroid=function(b){var c,d,e=-1,f=a.length,g=0,h=0,i=a[f-1];for(arguments.length||(b=-1/(6*a.area()));++e<f;)c=i,i=a[e],d=c[0]*i[1]-i[0]*c[1],g+=(c[0]+i[0])*d,h+=(c[1]+i[1])*d;return[g*b,h*b]},a.clip=function(b){for(var c,d,e,f,g,h,i=-1,j=a.length,k=a[j-1];++i<j;){for(c=b.slice(),b.length=0,f=a[i],g=c[(e=c.length)-1],d=-1;++d<e;)h=c[d],be(h,k,f)?(be(g,k,f)||b.push(ce(g,h,k,f)),b.push(h)):be(g,k,f)&&b.push(ce(g,h,k,f)),g=h;k=f}return b},a},d3.geom.voronoi=function(a){var b=a.map(function(){return[]});return de(a,function(a){var c,d,e,f,g,h;1===a.a&&a.b>=0?(c=a.ep.r,d=a.ep.l):(c=a.ep.l,d=a.ep.r),1===a.a?(g=c?c.y:-1e6,e=a.c-a.b*g,h=d?d.y:1e6,f=a.c-a.b*h):(e=c?c.x:-1e6,g=a.c-a.a*e,f=d?d.x:1e6,h=a.c-a.a*f);var i=[e,g],j=[f,h];b[a.region.l.index].push(i,j),b[a.region.r.index].push(i,j)}),b.map(function(b,c){var d=a[c][0],e=a[c][1];return b.forEach(function(a){a.angle=Math.atan2(a[0]-d,a[1]-e)}),b.sort(function(a,b){return a.angle-b.angle}).filter(function(a,c){return!c||a.angle-b[c-1].angle>1e-10})})};var qg={l:"r",r:"l"};d3.geom.delaunay=function(a){var b=a.map(function(){return[]}),c=[];return de(a,function(c){b[c.region.l.index].push(a[c.region.r.index])}),b.forEach(function(b,d){var e=a[d],f=e[0],g=e[1];b.forEach(function(a){a.angle=Math.atan2(a[0]-f,a[1]-g)}),b.sort(function(a,b){return a.angle-b.angle});for(var h=0,i=b.length-1;i>h;h++)c.push([e,b[h],b[h+1]])}),c},d3.geom.quadtree=function(a,b,c,d,e){function f(a,b,c,d,e,f){if(!isNaN(b.x)&&!isNaN(b.y))if(a.leaf){var h=a.point;h?Math.abs(h.x-b.x)+Math.abs(h.y-b.y)<.01?g(a,b,c,d,e,f):(a.point=null,g(a,h,c,d,e,f),g(a,b,c,d,e,f)):a.point=b}else g(a,b,c,d,e,f)}function g(a,b,c,d,e,g){var h=.5*(c+e),i=.5*(d+g),j=b.x>=h,k=b.y>=i,l=(k<<1)+j;a.leaf=!1,a=a.nodes[l]||(a.nodes[l]=ee()),j?c=h:e=h,k?d=i:g=i,f(a,b,c,d,e,g)}var h,i=-1,j=a.length;if(j&&isNaN(a[0].x)&&(a=a.map(ge)),arguments.length<5)if(3===arguments.length)e=d=c,c=b;else{for(b=c=1/0,d=e=-1/0;++i<j;)h=a[i],h.x<b&&(b=h.x),h.y<c&&(c=h.y),h.x>d&&(d=h.x),h.y>e&&(e=h.y);var k=d-b,l=e-c;k>l?e=c+k:d=b+l}var m=ee();return m.add=function(a){f(m,a,b,c,d,e)},m.visit=function(a){fe(a,m,b,c,d,e)},a.forEach(m.add),m},d3.time={};var rg=Date,sg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];he.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){tg.setUTCDate.apply(this._,arguments)},setDay:function(){tg.setUTCDay.apply(this._,arguments)},setFullYear:function(){tg.setUTCFullYear.apply(this._,arguments)},setHours:function(){tg.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){tg.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){tg.setUTCMinutes.apply(this._,arguments)},setMonth:function(){tg.setUTCMonth.apply(this._,arguments)},setSeconds:function(){tg.setUTCSeconds.apply(this._,arguments)},setTime:function(){tg.setTime.apply(this._,arguments)}};var tg=Date.prototype,ug="%a %b %e %H:%M:%S %Y",vg="%m/%d/%y",wg="%H:%M:%S",xg=sg,yg=xg.map(ie),zg=["January","February","March","April","May","June","July","August","September","October","November","December"],Ag=zg.map(ie);d3.time.format=function(a){function b(b){for(var d,e,f=[],g=-1,h=0;++g<c;)37==a.charCodeAt(g)&&(f.push(a.substring(h,g),(e=Lg[d=a.charAt(++g)])?e(b):d),h=g+1);return f.push(a.substring(h,g)),f.join("")}var c=a.length;return b.parse=function(b){var c={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},d=je(c,a,b,0);if(d!=b.length)return null;"p"in c&&(c.H=c.H%12+12*c.p);var e=new rg;return e.setFullYear(c.y,c.m,c.d),e.setHours(c.H,c.M,c.S,c.L),e},b.toString=function(){return a},b};var Bg=d3.format("02d"),Cg=d3.format("03d"),Dg=d3.format("04d"),Eg=d3.format("2d"),Fg=ke(xg),Gg=ke(yg),Hg=ke(zg),Ig=le(zg),Jg=ke(Ag),Kg=le(Ag),Lg={a:function(a){return yg[a.getDay()]},A:function(a){return xg[a.getDay()]},b:function(a){return Ag[a.getMonth()]},B:function(a){return zg[a.getMonth()]},c:d3.time.format(ug),d:function(a){return Bg(a.getDate())},e:function(a){return Eg(a.getDate())},H:function(a){return Bg(a.getHours())},I:function(a){return Bg(a.getHours()%12||12)},j:function(a){return Cg(1+d3.time.dayOfYear(a))},L:function(a){return Cg(a.getMilliseconds())},m:function(a){return Bg(a.getMonth()+1)},M:function(a){return Bg(a.getMinutes())},p:function(a){return a.getHours()>=12?"PM":"AM"},S:function(a){return Bg(a.getSeconds())},U:function(a){return Bg(d3.time.sundayOfYear(a))},w:function(a){return a.getDay()},W:function(a){return Bg(d3.time.mondayOfYear(a))},x:d3.time.format(vg),X:d3.time.format(wg),y:function(a){return Bg(a.getFullYear()%100)},Y:function(a){return Dg(a.getFullYear()%1e4)},Z:De,"%":function(){return"%"}},Mg={a:me,A:ne,b:oe,B:pe,c:qe,d:xe,e:xe,H:ye,I:ye,L:Be,m:we,M:ze,p:Ce,S:Ae,x:re,X:se,y:ue,Y:te},Ng=/^\s*\d+/,Og=d3.map({am:0,pm:1});d3.time.format.utc=function(a){function b(a){try{rg=he;var b=new rg;return b._=a,c(b)}finally{rg=Date}}var c=d3.time.format(a);return b.parse=function(a){try{rg=he;var b=c.parse(a);return b&&b._}finally{rg=Date}},b.toString=c.toString,b};var Pg=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Ee:Pg,Ee.parse=function(a){var b=new Date(a);return isNaN(b)?null:b},Ee.toString=Pg.toString,d3.time.second=Fe(function(a){return new rg(1e3*Math.floor(a/1e3))},function(a,b){a.setTime(a.getTime()+1e3*Math.floor(b))},function(a){return a.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Fe(function(a){return new rg(6e4*Math.floor(a/6e4))},function(a,b){a.setTime(a.getTime()+6e4*Math.floor(b))},function(a){return a.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Fe(function(a){var b=a.getTimezoneOffset()/60;return new rg(36e5*(Math.floor(a/36e5-b)+b))},function(a,b){a.setTime(a.getTime()+36e5*Math.floor(b))},function(a){return a.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Fe(function(a){var b=new rg(1970,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(a){var b=d3.time.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},sg.forEach(function(a,b){a=a.toLowerCase(),b=7-b;var c=d3.time[a]=Fe(function(a){return(a=d3.time.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});d3.time[a+"s"]=c.range,d3.time[a+"s"].utc=c.utc.range,d3.time[a+"OfYear"]=function(a){var c=d3.time.year(a).getDay();return Math.floor((d3.time.dayOfYear(a)+(c+b)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Fe(function(a){return a=d3.time.day(a),a.setDate(1),a},function(a,b){a.setMonth(a.getMonth()+b)},function(a){return a.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Fe(function(a){return a=d3.time.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Qg=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rg=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Sg=[[d3.time.format("%Y"),function(){return!0}],[d3.time.format("%B"),function(a){return a.getMonth()}],[d3.time.format("%b %d"),function(a){return 1!=a.getDate()}],[d3.time.format("%a %d"),function(a){return a.getDay()&&1!=a.getDate()}],[d3.time.format("%I %p"),function(a){return a.getHours()}],[d3.time.format("%I:%M"),function(a){return a.getMinutes()}],[d3.time.format(":%S"),function(a){return a.getSeconds()}],[d3.time.format(".%L"),function(a){return a.getMilliseconds()}]],Tg=d3.scale.linear(),Ug=Ke(Sg);Rg.year=function(a,b){return Tg.domain(a.map(Me)).ticks(b).map(Le)},d3.time.scale=function(){return He(d3.scale.linear(),Rg,Ug)};var Vg=Rg.map(function(a){return[a[0].utc,a[1]]}),Wg=[[d3.time.format.utc("%Y"),function(){return!0}],[d3.time.format.utc("%B"),function(a){return a.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(a){return 1!=a.getUTCDate()}],[d3.time.format.utc("%a %d"),function(a){return a.getUTCDay()&&1!=a.getUTCDate()}],[d3.time.format.utc("%I %p"),function(a){return a.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(a){return a.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(a){return a.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(a){return a.getUTCMilliseconds()}]],Xg=Ke(Wg);Vg.year=function(a,b){return Tg.domain(a.map(Oe)).ticks(b).map(Ne)},d3.time.scale.utc=function(){return He(d3.scale.linear(),Vg,Xg)}}(),define("d3",function(){}),define("helpers",["d3"],function(){var a={};return a.imageUrl=function(a){return a},a.docs={docs:"http://docs.couchdb.org/en/latest/intro/api.html#documents",all_dbs:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=all_dbs#get--_all_dbs",replication_doc:"http://docs.couchdb.org/en/latest/replication/replicator.html#basics",design_doc:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#design-docs",view_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#view-functions",map_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#map-functions",reduce_functions:"http://docs.couchdb.org/en/latest/couchapp/ddocs.html#reduce-and-rereduce-functions",api_reference:"http://docs.couchdb.org/en/latest/http-api.html",database_permission:"http://docs.couchdb.org/en/latest/api/database/security.html#db-security",stats:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#get--_stats",_active_tasks:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#active-tasks",log:"http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#log",config:"http://docs.couchdb.org/en/latest/config/index.html",views:"http://docs.couchdb.org/en/latest/intro/overview.html#views"},a.getDocUrl=function(b){return a.docs[b]||"#"},a.formatSize=function(a){var b=512;if(b>a)return a+" bytes";for(var c=["KB","MB","GB","TB","PB","EB","ZB","YB"],d=0;a>=b&&d<c.length;)d+=1,a/=1024;return a.toFixed(1)+" "+c[d-1]},a.formatDate=function(a){return format=d3.time.format("%b. %e at %H:%M%p"),format(new Date(1e3*a))},a}),define("mixins",["jquery","lodash"],function(a,b){var c={},d={};return c.addWindowResize=function(a,b){d[b]=a},c.removeWindowResize=function(a){delete d[a],c.initWindowResize()},c.initWindowResize=function(){window.onresize=function(){b.each(d,function(a){a()})}},c.removeSpecialCharacters=function(a){return a.replace(/[^\w\s]/gi,"")},c.safeURLName=function(a){var b=a.match(/[\$\-/_,+-]/g);return null!==b?encodeURIComponent(a):a},c}),function(a,b){var c=a.Backbone;return"function"==typeof define&&define.amd?define("plugins/backbone.layoutmanager",["backbone","underscore","jquery"],function(){return b.apply(a,arguments)}):(c.Layout=b.call(a,c,a._,c.$),void 0)}("object"==typeof global?global:this,function(a,b,c){var d,e=this,f=a.View.prototype._configure,g=Array.prototype.push,h=Array.prototype.concat,i=Array.prototype.splice,j=a.View.extend({_render:function(a,b){var c=this,d=c.__manager__,e=b.beforeRender,f=b.deferred();return c.hasRendered&&c._removeViews(),d.callback=function(){delete d.isAsync,delete d.callback,c.trigger("beforeRender",c),a(c,b).render().then(function(){f.resolve()})},e&&e.call(c,c),d.isAsync||d.callback(),f.promise()},constructor:function(b){b=b||{},j.setupView(this,b),a.View.call(this,b)},async:function(){var a=this.__manager__;return a.isAsync=!0,a.callback},promise:function(){return this.__manager__.renderDeferred.promise()},renderViews:function(){var a=this,b=a.__manager__,c=a.getAllOptions(),d=c.deferred(),e=a.getViews().map(function(a){return a.render().__manager__.renderDeferred}).value();return b.renderDeferred=d.promise(),c.when(e).then(function(){d.resolveWith(a,[a])}),a},insertView:function(a,b){return b?this.setView(a,b,!0):this.setView(a,!0)},insertViews:function(a){return b.isArray(a)?this.setViews({"":a}):(b.each(a,function(c,d){a[d]=b.isArray(c)?c:[c]}),this.setViews(a))},getView:function(a){return null==a&&(a=arguments[1]),this.getViews(a).first().value()},getViews:function(a){var c;return"string"==typeof a?(a=this.sections[a]||a,c=this.views[a]||[],b.chain([].concat(c))):(c=b.chain(this.views).map(function(a){return b.isArray(a)?a:[a]},this).flatten(),"object"==typeof a?c.where(a):"function"==typeof a?c.filter(a):c)},removeView:function(a){return this.getViews(a).each(function(a){a.remove()})},setView:function(a,c,d){var e,f,g,i=this;if("string"!=typeof a&&(d=c,c=a,a=""),e=c.__manager__,!e)throw new Error("The argument associated with selector '"+a+"' is defined and a View.  Set `manage` property to true for Backbone.View instances.");return f=c.getAllOptions(),e.parent=i,g=e.selector=i.sections[a]||a,b.result(c,"setup"),d?(i.views[g]=h.call([],i.views[a]||[],c),i.__manager__.insert=!0,c):(c.hasRendered&&f.partial(i.$el,c.$el,i.__manager__,e),i.removeView(a),i.views[g]=c)},setViews:function(a){return b.each(a,function(a,c){return b.isArray(a)?b.each(a,function(a){this.insertView(c,a)},this):(this.setView(c,a),void 0)},this),this},render:function(){function a(){function a(){var a=e.console,c=f.afterRender;c&&c.call(d,d),d.trigger("afterRender",d),h.noel&&d.$el.length>1&&b.isFunction(a.warn)&&!f.suppressWarnings&&(a.warn("`el: false` with multiple top level elements is not supported."),b.isFunction(a.trace)&&a.trace())}var c;return b.each(d.views,function(a,c){b.isArray(a)&&f.htmlBatch(d,a,c)}),i&&!h.insertedViaFragment&&(f.contains(i.el,d.el)||i.getAllOptions().partial(i.$el,d.$el,k,h)),d.delegateEvents(),d.hasRendered=!0,(c=h.queue.shift())?c():delete h.queue,k&&k.queue?i.once("afterRender",a):a(),l.resolveWith(d,[d])}function c(){var c=d.getAllOptions();d._render(j._viewRender,c).done(function(){if(!b.keys(d.views).length)return a();var e=b.map(d.views,function(a){var d=b.isArray(a);return d&&a.length?c.when(b.map(a,function(a){return a.__manager__.insertedViaFragment=!0,a.render().__manager__.renderDeferred})):d?a:a.render().__manager__.renderDeferred});c.when(e).done(a)})}var d=this,f=d.getAllOptions(),h=d.__manager__,i=h.parent,k=i&&i.__manager__,l=f.deferred();return h.queue?g.call(h.queue,c):(h.queue=[],c(d,l)),d.__manager__.renderDeferred=l,d},remove:function(){return j._removeView(this,!0),this._remove.apply(this,arguments)},getAllOptions:function(){return b.extend({},this,j.prototype.options,this.options)}},{_cache:{},_viewRender:function(a,d){function e(e){b.isString(e)&&(l.noel?(e=c.trim(e),k=c(e),a.$el.slice(1).remove(),a.$el.replaceWith(k),a.setElement(k,!1)):d.html(a.$el,e)),i.resolveWith(a,[a])}function f(b,c){var f;l.callback=function(a){delete l.isAsync,delete l.callback,e(a)},j.cache(g,c),c&&(f=d.renderTemplate.call(a,c,b)),l.isAsync||e(f)}var g,h,i,k,l=a.__manager__;return{render:function(){var c=a.serialize||d.serialize,e=a.template||d.template;return i=d.deferred(),b.isFunction(c)&&(c=c.call(a)),l.callback=function(a){delete l.isAsync,delete l.callback,f(c,a)},"string"==typeof e&&(g=d.prefix+e),(h=j.cache(g))?(f(c,h,g),i):("string"==typeof e?h=d.fetchTemplate.call(a,d.prefix+e):"function"==typeof e?h=e:null!=e&&(h=d.fetchTemplate.call(a,e)),l.isAsync||f(c,h),i)}}},_removeViews:function(a,b){"boolean"==typeof a&&(b=a,a=this),a=a||this,a.getViews().each(function(a){(a.hasRendered||b)&&j._removeView(a,b)})},_removeView:function(a,c){var d,e=a.__manager__,f=e.parent&&e.parent.__manager__,g="boolean"==typeof a.keep?a.keep:a.options.keep;if(!g&&f&&f.insert===!0||c){if(j.cleanViews(a),a._removeViews(!0),a.$el.remove(),!e.parent)return;if(d=e.parent.views[e.selector],b.isArray(d))return b.each(b.clone(d),function(a,b){a&&a.__manager__===e&&i.call(d,b,1)});delete e.parent.views[e.selector]}},cache:function(a,b){return a in this._cache&&null==b?this._cache[a]:null!=a&&null!=b?this._cache[a]=b:void 0},cleanViews:function(c){b.each(h.call([],c),function(c){var d;c.unbind(),c.model instanceof a.Model&&c.model.off(null,null,c),c.collection instanceof a.Collection&&c.collection.off(null,null,c),c.stopListening(),d=c.getAllOptions().cleanup,b.isFunction(d)&&d.call(c)})},configure:function(c){b.extend(j.prototype.options,c),c.manage&&(a.View.prototype.manage=!0),c.el===!1&&(a.View.prototype.el=!1),c.suppressWarnings===!0&&(a.View.prototype.suppressWarnings=!0)},setupView:function(c,e){b.each(h.call([],c),function(c){if(!c.__manager__){var f,g,i,k=j.prototype,l=b.pick(c,d);b.defaults(c,{views:{},sections:{},__manager__:{},_removeViews:j._removeViews,_removeView:j._removeView},j.prototype),e=c.options=b.defaults(e||{},c.options,k.options),i=b.pick(e,h.call(["events","sections"],b.values(e.events))),b.extend(c,i),b.extend(e,l),c._remove=a.View.prototype.remove,c.render=j.prototype.render,c.remove!==k.remove&&(c._remove=c.remove,c.remove=k.remove),f=e.views||c.views,b.keys(f).length&&(g=f,c.views={},c.setViews(g)),c.options.template?c.options.template=e.template:c.template&&(e.template=c.template)}})}});return j.VERSION="0.9.1",a.Layout=j,a.View.prototype._configure=function(a){var b,c;return("el"in a?a.el===!1:this.el===!1)&&(b=!0),c=f.apply(this,arguments),(a.manage||this.manage)&&j.setupView(this),this.__manager__&&(this.__manager__.noel=b,this.__manager__.suppressWarnings=a.suppressWarnings),c},j.prototype.options={prefix:"",deferred:function(){return c.Deferred()},fetchTemplate:function(a){return b.template(c(a).html())},renderTemplate:function(a,b){return a(b)},partial:function(a,b,c,d){var e;d.selector&&(c.noel?(e=a.filter(d.selector),a=e.length?e:a.find(d.selector)):a=a.find(d.selector)),c.insert?this.insert(a,b):this.html(a,b)},html:function(a,b){a.html(b)},htmlBatch:function(a,d,e){var f=a.__manager__,g={selector:e},h=b.reduce(d,function(b,d){var e="boolean"==typeof d.keep?d.keep:d.options.keep,f=e&&c.contains(a.el,d.el);return d.el&&!f&&b.push(d.el),b},[]);return this.partial(a.$el,c(h),f,g)},insert:function(a,b){a.append(b)},when:function(a){return c.when.apply(null,a)},contains:function(a,b){return c.contains(a,b)}},d=b.keys(j.prototype.options),j}),function(a){function b(b){var c=b.data;b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}function c(b){var c=b.target,d=a(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=this;if(f.clk=c,"image"==c.type)if(void 0!==b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function d(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}var e={};e.fileapi=void 0!==a("<input type='file'/>").get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b){function c(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;g>d;d++)f[d]=f[d].replace(/\+/g," "),e=f[d].split("="),h.push([decodeURIComponent(e[0]),decodeURIComponent(e[1])]);return h}function g(d){for(var e=new FormData,f=0;f<d.length;f++)e.append(d[f].name,d[f].value);if(b.extraData){var g=c(b.extraData);for(f=0;f<g.length;f++)g[f]&&e.append(g[f][0],g[f][1])}b.data=null;var h=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:i||"POST"});b.uploadProgress&&(h.xhr=function(){var a=jQuery.ajaxSettings.xhr();return a.upload&&a.upload.addEventListener("progress",function(a){var c=0,d=a.loaded||a.position,e=a.total;a.lengthComputable&&(c=Math.ceil(d/e*100)),b.uploadProgress(a,d,e,c)},!1),a}),h.data=null;var j=h.beforeSend;return h.beforeSend=function(a,b){b.data=e,j&&j.call(this,a,b)},a.ajax(h)}function h(c){function e(a){var b=null;try{a.contentWindow&&(b=a.contentWindow.document)}catch(c){d("cannot get iframe.contentWindow document: "+c)}if(b)return b;try{b=a.contentDocument?a.contentDocument:a.document}catch(c){d("cannot get iframe.contentDocument: "+c),b=a.document}return b}function g(){function b(){try{var a=e(r).readyState;d("state = "+a),a&&"uninitialized"==a.toLowerCase()&&setTimeout(b,50)}catch(c){d("Server abort: ",c," (",c.name,")"),h(A),w&&clearTimeout(w),w=void 0}}var c=l.attr2("target"),f=l.attr2("action");x.setAttribute("target",o),i||x.setAttribute("method","POST"),f!=m.url&&x.setAttribute("action",m.url),m.skipEncodingOverride||i&&!/post/i.test(i)||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(w=setTimeout(function(){v=!0,h(z)},m.timeout));var g=[];try{if(m.extraData)for(var j in m.extraData)m.extraData.hasOwnProperty(j)&&(a.isPlainObject(m.extraData[j])&&m.extraData[j].hasOwnProperty("name")&&m.extraData[j].hasOwnProperty("value")?g.push(a('<input type="hidden" name="'+m.extraData[j].name+'">').val(m.extraData[j].value).appendTo(x)[0]):g.push(a('<input type="hidden" name="'+j+'">').val(m.extraData[j]).appendTo(x)[0]));m.iframeTarget||(q.appendTo("body"),r.attachEvent?r.attachEvent("onload",h):r.addEventListener("load",h,!1)),setTimeout(b,15);try{x.submit()}catch(k){var n=document.createElement("form").submit;n.apply(x)}}finally{x.setAttribute("action",f),c?x.setAttribute("target",c):l.removeAttr("target"),a(g).remove()}}function h(b){if(!s.aborted&&!F){if(E=e(r),E||(d("cannot access response document"),b=A),b===z&&s)return s.abort("timeout"),y.reject(s,"timeout"),void 0;if(b==A&&s)return s.abort("server abort"),y.reject(s,"error","server abort"),void 0;if(E&&E.location.href!=m.iframeSrc||v){r.detachEvent?r.detachEvent("onload",h):r.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"==m.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),setTimeout(h,250),void 0;var i=E.body?E.body:E.documentElement;s.responseText=i?i.innerHTML:null,s.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(m.dataType="xml"),s.getResponseHeader=function(a){var b={"content-type":m.dataType};return b[a]},i&&(s.status=Number(i.getAttribute("status"))||s.status,s.statusText=i.getAttribute("statusText")||s.statusText);var j=(m.dataType||"").toLowerCase(),k=/(json|script|text)/.test(j);if(k||m.textarea){var l=E.getElementsByTagName("textarea")[0];if(l)s.responseText=l.value,s.status=Number(l.getAttribute("status"))||s.status,s.statusText=l.getAttribute("statusText")||s.statusText;else if(k){var o=E.getElementsByTagName("pre")[0],p=E.getElementsByTagName("body")[0];o?s.responseText=o.textContent?o.textContent:o.innerText:p&&(s.responseText=p.textContent?p.textContent:p.innerText)}}else"xml"==j&&!s.responseXML&&s.responseText&&(s.responseXML=H(s.responseText));try{D=J(s,j,m)}catch(t){f="parsererror",s.error=c=t||f}}catch(t){d("error caught: ",t),f="error",s.error=c=t||f}s.aborted&&(d("upload aborted"),f=null),s.status&&(f=s.status>=200&&s.status<300||304===s.status?"success":"error"),"success"===f?(m.success&&m.success.call(m.context,D,"success",s),y.resolve(s.responseText,"success",s),n&&a.event.trigger("ajaxSuccess",[s,m])):f&&(void 0===c&&(c=s.statusText),m.error&&m.error.call(m.context,s,f,c),y.reject(s,"error",c),n&&a.event.trigger("ajaxError",[s,m,c])),n&&a.event.trigger("ajaxComplete",[s,m]),n&&!--a.active&&a.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,s,f),F=!0,m.timeout&&clearTimeout(w),setTimeout(function(){m.iframeTarget||q.remove(),s.responseXML=null},100)}}}var j,k,m,n,o,q,r,s,t,u,v,w,x=l[0],y=a.Deferred();if(c)for(k=0;k<p.length;k++)j=a(p[k]),f?j.prop("disabled",!1):j.removeAttr("disabled");if(m=a.extend(!0,{},a.ajaxSettings,b),m.context=m.context||m,o="jqFormIO"+(new Date).getTime(),m.iframeTarget?(q=a(m.iframeTarget),u=q.attr2("name"),u?o=u:q.attr2("name",o)):(q=a('<iframe name="'+o+'" src="'+m.iframeSrc+'" />'),q.css({position:"absolute",top:"-1000px",left:"-1000px"})),r=q[0],s={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{r.contentWindow.document.execCommand&&r.contentWindow.document.execCommand("Stop")}catch(e){}q.attr("src",m.iframeSrc),s.error=c,m.error&&m.error.call(m.context,s,c,b),n&&a.event.trigger("ajaxError",[s,m,c]),m.complete&&m.complete.call(m.context,s,c)}},n=m.global,n&&0===a.active++&&a.event.trigger("ajaxStart"),n&&a.event.trigger("ajaxSend",[s,m]),m.beforeSend&&m.beforeSend.call(m.context,s,m)===!1)return m.global&&a.active--,y.reject(),y;if(s.aborted)return y.reject(),y;t=x.clk,t&&(u=t.name,u&&!t.disabled&&(m.extraData=m.extraData||{},m.extraData[u]=t.value,"image"==t.type&&(m.extraData[u+".x"]=x.clk_x,m.extraData[u+".y"]=x.clk_y)));var z=1,A=2,B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(m.extraData=m.extraData||{},m.extraData[C]=B),m.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=I(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var i,j,k,l=this;"function"==typeof b&&(b={success:b}),i=b.type||this.attr2("method"),j=b.url||this.attr2("action"),k="string"==typeof j?a.trim(j):"",k=k||window.location.href||"",k&&(k=(k.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:k,success:a.ajaxSettings.success,type:i||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var m={};if(this.trigger("form-pre-serialize",[this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=b.traditional;void 0===n&&(n=a.ajaxSettings.traditional);var o,p=[],q=this.formToArray(b.semantic,p);if(b.data&&(b.extraData=b.data,o=a.param(b.data,n)),b.beforeSubmit&&b.beforeSubmit(q,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[q,this,b,m]),m.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var r=a.param(q,n);o&&(r=r?r+"&"+o:o),"GET"==b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+r,b.data=null):b.data=r;var s=[];if(b.resetForm&&s.push(function(){l.resetForm()}),b.clearForm&&s.push(function(){l.clearForm(b.includeHidden)}),!b.dataType&&b.target){var t=b.success||function(){};s.push(function(c){var d=b.replaceTarget?"replaceWith":"html";a(b.target)[d](c).each(t,arguments)})}else b.success&&s.push(b.success);if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=s.length;g>f;f++)s[f].apply(e,[a,c,d||l,l])},b.error){var u=b.error;b.error=function(a,c,d){var e=b.context||this;
+u.apply(e,[a,c,d,l])}}if(b.complete){var v=b.complete;b.complete=function(a,c){var d=b.context||this;v.apply(d,[a,c,l])}}var w=a('input[type=file]:enabled[value!=""]',this),x=w.length>0,y="multipart/form-data",z=l.attr("enctype")==y||l.attr("encoding")==y,A=e.fileapi&&e.formdata;d("fileAPI :"+A);var B,C=(x||z)&&!A;b.iframe!==!1&&(b.iframe||C)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){B=h(q)}):B=h(q):B=(x||z)&&A?g(q):a.ajax(b),l.removeData("jqxhr").data("jqxhr",B);for(var D=0;D<p.length;D++)p[D]=null;return this.trigger("form-submit-notify",[this,b]),this},a.fn.ajaxForm=function(e){if(e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var f={s:this.selector,c:this.context};return!a.isReady&&f.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(f.s,f.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,b).bind("click.form-plugin",e,c)},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c){var d=[];if(0===this.length)return d;var f=this[0],g=b?f.getElementsByTagName("*"):f.elements;if(!g)return d;var h,i,j,k,l,m,n;for(h=0,m=g.length;m>h;h++)if(l=g[h],j=l.name,j&&!l.disabled)if(b&&f.clk&&"image"==l.type)f.clk==l&&(d.push({name:j,value:a(l).val(),type:l.type}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}));else if(k=a.fieldValue(l,!0),k&&k.constructor==Array)for(c&&c.push(l),i=0,n=k.length;n>i;i++)d.push({name:j,value:k[i]});else if(e.fileapi&&"file"==l.type){c&&c.push(l);var o=l.files;if(o.length)for(i=0;i<o.length;i++)d.push({name:j,value:o[i],type:l.type});else d.push({name:j,value:"",type:l.type})}else null!==k&&"undefined"!=typeof k&&(c&&c.push(l),d.push({name:j,value:k,type:l.type,required:l.required}));if(!b&&f.clk){var p=a(f.clk),q=p[0];j=q.name,j&&!q.disabled&&"image"==q.type&&(d.push({name:j,value:p.val()}),d.push({name:j+".x",value:f.clk_x},{name:j+".y",value:f.clk_y}))}return d},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;g>f;f++)c.push({name:d,value:e[f]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;e>d;d++){var f=this[d],g=a.fieldValue(f,b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==f&&-1==b.selectedIndex))return null;if("select"==f){var g=b.selectedIndex;if(0>g)return null;for(var h=[],i=b.options,j="select-one"==e,k=j?g+1:i.length,l=j?g:0;k>l;l++){var m=i[l];if(m.selected){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"==e?this.value="":"checkbox"==d||"radio"==d?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==d?/MSIE/.test(navigator.userAgent)?a(this).replaceWith(a(this).clone(!0)):a(this).val(""):b&&(b===!0&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})},a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"==c||"radio"==c)this.checked=b;else if("option"==this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}(jQuery),define("plugins/jquery.form",function(){}),define("app",["initialize","jquery","lodash","backbone","bootstrap","helpers","mixins","plugins/backbone.layoutmanager","plugins/jquery.form"],function(a,b,c,d,e,f,g){"undefined"==typeof console&&(console={log:function(){}}),c.extend(a,d.Events,{mixins:g,renderView:function(a,b,c,d,e){a.setView(b,new c(d)).render().then(e)},module:function(a){return c.extend({Views:{}},a)},getParams:function(a){a&&("?"===a.substring(0,1)?a=a.substring(1):a.indexOf("?")>-1&&(a=a.split("?")[1]));var b=window.location.hash.split("?")[1];a=a||b||window.location.search.substring(1);var c,d={},e=/\+/g,f=/([^&=]+)=?([^&]*)/g,g=function(a){return decodeURIComponent(a.replace(e," "))},h=a;if(a)for(;c=f.exec(h);)d[g(c[1])]=g(c[2]);return d}});var h=window.JST=window.JST||{};return d.Layout.configure({manage:!0,prefix:"app/",renderTemplate:function(a,b){return a(c.extend(f,b))},fetchTemplate:function(d){var e;return d+=".html",h[d]?h[d]:(e=this.async(),b.ajax({url:a.root+d}).then(function(a){e(h[d]=c.template(a))}))}}),a}),define("resizeColumns",["mixins"],function(a){var b=function(a){this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"};return b.prototype={getPrimaryNavWidth:function(){var a=$("body").hasClass("closeMenu")?64:224;return a},getPanelWidth:function(){var a=$("#sidebar-content").length>0?$("#sidebar-content").width():0;return this.getPrimaryNavWidth()+a},initialize:function(){var b=this;this.lazyLayout=_.debounce(b.onResizeHandler,300).bind(this),a.addWindowResize(this.lazyLayout,"animation"),a.initWindowResize(),this.onResizeHandler()},updateOptions:function(a){this.options={},this.options=a,this.options.selectorElements=a.selectorElements||".window-resizeable"},turnOff:function(){a.removeWindowResize("animation")},cleanupCallback:function(){this.callback=null},onResizeHandler:function(){if(this.options.onResizeHandler)this.options.onResizeHandler();else{var a,b=window.innerWidth-this.getPanelWidth(),c=$("#sidebar-content").length>0?470:800;b>c&&1400>b?a=window.innerWidth-this.getPanelWidth():c>b?a=c:b>1400&&(a=1400),$(this.options.selectorElements).innerWidth(a)}this.options.callback&&this.options.callback()}},b}),define("modules/fauxton/base",["app","backbone","resizeColumns"],function(a,b,c){a.resizeColumns=new c({}),a.resizeColumns.onResizeHandler();var d=a.module();return d.Breadcrumbs=b.View.extend({template:"templates/fauxton/breadcrumbs",serialize:function(){var a=_.clone(this.crumbs);return{crumbs:a}},initialize:function(a){this.crumbs=a.crumbs}}),d.VersionInfo=b.Model.extend({url:a.host}),d.Footer=b.View.extend({template:"templates/fauxton/footer",initialize:function(){this.versionInfo=new d.VersionInfo},establish:function(){return[this.versionInfo.fetch()]},serialize:function(){return{version:this.versionInfo.get("version")}}}),d.NavBar=b.View.extend({className:"navbar",template:"templates/fauxton/nav_bar",navLinks:[{href:"#/_all_dbs",title:"Databases",icon:"fonticon-database",className:"databases"}],bottomNavLinks:[],footerNavLinks:[],serialize:function(){return{navLinks:this.navLinks,bottomNavLinks:this.bottomNavLinks,footerNavLinks:this.footerNavLinks}},addLink:function(a){a.top&&!a.bottomNav?this.navLinks.unshift(a):a.top&&a.bottomNav?this.bottomNavLinks.unshift(a):a.bottomNav?this.bottomNavLinks.push(a):a.footerNav?this.footerNavLinks.push(a):this.navLinks.push(a)},removeLink:function(a){var b=this.navlinks;a.bottomNav?b=this.bottomNavLinks:a.footerNav&&(b=this.footerNavLinks);var c=-1;_.each(b,function(b,d){b.title===a.title&&(c=d)}),-1!==c&&(b.splice(c,1),this.render())},afterRender:function(){function b(){d.toggleClass("closeMenu"),c=d.hasClass("closeMenu"),a.resizeColumns.onResizeHandler()}$('#primary-navbar li[data-nav-name="'+a.selectedHeader+'"]').addClass("active");var c=!0,d=$("body");$(".brand").off(),$(".brand").on({click:function(a){$(a.target).is("a")||b()}}),$("#primary-navbar").on("click",".nav a",function(){d.hasClass("closeMenu")||setTimeout(function(){d.addClass("closeMenu"),a.resizeColumns.onResizeHandler()},3e3)}),a.resizeColumns.initialize()},beforeRender:function(){this.addLinkViews()},addLinkViews:function(){var a=this;_.each(_.union(this.navLinks,this.bottomNavLinks),function(b){if(b.view){var c=b.establish||[];$.when.apply(null,c).then(function(){var c=b.bottomNav?"#bottom-nav-links":"#nav-links";a.insertView(c,b.view).render()})}},this)}}),d.ApiBar=b.View.extend({template:"templates/fauxton/api_bar",endpoint:"_all_docs",documentation:"docs",events:{"click .api-url-btn":"toggleAPIbar"},toggleAPIbar:function(a){var b=$(a.currentTarget).find("span");b.hasClass("fonticon-plus")?b.removeClass("fonticon-plus").addClass("fonticon-minus"):b.removeClass("fonticon-minus").addClass("fonticon-plus"),$(".api-navbar").toggle()},serialize:function(){return{endpoint:this.endpoint,documentation:this.documentation}},hide:function(){this.$el.addClass("hide")},show:function(){this.$el.removeClass("hide")},update:function(a){this.show(),this.endpoint=a[0],this.documentation=a[1],this.render()}}),d.Notification=b.View.extend({fadeTimer:5e3,initialize:function(a){this.msg=a.msg,this.type=a.type||"info",this.selector=a.selector,this.fade=void 0===a.fade?!0:a.fade,this.clear=a.clear,this.data=a.data||"",this.template=a.template||"templates/fauxton/notification"},serialize:function(){return{data:this.data,msg:this.msg,type:this.type}},delayedFade:function(){var a=this;this.fade&&setTimeout(function(){a.$el.fadeOut()},this.fadeTimer)},renderNotification:function(a){return a=a||this.selector,this.clear&&$(a).html(""),this.render().$el.appendTo(a),this.delayedFade(),this}}),d}),function(a,b,c){function d(a){return j(arguments,function(b,d){a[b]===c&&(a[b]=d)}),a}function e(a){return j(arguments,function(b,c){a[u][f(a,b)||b]=c}),a}function f(a,b){var d,e,f=a[u];if(f[b]!==c)return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),e=0;e<M[m];e++)if(d=M[e]+b,f[d]!==c)return d}function g(a,b){var c,d=[r,b,~~(100*a)].join("-"),e="{"+r+":"+a+"}";if(!N[d]){for(c=0;c<M[m];c++)try{O.insertRule("@"+(M[c]&&"-"+M[c].toLowerCase()+"-"||"")+"keyframes "+d+"{0%{"+r+":1}"+b+"%"+e+"to"+e+"}",O.cssRules[m])}catch(f){}N[d]=1}return d}function h(a,b,c){return c&&!c[B]&&h(a,c),a.insertBefore(b,c||null),a}function i(a){var c=b.createElement(a||"div");return j(arguments,function(a,b){c[a]=b}),c}function j(a,b){for(var c=~~((a[m]-1)/2),d=1;c>=d;d++)b(a[2*d-1],a[2*d])}var k,l="width",m="length",n="radius",o="lines",p="trail",q="color",r="opacity",s="speed",t="shadow",u="style",v="height",w="left",x="top",y="px",z="childNodes",A="firstChild",B="parentNode",C="position",D="relative",E="absolute",F="animation",G="transform",H="Origin",I="Timeout",J="coord",K="#000",L=u+"Sheets",M="webkit0Moz0ms0O".split(0),N={};h(b.getElementsByTagName("head")[0],i(u));var O=b[L][b[L][m]-1],P=function(a){this.opts=d(a||{},o,12,p,100,m,7,l,5,n,10,q,K,r,.25,s,1)},Q=P.prototype={spin:function(b){var c=this,d=c.el=c[o](c.opts);if(b&&h(b,e(d,w,~~(b.offsetWidth/2)+y,x,~~(b.offsetHeight/2)+y),b[A]),!k){var f=c.opts,g=0,i=20/f[s],j=(1-f[r])/(i*f[p]/100),l=i/f[o];!function m(){g++;for(var b=f[o];b;b--){var e=Math.max(1-(g+b*l)%i*j,f[r]);c[r](d,f[o]-b,e,f)}c[I]=c.el&&a["set"+I](m,50)}()}return c},stop:function(){var b=this,d=b.el;return a["clear"+I](b[I]),d&&d[B]&&d[B].removeChild(d),b.el=c,b}};Q[o]=function(a){function b(b,c){return e(i(),C,E,l,a[m]+a[l]+y,v,a[l]+y,"background",b,"boxShadow",c,G+H,w,G,"rotate("+~~(360/a[o]*j)+"deg) translate("+a[n]+y+",0)","borderRadius","100em")}for(var c,d=e(i(),C,D),f=g(a[r],a[p]),j=0;j<a[o];j++)c=e(i(),C,E,x,1+~(a[l]/2)+y,G,"translate3d(0,0,0)",F,f+" "+1/a[s]+"s linear infinite "+(1/a[o]/a[s]*j-1/a[s])+"s"),a[t]&&h(c,e(b(K,"0 0 4px "+K),x,2+y)),h(d,h(c,b(a[q],"0 0 1px rgba(0,0,0,.1)")));return d},Q[r]=function(a,b,c){a[z][b][u][r]=c};var R="behavior",S="url(#default#VML)",T="group0roundrect0fill0stroke".split(0);!function(){var a,b=e(i(T[0]),R,S);if(!f(b,G)&&b.adj){for(a=0;a<T[m];a++)O.addRule(T[a],R+":"+S);Q[o]=function(){function a(a,c,g){h(j,h(e(b(),"rotation",360/d[o]*a+"deg",w,~~c),h(e(i(T[1],"arcsize",1),l,f,v,d[l],w,d[n],x,-d[l]/2,"filter",g),i(T[2],q,d[q],r,d[r]),i(T[3],r,0))))}function b(){return e(i(T[0],J+"size",g+" "+g,J+H,-f+" "+-f),l,g,v,g)}var c,d=this.opts,f=d[m]+d[l],g=2*f,j=b(),k=~(d[m]+d[n]+d[l])+y;if(d[t])for(c=1;c<=d[o];c++)a(c,-2,"progid:DXImage"+G+".Microsoft.Blur(pixel"+n+"=2,make"+t+"=1,"+t+r+"=.3)");for(c=1;c<=d[o];c++)a(c);return h(e(i(),"margin",k+" 0 0 "+k,C,D),j)},Q[r]=function(a,b,c,d){d=d[t]&&d[o]||0,a[A][z][b+d][A][A][r]=c}}else k=f(b,F)}(),a.Spinner=P}(window,document),define("spin",function(){}),define("api",["app","modules/fauxton/base","spin"],function(a,b){var c=a.module();c.moduleExtensions={Routes:{}},c.addonExtensions={initialize:function(){}},c.excludedViewErrors=["Missing name in function declaration.","['{a}'] is better written in dot notation."],c.isIgnorableError=function(a){return _.contains(c.excludedViewErrors,a)},c.View=Backbone.View.extend({establish:function(){return null},loaderClassname:"loader",disableLoader:!1,forceRender:function(){this.hasRendered=!1}}),c.navigate=function(b,c){var d=_.extend({trigger:!0},c);a.router.navigate(b,d)},c.beforeUnload=function(){a.router.beforeUnload.apply(a.router,arguments)},c.removeBeforeUnload=function(){a.router.removeBeforeUnload.apply(a.router,arguments)},c.addHeaderLink=function(b){a.masterLayout.navBar.addLink(b)},c.removeHeaderLink=function(b){a.masterLayout.navBar.removeLink(b)},c.Deferred=function(){return $.Deferred()},c.when=function(a){return a instanceof Array?$.when.apply(null,a):$.when(a)},c.addRoute=function(b){a.router.route(b.route,b.name,b.callback)},c.triggerRouteEvent=function(b,c){a.router.triggerRouteEvent("route:"+b,c)},c.module=function(b){return a.module(_.extend(c.moduleExtensions,b))},c.addon=function(a){return c.module(c.addonExtensions,a)},c.addNotification=function(a){a=_.extend({msg:"Notification Event Triggered!",type:"info",selector:"#global-notifications"},a);var c=new b.Notification(a);return c.renderNotification()},c.UUID=Backbone.Model.extend({initialize:function(a){a=_.extend({count:1},a),this.count=a.count},url:function(){return a.host+"/_uuids?count="+this.count},next:function(){return this.get("uuids").pop()}}),c.Session=Backbone.Model.extend({url:"/_session",user:function(){var a=this.get("userCtx");return a&&a.name?{name:a.name,roles:a.roles}:null},fetchOnce:function(a){var b=_.extend({},a);return(!this._deferred||"rejected"===this._deferred.state()||b.forceFetch)&&(this._deferred=this.fetch()),this._deferred},fetchUser:function(a){var b=this,c=this.user();return this.fetchOnce(a).then(function(){var a=b.user();return c!==a?b.trigger("session:userChanged"):b.trigger("session:userFetched"),a})}}),c.setSession=function(b){return a.session=c.session=b,c.session.fetchUser()},c.setSession(new c.Session);var d=function(a){this._options=a,this.initialize.apply(this,arguments)};d.extend=Backbone.Model.extend,_.extend(d.prototype,Backbone.Events,{authDeniedCb:function(){},initialize:function(){},authHandlerCb:function(){var a=$.Deferred();return a.resolve(),a},registerAuth:function(a){this.authHandlerCb=a},registerAuthDenied:function(a){this.authDeniedCb=a},checkAccess:function(a){var b=a||[],d=this;return c.session.fetchUser().then(function(){return c.when(d.authHandlerCb(c.session,b))})}}),c.auth=new d,c.RouteObject=function(a){this._options=a,this._configure(a||{}),this.initialize.apply(this,arguments),this.addEvents()};var e={};_.extend(e,Backbone.Events),c.RouteObject.on=function(a,b){e.on(a,b)},c.RouteObject.extend=Backbone.Model.extend;var f=["views","routes","events","roles","crumbs","layout","apiUrl","establish"];_.extend(c.RouteObject.prototype,Backbone.Events,{views:{},routes:{},events:{},crumbs:[],layout:"with_sidebar",apiUrl:null,disableLoader:!1,loaderClassname:"loader",renderedState:!1,establish:function(){},route:function(){},roles:[],initialize:function(){}},{renderWith:function(d,e){var f=this,g=_.bind(this.triggerBroadcast,this);this.renderedState||(e.setTemplate(this.layout),g("beforeFullRender"),$("#primary-navbar li").removeClass("active"),this.selectedHeader&&(a.selectedHeader=this.selectedHeader,$('#primary-navbar li[data-nav-name="'+this.selectedHeader+'"]').addClass("active"))),e.clearBreadcrumbs();var h=this.get("crumbs");h.length&&e.setBreadcrumbs(new b.Breadcrumbs({crumbs:h})),g("beforeEstablish"),c.when(this.establish()).then(function(){g("afterEstablish"),_.each(f.getViews(),function(a,b){return a.hasRendered?(g("viewHasRendered",a,b),void 0):(g("beforeRender",a,b),c.when(a.establish()).then(function(){e.setView(b,a),e.renderView(b),g("afterRender",a,b)},function(d){if(a.establishError={error:!0,reason:d},d){var f=JSON.parse(d.responseText).reason;c.addNotification({msg:"An Error occurred: "+f,type:"error"})}e.renderView(b)}),void 0)})}.bind(this),function(a){a&&c.addNotification({msg:"An Error occurred"+JSON.parse(a.responseText).reason,type:"error"})}),this.get("apiUrl")?e.apiBar.update(this.get("apiUrl")):e.apiBar.hide(),this.renderedState=!0,g("renderComplete")},triggerBroadcast:function(a){var b=Array.prototype.slice.call(arguments);this.trigger.apply(this,b),b.splice(0,1,a,this),e.trigger.apply(e,b)},get:function(a){return _.isFunction(this[a])?this[a]():this[a]},addEvents:function(a){a=a||this.get("events"),_.each(a,function(a,b){if(!_.isFunction(a)&&!_.isFunction(this[a]))throw new Error("Invalid method: "+a);a=_.isFunction(a)?a:this[a],this.on(b,a)},this)},_configure:function(a){_.each(_.intersection(_.keys(a),f),function(b){this[b]=a[b]},this)},getView:function(a){return this.views[a]},setView:function(a,b){return this.views[a]=b,b},getViews:function(){return this.views},removeViews:function(){_.each(this.views,function(a,b){a.remove(),delete this.views[b]},this)},getRouteUrls:function(){return _.keys(this.get("routes"))},hasRoute:function(a){return this.get("routes")[a]?!0:!1},routeCallback:function(a,b){var c,d=this.get("routes"),e=d[a];c="object"==typeof e?this[e.route]:this[e],c.apply(this,b)},getRouteRoles:function(a){var b=this.get("routes")[a];return"object"==typeof b&&b.roles?b.roles:this.roles}});var g;c.RouteObject.on("beforeEstablish",function(a){if(!a.disableLoader){var b={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};$(".spinner").length||$('<div class="spinner"></div>').appendTo("#app-container"),g=new Spinner(b).spin(),$(".spinner").append(g.el)}});var h,i=function(){g&&(g.stop(),$(".spinner").remove())},j=function(){h&&(h.stop(),$(".spinner").remove())};c.RouteObject.on("beforeRender",function(a,b,c){if(i(),!b.disableLoader){var d={lines:16,length:8,width:4,radius:12,color:"#333",speed:1,trail:10,shadow:!1};h=new Spinner(d).spin(),$('<div class="spinner"></div>').appendTo(c).append(h.el)}}),c.RouteObject.on("afterRender",function(){j()}),c.RouteObject.on("viewHasRendered",function(){j(),i()});var k=_.extend({},Backbone.Events);return c.registerExtension=function(a,b){k[a]||(k[a]=[]),k.trigger("add:"+a,b),k[a].push(b)},c.getExtensions=function(a){var b=k[a];return b||(b=[]),b},c.extensions=k,a.fauxtonAPI=c,a.fauxtonAPI}),define("modules/fauxton/layout",["backbone"],function(a){var b=function(b,c){this.navBar=b,this.apiBar=c,this.layout=new a.Layout({template:"templates/layouts/with_sidebar",views:{"#primary-navbar":this.navBar,"#api-navbar":this.apiBar},afterRender:function(){}}),this.layoutViews={},this.el=this.layout.el};return _.extend(b.prototype,{render:function(){return this.layout.render()},setTemplate:function(a){this.layout.template=a.prefix?a.prefix+a.name:"templates/layouts/"+a,_.each(this.layoutViews,function(a){a.remove()}),this.layoutViews={},this.render()},setTabs:function(a){this.tabs=this.layout.setView("#tabs",a),this.tabs.render()},setBreadcrumbs:function(a){this.breadcrumbs=this.layout.setView("#breadcrumbs",a),this.breadcrumbs.render()},clearBreadcrumbs:function(){this.breadcrumbs&&this.breadcrumbs.remove()},setView:function(a,b){this.layoutViews[a]=this.layout.setView(a,b,!1)},renderView:function(a){var b=this.layoutViews[a];return b?b.render():!1}}),b}),define("modules/documents/resources",["app","api"],function(a,b){var c=a.module();return c.Doc=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},url:function(b){return"app"===b?this.getDatabase().url("app")+"/"+this.safeID():"web-index"===b?this.getDatabase().url("app")+"/"+a.mixins.safeURLName(this.id):"apiurl"===b?window.location.origin+"/"+this.getDatabase().safeID()+"/"+this.safeID():a.host+"/"+this.getDatabase().safeID()+"/"+this.safeID()},initialize:function(a,b){this.collection&&this.collection.database?this.database=this.collection.database:b.database&&(this.database=b.database)},getDatabase:function(){return this.database?this.database:this.collection.database},validate:function(a){return this.id&&this.id!==a._id&&this.get("_rev")?"Cannot change a documents id.":void 0},docType:function(){return this.id.match(/^_design/)?"design doc":"doc"},isEditable:function(){return"reduction"!=this.docType()},isDdoc:function(){return"design doc"===this.docType()},hasViews:function(){if(!this.isDdoc())return!1;var a=this.get("doc");if(a)return a&&a.views&&_.keys(a.views).length>0;var b=this.get("views");return b&&_.keys(b).length>0},hasAttachments:function(){return!!this.get("_attachments")},getDdocView:function(a){if(!this.isDdoc()||!this.hasViews())return!1;var b=this.get("doc");return b?b.views[a]:this.get("views")[a]},setDdocView:function(a,b,c){if(!this.isDdoc())return!1;var d=this.get("views");return d[a]=c?{map:b,reduce:c}:{map:b},this.set({views:d}),!0},removeDdocView:function(a){if(!this.isDdoc())return!1;var b=this.get("views");delete b[a],this.set({views:b})},dDocModel:function(){if(!this.isDdoc())return!1;var a=this.get("doc");return a?new c.Doc(a,{database:this.database}):this},viewHasReduce:function(a){var b=this.getDdocView(a);return b&&b.reduce},safeID:function(){if(this.isDdoc()){var b=this.id.replace(/^_design\//,"");return"_design/"+a.mixins.safeURLName(b)}return a.mixins.safeURLName(this.id)},destroy:function(){var a=this.url()+"?rev="+this.get("_rev");return $.ajax({url:a,dataType:"json",type:"DELETE"})},parse:function(a){return a.rev&&(a._rev=a.rev,delete a.rev),a.id&&("undefined"==typeof this.id&&(a._id=a.id),delete a.id),a.ok&&delete a.ok,a},prettyJSON:function(){var a=this.get("doc")?this.get("doc"):this;return JSON.stringify(a,null,"  ")},copy:function(a){return $.ajax({type:"COPY",url:"/"+this.database.safeID()+"/"+this.safeID(),headers:{Destination:a}})},isNewDoc:function(){return this.get("_rev")?!1:!0}}),c.DdocInfo=Backbone.Model.extend({idAttribute:"_id",documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database},url:function(b){return"app"===b?this.database.url("app")+"/"+this.safeID()+"/_info":"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/"+this.safeID()+"/_info":a.host+"/"+this.database.safeID()+"/"+this.safeID()+"/_info"},safeID:function(){var b=this.id.replace(/^_design\//,"");return"_design/"+a.mixins.safeURLName(b)}}),c.ViewRow=Backbone.Model.extend({docType:function(){return this.id?this.id.match(/^_design/)?"design doc":"doc":"reduction"},documentation:function(){return"docs"},url:function(a){return this.isEditable()?this.collection.database.url(a)+"/"+this.safeID():!1},isEditable:function(){return"reduction"!=this.docType()},safeID:function(){return a.mixins.safeURLName(this.id)},prettyJSON:function(){return JSON.stringify(this,null,"  ")}}),c.NewDoc=c.Doc.extend({fetch:function(){var a=new b.UUID,c=this.deferred=$.Deferred(),d=this;return a.fetch().done(function(){d.set("_id",a.next()),c.resolve()}),c.promise()}}),c.AllDocs=Backbone.Collection.extend({model:c.Doc,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=b.params,this.skipFirstItem=!1,this.on("remove",this.decrementTotalRows,this)},url:function(b){var c="";return this.params&&(c="?"+$.param(this.params)),"app"===b?"database/"+this.database.safeID()+"/_all_docs"+c:"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/_all_docs"+c:a.host+"/"+this.database.safeID()+"/_all_docs"+c},simple:function(){var a=this.map(function(a){return{_id:a.id,_rev:a.get("_rev")}});return new c.AllDocs(a,{database:this.database,params:this.params})},urlNextPage:function(a,b){if(!b){var c=this.last();b=c?c.id:""}return this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a+1,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},totalRows:function(){return this.viewMeta.total_rows||"unknown"},decrementTotalRows:function(){this.viewMeta.total_rows&&(this.viewMeta.total_rows=this.viewMeta.total_rows-1,this.trigger("totalRows:decrement"))},updateSeq:function(){return this.viewMeta.update_seq||!1},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},parse:function(a){var b=a.rows;return this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},this.skipFirstItem&&(b=b.splice(1)),_.map(b,function(a){return{_id:a.id,_rev:a.value.rev,value:a.value,key:a.key,doc:a.doc||void 0}})}}),c.IndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view",this.view=b.view,this.design=b.design.replace("_design/",""),this.skipFirstItem=!1},url:function(b){var c="";this.params&&(c="?"+$.param(this.params));var d=a.host;"app"===b?d="database":"apiurl"===b&&(d=window.location.origin);var e=a.mixins.safeURLName(this.design),f=a.mixins.safeURLName(this.view),g=[d,this.database.safeID(),"_design",e,this.idxType,f];return g.join("/")+c},urlNextPage:function(a,b){return b||(b=this.last().id),this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"',this.params.limit=a,this.url("app")},urlPreviousPage:function(a,b){return this.params.limit=a,b?(this.params.startkey_docid='"'+b+'"',this.params.startkey='"'+b+'"'):(delete this.params.startkey,delete this.params.startkey_docid),this.url("app")},recordStart:function(){return 0===this.viewMeta.offset?1:this.skipFirstItem?this.viewMeta.offset+2:this.viewMeta.offset+1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.IndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design})},parse:function(a){var b=a.rows;return this.endTime=(new Date).getTime(),this.requestDuration=this.endTime-this.startTime,this.skipFirstItem&&(b=b.splice(1)),this.viewMeta={total_rows:a.total_rows,offset:a.offset,update_seq:a.update_seq},_.map(b,function(a){return{value:a.value,key:a.key,doc:a.doc,id:a.id}})},buildAllDocs:function(){this.fetch()},fetch:function(){return this.startTime=(new Date).getTime(),Backbone.Collection.prototype.fetch.call(this)},allDocs:function(){return this.models},requestDurationInString:function(){var a,b,c,d,e,f=this.requestDuration;for(b=Math.floor(f/1e3),c=Math.floor(b/60),b=(b%60).toString(),b.length<2&&(b="0"+b),d=Math.floor(c/60).toString(),d.length<2&&(d="0"+d),c=(c%60).toString(),c.length<2&&(c="0"+c),e=d+":"+c+":"+b,a=(f%1e3).toString();a.length<3;)a="0"+a;return e+="."+a}}),c.PouchIndexCollection=Backbone.Collection.extend({model:c.ViewRow,documentation:function(){return"docs"},initialize:function(a,b){this.database=b.database,this.rows=b.rows,this.view=b.view,this.design=b.design.replace("_design/",""),this.params=_.extend({limit:20,reduce:!1},b.params),this.idxType="_view"},url:function(){return""},simple:function(){var a=this.map(function(a){return{_id:a.id,key:a.get("key"),value:a.get("value")}});return new c.PouchIndexCollection(a,{database:this.database,params:this.params,view:this.view,design:this.design,rows:this.rows})},fetch:function(){var a=b.Deferred();return this.reset(this.rows,{silent:!0}),this.viewMeta={total_rows:this.rows.length,offset:0,update_seq:!1},a.resolve(),a},recordStart:function(){return 1},totalRows:function(){return this.viewMeta.total_rows||"unknown"},updateSeq:function(){return this.viewMeta.update_seq||!1},buildAllDocs:function(){this.fetch()},allDocs:function(){return this.models}}),c}),define("modules/databases/resources",["app","api","modules/documents/resources"],function(a,b,c){var d=b.module();return d.DocLimit=20,d.Model=Backbone.Model.extend({initialize:function(){this.status=new d.Status({database:this})},documentation:function(){return"all_dbs"},buildAllDocs:function(a){return this.allDocs=new c.AllDocs(null,{database:this,params:a}),this.allDocs},isNew:function(){return!1},url:function(b){return"index"===b?"/database/"+this.safeID()+"/_all_docs":"web-index"===b?"#/database/"+this.safeID()+"/_all_docs?limit="+d.DocLimit:"apiurl"===b?window.location.origin+"/database/"+this.safeID()+"/_all_docs":"changes"===b?"/database/"+this.safeID()+"/_changes?descending=true&limit=100&include_docs=true":"changes-apiurl"===b?window.location.origin+"/database/"+this.safeID()+"/_changes?descending=true&limit=100&include_docs=true":"app"===b?"/database/"+this.safeID():a.host+"/"+this.safeID()},safeName:function(){return a.mixins.safeURLName(this.get("name"))},safeID:function(){return a.mixins.safeURLName(this.id)},buildChanges:function(a){return this.changes=new d.Changes({database:this,params:a}),this.changes}}),d.Changes=Backbone.Collection.extend({initialize:function(a){this.database=a.database,this.params=a.params},documentation:function(){return"changes"},url:function(b){var c="";return this.params&&(c="?"+$.param(this.params)),"apiurl"===b?window.location.origin+"/"+this.database.safeID()+"/_changes"+c:a.host+"/"+this.database.safeID()+"/_changes"+c},parse:function(a){return this.last_seq=a.last_seq,a.results}}),d.Status=Backbone.Model.extend({url:function(){return a.host+"/"+this.database.safeID()},initialize:function(a){this.database=a.database},numDocs:function(){return this.get("doc_count")},updateSeq:function(a){var b=this.get("update_seq");return a||"number"==typeof b?b:b?b.split("-")[0]:0},humanSize:function(){var a=-1,b=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"],c=this.dataSize();if(!c)return 0;do c/=1024,a++;while(c>1024);return Math.max(c,.1).toFixed(1)+b[a]},diskSize:function(){return this.get("disk_size")},dataSize:function(){return this.get("other")?this.get("other").data_size:0}}),d.List=Backbone.Collection.extend({model:d.Model,documentation:function(){return"all_dbs"},url:function(b){return"apiurl"===b?window.location.origin+"/_all_dbs":a.host+"/_all_dbs"},parse:function(b){return _.map(b,function(b){return{id:a.mixins.safeURLName(b),name:b}})}}),d}),function(){function a(a){var b=function(a,b){return e("",a,b)},f=c;a&&(c[a]||(c[a]={}),f=c[a]),f.define&&f.define.packaged||(d.original=f.define,f.define=d,f.define.packaged=!0),f.require&&f.require.packaged||(e.original=f.require,f.require=b,f.require.packaged=!0)}var b="",c=function(){return this
+}();if(b||"undefined"==typeof requirejs){var d=function(a,b,c){return"string"!=typeof a?(d.original?d.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(c=b),d.modules||(d.modules={},d.payloads={}),d.payloads[a]=c,d.modules[a]=null,void 0)},e=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var d=[],f=0,h=b.length;h>f;++f){var i=g(a,b[f]);if(!i&&e.original)return e.original.apply(window,arguments);d.push(i)}c&&c.apply(null,d)}else{if("string"==typeof b){var j=g(a,b);return!j&&e.original?e.original.apply(window,arguments):(c&&c(),j)}if(e.original)return e.original.apply(window,arguments)}},f=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return f(a,c[0])+"!"+f(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&e!=b;){var e=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},g=function(a,b){b=f(a,b);var c=d.modules[b];if(!c){if(c=d.payloads[b],"function"==typeof c){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return e(b,a,c)},j=c(i,g,h);g=j||h.exports,d.modules[b]=g,delete d.payloads[b]}c=d.modules[b]=g||c}return c};a(b)}}(),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a){a("./regexp"),a("./es5-shim")}),define("ace/lib/regexp",["require","exports","module"],function(){function a(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function b(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}var c={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},d=void 0===c.exec.call(/()??/,"")[1],e=function(){var a=/^/g;return c.test.call(a,""),!a.lastIndex}();e&&d||(RegExp.prototype.exec=function(f){var g,h,i=c.exec.apply(this,arguments);if("string"==typeof f&&i){if(!d&&i.length>1&&b(i,"")>-1&&(h=RegExp(this.source,c.replace.call(a(this),"g","")),c.replace.call(f.slice(i.index),h,function(){for(var a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var j=1;j<i.length;j++)g=this._xregexp.captureNames[j-1],g&&(i[g]=i[j]);!e&&this.global&&!i[0].length&&this.lastIndex>i.index&&this.lastIndex--}return i},e||(RegExp.prototype.test=function(a){var b=c.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function a(){}function b(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function c(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if("function"!=typeof c)throw new TypeError("Function.prototype.bind called on incompatible "+c);var d=l.call(arguments,1),e=function(){if(this instanceof e){var a=c.apply(this,d.concat(l.call(arguments)));return Object(a)===a?a:this}return c.apply(b,d.concat(l.call(arguments)))};return c.prototype&&(a.prototype=c.prototype,e.prototype=new a,a.prototype=null),e});var d,e,f,g,h,i=Function.prototype.call,j=Array.prototype,k=Object.prototype,l=j.slice,m=i.bind(k.toString),n=i.bind(k.hasOwnProperty);if((h=n(k,"__defineGetter__"))&&(d=i.bind(k.__defineGetter__),e=i.bind(k.__defineSetter__),f=i.bind(k.__lookupGetter__),g=i.bind(k.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var b,c=[];return c.splice.apply(c,a(20)),c.splice.apply(c,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length,b+1==c.length?!0:void 0}()){var o=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?o.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(l.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=l.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),h=a+g,i=h+f-g,j=c-h,k=c-g;if(h>i)for(var m=0;j>m;++m)this[i+m]=this[h+m];else if(i>h)for(m=j;m--;)this[i+m]=this[h+m];if(f&&a===k)this.length=k,this.push.apply(this,e);else for(this.length=k+f,m=0;f>m;++m)this[a+m]=e[m]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==m(a)});var p=Object("a"),q="a"!=p[0]||!(0 in p);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError;for(;++e<f;)e in c&&a.call(d,c[e],e,b)}),Array.prototype.map||(Array.prototype.map=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=H(this),d=q&&"[object String]"==m(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=H(this),c=q&&"[object String]"==m(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=m(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=0;for(arguments.length>1&&(e=c(arguments[1])),e=e>=0?e:Math.max(0,d+e);d>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=q&&"[object String]"==m(this)?this.split(""):H(this),d=b.length>>>0;if(!d)return-1;var e=d-1;for(arguments.length>1&&(e=Math.min(e,c(arguments[1]))),e=e>=0?e:d-Math.abs(e);e>=0;e--)if(e in b&&a===b[e])return e;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:k)}),!Object.getOwnPropertyDescriptor){var r="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(r+a);if(n(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},h){var i=a.__proto__;a.__proto__=k;var d=f(a,b),e=g(a,b);if(a.__proto__=i,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var s;s=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=s();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var t=b({}),u="undefined"==typeof document||b(document.createElement("div"));if(!t||!u)var v=Object.defineProperty}if(!Object.defineProperty||v){var w="Property description must be an object: ",x="Object.defineProperty called on non-object: ",y="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(x+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(w+c);if(v)try{return v.call(Object,a,b,c)}catch(i){}if(n(c,"value"))if(h&&(f(a,b)||g(a,b))){var j=a.__proto__;a.__proto__=k,delete a[b],a[b]=c.value,a.__proto__=j}else a[b]=c.value;else{if(!h)throw new TypeError(y);n(c,"get")&&d(a,b,c.get),n(c,"set")&&e(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)n(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(z){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";n(a,b);)b+="?";a[b]=!0;var c=n(a,b);return delete a[b],c}),!Object.keys){var A=!0,B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=B.length;for(var D in{toString:null})A=!1;Object.keys=function I(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var I=[];for(var b in a)n(a,b)&&I.push(b);if(A)for(var c=0,d=C;d>c;c++){var e=B[c];n(a,e)&&I.push(e)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var E="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||E.trim()){E="["+E+"]";var F=new RegExp("^"+E+E+"*"),G=new RegExp(E+E+"*$");String.prototype.trim=function(){return String(this).replace(F,"").replace(G,"")}}var H=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),define("ace/lib/dom",["require","exports","module"],function(a,b){if("undefined"!=typeof document){var c="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||c,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c,d=0;if(b=b||document,b.createStyleSheet&&(c=b.styleSheets)){for(;d<c.length;)if(c[d++].owningElement.id===a)return!0}else if(c=b.getElementsByTagName("style"))for(;d<c.length;)if(c[d++].id===a)return!0;return!1},b.importCssString=function(a,d,e){if(e=e||document,d&&b.hasCssString(d,e))return null;var f;e.createStyleSheet?(f=e.createStyleSheet(),f.cssText=a,d&&(f.owningElement.id=d)):(f=e.createElementNS?e.createElementNS(c,"style"):e.createElement("style"),f.appendChild(e.createTextNode(a)),d&&(f.id=d),b.getDocumentHead(e).appendChild(f))},b.importCssStylsheet=function(a,c){if(c.createStyleSheet)c.createStyleSheet(a);else{var d=b.createElement("link");d.rel="stylesheet",d.href=a,b.getDocumentHead(c).appendChild(d)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"),10)+parseInt(b.computedStyle(a,"paddingRight"),10)+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"),10)+parseInt(b.computedStyle(a,"paddingBottom"),10)+a.clientHeight},void 0!==window.pageYOffset?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),b.computedStyle=window.getComputedStyle?function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(a){var c=b.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var d=b.createElement("ace_outer"),e=d.style;e.position="absolute",e.left="-10000px",e.overflow="hidden",e.width="200px",e.minWidth="0px",e.height="150px",e.display="block",d.appendChild(c);var f=a.documentElement;f.appendChild(d);var g=c.offsetWidth;e.overflow="scroll";var h=c.offsetWidth;return g==h&&(h=d.clientWidth),f.removeChild(d),g-h},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);return c.innerHTML=b,a.parentNode.replaceChild(c,a),c},"textContent"in document.documentElement?(b.setInnerText=function(a,b){a.textContent=b},b.getInnerText=function(a){return a.textContent}):(b.setInnerText=function(a,b){a.innerText=b},b.getInnerText=function(a){return a.innerText}),b.getParentWindow=function(a){return a.defaultView||a.parentWindow}}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(a,b){function c(a,b,c){var h=0;if(h=!e.isOpera||"KeyboardEvent"in window||!e.isMac?0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0):0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0),!e.isMac&&f){if((f[91]||f[92])&&(h|=8),f.altGr){if(3==(3&h))return;f.altGr=0}if(18===c||17===c){var i=b.location||b.keyLocation;if(17===c&&1===i)g=b.timeStamp;else if(18===c&&3===h&&2===i){var j=-g;g=b.timeStamp,j+=g,3>j&&(f.altGr=!0)}}}if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":h=2;break;case"Shift":h=4;break;case"Ctrl":h=1;break;default:h=8}c=0}return 8&h&&(91===c||93===c)&&(c=0),h||13!==c||!b.location&&3!==b.keyLocation||(a(b,h,-c),!b.defaultPrevented)?h||c in d.FUNCTION_KEYS||c in d.PRINTABLE_KEYS?a(b,h,c):!1:void 0}{var d=a("./keys"),e=a("./useragent");a("./dom")}b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c),void 0)},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||a.ctrlKey&&e.isMac?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0)},b.addMouseWheelListener=function(a,c){if("onmousewheel"in a){var d=8;b.addListener(a,"mousewheel",function(a){void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/d,a.wheelY=-a.wheelDeltaY/d):(a.wheelX=0,a.wheelY=-a.wheelDelta/d),c(a)})}else"onwheel"in a?b.addListener(a,"wheel",function(a){a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0),c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,f){var g,h,i,j=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!=b.getButton(a)?j=0:a.detail>1?(j++,j>4&&(j=1)):j=1,e.isIE){var c=Math.abs(a.clientX-g)>5||Math.abs(a.clientY-h)>5;c&&(j=1),1==j&&(g=a.clientX,h=a.clientY)}if(d[f]("mousedown",a),j>4)j=0;else if(j>1)return d[f](k[j],a)}),e.isOldIE&&b.addListener(a,"dblclick",function(a){j=2,i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),d[f]("mousedown",a),d[f](k[j],a)})};var f=null,g=0;if(b.addCommandKeyListener=function(a,d){var g=b.addListener;if(e.isOldGecko||e.isOpera&&!("KeyboardEvent"in window)){var h=null;g(a,"keydown",function(a){h=a.keyCode}),g(a,"keypress",function(a){return c(d,a,h)})}else{var i=null;g(a,"keydown",function(a){f[a.keyCode]=!0;var b=c(d,a,a.keyCode);return i=a.defaultPrevented,b}),g(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),g(a,"keyup",function(a){f[a.keyCode]=null}),f||(f=Object.create(null),g(window,"focus",function(){f=Object.create(null)}))}},window.postMessage&&!e.isOldIE){var h=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+h;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame=b.nextFrame?b.nextFrame.bind(window):function(a){setTimeout(a,17)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(a,b){var c=a("./oop"),d=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var b in a.FUNCTION_KEYS){var d=a.FUNCTION_KEYS[b].toLowerCase();a[d]=parseInt(b,10)}return c.mixin(a,a.MODIFIER_KEYS),c.mixin(a,a.PRINTABLE_KEYS),c.mixin(a,a.FUNCTION_KEYS),a.enter=a["return"],a.escape=a.esc,a.del=a["delete"],a[173]="-",a}();c.mixin(b,d),b.keyCodeToString=function(a){return(d[a]||String.fromCharCode(a)).toLowerCase()}}),define("ace/lib/oop",["require","exports","module"],function(a,b){b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c];return a},b.implement=function(a,c){b.mixin(a,c)}}),define("ace/lib/useragent",["require","exports","module"],function(a,b){if(b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS},"object"==typeof navigator){var c=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),d=navigator.userAgent;b.isWin="win"==c,b.isMac="mac"==c,b.isLinux="linux"==c,b.isIE=("Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=window.controllers&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,b.isAIR=d.indexOf("AdobeAIR")>=0,b.isIPad=d.indexOf("iPad")>=0,b.isTouchPad=d.indexOf("TouchPad")>=0}}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/lang"),f=a("./lib/useragent"),g=a("./keyboard/textinput").TextInput,h=a("./mouse/mouse_handler").MouseHandler,i=a("./mouse/fold_handler").FoldHandler,j=a("./keyboard/keybinding").KeyBinding,k=a("./edit_session").EditSession,l=a("./search").Search,m=a("./range").Range,n=a("./lib/event_emitter").EventEmitter,o=a("./commands/command_manager").CommandManager,p=a("./commands/default_commands").commands,q=a("./config"),r=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.commands=new o(f.isMac?"mac":"win",p),this.textInput=new g(a.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new j(this),this.$mouseHandler=new h(this),new i(this),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=e.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(a,b){b._$emitInputEvent.schedule(31)}),this.setSession(b||new k("")),q.resetOptions(this),q._emit("editor",this)};(function(){c.implement(this,n),this.$initOperationListeners=function(){function a(a){return a[a.length-1]}this.selections=[],this.commands.on("exec",function(b){this.startOperation(b);var c=b.command;if("fileJump"==c.group){var d=this.prevOp;d&&"fileJump"==d.command.group||(this.lastFileJumpPos=a(this.selections))}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(a){var b=a.command;return"fileJump"==b.group&&this.lastFileJumpPos&&!this.curOp.selectionChanged?(this.selection.fromJSON(this.lastFileJumpPos),void 0):(this.endOperation(a),void 0)}.bind(this),!0),this.$opResetTimer=e.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(a){if(this.curOp){if(!a||this.curOp.command)return;this.prevOp=this.curOp}a||(this.previousCommand=null,a={}),this.$opResetTimer.schedule(),this.curOp={command:a.command||{},args:a.args},this.selections.push(this.selection.toJSON())},this.endOperation=function(){this.curOp&&(this.prevOp=this.curOp,this.curOp=null)},this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=["backspace","del","insertstring"],d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a){if(a)if("string"==typeof a){this.$keybindingId=a;var b=this;q.loadModule(["keybinding",a],function(c){b.$keybindingId==a&&b.keyBinding.setKeyboardHandler(c&&c.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:a,oldSession:b})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b)var c=new m(b.row,b.column,b.row,b.column+1);else if(a.session.$mode.getMatching)var c=a.session.$mode.getMatching(a.session);c&&(a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text"))},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var b,c=a.data,d=c.range;b=d.start.row==d.end.row&&"insertLines"!=c.action&&"removeLines"!=c.action?d.end.row:1/0,this.renderer.updateLines(d.start.row,b),this._emit("change",a),this.$cursorChange()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var a,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(a=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&(a=!1)),b.$highlightLineMarker&&!a)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;
+else if(!b.$highlightLineMarker&&a){var c=new m(a.row,a.column,a.row,1/0);c.id=b.addMarker(c,"ace_active-line","screenLine"),b.$highlightLineMarker=c}else a&&(b.$highlightLineMarker.start.row=a.row,b.$highlightLineMarker.end.row=a.row,b.$highlightLineMarker.start.column=a.column,b._emit("changeBackMarker"))},this.onSelectionChange=function(){var a=this.session;if(a.$selectionMarker&&a.removeMarker(a.$selectionMarker),a.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var b=this.selection.getRange(),c=this.getSelectionStyle();a.$selectionMarker=a.addMarker(b,"ace_selection",c)}var d=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(d),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){this.$readOnly||(this._emit("paste",a),this.insert(a))},this.execCommand=function(a,b){this.commands.exec(a,this,b)},this.insert=function(a){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a!==e.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=e.text)}if("	"==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}}else{var f=this.getSelectionRange();d=this.session.remove(f),this.clearSelection()}if("\n"==a||"\r\n"==a){var g=b.getLine(d.row);if(d.column>g.search(/\S|$/)){var h=g.substr(d.column).search(/\S|$/);b.doc.removeInLine(d.row,d.column,d.column+h)}}this.clearSelection();{var i=d.column,j=b.getState(d.row),g=b.getLine(d.row),k=c.checkOutdent(j,g,a);b.insert(d,a)}if(e&&e.selection&&(2==e.selection.length?this.selection.setSelectionRange(new m(d.row,i+e.selection[0],d.row,i+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3]))),b.getDocument().isNewLine(a)){var l=c.getNextLineIndent(j,g.slice(0,d.column),b.getTabString());b.insert({row:d.row+1,column:0},l)}k&&c.autoOutdent(j,b,d.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);if(0==b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var c,d,e=this.session.getLine(a.row);b<e.length?(c=e.charAt(b)+e.charAt(b-1),d=new m(a.row,b-1,a.row,b+1)):(c=e.charAt(b-1)+e.charAt(b-2),d=new m(a.row,b-2,a.row,b)),this.session.replace(d,c)}}},this.toLowerCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toLowerCase()),this.selection.setSelectionRange(a)},this.toUpperCase=function(){var a=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),c=this.session.getTextRange(b);this.session.replace(b,c.toUpperCase()),this.selection.setSelectionRange(a)},this.indent=function(){var a=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last,"	"),void 0}if(b.start.column<b.end.column){var d=a.getTextRange(b);if(!/^\s+$/.test(d)){var c=this.$getSelectedRows();return a.indentRows(c.first,c.last,"	"),void 0}}var f=a.getLine(b.start.row),g=b.start,h=a.getTabSize(),i=a.documentToScreenColumn(g.row,g.column);if(this.session.getUseSoftTabs())var j=h-i%h,k=e.stringRepeat(" ",j);else{for(var j=i%h;" "==f[b.start.column]&&j;)b.start.column--,j--;this.selection.setSelectionRange(b),k="	"}return this.insert(k)},this.blockIndent=function(){var a=this.$getSelectedRows();this.session.indentRows(a.first,a.last,"	")},this.blockOutdent=function(){var a=this.session.getSelection();this.session.outdentRows(a.getRange())},this.sortLines=function(){var a=this.$getSelectedRows(),b=this.session,c=[];for(e=a.first;e<=a.last;e++)c.push(b.getLine(e));c.sort(function(a,b){return a.toLowerCase()<b.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0});for(var d=new m(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex<b;){var e=c.exec(d);if(e.index<=b&&e.index+e[0].length>=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new m(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new m(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var a,b=this.$getSelectedRows();a=0===b.first||b.last+1<this.session.getLength()?new m(b.first,0,b.last+1,0):new m(b.first-1,this.session.getLine(b.first-1).length,b.last,this.session.getLine(b.last).length),this.session.remove(a),this.clearSelection()},this.duplicateSelection=function(){var a=this.selection,b=this.session,c=a.getRange(),d=a.isBackwards();if(c.isEmpty()){var e=c.start.row;b.duplicateLines(e,e)}else{var f=d?c.start:c.end,g=b.insert(f,b.getTextRange(c),!1);c.start=f,c.end=g,a.setSelectionRange(c,d)}},this.moveLinesDown=function(){this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})},this.moveLinesUp=function(){this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})},this.moveText=function(a,b,c){return this.session.moveText(a,b,c)},this.copyLinesUp=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b),0})},this.copyLinesDown=function(){this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})},this.$moveLines=function(a){var b=this.selection;if(!b.inMultiSelectMode||this.inVirtualSelectionMode){var c=b.toOrientedRange(),d=this.$getSelectedRows(c),e=a.call(this,d.first,d.last);c.moveBy(e,0),b.fromOrientedRange(c)}else{var f=b.rangeList.ranges;b.rangeList.detach(this.session);for(var g=f.length;g--;){for(var h=g,d=f[g].collapseRows(),i=d.end.row,j=d.start.row;g--;){var d=f[g].collapseRows();if(!(j-d.end.row<=1))break;j=d.end.row}g++;for(var e=a.call(this,j,i);h>=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,1==b?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):0==b&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a){var b=this.getCursorPosition(),c=this.session.getBracketRange(b);if(!c){if(c=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:b.row,column:b.column-1}}),!c)return;var d=c.start;d.row==b.row&&Math.abs(d.column-b.column)<2&&(c=this.session.getBracketRange(d))}d=c&&c.cursor||d,d&&(a?c&&c.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(d.row,d.column):(this.clearSelection(),this.moveCursorTo(d.row,d.column)))},this.gotoLine=function(a,b,c){this.selection.clearSelection(),this.session.unfold({row:a-1,column:b||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowFullyVisible(a-1)||this.scrollToLine(a-1,!0,c)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateRight=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateFileStart=function(){var a=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(a)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session),d=0;return c?(this.$tryReplace(c,a)&&(d=1),null!==c&&(this.selection.setSelectionRange(c),this.renderer.scrollSelectionIntoView(c.start,c.end)),d):d},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session),d=0;if(!c.length)return d;this.$blockScrolling+=1;var e=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var f=c.length-1;f>=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,d){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&c.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,d),f):(b.backwards?e.start=e.end:e.end=e.start,this.selection.setRange(e),void 0)},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),0!=b&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(a){if(a!==!1){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&c.isFocused()){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.top<g.height&&f.top+b.top+g.lineHeight>window.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking("smooth"==a),b.isBlinking=!this.$readOnly&&"wide"!=a)}}).call(r.prototype),q.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.textInput.setReadOnly(a),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),b.Editor=r}),define("ace/lib/lang",["require","exports","module"],function(a,b){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var c=/^\s\s*/,d=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(c,"")},b.stringTrimRight=function(a){return a.replace(d,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)b[c]=a[c]&&"object"==typeof a[c]?this.copyObject(a[c]):a[c];return b},b.deepCopy=function(a){if("object"!=typeof a)return a;var b=a.constructor();for(var c in a)b[c]="object"==typeof a[c]?this.deepCopy(a[c]):a[c];return b},b.arrayToMap=function(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=1;return b},b.createMap=function(a){var b=Object.create(null);for(var c in a)b[c]=a[c];return b},b.arrayRemove=function(a,b){for(var c=0;c<=a.length;c++)b===a[c]&&a.splice(c,1)},b.escapeRegExp=function(a){return a.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},b.escapeHTML=function(a){return a.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},b.getMatchOffsets=function(a,b){var c=[];return a.replace(b,function(a){c.push({offset:arguments[arguments.length-2],length:a.length})}),c},b.deferredCall=function(a){var b=null,c=function(){b=null,a()},d=function(a){return d.cancel(),b=setTimeout(c,a||0),d};return d.schedule=d,d.call=function(){return this.cancel(),a(),d},d.cancel=function(){return clearTimeout(b),b=null,d},d},b.delayedCall=function(a,b){var c=null,d=function(){c=null,a()},e=function(a){c&&clearTimeout(c),c=setTimeout(d,a||b)};return e.delay=e,e.schedule=function(a){null==c&&(c=setTimeout(d,a||0))},e.call=function(){this.cancel(),a()},e.cancel=function(){c&&clearTimeout(c),c=null},e.isPending=function(){return c},e}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("../lib/dom"),f=a("../lib/lang"),g=d.isChrome<18,h=function(a,b){function h(a){if(!p){if(C)b=0,c=a?0:k.value.length-1;else var b=a?2:1,c=2;try{k.setSelectionRange(b,c)}catch(d){}}}function i(){p||(k.value=l,d.isWebKit&&v.schedule())}function j(){setTimeout(function(){q&&(k.style.cssText=q,q=""),null==b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=!0,b.renderer.$moveTextAreaToCursor())},0)}var k=e.createElement("textarea");k.className="ace_text-input",d.isTouchPad&&k.setAttribute("x-palm-disable-auto-cap",!0),k.wrap="off",k.autocorrect="off",k.autocapitalize="off",k.spellcheck=!1,k.style.opacity="0",a.insertBefore(k,a.firstChild);var l="",m=!1,n=!1,o=!1,p=!1,q="",r=!0;try{var s=document.activeElement===k}catch(t){}c.addListener(k,"blur",function(){b.onBlur(),s=!1}),c.addListener(k,"focus",function(){s=!0,b.onFocus(),h()}),this.focus=function(){k.focus()},this.blur=function(){k.blur()},this.isFocused=function(){return s};var u=f.delayedCall(function(){s&&h(r)}),v=f.delayedCall(function(){p||(k.value=l,s&&h())});d.isWebKit||b.addEventListener("changeSelection",function(){b.selection.isEmpty()!=r&&(r=!r,u.schedule())}),i(),s&&b.onFocus();var w=function(a){return 0===a.selectionStart&&a.selectionEnd===a.value.length};if(!k.setSelectionRange&&k.createTextRange&&(k.setSelectionRange=function(a,b){var c=this.createTextRange();c.collapse(!0),c.moveStart("character",a),c.moveEnd("character",b),c.select()},w=function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?b.text==a.value:!1}),d.isOldIE){var x=!1,y=function(a){if(!x){var b=k.value;if(!p&&b&&b!=l){if(a&&b==l[0])return z.schedule();E(b),x=!0,i(),x=!1}}},z=f.delayedCall(y);c.addListener(k,"propertychange",y);var A={13:1,27:1};c.addListener(k,"keyup",function(a){return!p||k.value&&!A[a.keyCode]||setTimeout(L,0),(k.value.charCodeAt(0)||0)<129?z.call():(p?K():J(),void 0)}),c.addListener(k,"keydown",function(){z.schedule(50)})}var B=function(){m?m=!1:n?n=!1:w(k)?(b.selectAll(),h()):C&&h(b.selection.isEmpty())},C=null;this.setInputHandler=function(a){C=a},this.getInputHandler=function(){return C};var D=!1,E=function(a){C&&(a=C(a),C=null),o?(h(),a&&b.onPaste(a),o=!1):a==l.charAt(0)?D&&b.execCommand("del",{source:"ace"}):(a.substring(0,2)==l?a=a.substr(2):a.charAt(0)==l.charAt(0)?a=a.substr(1):a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a.charAt(a.length-1)==l.charAt(0)&&(a=a.slice(0,-1)),a&&b.onTextInput(a)),D&&(D=!1)},F=function(){if(!p){var a=k.value;E(a),i()}},G=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCut(),c.preventDefault(a))}f||(m=!0,k.value=d,k.select(),setTimeout(function(){m=!1,i(),h(),b.onCut()}))},H=function(a){var d=b.getCopyText();if(!d)return c.preventDefault(a),void 0;var e=a.clipboardData||window.clipboardData;if(e&&!g){var f=e.setData("Text",d);f&&(b.onCopy(),c.preventDefault(a))}f||(n=!0,k.value=d,k.select(),setTimeout(function(){n=!1,i(),h(),b.onCopy()}))},I=function(a){var e=a.clipboardData||window.clipboardData;if(e){var f=e.getData("Text");f&&b.onPaste(f),d.isIE&&setTimeout(h),c.preventDefault(a)}else k.value="",o=!0};c.addCommandKeyListener(k,b.onCommandKey.bind(b)),c.addListener(k,"select",B),c.addListener(k,"input",F),c.addListener(k,"cut",G),c.addListener(k,"copy",H),c.addListener(k,"paste",I),"oncut"in k&&"oncopy"in k&&"onpaste"in k||c.addListener(a,"keydown",function(a){if((!d.isMac||a.metaKey)&&a.ctrlKey)switch(a.keyCode){case 67:H(a);break;case 86:I(a);break;case 88:G(a)}});var J=function(){p||(p={},b.onCompositionStart(),setTimeout(K,0),b.on("mousedown",L),b.selection.isEmpty()||(b.insert(""),b.session.markUndoGroup(),b.selection.clearSelection()),b.session.markUndoGroup())},K=function(){if(p){var a=k.value.replace(/\x01/g,"");if(p.lastValue!==a&&(b.onCompositionUpdate(a),p.lastValue&&b.undo(),p.lastValue=a,p.lastValue)){var c=b.selection.getRange();b.insert(p.lastValue),b.session.markUndoGroup(),p.range=b.selection.getRange(),b.selection.setRange(c),b.selection.clearSelection()}}},L=function(a){var c=p;p=!1;var d=setTimeout(function(){d=null;var a=k.value.replace(/\x01/g,"");p||(a==c.lastValue?i():!c.lastValue&&a&&(i(),E(a)))});C=function(a){return d&&clearTimeout(d),a=a.replace(/\x01/g,""),a==c.lastValue?"":(c.lastValue&&d&&b.undo(),a)},b.onCompositionEnd(),b.removeListener("mousedown",L),"compositionend"==a.type&&c.range&&b.selection.setRange(c.range)},M=f.delayedCall(K,50);if(c.addListener(k,"compositionstart",J),d.isGecko?c.addListener(k,"text",function(){M.schedule()}):(c.addListener(k,"keyup",function(){M.schedule()}),c.addListener(k,"keydown",function(){M.schedule()})),c.addListener(k,"compositionend",L),this.getElement=function(){return k},this.setReadOnly=function(a){k.readOnly=a},this.onContextMenu=function(a){D=!0,q||(q=k.style.cssText),k.style.cssText="z-index:100000;"+(d.isIE?"opacity:0.1;":""),h(b.selection.isEmpty()),b._emit("nativecontextmenu",{target:b,domEvent:a});var f=b.container.getBoundingClientRect(),g=e.computedStyle(b.container),i=f.top+(parseInt(g.borderTopWidth)||0),l=f.left+(parseInt(f.borderLeftWidth)||0),m=f.bottom-i-k.clientHeight,n=function(a){k.style.left=a.clientX-l-2+"px",k.style.top=Math.min(a.clientY-i-2,m)+"px"};n(a),"mousedown"==a.type&&(b.renderer.$keepTextAreaAtCursor&&(b.renderer.$keepTextAreaAtCursor=null),d.isWin&&c.capture(b.container,n,j))},this.onContextMenuClose=j,!d.isGecko||d.isMac){var N=function(a){b.textInput.onContextMenu(a),j()};c.addListener(b.renderer.scroller,"contextmenu",N),c.addListener(k,"contextmenu",N)}};b.TextInput=h}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=a("./default_handlers").DefaultHandlers,f=a("./default_gutter_handler").GutterHandler,g=a("./mouse_event").MouseEvent,h=a("./dragdrop_handler").DragdropHandler,i=a("../config"),j=function(a){this.editor=a,new e(this),new f(this),new h(this);var b=a.renderer.getMouseEventTarget();c.addListener(b,"click",this.onMouseEvent.bind(this,"click")),c.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove")),c.addMultiMouseDownListener(b,[300,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(c.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[300,300,250],this,"onMouseEvent"),c.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[300,300,250],this,"onMouseEvent")),c.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var d=a.renderer.$gutter;c.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),c.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick")),c.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),c.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),c.addListener(b,"mousedown",function(){a.focus()}),c.addListener(d,"mousedown",function(b){return a.focus(),c.preventDefault(b)})};(function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new g(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new g(b,this.editor))},this.onMouseWheel=function(a,b){var c=new g(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var e=this.editor.renderer;e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=null);var f=this,g=function(a){f.x=a.clientX,f.y=a.clientY,b&&b(a)
+},h=function(a){clearInterval(j),i(),f[f.state+"End"]&&f[f.state+"End"](a),f.$clickSelection=null,null==e.$keepTextAreaAtCursor&&(e.$keepTextAreaAtCursor=!0,e.$moveTextAreaToCursor()),f.isMousePressed=!1,f.onMouseEvent("mouseup",a)},i=function(){f[f.state]&&f[f.state]()};if(d.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){h(a)});c.capture(this.editor.container,g,h);var j=setInterval(i,20)}}).call(j.prototype),i.defineOptions(j.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0}}),b.MouseHandler=j}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){a.$clickSelection=null;var b=a.editor;b.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),b.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),b.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),b.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),b.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var c=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];c.forEach(function(b){a[b]=this[b]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}function e(a,b){if(a.start.row==a.end.row)var c=2*b.column-a.start.column-a.end.column;else if(a.start.row!=a.end.row-1||a.start.column||a.end.column)var c=2*b.row-a.start.row-a.end.row;else var c=b.column-4;return 0>c?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}var f=(a("../lib/dom"),a("../lib/event"),a("../lib/useragent"),0);(function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&(d.moveCursorToPosition(c),d.selection.clearSelection()),d.textInput.onContextMenu(a.domEvent),void 0}return!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(!b||this.$clickSelection||a.getShiftKey()||d.inMultiSelectMode?this.startSelect(c):b&&(this.mousedownEvent.time=(new Date).getTime(),this.startSelect(c)),this.captureMouse(a),a.preventDefault()):(this.mousedownEvent.time=(new Date).getTime(),this.setState("focusWait"),this.captureMouse(a),void 0)},this.startSelect=function(a){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var b=this.editor;setTimeout(function(){this.mousedownEvent.getShiftKey()?b.selection.selectToPosition(a):this.$clickSelection||(b.moveCursorToPosition(a),b.selection.clearSelection())}.bind(this),0),b.renderer.scroller.setCapture&&b.renderer.scroller.setCapture(),b.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var f=e(this.$clickSelection,c);c=f.cursor,a=f.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),f=c.selection[a](d.row,d.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(f.start),h=this.$clickSelection.comparePoint(f.end);if(-1==g&&0>=h)b=this.$clickSelection.end,(f.end.row!=d.row||f.end.column!=d.column)&&(d=f.start);else if(1==h&&g>=0)b=this.$clickSelection.start,(f.start.row!=d.row||f.start.column!=d.column)&&(d=f.end);else if(-1==g&&1==h)d=f.end,b=f.start;else{var i=e(this.$clickSelection,d);d=i.cursor,b=i.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=(new Date).getTime();(a>f||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);return e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.$clickSelection=e,this.setState("select"),void 0):(this.$clickSelection=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords"),void 0)},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines"),this.$clickSelection=c.selection.getLineRange(b.row)},this.onQuadClick=function(){var a=this.editor;a.selectAll(),this.$clickSelection=a.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getShiftKey()&&!a.getAccelKey()){var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}).call(c.prototype),b.DefaultHandlers=c}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(a,b){function c(a){function b(){l=d.createElement("div"),l.className="ace_gutter-tooltip",l.style.display="none",h.container.appendChild(l)}function c(){l||b();var a=k.getDocumentPosition().row,c=i.$annotations[a];if(!c)return f();var d=h.session.getLength();if(a==d){var e=h.renderer.pixelToScreenCoordinates(0,k.y).row,j=k.$pos;if(e>h.session.documentToScreenRow(j.row,j.column))return f()}m!=c&&(m=c.text.join("<br/>"),l.style.display="block",l.innerHTML=m,h.on("mousewheel",f),g(k))}function f(){j&&(j=clearTimeout(j)),m&&(l.style.display="none",m=null,h.removeEventListener("mousewheel",f))}function g(a){var b=h.renderer.$gutter.getBoundingClientRect();if(l.style.left=a.x+15+"px",a.y+3*h.renderer.lineHeight+15<b.bottom)l.style.bottom="",l.style.top=a.y+15+"px";else{l.style.top="";var c=window.innerHeight||document.documentElement.clientHeight;l.style.bottom=c-a.y+5+"px"}}var h=a.editor,i=h.renderer.$gutterLayer;a.editor.setDefaultHandler("guttermousedown",function(b){if(h.isFocused()&&0==b.getButton()){var c=i.getRegion(b);if("foldWidgets"!=c){var d=b.getDocumentPosition().row,e=h.session.selection;if(b.getShiftKey())e.selectTo(d,0);else{if(2==b.domEvent.detail)return h.selectAll(),b.preventDefault();a.$clickSelection=h.selection.getLineRange(d)}return a.setState("selectByLines"),a.captureMouse(b),b.preventDefault()}}});var j,k,l,m;a.editor.setDefaultHandler("guttermousemove",function(b){var e=b.domEvent.target||b.domEvent.srcElement;return d.hasCssClass(e,"ace_fold-widget")?f():(m&&g(b),k=b,j||(j=setTimeout(function(){j=null,k&&!a.isMousePressed?c():f()},50)),void 0)}),e.addListener(h.renderer.$gutter,"mouseout",function(){k=null,m&&!j&&(j=setTimeout(function(){j=null,f()},50))}),h.on("changeSession",f)}var d=a("../lib/dom"),e=a("../lib/event");b.GutterHandler=c}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){var c=a("../lib/event"),d=a("../lib/useragent"),e=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){c.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){c.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return c.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=d.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(e.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b){function c(a){function b(a,b){var c=(new Date).getTime(),e=!b||a.row!=b.row,f=!b||a.column!=b.column;if(!C||e||f)q.$blockScrolling+=1,q.moveCursorToPosition(a),q.$blockScrolling-=1,C=c,D={x:u,y:v};else{var g=d(D.x,D.y,u,v);g>j?C=null:c-C>=i&&(q.renderer.scrollCursorIntoView(),C=null)}}function c(a,b){var c=(new Date).getTime(),d=q.renderer.layerConfig.lineHeight,e=q.renderer.layerConfig.characterWidth,f=q.renderer.scroller.getBoundingClientRect(),g={x:{left:u-f.left,right:f.right-u},y:{top:v-f.top,bottom:f.bottom-v}},i=Math.min(g.x.left,g.x.right),j=Math.min(g.y.top,g.y.bottom),k={row:a.row,column:a.column};2>=i/e&&(k.column+=g.x.left<g.x.right?-3:2),1>=j/d&&(k.row+=g.y.top<g.y.bottom?-1:1);var l=a.row!=k.row,m=a.column!=k.column,n=!b||a.row!=b.row;l||m&&!n?B?c-B>=h&&q.renderer.scrollCursorIntoView(k):B=c:B=null}function k(){var a=y;y=q.renderer.screenToTextCoordinates(u,v),b(y,a),c(y,a)}function l(){x=q.selection.toOrientedRange(),t=q.session.addMarker(x,"ace_selection",q.getSelectionStyle()),q.clearSelection(),q.isFocused()&&q.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),w=setInterval(k,20),F=0,f.addListener(document,"mousemove",n)}function m(){clearInterval(w),q.session.removeMarker(t),t=null,q.$blockScrolling+=1,q.selection.fromOrientedRange(x),q.$blockScrolling-=1,q.isFocused()&&!A&&q.renderer.$cursorLayer.setBlinking(!q.getReadOnly()),x=null,F=0,B=null,C=null,f.removeListener(document,"mousemove",n)}function n(){null==G&&(G=setTimeout(function(){null!=G&&t&&m()},20))}function o(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function p(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=g.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var f="none";return d&&b.indexOf(e)>=0?f="copy":c.indexOf(e)>=0?f="move":b.indexOf(e)>=0&&(f="copy"),f}var q=a.editor,r=e.createElement("img");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g.isOpera&&(r.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(b){a[b]=this[b]},this),q.addEventListener("mousedown",this.onMouseDown.bind(a));var t,u,v,w,x,y,z,A,B,C,D,E=q.container,F=0;this.onDragStart=function(a){if(this.cancelDrag||!E.draggable){var b=this;return setTimeout(function(){b.startSelect(),b.captureMouse(a)},0),a.preventDefault()}x=q.getSelectionRange();var c=a.dataTransfer;c.effectAllowed=q.getReadOnly()?"copy":"copyMove",g.isOpera&&(q.container.appendChild(r),r._top=r.offsetTop),c.setDragImage&&c.setDragImage(r,0,0),g.isOpera&&q.container.removeChild(r),c.clearData(),c.setData("Text",q.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(a){if(E.draggable=!1,A=!1,this.setState(null),!q.getReadOnly()){var b=a.dataTransfer.dropEffect;z||"move"!=b||q.session.remove(q.getSelectionRange()),q.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||l(),F++,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragOver=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(t||(l(),F++),null!==G&&(G=null),u=a.clientX,v=a.clientY,a.dataTransfer.dropEffect=z=p(a),f.preventDefault(a)):void 0},this.onDragLeave=function(a){return F--,0>=F&&t?(m(),z=null,f.preventDefault(a)):void 0},this.onDrop=function(a){if(t){var b=a.dataTransfer;if(A)switch(z){case"move":x=x.contains(y.row,y.column)?{start:y,end:y}:q.moveText(x,y);break;case"copy":x=q.moveText(x,y,!0)}else{var c=b.getData("Text");x={start:y,end:q.session.insert(y,c)},q.focus(),z=null}return m(),f.preventDefault(a)}},f.addListener(E,"dragstart",this.onDragStart.bind(a)),f.addListener(E,"dragend",this.onDragEnd.bind(a)),f.addListener(E,"dragenter",this.onDragEnter.bind(a)),f.addListener(E,"dragover",this.onDragOver.bind(a)),f.addListener(E,"dragleave",this.onDragLeave.bind(a)),f.addListener(E,"drop",this.onDrop.bind(a));var G=null}function d(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var e=a("../lib/dom"),f=a("../lib/event"),g=a("../lib/useragent"),h=200,i=200,j=5;(function(){this.dragWait=function(){var a=(new Date).getTime()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor.container;a.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(){var a=this.editor.container;if(g.isIE&&"dragReady"==this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>3&&a.dragDrop()}if("dragWait"===this.state){var b=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);b>0&&(a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){this.mousedownEvent.time=(new Date).getTime();var f=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),b.getDragDelay()){if(g.isWebKit){self.cancelDrag=!0;var h=b.container;h.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(c.prototype),b.DragdropHandler=c}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(a,b,c){"no use strict";function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var e=a("./lib/lang"),f=a("./lib/oop"),g=a("./lib/net"),h=a("./lib/event_emitter").EventEmitter,i=function(){return this}(),j={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return j[a]},b.set=function(a,b){if(!j.hasOwnProperty(a))throw new Error("Unknown config key: "+a);j[a]=b},b.all=function(){return e.copyObject(j)},f.implement(b,h),b.moduleUrl=function(a,b){if(j.$moduleUrls[a])return j.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=j[b+"Path"];return null==g?g=j.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return j.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,f;Array.isArray(c)&&(f=c[0],c=c[1]);try{e=a(c)}catch(h){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var i=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?(g.loadScript(b.moduleUrl(c,f),i),void 0):i()}},b.init=function(){if(j.packaged=a.packaged||c.packaged||i.define&&define.packaged,!i.document)return"";for(var e={},f="",g=document.getElementsByTagName("script"),h=0;h<g.length;h++){var k=g[h],l=k.src||k.getAttribute("src");if(l){for(var m=k.attributes,n=0,o=m.length;o>n;n++){var p=m[n];0===p.name.indexOf("data-ace-")&&(e[d(p.name.replace(/^data-ace-/,""))]=p.value)}var q=l.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);q&&(f=q[1])}}f&&(e.base=e.base||f,e.packaged=!0),e.basePath=e.base,e.workerPath=e.workerPath||e.base,e.modePath=e.modePath||e.base,e.themePath=e.themePath||e.base,delete e.base;for(var r in e)"undefined"!=typeof e[r]&&b.set(r,e[r])};var k={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return"undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0;if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'),void 0)}},l={};b.defineOptions=function(a,b,c){return a.$options||(l[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),f.implement(a,k),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value)})},b.setDefaultValue=function(a,c,d){var e=l[a]||(l[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var d=c.getDocumentHead(),e=document.createElement("script");e.src=a,d.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}}}),define("ace/lib/event_emitter",["require","exports","module"],function(a,b){var c={},d=function(){this.propagationStopped=!0},e=function(){this.defaultPrevented=!0};c._emit=c._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],f=this._defaultHandlers[a];if(c.length||f){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=d),b.preventDefault||(b.preventDefault=e),c=c.slice();for(var g=0;g<c.length&&(c[g](b,this),!b.propagationStopped);g++);return f&&!b.defaultPrevented?f(b,this):void 0}},c._signal=function(a,b){var c=(this._eventRegistry||{})[a];if(c){c=c.slice();for(var d=0;d<c.length;d++)c[d](b,this)}},c.once=function(a,b){var c=this;b&&this.addEventListener(a,function d(){c.removeEventListener(a,d),b.apply(null,arguments)})},c.setDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c||(c=this._defaultHandlers={_disabled_:{}}),c[a]){var d=c[a],e=c._disabled_[a];e||(c._disabled_[a]=e=[]),e.push(d);var f=e.indexOf(b);-1!=f&&e.splice(f,1)}c[a]=b},c.removeDefaultHandler=function(a,b){var c=this._defaultHandlers;if(c){var d=c._disabled_[a];if(c[a]==b){{c[a]}d&&this.setDefaultHandler(a,d.pop())}else if(d){var e=d.indexOf(b);-1!=e&&d.splice(e,1)}}},c.on=c.addEventListener=function(a,b,c){this._eventRegistry=this._eventRegistry||{};var d=this._eventRegistry[a];return d||(d=this._eventRegistry[a]=[]),-1==d.indexOf(b)&&d[c?"unshift":"push"](b),b},c.off=c.removeListener=c.removeEventListener=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}},c.removeAllListeners=function(a){this._eventRegistry&&(this._eventRegistry[a]=[])},b.EventEmitter=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(a,b){function c(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){var d=g.start.row,h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=c}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b){var c=a("../lib/keys"),d=a("../lib/event"),e=function(a){this.$editor=a,this.$data={},this.$handlers=[],this.setDefaultHandler(a.commands)};(function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(a,b,c,e){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,e),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,e),g&&e&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&d.stopEvent(e),g))););return g},this.onCommandKey=function(a,b,d){var e=c.keyCodeToString(d);this.$callKeyboardHandlers(b,e,d,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}).call(e.prototype),b.KeyBinding=e}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./config"),f=a("./lib/event_emitter").EventEmitter,g=a("./selection").Selection,h=a("./mode/text").Mode,i=a("./range").Range,j=a("./document").Document,k=a("./background_tokenizer").BackgroundTokenizer,l=a("./search_highlight").SearchHighlight,m=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new j(a)),this.setDocument(a),this.selection=new g(this),e.resetOptions(this),this.setMode(b),e._emit("session",this)};(function(){function b(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}c.implement(this,f),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],this.$screenRowCache=[],void 0;var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(b),this._emit("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var c,d=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=d.length-1,e=this.getLine(a).length;else for(var f=0;f<d.length&&(e+=d[f].value.length,!(e>=b));f++);return(c=d[f])?(c.index=f,c.start=e-c.value.length,c):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=d.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?d.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(a,b){void 0===b&&(b="ace_breakpoint"),b?this.$breakpoints[a]=b:delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(a){delete this.$breakpoints[a],this._emit("changeBreakpoint",{})},this.addMarker=function(a,b,c,d){var e=this.$markerId++,f={range:a,type:c||"line",renderer:"function"==typeof c?c:null,clazz:b,inFront:!!d,id:e};return d?(this.$frontMarkers[e]=f,this._emit("changeFrontMarker")):(this.$backMarkers[e]=f,this._emit("changeBackMarker")),e},this.addDynamicMarker=function(a,b){if(a.update){var c=this.$markerId++;return a.id=c,a.inFront=!!b,b?(this.$frontMarkers[c]=a,this._emit("changeFrontMarker")):(this.$backMarkers[c]=a,this._emit("changeBackMarker")),a}},this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(b){var c=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete c[a],this._emit(b.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers},this.highlight=function(a){if(!this.$searchHighlight){var b=new l(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(b)}this.$searchHighlight.setRegexp(a)},this.highlightLines=function(a,b,c,d){"number"!=typeof b&&(c=b,b=a),c||(c="ace_step");var e=new i(a,0,b,1/0);return e.id=this.addMarker(e,c,"fullLine",d),e},this.setAnnotations=function(a){this.$annotations=a,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r?\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getWordRange=function(a,b){var c=this.getLine(a),d=!1;if(b>0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;g<c.length&&c.charAt(g).match(e);)g++;return new i(a,f,a,g)},this.getAWordRange=function(a,b){for(var c=this.getWordRange(a,b),d=this.getLine(c.end.row);d.charAt(c.end.column).match(/[ \t]/);)c.end.column+=1;return c},this.setNewLineMode=function(a){this.doc.setNewLineMode(a)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(a){this.setOption("useWorker",a)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(a){var b=a.data;this.bgTokenizer.start(b.first),this._emit("tokenizerUpdate",a)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(a,b){if(a&&"object"==typeof a){if(a.getTokenizer)return this.$onChangeMode(a);var c=a,d=c.path}else d=a||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new h),this.$modes[d]&&!c?(this.$onChangeMode(this.$modes[d]),b&&b(),void 0):(this.$modeId=d,e.loadModule(["mode",d],function(a){return this.$modeId!==d?b&&b():this.$modes[d]&&!c?this.$onChangeMode(this.$modes[d]):(a&&a.Mode&&(a=new a.Mode(c),c||(this.$modes[d]=a,a.$id=d),this.$onChangeMode(a),b&&b()),void 0)
+}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0),void 0)},this.$onChangeMode=function(a,b){if(b||(this.$modeId=a.$id),this.$mode!==a){this.$mode=a,this.$stopWorker(),this.$useWorker&&this.$startWorker();var c=a.getTokenizer();if(void 0!==c.addEventListener){var d=this.onReloadTokenizer.bind(this);c.addEventListener("update",d)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(c);else{this.bgTokenizer=new k(c);var e=this;this.bgTokenizer.addEventListener("update",function(a){e._emit("tokenizerUpdate",a)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=a.tokenRe,this.nonTokenRe=a.nonTokenRe,this.$options.wrapMethod.set.call(this,this.$wrapMethod),b||(this.$setFolding(a.foldingRules),this._emit("changeMode"),this.bgTokenizer.start(0))}},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if("undefined"==typeof Worker||a.noWorker)this.$worker=null;else try{this.$worker=this.$mode.createWorker(this)}catch(b){console.log("Could not load worker"),console.log(b),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(a){this.$scrollTop===a||isNaN(a)||(this.$scrollTop=a,this._signal("changeScrollTop",a))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(a){this.$scrollLeft===a||isNaN(a)||(this.$scrollLeft=a,this._signal("changeScrollLeft",a))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.screenWidth},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;d<a.length;d++){var e=a[d];"doc"==e.group&&(this.doc.applyDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!1,c))}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.setUndoSelect=function(a){this.$undoSelect=a},this.$getUndoSelection=function(a,b,c){function d(a){var c="insertText"===a.action||"insertLines"===a.action;return b?!c:c}var e,f,g=a[0],h=!1;d(g)?(e=i.fromPoints(g.range.start,g.range.end),h=!0):(e=i.fromPoints(g.range.start,g.range.start),h=!1);for(var j=1;j<a.length;j++)g=a[j],d(g)?(f=g.range.start,-1==e.compare(f.row,f.column)&&e.setStart(g.range.start),f=g.range.end,1==e.compare(f.row,f.column)&&e.setEnd(g.range.end),h=!0):(f=g.range.start,-1==e.compare(f.row,f.column)&&(e=i.fromPoints(g.range.start,g.range.start)),h=!1);if(null!=c){0==i.comparePoints(c.start,e.start)&&(c.start.column+=e.end.column-e.start.column,c.end.column+=e.end.column-e.start.column);var k=c.compareRange(e);1==k?e.setStart(c.start):-1==k&&e.setEnd(c.end)}return e},this.replace=function(a,b){return this.doc.replace(a,b)},this.moveText=function(a,b,c){var d=this.getTextRange(a),e=this.getFoldsInRange(a),f=i.fromPoints(b,b);if(!c){this.remove(a);var g=a.start.row-a.end.row,h=g?-a.end.column:a.start.column-a.end.column;h&&(f.start.row==a.end.row&&f.start.column>a.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var j=a.start,k=f.start,g=k.row-j.row,h=k.column-j.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==j.row&&(a.start.column+=h),a.end.row==j.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new i(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&"	"==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new i(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=[];for(var c=0;b>c;c++)this.$wrapData.push([]);this.$updateWrapData(0,b-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._emit("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b,c=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,b=a.data.lines?a.data.lines.length:f-e):b=f-e,this.$updating=!0,0!=b)if(-1!=d.indexOf("remove")){this[c?"$wrapData":"$rowLengthCache"].splice(e,b);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-b);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=h.row&&k.shiftRow(-b)}f=e}else{var n;if(c){n=[e,0];for(var o=0;b>o;o++)n.push([]);this.$wrapData.splice.apply(this.$wrapData,n)}else n=Array(b),n.unshift(e,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k.shiftRow(b),k.addRemoveChars(f,0,h.column-g.column)):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(b)),l=j.indexOf(k)+1}for(l;l<j.length;l++){var k=j[l];k.start.row>=e&&k.shiftRow(b)}}else{b=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),b=-b);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,b)}return c&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,c?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var c,d,e=this.doc.getAllLines(),f=this.getTabSize(),g=this.$wrapData,h=this.$wrapLimit,i=a;for(b=Math.min(b,e.length-1);b>=i;)d=this.getFoldLine(i,d),d?(c=[],d.walk(function(a,b,d,f){var g;if(null!=a){g=this.$getDisplayTokens(a,c.length),g[0]=m;for(var h=1;h<g.length;h++)g[h]=n}else g=this.$getDisplayTokens(e[b].substring(f,d),c.length);c=c.concat(g)}.bind(this),d.end.row,e[d.end.row].length+1),g[d.start.row]=this.$computeWrapSplits(c,h,f),i=d.end.row+1):(c=this.$getDisplayTokens(e[i]),g[i]=this.$computeWrapSplits(c,h,f),i++)};var g=1,j=2,m=3,n=4,o=9,p=10,q=11,r=12;this.$computeWrapSplits=function(a,b){function c(b){var c=a.slice(f,b),e=c.length;c.join("").replace(/12/g,function(){e-=1}).replace(/2/g,function(){e-=1}),g+=e,d.push(g),f=b}if(0==a.length)return[];for(var d=[],e=a.length,f=0,g=0,h=this.$wrapAsCode;e-f>b;){var i=f+b;if(a[i-1]>=p&&a[i]>=p)c(i);else if(a[i]!=m&&a[i]!=n){for(var j=Math.max(i-(h?10:b-(b>>2)),f-1);i>j&&a[i]<m;)i--;if(h){for(;i>j&&a[i]<m;)i--;for(;i>j&&a[i]==o;)i--}else for(;i>j&&a[i]<p;)i--;i>j?c(++i):(i=f+b,c(i))}else{for(i;i!=f-1&&a[i]!=m;i--);if(i>f){c(i);continue}for(i=f+b;i<a.length&&a[i]==n;i++);if(i==a.length)break;c(i)}}return d},this.$getDisplayTokens=function(a,c){var d,e=[];c=c||0;for(var f=0;f<a.length;f++){var h=a.charCodeAt(f);if(9==h){d=this.getScreenTabSize(e.length+c),e.push(q);for(var i=1;d>i;i++)e.push(r)}else 32==h?e.push(p):h>39&&48>h||h>57&&64>h?e.push(o):h>=4352&&b(h)?e.push(g,j):e.push(g)}return e},this.$getStringScreenWidth=function(a,c,d){if(0==c)return[0,0];null==c&&(c=1/0),d=d||0;var e,f;for(f=0;f<a.length&&(e=a.charCodeAt(f),d+=9==e?this.getScreenTabSize(d):e>=4352&&b(e)?2:1,!(d>c));f++);return[d,f]},this.getRowLength=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,d,e=0,f=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],e=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(e),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(e),!(g+h-1>=a||e>=m));)g+=h,e++,e>o&&(e=n.end.row+1,n=this.getNextFoldLine(e,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(e),this.$screenRowCache.push(g));if(n&&n.start.row<=e)c=this.getFoldDisplayLine(n),e=n.start.row;else{if(a>=g+h||e>m)return{row:m,column:this.getLine(m).length};c=this.getLine(e),n=null}if(this.$useWrapMode){var p=this.$wrapData[e];p&&(d=p[a-g],a>g&&p.length&&(f=p[a-g-1]||p[p.length-1],c=c.substring(f)))}return f+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&f>=d&&(f=d-1),n?n.idxToPosition(f):{row:e,column:f}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){for(var p=this.$wrapData[e],q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var c=this.$wrapData.length,d=0,e=0,b=this.$foldData[e++],f=b?b.start.row:1/0;c>d;)a+=this.$wrapData[d].length+1,d++,d>f&&(d=b.end.row+1,b=this.$foldData[e++],f=b?b.start.row:1/0);else{a=this.getLength();for(var g=this.$foldData,e=0;e<g.length;e++)b=g[e],a-=b.end.row-b.start.row}return a}}).call(m.prototype),a("./edit_session/folding").Folding.call(m.prototype),a("./edit_session/bracket_match").BracketMatch.call(m.prototype),e.defineOptions(m.prototype,"session",{wrap:{set:function(a){if(a&&"off"!=a?"free"==a?a=!0:"printMargin"==a?a=-1:"string"==typeof a&&(a=parseInt(a,10)||!1):a=!1,this.$wrap!=a){if(a){var b="number"==typeof a?a:null;this.setWrapLimitRange(b,b),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1);this.$wrap=a}},get:function(){return this.getUseWrapMode()?this.getWrapLimitRange().min||"free":"off"},handlesSet:!0},wrapMethod:{set:function(a){this.$wrapAsCode="auto"==a?"text"!=this.$mode.type:"text"!=a},initialValue:"auto"},firstLineNumber:{set:function(){this._emit("changeBreakpoint")},initialValue:1},useWorker:{set:function(a){this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(a){isNaN(a)||this.$tabSize===a||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=a,this._emit("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(){this._emit("changeOverwrite")},initialValue:!1},newLineMode:{set:function(a){this.doc.setNewLineMode(a)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0}}),b.EditSession=m}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(a,b){var c=a("./lib/oop"),d=a("./lib/lang"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.lead.on("change",function(a){b._emit("changeCursor"),b.$isEmpty||b._emit("changeSelection"),b.$keepDesiredColumnOnChange||a.old.column==a.value.column||(b.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){b.$isEmpty||b._emit("changeSelection")})};(function(){c.implement(this,e),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(a,b){this.anchor.setPosition(a,b),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(a){if(this.$isEmpty)return this.moveCursorTo(this.lead.row,this.lead.column+a),void 0;var b=this.getSelectionAnchor(),c=this.getSelectionLead(),d=this.isBackwards();d&&0===b.column||this.setSelectionAnchor(b.row,b.column+a),(d||0!==c.column)&&this.$moveSelection(function(){this.moveCursorTo(c.row,c.column+a)})},this.isBackwards=function(){var a=this.anchor,b=this.lead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?f.fromPoints(b,b):this.isBackwards()?f.fromPoints(b,a):f.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var c,d="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(d);return e?(d=e.start.row,c=e.end.row):c=d,b===!0?new f(d,0,c,this.session.getLine(c).length):new f(d,0,c+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(0==b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column-c,b.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),b=this.lead;this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column,b.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.lead.row,b=this.lead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b||this.session.$useEmacsStyleLineStart||(d.column+=f[0].length),this.moveCursorToPosition(d)},this.moveCursorLineEnd=function(){var a=this.lead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==b.column){var c=this.session.getLine(b.row);if(b.column==c.length){var d=c.search(/\s+$/);d>0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a,b=this.lead.row,c=this.lead.column,d=this.doc.getLine(b),e=d.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(b,c,1);return f?(this.moveCursorTo(f.end.row,f.end.column),void 0):((a=this.session.nonTokenRe.exec(e))&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=d.substring(c)),c>=d.length?(this.moveCursorTo(b,d.length),this.moveCursorRight(),b<this.doc.getLength()-1&&this.moveCursorWordRight(),void 0):((a=this.session.tokenRe.exec(e))&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0))},this.moveCursorLongWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column),void 0;var e=this.session.getFoldStringAt(b,c,-1);null==e&&(e=this.doc.getLine(b).substring(0,c));var f,g=d.stringReverse(e);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(f=this.session.nonTokenRe.exec(g))&&(c-=this.session.nonTokenRe.lastIndex,g=g.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=c?(this.moveCursorTo(b,0),this.moveCursorLeft(),b>0&&this.moveCursorWordLeft(),void 0):((f=this.session.tokenRe.exec(g))&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(b,c),void 0)},this.$shortWordEndIndex=function(a){var b,c,d=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))d=this.session.tokenRe.lastIndex;else{for(;(c=a[d])&&e.test(c);)d++;if(1>d)for(f.lastIndex=0;(c=a[d])&&!f.test(c);)if(f.lastIndex=0,d++,e.test(c)){if(d>2){d--;break}for(;(c=a[d])&&e.test(c);)d++;if(d>2)break}}return f.lastIndex=0,d},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var e=this.session.getLine(b).substring(0,c);if(0==c){do b--,e=this.doc.getLine(b);while(b>0&&/^\s*$/.test(e));c=e.length,/\s+$/.test(e)||(e="")}var f=d.stringReverse(e),g=this.$shortWordEndIndex(f);return this.moveCursorTo(b,c-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=f.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}).call(g.prototype),b.Selection=g}),define("ace/range",["require","exports","module"],function(a,b){var c=function(a,b){return a.row-b.row||a.column-b.column},d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)||this.isStart(a,b)?!1:!0:!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?this.isEnd(a,b)?!1:!0:!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?this.isStart(a,b)?!1:!0:!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?a<this.start.row?-1:a>this.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:b<this.start.column?-1:b>this.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.row<a)var c={row:a,column:0};if(this.start.row>b)var e={row:b+1,column:0};else if(this.start.row<a)var e={row:a,column:0};return d.fromPoints(e||this.start,c||this.end)},this.extend=function(a,b){var c=this.compare(a,b);if(0==c)return this;if(-1==c)var e={row:a,column:b};else var f={row:a,column:b};return d.fromPoints(e||this.start,f||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return d.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},this.toScreenRange=function(a){var b=a.documentToScreenPosition(this.start),c=a.documentToScreenPosition(this.end);return new d(b.row,b.column,c.row,c.column)},this.moveBy=function(a,b){this.start.row+=a,this.start.column+=b,this.end.row+=a,this.end.column+=b}}).call(d.prototype),d.fromPoints=function(a,b){return new d(a.row,a.column,b.row,b.column)},d.comparePoints=c,d.comparePoints=function(a,b){return a.row-b.row||a.column-b.column},b.Range=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b){var c=a("../tokenizer").Tokenizer,d=a("./text_highlight_rules").TextHighlightRules,e=a("./behaviour").Behaviour,f=a("../unicode"),g=a("../lib/lang"),h=a("../token_iterator").TokenIterator,i=a("../range").Range,j=function(){this.HighlightRules=d,this.$behaviour=new e};(function(){this.tokenRe=new RegExp("^["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new c(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function e(a){for(var b=c;d>=b;b++)a(f.getLine(b),b)}var f=b.doc,h=!0,i=!0,j=1/0,k=b.getTabSize(),l=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var m=this.lineCommentStart.map(g.escapeRegExp).join("|"),n=this.lineCommentStart[0];else var m=g.escapeRegExp(this.lineCommentStart),n=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),l=b.getUseSoftTabs();var o=function(a,b){var c=a.match(m);if(c){var d=c[1].length,e=c[0].length;s(a,d,e)||" "!=c[0][e-1]||e--,f.removeInLine(b,d,e)}},p=n+" ",q=function(a,b){(!h||/\S/.test(a))&&(s(a,j,j)?f.insertInLine({row:b,column:j},p):f.insertInLine({row:b,column:j},n))},r=function(a){return m.test(a)},s=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(d%k!=0)return!1;for(var d=0;" "==a.charAt(c++);)d++;return k>2?d%k!=k-1:d%k==0}}else{if(!this.blockComment)return!1;var n=this.blockComment.start,t=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+g.escapeRegExp(n)+")"),u=new RegExp("(?:"+g.escapeRegExp(t)+")\\s*$"),q=function(a,b){r(a,b)||(!h||/\S/.test(a))&&(f.insertInLine({row:b,column:a.length},t),f.insertInLine({row:b,column:j},n))
+},o=function(a,b){var c;(c=a.match(u))&&f.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(m))&&f.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(m.test(a))return!0;for(var d=b.getTokens(c),e=0;e<d.length;e++)if("comment"===d[e].type)return!0}}var v=1/0;e(function(a,b){var c=a.search(/\S/);-1!==c?(j>c&&(j=c),i&&!r(a,b)&&(i=!1)):v>a.length&&(v=a.length)}),1/0==j&&(j=v,h=!1,i=!1),l&&j%k!=0&&(j=Math.floor(j/k)*k),e(i?o:q)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f,g,j=new h(b,d.row,d.column),k=j.getCurrentToken(),l=(b.selection,b.selection.toOrientedRange());if(k&&/comment/.test(k.type)){for(var m,n;k&&/comment/.test(k.type);){var o=k.value.indexOf(e.start);if(-1!=o){var p=j.getCurrentTokenRow(),q=j.getCurrentTokenColumn()+o;m=new i(p,q,p,q+e.start.length);break}k=j.stepBackward()}for(var j=new h(b,d.row,d.column),k=j.getCurrentToken();k&&/comment/.test(k.type);){var o=k.value.indexOf(e.end);if(-1!=o){var p=j.getCurrentTokenRow(),q=j.getCurrentTokenColumn()+o;n=new i(p,q,p,q+e.end.length);break}k=j.stepForward()}n&&b.remove(n),m&&(b.remove(m),f=m.start.row,g=-e.start.length)}else g=e.start.length,f=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);l.start.row==f&&(l.start.column+=g),l.end.row==f&&(l.end.column+=g),b.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(a,b){return this.$getIndent(b)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;b<c.length;b++)!function(a){var d=c[b],e=a[d];a[c[b]]=function(){return this.$delegator(d,arguments,e)}}(this)},this.$delegator=function(a,b,c){var d=b[0];"string"!=typeof d&&(d=d[0]);for(var e=0;e<this.$embeds.length;e++)if(this.$modes[this.$embeds[e]]){var f=d.split(this.$embeds[e]);if(!f[0]&&f[1]){b[0]=f[1];var g=this.$modes[this.$embeds[e]];return g[a].apply(g,b)}}var h=c.apply(this,b);return c?h:void 0},this.transformAction=function(a,b){if(this.$behaviour){var c=this.$behaviour.getBehaviours();for(var d in c)if(c[d][b]){var e=c[d][b].apply(this,arguments);if(e)return e}}},this.getKeywords=function(a){if(!this.completionKeywords){var b=this.$tokenizer.rules,c=[];for(var d in b)for(var e=b[d],f=0,g=e.length;g>f;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(){var a=this.$keywordList||this.$createKeywordList();return a.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})}}).call(j.prototype),b.Mode=j}),define("ace/tokenizer",["require","exports","module"],function(a,b){var c=1e3,d=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i<c.length;i++){var j=c[i];if(j.defaultToken&&(f.defaultToken=j.defaultToken),j.caseInsensitive&&(g="gi"),null!=j.regex){j.regex instanceof RegExp&&(j.regex=j.regex.toString().slice(1,-1));var k=j.regex,l=new RegExp("(?:("+k+")|(.))").exec("a").length-2;if(Array.isArray(j.token))if(1==j.token.length||1==l)j.token=j.token[0];else{if(l-1!=j.token.length)throw new Error("number of classes and regexp groups in '"+j.token+"'\n'"+j.regex+"' doesn't match\n"+(l-1)+"!="+j.token.length);j.tokenArray=j.token,j.token=null,j.onMatch=this.$arrayTokens}else"function"!=typeof j.token||j.onMatch||(j.onMatch=l>1?this.$applyToken:j.token);l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null),j.__proto__=null}}h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};(function(){this.$setMaxTokenCount=function(a){c=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var d=b.slice(0);b=d[0]}else var d=[];var e=b||"start",f=this.states[e],g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l={type:null,value:""};i=h.exec(a);){var m=g.defaultToken,n=null,o=i[0],p=h.lastIndex;if(p-o.length>k){var q=a.substring(k,p-o.length);l.type==m?l.value+=q:(l.type&&j.push(l),l={type:m,value:q})}for(var r=0;r<i.length-2;r++)if(void 0!==i[r+1]){n=f[g[r]],m=n.onMatch?n.onMatch(o,e,d):n.token,n.next&&(e="string"==typeof n.next?n.next:n.next(e,d),f=this.states[e],f||(window.console&&console.error&&console.error(e,"doesn't exist"),e="start",f=this.states[e]),g=this.matchMappings[e],k=p,h=this.regExps[e],h.lastIndex=p);break}if(o)if("string"==typeof m)n&&n.merge===!1||l.type!==m?(l.type&&j.push(l),l={type:m,value:o}):l.value+=o;else if(m){l.type&&j.push(l),l={type:null,value:""};for(var r=0;r<m.length;r++)j.push(m[r])}if(k==a.length)break;if(k=p,j.length>c){for(;k<a.length;)l.type&&j.push(l),l={value:a.substring(k,k+=2e3),type:"overflow"};e="start",d=[];break}}return l.type&&j.push(l),{tokens:j,state:d.length?d:e}}}).call(d.prototype),b.Tokenizer=d}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b){var c=a("../lib/lang"),d=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e<d.length;e++){var f=d[e];f.next&&("string"!=typeof f.next?f.nextState&&0!==f.nextState.indexOf(b)&&(f.nextState=b+f.nextState):0!==f.next.indexOf(b)&&(f.next=b+f.next))}this.$rules[b+c]=d}else for(var c in a)this.$rules[c]=a[c]},this.getRules=function(){return this.$rules},this.embedRules=function(a,b,d,e,f){var g=(new a).getRules();if(e)for(var h=0;h<e.length;h++)e[h]=b+e[h];else{e=[];for(var i in g)e.push(b+i)}if(this.addRules(g,b),d)for(var j=Array.prototype[f?"push":"unshift"],h=0;h<e.length;h++)j.apply(this.$rules[e[h]],c.deepCopy(d));this.$embeds||(this.$embeds=[]),this.$embeds.push(b)},this.getEmbeds=function(){return this.$embeds};var a=function(a,b){return"start"!=a&&b.unshift(this.nextState,a),this.nextState},b=function(a,b){return b[0]!==a?"start":(b.shift(),b.shift())};this.normalizeRules=function(){function c(f){var g=e[f];g.processed=!0;for(var h=0;h<g.length;h++){var i=g[h];!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var j=i.next||i.push;if(j&&Array.isArray(j)){var k=i.stateName;k||(k=i.token,"string"!=typeof k&&(k=k[0]||""),e[k]&&(k+=d++)),e[k]=j,i.next=k,c(k)}else"pop"==j&&(i.next=b);if(i.push&&(i.nextState=i.next||i.push,i.next=a,delete i.push),i.rules)for(var l in i.rules)e[l]?e[l].push&&e[l].push.apply(e[l],i.rules[l]):e[l]=i.rules[l];if(i.include||"string"==typeof i)var m=i.include||i,n=e[m];else Array.isArray(i)&&(n=i);if(n){var o=[h,1].concat(n);i.noEscape&&(o=o.filter(function(a){return!a.next})),g.splice.apply(g,o),h--,n=null}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}var d=0,e=this.$rules;Object.keys(e).forEach(c,this)},this.createKeywordMapper=function(a,b,c,d){var e=Object.create(null);return Object.keys(a).forEach(function(b){var f=a[b];c&&(f=f.toLowerCase());for(var g=f.split(d||"|"),h=g.length;h--;)e[g[h]]=b}),Object.getPrototypeOf(e)&&(e.__proto__=null),this.$keywordList=Object.keys(e),a=null,c?function(a){return e[a.toLowerCase()]||b}:function(a){return e[a]||b}},this.getKeywords=function(){return this.$keywords}}).call(d.prototype),b.TextHighlightRules=d}),define("ace/mode/behaviour",["require","exports","module"],function(a,b){var c=function(){this.$behaviours={}};(function(){this.add=function(a,b,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[a]:this.$behaviours[a]={}}this.$behaviours[a][b]=c},this.addBehaviours=function(a){for(var b in a)for(var c in a[b])this.add(b,c,a[b][c])},this.remove=function(a){this.$behaviours&&this.$behaviours[a]&&delete this.$behaviours[a]},this.inherit=function(a,b){if("function"==typeof a)var c=(new a).getBehaviours(b);else var c=a.getBehaviours(b);this.addBehaviours(c)},this.getBehaviours=function(a){if(a){for(var b={},c=0;c<a.length;c++)this.$behaviours[a[c]]&&(b[a[c]]=this.$behaviours[a[c]]);return b}return this.$behaviours}}).call(c.prototype),b.Behaviour=c}),define("ace/unicode",["require","exports","module"],function(a,b){function c(a){var c=/\w{4}/g;for(var d in a)b.packages[d]=a[d].replace(c,"\\u$&")}b.packages={},c({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})
+}),define("ace/token_iterator",["require","exports","module"],function(a,b){var c=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b);var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}).call(c.prototype),b.TokenIterator=c}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=a("./range").Range,f=a("./anchor").Anchor,g=function(a){this.$lines=[],0==a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};(function(){c.implement(this,d),this.setValue=function(a){var b=this.getLength();this.remove(new e(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new f(this,a,b)},this.$split=0=="aaa".split(/a/).length?function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};if(b.length>65535){var c=this._insertLines(a,b.slice(65535));b=b.slice(0,65535)}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var f=new e(a,0,a+b.length,0),g={action:"insertLines",range:f,lines:b};return this._emit("change",{data:g}),c||f.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:e.fromPoints(a,c),text:this.getNewLineCharacter()};return this._emit("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},f={action:"insertText",range:e.fromPoints(a,d),text:b};return this._emit("change",{data:f}),d},this.remove=function(a){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,f=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),f>=d&&this._removeLines(d,f),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new e(a,b,a,c),f=this.getLine(a),g=f.substring(b,c),h=f.substring(0,b)+f.substring(c,f.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._emit("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new e(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new e(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),f={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._emit("change",{data:f}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new e(a,b.length,a+1,0),f=b+c;this.$lines.splice(a,2,f);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._emit("change",{data:g})},this.replace=function(a,b){if(!a instanceof e&&(a=e.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this.insertLines(d.start.row,c.lines):"insertText"==c.action?this.insert(d.start,c.text):"removeLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"removeText"==c.action&&this.remove(d)}},this.revertDeltas=function(a){for(var b=a.length-1;b>=0;b--){var c=a[b],d=e.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}).call(g.prototype),b.Document=g}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};(function(){c.implement(this,d),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if((c.start.row!=c.end.row||c.start.row==this.row)&&!(c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row<d&&(d+=g.row-f.row):"insertLines"===b.action?f.row<=d&&(d+=g.row-f.row):"removeText"===b.action?f.row===d&&f.column<e?e=g.column>=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row<d?(g.row===d&&(e=Math.max(0,e-g.column)+f.column),d-=g.row-f.row):g.row===d&&(d-=g.row-f.row,e=Math.max(0,e-g.column)+f.column):"removeLines"==b.action&&f.row<=d&&(g.row<=d?d-=g.row-f.row:(d=f.row,e=0)),this.setPosition(d,e,!0)}},this.setPosition=function(a,b,c){var d;if(d=c?{row:a,column:b}:this.$clipPositionToDocument(a,b),this.row!=d.row||this.column!=d.column){var e={row:this.row,column:this.column};this.row=d.row,this.column=d.column,this._emit("change",{old:e,value:d})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(a,b){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}).call(e.prototype)}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/event_emitter").EventEmitter,e=function(a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var b=this;this.$worker=function(){if(b.running){for(var a=new Date,c=b.currentLine,d=-1,e=b.doc;b.lines[c];)c++;var f=c,g=e.getLength(),h=0;for(b.running=!1;g>c;){b.$tokenizeRow(c),d=c;do c++;while(b.lines[c]);if(h++,h%5==0&&new Date-a>20)return b.running=setTimeout(b.$worker,20),b.currentLine=c,void 0}b.currentLine=c,d>=f&&b.fireUpdateEvent(f,d)}}};(function(){c.implement(this,d),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._emit("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}).call(e.prototype),b.BackgroundTokenizer=e}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang"),d=(a("./lib/oop"),a("./range").Range),e=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,e,f){if(this.regExp)for(var g=f.firstRow,h=f.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=c.getMatchOffsets(e.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new d(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(e),this.clazz,f)}}}).call(e.prototype),b.SearchHighlight=e}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(a,b){function c(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;for(var e=d.folds,f=0;f<e.length;f++){var g=e[f];if(g.range.contains(a,b)){if(1==c&&g.range.isEnd(a,b))continue;if(-1==c&&g.range.isStart(a,b))continue;return g}}},this.getFoldsInRange=function(a){var b=a.start,c=a.end,d=this.$foldData,e=[];b.column+=1,c.column-=1;for(var f=0;f<d.length;f++){var g=d[f].range.compareRange(a);if(2!=g){if(-2==g)break;for(var h=d[f].folds,i=0;i<h.length;i++){var j=h[i];if(g=j.range.compareRange(a),-2==g)break;if(2!=g){if(42==g)break;e.push(j)}}}}return b.column-=1,c.column+=1,e},this.getAllFolds=function(){function a(a){b.push(a)}for(var b=[],c=this.$foldData,d=0;d<c.length;d++)for(var e=0;e<c[d].folds.length;e++)a(c[d].folds[e]);return b},this.getFoldStringAt=function(a,b,c,d){if(d=d||this.getFoldLine(a),!d)return null;for(var e,f,g={end:{column:0}},h=0;h<d.folds.length;h++){f=d.folds[h];var i=f.range.compareEnd(a,b);if(-1==i){e=this.getLine(f.start.row).substring(g.end.column,f.start.column);break}if(0===i)return null;g=f}return e||(e=this.getLine(f.start.row).substring(g.end.column)),-1==c?e.substring(0,b-g.end.column):1==c?e.substring(b-g.end.column):e},this.getFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.start.row<=a&&e.end.row>=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d<c.length;d++){var e=c[d];if(e.end.row>=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e<c.length;e++){var f=c[e],g=f.end.row,h=f.start.row;if(g>=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c,d=this.$foldData,g=!1;a instanceof f?c=a:(c=new f(b,a),c.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(c.range);var h=c.start.row,i=c.start.column,j=c.end.row,k=c.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(c);if(l&&!l.range.isStart(h,i)||m&&!m.range.isEnd(j,k))throw new Error("A fold can't intersect already existing fold"+c.range+l.range);var n=this.getFoldsInRange(c.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){c.addSubFold(a)}));for(var o=0;o<d.length;o++){var p=d[o];if(j==p.start.row){p.addFold(c),g=!0;break}if(h==p.end.row){if(p.addFold(c),g=!0,!c.sameRow){var q=d[o+1];if(q&&q.start.row==j){p.merge(q);break}}break}if(j<=p.start.row)break}return g||(p=this.$addFoldLine(new e(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.start.row),this.$modified=!0,this._emit("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(a){var b=a.foldLine,c=b.start.row,d=b.end.row,e=this.$foldData,f=b.folds;if(1==f.length)e.splice(e.indexOf(b),1);else if(b.range.isEnd(a.end.row,a.end.column))f.pop(),b.end.row=f[f.length-1].end.row,b.end.column=f[f.length-1].end.column;else if(b.range.isStart(a.start.row,a.start.column))f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var g=b.split(a.start.row,a.start.column);f=g.folds,f.shift(),g.start.row=f[0].start.row,g.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,d):this.$updateRowLengthCache(c,d)),this.$modified=!0,this._emit("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);b.forEach(function(a){this.removeFold(a)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(b){a.restoreRange(b),this.addFold(b)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,e;if(null==a?(c=new d(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new d(a,0,a,this.getLine(a).length):"row"in a?d.fromPoints(a,a):a,e=this.getFoldsInRange(c),b)this.removeFolds(e);else for(;e.length;)this.expandFolds(e),e=this.getFoldsInRange(c)},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row,e=0),null==b&&(b=a.end.row,c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new e(a,c)})},this.toggleFold=function(a){var b,c,d=this.selection,e=d.getRange();if(e.isEmpty()){var f=e.start;if(b=this.getFoldAt(f.row,f.column))return this.expandFold(b),void 0;(c=this.findMatchingBracket(f))?1==e.comparePoint(c)?e.end=c:(e.start=c,e.start.column++,e.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==e.comparePoint(c)?e.end=c:e.start=c,e.start.column++):e=this.getCommentFoldRange(f.row,f.column)||e}else{var g=this.getFoldsInRange(e);if(a&&g.length)return this.expandFolds(g),void 0;1==g.length&&(b=g[0])}if(b||(b=this.getFoldAt(e.start.row,e.start.column)),b&&b.range.toString()==e.toString())return this.expandFold(b),void 0;var h="...";if(!e.isMultiLine()){if(h=this.getTextRange(e),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,e)},this.getCommentFoldRange=function(a,b,c){var e=new g(this,a,b),f=e.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var h=new d,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=e.stepBackward();while(f&&i.test(f.type));e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+2,e=new g(this,a,b),-1!=c){do f=e.stepForward();while(f&&i.test(f.type));f=e.stepBackward()}else f=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn()+f.value.length-2,h}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e),g=f.end.row;if(f&&f.isMultiLine()&&b>=g&&f.start.row>=a)try{var h=this.addFold("...",f);h.collapseChildren=c,e=g}catch(i){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var d,e=a-1;e>=0;){var f=c[e];if(null==f&&(f=c[e]=this.getFoldWidget(e)),"start"==f){var g=this.getFoldWidgetRange(e);if(d||(d=g),g&&g.end.row>=a)break}e--}return{range:-1!==e&&g,firstRange:d}},this.onFoldWidgetClick=function(a,b){var c=this.getFoldWidget(a),d=this.getLine(a);b=b.domEvent;var e=b.shiftKey,f=b.ctrlKey||b.metaKey,g=b.altKey,h="end"===c?-1:1,i=this.getFoldAt(a,-1===h?0:d.length,h);if(i)return e||f?this.removeFold(i):this.expandFold(i),void 0;var j=this.getFoldWidgetRange(a);if(j&&!j.isMultiLine()&&(i=this.getFoldAt(j.start.row,j.start.column,1),i&&j.isEqual(i.range)))return this.removeFold(i),void 0;if(g){var k=this.getParentFoldRangeData(a);if(k.range)var l=k.range.start.row+1,m=k.range.end.row;this.foldAll(l,m,f?1e4:0)}else if(e){var m=j?j.end.row:this.getLength();this.foldAll(a+1,j.end.row,f?1e4:0)}else j&&(f&&(j.collapseChildren=1e4),this.addFold("...",j));j||((b.target||b.srcElement).className+=" ace_invalid")},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=c}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b){function c(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new d(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var d=a("../range").Range;(function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d,e,f,g=0,h=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;j<h.length;j++){if(d=h[j],e=d.range.compareStart(b,c),-1==e)return a(null,b,c,g,i),void 0;if(f=a(null,d.start.row,d.start.column,g,i),f=!f&&a(d.placeholder,d.start.row,d.start.column,g),f||0==e)return;i=!d.sameRow,g=d.end.column}a(null,b,c,g,i)},this.getNextFoldTo=function(a,b){for(var c,d,e=0;e<this.folds.length;e++){if(c=this.folds[e],d=c.range.compareEnd(a,b),-1==d)return{fold:c,kind:"after"};if(0==d)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(a,b,c){var d,e,f=this.getNextFoldTo(a,b);if(f)if(d=f.fold,"inside"==f.kind&&d.start.column!=b&&d.start.row!=a)window.console&&window.console.log(a,b,d);else if(d.start.row==a){e=this.folds;var g=e.indexOf(d);for(0==g&&(this.start.column+=c),g;g<e.length;g++){if(d=e[g],d.start.column+=c,!d.sameRow)return;d.end.column+=c}this.end.column+=c}},this.split=function(a,b){var d=this.getNextFoldTo(a,b).fold,e=this.folds,f=this.foldData;if(!d)return null;var g=e.indexOf(d),h=e[g-1];this.end.row=h.end.row,this.end.column=h.end.column,e=e.splice(g,e.length-g);var i=new c(f,e);return f.splice(f.indexOf(this)+1,0,i),i},this.merge=function(a){for(var b=a.folds,c=0;c<b.length;c++)this.addFold(b[c]);var d=this.foldData;d.splice(d.indexOf(a),1)},this.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(b){a.push("  "+b.toString())}),a.push("]"),a.join("\n")},this.idxToPosition=function(a){for(var b,c=0,d=0;d<this.folds.length;d++){var b=this.folds[d];if(a-=b.start.column-c,0>a)return{row:b.start.row,column:b.start.column+a};if(a-=b.placeholder.length,0>a)return b.start;c=b.end.column}return{row:this.end.row,column:this.end.column+a}}}).call(c.prototype),b.FoldLine=c}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b){function c(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function d(a,b){c(a.start,b),c(a.end,b)}function e(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function f(a,b){e(a.start,b),e(a.end,b)}var g=(a("../range").Range,a("../range_list").RangeList),h=a("../lib/oop"),i=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};h.inherits(i,g),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new i(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);d(a,this.start);for(var b=a.start.row,c=a.start.column,e=0,f=-1;e<this.subFolds.length&&(f=this.subFolds[e].range.compare(b,c),1==f);e++);var g=this.subFolds[e];if(0==f)return g.addSubFold(a);for(var b=a.range.end.row,c=a.range.end.column,h=e,f=-1;h<this.subFolds.length&&(f=this.subFolds[h].range.compare(b,c),1==f);h++);{this.subFolds[h]}if(0==f)throw new Error("A fold can't intersect already existing fold"+a.range+this.range);{this.subFolds.splice(e,h-e,a)}return a.setFoldLine(this.foldLine),a}},this.restoreRange=function(a){return f(a,this.start)}}.call(i.prototype)}),define("ace/range_list",["require","exports","module","ace/range"],function(a,b){var c=a("./range").Range,d=c.comparePoints,e=function(){this.ranges=[]};(function(){this.comparePoints=d,this.pointIndex=function(a,b,c){for(var e=this.ranges,f=c||0;f<e.length;f++){var g=e[f],h=d(a,g.end);if(!(h>0)){var i=d(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return d(a.start,b.start)});for(var c,e=b[0],f=1;f<b.length;f++){c=e,e=b[f];var g=d(c.end,e.start);0>g||(0!=g||c.isEmpty()||e.isEmpty())&&(d(c.end,e.end)<0&&(c.end.row=e.end.row,c.end.column=e.end.column),b.splice(f,1),a.push(e),e=c,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.row<a)return[];var d=this.pointIndex({row:a,column:0});0>d&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.row<e)){if(l.start.row>e)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}).call(e.prototype),b.RangeList=e}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b){function c(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var b,c=this.getLine(a.row),d=!0,f=c.charAt(a.column-1),g=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(g||(f=c.charAt(a.column),a={row:a.row,column:a.column+1},g=f&&f.match(/([\(\[\{])|([\)\]\}])/),d=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;b=e.fromPoints(a,h),d||(b.end.column++,b.start.column--),b.cursor=b.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;b=e.fromPoints(h,a),d||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var e=this.$brackets[a],f=1,g=new d(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==e){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var d=a("../token_iterator").TokenIterator,e=a("../range").Range;b.BracketMatch=c}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b){var c=a("./lib/lang"),d=a("./lib/oop"),e=a("./range").Range,f=function(){this.$options={}};(function(){this.set=function(a){return d.mixin(this.$options,a),this},this.getOptions=function(){return c.copyObject(this.$options)},this.setOptions=function(a){this.$options=a
+},this.find=function(a){var b=this.$matchIterator(a,this.$options);if(!b)return!1;var c=null;return b.forEach(function(a,b,d){if(a.start)c=a;else{var f=a.offset+(d||0);c=new e(b,f,b,f+a.length)}return!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var d=b.range,f=d?a.getLines(d.start.row,d.end.row):a.doc.getAllLines(),g=[],h=b.re;if(b.$isMultiLine)for(var i=h.length,j=f.length-i,k=h.offset||0;j>=k;k++){for(var l=0;i>l&&-1!=f[k+l].search(h[l]);l++);var m=f[k],n=f[k+i-1],o=m.match(h[0])[0].length,p=n.match(h[i-1])[0].length;g.push(new e(k,m.length-o,k+i-1,p))}else for(var q=0;q<f.length;q++)for(var r=c.getMatchOffsets(f[q],h),l=0;l<r.length;l++){var s=r[l];g.push(new e(q,s.offset,q,s.offset+s.length))}if(d){for(var t=d.start.column,u=d.start.column,q=0,l=g.length-1;l>q&&g[q].start.column<t&&g[q].start.row==d.start.row;)q++;for(;l>q&&g[l].end.column>u&&g[l].end.row==d.end.row;)l--;for(g=g.slice(q,l+1),q=0,l=g.length;l>q;q++)g[q].start.row+=d.start.row,g[q].end.row+=d.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];b[f]=g&&g.toLowerCase()!=g?b[f].toUpperCase():b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var d=this.$assembleRegExp(b);if(!d)return!1;var f,g=this,h=b.backwards;if(b.$isMultiLine)var i=d.length,j=function(b,c,g){var h=b.search(d[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(c+j),-1==b.search(d[j]))return;var k=b.match(d[i-1])[0].length,l=new e(c,h,c+i-1,k);return 1==d.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):g&&(l.start.column+=g),f(l)?!0:void 0}};else if(h)var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=g.length-1;h>=0;h--)if(f(g[h],b,e))return!0};else var j=function(a,b,e){for(var g=c.getMatchOffsets(a,d),h=0;h<g.length;h++)if(f(g[h],b,e))return!0};return{forEach:function(c){f=c,g.$lineIterator(a,b).forEach(j)}}},this.$assembleRegExp=function(a,b){if(a.needle instanceof RegExp)return a.re=a.needle;var d=a.needle;if(!a.needle)return a.re=!1;a.regExp||(d=c.escapeRegExp(d)),a.wholeWord&&(d="\\b"+d+"\\b");var e=a.caseSensitive?"g":"gi";if(a.$isMultiLine=!b&&/[\n\r]/.test(d),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(d,e);try{var f=new RegExp(d,e)}catch(g){f=!1}return a.re=f},this.$assembleMultilineRegExp=function(a,b){for(var c=a.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),d=[],e=0;e<c.length;e++)try{d.push(new RegExp(c[e],b))}catch(f){return!1}return""==c[0]?(d.shift(),d.offset=1):d.offset=0,d},this.$lineIterator=function(a,b){var c=1==b.backwards,d=0!=b.skipCurrent,e=b.range,f=b.start;f||(f=e?e[c?"end":"start"]:a.selection.getRange()),f.start&&(f=f[d!=c?"end":"start"]);var g=e?e.start.row:0,h=e?e.end.row:a.getLength()-1,i=c?function(c){var d=f.row,e=a.getLine(d).substring(0,f.column);if(!c(e,d)){for(d--;d>=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}).call(f.prototype),b.Search=f}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../keyboard/hash_handler").HashHandler,e=a("../lib/event_emitter").EventEmitter,f=function(a,b){d.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};c.inherits(f,d),function(){c.implement(this,e),this.exec=function(a,b,c){if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var d={editor:b,command:a,args:c},e=this._emit("exec",d);return this._signal("afterExec",d),e===!1?!1:!0},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(f.prototype),b.CommandManager=f}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){function c(a,b){if(this.platform=b||(e.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var c=!1,d=function(){c||(c=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return d(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(a){return d(),this.commandKeyBinding=a})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(a)}var d=a("../lib/keys"),e=a("../lib/useragent");(function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a){var b="string"==typeof a?a:a.name;a=this.commands[b],delete this.commands[b];var c=this.commandKeyBinding;for(var d in c)for(var e in c[d])c[d][e]==a&&delete c[d][e]},this.bindKey=function(a,b){if(a){if("function"==typeof b)return this.addCommand({exec:b,bindKey:a,name:b.name||a}),void 0;var c=this.commandKeyBinding;a.split("|").forEach(function(a){var d=this.parseKeys(a,b),e=d.hashId;(c[e]||(c[e]={}))[d.key]=b},this)}},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),c.name||(c.name=b),this.addCommand(c)}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){var b=a.bindKey;if(b){var c="string"==typeof b?b:b[this.platform];this.bindKey(c,a)}},this.parseKeys=function(a){-1!=a.indexOf(" ")&&(a=a.split(/\s+/).pop());var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),e=d[c];if(d.FUNCTION_KEYS[e])c=d.FUNCTION_KEYS[e].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var f=0,g=b.length;g--;){var h=d.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;f|=h}return{key:c,hashId:f}},this.findKeyCommand=function(a,b){var c=this.commandKeyBinding;return c[a]&&c[a][b]},this.handleKeyboard=function(a,b,c){return{command:this.findKeyCommand(b,c)}}}).call(c.prototype),b.HashHandler=c}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config"],function(a,b){function c(a,b){return{win:a,mac:b}}var d=a("../lib/lang"),e=a("../config");b.commands=[{name:"showSettingsMenu",bindKey:c("Ctrl-,","Command-,"),exec:function(a){e.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"selectall",bindKey:c("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:c(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:c("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},readOnly:!0},{name:"foldall",bindKey:c("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll()},readOnly:!0},{name:"unfoldall",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},readOnly:!0},{name:"findnext",bindKey:c("Ctrl-K","Command-G"),exec:function(a){a.findNext()},readOnly:!0},{name:"findprevious",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},readOnly:!0},{name:"find",bindKey:c("Ctrl-F","Command-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:c("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotostart",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectup",bindKey:c("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:c("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:c("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotoend",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectdown",bindKey:c("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:c("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:c("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:c("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:c("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:c("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:c("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:c("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:c("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:c("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:c(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:c(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:c("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:c("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:c("Ctrl-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:c("Ctrl-Shift-P",null),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:c("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:c("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine"},{name:"toggleBlockComment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(a){e.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()}},{name:"movelinesup",bindKey:c("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()}},{name:"copylinesdown",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()}},{name:"movelinesdown",bindKey:c("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()}},{name:"del",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach"},{name:"cut_or_delete",bindKey:c("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?(a.remove("left"),void 0):!1},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:c("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach"},{name:"indent",bindKey:c("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach"},{name:"blockoutdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine"},{name:"blockindent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach"},{name:"inserttext",exec:function(a,b){a.insert(d.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:c(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:c("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)}},{name:"touppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach"}]}),define("ace/undomanager",["require","exports","module"],function(a,b){var c=function(){this.reset()};(function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(c.prototype),b.UndoManager=c}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/useragent","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom"),e=(a("./lib/useragent"),a("./config")),f=a("./layer/gutter").Gutter,g=a("./layer/marker").Marker,h=a("./layer/text").Text,i=a("./layer/cursor").Cursor,j=a("./scrollbar").ScrollBarH,k=a("./scrollbar").ScrollBarV,l=a("./renderloop").RenderLoop,m=a("./lib/event_emitter").EventEmitter,n=".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;color: black;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: auto;right: 0;top: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-h {position: absolute;overflow-x: auto;overflow-y: hidden;right: 0;left: 0;bottom: 0;z-index: 6;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}";
+d.importCssString(n,"ace_editor");var o=function(a,b){var c=this;this.container=a||d.createElement("div"),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=d.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=d.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=d.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new g(this.content);var m=this.$textLayer=new h(this.content);this.canvas=m.element,this.$markerFront=new g(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new k(this.container,this),this.scrollBarH=new j(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){c.updateCharacterSize(),c.onResize(!0),c._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),e.resetOptions(this),e._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,c.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session=a,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(this.session.setScrollTop(this.getScrollTop()),e|=this.CHANGE_SCROLL)),c&&(a||f.width!=c)&&(e=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=d.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=d.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2,b-=1}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c-=this.scrollBar.width,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-c-e)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-b-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setInnerWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$renderChanges=function(a,b){return this.$changes&&(a|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&(a||b)?this.$size.width?(this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL)&&(a|=this.$computeLayerConfig()),a&this.CHANGE_H_SCROLL&&(this.$updateScrollBarH(),this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$updateScrollBarV(),this.$updateScrollBarH(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender"),void 0):a&this.CHANGE_SCROLL?(this.$updateScrollBarV(),a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender"),void 0):(a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),(a&this.CHANGE_SIZE||a&this.CHANGE_LINES)&&(this.$updateScrollBarV(),this.$updateScrollBarH()),this._signal("afterRender"),void 0)):(this.$changes|=a,this.onResize(!0)):(this.$changes|=a,void 0)},this.$autosize=function(a){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a)),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size.height<=2*this.lineHeight,c=this.session.getScreenLength(),d=c*this.lineHeight,e=this.scrollTop%this.lineHeight,f=this.$size.scrollerHeight+this.lineHeight,g=this.$getLongestLine(),h=!b&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-g-2*this.$padding<0),i=this.$horizScroll!==h;i&&(this.$horizScroll=h,this.scrollBarH.setVisible(h)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>d-this.$size.scrollerHeight&&(d+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-d+this.$size.scrollerHeight));var j=!b&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-d<0),k=this.$vScroll!==j;k&&(this.$vScroll=j,this.scrollBarV.setVisible(j)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,d-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,g+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var l,m,n=Math.ceil(f/this.lineHeight)-1,o=Math.max(0,Math.round((this.scrollTop-e)/this.lineHeight)),p=o+n,q=this.lineHeight;o=a.screenToDocumentRow(o,0);var r=a.getFoldLine(o);r&&(o=r.start.row),l=a.documentToScreenRow(o,0),m=a.getRowLength(o)*q,p=Math.min(a.screenToDocumentRow(p,0),a.getLength()-1),f=this.$size.scrollerHeight+a.getRowLength(p)*q+m,e=this.scrollTop-l*q;var s=0;return(i||k)&&(s=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),k&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:o,firstRowScreen:l,lastRow:p,lineHeight:q,characterWidth:this.characterWidth,minHeight:f,maxHeight:d,offset:e,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-e+"px",this.content.style.marginTop=-e+"px",this.content.style.width=g+2*this.$padding+"px",this.content.style.height=f+"px",s},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||b<c.firstRow?void 0:1/0===b?(this.$showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c),void 0):(this.$textLayer.updateLines(c,a,b),!0)},this.$getLongestLine=function(){var a=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(a+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(a*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){this.$gutterLayer.removeGutterDecoration(a,b)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(a,b,c){this.scrollCursorIntoView(a,c),this.scrollCursorIntoView(b,c)},this.scrollCursorIntoView=function(a,b){if(0!==this.$size.scrollerHeight){var c=this.$cursorLayer.getPixelPosition(a),d=c.left,e=c.top,f=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;f>e?(b&&(e-=b*this.$size.scrollerHeight),0==e?e=-this.scrollMargin.top:0==e&&(e=+this.scrollMargin.bottom),this.session.setScrollTop(e)):f+this.$size.scrollerHeight<e+this.lineHeight&&(b&&(e+=b*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight-this.$size.scrollerHeight));var g=this.scrollLeft;g>d?(d<this.$padding+2*this.layerConfig.characterWidth&&(d=-this.scrollMargin.left),this.session.setScrollLeft(d)):g+this.$size.scrollerWidth<d+this.characterWidth?this.session.setScrollLeft(Math.round(d+this.characterWidth-this.$size.scrollerWidth)):g<=this.$padding&&d-g<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.session.setScrollTop(a*this.lineHeight)},this.alignCursor=function(a,b){"number"==typeof a&&(a={row:a,column:0});var c=this.$cursorLayer.getPixelPosition(a),d=this.$size.scrollerHeight-this.lineHeight,e=c.top-d*(b||0);return this.session.setScrollTop(e),e},this.STEPS=8,this.$calcSteps=function(a,b){var c=0,d=this.STEPS,e=[],f=function(a,b,c){return c*(Math.pow(a-1,3)+1)+b};for(c=0;d>c;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight);return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){d.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){d.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,d.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(d.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function c(c){if(f.$themeValue!=a)return b&&b();if(c.cssClass){d.importCssString(c.cssText,c.cssClass,f.container.ownerDocument),f.theme&&d.removeCssClass(f.container,f.theme.cssClass),f.$theme=c.cssClass,f.theme=c,d.addCssClass(f.container,c.cssClass),d.setCssClass(f.container,"ace_dark",c.isDark);var e="padding"in c?c.padding:4;f.$padding&&e!=f.$padding&&f.setPadding(e),f.$size&&(f.$size.width=0,f.onResize()),f._dispatchEvent("themeLoaded",{theme:c}),b&&b()}}var f=this;if(this.$themeValue=a,f._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)c(a);else{var g=a||"ace/theme/textmate";e.loadModule(["theme",g],c)}},this.getTheme=function(){return this.$themeValue},this.setStyle=function(a,b){d.setCssClass(this.container,a,0!=b)},this.unsetStyle=function(a){d.removeCssClass(this.container,a)},this.setMouseCursor=function(a){this.content.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(o.prototype),e.defineOptions(o.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){d.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight(),void 0):(this.$gutterLineHighlight=d.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}}}),b.VirtualRenderer=o}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b){var c=a("../lib/dom"),d=a("../lib/oop"),e=a("../lib/lang"),f=a("../lib/event_emitter").EventEmitter,g=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){d.implement(this,f),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b,c,d=0;d<a.length;d++){var f=a[d],c=f.row,b=this.$annotations[c];b||(b=this.$annotations[c]={text:[]});var g=f.text;g=g?e.escapeHTML(g):f.html||"",-1===b.text.indexOf(g)&&b.text.push(g);var h=f.type;"error"==h?b.className=" ace_error":"warning"==h&&" ace_error"!=b.className?b.className=" ace_warning":"info"!=h||b.className||(b.className=" ace_info")}},this.$updateAnnotations=function(a){if(this.$annotations.length){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e);else if("removeText"==b.action||"removeLines"==b.action)this.$annotations.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.$annotations.splice.apply(this.$annotations,f)}}},this.update=function(a){for(var b=a.firstRow,d=a.lastRow,e=this.session.getNextFoldLine(b),f=e?e.start.row:1/0,g=this.$showFoldWidgets&&this.session.foldWidgets,h=this.session.$breakpoints,i=this.session.$decorations,j=this.session.$firstLineNumber,k=0,l=null,m=-1,n=b;;){if(n>f&&(n=e.end.row+1,e=this.session.getNextFoldLine(n,e),f=e?e.start.row:1/0),n>d){for(;this.$cells.length>m+1;)l=this.$cells.pop(),this.element.removeChild(l.element);break}l=this.$cells[++m],l||(l={element:null,textNode:null,foldWidget:null},l.element=c.createElement("div"),l.textNode=document.createTextNode(""),l.element.appendChild(l.textNode),this.element.appendChild(l.element),this.$cells[m]=l);var o="ace_gutter-cell ";h[n]&&(o+=h[n]),i[n]&&(o+=i[n]),this.$annotations[n]&&(o+=this.$annotations[n].className),l.element.className!=o&&(l.element.className=o);var p=this.session.getRowLength(n)*a.lineHeight+"px";p!=l.element.style.height&&(l.element.style.height=p);var q=k=n+j;if(q!=l.textNode.data&&(l.textNode.data=q),g){var r=g[n];null==r&&(r=g[n]=this.session.getFoldWidget(n))}if(r){l.foldWidget||(l.foldWidget=c.createElement("span"),l.element.appendChild(l.foldWidget));var o="ace_fold-widget ace_"+r;o+="start"==r&&n==f&&n<e.end.row?" ace_closed":" ace_open",l.foldWidget.className!=o&&(l.foldWidget.className=o);var p=a.lineHeight+"px";l.foldWidget.style.height!=p&&(l.foldWidget.style.height=p)}else null!=l.foldWidget&&(l.element.removeChild(l.foldWidget),l.foldWidget=null);n++}this.element.style.height=a.minHeight+"px",(this.$fixedWidth||this.session.$useWrapMode)&&(k=this.session.getLength());var s=k.toString().length*a.characterWidth,t=this.$padding||this.$computePadding();s+=t.left+t.right,s===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",s))},this.$fixedWidth=!1,this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(a){a?c.addCssClass(this.element,"ace_folding-enabled"):c.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var a=c.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(a.paddingLeft)+1||0,this.$padding.right=parseInt(a.paddingRight)||0,this.$padding},this.getRegion=function(a){var b=this.$padding||this.$computePadding(),c=this.element.getBoundingClientRect();return a.x<b.left+c.left?"markers":this.$showFoldWidgets&&a.x>c.right-b.right?"foldWidgets":void 0}}).call(g.prototype),b.Gutter=g}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b){var c=a("../range").Range,d=a("../lib/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var e=this.markers[c];if(e.range){var f=e.range.clipRows(a.firstRow,a.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),e.renderer){var g=this.$getTop(f.start.row,a),h=this.$padding+f.start.column*a.characterWidth;e.renderer(b,f,h,g,a)}else"fullLine"==e.type?this.drawFullLineMarker(b,f,e.clazz,a):"screenLine"==e.type?this.drawScreenLineMarker(b,f,e.clazz,a):f.isMultiLine()?"text"==e.type?this.drawTextMarker(b,f,e.clazz,a):this.drawMultiLineMarker(b,f,e.clazz,a):this.drawSingleLineMarker(b,f,e.clazz+" ace_start",a)}else e.update(b,this,this.session,a)}this.element=d.setInnerHtml(this.element,b.join(""))}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,d,e,f){var g=b.start.row,h=new c(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,d+" ace_start",e,1,f),g=b.end.row,h=new c(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,d,e,0,f),g=b.start.row+1;g<b.end.row;g++)h.start.row=g,h.end.row=g,h.end.column=this.session.getScreenLastRowColumn(g),this.drawSingleLineMarker(a,h,d,e,1,f)},this.drawMultiLineMarker=function(a,b,c,d,e){var f=this.$padding,g=d.lineHeight,h=this.$getTop(b.start.row,d),i=f+b.start.column*d.characterWidth;e=e||"",a.push("<div class='",c," ace_start' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",i,"px;",e,"'></div>"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",j,"px;","top:",h,"px;","left:",f,"px;",e,"'></div>"),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",f,"px;",e,"'></div>"))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",h,"px;","top:",i,"px;","left:",j,"px;",f||"","'></div>")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")
+},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")}}).call(e.prototype),b.Marker=e}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){var c=a("../lib/oop"),d=a("../lib/dom"),e=a("../lib/lang"),f=a("../lib/useragent"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){c.implement(this,g),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=f.isIE||f.isOldGecko?function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=d.createElement("div"),c=b.style;if(c.width=c.height="auto",c.left=c.top=40*-a+"px",c.visibility="hidden",c.position="fixed",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=e.stringRepeat("Xy",a),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(b);else{for(var f=this.element.parentNode;!d.hasCssClass(f,"ace_editor");)f=f.parentNode;f.appendChild(b)}}if(!this.element.offsetWidth)return null;var c=this.$measureNode.style,g=d.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*a)};return 0==i.width||0==i.height?null:i}:function(){if(!this.$measureNode){var a=this.$measureNode=d.createElement("div"),b=a.style;b.width=b.height="auto",b.left=b.top="-100px",b.visibility="hidden",b.position="fixed",b.overflow="visible",b.whiteSpace="nowrap",a.innerHTML=e.stringRepeat("X",100);for(var c=this.element.parentNode;c&&!d.hasCssClass(c,"ace_editor");)c=c.parentNode;if(!c)return this.$measureNode=null;c.appendChild(a)}var f=this.$measureNode.getBoundingClientRect(),g={height:f.height,width:f.width/100};return 0==g.width||0==g.height?null:g},this.setSession=function(a){this.session=a,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+e.stringRepeat(" ",c-1)+"</span>"):b.push(e.stringRepeat(" ",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide";if(this.showInvisibles){d+=" ace_invisible";var f=e.stringRepeat(this.SPACE_CHAR,this.tabSize),g=this.TAB_CHAR+e.stringRepeat(" ",this.tabSize-1)}else var f=e.stringRepeat(" ",this.tabSize),g=f;this.$tabStrings[" "]="<span class='"+d+"'>"+f+"</span>",this.$tabStrings["	"]="<span class='"+d+"'>"+g+"</span>"}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var e=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0,i=a.firstRow;e>i;i++){var j=this.session.getFoldLine(i);if(j){if(j.containsRow(e)){e=j.start.row;break}i=j.end.row}h++}for(var i=e,j=this.session.getNextFoldLine(i),k=j?j.start.row:1/0;;){if(i>k&&(i=j.end.row+1,j=this.session.getNextFoldLine(i,j),k=j?j.start.row:1/0),i>f)break;var l=g[h++];if(l){var m=[];this.$renderLine(m,i,!this.$useLineGroups(),i==k?j:!1),d.setInnerHtml(l,m.join(""))}i++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow<a.firstRow)return this.update(a);if(a.lastRow<b.firstRow)return this.update(a);var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);d>0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRow<b.firstRow){var e=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1);c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)}if(a.lastRow>b.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var e=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>c)break;var i=d.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",e.appendChild(i);else for(var k=i.childNodes;k.length;)e.appendChild(k[0]);f++}return e},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,e=a.lastRow,f=c,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;;){if(f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),f>e)break;this.$useLineGroups()&&b.push("<div class='ace_line_group'>"),this.$renderLine(b,f,!1,f==h?g:!1),this.$useLineGroups()&&b.push("</div>"),f++}this.element=d.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var f=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g){if(c)return f.showInvisibles?"<span class='ace_invisible'>"+e.stringRepeat(f.SPACE_CHAR,a.length)+"</span>":e.stringRepeat(" ",a.length);if("&"==a)return"&#38;";if("<"==a)return"&#60;";if("	"==a){var h=f.session.getScreenTabSize(b+g);return b+=h-1,f.$tabStrings[h]}if(" "==a){var i=f.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",j=f.showInvisibles?f.SPACE_CHAR:"";return b+=1,"<span class='"+i+"' style='width:"+2*f.config.characterWidth+"px'>"+j+"</span>"}return d?"<span class='ace_invisible ace_invalid'>"+f.SPACE_CHAR+"</span>":(b+=1,"<span class='ace_cjk' style='width:"+2*f.config.characterWidth+"px'>"+a+"</span>")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("<span class='",j,"'",k,">",i,"</span>")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(e.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):"	"==b[0]?(a.push(e.stringRepeat(this.$tabStrings["	"],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i<b.length;i++){var j=b[i],k=j.value;if(0==i&&this.displayIndentGuides){if(e=k.length,k=this.renderIndentGuide(a,k,g),!k)continue;e-=k.length}if(e+k.length<g)h=this.$renderToken(a,h,j,k),e+=k.length;else{for(;e+k.length>=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f<b.length;f++)d=b[f],e=d.value,c=this.$renderToken(a,c,d,e)},this.$renderLine=function(a,b,c,d){if(d||0==d||(d=this.session.getFoldLine(b)),d)var e=this.$getFoldLineTokens(b,d);else var e=this.session.getTokens(b);if(c||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("<span class='ace_invisible'>",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),c||a.push("</div>")},this.$getFoldLineTokens=function(a,b){function c(a,b,c){for(var d=0,f=0;f+a[d].value.length<b;)if(f+=a[d].value.length,d++,d==a.length)return;if(f!=b){var g=a[d].value.substring(b-f);g.length>c-b&&(g=g.substring(0,c-b)),e.push({type:a[d].type,value:g}),f=b+g.length,d+=1}for(;c>f&&d<a.length;){var g=a[d].value;g.length+f>c?e.push({type:a[d].type,value:g.substring(0,c-f)}):e.push(a[d]),f+=g.length,d+=1}}var d=this.session,e=[],f=d.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?e.push({type:"fold",value:a}):(i&&(f=d.getTokens(b)),f.length&&c(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),e},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(h.prototype),b.Text=h}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b){var c=a("../lib/dom"),d=function(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,a?c.addCssClass(this.element,"ace_smooth-blinking"):c.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var a=c.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,c.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,c.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&c.removeCssClass(this.element,"ace_smooth-blinking");for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){c.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var a=this.cursors.length;a--;)this.cursors[a].style.opacity="";b()}.bind(this),this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<-a.offset)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(d.prototype),b.Cursor=d}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b){var c=a("./lib/oop"),d=a("./lib/dom"),e=a("./lib/event"),f=a("./lib/event_emitter").EventEmitter,g=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),b.$scrollbarWidth=this.width=d.scrollbarWidth(a.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",e.addListener(this.element,"scroll",this.onScrollV.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)},h=function(a,b){this.element=d.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.height=b.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",e.addListener(this.element,"scroll",this.onScrollH.bind(this)),e.addListener(this.element,"mousedown",e.preventDefault)};(function(){c.implement(this,f),this.setVisible=function(a){a?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(a){this.element.style.height=a+"px"},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}).call(g.prototype),h.prototype=g.prototype,b.ScrollBar=g,b.ScrollBarV=g,b.ScrollBarH=h}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b){var c=a("./lib/event"),d=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};(function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending){this.pending=!0;var b=this;c.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}).call(d.prototype),b.RenderLoop=d}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(a,b){function c(a,b,c){return o.$options.wrap=!0,o.$options.needle=b,o.$options.backwards=-1==c,o.find(a)}function d(a,b){return a.row==b.row&&a.column==b.column}function e(a){a.$multiselectOnSessionChange||(a.$onAddRange=a.$onAddRange.bind(a),a.$onRemoveRange=a.$onRemoveRange.bind(a),a.$onMultiSelect=a.$onMultiSelect.bind(a),a.$onSingleSelect=a.$onSingleSelect.bind(a),a.$multiselectOnSessionChange=b.onSessionChange.bind(a),a.$multiselectOnSessionChange(a),a.on("changeSession",a.$multiselectOnSessionChange),a.on("mousedown",j),a.commands.addCommands(m.defaultCommands),f(a))}function f(a){function b(){d&&(a.renderer.setMouseCursor(""),d=!1)}var c=a.textInput.getElement(),d=!1;k.addListener(c,"keydown",function(c){18!=c.keyCode||c.ctrlKey||c.shiftKey||c.metaKey?d&&b():d||(a.renderer.setMouseCursor("crosshair"),d=!0)}),k.addListener(c,"keyup",b),k.addListener(c,"blur",b)}var g=a("./range_list").RangeList,h=a("./range").Range,i=a("./selection").Selection,j=a("./mouse/multi_select_handler").onMouseDown,k=a("./lib/event"),l=a("./lib/lang"),m=a("./commands/multi_select_commands");b.commands=m.defaultCommands.concat(m.multiSelectCommands);var n=a("./search").Search,o=new n,p=a("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(a,b){if(a){if(!this.inMultiSelectMode&&0==this.rangeCount){var c=this.toOrientedRange();if(this.rangeList.add(c),this.rangeList.add(a),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(a);this.rangeList.removeAll(),this.rangeList.add(c),this.$onAddRange(c)}a.cursor||(a.cursor=a.end);var d=this.rangeList.add(a);return this.$onAddRange(a),d.length&&this.$onRemoveRange(d),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._emit("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._emit("removeRange",{ranges:a}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),e=c.start.row,f=c.end.row;if(e==f){if(d)var g=c.end,i=c.start;else var g=c.start,i=c.end;return this.addRange(h.fromPoints(i,i)),this.addRange(h.fromPoints(g,g)),void 0}var j=[],k=this.getLineRange(e,!0);k.start.column=c.start.column,j.push(k);for(var l=e+1;f>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(f,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=h.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),e=this.session.documentToScreenPosition(this.selectionAnchor),f=this.rectangularRangeBlock(d,e);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var e=[],f=a.column<b.column;if(f)var g=a.column,i=b.column;else var g=b.column,i=a.column;var j=a.row<b.row;if(j)var k=a.row,l=b.row;else var k=b.row,l=a.row;0>g&&(g=0),0>k&&(k=0),k==l&&(c=!0);for(var m=k;l>=m;m++){var n=h.fromPoints(this.session.screenToDocumentPosition(m,g),this.session.screenToDocumentPosition(m,i));if(n.isEmpty()){if(o&&d(n.end,o))break;var o=n.end}n.cursor=f?n.start:n.end,e.push(n)}if(j&&e.reverse(),!c){for(var p=e.length-1;e[p].isEmpty()&&p>0;)p--;if(p>0)for(var q=0;e[q].isEmpty();)q++;for(var r=p;r>=q;r--)e[r].isEmpty()&&e.splice(r,1)}return e}}.call(i.prototype);var q=a("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(m.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(m.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var d,e=this.session,f=this.selection,g=f.rangeList,h=f._eventRegistry;f._eventRegistry={};var j=new i(e);this.inVirtualSelectionMode=!0;for(var k=g.ranges.length;k--;){if(c)for(;k>0&&g.ranges[k].start.row==g.ranges[k-1].end.row;)k--;j.fromOrientedRange(g.ranges[k]),this.selection=e.selection=j;var l=a.exec(this,b||{});void 0==!d&&(d=l),j.toOrientedRange(g.ranges[k])}j.detach(),this.selection=e.selection=f,this.inVirtualSelectionMode=!1,f._eventRegistry=h,f.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;d<b.length;d++)c.push(this.session.getTextRange(b[d]));var e=this.session.getDocument().getNewLineCharacter();a=c.join(e),a.length==(c.length-1)*e.length&&(a="")}else this.selection.isEmpty()||(a=this.session.getTextRange(this.getSelectionRange()));return a},this.onPaste=function(a){if(!this.$readOnly){if(this._signal("paste",a),!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(a);var b=a.split(/\r\n|\r|\n/),c=this.selection.rangeList.ranges;if(b.length>c.length||b.length<2||!b[1])return this.commands.exec("insertstring",this,a);for(var d=c.length;d--;){var e=c[d];e.isEmpty()||this.session.remove(e),this.session.insert(e.start,b[d])}}},this.findAll=function(a,b,c){b=b||{},b.needle=a||b.needle,this.$search.set(b);var d=this.$search.findAll(this.session);if(!d.length)return 0;this.$blockScrolling+=1;var e=this.multiSelect;c||e.toSingleRange(d[0]);for(var f=d.length;f--;)e.addRange(d[f],!0);return this.$blockScrolling-=1,d.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,e=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(e.column=this.selection.$desiredColumn);var f=this.session.screenToDocumentPosition(e.row+a,e.column);if(c.isEmpty())var g=f;else var i=this.session.documentToScreenPosition(d?c.end:c.start),g=this.session.screenToDocumentPosition(i.row+a,i.column);if(d){var j=h.fromPoints(f,g);j.cursor=j.start}else{var j=h.fromPoints(g,f);j.cursor=j.end}if(j.desiredColumn=e.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b){var d=this.session,e=d.multiSelect,f=e.toOrientedRange();if(f.isEmpty()){var f=d.getWordRange(f.start.row,f.start.column);return f.cursor=-1==a?f.start:f.end,this.multiSelect.addRange(f),void 0}var g=d.getTextRange(f),h=c(d,g,a);h&&(h.cursor=-1==a?h.start:h.end,this.multiSelect.addRange(h)),b&&this.multiSelect.substractPoint(f.cursor)},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges;if(c.length){var d=-1,e=c.filter(function(a){return a.cursor.row==d?!0:(d=a.cursor.row,void 0)});b.$onRemoveRange(e);var f=0,g=1/0,i=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>f&&(f=c.column),g>e&&(g=e),e});c.forEach(function(b,c){var d=b.cursor,e=f-d.column,j=i[c]-g;e>j?a.insert(d,l.stringRepeat(" ",e-j)):a.remove(new h(d.row,d.column,d.row,d.column-e+j)),b.start.column=b.end.column=f,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var j=this.selection.getRange(),k=j.start.row,m=j.end.row,n=this.session.doc.removeLines(k,m);n=this.$reAlignText(n),this.session.doc.insertLines(k,n),j.start.column=0,j.end.column=n[n.length-1].length,this.selection.setRange(j)}},this.$reAlignText=function(a){function b(a){return l.stringRepeat(" ",a)}function c(a){return a[2]?b(f)+a[2]+b(g-a[2].length+h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function d(a){return a[2]?b(f+g-a[2].length)+a[2]+b(h," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function e(a){return a[2]?b(f)+a[2]+b(h)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var f,g,h,i=!0,j=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==f?(f=b[1].length,g=b[2].length,h=b[3].length,b):(f+g+h!=b[1].length+b[2].length+b[3].length&&(j=!1),f!=b[1].length&&(i=!1),f>b[1].length&&(f=b[1].length),g<b[2].length&&(g=b[2].length),h>b[3].length&&(h=b[3].length),b):[a]}).map(i?j?d:c:e)}}).call(q.prototype),b.onSessionChange=function(a){var b=a.session;b.multiSelect||(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.removeEventListener("addRange",this.$onAddRange),c.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),c.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),c.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=e,a("./config").defineOptions(q.prototype,"editor",{enableMultiselect:{set:function(a){e(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",j)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",j))},value:!0}})}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(a,b){function c(a,b){return a.row==b.row&&a.column==b.column}function d(a){var b=a.domEvent,d=b.altKey,f=b.shiftKey,g=a.getAccelKey(),h=a.getButton();if(a.editor.inMultiSelectMode&&2==h)return a.editor.textInput.onContextMenu(a.domEvent),void 0;if(!g&&!d)return 0==h&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode(),void 0;var i=a.editor,j=i.selection,k=i.inMultiSelectMode,l=a.getDocumentPosition(),m=j.getCursor(),n=a.inSelection()||j.isEmpty()&&c(l,m),o=a.x,p=a.y,q=function(a){o=a.clientX,p=a.clientY},r=function(){var a=i.renderer.pixelToScreenCoordinates(o,p),b=s.screenToDocumentPosition(a.row,a.column);c(u,a)&&c(b,j.selectionLead)||(u=a,i.selection.moveCursorToPosition(b),i.selection.clearSelection(),i.renderer.scrollCursorIntoView(),i.removeSelectionMarkers(v),v=j.rectangularRangeBlock(u,t),v.forEach(i.addSelectionMarker,i),i.updateSelectionMarkers())},s=i.session,t=i.renderer.pixelToScreenCoordinates(o,p),u=t;if(!g||f||d||0!=h){if(d&&0==h){a.stop(),k&&!g?j.toSingleRange():!k&&g&&j.addRange();var v=[];f?(t=s.documentToScreenPosition(j.lead),r()):(j.moveCursorToPosition(l),j.clearSelection());var w=function(){clearInterval(y),i.removeSelectionMarkers(v);for(var a=0;a<v.length;a++)j.addRange(v[a])},x=r;e.capture(i.container,q,w);var y=setInterval(function(){x()},20);return a.preventDefault()}}else{if(!k&&n)return;if(!k){var z=j.toOrientedRange();i.addSelectionMarker(z)}var A=j.rangeList.rangeAtPoint(l);i.once("mouseup",function(){var a=j.toOrientedRange();A&&a.isEmpty()&&c(A.cursor,a.cursor)?j.substractPoint(a.cursor):(z&&(i.removeSelectionMarker(z),j.addRange(z)),j.addRange(a))
+})}}var e=a("../lib/event");b.onMouseDown=d}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(a,b){b.defaultCommands=[{name:"addCursorAbove",exec:function(a){a.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(a){a.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(a){a.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(a){a.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(a){a.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(a){a.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(a){a.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(a){a.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(a){a.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(a){a.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],b.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(a){a.exitMultiSelectMode()},readonly:!0,isAvailable:function(a){return a&&a.inMultiSelectMode}}];var c=a("../keyboard/hash_handler").HashHandler;b.keyboardHandler=new c(b.multiSelectCommands)}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(a,b){var c=a("../lib/oop"),d=a("../lib/event_emitter").EventEmitter,e=a("../config"),f=function(b,c,d){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl);var f;if(e.get("packaged")||!a.toUrl)f=e.moduleUrl(c,"worker");else{var g=this.$normalizePath;f=g(a.toUrl("ace/worker/worker.js",null,"_"));var h={};b.forEach(function(b){h[b]=g(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(f),this.$worker.postMessage({init:!0,tlns:h,module:c,classname:d}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){c.implement(this,d),this.onError=function(a){throw window.console&&console.log&&console.log(a),a},this.onMessage=function(a){var b=a.data;switch(b.type){case"log":window.console&&console.log&&console.log.apply(console,b.data);break;case"event":this._emit(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id])}},this.$normalizePath=function(a){return location.host?(a=a.replace(/^[a-z]+:\/\/[^\/]+/,""),a=location.protocol+"//"+location.host+("/"==a.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+a.replace(/^[\/]+/,"")):a},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,1))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))}}).call(f.prototype);var g=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var f=null,g=Object.create(d),h=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){h.messageBuffer.push(a),f&&setTimeout(i)};var i=function(){var a=h.messageBuffer.shift();a.command?f[a.command].apply(f,a.args):a.event&&g._emit(a.event,a.data)};g.postMessage=function(a){h.onMessage({data:a})},g.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},g.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},e.loadModule(["worker",b],function(a){for(f=new a[c](g);h.messageBuffer.length;)i()})};g.prototype=f.prototype,b.UIWorkerClient=g,b.WorkerClient=f}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b){var c=a("./range").Range,d=a("./lib/event_emitter").EventEmitter,e=a("./lib/oop"),f=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){e.implement(this,d),this.setup=function(){var a=this,b=this.doc,d=this.session,e=this.$pos;this.pos=b.createAnchor(e.row,e.column),this.markerId=d.addMarker(new c(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){d.removeMarker(a.markerId),a.markerId=d.addMarker(new c(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),d.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=a.addMarker(new c(d.row,d.column,d.row,d.column+b.length),b.othersClass,null,!1),d.on("change",function(e){a.removeMarker(d.markerId),d.markerId=a.addMarker(new c(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},this.onUpdate=function(a){var b=a.data,d=b.range;if(d.start.row===d.end.row&&d.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var e="insertText"===b.action?d.end.column-d.start.column:d.start.column-d.end.column;if(d.start.column>=this.pos.column&&d.start.column<=this.pos.column+this.length+1){var f=d.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.insert(i,b.text)}else if("removeText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===d.start.row&&d.start.column<h.column&&(i.column+=e),this.doc.remove(new c(i.row,i.column,i.row,i.column-e))}d.start.column===this.pos.column&&"insertText"===b.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-e);for(var a=0;a<this.others.length;a++){var b=this.others[a],c={row:b.row,column:b.column-e};b.row===d.start.row&&d.start.column<b.column&&(c.column+=e),b.setPosition(c.row,c.column)}}.bind(this),0):d.start.column===this.pos.column&&"removeText"===b.action&&setTimeout(function(){for(var a=0;a<this.others.length;a++){var b=this.others[a];b.row===d.start.row&&d.start.column<b.column&&b.setPosition(b.row,b.column-e)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var g=0;g<this.others.length;g++)this.others[g]._emit("change",{value:this.others[g]})}this.$updating=!1}},this.onCursorChange=function(a){if(!this.$updating){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;a<this.others.length;a++)this.others[a].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var a=this.session.getUndoManager(),b=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;b>c;c++)a.undo(!0)}}).call(f.prototype),b.PlaceHolder=f}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b){var c=a("../../range").Range,d=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(a,b,d){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=d||f.length,i=a.getLength(),j=b,k=b;++b<i;){var l=a.getLine(b).search(e);if(-1!=l){if(g>=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new c(j,h,k,m)}}},this.openingBracketBlock=function(a,b,d,e,f){var g={row:d,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=this.getFoldWidget(a,h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),c.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,d,e){var f={row:d,column:e},g=a.$findOpeningBracket(b,f);return g?(g.column++,f.column--,c.fromPoints(g,f)):void 0}}).call(d.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b){b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var c=a("../lib/dom");c.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){a&&a.config.init(),window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}(),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/theme/textmate","ace/config"],function(a,b){a("./lib/fixoldbrowsers");var c=a("./lib/dom"),d=a("./lib/event"),e=a("./editor").Editor,f=a("./edit_session").EditSession,g=a("./undomanager").UndoManager,h=a("./virtual_renderer").VirtualRenderer,i=a("./multi_select").MultiSelect;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./mode/folding/fold_mode"),a("./theme/textmate"),b.config=a("./config"),b.require=a,b.edit=function(a){if("string"==typeof a){var f=a,a=document.getElementById(f);if(!a)throw new Error("ace.edit can't find div #"+f)}if(a.env&&a.env.editor instanceof e)return a.env.editor;var g=b.createEditSession(c.getInnerText(a));a.innerHTML="";var j=new e(new h(a));new i(j),j.setSession(g);var k={document:g,editor:j,onResize:j.resize.bind(j,null)};return d.addListener(window,"resize",k.onResize),j.on("destroy",function(){d.removeListener(window,"resize",k.onResize)}),a.env=j.env=k,j},b.createEditSession=function(a,b){var c=new f(a,b);return c.setUndoManager(new g),c},b.EditSession=f,b.UndoManager=g}),define("ace_configuration",["app","ace/ace"],function(a,b){var c=a.host+a.root+"js/ace",d=require("ace/config");return d.set("packaged",!0),d.set("workerPath",c),d.set("modePath",c),d.set("themePath",c),b}),define("modules/fauxton/components",["app","api","ace_configuration"],function(a,b,c){var d=a.module();return d.Pagination=b.View.extend({template:"templates/fauxton/pagination",initialize:function(a){this.page=parseInt(a.page,10),this.perPage=a.perPage,this.total=a.total,this.totalPages=Math.ceil(this.total/this.perPage),this.urlFun=a.urlFun},serialize:function(){return{page:this.page,perPage:this.perPage,total:this.total,totalPages:this.totalPages,urlFun:this.urlFun}}}),d.IndexPagination=b.View.extend({template:"templates/fauxton/index_pagination",events:{"click a":"scrollTo","click a#next":"nextClicked","click a#previous":"previousClicked"},previousIds:[],scrollTo:function(){this.scrollToSelector&&$(this.scrollToSelector).animate({scrollTop:0},"slow")},initialize:function(a){this.previousUrlfn=a.previousUrlfn,this.nextUrlfn=a.nextUrlfn,this.canShowPreviousfn=a.canShowPreviousfn,this.canShowNextfn=a.canShowNextfn,this.scrollToSelector=a.scrollToSelector,_.bindAll(this)},previousClicked:function(a){a.preventDefault(),a.stopPropagation(),this.canShowPreviousfn()&&(b.navigate(this.previousUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","previous"))},nextClicked:function(a){if(a.preventDefault(),a.stopPropagation(),this.canShowNextfn()){var c=this.collection.first();c&&this.previousIds.push(c.id),b.navigate(this.nextUrlfn(),{trigger:!1}),b.triggerRouteEvent("paginate","next")}},serialize:function(){return{canShowNextfn:this.canShowNextfn,canShowPreviousfn:this.canShowPreviousfn}}}),d.Typeahead=b.View.extend({initialize:function(a){this.source=a.source,_.bindAll(this)},afterRender:function(){var a=this.onUpdate;this.$el.typeahead({source:this.source,updater:function(b){return a&&a(b),b}})}}),d.DbSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.dbLimit=a.dbLimit||30,this.onUpdate=a.onUpdate,_.bindAll(this)},source:function(b,c){var d=[a.host,"/_all_dbs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.dbLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){c(a)}})}}),d.DocSearchTypeahead=d.Typeahead.extend({initialize:function(a){this.docLimit=a.docLimit||30,this.database=a.database,_.bindAll(this)},source:function(b,c){var d=[a.host,"/",this.database.id,"/_all_docs?startkey=%22",b,"%22&endkey=%22",b,"香","%22&limit=",this.docLimit].join("");this.ajaxReq&&this.ajaxReq.abort(),this.ajaxReq=$.ajax({cache:!1,url:d,dataType:"json",success:function(a){var b=_.map(a.rows,function(a){return a.id});c(b)}})}}),d.Editor=b.View.extend({initialize:function(a){this.editorId=a.editorId,this.mode=a.mode||"json",this.commands=a.commands,this.theme=a.theme||"crimson_editor",this.couchJSHINT=a.couchJSHINT,this.edited=!1},afterRender:function(){this.editor=c.edit(this.editorId),this.setHeightToLineCount(),this.editor.setTheme("ace/theme/"+this.theme),this.editor.getSession().setMode("ace/mode/"+this.mode),this.editor.getSession().setUseWrapMode(!0),this.editor.setShowPrintMargin(!1),this.editor.gotoLine(2),this.addCommands(),this.couchJSHINT&&this.removeIncorrectAnnotations();var a=this;this.editor.getSession().on("change",function(){a.setHeightToLineCount(),a.edited=!0}),$(window).on("beforeunload.editor",function(){return a.edited?"Your changes have not been saved. Click cancel to return to the document.":void 0}),b.beforeUnload("editor",function(){return a.edited?"Your changes have not been saved. Click cancel to return to the document.":void 0})},cleanup:function(){$(window).off("beforeunload.editor"),b.removeBeforeUnload("editor")},setHeightToLineCount:function(){var a=this.editor.getSession().getDocument().getLength();this.editor.setOptions({maxLines:a}),this.editor.resize()},addCommands:function(){_.each(this.commands,function(a){this.editor.commands.addCommand(a)},this)},removeIncorrectAnnotations:function(){var a=this.editor;this.editor.getSession().on("changeAnnotation",function(){var c=a.getSession().getAnnotations(),d=_.reduce(c,function(a,c){return b.isIgnorableError(c.raw)||a.push(c),a},[]);c.length!==d.length&&a.getSession().setAnnotations(d)})},editSaved:function(){this.edited=!1},setValue:function(a,b){b=b?b:-1,this.editor.setValue(a,b)},getValue:function(){return this.editor.getValue()},getAnnotations:function(){return this.editor.getSession().getAnnotations()},hadValidCode:function(){var a=this.getAnnotations();return _.every(a,function(a){return b.isIgnorableError(a.raw)},this)}}),d}),define("modules/databases/views",["app","modules/fauxton/components","api","modules/databases/resources"],function(a,b,c,d){var e={};return e.Item=c.View.extend({template:"templates/databases/item",tagName:"tr",establish:function(){return[this.model.fetch()]},serialize:function(){return{encoded:a.mixins.safeURLName(this.model.get("name")),database:this.model,docLimit:d.DocLimit}}}),e.List=c.View.extend({dbLimit:20,perPage:20,template:"templates/databases/list",events:{"click button.all":"selectAll","submit form#jump-to-db":"switchDatabase"},initialize:function(){var b=a.getParams();this.page=b.page?parseInt(b.page,10):1},serialize:function(){return{databases:this.collection}},establish:function(){var a=this.paginated(),b=c.Deferred();return c.when(a.map(function(a){return a.status.fetch()})).always(function(){b.resolve()}),[b]},switchDatabase:function(b,e){b&&b.preventDefault();var f=this.$el.find("[name='search-query']").val().trim();if(e&&(f=e),f&&this.collection.where({id:a.mixins.safeURLName(f)}).length>0){var g=["/database/",a.mixins.safeURLName(f),"/_all_docs?limit="+d.DocLimit].join("");c.navigate(g)}else c.addNotification({msg:"Database does not exist.",type:"error"})},paginated:function(){var a=(this.page-1)*this.perPage,b=this.page*this.perPage;return this.collection.slice(a,b)},beforeRender:function(){this.insertView("#newButton",new e.NewDatabaseButton({collection:this.collection})),_.each(this.paginated(),function(a){this.insertView("table.databases tbody",new e.Item({model:a}))},this),this.insertView("#database-pagination",new b.Pagination({page:this.page,perPage:this.perPage,total:this.collection.length,urlFun:function(a){return"#/_all_dbs?page="+a}}))},setPage:function(a){this.page=a||1},afterRender:function(){var a=this;this.dbSearchTypeahead=new b.DbSearchTypeahead({dbLimit:this.dbLimit,el:"input.search-autocomplete",onUpdate:function(b){a.switchDatabase(null,b)}}),this.dbSearchTypeahead.render()},selectAll:function(a){$("input:checkbox").attr("checked",!$(a.target).hasClass("active"))}}),e.NewDatabaseButton=c.View.extend({template:"templates/databases/newdatabase",events:{"click a#new":"newDatabase"},newDatabase:function(){var b,e,f=prompt("Name of database","newdatabase");if(null!==f){if(0===f.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;e=new this.collection.model({id:f,name:f}),b=c.addNotification({msg:"Creating database."}),e.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var e="#/database/"+a.mixins.safeURLName(f)+"/_all_docs?limit="+d.DocLimit;a.router.navigate(e,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}}}),e.Sidebar=c.View.extend({template:"templates/databases/sidebar",events:{"click a#new":"newDatabase","click a#owned":"showMine","click a#shared":"showShared"},newDatabase:function(){var b,e,f=prompt("Name of database","newdatabase");if(null!==f){if(0===f.length)return b=c.addNotification({msg:"Please enter a valid database name",type:"error",clear:!0}),void 0;e=new this.collection.model({id:encodeURIComponent(f),name:f}),b=c.addNotification({msg:"Creating database."}),e.save().done(function(){b=c.addNotification({msg:"Database created successfully",type:"success",clear:!0});var e="#/database/"+f+"/_all_docs?limit="+d.DocLimit;a.router.navigate(e,{trigger:!0})}).error(function(a){var d=JSON.parse(a.responseText).reason;b=c.addNotification({msg:"Create database failed: "+d,type:"error",clear:!0})})}},showMine:function(){$.contribute("Show unshared databases","app/addons/databases/views.js")},showShared:function(){$.contribute("Show shared databases (e.g. continuous replications to/from the database)","app/addons/databases/views.js")}}),e}),define("modules/databases/routes",["app","api","modules/databases/resources","modules/databases/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",crumbs:[{name:"Databases",link:"/_all_dbs"}],routes:{"":"allDatabases","index.html":"allDatabases","_all_dbs(:params)":"allDatabases"},apiUrl:function(){return[this.databases.url("apiurl"),this.databases.documentation()]},selectedHeader:"Databases",initialize:function(){this.databases=new c.List,this.deferred=b.Deferred()},allDatabases:function(){var b=a.getParams(),c=b.page;this.databasesView=this.setView("#dashboard-content",new d.List({collection:this.databases})),this.databasesView.setPage(c)},establish:function(){return[this.databases.fetch()]}});return c.RouteObjects=[e],c}),define("modules/databases/base",["app","api","modules/databases/routes","modules/databases/views"],function(a,b,c,d){return c.Views=d,c.databaseUrl=function(b){var d=_.isObject(b)?b.id:b,e=a.mixins.safeURLName(d);return["/database/",e,"/_all_docs?limit="+c.DocLimit].join("")},c}),define("modules/pouchdb/pouch.collate.js",["app","api","modules/pouchdb/pouch.collate.js"],function(){var a={};a.collate=function(a,f){var g=e(a),h=e(f);return g-h!==0?g-h:null===a?0:"number"==typeof a?a-f:"boolean"==typeof a?f>a?-1:1:"string"==typeof a?b(a,f):Array.isArray(a)?d(a,f):"object"==typeof a?c(a,f):void 0};var b=function(a,b){return a===b?0:a>b?1:-1},c=function(b,c){for(var d=Object.keys(b),e=Object.keys(c),f=Math.min(d.length,e.length),g=0;f>g;g++){var h=a.collate(d[g],e[g]);if(0!==h)return h;if(h=a.collate(b[d[g]],c[e[g]]),0!==h)return h}return d.length===e.length?0:d.length>e.length?1:-1},d=function(b,c){for(var d=Math.min(b.length,c.length),e=0;d>e;e++){var f=a.collate(b[e],c[e]);if(0!==f)return f}return b.length===c.length?0:b.length>c.length?1:-1},e=function(a){var b=["boolean","number","string","object"];return-1!==b.indexOf(typeof a)?null===a?1:b.indexOf(typeof a)+2:Array.isArray(a)?4.5:void 0};return a}),define("modules/pouchdb/pouchdb.mapreduce.js",["app","api","modules/pouchdb/pouch.collate.js"],function(app,FauxtonAPI,Collate){var Pouch={};Pouch.collate=Collate.collate;var MapReduce=function(){function viewQuery(fun,options){function sum(a){return a.reduce(function(a,b){return a+b},0)}if(console.log("IN VIEW QUERY"),options.complete){var results=[],current=null,num_started=0,completed=!1,emit=function(a,b){var c={id:current.doc._id,key:a,value:b};if(!(options.startkey&&Pouch.collate(a,options.startkey)<0||options.endkey&&Pouch.collate(a,options.endkey)>0||options.key&&0!==Pouch.collate(a,options.key))){if(num_started++,options.include_docs)throw{error:"Include Docs not supported"};console.log("EMITTING: ",c),results.push(c)}};eval("fun.map = "+fun.map.toString()+";"),fun.reduce&&options.reduce&&(builtInReduce[fun.reduce]&&(console.log("built in reduce"),fun.reduce=builtInReduce[fun.reduce]),eval("fun.reduce = "+fun.reduce.toString()+";"));var conflicts="conflicts"in options?options.conflicts:!1,checkComplete=function(){if(console.log("check"),completed&&results.length==num_started){if(results.sort(function(a,b){return Pouch.collate(a.key,b.key)}),options.descending&&results.reverse(),options.reduce===!1)return options.complete(null,{rows:results});console.log("reducing",options);var a=[];results.forEach(function(b){var c=a[a.length-1]||null;return c&&0===Pouch.collate(c.key[0][0],b.key)?(c.key.push([b.key,b.id]),c.value.push(b.value),void 0):(a.push({key:[[b.key,b.id]],value:[b.value]}),void 0)}),a.forEach(function(a){a.value=fun.reduce(a.key,a.value)||null,a.key=a.key[0][0]}),console.log("GROUPs",a),options.complete(null,{rows:a})}};return options.docs?(_.each(options.docs,function(a){current={doc:a},fun.map.call(this,a)},this),completed=!0,checkComplete()):!1}}function query(a,b,c){if("function"==typeof b&&(c=b,b={}),c&&(b.complete=c),"object"==typeof a)return console.log("RUNNING VIEW QUERY",a,b,arguments),viewQuery(a,b);throw{error:"Shouldn't have gotten here"}}var builtInReduce={_sum:function(a,b){return sum(b)},_count:function(a,b,c){return c?sum(b):b.length},_stats:function(a,b){return{sum:sum(b),min:Math.min.apply(null,b),max:Math.max.apply(null,b),count:b.length,sumsqr:function(){_sumsqr=0;for(var a in b)_sumsqr+=b[a]*b[a];return _sumsqr}()}}};return{query:query}};return MapReduce._delete=function(){},MapReduce()}),define("modules/pouchdb/base",["app","api","modules/pouchdb/pouchdb.mapreduce.js"],function(a,b,c){var d={};return d.MapReduce=c,d.runViewQuery=function(a,c){var e=b.Deferred(),f=function(a,b){e.resolve(b)},g=_.extend(c,{complete:f});return d.MapReduce.query(a,g),e},d});var q=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function a(a){function b(a){var b=a.charCodeAt(0);if(92!==b)return b;var c=a.charAt(1);return(b=l[c])?b:c>="0"&&"7">=c?parseInt(a.substring(1),8):"u"===c||"x"===c?parseInt(a.substring(2),16):a.charCodeAt(1)}function c(a){return 32>a?(16>a?"\\x0":"\\x")+a.toString(16):(a=String.fromCharCode(a),("\\"===a||"-"===a||"["===a||"]"===a)&&(a="\\"+a),a)}function d(a){for(var d=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=[],e=[],f="^"===d[0],g=f?1:0,h=d.length;h>g;++g){var i=d[g];if(/\\[bdsw]/i.test(i))a.push(i);else{var j,i=b(i);h>g+2&&"-"===d[g+1]?(j=b(d[g+2]),g+=2):j=i,e.push([i,j]),65>j||i>122||(65>j||i>90||e.push([32|Math.max(65,i),32|Math.min(j,90)]),97>j||i>122||e.push([-33&Math.max(97,i),-33&Math.min(j,122)]))}}for(e.sort(function(a,b){return a[0]-b[0]||b[1]-a[1]}),d=[],i=[0/0,0/0],g=0;g<e.length;++g)h=e[g],h[0]<=i[1]+1?i[1]=Math.max(i[1],h[1]):d.push(i=h);for(e=["["],f&&e.push("^"),e.push.apply(e,a),g=0;g<d.length;++g)h=d[g],e.push(c(h[0])),h[1]>h[0]&&(h[1]+1>h[0]&&e.push("-"),e.push(c(h[1])));return e.push("]"),e.join("")}function e(a){for(var b=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=b.length,e=[],h=0,i=0;c>h;++h){var j=b[h];"("===j?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(e[j]=-1)}for(h=1;h<e.length;++h)-1===e[h]&&(e[h]=++f);for(i=h=0;c>h;++h)j=b[h],"("===j?(++i,void 0===e[i]&&(b[h]="(?:")):"\\"===j.charAt(0)&&(j=+j.substring(1))&&i>=j&&(b[h]="\\"+e[i]);for(i=h=0;c>h;++h)"^"===b[h]&&"^"!==b[h+1]&&(b[h]="");if(a.ignoreCase&&g)for(h=0;c>h;++h)j=b[h],a=j.charAt(0),j.length>=2&&"["===a?b[h]=d(j):"\\"!==a&&(b[h]=j.replace(/[A-Za-z]/g,function(a){return a=a.charCodeAt(0),"["+String.fromCharCode(-33&a,32|a)+"]"}));return b.join("")}for(var f=0,g=!1,h=!1,i=0,j=a.length;j>i;++i){var k=a[i];if(k.ignoreCase)h=!0;else if(/[a-z]/i.test(k.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){g=!0,h=!1;break}}for(var l={b:8,t:9,n:10,v:11,f:12,r:13},m=[],i=0,j=a.length;j>i;++i){if(k=a[i],k.global||k.multiline)throw Error(""+k);m.push("(?:"+e(k)+")")}return RegExp(m.join("|"),h?"gi":"g")}function b(a){function b(a){switch(a.nodeType){case 1:if(d.test(a.className))break;for(var c=a.firstChild;c;c=c.nextSibling)b(c);c=a.nodeName,("BR"===c||"LI"===c)&&(e[h]="\n",g[h<<1]=f++,g[h++<<1|1]=a);break;case 3:case 4:c=a.nodeValue,c.length&&(c=i?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[h]=c,g[h<<1]=f,f+=c.length,g[h++<<1|1]=a)}}var c,d=/(?:^|\s)nocode(?:\s|$)/,e=[],f=0,g=[],h=0;a.currentStyle?c=a.currentStyle.whiteSpace:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=c&&"pre"===c.substring(0,3);return b(a),{a:e.join("").replace(/\n$/,""),c:g}}function c(a,b,c,d){b&&(a={a:b,d:a},c(a),d.push.apply(d,a.e))}function d(b,d){function e(a){for(var b=a.d,j=[b,"pln"],k=0,l=a.a.match(f)||[],m={},n=0,o=l.length;o>n;++n){var p,q=l[n],r=m[q],s=void 0;if("string"==typeof r)p=!1;else{var t=g[q.charAt(0)];if(t)s=q.match(t[1]),r=t[0];else{for(p=0;i>p;++p)if(t=d[p],s=q.match(t[1])){r=t[0];break}s||(r="pln")}!(p=r.length>=5&&"lang-"===r.substring(0,5))||s&&"string"==typeof s[1]||(p=!1,r="src"),p||(m[q]=r)}if(t=k,k+=q.length,p){p=s[1];var u=q.indexOf(p),v=u+p.length;s[2]&&(v=q.length-s[2].length,u=v-p.length),r=r.substring(5),c(b+t,q.substring(0,u),e,j),c(b+t+u,p,h(r,p),j),c(b+t+v,q.substring(v),e,j)}else j.push(b+t,r)}a.e=j}var f,g={};!function(){for(var c=b.concat(d),e=[],h={},i=0,j=c.length;j>i;++i){var k=c[i],l=k[3];if(l)for(var m=l.length;--m>=0;)g[l.charAt(m)]=k;k=k[1],l=""+k,h.hasOwnProperty(l)||(e.push(k),h[l]=q)}e.push(/[\S\s]/),f=a(e)}();var i=d.length;return e}function e(a){var b=[],c=[];a.tripleQuotedStrings?b.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?b.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):b.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),a.verbatimStrings&&c.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var e=a.hashComments;
+return e&&(a.cStyleComments?(e>1?b.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):b.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),c.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):b.push(["com",/^#[^\n\r]*/,q,"#"])),a.cStyleComments&&(c.push(["com",/^\/\/[^\n\r]*/,q]),c.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),a.regexLiterals&&c.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(e=a.types)&&c.push(["typ",e]),a=(""+a.keywords).replace(/^ | $/g,""),a.length&&c.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]),b.push(["pln",/^\s+/,q," \r\n	 "]),c.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),d(b,c)}function f(a,b){function c(a){switch(a.nodeType){case 1:if(f.test(a.className))break;if("BR"===a.nodeName)d(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)c(a);break;case 3:case 4:if(i){var b=a.nodeValue,e=b.match(g);if(e){var j=b.substring(0,e.index);a.nodeValue=j,(b=b.substring(e.index+e[0].length))&&a.parentNode.insertBefore(h.createTextNode(b),a.nextSibling),d(a),j||a.parentNode.removeChild(a)}}}}function d(a){function b(a,c){var d=c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),f=a.nextSibling;e.appendChild(d);for(var g=f;g;g=f)f=g.nextSibling,e.appendChild(g)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var c,a=b(a.nextSibling,0);(c=a.parentNode)&&1===c.nodeType;)a=c;j.push(a)}var e,f=/(?:^|\s)nocode(?:\s|$)/,g=/\r\n?|\n/,h=a.ownerDocument;a.currentStyle?e=a.currentStyle.whiteSpace:window.getComputedStyle&&(e=h.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var i=e&&"pre"===e.substring(0,3);for(e=h.createElement("LI");a.firstChild;)e.appendChild(a.firstChild);for(var j=[e],k=0;k<j.length;++k)c(j[k]);b===(0|b)&&j[0].setAttribute("value",b);var l=h.createElement("OL");l.className="linenums";for(var m=Math.max(0,b-1|0)||0,k=0,n=j.length;n>k;++k)e=j[k],e.className="L"+(k+m)%10,e.firstChild||e.appendChild(h.createTextNode(" ")),l.appendChild(e);a.appendChild(l)}function g(a,b){for(var c=b.length;--c>=0;){var d=b[c];u.hasOwnProperty(d)?window.console&&console.warn("cannot override language handler %s",d):u[d]=a}}function h(a,b){return a&&u.hasOwnProperty(a)||(a=/^\s*</.test(b)?"default-markup":"default-code"),u[a]}function i(a){var c=a.g;try{var d=b(a.h),e=d.a;a.a=e,a.c=d.c,a.d=0,h(c,e)(a);var f=/\bMSIE\b/.test(navigator.userAgent),c=/\n/g,g=a.a,i=g.length,d=0,j=a.c,k=j.length,e=0,l=a.e,m=l.length,a=0;l[m]=i;var n,o;for(o=n=0;m>o;)l[o]!==l[o+2]?(l[n++]=l[o++],l[n++]=l[o++]):o+=2;for(m=n,o=n=0;m>o;){for(var p=l[o],q=l[o+1],r=o+2;m>=r+2&&l[r+1]===q;)r+=2;l[n++]=p,l[n++]=q,o=r}for(l.length=n;k>e;){var s,t=j[e+2]||i,u=l[a+2]||i,r=Math.min(t,u),v=j[e+1];if(1!==v.nodeType&&(s=g.substring(d,r))){f&&(s=s.replace(c,"\r")),v.nodeValue=s;var w=v.ownerDocument,x=w.createElement("SPAN");x.className=l[a+1];var y=v.parentNode;y.replaceChild(x,v),x.appendChild(v),t>d&&(j[e+1]=v=w.createTextNode(g.substring(r,t)),y.insertBefore(v,x.nextSibling))}d=r,d>=t&&(e+=2),d>=u&&(a+=2)}}catch(z){"console"in window&&console.log(z&&z.stack?z.stack:z)}}var j=["break,continue,do,else,for,if,return,while"],k=[[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[k,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[k,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],n=[m,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],k=[k,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],o=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],p=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],j=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],r=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,s=/\S/,t=e({keywords:[l,n,k,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+o,p,j],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),u={};g(t,["default-code"]),g(d([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),g(d([["pln",/^\s+/,q," 	\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]),g(d([],[["atv",/^[\S\s]+/]]),["uq.val"]),g(e({keywords:l,hashComments:!0,cStyleComments:!0,types:r}),["c","cc","cpp","cxx","cyc","m"]),g(e({keywords:"null,true,false"}),["json"]),g(e({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:r}),["cs"]),g(e({keywords:m,cStyleComments:!0}),["java"]),g(e({keywords:j,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),g(e({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),g(e({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),g(e({keywords:p,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),g(e({keywords:k,cStyleComments:!0,regexLiterals:!0}),["js"]),g(e({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),g(d([],[["str",/^[\S\s]+/]]),["regex"]),window.prettyPrintOne=function(a,b,c){var d=document.createElement("PRE");return d.innerHTML=a,c&&f(d,c),i({g:b,i:c,h:d}),d.innerHTML},window.prettyPrint=function(a){function b(){for(var c=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:1/0;l<d.length&&j.now()<c;l++){var e=d[l],g=e.className;if(g.indexOf("prettyprint")>=0){var h,n,g=g.match(m);if(n=!g){n=e;for(var o=void 0,p=n.firstChild;p;p=p.nextSibling)var q=p.nodeType,o=1===q?o?n:p:3===q?s.test(p.nodeValue)?n:o:o;n=(h=o===n?void 0:o)&&"CODE"===h.tagName}for(n&&(g=h.className.match(m)),g&&(g=g[1]),n=!1,o=e.parentNode;o;o=o.parentNode)if(("pre"===o.tagName||"code"===o.tagName||"xmp"===o.tagName)&&o.className&&o.className.indexOf("prettyprint")>=0){n=!0;break}n||((n=(n=e.className.match(/\blinenums\b(?::(\d+))?/))?n[1]&&n[1].length?+n[1]:!0:!1)&&f(e,n),k={g:g,h:e,i:n},i(k))}}l<d.length?setTimeout(b,250):a&&a()}for(var c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[],e=0;e<c.length;++e)for(var g=0,h=c[e].length;h>g;++g)d.push(c[e][g]);var c=q,j=Date;j.now||(j={now:function(){return+new Date}});var k,l=0,m=/\blang(?:uage)?-([\w.]+)(?!\S)/;b()},window.PR={createSimpleLexer:d,registerLangHandler:g,sourceDecorator:e,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}}(),define("plugins/prettify",function(){}),define("modules/documents/views",["app","api","modules/fauxton/components","modules/documents/resources","modules/databases/resources","modules/pouchdb/base","resizeColumns","plugins/prettify"],function(a,b,c,d,e,f){var g={};return g.SearchBox=b.View.extend({template:"templates/documents/search",tagName:"form",initialize:function(a){this.collection=a.collection,this.database=a.database},afterRender:function(){var a=this.collection,c=this.$el,d=c.find("input#searchbox"),e=this.database;c.submit(function(a){a.preventDefault();var f=c.find("input#view").val().split("/"),g="#database/"+e+"/_design/";g+=f[0]+"/_view/"+f[1],""!==d.val()&&(g+='?startkey="'+d.val()+'"'),b.navigate(g)}),d.typeahead({source:function(){var b=_.map(a.pluck("doc"),function(a){return _.map(_.keys(a.views),function(b){return a._id.split("/")[1]+"/"+b})});return _.flatten(b)},minLength:3,updater:function(a){this.$element.removeClass("span12"),this.$element.addClass("span6"),this.$element.attr("placeholder","Search by view key"),$('<span class="add-on span6">'+a+"</span>").insertBefore(this.$element),$('<input type="hidden" id="view" value="'+a+'"/>').insertBefore(this.$element),$(".typehead").unbind()}})}}),g.UploadModal=b.View.extend({template:"templates/documents/upload_modal",disableLoader:!0,initialize:function(){_.bindAll(this)},events:{"click a#upload-btn":"uploadFile"},uploadFile:function(a){a.preventDefault();var b=this.model.get("_rev"),c=this,d=this.$("#file-upload");return b?0===$('input[type="file"]')[0].files.length?this.set_error_msg("Selected a file to be uploaded."):(this.$("#_rev").val(b),d.ajaxSubmit({url:this.model.url(),type:"POST",beforeSend:this.beforeSend,uploadProgress:this.uploadProgress,success:this.success,error:function(a){return console.log("ERR on upload",a),c.set_error_msg("Could not upload document: "+JSON.parse(a.responseText).reason)}}),void 0):this.set_error_msg("The document needs to be saved before adding an attachment.")},success:function(){var a=this.hideModal,c=this.$("#file-upload");b.triggerRouteEvent("reRenderDoc"),setTimeout(function(){c.clearForm(),a(),$(".modal-backdrop").remove()},1e3)},uploadProgress:function(a,b,c,d){this.$(".bar").css({width:d+"%"})},beforeSend:function(){this.$(".progress").removeClass("hide")},showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),g.DuplicateDocModal=b.View.extend({template:"templates/documents/duplicate_doc_modal",initialize:function(){_.bindAll(this)},events:{"click #duplicate-btn":"duplicate"},duplicate:function(c){c.preventDefault();var d=this.$("#dup-id").val(),e=a.mixins.safeURLName(d);this.hideModal(),b.triggerRouteEvent("duplicateDoc",e)},_showModal:function(){this.$(".bar").css({width:"0%"}),this.$(".progress").addClass("hide"),this.clear_error_msg(),this.$(".modal").modal(),$(".modal-backdrop").css("z-index",1025)},showModal:function(){var a=this._showModal,c=this.setDefaultIdValue,d=new b.UUID;d.fetch().then(function(){c(d.next()),a()})},setDefaultIdValue:function(a){this.$("#dup-id").val(a)},hideModal:function(){this.$(".modal").modal("hide")},set_error_msg:function(a){var b;b="string"==typeof a?a:JSON.parse(a.responseText).reason,this.$("#modal-error").text(b).removeClass("hide")},clear_error_msg:function(){this.$("#modal-error").text(" ").addClass("hide")},serialize:function(){return this.model.toJSON()}}),g.FieldEditorTabs=b.View.extend({template:"templates/documents/doc_field_editor_tabs",disableLoader:!0,initialize:function(a){this.selected=a.selected},events:{},updateSelected:function(a){this.selected=a,this.$(".active").removeClass("active"),this.$("#"+this.selected).addClass("active")},serialize:function(){var a=this.selected;return{doc:this.model,isNewDoc:this.model.isNewDoc(),isSelectedClass:function(b){return b&&b===a?"active":""}}},establish:function(){return[this.model.fetch()]}}),g.Document=b.View.extend({template:"templates/documents/all_docs_item",tagName:"tr",className:"all-docs-item",events:{"click button.delete":"destroy","dblclick pre.prettyprint":"edit"},attributes:function(){return{"data-id":this.model.id}},serialize:function(){return{doc:this.model}},establish:function(){return[this.model.fetch()]},edit:function(a){a.preventDefault(),b.navigate("#"+this.model.url("app"))},destroy:function(a){a.preventDefault();var c=this;return window.confirm("Are you sure you want to delete this doc?")?(this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),c.$el.fadeOut(function(){c.remove()}),c.model.collection.remove(c.model.id),c.model.id.match("_design")&&b.triggerRouteEvent("reloadDesignDocs")},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})}),void 0):!1}}),g.Row=b.View.extend({template:"templates/documents/index_row_docular",tagName:"tr",events:{"click button.delete":"destroy"},destroy:function(a){a.preventDefault(),window.alert("Cannot delete a document generated from a view.")},serialize:function(){return{doc:this.model}}}),g.IndexItem=b.View.extend({template:"templates/documents/index_menu_item",tagName:"li",initialize:function(a){this.index=a.index,this.ddoc=a.ddoc,this.database=a.database,this.selected=!!a.selected},serialize:function(){return{index:this.index,ddoc:this.ddoc,database:this.database,index_clean:a.mixins.removeSpecialCharacters(this.index),ddoc_clean:a.mixins.removeSpecialCharacters(this.ddoc),index_encoded:a.mixins.safeURLName(this.index),ddoc_encoded:a.mixins.safeURLName(this.ddoc),database_encoded:a.mixins.safeURLName(this.database),selected:this.selected}},afterRender:function(){this.selected&&($("#sidenav ul.nav-list li").removeClass("active"),this.$el.addClass("active"))}}),g.AllDocsNumber=b.View.extend({template:"templates/documents/all_docs_number",initialize:function(a){this.newView=a.newView||!1,this.listenTo(this.collection,"totalRows:decrement",this.render)},serialize:function(){var b=0,c=0,d=!1;return this.newView||(b=this.collection.totalRows(),d=this.collection.updateSeq()),c=this.collection.recordStart(),{database:a.mixins.safeURLName(this.collection.database.id),updateSeq:d,offset:c,totalRows:b,numModels:this.collection.models.length+c-1}}}),g.AllDocsLayout=b.View.extend({template:"templates/documents/all_docs_layout",className:"row",initialize:function(a){this.database=a.database,this.params=a.params},events:{"click #toggle-query":"toggleQuery"},toggleQuery:function(){this.$("#query").toggle("fast")},beforeRender:function(){this.advancedOptions=this.insertView("#query",new g.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,hasReduce:!1,showPreview:!1,database:this.database})),this.$("#query").hide()},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params)},updateView:function(a,c){a.preventDefault();var d=c.errorParams,e=c.params;if(_.any(d))return _.map(d,function(a){return b.addNotification({msg:"JSON Parse Error on field: "+a.name,type:"error",selector:".advanced-options .errors-container"})}),b.addNotification({msg:"Make sure that strings are properly quoted and any other values are valid JSON structures",type:"warning",selector:".advanced-options .errors-container"}),!1;var f=window.location.hash.replace(/\?.*$/,"");f=f+"?"+$.param(e),b.navigate(f,{trigger:!1}),b.triggerRouteEvent("updateAllDocs",{allDocs:!0})},previewView:function(a){a.preventDefault()}}),g.AllDocsList=b.View.extend({template:"templates/documents/all_docs_list",events:{"click button.all":"selectAll","click button.bulk-delete":"bulkDelete","click #collapse":"collapse","change .row-select":"toggleTrash"},toggleTrash:function(){this.$(".row-select:checked").length>0?this.$(".bulk-delete").removeClass("disabled"):this.$(".bulk-delete").addClass("disabled")},initialize:function(a){this.nestedView=a.nestedView||g.Document,this.rows={},this.viewList=!!a.viewList,this.database=a.database,a.ddocInfo&&(this.designDocs=a.ddocInfo.designDocs,this.ddocID=a.ddocInfo.id),this.newView=a.newView||!1,this.expandDocs=!0,this.addPagination()},establish:function(){return this.newView?null:this.collection.fetch({reset:!0}).fail(function(){console.log("ERROR: ",arguments)})},selectAll:function(a){$("input:checkbox").prop("checked",!$(a.target).hasClass("active")).trigger("change")},serialize:function(){var a=!1;return this.collection.requestDurationInString&&(a=this.collection.requestDurationInString()),{viewList:this.viewList,requestDuration:a,expandDocs:this.expandDocs}},collapse:function(a){a.preventDefault(),this.expandDocs=this.expandDocs?!1:!0,this.render()},bulkDelete:function(){var a=this,c=this.$el.find("input.row-select:checked").parents("tr.all-docs-item").map(function(){return $(this).attr("data-id")}).get();return 0!==c.length&&window.confirm("Are you sure you want to delete these "+c.length+" docs?")?(_.each(c,function(c){var d=this.collection.get(c);d.destroy().then(function(){a.rows[c].$el.fadeOut(function(){$(this).remove()}),d.collection.remove(d.id),console.log(d.id.match("_design"),!!d.id.match("_design")),d.id.match("_design")&&b.triggerRouteEvent("reloadDesignDocs"),a.$(".bulk-delete").addClass("disabled")},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},this),void 0):!1},addPagination:function(){var a=this.collection;this.pagination=new c.IndexPagination({collection:this.collection,scrollToSelector:"#dashboard-content",previousUrlfn:function(){return a.urlPreviousPage(20,this.previousIds.pop())},canShowPreviousfn:function(){return 0===a.viewMeta.offset?!1:!0},canShowNextfn:function(){return 0===a.length||a.viewMeta.offset+a.length+2>=a.viewMeta.total_rows?!1:!0},nextUrlfn:function(){return a.urlNextPage(20)}})},beforeRender:function(){this.allDocsNumber=this.setView("#item-numbers",new g.AllDocsNumber({collection:this.collection,newView:this.newView})),this.insertView("#documents-pagination",this.pagination);var a=this.expandDocs?this.collection:this.collection.simple();a.each(function(a){this.rows[a.id]=this.insertView("table.all-docs tbody",new this.nestedView({model:a}))},this)},afterRender:function(){prettyPrint()}}),g.Doc=b.View.extend({template:"templates/documents/doc",events:{"click button.save-doc":"saveDoc","click button.delete":"destroy","click button.duplicate":"duplicate","click button.upload":"upload","click button.cancel-button":"goback"},disableLoader:!0,initialize:function(a){this.database=a.database,_.bindAll(this)},goback:function(){b.navigate(this.database.url("index")+"?limit=100")},destroy:function(){if(this.model.isNewDoc())return b.addNotification({msg:"This document has not been saved yet.",type:"warning"}),void 0;if(!window.confirm("Are you sure you want to delete this doc?"))return!1;var a=this.model.database;this.model.destroy().then(function(){b.addNotification({msg:"Succesfully destroyed your doc"}),b.navigate(a.url("index"))},function(){b.addNotification({msg:"Failed to destroy your doc!",type:"error"})})},beforeRender:function(){this.uploadModal=this.setView("#upload-modal",new g.UploadModal({model:this.model})),this.uploadModal.render(),this.duplicateModal=this.setView("#duplicate-modal",new g.DuplicateDocModal({model:this.model})),this.duplicateModal.render()},upload:function(a){return a.preventDefault(),this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before uploading an attachment.",type:"warning"}),void 0):(this.uploadModal.showModal(),void 0)},duplicate:function(a){return this.model.isNewDoc()?(b.addNotification({msg:"Please save the document before duplicating it.",type:"warning"}),void 0):(a.preventDefault(),this.duplicateModal.showModal(),void 0)},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},establish:function(){var a=this.model.fetch(),c=this.database.safeID(),d=$.Deferred();return a.then(function(){d.resolve()},function(a){404===a.status&&(b.addNotification({msg:"The document does not exist",type:"error",clear:!0}),b.navigate("/database/"+c+"/_all_docs?limit="+e.DocLimit)),d.reject()}),d},saveDoc:function(){var a,c=this,d=this.editor,e=this.getDocFromEditor();e?(this.getDocFromEditor(),a=b.addNotification({msg:"Saving document."}),this.model.save().then(function(){d.editSaved(),b.navigate("/database/"+c.database.safeID()+"/"+c.model.id)}).fail(function(c){var d=JSON.parse(c.responseText).reason;a=b.addNotification({msg:"Save failed: "+d,type:"error",clear:!0,selector:"#doc .errors-container"})})):this.model.validationError&&"Cannot change a documents id."===this.model.validationError?(a=b.addNotification({msg:"Cannot save: Cannot change a documents _id, try Duplicate doc instead!",type:"error",selector:"#doc .errors-container"}),delete this.model.validationError):a=b.addNotification({msg:"Please fix the JSON errors and try again.",type:"error",selector:"#doc .errors-container"})},getDocFromEditor:function(){return this.hasValidCode()?(json=JSON.parse(this.editor.getValue()),this.model.set(json,{validate:!0}),this.model.validationError?!1:this.model):!1},hasValidCode:function(){var a=this.editor.getAnnotations();return 0===a.length},serialize:function(){return{doc:this.model,attachments:this.getAttachments()}},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):!1},afterRender:function(){var a=this.saveDoc;this.editor=new c.Editor({editorId:"editor-container",commands:[{name:"save",bindKey:{win:"Ctrl-S",mac:"Ctrl-S"},exec:function(){a()},readOnly:!0}]}),this.editor.render(),this.model.on("sync",this.updateValues,this)},cleanup:function(){this.editor.remove()}}),g.DocFieldEditor=b.View.extend({template:"templates/documents/doc_field_editor",disableLoader:!0,events:{"click button.save":"saveDoc"},saveDoc:function(){b.addNotification({type:"warning",msg:"Save functionality coming soon."})},serialize:function(){return{doc:this.getModelWithoutAttachments(),attachments:this.getAttachments()}},getModelWithoutAttachments:function(){var a=this.model.toJSON();return delete a._attachments,a},getAttachments:function(){var a=this.model.get("_attachments");return a?_.map(a,function(a,b){return{fileName:b,size:a.length,contentType:a.content_type,url:this.model.url()+"/"+b}},this):[]},establish:function(){return[this.model.fetch()]}}),g.AdvancedOptions=b.View.extend({template:"templates/documents/advanced_options",className:"advanced-options well",initialize:function(a){this.database=a.database,this.ddocName=a.ddocName,this.viewName=a.viewName,this.updateViewFn=a.updateViewFn,this.previewFn=a.previewFn,this.hasReduce="undefined"==typeof a.hasReduce?!0:a.hasReduce,this.showPreview="undefined"==typeof a.showPreview?!0:a.showPreview},events:{"change form.view-query-update input":"updateFilters","change form.view-query-update select":"updateFilters","submit form.view-query-update":"updateView","click button.preview":"previewView"},beforeRender:function(){if(this.viewName&&this.ddocName){var a=b.getExtensions("advancedOptions:ViewButton");_.each(a,function(a){this.insertView("#button-options",a),a.update(this.database,this.ddocName,this.viewName)},this)}},renderOnUpdatehasReduce:function(a){this.hasReduce=a,this.render()},queryParams:function(){var a=this.$(".view-query-update"),b=_.filter(a.serializeArray(),function(a){return a.value}),c=["key","keys","startkey","endkey"],d=_.filter(b,function(a){if(!_.contains(c,a.name))return!1;try{return JSON.parse(a.value),!1}catch(b){return!0}});return{params:b,errorParams:d}},updateFilters:function(a){a.preventDefault();var b=$(a.currentTarget),c=b.attr("name");this.updateFiltersFor(c,b)},updateFiltersFor:function(a,c){var d=c.parents("form.view-query-update:first");switch(a){case"reduce":if(c.prop("checked")===!0){if(d.find("input[name=include_docs]").prop("checked")===!0){d.find("input[name=include_docs]").prop("checked",!1);{b.addNotification({msg:"include_docs has been disabled as you cannot include docs on a reduced view",type:"warn",selector:".view.show .all-docs-list.errors-container"})}}d.find("input[name=include_docs]").prop("disabled",!0),d.find("select[name=group_level]").prop("disabled",!1)}else d.find("select[name=group_level]").prop("disabled",!0),d.find("input[name=include_docs]").prop("disabled",!1);break;case"include_docs":}},updateFromParams:function(a){var b=this.$el.find("form.view-query-update");_.each(a,function(a,c){var d;switch(c){case"limit":case"group_level":b.find("select[name='"+c+"']").val(a);break;case"include_docs":case"stale":case"descending":case"inclusive_end":b.find("input[name='"+c+"']").prop("checked",!0);break;case"reduce":d=b.find("input[name='"+c+"']"),"true"==a&&d.prop("checked",!0),this.updateFiltersFor(c,d);break;default:b.find("input[name='"+c+"']").val(a)}},this)},updateView:function(a){this.updateViewFn(a,this.queryParams())},previewView:function(a){this.previewFn(a,this.queryParams())},serialize:function(){return{hasReduce:this.hasReduce,showPreview:this.showPreview}}}),g.DesignDocSelector=b.View.extend({template:"templates/documents/design_doc_selector",events:{"change select#ddoc":"updateDesignDoc"},initialize:function(a){this.ddocName=a.ddocName,this.database=a.database,this.listenTo(this.collection,"add",this.ddocAdded),this.DocModel=a.DocModel||d.Doc},ddocAdded:function(a){this.ddocName=a.id,this.render()},serialize:function(){return{ddocName:this.ddocName,ddocs:this.collection}},updateDesignDoc:function(){this.newDesignDoc()?this.$("#new-ddoc-section").show():this.$("#new-ddoc-section").hide()},newDesignDoc:function(){return"new-doc"===this.$("#ddoc").val()},newDocValidation:function(){return this.newDesignDoc()&&""===this.$("#new-ddoc").val()},getCurrentDesignDoc:function(){if(this.newDesignDoc()){var a={_id:"_design/"+this.$("#new-ddoc").val(),views:{},language:"javascript"},b=new this.DocModel(a,{database:this.database});return b}if(!this.newDesignDoc()){var c=this.$("#ddoc").val();return this.collection.find(function(a){return a.id===c}).dDocModel()}}}),g.ViewEditor=b.View.extend({template:"templates/documents/view_editor",builtinReduces:["_sum","_count","_stats"],events:{"click button.save":"saveView","click button.delete":"deleteView","change select#reduce-function-selector":"updateReduce","click button.preview":"previewView","click #db-views-tabs-nav":"toggleIndexNav"},langTemplates:{javascript:{map:"function(doc) {\n  emit(doc._id, 1);\n}",reduce:"function(keys, values, rereduce){\n  if (rereduce){\n    return sum(values);\n  } else {\n    return values.length;\n  }\n}"}},defaultLang:"javascript",initialize:function(a){this.newView=a.newView||!1,this.ddocs=a.ddocs,this.params=a.params,this.database=a.database,this.newView?this.viewName="newView":(this.ddocID=a.ddocInfo.id,this.viewName=a.viewName,this.ddocInfo=new d.DdocInfo({_id:this.ddocID},{database:this.database})),this.showIndex=!1,_.bindAll(this)},establish:function(){return this.ddocInfo?this.ddocInfo.fetch():void 0},updateValues:function(){var a;this.model.changedAttributes()&&(a=b.addNotification({msg:"Document saved successfully.",type:"success",clear:!0}),this.editor.setValue(this.model.prettyJSON()))},updateReduce:function(){var a=$("#reduce-function-selector"),b=$(".control-group.reduce-function");"CUSTOM"==a.val()?(this.createReduceEditor(),this.reduceEditor.setValue(this.langTemplates.javascript.reduce),b.show()):b.hide()},deleteView:function(a){if(a.preventDefault(),this.newView)return alert("Cannot delete a new view.");if(confirm("Are you sure you want to delete this view?")){var c,d=this,f=this.$("#index-name").val(),g=(this.$("#ddoc :selected").val(),this.getCurrentDesignDoc());g.removeDdocView(f),c=g.hasViews()?g.save():g.destroy(),c.then(function(){b.navigate("/database/"+d.database.safeID()+"/_all_docs?limit="+e.DocLimit),b.triggerRouteEvent("reloadDesignDocs")})}},saveView:function(c){var d,e=this;if(c&&c.preventDefault(),this.hasValidCode()&&""!==this.$("#new-ddoc:visible").val()){var f=this.mapEditor.getValue(),g=this.reduceVal(),h=this.$("#index-name").val(),i=this.getCurrentDesignDoc(),j=i.id;this.viewName=h,d=b.addNotification({msg:"Saving document.",selector:"#define-view .errors-container"}),i.setDdocView(h,f,g),i.save().then(function(){if(e.ddocs.add(i),e.mapEditor.editSaved(),e.reduceEditor&&e.reduceEditor.editSaved(),b.addNotification({msg:"View has been saved.",type:"success",selector:"#define-view .errors-container"}),e.newView){var c="/database/"+e.database.safeID()+"/"+i.safeID()+"/_view/"+a.mixins.safeURLName(h);b.navigate(c,{trigger:!1}),e.newView=!1,e.ddocID=i.safeID(),e.viewName=h,e.ddocInfo=i,e.showIndex=!0,e.render(),b.triggerRouteEvent("reloadDesignDocs",{selectedTab:a.mixins.removeSpecialCharacters(j.replace(/_design\//,""))+"_"+a.mixins.removeSpecialCharacters(h)})}e.reduceFunStr!==g&&(e.reduceFunStr=g,e.advancedOptions.renderOnUpdatehasReduce(e.hasReduce())),b.triggerRouteEvent("updateAllDocs",{ddoc:j,view:h})},function(a){var c=JSON.parse(a.responseText).reason;d=b.addNotification({msg:"Save failed: "+c,type:"error",clear:!0})})}else{var k=""===this.$("#new-ddoc:visible").val()?"Enter a design doc name":"Please fix the Javascript errors and try again.";d=b.addNotification({msg:k,type:"error",selector:"#define-view .errors-container"})}},updateView:function(a,c){if(a.preventDefault(),this.newView)return alert("Please save this new view before querying it.");var d=c.errorParams,e=c.params;if(_.any(d))return _.map(d,function(a){return b.addNotification({msg:"JSON Parse Error on field: "+a.name,type:"error",selector:".advanced-options .errors-container"})}),b.addNotification({msg:"Make sure that strings are properly quoted and any other values are valid JSON structures",type:"warning",selector:".advanced-options .errors-container"}),!1;var f=window.location.hash.replace(/\?.*$/,"");f=f+"?"+$.param(e),b.navigate(f,{trigger:!1}),b.triggerRouteEvent("updateAllDocs",{ddoc:this.ddocID,view:this.viewName})},previewView:function(a,c){a.preventDefault();var d=this,g=this.mapVal(),h=this.reduceVal(),i=[];c&&c.params&&(i=c.params);var j=_.reduce(i,function(a,b){return a[b.name]=b.value,a},{reduce:!1});a.preventDefault(),b.addNotification({msg:"<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",type:"warning",selector:".advanced-options .errors-container",fade:!0});
+var k=b.Deferred();this.database.allDocs?k.resolve():(this.database.buildAllDocs({limit:e.DocLimit.toString(),include_docs:!0}),k=this.database.allDocs.fetch()),k.then(function(){j.docs=d.database.allDocs.map(function(a){return a.get("doc")});var a=f.runViewQuery({map:g,reduce:h},j);a.then(function(a){b.triggerRouteEvent("updatePreviewDocs",{rows:a.rows,ddoc:d.getCurrentDesignDoc().id,view:d.viewName})})})},getCurrentDesignDoc:function(){return this.designDocSelector.getCurrentDesignDoc()},isCustomReduceEnabled:function(){return"CUSTOM"==$("#reduce-function-selector").val()},mapVal:function(){return this.mapEditor?this.mapEditor.getValue():this.$("#map-function").text()},reduceVal:function(){var a=this.$("#reduce-function-selector :selected").val(),b="";return"CUSTOM"===a?b=this.reduceEditor.getValue():"NONE"!==a&&(b=a),b},hasValidCode:function(){return _.every(["mapEditor","reduceEditor"],function(a){var b=this[a];return"reduceEditor"!==a||this.isCustomReduceEnabled()?b.hadValidCode():!0},this)},toggleIndexNav:function(a){var b=this.$(a.target).attr("id"),c=this.$(this.$("li.active a").attr("href")),d=this.$(this.$(a.target).attr("href"));if(d.attr("id")!==c.attr("id")&&c.removeAttr("style"),"index-nav"===b){if(this.newView)return;var e=this;d.toggle("slow",function(){e.showEditors()})}else d.toggle("slow")},serialize:function(){return{ddocs:this.ddocs,ddoc:this.model,ddocName:this.model.id,viewName:this.viewName,reduceFunStr:this.reduceFunStr,isCustomReduce:this.hasCustomReduce(),newView:this.newView,langTemplates:this.langTemplates.javascript}},hasCustomReduce:function(){return this.reduceFunStr&&!_.contains(this.builtinReduces,this.reduceFunStr)},hasReduce:function(){return this.reduceFunStr||!1},createReduceEditor:function(){this.reduceEditor&&this.reduceEditor.remove(),this.reduceEditor=new c.Editor({editorId:"reduce-function",mode:"javascript",couchJSHINT:!0}),this.reduceEditor.render()},beforeRender:function(){this.newView?(this.reduceFunStr="_sum",this.model=0===this.ddocs.length?new d.Doc(null,{database:this.database}):this.ddocs.first().dDocModel(),this.ddocID=this.model.id):(this.model=this.ddocs.get(this.ddocID).dDocModel(),this.reduceFunStr=this.model.viewHasReduce(this.viewName),this.setView("#ddoc-info",new g.DdocInfo({model:this.ddocInfo}))),this.designDocSelector=this.setView(".design-doc-group",new g.DesignDocSelector({collection:this.ddocs,ddocName:this.model.id,database:this.database})),this.advancedOptions=this.insertView("#query",new g.AdvancedOptions({updateViewFn:this.updateView,previewFn:this.previewView,database:this.database,viewName:this.viewName,ddocName:this.model.id,hasReduce:this.hasReduce()}))},afterRender:function(){this.params&&this.advancedOptions.updateFromParams(this.params),this.designDocSelector.updateDesignDoc(),this.newView||this.showIndex?(this.showEditors(),this.showIndex=!1):(this.$("#index").hide(),this.$("#index-nav").parent().removeClass("active"))},showEditors:function(){this.mapEditor=new c.Editor({editorId:"map-function",mode:"javascript",couchJSHINT:!0}),this.mapEditor.render(),this.hasCustomReduce()?this.createReduceEditor():$(".control-group.reduce-function").hide(),this.newView&&this.mapEditor.setValue(this.langTemplates[this.defaultLang].map),this.mapEditor.editSaved(),this.reduceEditor&&this.reduceEditor.editSaved()},cleanup:function(){this.mapEditor&&this.mapEditor.remove(),this.reduceEditor&&this.reduceEditor.remove()}}),g.JumpToDoc=b.View.extend({template:"templates/documents/jumpdoc",initialize:function(a){this.database=a.database},events:{"submit #jump-to-doc":"jumpToDoc"},jumpToDoc:function(c){c.preventDefault();var d=this.$("#jump-to-doc-id").val().trim();this.database.allDocs.where({_id:d}).length>0?b.navigate("/database/"+a.mixins.safeURLName(this.database.id)+"/"+a.mixins.safeURLName(d),{trigger:!0}):b.addNotification({msg:"Document ID does not exist.",type:"error"})},afterRender:function(){this.typeAhead=new c.DocSearchTypeahead({el:"#jump-to-doc-id",database:this.database}),this.typeAhead.render()}}),g.Sidebar=b.View.extend({template:"templates/documents/sidebar",events:{"click button#delete-database":"deleteDatabase"},initialize:function(a){this.database=a.database,a.ddocInfo&&(this.ddocID=a.ddocInfo.id,this.currView=a.ddocInfo.currView)},deleteDatabase:function(a){a.preventDefault();var c=confirm("Are you sure you want to delete this database?");if(c){var d=this.database.id;b.addNotification({msg:"Deleting your database...",type:"error",clear:!0}),this.database.destroy().then(function(){b.navigate("#/_all_dbs"),b.addNotification({msg:"The database "+d+" has been deleted.",clear:!0})}).fail(function(a,c,d){b.addNotification({msg:"Could not delete the database, reason "+d+".",type:"error",clear:!0})})}},serialize:function(){var a=b.getExtensions("docLinks"),c=b.getExtensions("sidebar:newLinks"),d=b.getExtensions("sidebar:links"),f=b.getExtensions("sidebar:list");return{changes_url:"#"+this.database.url("changes"),permissions_url:"#"+this.database.url("app")+"/permissions",db_url:"#"+this.database.url("index")+"?limit="+e.DocLimit,database:this.collection.database,database_url:"#"+this.database.url("app"),docLinks:a,docLimit:e.DocLimit,addLinks:d,newLinks:c,extensionList:f>0}},buildIndexList:function(a,b,c){_.each(_.keys(a),function(a){var d=this.ddocID=="_design/"+c;this.insertView("ul.nav."+b,new g.IndexItem({ddoc:c,index:a,database:this.collection.database.id,selected:d&&a==this.currView}))},this)},beforeRender:function(){var a=b.getExtensions("sidebar:list");_.each(a,function(a){var b=this.insertView("#extension-navs",a);b.update(this.database,this.collection,this.viewName),b.render()},this),this.collection.each(function(a){if(a.has("doc")){var b=a.id.replace(/^_design\//,"");a.get("doc").views&&this.buildIndexList(a.get("doc").views,"views",b)}},this)},afterRender:function(){this.selectedTab&&this.setSelectedTab(this.selectedTab)},setSelectedTab:function(a){this.selectedTab=a,this.$("li").removeClass("active"),this.$("#"+a).parent().addClass("active")}}),g.Indexed=b.View.extend({}),g.Changes=b.View.extend({template:"templates/documents/changes",establish:function(){return[this.model.changes.fetch()]},serialize:function(){return{changes:this.model.changes.toJSON(),database:this.model}},afterRender:function(){prettyPrint()}}),g.DdocInfo=b.View.extend({template:"templates/documents/ddoc_info",initialize:function(a){this.refreshTime=a.refreshTime||5e3,this.listenTo(this.model,"change",this.render)},serialize:function(){return{view_index:this.model.get("view_index")}},afterRender:function(){this.startRefreshInterval()},startRefreshInterval:function(){var a=this.model;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)},cleanup:function(){this.stopRefreshInterval()}}),d.Views=g,d}),define("modules/documents/routes",["app","api","modules/documents/views","modules/databases/base"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",disableLoader:!0,selectedHeader:"Databases",initialize:function(a,b,e){var f=e[0];this.docID=e[1]||"new",this.database=this.database||new d.Model({id:f}),this.doc=new c.Doc({_id:this.docID},{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({disableLoader:!0,selected:"code_editor",model:this.doc}))},routes:{"database/:database/:doc/code_editor":"code_editor","database/:database/:doc":"code_editor"},events:{"route:reRenderDoc":"reRenderDoc","route:duplicateDoc":"duplicateDoc"},crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:this.docID,link:"#"}]},code_editor:function(){this.tabsView.updateSelected("code_editor"),this.docView=this.setView("#dashboard-content",new c.Views.Doc({model:this.doc,database:this.database}))},reRenderDoc:function(){this.docView.forceRender()},field_editor:function(){this.tabsView.updateSelected("field_editor"),this.docView=this.setView("#dashboard-content",new c.Views.DocFieldEditor({model:this.doc}))},duplicateDoc:function(c){var d=this.doc,e=this.docView,f=this.database;d.copy(c).then(function(){d.set({_id:c}),e.forceRender(),b.navigate("/database/"+f.safeID()+"/"+a.mixins.safeURLName(c),{trigger:!0}),b.addNotification({msg:"Document has been duplicated."})},function(a){var c="Could not duplicate document, reason: "+a.responseText+".";b.addNotification({msg:c,type:"error"})})},apiUrl:function(){return[this.doc.url("apiurl"),this.doc.documentation()]}}),f=e.extend({initialize:function(a,b,e){var f=e[0];this.database=this.database||new d.Model({id:f}),this.doc=new c.NewDoc(null,{database:this.database}),this.tabsView=this.setView("#tabs",new c.Views.FieldEditorTabs({selected:"code_editor",model:this.doc}))},crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"New",link:"#"}]},routes:{"database/:database/new":"code_editor"},selectedHeader:"Databases"}),g=b.RouteObject.extend({layout:"with_tabs_sidebar",selectedHeader:"Databases",routes:{"database/:database/_all_docs(:extra)":"allDocs","database/:database/_design/:ddoc/_view/:view":{route:"viewFn",roles:["_admin"]},"database/:database/new_view":"newViewEditor"},events:{"route:updateAllDocs":"updateAllDocsFromView","route:updatePreviewDocs":"updateAllDocsFromPreview","route:reloadDesignDocs":"reloadDesignDocs","route:paginate":"paginate"},initialize:function(b,e,f){var g=a.getParams();g.include_docs=!0,this.databaseName=f[0],this.data={database:new d.Model({id:this.databaseName})},this.data.designDocs=new c.AllDocs(null,{database:this.data.database,params:{startkey:'"_design"',endkey:'"_design1"',include_docs:!0}}),this.sidebar=this.setView("#sidebar-content",new c.Views.Sidebar({collection:this.data.designDocs,database:this.data.database}))},establish:function(){return this.data.designDocs.fetch()},allDocs:function(b,e){var f=a.getParams(e);f.include_docs=!0,this.data.database.buildAllDocs(f),f.startkey&&f.startkey.indexOf("_design")>-1?this.sidebar.setSelectedTab("design-docs"):this.sidebar.setSelectedTab("all-docs"),this.viewEditor&&this.viewEditor.remove(),this.toolsView=this.setView("#dashboard-upper-menu",new c.Views.JumpToDoc({database:this.data.database,collection:this.data.database.allDocs})),this.setView("#dashboard-upper-content",new c.Views.AllDocsLayout({database:this.data.database,collection:this.data.database.allDocs,params:f})),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({collection:this.data.database.allDocs})),this.crumbs=[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}],this.apiUrl=[this.data.database.allDocs.url("apiurl"),this.data.database.allDocs.documentation()]},viewFn:function(b,e,f){var g=a.getParams(),h=decodeURIComponent(e);f=f.replace(/\?.*$/,""),this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:h,view:f,params:g});var i={id:"_design/"+h,currView:f,designDocs:this.data.designDocs};this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({model:this.data.database,ddocs:this.data.designDocs,viewName:f,params:g,newView:!1,database:this.data.database,ddocInfo:i})),this.toolsView&&this.toolsView.remove(),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0,ddocInfo:i})),this.sidebar.setSelectedTab(a.mixins.removeSpecialCharacters(e)+"_"+a.mixins.removeSpecialCharacters(f)),this.crumbs=function(){return[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}]},this.apiUrl=[this.data.indexedDocs.url("apiurl"),"docs"]},newViewEditor:function(){var b=a.getParams();this.toolsView&&this.toolsView.remove(),this.viewEditor=this.setView("#dashboard-upper-content",new c.Views.ViewEditor({ddocs:this.data.designDocs,params:b,database:this.data.database,newView:!0})),this.sidebar.setSelectedTab("new-view"),this.crumbs=function(){return[{name:this.data.database.id,link:d.databaseUrl(this.data.database)}]}},updateAllDocsFromView:function(b){var d=b.view,e=a.getParams(),f=b.ddoc;return b.allDocs?(e.include_docs=!0,this.data.database.buildAllDocs(e),void 0):(this.data.indexedDocs=new c.IndexCollection(null,{database:this.data.database,design:f,view:d,params:a.getParams()}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0})),void 0)},updateAllDocsFromPreview:function(a){var b=a.view,d=a.rows,e=a.ddoc;this.data.indexedDocs=new c.PouchIndexCollection(null,{database:this.data.database,design:e,view:b,rows:d}),this.documentsView=this.setView("#dashboard-lower-content",new c.Views.AllDocsList({database:this.data.database,collection:this.data.indexedDocs,nestedView:c.Views.Row,viewList:!0}))},paginate:function(b){_.extend(this.documentsView.collection.params,a.getParams()),this.documentsView.forceRender(),this.documentsView.collection.skipFirstItem="next"===b?!0:!1},reloadDesignDocs:function(a){this.sidebar.forceRender(),a&&a.selectedTab&&this.sidebar.setSelectedTab(a.selectedTab)}}),h=b.RouteObject.extend({layout:"with_tabs",selectedHeader:"Databases",crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"_changes",link:"/_changes"}]},routes:{"database/:database/_changes(:params)":"changes"},initialize:function(b,e,f){this.databaseName=f[0],this.database=new d.Model({id:this.databaseName});var g=a.getParams();this.database.buildChanges(g),this.setView("#tabs",new c.Views.Tabs({collection:this.designDocs,database:this.database,active_id:"changes"}))},changes:function(){this.setView("#dashboard-content",new c.Views.Changes({model:this.database}))},apiUrl:function(){return[this.database.url("apiurl"),this.database.documentation()]}});return c.RouteObjects=[e,f,g,h],c}),define("modules/documents/base",["app","api","modules/documents/routes"],function(a,b,c){return c}),define("addons/activetasks/resources",["app","backbone","modules/fauxton/base","d3"],function(a){{var b={};a.versionAPI}return a.taskSortBy="type",b.Task=Backbone.Model.extend({initialize:function(){this.set({id:this.get("pid")})}}),b.Tasks=Backbone.Model.extend({alltypes:{all:"All tasks",replication:"Replication",database_compaction:" Database Compaction",indexer:"Indexer",view_compaction:"View Compaction"},documentation:"_active_tasks",url:function(b){return"apiurl"===b?window.location.origin+"/_active_tasks":a.host+"/_active_tasks"},fetch:function(a){var b=a||{};return b.cache=!1,Backbone.Model.prototype.fetch.call(this,b)},parse:function(a){var c=this.getUniqueTypes(a),d=this,e=_.reduce(c,function(c,e,f){return c[f]=new b.AllTasks(d.sortThis(a,f)),c},{});e.all=new b.AllTasks(a),this.set(e)},getUniqueTypes:function(a){var b=this.alltypes;return _.each(a,function(a){"undefined"==typeof b[a.type]&&(b[a.type]=a.type.replace(/_/g," "))},this),this.alltypes=b,b},sortThis:function(a,b){return _.filter(a,function(a){return a.type===b})},changeView:function(a){this.set({currentView:a})},getCurrentViewData:function(){var a=this.get("currentView");return this.get(a)},getDatabaseCompactions:function(){return this.get("databaseCompactions")},getIndexes:function(){return this.get("indexes")},getViewCompactions:function(){return this.get("viewCompactions")}}),b.AllTasks=Backbone.Collection.extend({model:b.Task,sortByColumn:function(b){a.taskSortBy=b,this.sort()},comparator:function(b){return b.get(a.taskSortBy)}}),b}),define("addons/activetasks/views",["app","api","addons/activetasks/resources"],function(a,b){var c={},d={},e={rate:"5",intervalId:null};return c.Events=_.extend(d,Backbone.Events),c.TabMenu=b.View.extend({template:"addons/activetasks/templates/tabs",events:{"click .task-tabs li":"requestByType","change #pollingRange":"changePollInterval"},establish:function(){return[this.model.fetch({reset:!0})]},serialize:function(){return{filters:this.model.alltypes}},afterRender:function(){this.$(".task-tabs").find("li").eq(0).addClass("active")},changePollInterval:function(a){var b=this.$(a.currentTarget).val();this.$('label[for="pollingRange"] span').text(b),e.rate=b,clearInterval(e.intervalId),d.trigger("update:poll")},cleanup:function(){clearInterval(e.intervalId)},requestByType:function(a){var b=a.currentTarget;datatype=this.$(b).attr("data-type"),this.$(".task-tabs").find("li").removeClass("active"),this.$(b).addClass("active"),this.model.changeView(datatype)}}),c.DataSection=b.View.extend({showData:function(){var a=this.model.getCurrentViewData();this.dataView?this.dataView.update(a,this.model.get("currentView").replace("_"," ")):this.dataView=this.insertView(new c.TableData({collection:a,currentView:this.model.get("currentView").replace("_"," ")}))},showDataAndRender:function(){this.showData(),this.dataView.render()},beforeRender:function(){this.showData()},establish:function(){return[this.model.fetch()]},setPolling:function(){var a=this;clearInterval(e.intervalId),e.intervalId=setInterval(function(){a.establish()},1e3*e.rate)},cleanup:function(){clearInterval(e.intervalId)},afterRender:function(){this.listenTo(this.model,"change",this.showDataAndRender),d.bind("update:poll",this.setPolling,this),this.setPolling()}}),c.TableData=b.View.extend({tagName:"table",className:"table table-bordered table-striped active-tasks",template:"addons/activetasks/templates/table",events:{"click th":"sortByType"},initialize:function(){currentView=this.options.currentView},sortByType:function(a){var b=a.currentTarget;datatype=$(b).attr("data-type"),this.collection.sortByColumn(datatype),this.render()},serialize:function(){return{currentView:currentView,collection:this.collection}},update:function(a,b){this.collection=a,this.currentView=b},beforeRender:function(){this.collection.forEach(function(a){this.insertView("#tasks_go_here",new c.TableDetail({model:a}))},this)}}),c.TableDetail=b.View.extend({tagName:"tr",template:"addons/activetasks/templates/tabledetail",initialize:function(){this.type=this.model.get("type")},getObject:function(){var a=this.model.get("database");return"replication"===this.type&&(a=this.model.get("source")+" to "+this.model.get("target")),a},getProgress:function(){var a="";return"indexer"===this.type&&(a="Processed "+this.model.get("changes_done")+" of "+this.model.get("total_changes")+" changes"),a},serialize:function(){return{model:this.model,objectField:this.getObject(),progress:this.getProgress()}}}),c}),define("addons/activetasks/routes",["app","api","addons/activetasks/resources","addons/activetasks/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"with_sidebar",routes:{"activetasks/:id":"defaultView",activetasks:"defaultView"},selectedHeader:"Active Tasks",crumbs:[{name:"Active tasks",link:"activetasks"}],apiUrl:function(){return[this.newtasks.url("apiurl"),this.newtasks.documentation]},roles:["_admin"],defaultView:function(){this.newtasks=new c.Tasks({currentView:"all",id:"activeTasks"}),this.setView("#sidebar-content",new d.TabMenu({currentView:"all",model:this.newtasks})),this.setView("#dashboard-content",new d.DataSection({model:this.newtasks,currentView:"all"}))}});return c.RouteObjects=[e],c}),define("addons/activetasks/base",["app","api","addons/activetasks/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Active Tasks",icon:"fonticon-activetasks",href:"#/activetasks"})},c}),define("addons/config/resources",["app","api"],function(a,b){var c=b.addon();return c.Model=Backbone.Model.extend({}),c.OptionModel=Backbone.Model.extend({documentation:"config",url:function(){return a.host+"/_config/"+this.get("section")+"/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}}),c.Collection=Backbone.Collection.extend({model:c.Model,documentation:"config",url:function(){return a.host+"/_config"},parse:function(a){return _.map(a,function(a,b){return{section:b,options:_.map(a,function(a,b){return{name:b,value:a}})}})}}),c.ViewItem=b.View.extend({tagName:"tr",className:"config-item",template:"addons/config/templates/item",events:{"click .edit-button":"editValue","click #delete-value":"deleteValue","click #cancel-value":"cancelEdit","click #save-value":"saveValue"},deleteValue:function(){var a=confirm("Are you sure you want to delete this configuration value?");a&&(this.model.destroy(),this.remove())},editValue:function(){this.$("#show-value").hide(),this.$("#edit-value-form").show()},saveValue:function(){this.model.save({value:this.$(".value-input").val()}),this.render()},cancelEdit:function(){this.$("#edit-value-form").hide(),this.$("#show-value").show()},serialize:function(){return{option:this.model.toJSON()}}}),c.View=b.View.extend({template:"addons/config/templates/dashboard",events:{"click #add-section":"addSection","submit #add-section-form":"submitForm"},submitForm:function(a){a.preventDefault();var b=new c.OptionModel({section:this.$('input[name="section"]').val(),name:this.$('input[name="name"]').val(),value:this.$('input[name="value"]').val()});b.save();var d=this.collection.find(function(a){return a.get("section")===b.get("section")});d?d.get("options").push(b.attributes):this.collection.add({section:b.get("section"),options:[b.attributes]}),this.$("#add-section-modal").modal("hide"),this.render()},addSection:function(a){a.preventDefault(),this.$("#add-section-modal").modal({show:!0})},beforeRender:function(){this.collection.each(function(a){_.each(a.get("options"),function(b,d){this.insertView("table.config tbody",new c.ViewItem({model:new c.OptionModel({section:a.get("section"),name:b.name,value:b.value,index:d})}))},this)},this)},establish:function(){return[this.collection.fetch()]}}),c}),define("addons/config/routes",["app","api","addons/config/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",initialize:function(){this.configs=new c.Collection},roles:["_admin"],selectedHeader:"Config",crumbs:[{name:"Config",link:"_config"}],apiUrl:function(){return[this.configs.url(),this.configs.documentation]},routes:{_config:"config"},config:function(){this.setView("#dashboard-content",new c.View({collection:this.configs}))},establish:function(){return[this.configs.fetch()]}});return c.RouteObjects=[d],c}),define("addons/config/base",["app","api","addons/config/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Config",href:"#_config",icon:"fonticon-cog",className:"config"})},c}),define("addons/logs/resources",["app","api","backbone"],function(a,b,c){var d=b.addon();return d.Model=c.Model.extend({date:function(){var a=new Date(this.get("date")),b=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds(),c=a.toDateString().slice(4,10);return c+" "+b},logLevel:function(){return this.get("log_level").replace(/ /g,"")},pid:function(){return _.escape(this.get("pid"))},args:function(){return _.escape(this.get("args"))}}),d.Collection=c.Collection.extend({model:d.Model,initialize:function(){this.params={bytes:5e3}},documentation:"log",url:function(){return query="?"+$.param(this.params),a.host+"/_log"+query},fetch:function(a){return a=a?a:{},c.Collection.prototype.fetch.call(this,_.extend(a,{dataType:"html"}))},parse:function(a){var b=a.split(/\n/);return _.foldr(b,function(a,b){var c=b.match(/^\[(.*?)\]\s\[(.*?)\]\s\[(.*?)\]\s(.*)/);return c?(a.push({date:c[1],log_level:c[2],pid:c[3],args:c[4]}),a):a},[])}}),d.events={},_.extend(d.events,c.Events),d.Views.View=b.View.extend({template:"addons/logs/templates/dashboard",initialize:function(a){this.refreshTime=a.refreshTime||5e3,d.events.on("log:filter",this.filterLogs,this),d.events.on("log:remove",this.removeFilterLogs,this),this.filters=[],this.collection.on("add",function(){this.render()},this)},establish:function(){return[this.collection.fetch()]},serialize:function(){return{logs:new d.Collection(this.createFilteredCollection())}},afterRender:function(){this.startRefreshInterval()},cleanup:function(){this.stopRefreshInterval()},filterLogs:function(a){this.filters.push(a),this.render()},createFilteredCollection:function(){return _.reduce(this.filters,function(a,b){return _.filter(a,function(a){var c=!1;return _.each(a,function(a){a.toString().match(new RegExp(b))&&(c=!0)}),c})},this.collection.toJSON(),this)},removeFilterLogs:function(a){this.filters.splice(this.filters.indexOf(a),1),this.render()},startRefreshInterval:function(){var a=this.collection;this.intervalId||(this.intervalId=setInterval(function(){a.fetch()},this.refreshTime))},stopRefreshInterval:function(){clearInterval(this.intervalId)}}),d.Views.FilterView=b.View.extend({template:"addons/logs/templates/sidebar",events:{"submit #log-filter-form":"filterLogs"},filterLogs:function(a){a.preventDefault();var b=this.$('input[name="filter"]'),c=b.val();d.events.trigger("log:filter",c),this.insertView("#filter-list",new d.Views.FilterItemView({filter:c})).render(),b.val("")}}),d.Views.FilterItemView=b.View.extend({template:"addons/logs/templates/filterItem",tagName:"li",initialize:function(a){this.filter=a.filter},events:{"click .remove-filter":"removeFilter"},serialize:function(){return{filter:this.filter}},removeFilter:function(a){a.preventDefault(),d.events.trigger("log:remove",this.filter),this.remove()}}),d}),define("addons/logs/routes",["app","api","addons/logs/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",crumbs:[{name:"Logs",link:"_log"}],routes:{_log:"showLog"},selectedHeader:"Log",roles:["_admin"],apiUrl:function(){return[this.logs.url(),this.logs.documentation]},initialize:function(){this.logs=new c.Collection,this.setView("#sidebar-content",new c.Views.FilterView({}))},showLog:function(){this.setView("#dashboard-content",new c.Views.View({collection:this.logs}))}});return c.RouteObjects=[d],c}),define("addons/logs/base",["app","api","addons/logs/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Log",href:"#_log",icon:"fonticon-log",className:"logs"})},c}),define("addons/stats/resources",["app","api","backbone","lodash","modules/fauxton/base"],function(a,b,c,d){var e=new b.addon;return e.Collection=Backbone.Collection.extend({model:Backbone.Model,documentation:"stats",url:a.host+"/_stats",parse:function(a){return d.flatten(d.map(a,function(a,b){return d.map(a,function(a,c){return d.extend({id:c,type:b},a)})}),!0)}}),e}),function(){function a(a,b){return new Date(b,a+1,0).getDate()}function b(a,b,c){return function(d,e,f){var g=a(d),h=[];if(d>g&&b(g),f>1)for(;e>g;){var i=new Date(+g);c(i)%f===0&&h.push(i),b(g)}else for(;e>g;)h.push(new Date(+g)),b(g);return h}}var c=window.nv||{};c.version="0.0.1a",c.dev=!0,window.nv=c,c.tooltip={},c.utils={},c.models={},c.charts={},c.graphs=[],c.logs={},c.dispatch=d3.dispatch("render_start","render_end"),c.dev&&(c.dispatch.on("render_start",function(){c.logs.startTime=+new Date}),c.dispatch.on("render_end",function(){c.logs.endTime=+new Date,c.logs.totalTime=c.logs.endTime-c.logs.startTime,c.log("total",c.logs.totalTime)})),c.log=function(){if(c.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(c.dev&&console.log&&Function.prototype.bind){var a=Function.prototype.bind.call(console.log,console);a.apply(console,arguments)}return arguments[arguments.length-1]},c.render=function(a){a=a||1,c.render.active=!0,c.dispatch.render_start(),setTimeout(function(){for(var b,d,e=0;a>e&&(d=c.render.queue[e]);e++)b=d.generate(),typeof d.callback==typeof Function&&d.callback(b),c.graphs.push(b);c.render.queue.splice(0,e),c.render.queue.length?setTimeout(arguments.callee,0):(c.render.active=!1,c.dispatch.render_end())},0)},c.render.active=!1,c.render.queue=[],c.addGraph=function(a){typeof arguments[0]==typeof Function&&(a={generate:arguments[0],callback:arguments[1]}),c.render.queue.push(a),c.render.active||c.render()},c.identity=function(a){return a},c.strip=function(a){return a.replace(/(\s|&)/g,"")},d3.time.monthEnd=function(a){return new Date(a.getFullYear(),a.getMonth(),0)},d3.time.monthEnds=b(d3.time.monthEnd,function(b){b.setUTCDate(b.getUTCDate()+1),b.setDate(a(b.getMonth()+1,b.getFullYear()))},function(a){return a.getMonth()}),function(){var a=window.nv.tooltip={};a.show=function(a,b,d,e,f,g){var h=document.createElement("div");h.className="nvtooltip "+(g?g:"xy-tooltip"),d=d||"s",e=e||20;var i=f;(!f||f.tagName.match(/g|svg/i))&&(i=document.getElementsByTagName("body")[0]),h.innerHTML=b,h.style.left=0,h.style.top=0,h.style.opacity=0,i.appendChild(h);var j,k,l=parseInt(h.offsetHeight),m=parseInt(h.offsetWidth),n=c.utils.windowSize().width,o=c.utils.windowSize().height,p=window.scrollY,q=window.scrollX;o=window.innerWidth>=document.body.scrollWidth?o:o-16,n=window.innerHeight>=document.body.scrollHeight?n:n-16;var r=function(a){var b=k;do isNaN(a.offsetTop)||(b+=a.offsetTop);while(a=a.offsetParent);return b},s=function(a){var b=j;do isNaN(a.offsetLeft)||(b+=a.offsetLeft);while(a=a.offsetParent);return b};switch(d){case"e":j=a[0]-m-e,k=a[1]-l/2;var t=s(h),u=r(h);q>t&&(j=a[0]+e>q?a[0]+e:q-t+j),p>u&&(k=p-u+k),u+l>p+o&&(k=p+o-u+k-l);break;case"w":j=a[0]+e,k=a[1]-l/2,t+m>n&&(j=a[0]-m-e),p>u&&(k=p+5),u+l>p+o&&(k=p-l-5);break;case"n":j=a[0]-m/2-5,k=a[1]+e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),u+l>p+o&&(k=p+o-u+k-l);break;case"s":j=a[0]-m/2,k=a[1]-l-e;var t=s(h),u=r(h);q>t&&(j=q+5),t+m>n&&(j=j-m/2+5),p>u&&(k=p)}return h.style.left=j+"px",h.style.top=k+"px",h.style.opacity=1,h.style.position="absolute",h.style.pointerEvents="none",h},a.cleanup=function(){for(var a=document.getElementsByClassName("nvtooltip"),b=[];a.length;)b.push(a[0]),a[0].style.transitionDelay="0 !important",a[0].style.opacity=0,a[0].className="nvtooltip-pending-removal";setTimeout(function(){for(;b.length;){var a=b.pop();a.parentNode.removeChild(a)}},500)}}(),c.utils.windowSize=function(){var a={width:640,height:480};return document.body&&document.body.offsetWidth&&(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight),"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth&&(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(a.width=window.innerWidth,a.height=window.innerHeight),a},c.utils.windowResize=function(a){var b=window.onresize;window.onresize=function(c){"function"==typeof b&&b(c),a(c)}},c.utils.getColor=function(a){return arguments.length?"[object Array]"===Object.prototype.toString.call(a)?function(b,c){return b.color||a[c%a.length]}:a:c.utils.defaultColor()},c.utils.defaultColor=function(){var a=d3.scale.category20().range();return function(b,c){return b.color||a[c%a.length]}},c.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return d||(d=c.length),"undefined"!=typeof a[f]?"function"==typeof a[f]?a[f]():a[f]:c[--d]}},c.utils.pjax=function(a,b){function d(d){d3.html(d,function(d){var e=d3.select(b).node();e.parentNode.replaceChild(d3.select(d).select(b).node(),e),c.utils.pjax(a,b)})}d3.selectAll(a).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},c.utils.calcApproxTextWidth=function(a){if(a instanceof d3.selection){var b=parseInt(a.style("font-size").replace("px","")),c=a.text().length;return c*b*.5}return 0},c.models.axis=function(){function a(e){return e.each(function(a){var e=d3.select(this),p=e.selectAll("g.nv-wrap.nv-axis").data([a]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),r=(q.append("g"),p.select("g"));null!==n?b.ticks(n):("top"==b.orient()||"bottom"==b.orient())&&b.ticks(Math.abs(f.range()[1]-f.range()[0])/100),d3.transition(r).call(b),o=o||b.scale();var s=b.tickFormat();
+null==s&&(s=o.tickFormat());var t=r.selectAll("text.nv-axislabel").data([g||null]);switch(t.exit().remove(),b.orient()){case"top":t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",0).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+f(a)+",0)"}).select("text").attr("dy","0em").attr("y",-b.tickPadding()).attr("text-anchor","middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate("+f.range()[b]+",0)"})}break;case"bottom":var w=36,x=30,y=r.selectAll("g").select("text");if(j%360){y.each(function(){var a=this.getBBox().width;a>x&&(x=a)});var z=Math.abs(Math.sin(j*Math.PI/180)),w=(z?z*x:x)+30;y.attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j%360>0?"start":"end")}t.enter().append("text").attr("class","nv-axislabel");var u=2==f.range().length?f.range()[1]:f.range()[f.range().length-1]+(f.range()[1]-f.range()[0]);if(t.attr("text-anchor","middle").attr("y",w).attr("x",u/2),h){var v=p.selectAll("g.nv-axisMaxMin").data([f.domain()[0],f.domain()[f.domain().length-1]]);v.enter().append("g").attr("class","nv-axisMaxMin").append("text"),v.exit().remove(),v.attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",b.tickPadding()).attr("transform",function(){return"rotate("+j+" 0,0)"}).attr("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a){return"translate("+(f(a)+(m?f.rangeBand()/2:0))+",0)"})}l&&y.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"});break;case"right":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(c.right,d)+12:-10).attr("x",k?f.range()[0]/2:b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+f(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",b.tickPadding()).attr("text-anchor","start").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(t.enter().append("text").attr("class","nv-axislabel"),t.attr("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(c.left,d)+12:-10).attr("x",k?-f.range()[0]/2:-b.tickPadding()),h){var v=p.selectAll("g.nv-axisMaxMin").data(f.domain());v.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),v.exit().remove(),v.attr("transform",function(a){return"translate(0,"+o(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-b.tickPadding()).attr("text-anchor","end").text(function(a){var b=s(a);return(""+b).match("NaN")?"":b}),d3.transition(v).attr("transform",function(a,b){return"translate(0,"+f.range()[b]+")"}).select("text").style("opacity",1)}}if(t.text(function(a){return a}),!h||"left"!==b.orient()&&"right"!==b.orient()||(r.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(f(a)<f.range()[1]+10||f(a)>f.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),f.domain()[0]==f.domain()[1]&&0==f.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),h&&("top"===b.orient()||"bottom"===b.orient())){var A=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?A.push(f(a)-this.getBBox().width-4):A.push(f(a)+this.getBBox().width+4)}catch(c){b?A.push(f(a)-4):A.push(f(a)+4)}}),r.selectAll("g").each(function(a){(f(a)<A[0]||f(a)>A[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}i&&r.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a.__data__)/1e6)&&void 0!==a.__data__}).classed("zero",!0),o=f.copy()}),a}var b=d3.svg.axis(),c={top:0,right:0,bottom:0,left:0},d=75,e=60,f=d3.scale.linear(),g=null,h=!0,i=!0,j=0,k=!0,l=!1,m=!1,n=null;b.scale(f).orient("bottom").tickFormat(function(a){return a});var o;return a.axis=b,d3.rebind(a,b,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a.margin=function(b){return arguments.length?(c.top="undefined"!=typeof b.top?b.top:c.top,c.right="undefined"!=typeof b.right?b.right:c.right,c.bottom="undefined"!=typeof b.bottom?b.bottom:c.bottom,c.left="undefined"!=typeof b.left?b.left:c.left,a):c},a.width=function(b){return arguments.length?(d=b,a):d},a.ticks=function(b){return arguments.length?(n=b,a):n},a.height=function(b){return arguments.length?(e=b,a):e},a.axisLabel=function(b){return arguments.length?(g=b,a):g},a.showMaxMin=function(b){return arguments.length?(h=b,a):h},a.highlightZero=function(b){return arguments.length?(i=b,a):i},a.scale=function(c){return arguments.length?(f=c,b.scale(f),m="function"==typeof f.rangeBands,d3.rebind(a,f,"domain","range","rangeBand","rangeBands"),a):f},a.rotateYLabel=function(b){return arguments.length?(k=b,a):k},a.rotateLabels=function(b){return arguments.length?(j=b,a):j},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a},c.models.bullet=function(){function a(c){return c.each(function(a,c){{var d=j-b.left-b.right,l=k-b.top-b.bottom,o=d3.select(this),p=f.call(this,a,c).slice().sort(d3.descending),q=g.call(this,a,c).slice().sort(d3.descending),r=h.call(this,a,c).slice().sort(d3.descending),s=d3.scale.linear().domain(d3.extent(d3.merge([i,p]))).range(e?[d,0]:[0,d]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(s.range())}this.__chart__=s;var t=d3.min(p),u=d3.max(p),v=p[1],w=o.selectAll("g.nv-wrap.nv-bullet").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),y=x.append("g"),z=w.select("g");y.append("rect").attr("class","nv-range nv-rangeMax"),y.append("rect").attr("class","nv-range nv-rangeAvg"),y.append("rect").attr("class","nv-range nv-rangeMin"),y.append("rect").attr("class","nv-measure"),y.append("path").attr("class","nv-markerTriangle"),w.attr("transform","translate("+b.left+","+b.top+")");var A=function(a){return Math.abs(s(a)-s(0))},B=function(a){return 0>a?s(a):s(0)};z.select("rect.nv-rangeMax").attr("height",l).attr("width",A(u>0?u:t)).attr("x",B(u>0?u:t)).datum(u>0?u:t),z.select("rect.nv-rangeAvg").attr("height",l).attr("width",A(v)).attr("x",B(v)).datum(v),z.select("rect.nv-rangeMin").attr("height",l).attr("width",A(u)).attr("x",B(u)).attr("width",A(u>0?t:u)).attr("x",B(u>0?t:u)).datum(u>0?t:u),z.select("rect.nv-measure").style("fill",m).attr("height",l/3).attr("y",l/3).attr("width",0>r?s(0)-s(r[0]):s(r[0])-s(0)).attr("x",B(r)).on("mouseover",function(){n.elementMouseover({value:r[0],label:"Current",pos:[s(r[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:r[0],label:"Current"})});var C=l/6;q[0]?z.selectAll("path.nv-markerTriangle").attr("transform",function(){return"translate("+s(q[0])+","+l/2+")"}).attr("d","M0,"+C+"L"+C+","+-C+" "+-C+","+-C+"Z").on("mouseover",function(){n.elementMouseover({value:q[0],label:"Previous",pos:[s(q[0]),l/2]})}).on("mouseout",function(){n.elementMouseout({value:q[0],label:"Previous"})}):z.selectAll("path.nv-markerTriangle").remove(),w.selectAll(".nv-range").on("mouseover",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseover({value:a,label:c,pos:[s(a),l/2]})}).on("mouseout",function(a,b){var c=b?1==b?"Mean":"Minimum":"Maximum";n.elementMouseout({value:a,label:c})})}),a}var b={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers},h=function(a){return a.measures},i=[0],j=380,k=30,l=null,m=c.utils.getColor(["#1f77b4"]),n=d3.dispatch("elementMouseover","elementMouseout");return a.dispatch=n,a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(f=b,a):f},a.markers=function(b){return arguments.length?(g=b,a):g},a.measures=function(b){return arguments.length?(h=b,a):h},a.forceX=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.bulletChart=function(){function a(c){return c.each(function(d,n){var r=d3.select(this),s=(j||parseInt(r.style("width"))||960)-f.left-f.right,t=k-f.top-f.bottom,u=this;if(a.update=function(){a(c)},a.container=this,!d||!g.call(this,d,n)){var v=r.selectAll(".nv-noData").data([o]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+s/2).attr("y",18+f.top+t/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove();var w=g.call(this,d,n).slice().sort(d3.descending),x=h.call(this,d,n).slice().sort(d3.descending),y=i.call(this,d,n).slice().sort(d3.descending),z=r.selectAll("g.nv-wrap.nv-bulletChart").data([d]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-bulletWrap"),B.append("g").attr("class","nv-titles"),z.attr("transform","translate("+f.left+","+f.top+")");var D=d3.scale.linear().domain([0,Math.max(w[0],x[0],y[0])]).range(e?[s,0]:[0,s]),E=this.__chart__||d3.scale.linear().domain([0,1/0]).range(D.range());this.__chart__=D;var F=B.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(k-f.top-f.bottom)/2+")");F.append("text").attr("class","nv-title").text(function(a){return a.title}),F.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),b.width(s).height(t);var G=C.select(".nv-bulletWrap");d3.transition(G).call(b);var H=l||D.tickFormat(s/100),I=C.selectAll("g.nv-tick").data(D.ticks(s/50),function(a){return this.textContent||H(a)}),J=I.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+E(a)+",0)"}).style("opacity",1e-6);J.append("line").attr("y1",t).attr("y2",7*t/6),J.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*t/6).text(H);var K=d3.transition(I).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1);K.select("line").attr("y1",t).attr("y2",7*t/6),K.select("text").attr("y",7*t/6),d3.transition(I.exit()).attr("transform",function(a){return"translate("+D(a)+",0)"}).style("opacity",1e-6).remove(),p.on("tooltipShow",function(a){a.key=d.title,m&&q(a,u.parentNode)})}),d3.timer.flush(),a}var b=c.models.bullet(),d="left",e=!1,f={top:5,right:40,bottom:20,left:120},g=function(a){return a.ranges},h=function(a){return a.markers},i=function(a){return a.measures},j=null,k=55,l=null,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3><p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide"),q=function(b,d){var e=b.pos[0]+(d.offsetLeft||0)+f.left,g=b.pos[1]+(d.offsetTop||0)+f.top,h=n(b.key,b.label,b.value,b,a);c.tooltip.show([e,g],h,b.value<0?"e":"w",null,d)};return b.dispatch.on("elementMouseover.tooltip",function(a){p.tooltipShow(a)}),b.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.bullet=b,d3.rebind(a,b,"color"),a.orient=function(b){return arguments.length?(d=b,e="right"==d||"bottom"==d,a):d},a.ranges=function(b){return arguments.length?(g=b,a):g},a.markers=function(b){return arguments.length?(h=b,a):h},a.measures=function(b){return arguments.length?(i=b,a):i},a.width=function(b){return arguments.length?(j=b,a):j},a.height=function(b){return arguments.length?(k=b,a):k},a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.tickFormat=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.cumulativeLineChart=function(){function a(c){return c.each(function(c){function s(){d3.select(a.container).style("cursor","ew-resize")}function C(){A.x=d3.event.x,A.i=Math.round(z.invert(A.x)),E()}function D(){d3.select(a.container).style("cursor","auto"),u.index=A.i,y.stateChange(u)}function E(){W.data([A]),F.call(a)}var F=d3.select(this).classed("nv-chart-"+t,!0),G=this,H=(m||parseInt(F.style("width"))||960)-k.left-k.right,I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom;if(a.update=function(){F.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var J;v={};for(J in u)v[J]=u[J]instanceof Array?u[J].slice(0):u[J]}var K=d3.behavior.drag().on("dragstart",s).on("drag",C).on("dragend",D);if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var L=F.selectAll(".nv-noData").data([w]);return L.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),L.attr("x",k.left+H/2).attr("y",k.top+I/2).text(function(a){return a}),a}if(F.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),r)f.yDomain(null);else{var M=c.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),N=[d3.min(M,function(a){return a[0]}),d3.max(M,function(a){return a[1]})];f.yDomain(N)}z.domain([0,c[0].values.length-1]).range([0,H]).clamp(!0);var c=b(A.i,c),O=F.selectAll("g.nv-wrap.nv-cumulativeLine").data([c]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),Q=O.select("g");if(P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-background"),P.append("g").attr("class","nv-linesWrap"),P.append("g").attr("class","nv-avgLinesWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),o&&(i.width(H),Q.select(".nv-legendWrap").datum(c).call(i),k.top!=i.height()&&(k.top=i.height()+i.legendBelowPadding(),I=(n||parseInt(F.style("height"))||400)-k.top-k.bottom),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),q){var R=[{key:"Re-scale y-axis",disabled:!r}];j.width(140).color(["#444","#444","#444"]),Q.select(".nv-controlsWrap").datum(R).attr("transform","translate(0,"+-k.top+")").call(j)}O.attr("transform","translate("+k.left+","+k.top+")");var S=c.filter(function(a){return a.tempDisabled});O.select(".tempDisabled").remove(),S.length&&O.append("text").attr("class","tempDisabled").attr("x",H/2).attr("y","-.71em").style("text-anchor","end").text(S.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),P.select(".nv-background").append("rect"),Q.select(".nv-background rect").attr("width",H).attr("height",I),f.y(function(a){return a.display.y}).width(H).height(I).color(c.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].tempDisabled}));var T=Q.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled&&!a.tempDisabled}));T.call(f),c.forEach(function(a,b){a.seriesIndex=b});var U=c.filter(function(a){return!a.disabled&&!!x(a)}),V=Q.select(".nv-avgLinesWrap").selectAll("line").data(U,function(a){return a.key});V.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.attr("x1",0).attr("x2",H).attr("y1",function(a){return e(x(a))}).attr("y2",function(a){return e(x(a))}),V.exit().remove();var W=T.selectAll(".nv-indexLine").data([A]);W.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).call(K),W.attr("transform",function(a){return"translate("+z(a.i)+",0)"}).attr("height",I),g.scale(d).ticks(Math.min(c[0].values.length,H/70)).tickSize(-I,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Q.select(".nv-x.nv-axis")).call(g),h.scale(e).ticks(I/36).tickSize(-H,0),d3.transition(Q.select(".nv-y.nv-axis")).call(h),Q.select(".nv-background rect").on("click",function(){A.x=d3.mouse(this)[0],A.i=Math.round(z.invert(A.x)),u.index=A.i,y.stateChange(u),E()}),f.dispatch.on("elementClick",function(a){A.i=a.pointIndex,A.x=z(A.i),u.index=A.i,y.stateChange(u),E()}),j.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r=!b.disabled,u.rescaleY=r,y.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,O.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),i.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),y.stateChange(u),a.update()}),y.on("tooltipShow",function(a){p&&B(a,G.parentNode)}),y.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.index&&(A.i=b.index,A.x=z(A.i),u.index=b.index,W.data([A])),"undefined"!=typeof b.rescaleY&&(r=b.rescaleY),a.update()})}),a}function b(a,b){return b.map(function(b){if(!b.values)return b;var c=f.y()(b.values[a],a);return-.95>c?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(f.y()(a,b)-c)/(1+c)},a}),b)})}var d,e,f=c.models.line(),g=c.models.axis(),h=c.models.axis(),i=c.models.legend(),j=c.models.legend(),k={top:30,right:30,bottom:50,left:60},l=c.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!0,s=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},t=f.id(),u={index:0,rescaleY:r},v=null,w="No Data Available.",x=function(a){return a.average},y=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.orient("bottom").tickPadding(7),h.orient("left");var z=d3.scale.linear(),A={i:0,x:0},B=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=g.tickFormat()(f.x()(b.point,b.pointIndex)),k=h.tickFormat()(f.y()(b.point,b.pointIndex)),l=s(b.series.key,j,k,b,a);c.tooltip.show([e,i],l,null,null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+k.left,a.pos[1]+k.top],y.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){y.tooltipHide(a)}),y.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=y,a.lines=f,a.legend=i,a.xAxis=g,a.yAxis=h,d3.rebind(a,f,"defined","isArea","x","y","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.margin=function(b){return arguments.length?(k.top="undefined"!=typeof b.top?b.top:k.top,k.right="undefined"!=typeof b.right?b.right:k.right,k.bottom="undefined"!=typeof b.bottom?b.bottom:k.bottom,k.left="undefined"!=typeof b.left?b.left:k.left,a):k},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(l=c.utils.getColor(b),i.color(l),a):l},a.rescaleY=function(a){return arguments.length?r=a:r},a.showControls=function(b){return arguments.length?(q=b,a):q},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(s=b,a):s},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a.average=function(b){return arguments.length?(x=b,a):x},a},c.models.discreteBar=function(){function a(c){return c.each(function(a){var c=h-g.left-g.right,j=i-g.top-g.bottom,u=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var v=b&&d?[]:a.map(function(a){return a.values.map(function(a,b){return{x:m(a,b),y:n(a,b),y0:a.y0}})});k.domain(b||d3.merge(v).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(d||d3.extent(d3.merge(v).map(function(a){return a.y}).concat(o))),q?l.range([j-(l.domain()[0]<0?12:0),l.domain()[1]>0?12:0]):l.range([j,0]),e=e||k,f=f||l.copy().range([l(0),l(0)]);{var w=u.selectAll("g.nv-wrap.nv-discretebar").data([a]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),y=x.append("g");w.select("g")}y.append("g").attr("class","nv-groups"),w.attr("transform","translate("+g.left+","+g.top+")");var z=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.75);var A=z.selectAll("g.nv-bar").data(function(a){return a.values});A.exit().remove();var B=A.enter().append("g").attr("transform",function(a,b){return"translate("+(k(m(a,b))+.05*k.rangeBand())+", "+l(0)+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),s.elementMouseover({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),s.elementMouseout({value:n(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){s.elementClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){s.elementDblClick({value:n(b,c),point:b,series:a[b.series],pos:[k(m(b,c))+k.rangeBand()*(b.series+.5)/a.length,l(n(b,c))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()});B.append("rect").attr("height",0).attr("width",.9*k.rangeBand()/a.length),q?(B.append("text").attr("text-anchor","middle"),A.select("text").attr("x",.9*k.rangeBand()/2).attr("y",function(a,b){return n(a,b)<0?l(n(a,b))-l(0)+12:-4}).text(function(a,b){return r(n(a,b))})):A.selectAll("text").remove(),A.attr("class",function(a,b){return n(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||p(a,b)}).style("stroke",function(a,b){return a.color||p(a,b)}).select("rect").attr("class",t).attr("width",.9*k.rangeBand()/a.length),d3.transition(A).attr("transform",function(a,b){var c=k(m(a,b))+.05*k.rangeBand(),d=n(a,b)<0?l(0):l(0)-l(n(a,b))<1?l(0)-1:l(n(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(l(n(a,b))-l(0))||1)}),e=k.copy(),f=l.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=Math.floor(1e4*Math.random()),k=d3.scale.ordinal(),l=d3.scale.linear(),m=function(a){return a.x},n=function(a){return a.y},o=[0],p=c.utils.defaultColor(),q=!1,r=d3.format(",.2f"),s=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),t="discreteBar";return a.dispatch=s,a.x=function(b){return arguments.length?(m=b,a):m},a.y=function(b){return arguments.length?(n=b,a):n},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceY=function(b){return arguments.length?(o=b,a):o},a.color=function(b){return arguments.length?(p=c.utils.getColor(b),a):p},a.id=function(b){return arguments.length?(j=b,a):j},a.showValues=function(b){return arguments.length?(q=b,a):q},a.valueFormat=function(b){return arguments.length?(r=b,a):r},a.rectClass=function(b){return arguments.length?(t=b,a):t},a},c.models.discreteBarChart=function(){function a(c){return c.each(function(c){var k=d3.select(this),n=this,r=(i||parseInt(k.style("width"))||960)-h.left-h.right,s=(j||parseInt(k.style("height"))||400)-h.top-h.bottom;if(a.update=function(){p.beforeUpdate(),k.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var t=k.selectAll(".nv-noData").data([o]);return t.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),t.attr("x",h.left+r/2).attr("y",h.top+s/2).text(function(a){return a}),a}k.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var u=k.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([c]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+h.left+","+h.top+")"),e.width(r).height(s);var y=x.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(y).call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",b.rangeBand()*(l?2:1)).attr("height",16).attr("x",-b.rangeBand()/(l?1:2)),f.scale(b).ticks(r/100).tickSize(-s,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").transition().duration(0).call(f);var z=x.select(".nv-x.nv-axis").selectAll("g");l&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"}),g.scale(d).ticks(s/36).tickSize(-r,0),d3.transition(x.select(".nv-y.nv-axis")).call(g),p.on("tooltipShow",function(a){m&&q(a,n.parentNode)})}),a}var b,d,e=c.models.discreteBar(),f=c.models.axis(),g=c.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=c.utils.getColor(),l=!1,m=!0,n=function(a,b,c){return"<h3>"+b+"</h3><p>"+c+"</p>"},o="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate");f.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var q=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=n(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+h.left,a.pos[1]+h.top],p.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.tooltipHide(a)}),p.on("tooltipHide",function(){m&&c.tooltip.cleanup()}),a.dispatch=p,a.discretebar=e,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","id","showValues","valueFormat"),a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),e.color(k),a):k},a.staggerLabels=function(b){return arguments.length?(l=b,a):l},a.tooltips=function(b){return arguments.length?(m=b,a):m},a.tooltipContent=function(b){return arguments.length?(n=b,a):n},a.noData=function(b){return arguments.length?(o=b,a):o},a},c.models.distribution=function(){function a(c){return c.each(function(a){var c=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),k=d3.select(this);b=b||j;var l=k.selectAll("g.nv-distribution").data([a]),m=l.enter().append("g").attr("class","nvd3 nv-distribution"),n=(m.append("g"),l.select("g"));l.attr("transform","translate("+d.left+","+d.top+")");var o=n.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});o.enter().append("g"),o.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var p=o.selectAll("line.nv-dist"+g).data(function(a){return a.values});p.enter().append("line").attr(g+"1",function(a,c){return b(h(a,c))}).attr(g+"2",function(a,c){return b(h(a,c))}),d3.transition(o.exit().selectAll("line.nv-dist"+g)).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),p.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(c+"1",0).attr(c+"2",f),d3.transition(p).attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),b=j.copy()}),a}var b,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=c.utils.defaultColor(),j=d3.scale.linear();return a.margin=function(b){return arguments.length?(d.top="undefined"!=typeof b.top?b.top:d.top,d.right="undefined"!=typeof b.right?b.right:d.right,d.bottom="undefined"!=typeof b.bottom?b.bottom:d.bottom,d.left="undefined"!=typeof b.left?b.left:d.left,a):d},a.width=function(b){return arguments.length?(e=b,a):e},a.axis=function(b){return arguments.length?(g=b,a):g},a.size=function(b){return arguments.length?(f=b,a):f},a.getData=function(b){return arguments.length?(h=d3.functor(b),a):h},a.scale=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),a):i},a},c.models.historicalBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,s=g-e.top-e.bottom,t=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(m))),o?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||d3.extent(a[0].values.map(l).concat(n))).range([s,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var u=t.selectAll("g.nv-wrap.nv-bar").data([a[0].values]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-bar"),w=v.append("defs"),x=v.append("g"),y=u.select("g");x.append("g").attr("class","nv-bars"),u.attr("transform","translate("+e.left+","+e.top+")"),t.on("click",function(a,b){r.chartClick({data:a,index:b,pos:d3.event,id:h})}),w.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),u.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",s),y.attr("clip-path",p?"url(#nv-chart-clip-path-"+h+")":"");
+var z=u.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a});z.exit().remove();z.enter().append("rect").attr("x",0).attr("y",function(a,b){return j(Math.max(0,l(a,b)))}).attr("height",function(a,b){return Math.abs(j(l(a,b))-j(0))}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),r.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),r.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){r.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){r.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()});z.attr("fill",function(a,b){return q(a,b)}).attr("class",function(a,b,c){return(l(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).attr("transform",function(b,d){return"translate("+(i(k(b,d))-c/a[0].values.length*.45)+",0)"}).attr("width",c/a[0].values.length*.9),d3.transition(z).attr("y",function(a,b){return l(a,b)<0?j(0):j(0)-j(l(a,b))<1?j(0)-1:j(l(a,b))}).attr("height",function(a,b){return Math.max(Math.abs(j(l(a,b))-j(0)),1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=[],n=[0],o=!1,p=!0,q=c.utils.defaultColor(),r=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=r,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(m=b,a):m},a.forceY=function(b){return arguments.length?(n=b,a):n},a.padData=function(b){return arguments.length?(o=b,a):o},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.historicalBarChart=function(){function a(c){return c.each(function(r){var x=d3.select(this),y=this,z=(k||parseInt(x.style("width"))||960)-i.left-i.right,A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom;if(a.update=function(){a(c)},a.container=this,s.disabled=r.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]}if(!(r&&r.length&&r.filter(function(a){return a.values.length}).length)){var C=x.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",i.left+z/2).attr("y",i.top+A/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=x.selectAll("g.nv-wrap.nv-lineChart").data([r]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),F=D.select("g");E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),m&&(h.width(z),F.select(".nv-legendWrap").datum(r).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(x.style("height"))||400)-i.top-i.bottom),D.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),D.attr("transform","translate("+i.left+","+i.top+")"),p&&F.select(".nv-y.nv-axis").attr("transform","translate("+z+",0)"),e.width(z).height(A).color(r.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!r[b].disabled}));var G=F.select(".nv-barsWrap").datum(r.filter(function(a){return!a.disabled}));d3.transition(G).call(e),n&&(f.scale(b).tickSize(-A,0),F.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),F.select(".nv-x.nv-axis").transition().call(f)),o&&(g.scale(d).ticks(A/36).tickSize(-z,0),F.select(".nv-y.nv-axis").transition().duration(0).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,r.filter(function(a){return!a.disabled}).length||r.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),c.transition().call(a)}),h.dispatch.on("legendDblclick",function(b){r.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=r.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(r.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),c.call(a)})}),a}var b,d,e=c.models.historicalBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:90,bottom:50,left:90},j=c.utils.defaultColor(),k=null,l=null,m=!1,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.bars=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.indentedTree=function(){function a(b){return b.each(function(b){function c(b,d,e){return d3.event.stopPropagation(),d3.event.shiftKey&&!e?(d3.event.shiftKey=!1,b.values&&b.values.forEach(function(a){(a.values||a._values)&&c(a,0,!0)}),!0):g(b)?(b.values?(b._values=b.values,b.values=null):(b.values=b._values,b._values=null),a.update(),void 0):!0}function d(a){return a._values&&a._values.length?n:a.values&&a.values.length?o:""}function f(a){return a._values&&a._values.length}function g(a){var b=a.values||a._values;return b&&b.length}var r=1,s=d3.select(this),t=d3.layout.tree().children(function(a){return a.values}).size([e,k]);a.update=function(){s.transition().duration(600).call(a)},b[0]||(b[0]={key:j});var u=t.nodes(b[0]),v=d3.select(this).selectAll("div").data([[u]]),w=v.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree"),x=w.append("table"),y=v.select("table").attr("width","100%").attr("class",m);if(h){var z=x.append("thead"),A=z.append("tr");l.forEach(function(a){A.append("th").attr("width",a.width?a.width:"10%").style("text-align","numeric"==a.type?"right":"left").append("span").text(a.label)})}var B=y.selectAll("tbody").data(function(a){return a});B.enter().append("tbody"),r=d3.max(u,function(a){return a.depth}),t.size([e,r*k]);var C=B.selectAll("tr").data(function(a){return a.filter(function(a){return i&&!a.children?i(a):!0})},function(a){return a.id||a.id||++q});C.exit().remove(),C.select("img.nv-treeicon").attr("src",d).classed("folded",f);var D=C.enter().append("tr");l.forEach(function(a,b){var e=D.append("td").style("padding-left",function(a){return(b?0:a.depth*k+12+(d(a)?0:16))+"px"},"important").style("text-align","numeric"==a.type?"right":"left");0==b&&e.append("img").classed("nv-treeicon",!0).classed("nv-folded",f).attr("src",d).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(a){return d(a)?"inline-block":"none"}).on("click",c),e.append("span").attr("class",d3.functor(a.classes)).text(function(b){return a.format?a.format(b):b[a.key]||"-"}),a.showCount&&(e.append("span").attr("class","nv-childrenCount"),C.selectAll("span.nv-childrenCount").text(function(a){return a.values&&a.values.length||a._values&&a._values.length?"("+(a.values&&a.values.filter(function(a){return i?i(a):!0}).length||a._values&&a._values.filter(function(a){return i?i(a):!0}).length||0)+")":""})),a.click&&e.select("span").on("click",a.click)}),C.order().on("click",function(a){p.elementClick({row:this,data:a,pos:[a.x,a.y]})}).on("dblclick",function(a){p.elementDblclick({row:this,data:a,pos:[a.x,a.y]})}).on("mouseover",function(a){p.elementMouseover({row:this,data:a,pos:[a.x,a.y]})}).on("mouseout",function(a){p.elementMouseout({row:this,data:a,pos:[a.x,a.y]})})}),a}var b={top:0,right:0,bottom:0,left:0},d=960,e=500,f=c.utils.defaultColor(),g=Math.floor(1e4*Math.random()),h=!0,i=!1,j="No Data Available.",k=20,l=[{key:"key",label:"Name",type:"text"}],m=null,n="images/grey-plus.png",o="images/grey-minus.png",p=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),q=0;return a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.color=function(b){return arguments.length?(f=c.utils.getColor(b),scatter.color(f),a):f},a.id=function(b){return arguments.length?(g=b,a):g},a.header=function(b){return arguments.length?(h=b,a):h},a.noData=function(b){return arguments.length?(j=b,a):j},a.filterZero=function(b){return arguments.length?(i=b,a):i},a.columns=function(b){return arguments.length?(l=b,a):l},a.tableClass=function(b){return arguments.length?(m=b,a):m},a.iconOpen=function(b){return arguments.length?(n=b,a):n},a.iconClose=function(b){return arguments.length?(o=b,a):o},a},c.models.legend=function(){function a(a,b,c,d,e,f,g,h,i){var j;return j="M"+(a+e)+","+b,j+="h"+(c-2*e),g?j+="a"+e+","+e+" 0 0 1 "+e+","+e:(j+="h"+e,j+="v"+e),j+="v"+(d-2*e),i?j+="a"+e+","+e+" 0 0 1 "+-e+","+e:(j+="v"+e,j+="h"+-e),j+="h"+(2*e-c),h?j+="a"+e+","+e+" 0 0 1 "+-e+","+-e:(j+="h"+-e,j+="v"+-e),j+="v"+(2*e-d),f?j+="a"+e+","+e+" 0 0 1 "+e+","+-e:(j+="v"+-e,j+="h"+e),j+="z"}function b(n){return n.each(function(b){var n=e-d.left-d.right,o=d3.select(this),p=o.selectAll("g.nv-legend").data([b]),q=(p.enter().append("g").attr("class","nvd3 nv-legend").append("g"),p.select("g"));p.attr("transform","translate("+d.left+","+d.top+")");var r=q.selectAll(".nv-series").data(function(a){return a}),s=r.enter().append("g").attr("class","nv-series").on("mouseover",function(a,b){j.legendMouseover(a,b)}).on("mouseout",function(a,b){j.legendMouseout(a,b)}).on("click",function(a,b){j.legendClick(a,b)}).on("dblclick",function(a,b){j.legendDblclick(a,b)});if(s.append("path"),s.append("circle").style("stroke-width",2).attr("r",5),s.append("text").attr("text-anchor","start").attr("dy",".33em").attr("dx","12"),r.classed("disabled",function(a){return a.disabled}),r.exit().remove(),r.select("circle").style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),r.select("text").text(g),i){var t=[];r.each(function(){var a=d3.select(this).select("text"),b=a.node().getComputedTextLength()||c.utils.calcApproxTextWidth(a);t.push(b+l)});for(var u=0,v=0,w=[];n>v&&u<t.length;)w[u]=t[u],v+=t[u++];for(;v>n&&u>1;){for(w=[],u--,k=0;k<t.length;k++)t[k]>(w[k%u]||0)&&(w[k%u]=t[k]);v=w.reduce(function(a,b){return a+b})}for(var x=[],y=0,z=0;u>y;y++)x[y]=z,z+=w[y];r.attr("transform",function(a,b){return"translate("+x[b%u]+","+(5+20*Math.floor(b/u))+")"}).select("path").attr("d",function(b,c){var d=!1,e=!1;return 0==c?d=!0:c==t.length-1&&(e=!0),a(-14,-14,t[c],28,m,d,e,d,e)}),q.attr("transform","translate("+(e-d.right-v)+","+d.top+")"),f=d.top+d.bottom+20*Math.ceil(t.length/u)}else{var A,B=5,C=5,D=0;r.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+28;return A=C,e<d.left+d.right+A+a&&(C=A=5,B+=20),C+=a,C>D&&(D=C),"translate("+A+","+B+")"}),q.attr("transform","translate("+(e-d.right-D)+","+d.top+")"),f=d.top+d.bottom+B+15}}),b}var d={top:5,right:0,bottom:5,left:0},e=400,f=20,g=function(a){return a.key},h=c.utils.defaultColor(),i=!0,j=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout"),l=28,m=0,n=20;return b.dispatch=j,b.svgComputedTextPadding=function(a){return arguments.length?(l=a,b):l},b.roundedRecRadius=function(a){return arguments.length?(m=a,b):m},b.legendBelowPadding=function(a){return arguments.length?(n=a,b):n},b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.height=function(a){return arguments.length?(f=a,b):f},b.key=function(a){return arguments.length?(g=a,b):g},b.color=function(a){return arguments.length?(h=c.utils.getColor(a),b):h},b.align=function(a){return arguments.length?(i=a,b):i},b},c.models.line=function(){function a(c){return c.each(function(a){var c=g-f.left-f.right,r=h-f.top-f.bottom,s=d3.select(this);b=e.xScale(),d=e.yScale(),p=p||b,q=q||d;var t=s.selectAll("g.nv-wrap.nv-line").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-groups"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+f.left+","+f.top+")"),e.width(c).height(r);var y=t.select(".nv-scatterWrap");d3.transition(y).call(e),v.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),t.select("#nv-edge-clip-"+e.id()+" rect").attr("width",c).attr("height",r),x.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":""),y.attr("clip-path",n?"url(#nv-edge-clip-"+e.id()+")":"");var z=t.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(z.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return i(a,b)}).style("stroke",function(a,b){return i(a,b)}),d3.transition(z).style("stroke-opacity",1).style("fill-opacity",.5);var A=z.selectAll("path.nv-area").data(function(a){return m(a)?[a]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y0(function(a,b){return q(k(a,b))}).y1(function(){return q(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(z.exit().selectAll("path.nv-area")).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])}),d3.transition(A).attr("d",function(a){return d3.svg.area().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y0(function(a,b){return d(k(a,b))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[a.values])});var B=z.selectAll("path.nv-line").data(function(a){return[a.values]});B.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,b){return p(j(a,b))}).y(function(a,b){return q(k(a,b))})),d3.transition(z.exit().selectAll("path.nv-line")).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),d3.transition(B).attr("d",d3.svg.line().interpolate(o).defined(l).x(function(a,c){return b(j(a,c))}).y(function(a,b){return d(k(a,b))})),p=b.copy(),q=d.copy()}),a}var b,d,e=c.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=c.utils.defaultColor(),j=function(a){return a.x},k=function(a){return a.y},l=function(a,b){return!isNaN(k(a,b))&&null!==k(a,b)},m=function(a){return a.area},n=!1,o="linear";e.size(16).sizeDomain([16,256]);var p,q;return a.dispatch=e.dispatch,a.scatter=e,d3.rebind(a,e,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius","padData"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.x=function(b){return arguments.length?(j=b,e.x(b),a):j},a.y=function(b){return arguments.length?(k=b,e.y(b),a):k},a.clipEdge=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(i=c.utils.getColor(b),e.color(i),a):i},a.interpolate=function(b){return arguments.length?(o=b,a):o},a.defined=function(b){return arguments.length?(l=b,a):l},a.isArea=function(b){return arguments.length?(m=d3.functor(b),a):m},a},c.models.lineChart=function(){function a(c){return c.each(function(c){var r=d3.select(this),x=this,y=(k||parseInt(r.style("width"))||960)-i.left-i.right,z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom;if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=r.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",i.left+y/2).attr("y",i.top+z/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=r.selectAll("g.nv-wrap.nv-lineChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),E=C.select("g");D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-linesWrap"),D.append("g").attr("class","nv-legendWrap"),m&&(h.width(y),E.select(".nv-legendWrap").datum(c).call(h),i.top!=h.height()&&(i.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(r.style("height"))||400)-i.top-i.bottom),C.select(".nv-legendWrap").attr("transform","translate(0,"+-i.top+")")),C.attr("transform","translate("+i.left+","+i.top+")"),p&&E.select(".nv-y.nv-axis").attr("transform","translate("+y+",0)"),e.width(y).height(z).color(c.map(function(a,b){return a.color||j(a,b)}).filter(function(a,b){return!c[b].disabled}));var F=E.select(".nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(F).call(e),n&&(f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(E.select(".nv-x.nv-axis")).call(f)),o&&(g.scale(d).ticks(z/36).tickSize(-y,0),d3.transition(E.select(".nv-y.nv-axis")).call(g)),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,C.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),v.on("tooltipShow",function(a){q&&w(a,x.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),a.update()})}),a}var b,d,e=c.models.line(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i={top:30,right:20,bottom:50,left:60},j=c.utils.defaultColor(),k=null,l=null,m=!0,n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},s={},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");f.orient("bottom").tickPadding(7),g.orient(p?"right":"left");var w=function(b,d){if(d){var h=d3.select(d).select("svg"),i=h.node()?h.attr("viewBox"):null;if(i){i=i.split(" ");var j=parseInt(h.style("width"))/i[2];b.pos[0]=b.pos[0]*j,b.pos[1]=b.pos[1]*j}}var k=b.pos[0]+(d.offsetLeft||0),l=b.pos[1]+(d.offsetTop||0),m=f.tickFormat()(e.x()(b.point,b.pointIndex)),n=g.tickFormat()(e.y()(b.point,b.pointIndex)),o=r(b.series.key,m,n,b,a);c.tooltip.show([k,l],o,null,null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.lines=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate"),a.margin=function(b){return arguments.length?(i.top="undefined"!=typeof b.top?b.top:i.top,i.right="undefined"!=typeof b.right?b.right:i.right,i.bottom="undefined"!=typeof b.bottom?b.bottom:i.bottom,i.left="undefined"!=typeof b.left?b.left:i.left,a):i},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),h.color(j),a):j},a.showLegend=function(b){return arguments.length?(m=b,a):m},a.showXAxis=function(b){return arguments.length?(n=b,a):n},a.showYAxis=function(b){return arguments.length?(o=b,a):o},a.rightAlignYAxis=function(b){return arguments.length?(p=b,g.orient(b?"right":"left"),a):p},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.linePlusBarChart=function(){function a(c){return c.each(function(c){var o=d3.select(this),p=this,t=(m||parseInt(o.style("width"))||960)-l.left-l.right,z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom;if(a.update=function(){o.transition().call(a)},u.disabled=c.map(function(a){return!!a.disabled}),!v){var A;v={};for(A in u)v[A]=u[A]instanceof Array?u[A].slice(0):u[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=o.selectAll(".nv-noData").data([w]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",l.left+t/2).attr("y",l.top+z/2).text(function(a){return a}),a}o.selectAll(".nv-noData").remove();var C=c.filter(function(a){return!a.disabled&&a.bar}),D=c.filter(function(a){return!a.bar});b=D.filter(function(a){return!a.disabled}).length&&D.filter(function(a){return!a.disabled})[0].values.length?f.xScale():g.xScale(),d=g.yScale(),e=f.yScale();var E=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([c]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y1 nv-axis"),F.append("g").attr("class","nv-y2 nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),r&&(k.width(t/2),G.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(k),l.top!=k.height()&&(l.top=k.height()+k.legendBelowPadding(),z=(n||parseInt(o.style("height"))||400)-l.top-l.bottom),G.select(".nv-legendWrap").attr("transform","translate("+t/2+","+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),f.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar})),g.width(t).height(z).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar}));var H=G.select(".nv-barsWrap").datum(C.length?C:[{values:[]}]),I=G.select(".nv-linesWrap").datum(D[0]&&!D[0].disabled?D:[{values:[]}]);d3.transition(H).call(g),d3.transition(I).call(f),h.scale(b).ticks(t/100).tickSize(-z,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(G.select(".nv-x.nv-axis")).call(h),i.scale(d).ticks(z/36).tickSize(-t,0),d3.transition(G.select(".nv-y1.nv-axis")).style("opacity",C.length?1:0).call(i),j.scale(e).ticks(z/36).tickSize(C.length?0:-t,0),G.select(".nv-y2.nv-axis").style("opacity",D.length?1:0).attr("transform","translate("+t+",0)"),d3.transition(G.select(".nv-y2.nv-axis")).call(j),k.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),k.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),x.on("tooltipShow",function(a){s&&y(a,p.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),a.update()})}),a}var b,d,e,f=c.models.line(),g=c.models.historicalBar(),h=c.models.axis(),i=c.models.axis(),j=c.models.axis(),k=c.models.legend(),l={top:30,right:60,bottom:50,left:60},m=null,n=null,o=function(a){return a.x},p=function(a){return a.y},q=c.utils.defaultColor(),r=!0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},u={},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");g.padData(!0),f.clipEdge(!1).padData(!0),h.orient("bottom").tickPadding(7).highlightZero(!1),i.orient("left"),j.orient("right");var y=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),g=b.pos[1]+(d.offsetTop||0),k=h.tickFormat()(f.x()(b.point,b.pointIndex)),l=(b.series.bar?i:j).tickFormat()(f.y()(b.point,b.pointIndex)),m=t(b.series.key,k,l,b,a);c.tooltip.show([e,g],m,b.value<0?"n":"s",null,d)};return f.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),f.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+l.left,a.pos[1]+l.top],x.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.legend=k,a.lines=f,a.bars=g,a.xAxis=h,a.y1Axis=i,a.y2Axis=j,d3.rebind(a,f,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(o=b,f.x(b),g.x(b),a):o},a.y=function(b){return arguments.length?(p=b,f.y(b),g.y(b),a):p},a.margin=function(b){return arguments.length?(l.top="undefined"!=typeof b.top?b.top:l.top,l.right="undefined"!=typeof b.right?b.right:l.right,l.bottom="undefined"!=typeof b.bottom?b.bottom:l.bottom,l.left="undefined"!=typeof b.left?b.left:l.left,a):l},a.width=function(b){return arguments.length?(m=b,a):m},a.height=function(b){return arguments.length?(n=b,a):n},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),k.color(q),a):q},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.lineWithFocusChart=function(){function a(c){return c.each(function(c){function x(a){var b=+("e"==a),c=b?1:-1,d=H/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function B(){n.empty()||n.extent(v),P.data([n.empty()?e.domain():v]).each(function(a){var c=e(a[0])-b.range()[0],d=b.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>c?0:c),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function C(){v=n.empty()?null:n.extent(),extent=n.empty()?e.domain():n.extent(),z.brush({extent:extent,brush:n}),B();var a=L.select(".nv-focus .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}).map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return g.x()(a,b)>=extent[0]&&g.x()(a,b)<=extent[1]})}}));d3.transition(a).call(g),d3.transition(L.select(".nv-focus .nv-x.nv-axis")).call(i),d3.transition(L.select(".nv-focus .nv-y.nv-axis")).call(j)}var D=d3.select(this),E=this,F=(r||parseInt(D.style("width"))||960)-o.left-o.right,G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t,H=t-p.top-p.bottom;if(a.update=function(){D.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var I=D.selectAll(".nv-noData").data([y]);return I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),I.attr("x",o.left+F/2).attr("y",o.top+G/2).text(function(a){return a}),a}D.selectAll(".nv-noData").remove(),b=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var J=D.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([c]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),L=J.select("g");K.append("g").attr("class","nv-legendWrap");var M=K.append("g").attr("class","nv-focus");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis"),M.append("g").attr("class","nv-linesWrap");var N=K.append("g").attr("class","nv-context");N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-linesWrap"),N.append("g").attr("class","nv-brushBackground"),N.append("g").attr("class","nv-x nv-brush"),u&&(m.width(F),L.select(".nv-legendWrap").datum(c).call(m),o.top!=m.height()&&(o.top=m.height()+m.legendBelowPadding(),G=(s||parseInt(D.style("height"))||400)-o.top-o.bottom-t),L.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")")),J.attr("transform","translate("+o.left+","+o.top+")"),g.width(F).height(G).color(c.map(function(a,b){return a.color||q(a,b)
+}).filter(function(a,b){return!c[b].disabled})),h.defined(g.defined()).width(F).height(H).color(c.map(function(a,b){return a.color||q(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-context").attr("transform","translate(0,"+(G+o.bottom+p.top)+")");var O=L.select(".nv-context .nv-linesWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(O).call(h),i.scale(b).ticks(F/100).tickSize(-G,0),j.scale(d).ticks(G/36).tickSize(-F,0),L.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+G+")"),n.x(e).on("brush",C),v&&n.extent(v);var P=L.select(".nv-brushBackground").selectAll("g").data([v||n.extent()]),Q=P.enter().append("g");Q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",H),Q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",H),gBrush=L.select(".nv-x.nv-brush").call(n),gBrush.selectAll("rect").attr("height",H),gBrush.selectAll(".resize").append("path").attr("d",x),C(),k.scale(e).ticks(F/100).tickSize(-H,0),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(L.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f).ticks(H/36).tickSize(-F,0),d3.transition(L.select(".nv-context .nv-y.nv-axis")).call(l),L.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".nv-series").classed("disabled",!1),a}),D.transition().call(a)}),z.on("tooltipShow",function(a){w&&A(a,E.parentNode)})}),a}var b,d,e,f,g=c.models.line(),h=c.models.line(),i=c.models.axis(),j=c.models.axis(),k=c.models.axis(),l=c.models.axis(),m=c.models.legend(),n=d3.svg.brush(),o={top:30,right:30,bottom:30,left:60},p={top:0,right:30,bottom:20,left:60},q=c.utils.defaultColor(),r=null,s=null,t=100,u=!0,v=null,w=!0,x=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},y="No Data Available.",z=d3.dispatch("tooltipShow","tooltipHide","brush");g.clipEdge(!0),h.interactive(!1),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left");var A=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),h=i.tickFormat()(g.x()(b.point,b.pointIndex)),k=j.tickFormat()(g.y()(b.point,b.pointIndex)),l=x(b.series.key,h,k,b,a);c.tooltip.show([e,f],l,null,null,d)};return g.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+o.left,a.pos[1]+o.top],z.tooltipShow(a)}),g.dispatch.on("elementMouseout.tooltip",function(a){z.tooltipHide(a)}),z.on("tooltipHide",function(){w&&c.tooltip.cleanup()}),a.dispatch=z,a.legend=m,a.lines=g,a.lines2=h,a.xAxis=i,a.yAxis=j,a.x2Axis=k,a.y2Axis=l,d3.rebind(a,g,"defined","isArea","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),a.x=function(b){return arguments.length?(g.x(b),h.x(b),a):g.x},a.y=function(b){return arguments.length?(g.y(b),h.y(b),a):g.y},a.margin=function(b){return arguments.length?(o.top="undefined"!=typeof b.top?b.top:o.top,o.right="undefined"!=typeof b.right?b.right:o.right,o.bottom="undefined"!=typeof b.bottom?b.bottom:o.bottom,o.left="undefined"!=typeof b.left?b.left:o.left,a):o},a.margin2=function(b){return arguments.length?(p=b,a):p},a.width=function(b){return arguments.length?(r=b,a):r},a.height=function(b){return arguments.length?(s=b,a):s},a.height2=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),m.color(q),a):q},a.showLegend=function(b){return arguments.length?(u=b,a):u},a.tooltips=function(b){return arguments.length?(w=b,a):w},a.tooltipContent=function(b){return arguments.length?(x=b,a):x},a.interpolate=function(b){return arguments.length?(g.interpolate(b),h.interpolate(b),a):g.interpolate()},a.noData=function(b){return arguments.length?(y=b,a):y},a.xTickFormat=function(b){return arguments.length?(i.tickFormat(b),k.tickFormat(b),a):i.tickFormat()},a.yTickFormat=function(b){return arguments.length?(j.tickFormat(b),l.tickFormat(b),a):j.tickFormat()},a},c.models.linePlusBarWithFocusChart=function(){function a(c){return c.each(function(c){function G(a){var b=+("e"==a),c=b?1:-1,d=Q/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function K(){u.empty()||u.extent(E),bb.data([u.empty()?e.domain():E]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function L(){E=u.empty()?null:u.extent(),b=u.empty()?e.domain():u.extent(),I.brush({extent:b,brush:u}),K(),l.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),j.width(O).height(P).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var a=Y.select(".nv-focus .nv-barsWrap").datum(S.length?S.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return l.x()(a,c)>=b[0]&&l.x()(a,c)<=b[1]})}}):[{values:[]}]),h=Y.select(".nv-focus .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T.map(function(a){return{key:a.key,values:a.values.filter(function(a,c){return j.x()(a,c)>=b[0]&&j.x()(a,c)<=b[1]})}}));d=S.length?l.xScale():j.xScale(),n.scale(d).ticks(O/100).tickSize(-P,0),n.domain([Math.ceil(b[0]),Math.floor(b[1])]),d3.transition(Y.select(".nv-x.nv-axis")).call(n),d3.transition(a).call(l),d3.transition(h).call(j),Y.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f).ticks(P/36).tickSize(-O,0),Y.select(".nv-focus .nv-y1.nv-axis").style("opacity",S.length?1:0),q.scale(g).ticks(P/36).tickSize(S.length?0:-O,0),Y.select(".nv-focus .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+d.range()[1]+",0)"),d3.transition(Y.select(".nv-focus .nv-y1.nv-axis")).call(p),d3.transition(Y.select(".nv-focus .nv-y2.nv-axis")).call(q)}var M=d3.select(this),N=this,O=(x||parseInt(M.style("width"))||960)-v.left-v.right,P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z,Q=z-w.top-w.bottom;if(a.update=function(){M.transition().call(a)},a.container=this,!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var R=M.selectAll(".nv-noData").data([H]);return R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),R.attr("x",v.left+O/2).attr("y",v.top+P/2).text(function(a){return a}),a}M.selectAll(".nv-noData").remove();var S=c.filter(function(a){return!a.disabled&&a.bar}),T=c.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var U=c.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),V=c.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,O]),e.domain(d3.extent(d3.merge(U.concat(V)),function(a){return a.x})).range([0,O]);var W=M.selectAll("g.nv-wrap.nv-linePlusBar").data([c]),X=W.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),Y=W.select("g");X.append("g").attr("class","nv-legendWrap");var Z=X.append("g").attr("class","nv-focus");Z.append("g").attr("class","nv-x nv-axis"),Z.append("g").attr("class","nv-y1 nv-axis"),Z.append("g").attr("class","nv-y2 nv-axis"),Z.append("g").attr("class","nv-barsWrap"),Z.append("g").attr("class","nv-linesWrap");var $=X.append("g").attr("class","nv-context");$.append("g").attr("class","nv-x nv-axis"),$.append("g").attr("class","nv-y1 nv-axis"),$.append("g").attr("class","nv-y2 nv-axis"),$.append("g").attr("class","nv-barsWrap"),$.append("g").attr("class","nv-linesWrap"),$.append("g").attr("class","nv-brushBackground"),$.append("g").attr("class","nv-x nv-brush"),D&&(t.width(O/2),Y.select(".nv-legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?" (left axis)":" (right axis)"),a})).call(t),v.top!=t.height()&&(v.top=t.height()+t.legendBelowPadding(),P=(y||parseInt(M.style("height"))||400)-v.top-v.bottom-z),Y.select(".nv-legendWrap").attr("transform","translate("+O/2+","+-v.top+")")),W.attr("transform","translate("+v.left+","+v.top+")"),m.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&c[b].bar})),k.width(O).height(Q).color(c.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!c[b].disabled&&!c[b].bar}));var _=Y.select(".nv-context .nv-barsWrap").datum(S.length?S:[{values:[]}]),ab=Y.select(".nv-context .nv-linesWrap").datum(T[0].disabled?[{values:[]}]:T);Y.select(".nv-context").attr("transform","translate(0,"+(P+v.bottom+w.top)+")"),d3.transition(_).call(m),d3.transition(ab).call(k),u.x(e).on("brush",L),E&&u.extent(E);var bb=Y.select(".nv-brushBackground").selectAll("g").data([E||u.extent()]),cb=bb.enter().append("g");cb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",Q),cb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",Q);var db=Y.select(".nv-x.nv-brush").call(u);db.selectAll("rect").attr("height",Q),db.selectAll(".resize").append("path").attr("d",G),o.ticks(O/100).tickSize(-Q,0),Y.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-x.nv-axis")).call(o),r.scale(h).ticks(Q/36).tickSize(-O,0),Y.select(".nv-context .nv-y1.nv-axis").style("opacity",S.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),d3.transition(Y.select(".nv-context .nv-y1.nv-axis")).call(r),s.scale(i).ticks(Q/36).tickSize(S.length?0:-O,0),Y.select(".nv-context .nv-y2.nv-axis").style("opacity",T.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),d3.transition(Y.select(".nv-context .nv-y2.nv-axis")).call(s),t.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,W.selectAll(".nv-series").classed("disabled",!1),a}),a.update()}),I.on("tooltipShow",function(a){F&&J(a,N.parentNode)}),L()}),a}var b,d,e,f,g,h,i,j=c.models.line(),k=c.models.line(),l=c.models.historicalBar(),m=c.models.historicalBar(),n=c.models.axis(),o=c.models.axis(),p=c.models.axis(),q=c.models.axis(),r=c.models.axis(),s=c.models.axis(),t=c.models.legend(),u=d3.svg.brush(),v={top:30,right:30,bottom:30,left:60},w={top:0,right:30,bottom:20,left:60},x=null,y=null,z=100,A=function(a){return a.x},B=function(a){return a.y},C=c.utils.defaultColor(),D=!0,E=null,F=!0,G=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},H="No Data Available.",I=d3.dispatch("tooltipShow","tooltipHide","brush");j.clipEdge(!0),k.interactive(!1),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right");var J=function(d,e){b&&(d.pointIndex+=Math.ceil(b[0]));var f=d.pos[0]+(e.offsetLeft||0),g=d.pos[1]+(e.offsetTop||0),h=n.tickFormat()(j.x()(d.point,d.pointIndex)),i=(d.series.bar?p:q).tickFormat()(j.y()(d.point,d.pointIndex)),k=G(d.series.key,h,i,d,a);c.tooltip.show([f,g],k,d.value<0?"n":"s",null,e)};return j.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),j.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+v.left,a.pos[1]+v.top],I.tooltipShow(a)}),l.dispatch.on("elementMouseout.tooltip",function(a){I.tooltipHide(a)}),I.on("tooltipHide",function(){F&&c.tooltip.cleanup()}),a.dispatch=I,a.legend=t,a.lines=j,a.lines2=k,a.bars=l,a.bars2=m,a.xAxis=n,a.x2Axis=o,a.y1Axis=p,a.y2Axis=q,a.y3Axis=r,a.y4Axis=s,d3.rebind(a,j,"defined","size","clipVoronoi","interpolate"),a.x=function(b){return arguments.length?(A=b,j.x(b),l.x(b),a):A},a.y=function(b){return arguments.length?(B=b,j.y(b),l.y(b),a):B},a.margin=function(b){return arguments.length?(v.top="undefined"!=typeof b.top?b.top:v.top,v.right="undefined"!=typeof b.right?b.right:v.right,v.bottom="undefined"!=typeof b.bottom?b.bottom:v.bottom,v.left="undefined"!=typeof b.left?b.left:v.left,a):v},a.width=function(b){return arguments.length?(x=b,a):x},a.height=function(b){return arguments.length?(y=b,a):y},a.color=function(b){return arguments.length?(C=c.utils.getColor(b),t.color(C),a):C},a.showLegend=function(b){return arguments.length?(D=b,a):D},a.tooltips=function(b){return arguments.length?(F=b,a):F},a.tooltipContent=function(b){return arguments.length?(G=b,a):G},a.noData=function(b){return arguments.length?(H=b,a):H},a.brushExtent=function(b){return arguments.length?(E=b,a):E},a},c.models.multiBar=function(){function a(c){return c.each(function(a){var c=i-h.left-h.right,y=j-h.top-h.bottom,z=d3.select(this);t&&a.length&&(t=[{values:a[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),r&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(!a.length&&t?t:a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),r&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e,e-=b.size):(b.y1=b.size+d,d+=b.size)})});var A=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});k.domain(d3.merge(A).map(function(a){return a.x})).rangeBands([0,c],.1),l.domain(e||d3.extent(d3.merge(A).map(function(a){return r?a.y>0?a.y1:a.y1+a.y:a.y}).concat(p))).range([y,0]),(k.domain()[0]===k.domain()[1]||l.domain()[0]===l.domain()[1])&&(singlePoint=!0),k.domain()[0]===k.domain()[1]&&(k.domain()[0]?k.domain([k.domain()[0]-.01*k.domain()[0],k.domain()[1]+.01*k.domain()[1]]):k.domain([-1,1])),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]+.01*l.domain()[0],l.domain()[1]-.01*l.domain()[1]]):l.domain([-1,1])),f=f||k,g=g||l;var B=z.selectAll("g.nv-wrap.nv-multibar").data([a]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-groups"),B.attr("transform","translate("+h.left+","+h.top+")"),D.append("clipPath").attr("id","nv-edge-clip-"+m).append("rect"),B.select("#nv-edge-clip-"+m+" rect").attr("width",c).attr("height",y),F.attr("clip-path",q?"url(#nv-edge-clip-"+m+")":"");var G=B.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),G.exit().selectAll("rect.nv-bar").transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return r?g(a.y0):g(0)}).attr("height",0).remove(),G.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return s(a,b)}).style("stroke",function(a,b){return s(a,b)}),d3.transition(G).style("stroke-opacity",1).style("fill-opacity",.75);var H=G.selectAll("rect.nv-bar").data(function(b){return t&&!a.length?t.values:b.values});H.exit().remove();H.enter().append("rect").attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(b,c,d){return r?0:d*k.rangeBand()/a.length}).attr("y",function(a){return g(r?a.y0:0)}).attr("height",0).attr("width",k.rangeBand()/(r?1:a.length));H.style("fill",function(a,b,c){return s(a,c,b)}).style("stroke",function(a,b,c){return s(a,c,b)}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[k(n(b,c))+k.rangeBand()*(r?a.length/2:b.series+.5)/a.length,l(o(b,c)+(r?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),H.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+k(n(a,b))+",0)"}),u&&(b||(b=a.map(function(){return!0})),H.style("fill",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(u(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),r?H.transition().delay(function(b,c){return c*v/a[0].values.length}).attr("y",function(a){return l(r?a.y1:0)}).attr("height",function(a){return Math.max(Math.abs(l(a.y+(r?a.y0:0))-l(r?a.y0:0)),1)}).each("end",function(){d3.select(this).transition().duration(w).attr("x",function(b){return r?0:b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/(r?1:a.length))}):d3.transition(H).duration(w).delay(function(b,c){return c*v/a[0].values.length}).attr("x",function(b){return b.series*k.rangeBand()/a.length}).attr("width",k.rangeBand()/a.length).each("end",function(){d3.select(this).transition().duration(w).attr("y",function(a,b){return o(a,b)<0?l(0):l(0)-l(o(a,b))<1?l(0)-1:l(o(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(l(o(a,b))-l(0)),1)||0})}),f=k.copy(),g=l.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=d3.scale.ordinal(),l=d3.scale.linear(),m=Math.floor(1e4*Math.random()),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=!0,r=!1,s=c.utils.defaultColor(),t=!1,u=null,v=1200,w=500,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(k=b,a):k},a.yScale=function(b){return arguments.length?(l=b,a):l},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(r=b,a):r},a.clipEdge=function(b){return arguments.length?(q=b,a):q},a.color=function(b){return arguments.length?(s=c.utils.getColor(b),a):s},a.barColor=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(m=b,a):m},a.hideable=function(b){return arguments.length?(t=b,a):t},a.delay=function(b){return arguments.length?(v=b,a):v},a.drawTime=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarChart=function(){function a(c){return c.each(function(c){var t=d3.select(this),A=this,B=(k||parseInt(t.style("width"))||960)-j.left-j.right,C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom;if(a.update=function(){t.transition().call(a)},a.container=this,u.disabled=c.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var E=t.selectAll(".nv-noData").data([w]);return E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),E.attr("x",j.left+B/2).attr("y",j.top+C/2).text(function(a){return a}),a}t.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var F=t.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([c]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),o&&(h.width(B-y()),e.barColor()&&c.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),H.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),C=(l||parseInt(t.style("height"))||400)-j.top-j.bottom),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-j.top+")")),n){var I=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(i)}F.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(c.map(function(a){return a.disabled})).width(B).height(C).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled}));var J=H.select(".nv-barsWrap").datum(c.filter(function(a){return!a.disabled}));d3.transition(J).call(e),f.scale(b).ticks(B/100).tickSize(-C,0),H.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),d3.transition(H.select(".nv-x.nv-axis")).call(f);var K=H.select(".nv-x.nv-axis > g").selectAll("g");if(K.selectAll("line, text").style("opacity",1),q){var L=function(a,b){return"translate("+a+","+b+")"},M=5,N=17;K.selectAll("text").attr("transform",function(a,b,c){return L(0,c%2==0?M:N)});var O=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;H.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return L(0,0===b||O%2!==0?N:M)})}p&&K.filter(function(a,b){return b%Math.ceil(c[0].values.length/(B/100))!==0}).selectAll("text, line").style("opacity",0),r&&K.selectAll("text").attr("transform","rotate("+r+" 0,0)").attr("text-anchor",r>0?"start":"end"),H.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1),g.scale(d).ticks(C/36).tickSize(-B,0),d3.transition(H.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,F.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,u.disabled=c.map(function(a){return!!a.disabled}),x.stateChange(u),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),a.update()}}),x.on("tooltipShow",function(a){s&&z(a,A.parentNode)}),x.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),u.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),u.stacked=b.stacked),a.update()})}),a}var b,d,e=c.models.multiBar(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=!1,r=0,s=!0,t=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" on "+b+"</p>"},u={stacked:!1},v=null,w="No Data Available.",x=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),y=function(){return n?180:0};e.stacked(!1),f.orient("bottom").tickPadding(7).highlightZero(!0).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("left").tickFormat(d3.format(",.1f"));var z=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=t(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],x.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){x.tooltipHide(a)}),x.on("tooltipHide",function(){s&&c.tooltip.cleanup()}),a.dispatch=x,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","stacked","delay","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.reduceXTicks=function(b){return arguments.length?(p=b,a):p},a.rotateLabels=function(b){return arguments.length?(r=b,a):r},a.staggerLabels=function(b){return arguments.length?(q=b,a):q},a.tooltip=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(s=b,a):s},a.tooltipContent=function(b){return arguments.length?(t=b,a):t},a.state=function(b){return arguments.length?(u=b,a):u},a.defaultState=function(b){return arguments.length?(v=b,a):v},a.noData=function(b){return arguments.length?(w=b,a):w},a},c.models.multiBarHorizontal=function(){function a(c){return c.each(function(a){{var c=i-h.left-h.right,k=j-h.top-h.bottom;d3.select(this)}s&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(o)(a)),a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a}),s&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var w=d&&e?[]:a.map(function(a){return a.values.map(function(a,b){return{x:n(a,b),y:o(a,b),y0:a.y0,y1:a.y1}})});l.domain(d||d3.merge(w).map(function(a){return a.x})).rangeBands([0,k],.1),m.domain(e||d3.extent(d3.merge(w).map(function(a){return s?a.y>0?a.y1+a.y:a.y1:a.y}).concat(p))),t&&!s?m.range([m.domain()[0]<0?u:0,c-(m.domain()[1]>0?u:0)]):m.range([0,c]),f=f||l,g=g||d3.scale.linear().domain(m.domain()).range([m(0),m(0)]);{var y=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([a]),z=y.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),A=(z.append("defs"),z.append("g"));y.select("g")}A.append("g").attr("class","nv-groups"),y.attr("transform","translate("+h.left+","+h.top+")");var B=y.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});B.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(B.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),B.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return q(a,b)}).style("stroke",function(a,b){return q(a,b)}),d3.transition(B).style("stroke-opacity",1).style("fill-opacity",.75);var C=B.selectAll("g.nv-bar").data(function(a){return a.values});C.exit().remove();var D=C.enter().append("g").attr("transform",function(b,c,d){return"translate("+g(s?b.y0:0)+","+(s?0:d*l.rangeBand()/a.length+l(n(b,c)))+")"});D.append("rect").attr("width",0).attr("height",l.rangeBand()/(s?1:a.length)),C.on("mouseover",function(b,c){d3.select(this).classed("hover",!0),x.elementMouseover({value:o(b,c),point:b,series:a[b.series],pos:[m(o(b,c)+(s?b.y0:0)),l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),x.elementMouseout({value:o(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){x.elementClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){x.elementDblClick({value:o(b,c),point:b,series:a[b.series],pos:[l(n(b,c))+l.rangeBand()*(s?a.length/2:b.series+.5)/a.length,m(o(b,c)+(s?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),D.append("text"),t&&!s?(C.select("text").attr("text-anchor",function(a,b){return o(a,b)<0?"end":"start"}).attr("y",l.rangeBand()/(2*a.length)).attr("dy",".32em").text(function(a,b){return v(o(a,b))}),d3.transition(C).select("text").attr("x",function(a,b){return o(a,b)<0?-4:m(o(a,b))-m(0)+4})):C.selectAll("text").text(""),C.attr("class",function(a,b){return o(a,b)<0?"nv-bar negative":"nv-bar positive"}),r&&(b||(b=a.map(function(){return!0})),C.style("fill",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()}).style("stroke",function(a,c,d){return d3.rgb(r(a,c)).darker(b.map(function(a,b){return b}).filter(function(a,c){return!b[c]})[d]).toString()})),s?d3.transition(C).attr("transform",function(a,b){return"translate("+m(a.y1)+","+l(n(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(m(o(a,b)+a.y0)-m(a.y0))}).attr("height",l.rangeBand()):d3.transition(C).attr("transform",function(b,c){return"translate("+(o(b,c)<0?m(o(b,c)):m(0))+","+(b.series*l.rangeBand()/a.length+l(n(b,c)))+")"}).select("rect").attr("height",l.rangeBand()/a.length).attr("width",function(a,b){return Math.max(Math.abs(m(o(a,b))-m(0)),1)}),f=l.copy(),g=m.copy()}),a}var b,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=960,j=500,k=Math.floor(1e4*Math.random()),l=d3.scale.ordinal(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[0],q=c.utils.defaultColor(),r=null,s=!1,t=!1,u=60,v=d3.format(",.2f"),w=1200,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=x,a.x=function(b){return arguments.length?(n=b,a):n},a.y=function(b){return arguments.length?(o=b,a):o},a.margin=function(b){return arguments.length?(h.top="undefined"!=typeof b.top?b.top:h.top,h.right="undefined"!=typeof b.right?b.right:h.right,h.bottom="undefined"!=typeof b.bottom?b.bottom:h.bottom,h.left="undefined"!=typeof b.left?b.left:h.left,a):h},a.width=function(b){return arguments.length?(i=b,a):i},a.height=function(b){return arguments.length?(j=b,a):j},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.xDomain=function(b){return arguments.length?(d=b,a):d},a.yDomain=function(b){return arguments.length?(e=b,a):e},a.forceY=function(b){return arguments.length?(p=b,a):p},a.stacked=function(b){return arguments.length?(s=b,a):s},a.color=function(b){return arguments.length?(q=c.utils.getColor(b),a):q},a.barColor=function(b){return arguments.length?(r=c.utils.getColor(b),a):r},a.disabled=function(c){return arguments.length?(b=c,a):b},a.id=function(b){return arguments.length?(k=b,a):k},a.delay=function(b){return arguments.length?(w=b,a):w},a.showValues=function(b){return arguments.length?(t=b,a):t},a.valueFormat=function(b){return arguments.length?(v=b,a):v},a.valuePadding=function(b){return arguments.length?(u=b,a):u},a},c.models.multiBarHorizontalChart=function(){function a(c){return c.each(function(p){var r=d3.select(this),y=this,z=(k||parseInt(r.style("width"))||960)-j.left-j.right,A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom;
+if(a.update=function(){r.transition().call(a)},a.container=this,s.disabled=p.map(function(a){return!!a.disabled}),!t){var B;t={};for(B in s)t[B]=s[B]instanceof Array?s[B].slice(0):s[B]}if(!(p&&p.length&&p.filter(function(a){return a.values.length}).length)){var C=r.selectAll(".nv-noData").data([u]);return C.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),C.attr("x",j.left+z/2).attr("y",j.top+A/2).text(function(a){return a}),a}r.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var D=r.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([p]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),F=D.select("g");if(E.append("g").attr("class","nv-x nv-axis"),E.append("g").attr("class","nv-y nv-axis"),E.append("g").attr("class","nv-barsWrap"),E.append("g").attr("class","nv-legendWrap"),E.append("g").attr("class","nv-controlsWrap"),o&&(h.width(z-w()),e.barColor()&&p.forEach(function(a,b){a.color=d3.rgb("#ccc").darker(1.5*b).toString()}),F.select(".nv-legendWrap").datum(p).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),A=(l||parseInt(r.style("height"))||400)-j.top-j.bottom),F.select(".nv-legendWrap").attr("transform","translate("+w()+","+-j.top+")")),n){var G=[{key:"Grouped",disabled:e.stacked()},{key:"Stacked",disabled:!e.stacked()}];i.width(w()).color(["#444","#444","#444"]),F.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(i)}D.attr("transform","translate("+j.left+","+j.top+")"),e.disabled(p.map(function(a){return a.disabled})).width(z).height(A).color(p.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!p[b].disabled}));var H=F.select(".nv-barsWrap").datum(p.filter(function(a){return!a.disabled}));d3.transition(H).call(e),f.scale(b).ticks(A/24).tickSize(-z,0),d3.transition(F.select(".nv-x.nv-axis")).call(f);var I=F.select(".nv-x.nv-axis").selectAll("g");I.selectAll("line, text").style("opacity",1),g.scale(d).ticks(z/100).tickSize(-A,0),F.select(".nv-y.nv-axis").attr("transform","translate(0,"+A+")"),d3.transition(F.select(".nv-y.nv-axis")).call(g),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,p.filter(function(a){return!a.disabled}).length||p.map(function(a){return a.disabled=!1,D.selectAll(".nv-series").classed("disabled",!1),a}),s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){p.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=p.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(G=G.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}s.stacked=e.stacked(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){q&&x(a,y.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(p.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),"undefined"!=typeof b.stacked&&(e.stacked(b.stacked),s.stacked=b.stacked),c.call(a)})}),a}var b,d,e=c.models.multiBarHorizontal(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend().height(30),i=c.models.legend().height(30),j={top:30,right:20,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!1,q=!0,r=function(a,b,c){return"<h3>"+a+" - "+b+"</h3><p>"+c+"</p>"},s={stacked:p},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=function(){return n?180:0};e.stacked(p),f.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f"));var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=r(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"e":"w",null,d)};return e.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("elementMouseout.tooltip",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){q&&c.tooltip.cleanup()}),a.dispatch=v,a.multibar=e,a.legend=h,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","xDomain","yDomain","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(r=b,a):r},a.tooltips=function(b){return arguments.length?(q=b,a):q},a.tooltipContent=function(b){return arguments.length?(r=b,a):r},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},a},c.models.multiChart=function(){function a(c){return c.each(function(c){var j=d3.select(this),y=this;a.update=function(){j.transition().call(a)},a.container=this;var z=(f||parseInt(j.style("width"))||960)-d.left-d.right,A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom,B=c.filter(function(a){return!a.disabled&&"line"==a.type&&1==a.yAxis}),C=c.filter(function(a){return!a.disabled&&"line"==a.type&&2==a.yAxis}),D=c.filter(function(a){return!a.disabled&&"bar"==a.type&&1==a.yAxis}),E=c.filter(function(a){return!a.disabled&&"bar"==a.type&&2==a.yAxis}),F=c.filter(function(a){return!a.disabled&&"area"==a.type&&1==a.yAxis}),G=c.filter(function(a){return!a.disabled&&"area"==a.type&&2==a.yAxis}),H=c.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),I=c.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});b.domain(d3.extent(d3.merge(H.concat(I)),function(a){return a.x})).range([0,z]);var J=j.selectAll("g.wrap.multiChart").data([c]),K=J.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");K.append("g").attr("class","x axis"),K.append("g").attr("class","y1 axis"),K.append("g").attr("class","y2 axis"),K.append("g").attr("class","lines1Wrap"),K.append("g").attr("class","lines2Wrap"),K.append("g").attr("class","bars1Wrap"),K.append("g").attr("class","bars2Wrap"),K.append("g").attr("class","stack1Wrap"),K.append("g").attr("class","stack2Wrap"),K.append("g").attr("class","legendWrap");var L=J.select("g");h&&(v.width(z/2),L.select(".legendWrap").datum(c.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(v),d.top!=v.height()&&(d.top=v.height()+v.legendBelowPadding(),A=(g||parseInt(j.style("height"))||400)-d.top-d.bottom),L.select(".legendWrap").attr("transform","translate("+z/2+","+-d.top+")")),m.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"line"==c[b].type})),n.width(z).height(A).interpolate("monotone").color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"line"==c[b].type})),o.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"bar"==c[b].type})),p.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"bar"==c[b].type})),q.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&1==c[b].yAxis&&"area"==c[b].type})),r.width(z).height(A).color(c.map(function(a,b){return a.color||e[b%e.length]}).filter(function(a,b){return!c[b].disabled&&2==c[b].yAxis&&"area"==c[b].type})),L.attr("transform","translate("+d.left+","+d.top+")");var M=L.select(".lines1Wrap").datum(B),N=L.select(".bars1Wrap").datum(D),O=L.select(".stack1Wrap").datum(F),P=L.select(".lines2Wrap").datum(C),Q=L.select(".bars2Wrap").datum(E),R=L.select(".stack2Wrap").datum(G),S=F.length?F.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],T=G.length?G.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];k.domain(d3.extent(d3.merge(H).concat(S),function(a){return a.y})).range([0,A]),l.domain(d3.extent(d3.merge(I).concat(T),function(a){return a.y})).range([0,A]),m.yDomain(k.domain()),o.yDomain(k.domain()),q.yDomain(k.domain()),n.yDomain(l.domain()),p.yDomain(l.domain()),r.yDomain(l.domain()),F.length&&d3.transition(O).call(q),G.length&&d3.transition(R).call(r),D.length&&d3.transition(N).call(o),E.length&&d3.transition(Q).call(p),B.length&&d3.transition(M).call(m),C.length&&d3.transition(P).call(n),s.ticks(z/100).tickSize(-A,0),L.select(".x.axis").attr("transform","translate(0,"+A+")"),d3.transition(L.select(".x.axis")).call(s),t.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y1.axis")).call(t),u.ticks(A/36).tickSize(-z,0),d3.transition(L.select(".y2.axis")).call(u),L.select(".y2.axis").style("opacity",I.length?1:0).attr("transform","translate("+b.range()[1]+",0)"),v.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,J.selectAll(".series").classed("disabled",!1),a}),a.update()}),w.on("tooltipShow",function(a){i&&x(a,y.parentNode)})}),a}var b,d={top:30,right:20,bottom:50,left:60},e=d3.scale.category20().range(),f=null,g=null,h=!0,i=!0,j=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" at "+b+"</p>"},b=d3.scale.linear(),k=d3.scale.linear(),l=d3.scale.linear(),m=c.models.line().yScale(k),n=c.models.line().yScale(l),o=c.models.multiBar().stacked(!1).yScale(k),p=c.models.multiBar().stacked(!1).yScale(l),q=c.models.stackedArea().yScale(k),r=c.models.stackedArea().yScale(l),s=c.models.axis().scale(b).orient("bottom").tickPadding(5),t=c.models.axis().scale(k).orient("left"),u=c.models.axis().scale(l).orient("right"),v=c.models.legend().height(30),w=d3.dispatch("tooltipShow","tooltipHide"),x=function(b,d){var e=b.pos[0]+(d.offsetLeft||0),f=b.pos[1]+(d.offsetTop||0),g=s.tickFormat()(m.x()(b.point,b.pointIndex)),h=(2==b.series.yAxis?u:t).tickFormat()(m.y()(b.point,b.pointIndex)),i=j(b.series.key,g,h,b,a);c.tooltip.show([e,f],i,void 0,void 0,d.offsetParent)};return m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),o.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),o.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),p.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),p.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),q.dispatch.on("tooltipShow",function(a){return Math.round(100*q.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),q.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),r.dispatch.on("tooltipShow",function(a){return Math.round(100*r.y()(a.point))?(a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a),void 0):(setTimeout(function(){d3.selectAll(".point.hover").classed("hover",!1)},0),!1)}),r.dispatch.on("tooltipHide",function(a){w.tooltipHide(a)}),m.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),m.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),n.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+d.left,a.pos[1]+d.top],w.tooltipShow(a)}),n.dispatch.on("elementMouseout.tooltip",function(a){w.tooltipHide(a)}),w.on("tooltipHide",function(){i&&c.tooltip.cleanup()}),a.dispatch=w,a.lines1=m,a.lines2=n,a.bars1=o,a.bars2=p,a.stack1=q,a.stack2=r,a.xAxis=s,a.yAxis1=t,a.yAxis2=u,a.x=function(b){return arguments.length?(getX=b,m.x(b),o.x(b),a):getX},a.y=function(b){return arguments.length?(getY=b,m.y(b),o.y(b),a):getY},a.margin=function(b){return arguments.length?(d=b,a):d},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(b){return arguments.length?(e=b,v.color(b),a):e},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(i=b,a):i},a.tooltipContent=function(b){return arguments.length?(j=b,a):j},a},c.models.ohlcBar=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,u=g-e.top-e.bottom,w=d3.select(this);i.domain(b||d3.extent(a[0].values.map(k).concat(q))),s?i.range([.5*c/a[0].values.length,c*(a[0].values.length-.5)/a[0].values.length]):i.range([0,c]),j.domain(d||[d3.min(a[0].values.map(p).concat(r)),d3.max(a[0].values.map(o).concat(r))]).range([u,0]),(i.domain()[0]===i.domain()[1]||j.domain()[0]===j.domain()[1])&&(singlePoint=!0),i.domain()[0]===i.domain()[1]&&(i.domain()[0]?i.domain([i.domain()[0]-.01*i.domain()[0],i.domain()[1]+.01*i.domain()[1]]):i.domain([-1,1])),j.domain()[0]===j.domain()[1]&&(j.domain()[0]?j.domain([j.domain()[0]+.01*j.domain()[0],j.domain()[1]-.01*j.domain()[1]]):j.domain([-1,1]));var x=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([a[0].values]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),z=y.append("defs"),A=y.append("g"),B=x.select("g");A.append("g").attr("class","nv-ticks"),x.attr("transform","translate("+e.left+","+e.top+")"),w.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:h})}),z.append("clipPath").attr("id","nv-chart-clip-path-"+h).append("rect"),x.select("#nv-chart-clip-path-"+h+" rect").attr("width",c).attr("height",u),B.attr("clip-path",t?"url(#nv-chart-clip-path-"+h+")":"");var C=x.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});C.exit().remove();C.enter().append("path").attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(b,d){var e=c/a[0].values.length*.9;return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"}).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),v.elementMouseover({point:b,series:a[0],pos:[i(k(b,c)),j(l(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),v.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){v.elementClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({value:l(a,b),data:a,index:b,pos:[i(k(a,b)),j(l(a,b))],e:d3.event,id:h}),d3.event.stopPropagation()});C.attr("class",function(a,b,c){return(m(a,b)>n(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(C).attr("transform",function(a,b){return"translate("+i(k(a,b))+","+j(o(a,b))+")"}).attr("d",function(b,d){var e=c/a[0].values.length*.9;return"m0,0l0,"+(j(m(b,d))-j(o(b,d)))+"l"+-e/2+",0l"+e/2+",0l0,"+(j(p(b,d))-j(m(b,d)))+"l0,"+(j(n(b,d))-j(p(b,d)))+"l"+e/2+",0l"+-e/2+",0z"})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=Math.floor(1e4*Math.random()),i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=function(a){return a.open},n=function(a){return a.close},o=function(a){return a.high},p=function(a){return a.low},q=[],r=[],s=!1,t=!0,u=c.utils.defaultColor(),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.x=function(b){return arguments.length?(k=b,a):k},a.y=function(b){return arguments.length?(l=b,a):l},a.open=function(b){return arguments.length?(m=b,a):m},a.close=function(b){return arguments.length?(n=b,a):n},a.high=function(b){return arguments.length?(o=b,a):o},a.low=function(b){return arguments.length?(p=b,a):p},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.forceX=function(b){return arguments.length?(q=b,a):q},a.forceY=function(b){return arguments.length?(r=b,a):r},a.padData=function(b){return arguments.length?(s=b,a):s},a.clipEdge=function(b){return arguments.length?(t=b,a):t},a.color=function(b){return arguments.length?(u=c.utils.getColor(b),a):u},a.id=function(b){return arguments.length?(h=b,a):h},a},c.models.pie=function(){function a(c){return c.each(function(a){function c(a){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,q||(a.innerRadius=0);var b=d3.interpolate(this._current,a);return this._current=b(0),function(a){return D(b(a))}}var i=d-b.left-b.right,l=e-b.top-b.bottom,w=Math.min(i,l)/2,x=w-w/5,y=d3.select(this),z=y.selectAll(".nv-wrap.nv-pie").data([f(a[0])]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+j),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-pie"),z.attr("transform","translate("+b.left+","+b.top+")"),C.select(".nv-pie").attr("transform","translate("+i/2+","+l/2+")"),y.on("click",function(a,b){v.chartClick({data:a,index:b,pos:d3.event,id:j})});var D=d3.svg.arc().outerRadius(x);s&&D.startAngle(s),t&&D.endAngle(t),q&&D.innerRadius(w*u);var E=d3.layout.pie().sort(null).value(function(a){return a.disabled?0:h(a)}),F=z.select(".nv-pie").selectAll(".nv-slice").data(E);F.exit().remove();var G=F.enter().append("g").attr("class","nv-slice").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({label:g(a.data),value:h(a.data),point:a.data,pointIndex:b,pos:[d3.event.pageX,d3.event.pageY],id:j})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({label:g(a.data),value:h(a.data),point:a.data,index:b,id:j})}).on("click",function(a,b){v.elementClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({label:g(a.data),value:h(a.data),point:a.data,index:b,pos:d3.event,id:j}),d3.event.stopPropagation()});F.attr("fill",function(a,b){return k(a,b)}).attr("stroke",function(a,b){return k(a,b)});G.append("path").each(function(a){this._current=a});if(d3.transition(F.select("path")).attr("d",D).attrTween("d",c),m){var H=d3.svg.arc().innerRadius(0);n&&(H=D),o&&(H=d3.svg.arc().outerRadius(D.outerRadius())),G.append("g").classed("nv-label",!0).each(function(a){var b=d3.select(this);b.attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),b.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),b.append("text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}),F.select(".nv-label").transition().attr("transform",function(a){if(r){a.outerRadius=x+10,a.innerRadius=x+15;var b=(a.startAngle+a.endAngle)/2*(180/Math.PI);return(a.startAngle+a.endAngle)/2<Math.PI?b-=90:b+=90,"translate("+H.centroid(a)+") rotate("+b+")"}return a.outerRadius=w+10,a.innerRadius=w+15,"translate("+H.centroid(a)+")"}),F.each(function(a){var b=d3.select(this);b.select(".nv-label text").style("text-anchor",r?(a.startAngle+a.endAngle)/2<Math.PI?"start":"end":"middle").text(function(a){var b=(a.endAngle-a.startAngle)/(2*Math.PI);return a.value&&b>p?g(a.data):""});var c=b.select("text").node().getBBox();b.select(".nv-label rect").attr("width",c.width+10).attr("height",c.height+10).attr("transform",function(){return"translate("+[c.x-5,c.y-5]+")"})})}}),a}var b={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.values},g=function(a){return a.x},h=function(a){return a.y},i=function(a){return a.description},j=Math.floor(1e4*Math.random()),k=c.utils.defaultColor(),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p=.02,q=!1,r=!1,s=!1,t=!1,u=.5,v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return a.dispatch=v,a.margin=function(c){return arguments.length?(b.top="undefined"!=typeof c.top?c.top:b.top,b.right="undefined"!=typeof c.right?c.right:b.right,b.bottom="undefined"!=typeof c.bottom?c.bottom:b.bottom,b.left="undefined"!=typeof c.left?c.left:b.left,a):b},a.width=function(b){return arguments.length?(d=b,a):d},a.height=function(b){return arguments.length?(e=b,a):e},a.values=function(b){return arguments.length?(f=b,a):f},a.x=function(b){return arguments.length?(g=b,a):g},a.y=function(b){return arguments.length?(h=d3.functor(b),a):h},a.description=function(b){return arguments.length?(i=b,a):i},a.showLabels=function(b){return arguments.length?(m=b,a):m},a.labelSunbeamLayout=function(b){return arguments.length?(r=b,a):r},a.donutLabelsOutside=function(b){return arguments.length?(o=b,a):o},a.pieLabelsOutside=function(b){return arguments.length?(n=b,a):n},a.donut=function(b){return arguments.length?(q=b,a):q},a.donutRatio=function(b){return arguments.length?(u=b,a):u},a.startAngle=function(b){return arguments.length?(s=b,a):s},a.endAngle=function(b){return arguments.length?(t=b,a):t},a.id=function(b){return arguments.length?(j=b,a):j},a.color=function(b){return arguments.length?(k=c.utils.getColor(b),a):k},a.valueFormat=function(b){return arguments.length?(l=b,a):l},a.labelThreshold=function(b){return arguments.length?(p=b,a):p},a},c.models.pieChart=function(){function a(c){return c.each(function(c){var i=d3.select(this),j=(f||parseInt(i.style("width"))||960)-e.left-e.right,k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom;if(a.update=function(){i.transition().call(a)},a.container=this,l.disabled=c[0].map(function(a){return!!a.disabled}),!m){var p;m={};for(p in l)m[p]=l[p]instanceof Array?l[p].slice(0):l[p]}if(!c[0]||!c[0].length){var q=i.selectAll(".nv-noData").data([n]);return q.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),q.attr("x",e.left+j/2).attr("y",e.top+k/2).text(function(a){return a}),a}i.selectAll(".nv-noData").remove();var r=i.selectAll("g.nv-wrap.nv-pieChart").data([c]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),t=r.select("g");s.append("g").attr("class","nv-pieWrap"),s.append("g").attr("class","nv-legendWrap"),h&&(d.width(j).key(b.x()),r.select(".nv-legendWrap").datum(b.values()(c[0])).call(d),e.top!=d.height()&&(e.top=d.height()+d.legendBelowPadding(),k=(g||parseInt(i.style("height"))||400)-e.top-e.bottom),r.select(".nv-legendWrap").attr("transform","translate(0,"+-e.top+")")),r.attr("transform","translate("+e.left+","+e.top+")"),b.width(j).height(k);var u=t.select(".nv-pieWrap").datum(c);d3.transition(u).call(b),d.dispatch.on("legendClick",function(d){d.disabled=!d.disabled,b.values()(c[0]).filter(function(a){return!a.disabled}).length||b.values()(c[0]).map(function(a){return a.disabled=!1,r.selectAll(".nv-series").classed("disabled",!1),a}),l.disabled=c[0].map(function(a){return!!a.disabled}),o.stateChange(l),a.update()}),b.dispatch.on("elementMouseout.tooltip",function(a){o.tooltipHide(a)}),o.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c[0].forEach(function(a,c){a.disabled=b.disabled[c]}),l.disabled=b.disabled),a.update()})}),a}var b=c.models.pie(),d=c.models.legend(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=!0,i=c.utils.defaultColor(),j=!0,k=function(a,b){return"<h3>"+a+"</h3><p>"+b+"</p>"},l={},m=null,n="No Data Available.",o=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),p=function(d,e){var f=b.description()(d.point)||b.x()(d.point),g=d.pos[0]+(e&&e.offsetLeft||0),h=d.pos[1]+(e&&e.offsetTop||0),i=b.valueFormat()(b.y()(d.point)),j=k(f,i,d,a);c.tooltip.show([g,h],j,d.value<0?"n":"s",null,e)};return b.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],o.tooltipShow(a)}),o.on("tooltipShow",function(a){j&&p(a)}),o.on("tooltipHide",function(){j&&c.tooltip.cleanup()}),a.legend=d,a.dispatch=o,a.pie=b,d3.rebind(a,b,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","donut","donutRatio","labelThreshold"),a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.color=function(e){return arguments.length?(i=c.utils.getColor(e),d.color(i),b.color(i),a):i},a.showLegend=function(b){return arguments.length?(h=b,a):h},a.tooltips=function(b){return arguments.length?(j=b,a):j},a.tooltipContent=function(b){return arguments.length?(k=b,a):k},a.state=function(b){return arguments.length?(l=b,a):l},a.defaultState=function(b){return arguments.length?(m=b,a):m},a.noData=function(b){return arguments.length?(n=b,a):n},a},c.models.scatter=function(){function a(c){return c.each(function(a){function c(){if(!w)return!1;var b=d3.merge(a.map(function(a,b){return a.values.map(function(a,c){var d=o(a,c)+1e-7*Math.random(),e=p(a,c)+1e-7*Math.random();return[l(d),m(e),b,c,a]}).filter(function(a,b){return y(a[4],b)})}));if(K===!0){if(C){var c=Q.select("defs").selectAll(".nv-point-clips").data([k]).enter();c.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+k);var d=Q.select("#nv-points-clip-"+k).selectAll("circle").data(b);d.enter().append("circle").attr("r",D),d.exit().remove(),d.attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}),Q.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+k+")")}b.length&&(b.push([l.range()[0]-20,m.range()[0]-20,null,null]),b.push([l.range()[1]+20,m.range()[1]+20,null,null]),b.push([l.range()[0]-20,m.range()[0]+20,null,null]),b.push([l.range()[1]+20,m.range()[1]-20,null,null]));var e=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),f=d3.geom.voronoi(b).map(function(a,c){return{data:e.clip(a),series:b[c][2],point:b[c][3]}}),j=Q.select(".nv-point-paths").selectAll("path").data(f);j.enter().append("path").attr("class",function(a,b){return"nv-path-"+b}),j.exit().remove(),j.attr("d",function(a){return 0===a.data.length?"M 0 0":"M"+a.data.join("L")+"Z"}),j.on("click",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementClick({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseover",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseover({point:d,series:c,pos:[l(o(d,b.point))+g.left,m(p(d,b.point))+g.top],seriesIndex:b.series,pointIndex:b.point})}).on("mouseout",function(b){if(L)return 0;var c=a[b.series],d=c.values[b.point];J.elementMouseout({point:d,series:c,seriesIndex:b.series,pointIndex:b.point})})}else Q.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementClick({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseover",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseover({point:e,series:d,pos:[l(o(e,c))+g.left,m(p(e,c))+g.top],seriesIndex:b.series,pointIndex:c})}).on("mouseout",function(b,c){if(L||!a[b.series])return 0;var d=a[b.series],e=d.values[c];J.elementMouseout({point:e,series:d,seriesIndex:b.series,pointIndex:c})});L=!1}var M=h-g.left-g.right,N=i-g.top-g.bottom,O=d3.select(this);a=a.map(function(a,b){return a.values=a.values.map(function(a){return a.series=b,a}),a});var P=E&&F&&G?[]:d3.merge(a.map(function(a){return a.values.map(function(a,b){return{x:o(a,b),y:p(a,b),size:q(a,b)}})}));l.domain(E||d3.extent(P.map(function(a){return a.x}).concat(t))),z&&a[0]?l.range([(M*A+M)/(2*a[0].values.length),M-M*(1+A)/(2*a[0].values.length)]):l.range([0,M]),m.domain(F||d3.extent(P.map(function(a){return a.y}).concat(u))).range([N,0]),n.domain(G||d3.extent(P.map(function(a){return a.size}).concat(v))).range(H||[16,256]),(l.domain()[0]===l.domain()[1]||m.domain()[0]===m.domain()[1])&&(I=!0),l.domain()[0]===l.domain()[1]&&(l.domain()[0]?l.domain([l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]):l.domain([-1,1])),m.domain()[0]===m.domain()[1]&&(m.domain()[0]?m.domain([m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]):m.domain([-1,1])),isNaN(l.domain()[0])&&l.domain([-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),b=b||l,d=d||m,e=e||n;var Q=O.selectAll("g.nv-wrap.nv-scatter").data([a]),R=Q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k+(I?" nv-single-point":"")),S=R.append("defs"),T=R.append("g"),U=Q.select("g");T.append("g").attr("class","nv-groups"),T.append("g").attr("class","nv-point-paths"),Q.attr("transform","translate("+g.left+","+g.top+")"),S.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),Q.select("#nv-edge-clip-"+k+" rect").attr("width",M).attr("height",N),U.attr("clip-path",B?"url(#nv-edge-clip-"+k+")":""),L=!0;var V=Q.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});if(V.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(V.exit()).style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),V.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),d3.transition(V).style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5),s){var W=V.selectAll("circle.nv-point").data(function(a){return a.values},x);W.enter().append("circle").attr("cx",function(a,c){return b(o(a,c))}).attr("cy",function(a,b){return d(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)}),W.exit().remove(),V.exit().selectAll("path.nv-point").transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("cx",function(a,b){return l(o(a,b))}).attr("cy",function(a,b){return m(p(a,b))}).attr("r",function(a,b){return Math.sqrt(n(q(a,b))/Math.PI)})}else{var W=V.selectAll("path.nv-point").data(function(a){return a.values});W.enter().append("path").attr("transform",function(a,c){return"translate("+b(o(a,c))+","+d(p(a,c))+")"
+}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))})),W.exit().remove(),d3.transition(V.exit().selectAll("path.nv-point")).attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).remove(),W.each(function(a,b){d3.select(this).classed("nv-point",!0).classed("nv-point-"+b,!0)}),W.transition().attr("transform",function(a,b){return"translate("+l(o(a,b))+","+m(p(a,b))+")"}).attr("d",d3.svg.symbol().type(r).size(function(a,b){return n(q(a,b))}))}clearTimeout(f),f=setTimeout(c,300),b=l.copy(),d=m.copy(),e=n.copy()}),a}var b,d,e,f,g={top:0,right:0,bottom:0,left:0},h=960,i=500,j=c.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=function(a){return a.size||1},r=function(a){return a.shape||"circle"},s=!0,t=[],u=[],v=[],w=!0,x=null,y=function(a){return!a.notActive},z=!1,A=.1,B=!1,C=!0,D=function(){return 25},E=null,F=null,G=null,H=null,I=!1,J=d3.dispatch("elementClick","elementMouseover","elementMouseout"),K=!0,L=!1;return J.on("elementMouseover.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!0)}),J.on("elementMouseout.point",function(a){w&&d3.select(".nv-chart-"+k+" .nv-series-"+a.seriesIndex+" .nv-point-"+a.pointIndex).classed("hover",!1)}),a.dispatch=J,a.x=function(b){return arguments.length?(o=d3.functor(b),a):o},a.y=function(b){return arguments.length?(p=d3.functor(b),a):p},a.size=function(b){return arguments.length?(q=d3.functor(b),a):q},a.margin=function(b){return arguments.length?(g.top="undefined"!=typeof b.top?b.top:g.top,g.right="undefined"!=typeof b.right?b.right:g.right,g.bottom="undefined"!=typeof b.bottom?b.bottom:g.bottom,g.left="undefined"!=typeof b.left?b.left:g.left,a):g},a.width=function(b){return arguments.length?(h=b,a):h},a.height=function(b){return arguments.length?(i=b,a):i},a.xScale=function(b){return arguments.length?(l=b,a):l},a.yScale=function(b){return arguments.length?(m=b,a):m},a.zScale=function(b){return arguments.length?(n=b,a):n},a.xDomain=function(b){return arguments.length?(E=b,a):E},a.yDomain=function(b){return arguments.length?(F=b,a):F},a.sizeDomain=function(b){return arguments.length?(G=b,a):G},a.sizeRange=function(b){return arguments.length?(H=b,a):H},a.forceX=function(b){return arguments.length?(t=b,a):t},a.forceY=function(b){return arguments.length?(u=b,a):u},a.forceSize=function(b){return arguments.length?(v=b,a):v},a.interactive=function(b){return arguments.length?(w=b,a):w},a.pointKey=function(b){return arguments.length?(x=b,a):x},a.pointActive=function(b){return arguments.length?(y=b,a):y},a.padData=function(b){return arguments.length?(z=b,a):z},a.padDataOuter=function(b){return arguments.length?(A=b,a):A},a.clipEdge=function(b){return arguments.length?(B=b,a):B},a.clipVoronoi=function(b){return arguments.length?(C=b,a):C},a.useVoronoi=function(b){return arguments.length?(K=b,K===!1&&(C=!1),a):K},a.clipRadius=function(b){return arguments.length?(D=b,a):D},a.color=function(b){return arguments.length?(j=c.utils.getColor(b),a):j},a.shape=function(b){return arguments.length?(r=b,a):r},a.onlyCircles=function(b){return arguments.length?(s=b,a):s},a.id=function(b){return arguments.length?(k=b,a):k},a.singlePoint=function(b){return arguments.length?(I=b,a):I},a},c.models.scatterChart=function(){function a(c){return c.each(function(c){function y(){if(w)return Q.select(".nv-point-paths").style("pointer-events","all"),!1;Q.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(v).focus(a[0]),o.distortion(v).focus(a[1]),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e),Q.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),Q.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var z=d3.select(this),A=this,J=(k||parseInt(z.style("width"))||960)-j.left-j.right,K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom;if(a.update=function(){z.transition().call(a)},B.disabled=c.map(function(a){return!!a.disabled}),!C){var L;C={};for(L in B)C[L]=B[L]instanceof Array?B[L].slice(0):B[L]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var M=z.selectAll(".nv-noData").data([E]);return M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),M.attr("x",j.left+J/2).attr("y",j.top+K/2).text(function(a){return a}),a}z.selectAll(".nv-noData").remove(),F=F||n,G=G||o;var N=z.selectAll("g.nv-wrap.nv-scatterChart").data([c]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),P=O.append("g"),Q=N.select("g");if(P.append("rect").attr("class","nvd3 nv-background"),P.append("g").attr("class","nv-x nv-axis"),P.append("g").attr("class","nv-y nv-axis"),P.append("g").attr("class","nv-scatterWrap"),P.append("g").attr("class","nv-distWrap"),P.append("g").attr("class","nv-legendWrap"),P.append("g").attr("class","nv-controlsWrap"),t&&(f.width(J/2),N.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),K=(l||parseInt(z.style("height"))||400)-j.top-j.bottom),N.select(".nv-legendWrap").attr("transform","translate("+J/2+","+-j.top+")")),u&&(g.width(180).color(["#444"]),Q.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-j.top+")").call(g)),N.attr("transform","translate("+j.left+","+j.top+")"),b.width(J).height(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})).xDomain(null).yDomain(null),N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),p){var R=n.domain()[1]-n.domain()[0];b.xDomain([n.domain()[0]-p*R,n.domain()[1]+p*R])}if(q){var S=o.domain()[1]-o.domain()[0];b.yDomain([o.domain()[0]-q*S,o.domain()[1]+q*S])}N.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),d.scale(n).ticks(d.ticks()&&d.ticks().length?d.ticks():J/100).tickSize(-K,0),Q.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()&&e.ticks().length?e.ticks():K/36).tickSize(-J,0),Q.select(".nv-y.nv-axis").call(e),r&&(h.getData(b.x()).scale(n).width(J).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),Q.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),s&&(i.getData(b.y()).scale(o).width(K).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),P.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),Q.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(Q.select(".nv-background").attr("width",J).attr("height",K),Q.select(".nv-background").on("mousemove",y),Q.select(".nv-background").on("click",function(){w=!w}),b.dispatch.on("elementClick.freezeFisheye",function(){w=!w})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,v=c.disabled?0:2.5,Q.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),Q.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(v).focus(0),o.distortion(v).focus(0),Q.select(".nv-scatterWrap").call(b),Q.select(".nv-x.nv-axis").call(d),Q.select(".nv-y.nv-axis").call(e)):w=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,N.selectAll(".nv-series").classed("disabled",!1),a}),B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,B.disabled=c.map(function(a){return!!a.disabled}),D.stateChange(B),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",function(){return a.pos[1]-K}),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],D.tooltipShow(a)}),D.on("tooltipShow",function(a){x&&H(a,A.parentNode)}),D.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),B.disabled=b.disabled),a.update()}),F=n.copy(),G=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=0,q=0,r=!1,s=!1,t=!0,u=!!d3.fisheye,v=0,w=!1,x=!0,y=function(a,b){return"<strong>"+b+"</strong>"},z=function(a,b,c){return"<strong>"+c+"</strong>"},A=null,B={},C=null,D=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var F,G,H=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=y&&c.tooltip.show([k,l],y(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=z&&c.tooltip.show([m,p],z(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=A&&c.tooltip.show([h,i],A(f.series.key,q,r,f,a),f.value<0?"n":"s",null,g)},I=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){D.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),D.on("tooltipHide",function(){x&&c.tooltip.cleanup()}),a.dispatch=D,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(r=b,a):r},a.showDistY=function(b){return arguments.length?(s=b,a):s},a.showControls=function(b){return arguments.length?(u=b,a):u},a.showLegend=function(b){return arguments.length?(t=b,a):t},a.fisheye=function(b){return arguments.length?(v=b,a):v},a.xPadding=function(b){return arguments.length?(p=b,a):p},a.yPadding=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(x=b,a):x},a.tooltipContent=function(b){return arguments.length?(A=b,a):A},a.tooltipXContent=function(b){return arguments.length?(y=b,a):y},a.tooltipYContent=function(b){return arguments.length?(z=b,a):z},a.state=function(b){return arguments.length?(B=b,a):B},a.defaultState=function(b){return arguments.length?(C=b,a):C},a.noData=function(b){return arguments.length?(E=b,a):E},a},c.models.scatterPlusLineChart=function(){function a(c){return c.each(function(c){function w(){if(u)return O.select(".nv-point-paths").style("pointer-events","all"),!1;O.select(".nv-point-paths").style("pointer-events","none");var a=d3.mouse(this);n.distortion(t).focus(a[0]),o.distortion(t).focus(a[1]),O.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e),O.select(".nv-distributionX").datum(c.filter(function(a){return!a.disabled})).call(h),O.select(".nv-distributionY").datum(c.filter(function(a){return!a.disabled})).call(i)}var x=d3.select(this),y=this,H=(k||parseInt(x.style("width"))||960)-j.left-j.right,I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom;if(a.update=function(){x.transition().call(a)},a.container=this,z.disabled=c.map(function(a){return!!a.disabled}),!A){var J;A={};for(J in z)A[J]=z[J]instanceof Array?z[J].slice(0):z[J]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var K=x.selectAll(".nv-noData").data([C]);return K.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),K.attr("x",j.left+H/2).attr("y",j.top+I/2).text(function(a){return a}),a}x.selectAll(".nv-noData").remove(),n=b.xScale(),o=b.yScale(),D=D||n,E=E||o;var L=x.selectAll("g.nv-wrap.nv-scatterChart").data([c]),M=L.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+b.id()),N=M.append("g"),O=L.select("g");N.append("rect").attr("class","nvd3 nv-background"),N.append("g").attr("class","nv-x nv-axis"),N.append("g").attr("class","nv-y nv-axis"),N.append("g").attr("class","nv-scatterWrap"),N.append("g").attr("class","nv-regressionLinesWrap"),N.append("g").attr("class","nv-distWrap"),N.append("g").attr("class","nv-legendWrap"),N.append("g").attr("class","nv-controlsWrap"),L.attr("transform","translate("+j.left+","+j.top+")"),r&&(f.width(H/2),L.select(".nv-legendWrap").datum(c).call(f),j.top!=f.height()&&(j.top=f.height()+f.legendBelowPadding(),I=(l||parseInt(x.style("height"))||400)-j.top-j.bottom),L.select(".nv-legendWrap").attr("transform","translate("+H/2+","+-j.top+")")),s&&(g.width(180).color(["#444"]),O.select(".nv-controlsWrap").datum(G).attr("transform","translate(0,"+-j.top+")").call(g)),b.width(H).height(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),L.select(".nv-scatterWrap").datum(c.filter(function(a){return!a.disabled})).call(b),L.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+b.id()+")");{var P=L.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});P.enter().append("g").attr("class","nv-regLines").append("line").attr("class","nv-regLine").style("stroke-opacity",0)}P.selectAll(".nv-regLines line").attr("x1",n.range()[0]).attr("x2",n.range()[1]).attr("y1",function(a){return o(n.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return o(n.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return m(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),d.scale(n).ticks(d.ticks()?d.ticks():H/100).tickSize(-I,0),O.select(".nv-x.nv-axis").attr("transform","translate(0,"+o.range()[0]+")").call(d),e.scale(o).ticks(e.ticks()?e.ticks():I/36).tickSize(-H,0),O.select(".nv-y.nv-axis").call(e),p&&(h.getData(b.x()).scale(n).width(H).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),O.select(".nv-distributionX").attr("transform","translate(0,"+o.range()[0]+")").datum(c.filter(function(a){return!a.disabled})).call(h)),q&&(i.getData(b.y()).scale(o).width(I).color(c.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!c[b].disabled})),N.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),O.select(".nv-distributionY").attr("transform","translate(-"+i.size()+",0)").datum(c.filter(function(a){return!a.disabled})).call(i)),d3.fisheye&&(O.select(".nv-background").attr("width",H).attr("height",I),O.select(".nv-background").on("mousemove",w),O.select(".nv-background").on("click",function(){u=!u}),b.dispatch.on("elementClick.freezeFisheye",function(){u=!u})),g.dispatch.on("legendClick",function(c){c.disabled=!c.disabled,t=c.disabled?0:2.5,O.select(".nv-background").style("pointer-events",c.disabled?"none":"all"),O.select(".nv-point-paths").style("pointer-events",c.disabled?"all":"none"),c.disabled?(n.distortion(t).focus(0),o.distortion(t).focus(0),O.select(".nv-scatterWrap").call(b),O.select(".nv-x.nv-axis").call(d),O.select(".nv-y.nv-axis").call(e)):u=!1,a.update()}),f.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,L.selectAll(".nv-series").classed("disabled",!1),a}),z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),f.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,z.disabled=c.map(function(a){return!!a.disabled}),B.stateChange(z),a.update()}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos[1]-I),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+h.size()),a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],B.tooltipShow(a)}),B.on("tooltipShow",function(a){v&&F(a,y.parentNode)}),B.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),z.disabled=b.disabled),a.update()}),D=n.copy(),E=o.copy()}),a}var b=c.models.scatter(),d=c.models.axis(),e=c.models.axis(),f=c.models.legend(),g=c.models.legend(),h=c.models.distribution(),i=c.models.distribution(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=c.utils.defaultColor(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),o=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),p=!1,q=!1,r=!0,s=!!d3.fisheye,t=0,u=!1,v=!0,w=function(a,b){return"<strong>"+b+"</strong>"},x=function(a,b,c){return"<strong>"+c+"</strong>"},y=function(a,b,c,d){return"<h3>"+a+"</h3><p>"+d+"</p>"},z={},A=null,B=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),C="No Data Available.";b.xScale(n).yScale(o),d.orient("bottom").tickPadding(10),e.orient("left").tickPadding(10),h.axis("x"),i.axis("y");var D,E,F=function(f,g){var h=f.pos[0]+(g.offsetLeft||0),i=f.pos[1]+(g.offsetTop||0),k=f.pos[0]+(g.offsetLeft||0),l=o.range()[0]+j.top+(g.offsetTop||0),m=n.range()[0]+j.left+(g.offsetLeft||0),p=f.pos[1]+(g.offsetTop||0),q=d.tickFormat()(b.x()(f.point,f.pointIndex)),r=e.tickFormat()(b.y()(f.point,f.pointIndex));null!=w&&c.tooltip.show([k,l],w(f.series.key,q,r,f,a),"n",1,g,"x-nvtooltip"),null!=x&&c.tooltip.show([m,p],x(f.series.key,q,r,f,a),"e",1,g,"y-nvtooltip"),null!=y&&c.tooltip.show([h,i],y(f.series.key,q,r,f.point.tooltip,f,a),f.value<0?"n":"s",null,g)},G=[{key:"Magnify",disabled:!0}];return b.dispatch.on("elementMouseout.tooltip",function(a){B.tooltipHide(a),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",i.size())}),B.on("tooltipHide",function(){v&&c.tooltip.cleanup()}),a.dispatch=B,a.scatter=b,a.legend=f,a.controls=g,a.xAxis=d,a.yAxis=e,a.distX=h,a.distY=i,d3.rebind(a,b,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):k},a.height=function(b){return arguments.length?(l=b,a):l},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),f.color(m),h.color(m),i.color(m),a):m},a.showDistX=function(b){return arguments.length?(p=b,a):p},a.showDistY=function(b){return arguments.length?(q=b,a):q},a.showControls=function(b){return arguments.length?(s=b,a):s},a.showLegend=function(b){return arguments.length?(r=b,a):r},a.fisheye=function(b){return arguments.length?(t=b,a):t},a.tooltips=function(b){return arguments.length?(v=b,a):v},a.tooltipContent=function(b){return arguments.length?(y=b,a):y},a.tooltipXContent=function(b){return arguments.length?(w=b,a):w},a.tooltipYContent=function(b){return arguments.length?(x=b,a):x},a.state=function(b){return arguments.length?(z=b,a):z},a.defaultState=function(b){return arguments.length?(A=b,a):A},a.noData=function(b){return arguments.length?(C=b,a):C},a},c.models.sparkline=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,h=g-e.top-e.bottom,n=d3.select(this);i.domain(b||d3.extent(a,k)).range([0,c]),j.domain(d||d3.extent(a,l)).range([h,0]);{var o=n.selectAll("g.nv-wrap.nv-sparkline").data([a]),p=o.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");p.append("g"),o.select("g")}o.attr("transform","translate("+e.left+","+e.top+")");var q=o.selectAll("path").data(function(a){return[a]});q.enter().append("path"),q.exit().remove(),q.style("stroke",function(a,b){return a.color||m(a,b)}).attr("d",d3.svg.line().x(function(a,b){return i(k(a,b))}).y(function(a,b){return j(l(a,b))}));var r=o.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return l(a,b)}),d=b(c.lastIndexOf(j.domain()[1])),e=b(c.indexOf(j.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});r.enter().append("circle"),r.exit().remove(),r.attr("cx",function(a){return i(k(a,a.pointIndex))}).attr("cy",function(a){return j(l(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return k(a,a.pointIndex)==i.domain()[1]?"nv-point nv-currentValue":l(a,a.pointIndex)==j.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),a}var b,d,e={top:2,right:0,bottom:2,left:0},f=400,g=32,h=!0,i=d3.scale.linear(),j=d3.scale.linear(),k=function(a){return a.x},l=function(a){return a.y},m=c.utils.getColor(["#000"]);return a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.x=function(b){return arguments.length?(k=d3.functor(b),a):k},a.y=function(b){return arguments.length?(l=d3.functor(b),a):l},a.xScale=function(b){return arguments.length?(i=b,a):i},a.yScale=function(b){return arguments.length?(j=b,a):j},a.xDomain=function(c){return arguments.length?(b=c,a):b},a.yDomain=function(b){return arguments.length?(d=b,a):d},a.animate=function(b){return arguments.length?(h=b,a):h},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),a):m},a},c.models.sparklinePlus=function(){function a(c){return c.each(function(m){function q(){if(!j){var a=A.selectAll(".nv-hoverValue").data(i),c=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+b(e.x()(m[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(c.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),c.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),A.select(".nv-hoverValue .nv-xValue").text(k(e.x()(m[i[0]],i[0]))),c.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),A.select(".nv-hoverValue .nv-yValue").text(l(e.y()(m[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;f<a.length;f++)Math.abs(e.x()(a[f],f)-b)<c&&(c=Math.abs(e.x()(a[f],f)-b),d=f);return d}if(!j){var c=d3.mouse(this)[0]-f.left;i=[a(m,Math.round(b.invert(c)))],q()}}var s=d3.select(this),t=(g||parseInt(s.style("width"))||960)-f.left-f.right,u=(h||parseInt(s.style("height"))||400)-f.top-f.bottom;if(a.update=function(){a(c)},a.container=this,!m||!m.length){var v=s.selectAll(".nv-noData").data([p]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",f.left+t/2).attr("y",f.top+u/2).text(function(a){return a}),a}s.selectAll(".nv-noData").remove();var w=e.y()(m[m.length-1],m.length-1);b=e.xScale(),d=e.yScale();var x=s.selectAll("g.nv-wrap.nv-sparklineplus").data([m]),y=x.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),z=y.append("g"),A=x.select("g");z.append("g").attr("class","nv-sparklineWrap"),z.append("g").attr("class","nv-valueWrap"),z.append("g").attr("class","nv-hoverArea"),x.attr("transform","translate("+f.left+","+f.top+")");var B=A.select(".nv-sparklineWrap");e.width(t).height(u),B.call(e);var C=A.select(".nv-valueWrap"),D=C.selectAll(".nv-currentValue").data([w]);D.enter().append("text").attr("class","nv-currentValue").attr("dx",o?-8:8).attr("dy",".9em").style("text-anchor",o?"end":"start"),D.attr("x",t+(o?f.right:0)).attr("y",n?function(a){return d(a)}:0).style("fill",e.color()(m[m.length-1],m.length-1)).text(l(w)),z.select(".nv-hoverArea").append("rect").on("mousemove",r).on("click",function(){j=!j}).on("mouseout",function(){i=[],q()}),A.select(".nv-hoverArea rect").attr("transform",function(){return"translate("+-f.left+","+-f.top+")"}).attr("width",t+f.left+f.right).attr("height",u+f.top)}),a}var b,d,e=c.models.sparkline(),f={top:15,right:100,bottom:10,left:50},g=null,h=null,i=[],j=!1,k=d3.format(",r"),l=d3.format(",.2f"),m=!0,n=!0,o=!1,p="No Data Available.";return a.sparkline=e,d3.rebind(a,e,"x","y","xScale","yScale","color"),a.margin=function(b){return arguments.length?(f.top="undefined"!=typeof b.top?b.top:f.top,f.right="undefined"!=typeof b.right?b.right:f.right,f.bottom="undefined"!=typeof b.bottom?b.bottom:f.bottom,f.left="undefined"!=typeof b.left?b.left:f.left,a):f},a.width=function(b){return arguments.length?(g=b,a):g},a.height=function(b){return arguments.length?(h=b,a):h},a.xTickFormat=function(b){return arguments.length?(k=b,a):k},a.yTickFormat=function(b){return arguments.length?(l=b,a):l},a.showValue=function(b){return arguments.length?(m=b,a):m},a.alignValue=function(b){return arguments.length?(n=b,a):n},a.rightAlignValue=function(b){return arguments.length?(o=b,a):o},a.noData=function(b){return arguments.length?(p=b,a):p},a},c.models.stackedArea=function(){function a(c){return c.each(function(a){var c=f-e.left-e.right,l=g-e.top-e.bottom,s=d3.select(this);b=q.xScale(),d=q.yScale(),a=a.map(function(a){return a.values=a.values.map(function(b,c){return b.index=c,b.stackedY=a.disabled?0:k(b,c),b}),a}),a=d3.layout.stack().order(n).offset(m).values(function(a){return a.values}).x(j).y(function(a){return a.stackedY}).out(function(a,b,c){a.display={y:c,y0:b}})(a);var t=s.selectAll("g.nv-wrap.nv-stackedarea").data([a]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),v=u.append("defs"),w=u.append("g"),x=t.select("g");w.append("g").attr("class","nv-areaWrap"),w.append("g").attr("class","nv-scatterWrap"),t.attr("transform","translate("+e.left+","+e.top+")"),q.width(c).height(l).x(j).y(function(a){return a.display.y+a.display.y0}).forceY([0]).color(a.map(function(a,b){return a.color||h(a,b)}).filter(function(b,c){return!a[c].disabled}));var y=x.select(".nv-scatterWrap").datum(a.filter(function(a){return!a.disabled}));y.call(q),v.append("clipPath").attr("id","nv-edge-clip-"+i).append("rect"),t.select("#nv-edge-clip-"+i+" rect").attr("width",c).attr("height",l),x.attr("clip-path",p?"url(#nv-edge-clip-"+i+")":"");var z=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y+a.display.y0)}).interpolate(o),A=d3.svg.area().x(function(a,c){return b(j(a,c))}).y0(function(a){return d(a.display.y0)}).y1(function(a){return d(a.display.y0)}),B=x.select(".nv-areaWrap").selectAll("path.nv-area").data(function(a){return a});B.enter().append("path").attr("class",function(a,b){return"nv-area nv-area-"+b}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),r.areaMouseover({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),r.areaMouseout({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}).on("click",function(a,b){d3.select(this).classed("hover",!1),r.areaClick({point:a,series:a.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:b})}),B.exit().attr("d",function(a,b){return A(a.values,b)}).remove(),B.style("fill",function(a,b){return a.color||h(a,b)}).style("stroke",function(a,b){return a.color||h(a,b)}),B.attr("d",function(a,b){return z(a.values,b)}),q.dispatch.on("elementMouseover.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!0)}),q.dispatch.on("elementMouseout.area",function(a){x.select(".nv-chart-"+i+" .nv-area-"+a.seriesIndex).classed("hover",!1)})}),a}var b,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=c.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=function(a){return a.x},k=function(a){return a.y},l="stack",m="zero",n="default",o="linear",p=!1,q=c.models.scatter(),r=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");return q.size(2.2).sizeDomain([2.2,2.2]),q.dispatch.on("elementClick.area",function(a){r.areaClick(a)}),q.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],r.tooltipShow(a)}),q.dispatch.on("elementMouseout.tooltip",function(a){r.tooltipHide(a)}),a.dispatch=r,a.scatter=q,d3.rebind(a,q,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","sizeDomain","forceX","forceY","forceSize","clipVoronoi","clipRadius"),a.x=function(b){return arguments.length?(j=d3.functor(b),a):j},a.y=function(b){return arguments.length?(k=d3.functor(b),a):k},a.margin=function(b){return arguments.length?(e.top="undefined"!=typeof b.top?b.top:e.top,e.right="undefined"!=typeof b.right?b.right:e.right,e.bottom="undefined"!=typeof b.bottom?b.bottom:e.bottom,e.left="undefined"!=typeof b.left?b.left:e.left,a):e},a.width=function(b){return arguments.length?(f=b,a):f},a.height=function(b){return arguments.length?(g=b,a):g},a.clipEdge=function(b){return arguments.length?(p=b,a):p},a.color=function(b){return arguments.length?(h=c.utils.getColor(b),a):h},a.offset=function(b){return arguments.length?(m=b,a):m},a.order=function(b){return arguments.length?(n=b,a):n},a.style=function(b){if(!arguments.length)return l;switch(l=b){case"stack":a.offset("zero"),a.order("default");break;case"stream":a.offset("wiggle"),a.order("inside-out");break;case"stream-center":a.offset("silhouette"),a.order("inside-out");break;case"expand":a.offset("expand"),a.order("default")}return a},a.interpolate=function(a){return arguments.length?o=a:o},a},c.models.stackedAreaChart=function(){function a(c){return c.each(function(c){var m=d3.select(this),q=this,y=(k||parseInt(m.style("width"))||960)-j.left-j.right,z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom;if(a.update=function(){m.transition().call(a)},a.container=this,s.disabled=c.map(function(a){return!!a.disabled}),!t){var A;t={};for(A in s)t[A]=s[A]instanceof Array?s[A].slice(0):s[A]}if(!(c&&c.length&&c.filter(function(a){return a.values.length}).length)){var B=m.selectAll(".nv-noData").data([u]);return B.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),B.attr("x",j.left+y/2).attr("y",j.top+z/2).text(function(a){return a
+}),a}m.selectAll(".nv-noData").remove(),b=e.xScale(),d=e.yScale();var C=m.selectAll("g.nv-wrap.nv-stackedAreaChart").data([c]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),E=C.select("g");if(D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-stackedWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-controlsWrap"),o&&(h.width(y-w),E.select(".nv-legendWrap").datum(c).call(h),j.top!=h.height()&&(j.top=h.height()+h.legendBelowPadding(),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-legendWrap").attr("transform","translate("+w+","+-j.top+")")),n){var F=[{key:"Stacked",disabled:"zero"!=e.offset()},{key:"Stream",disabled:"wiggle"!=e.offset()},{key:"Expanded",disabled:"expand"!=e.offset()}];i.width(w).color(["#444","#444","#444"]),E.select(".nv-controlsWrap").datum(F).call(i),j.top!=Math.max(i.height(),h.height())&&(j.top=Math.max(i.height(),h.height()),z=(l||parseInt(m.style("height"))||400)-j.top-j.bottom),E.select(".nv-controlsWrap").attr("transform","translate(0,"+-j.top+")")}C.attr("transform","translate("+j.left+","+j.top+")"),e.width(y).height(z);var G=E.select(".nv-stackedWrap").datum(c);G.call(e),f.scale(b).ticks(y/100).tickSize(-z,0),E.select(".nv-x.nv-axis").attr("transform","translate(0,"+z+")"),E.select(".nv-x.nv-axis").transition().duration(0).call(f),g.scale(d).ticks("wiggle"==e.offset()?0:z/36).tickSize(-y,0).setTickFormat("expand"==e.offset()?d3.format("%"):r),E.select(".nv-y.nv-axis").transition().duration(0).call(g),e.dispatch.on("areaClick.toggle",function(b){c=1===c.filter(function(a){return!a.disabled}).length?c.map(function(a){return a.disabled=!1,a}):c.map(function(a,c){return a.disabled=c!=b.seriesIndex,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendClick",function(b){b.disabled=!b.disabled,c.filter(function(a){return!a.disabled}).length||c.map(function(a){return a.disabled=!1,a}),s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),h.dispatch.on("legendDblclick",function(b){c.forEach(function(a){a.disabled=!0}),b.disabled=!1,s.disabled=c.map(function(a){return!!a.disabled}),v.stateChange(s),a.update()}),i.dispatch.on("legendClick",function(b){if(b.disabled){switch(F=F.map(function(a){return a.disabled=!0,a}),b.disabled=!1,b.key){case"Stacked":e.style("stack");break;case"Stream":e.style("stream");break;case"Expanded":e.style("expand")}s.style=e.style(),v.stateChange(s),a.update()}}),v.on("tooltipShow",function(a){p&&x(a,q.parentNode)}),v.on("changeState",function(b){"undefined"!=typeof b.disabled&&(c.forEach(function(a,c){a.disabled=b.disabled[c]}),s.disabled=b.disabled),"undefined"!=typeof b.style&&e.style(b.style),a.update()})}),a}var b,d,e=c.models.stackedArea(),f=c.models.axis(),g=c.models.axis(),h=c.models.legend(),i=c.models.legend(),j={top:30,right:25,bottom:50,left:60},k=null,l=null,m=c.utils.defaultColor(),n=!0,o=!0,p=!0,q=function(a,b,c){return"<h3>"+a+"</h3><p>"+c+" on "+b+"</p>"},r=d3.format(",.2f"),s={style:e.style()},t=null,u="No Data Available.",v=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),w=250;f.orient("bottom").tickPadding(7),g.orient("left"),e.scatter.pointActive(function(a){return!!Math.round(100*e.y()(a))});var x=function(b,d){var h=b.pos[0]+(d.offsetLeft||0),i=b.pos[1]+(d.offsetTop||0),j=f.tickFormat()(e.x()(b.point,b.pointIndex)),k=g.tickFormat()(e.y()(b.point,b.pointIndex)),l=q(b.series.key,j,k,b,a);c.tooltip.show([h,i],l,b.value<0?"n":"s",null,d)};return e.dispatch.on("tooltipShow",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],v.tooltipShow(a)}),e.dispatch.on("tooltipHide",function(a){v.tooltipHide(a)}),v.on("tooltipHide",function(){p&&c.tooltip.cleanup()}),a.dispatch=v,a.stacked=e,a.legend=h,a.controls=i,a.xAxis=f,a.yAxis=g,d3.rebind(a,e,"x","y","size","xScale","yScale","xDomain","yDomain","sizeDomain","interactive","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate"),a.margin=function(b){return arguments.length?(j.top="undefined"!=typeof b.top?b.top:j.top,j.right="undefined"!=typeof b.right?b.right:j.right,j.bottom="undefined"!=typeof b.bottom?b.bottom:j.bottom,j.left="undefined"!=typeof b.left?b.left:j.left,a):j},a.width=function(b){return arguments.length?(k=b,a):getWidth},a.height=function(b){return arguments.length?(l=b,a):getHeight},a.color=function(b){return arguments.length?(m=c.utils.getColor(b),h.color(m),e.color(m),a):m},a.showControls=function(b){return arguments.length?(n=b,a):n},a.showLegend=function(b){return arguments.length?(o=b,a):o},a.tooltip=function(b){return arguments.length?(q=b,a):q},a.tooltips=function(b){return arguments.length?(p=b,a):p},a.tooltipContent=function(b){return arguments.length?(q=b,a):q},a.state=function(b){return arguments.length?(s=b,a):s},a.defaultState=function(b){return arguments.length?(t=b,a):t},a.noData=function(b){return arguments.length?(u=b,a):u},g.setTickFormat=g.tickFormat,g.tickFormat=function(a){return arguments.length?(r=a,g):r},a}}(),define("nv.d3",function(){}),define("addons/stats/views",["app","api","addons/stats/resources","d3","nv.d3"],function(a,b,c){return Views={},datatypeEventer={},_.extend(datatypeEventer,Backbone.Events),Views.Legend=b.View.extend({tagName:"ul",template:"addons/stats/templates/legend",serialize:function(){return{legend_items:this.collection.toJSON()}}}),Views.Pie=b.View.extend({className:"datatype-section",template:"addons/stats/templates/pie_table",initialize:function(a){this.datatype=a.datatype},serialize:function(){return{statistics:this.collection.where({type:this.datatype}),datatype:this.datatype}},afterRender:function(){var a=(this.collection,"#"+this.datatype+"_graph"),b=_.map(this.collection.where({type:this.datatype}),function(a){var b={y:a.get("sum")||0,key:a.id};return b});b=_.filter(b,function(a){return a.y>0}),b=_.sortBy(b,function(a){return-a.y}),nv.addGraph(function(){var c=550,d=400,e=nv.models.pieChart().x(function(a){return a.key}).y(function(a){return a.y}).showLabels(!0).showLegend(!1).values(function(a){return a}).color(d3.scale.category10().range()).width(c).height(d);return d3.select(a).datum([b]).transition().duration(300).attr("width",c).attr("height",d).call(e),e}),this.$el.addClass(this.datatype+"_section")}}),Views.StatSelect=b.View.extend({className:"nav nav-tabs nav-stacked",tagName:"ul",template:"addons/stats/templates/statselect",initialize:function(){this.rows=[]},events:{"click .datatype-select":"datatype_selected"},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},afterRender:function(){this.$(".datatype-select").first().addClass("active")},datatype_selected:function(a){var b=$(a.currentTarget);a.preventDefault(),a.stopPropagation(),this.$(".datatype-select").removeClass("active"),b.addClass("active"),datatypeEventer.trigger("datatype-select",b.attr("data-type-select"))}}),Views.Statistics=b.View.extend({template:"addons/stats/templates/stats",initialize:function(){this.rows=[],datatypeEventer.on("datatype-select",this.display_datatype,this)},serialize:function(){return{datatypes:_.uniq(this.collection.pluck("type"))}},beforeRender:function(){_.each(_.uniq(this.collection.pluck("type")),function(a){this.rows[a]=this.insertView(".datatypes",new Views.Pie({collection:this.collection,datatype:a}))},this)},afterRender:function(){this.$(".datatype-section").hide().first().toggle()},display_datatype:function(a){this.$(".datatype-section").hide(),this.$("."+a+"_section").show()}}),c.Views=Views,c}),define("addons/stats/routes",["app","api","addons/stats/views"],function(a,b,c){var d=b.RouteObject.extend({layout:"with_sidebar",routes:{stats:"showStats",_stats:"showStats"},crumbs:[{name:"Statistics",link:"_stats"}],selectedHeader:"Statistics",initialize:function(){this.stats=new c.Collection,this.setView("#sidebar-content",new Views.StatSelect({collection:this.stats}))},showStats:function(){this.setView("#dashboard-content",new Views.Statistics({collection:this.stats}))},establish:function(){return[this.stats.fetch()]},apiUrl:function(){return[this.stats.url,this.stats.documentation]}});return c.RouteObjects=[d],c}),define("addons/stats/base",["app","api","addons/stats/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Statistics",href:"#stats",icon:"fonticon-stats",className:"stats"})},c}),define("addons/replication/resources",["app","api","addons/activetasks/resources"],function(a){var b={};return b.DBModel=Backbone.Model.extend({label:function(){return this.get("name")}}),b.DBList=Backbone.Collection.extend({model:b.DBModel,url:function(){return a.host+"/_all_dbs"},parse:function(a){return _.map(a,function(a){return{id:a,name:a}})}}),b.Task=Backbone.Model.extend({}),b.Tasks=Backbone.Collection.extend({model:b.Task,url:function(){return a.host+"/_active_tasks"},parse:function(a){return _.filter(a,function(a){return"replication"===a.type})}}),b.Replicate=Backbone.Model.extend({documentation:"replication_doc",url:function(){return a.host+"/_replicate"}}),b}),define("addons/replication/views",["app","api","modules/fauxton/components","addons/replication/resources"],function(a,b,c,d){var e={},f={},g={rate:5,intervalId:null};return _.extend(f,Backbone.Events),e.ReplicationForm=b.View.extend({template:"addons/replication/templates/form",events:{"submit #replication":"validate","click .btn-group .btn":"showFields","click .swap":"swapFields","click .options":"toggleAdvancedOptions"},initialize:function(a){this.status=a.status,this.selectedDB=a.selectedDB,this.newRepModel=new d.Replicate({})},afterRender:function(){this.dbSearchTypeahead=new c.DbSearchTypeahead({dbLimit:30,el:"input#to_name"}),this.dbSearchTypeahead.render()},beforeRender:function(){this.insertView("#replicationStatus",new e.ReplicationList({collection:this.status}))},cleanup:function(){clearInterval(g.intervalId)},enableFields:function(){this.$el.find("input","select").attr("disabled",!1)},disableFields:function(){this.$el.find("input:hidden","select:hidden").attr("disabled",!0)},showFields:function(a){var b=this.$(a.currentTarget),c=b.val();"local"===c?b.parents(".form_set").addClass("local"):b.parents(".form_set").removeClass("local")},establish:function(){return[this.collection.fetch(),this.status.fetch()]},validate:function(a){a.preventDefault();var c;if(this.formValidation())c=b.addNotification({msg:"Please enter every field.",type:"error",clear:!0});else if(this.$("input#to_name").is(":visible")&&!this.$("input[name=create_target]").is(":checked")){var d=this.collection.where({name:this.$("input#to_name").val()});0===d.length&&(c=b.addNotification({msg:"This database doesn't exist. Check create target if you want to create it.",type:"error",clear:!0}))}else this.submit(a)},formValidation:function(){for(var a=this.$el.find("input:visible"),b=!1,c=0;c<a.length;c++)("http://"==a[c].value||""===a[c].value)&&(b=!0);return b},serialize:function(){return{databases:this.collection.toJSON(),selectedDB:this.selectedDB}},startReplication:function(a){var c=this;this.newRepModel.save(a,{success:function(a){b.addNotification({msg:"Replication from "+a.get("source")+" to "+a.get("target")+" has begun.",type:"success",clear:!0});c.updateButtonText(!1),f.trigger("update:tasks")},error:function(a,d){{var e=JSON.parse(d.responseText);b.addNotification({msg:e.reason,type:"error",clear:!0})}c.updateButtonText(!1)}}),this.enableFields()},updateButtonText:function(a){var b=this.$("#replication button[type=submit]");a?b.text("Starting replication...").attr("disabled",!0):b.text("Replication").attr("disabled",!1)},submit:function(a){this.disableFields();var b={};_.map(this.$(a.currentTarget).serializeArray(),function(a){""!==a.value&&(b[a.name]="true"===a.value?!0:a.value.replace(/\s/g,"").toLowerCase())}),this.updateButtonText(!0),this.startReplication(b)},swapFields:function(a){a.preventDefault();var b=this.$("#from_name"),c=this.$("#to_name"),d=this.$("#to_url"),e=this.$("#from_url"),f=b.val(),g=e.val(),h=c.val(),i=d.val();b.val(h),c.val(f),e.val(i),d.val(g)}}),e.ReplicationList=b.View.extend({tagName:"ul",initialize:function(){f.bind("update:tasks",this.establish,this),this.listenTo(this.collection,"reset",this.render),this.$el.prepend("<li class='header'><h4>Active Replication Tasks</h4></li>")},establish:function(){return[this.collection.fetch({reset:!0})]},setPolling:function(){var a=this;this.cleanup(),g.intervalId=setInterval(function(){a.establish()},1e3*g.rate)},cleanup:function(){clearInterval(g.intervalId)},beforeRender:function(){this.collection.forEach(function(a){this.insertView(new e.replicationItem({model:a}))},this)},showHeader:function(){this.collection.length>0?this.$el.parent().addClass("showHeader"):this.$el.parent().removeClass("showHeader")},afterRender:function(){this.showHeader(),this.setPolling()}}),e.replicationItem=b.View.extend({tagName:"li",className:"row",template:"addons/replication/templates/progress",events:{"click .cancel":"cancelReplication"},initialize:function(){this.newRepModel=new d.Replicate({})},establish:function(){return[this.model.fetch()]},cancelReplication:function(a){var c=this.$(a.currentTarget),d=c.attr("data-rep-id");this.newRepModel.save({replication_id:d,cancel:!0},{success:function(){b.addNotification({msg:"Replication stopped.",type:"success",clear:!0})},error:function(a,c){{var d=JSON.parse(c.responseText);b.addNotification({msg:d.reason,type:"error",clear:!0})}}})},afterRender:function(){this.model.get("continuous")&&this.$el.addClass("continuous")},serialize:function(){return{progress:this.model.get("progress"),target:this.model.get("target"),source:this.model.get("source"),continuous:this.model.get("continuous"),repid:this.model.get("replication_id")}}}),e}),define("addons/replication/route",["app","api","addons/replication/resources","addons/replication/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",roles:["_admin"],routes:{replication:"defaultView","replication/:dbname":"defaultView"},selectedHeader:"Replication",apiUrl:function(){return[this.replication.url(),this.replication.documentation]},crumbs:[{name:"Replicate changes from: ",link:"replication"}],defaultView:function(a){this.databases=new c.DBList({}),this.tasks=new c.Tasks({id:"ReplicationTasks"}),this.replication=new c.Replicate({}),this.setView("#dashboard-content",new d.ReplicationForm({selectedDB:a||"",collection:this.databases,status:this.tasks}))}});return c.RouteObjects=[e],c}),define("addons/replication/base",["app","api","addons/replication/route"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Replication",href:"#/replication",icon:"fonticon-replicate"})},c}),define("addons/plugins/resources",["app","api"],function(a,b){var c=b.addon();return c.Hello=b.View.extend({template:"addons/plugins/templates/plugins"}),c}),define("addons/plugins/routes",["app","api","addons/plugins/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",crumbs:[{name:"Plugins",link:"_plugins"}],routes:{_plugins:"pluginsRoute"},selectedHeader:"Plugins",roles:["_admin"],apiUrl:"plugins",initialize:function(){},pluginsRoute:function(){this.setView("#dashboard-content",new c.Hello({}))}});return c.RouteObjects=[d],c}),define("addons/plugins/base",["app","api","addons/plugins/routes"],function(a,b,c){return c.initialize=function(){},c}),define("addons/contribute/base",["jquery","lodash"],function(a){a.contribute=function(){console.log("contribute!contribute!monorail!contribute!")}}),define("addons/permissions/resources",["app","api"],function(a,b){var c=b.addon();return c.Security=Backbone.Model.extend({defaults:{admins:{names:[],roles:[]},members:{names:[],roles:[]}},isNew:function(){return!1},initialize:function(a,b){this.database=b.database},url:function(){return this.database.id+"/_security"},addItem:function(a,b,c){var d=this.get(c);return d&&d[b]?d[b].indexOf(a)>-1?{error:!0,msg:"Role/Name has already been added"}:(d[b].push(a),this.set(c,d)):{error:!0,msg:"Section "+c+"does not exist"}}}),c}),define("addons/permissions/views",["app","api","addons/permissions/resources"],function(a,b,c){var d={};return c.events=_.extend(d,Backbone.Events),c.Permissions=b.View.extend({template:"addons/permissions/templates/permissions",initialize:function(a){this.database=a.database,this.listenTo(c.events,"itemRemoved",this.itemRemoved)},itemRemoved:function(){this.model.set({admins:this.adminsView.items(),members:this.membersView.items()}),this.model.save().then(function(){b.addNotification({msg:"Database permissions has been updated."})},function(a){b.addNotification({msg:"Could not update permissions - reason: "+a.responseText,type:"error"})})},beforeRender:function(){this.adminsView=this.insertView("#sections",new c.PermissionSection({model:this.model,section:"admins",help:"Database admins can update design documents and edit the admin and member lists."})),this.membersView=this.insertView("#sections",new c.PermissionSection({model:this.model,section:"members",help:"Database members can access the database. If no members are defined, the database is public."}))},serialize:function(){return{databaseName:this.database.id}}}),c.PermissionSection=b.View.extend({template:"addons/permissions/templates/section",initialize:function(a){this.section=a.section,this.help=a.help},events:{"submit .permission-item-form":"addItem","click button.close":"removeItem"},beforeRender:function(){var a=this.model.get(this.section);this.nameViews=[],this.roleViews=[],_.each(a.names,function(a){var b=this.insertView("#"+this.section+"-items-names",new c.PermissionItem({item:a}));this.nameViews.push(b)},this),_.each(a.roles,function(a){var b=this.insertView("#"+this.section+"-items-roles",new c.PermissionItem({item:a}));this.roleViews.push(b)},this)},getItemFromView:function(a){return _.map(a,function(a){return a.item})},discardRemovedViews:function(){this.nameViews=_.filter(this.nameViews,function(a){return!a.removed}),this.roleViews=_.filter(this.roleViews,function(a){return!a.removed})},items:function(){return this.discardRemovedViews(),{names:this.getItemFromView(this.nameViews),roles:this.getItemFromView(this.roleViews)}},addItem:function(a){a.preventDefault();var c=this.$(a.currentTarget).find(".item"),d=c.val(),e=c.data("section"),f=c.data("type"),g=this,h=this.model.addItem(d,f,e);return h&&h.error?b.addNotification({msg:h.msg,type:"error"}):(this.model.save().then(function(){g.render(),b.addNotification({msg:"Database permissions has been updated."})},function(a){b.addNotification({msg:"Could not update permissions - reason: "+a.responseText,type:"error"})}),void 0)},serialize:function(){return{section:this.section,help:this.help}}}),c.PermissionItem=b.View.extend({tagName:"li",template:"addons/permissions/templates/item",initialize:function(a){this.item=a.item,this.viewsList=a.viewsList},events:{"click .close":"removeItem"},removeItem:function(a){var b=this;a.preventDefault(),this.removed=!0,c.events.trigger("itemRemoved"),this.$el.hide("fast",function(){b.remove()})},serialize:function(){return{item:this.item}}}),c}),define("addons/permissions/routes",["app","api","modules/databases/base","addons/permissions/views"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",selectedHeader:"Databases",routes:{"database/:database/permissions":"permissions"},initialize:function(b,e,f){var g=a.getParams();g.include_docs=!0,this.databaseName=f[0],this.database=new c.Model({id:this.databaseName}),this.security=new d.Security(null,{database:this.database})},establish:function(){return[this.database.fetch(),this.security.fetch()]},permissions:function(){this.setView("#dashboard-content",new d.Permissions({database:this.database,model:this.security}))},crumbs:function(){return[{name:this.database.id,link:c.databaseUrl(this.database)},{name:"Permissions",link:"/permissions"}]}});return d.RouteObjects=[e],d}),define("addons/permissions/base",["app","api","addons/permissions/routes"],function(a,b,c){return c.initialize=function(){},c}),define("addons/compaction/resources",["app","api"],function(a,b){var c=b.addon();return c.compactDB=function(a){return $.ajax({url:a.url()+"/_compact",contentType:"application/json",type:"POST"})},c.cleanupViews=function(a){return $.ajax({url:a.url()+"/_view_cleanup",contentType:"application/json",type:"POST"})},c.compactView=function(a,b){return $.ajax({url:a.url()+"/_compact/"+b.replace("_design/",""),contentType:"application/json",type:"POST"})},c}),define("addons/compaction/views",["app","api","addons/compaction/resources"],function(a,b,c){return c.Layout=b.View.extend({template:"addons/compaction/templates/layout",initialize:function(){_.bindAll(this)},events:{"click #compact-db":"compactDB","click #compact-view":"compactDB","click #cleanup-views":"cleanupViews"},disableButton:function(a,b){this.$(a).attr("disabled","disabled").text(b)},enableButton:function(a,b){this.$(a).removeAttr("disabled").text(b)},compactDB:function(a){var d=this.enableButton;a.preventDefault(),this.disableButton("#compact-db","Compacting..."),c.compactDB(this.model).then(function(){b.addNotification({type:"success",msg:'Database compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view the compaction progress.'})},function(a){console.log(arguments),b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d("#compact-db","Run")})},cleanupViews:function(a){var d=this.enableButton;a.preventDefault(),this.disableButton("#cleanup-view","Cleaning..."),c.cleanupViews(this.model).then(function(){b.addNotification({type:"success",msg:'View cleanup has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'})},function(a){b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d("#cleanup-views","Run")})}}),c.CompactView=b.View.extend({template:"addons/compaction/templates/compact_view",className:"btn btn-info btn-large pull-right",tagName:"button",initialize:function(){_.bindAll(this)},events:{click:"compact"},disableButton:function(){this.$el.attr("disabled","disabled").text("Compacting...")},enableButton:function(){this.$el.removeAttr("disabled").text("Compact View")},update:function(a,b,c){this.database=a,this.designDoc=b,this.viewName=c},compact:function(a){a.preventDefault();var d=this.enableButton;this.disableButton(),c.compactView(this.database,this.designDoc).then(function(){b.addNotification({type:"success",msg:'View compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'})},function(a){b.addNotification({type:"error",msg:"Error: "+JSON.parse(a.responseText).reason})}).always(function(){d()})}}),c}),define("addons/compaction/routes",["app","api","addons/compaction/views","modules/databases/resources"],function(a,b,c,d){var e=b.RouteObject.extend({layout:"one_pane",crumbs:function(){return[{name:this.database.id,link:d.databaseUrl(this.database)},{name:"Compact & Clean",link:"compact"}]},routes:{"database/:database/compact":"compaction"},initialize:function(a,b,c){var e=c[0];this.database=this.database||new d.Model({id:e})},compaction:function(){this.setView("#dashboard-content",new c.Layout({model:this.database}))},establish:function(){return this.database.fetch()}});return c.RouteObjects=[e],c}),define("addons/compaction/base",["app","api","addons/compaction/routes"],function(a,b,c){return c.initialize=function(){b.registerExtension("docLinks",{title:"Compact & Clean",url:"compact",icon:"icon-cogs"}),b.registerExtension("advancedOptions:ViewButton",new c.CompactView({}))},c}),define("addons/auth/resources",["app","api"],function(a,b){var c=new b.addon,d=Backbone.Model.extend({url:function(){return a.host+"/_config/admins/"+this.get("name")},isNew:function(){return!1},sync:function(a,b){var c={url:b.url(),contentType:"application/json",dataType:"json",data:JSON.stringify(b.get("value"))};return c.type="delete"===a?"DELETE":"PUT",$.ajax(c)}});return c.Session=b.Session.extend({url:"/_session",initialize:function(a){a||(a={}),this.messages=_.extend({},{missingCredentials:"Username or password cannot be blank.",passwordsNotMatch:"Passwords do not match.",incorrectCredentials:"Incorrect username or password.",loggedIn:"You have been logged in.",adminCreated:"Couchdb admin created",changePassword:"Your password has been updated."},a.messages)},isAdminParty:function(){var a=this.get("userCtx");return!a.name&&a.roles.indexOf("_admin")>-1?!0:!1},isLoggedIn:function(){var a=this.get("userCtx");return a.name?!0:!1},userRoles:function(){var a=this.user();return a&&a.roles?a.roles:[]},matchesRoles:function(a){if(0===a.length)return!0;var b=_.intersection(this.userRoles(),a).length;return b>0?!0:!1},validateUser:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)){var e=b.Deferred();return e.rejectWith(this,[d]),e}},validatePasswords:function(a,c,d){if(_.isEmpty(a)||_.isEmpty(c)||a!==c){var e=b.Deferred();return e.rejectWith(this,[d]),e}},createAdmin:function(a,b,c){var e=this,f=this.validateUser(a,b,this.messages.missingCredentials);if(f)return f;var g=new d({name:a,value:b});return g.save().then(function(){return c?e.login(a,b):e.fetchUser({forceFetch:!0})})},login:function(a,b){var c=this.validateUser(a,b,this.messages.missingCredentials);if(c)return c;var d=this;return $.ajax({cache:!1,type:"POST",url:"/_session",dataType:"json",data:{name:a,password:b}}).then(function(){return d.fetchUser({forceFetch:!0})})},logout:function(){var a=this;return $.ajax({type:"DELETE",url:"/_session",dataType:"json",username:"_",password:"_"}).then(function(){return a.fetchUser({forceFetch:!0})})},changePassword:function(a,b){var c=this.validatePasswords(a,b,this.messages.passwordsNotMatch);if(c)return c;var e=this,f=(this.get("info"),this.get("userCtx")),g=new d({name:f.name,value:a});return g.save().then(function(){return e.login(f.name,a)})}}),c.CreateAdminView=b.View.extend({template:"addons/auth/templates/create_admin",initialize:function(a){a=a||{},this.login_after=a.login_after===!1?!1:!0},events:{"submit #create-admin-form":"createAdmin"},createAdmin:function(a){a.preventDefault();var c=this,d=this.$("#username").val(),e=this.$("#password").val(),f=this.model.createAdmin(d,e,this.login_after);f.then(function(){b.addNotification({msg:b.session.messages.adminCreated}),c.login_after?b.navigate("/"):(c.$("#username").val(""),c.$("#password").val(""))}),f.fail(function(a){b.addNotification({msg:"Could not create admin. Reason"+a+".",type:"error"})})}}),c.LoginView=b.View.extend({template:"addons/auth/templates/login",events:{"submit #login":"login"},login:function(a){a.preventDefault();var c=this.$("#username").val(),d=this.$("#password").val(),e=this.model.login(c,d);e.then(function(){b.addNotification({msg:b.session.messages.loggedIn}),b.navigate("/")}),e.fail(function(a,c,d){d=3===arguments.length?b.session.messages.incorrectCredentials:a,b.addNotification({msg:d,type:"error"})})}}),c.ChangePassword=b.View.extend({template:"addons/auth/templates/change_password",events:{"submit #change-password":"changePassword"},changePassword:function(){event.preventDefault();var a=this,c=this.$("#password").val(),d=this.$("#password-confirm").val(),e=this.model.changePassword(c,d);e.done(function(){b.addNotification({msg:b.session.messages.changePassword}),a.$("#password").val(""),a.$("#password-confirm").val("")}),e.fail(function(a,c,d){arguments.length<3&&(d=a),b.addNotification({msg:a,type:"error"})})}}),c.NavLink=b.View.extend({template:"addons/auth/templates/nav_link_title",tagName:"li",beforeRender:function(){this.listenTo(this.model,"change",this.render)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NavDropDown=b.View.extend({template:"addons/auth/templates/nav_dropdown",beforeRender:function(){this.listenTo(this.model,"change",this.render)},setTab:function(a){this.selectedTab=a,this.$(".active").removeClass("active");var b=this.$('a[data-select="'+a+'"]');b.parent().addClass("active")},afterRender:function(){this.selectedTab&&this.setTab(this.selectedTab)},serialize:function(){return{admin_party:this.model.isAdminParty(),user:this.model.user()}}}),c.NoAccessView=b.View.extend({template:"addons/auth/templates/noAccess"}),c}),define("addons/auth/routes",["app","api","addons/auth/resources"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",routes:{login:"login",logout:"logout",createAdmin:"createAdmin",noAccess:"noAccess"},login:function(){this.crumbs=[{name:"Login",link:"#"}],this.setView("#dashboard-content",new c.LoginView({model:b.session}))},logout:function(){b.addNotification({msg:"You have been logged out."}),b.session.logout().then(function(){b.navigate("/")})},changePassword:function(){this.crumbs=[{name:"Change Password",link:"#"}],this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},createAdmin:function(){this.crumbs=[{name:"Create Admin",link:"#"}],this.setView("#dashboard-content",new c.CreateAdminView({model:b.session}))},noAccess:function(){this.crumbs=[{name:"Access Denied",link:"#"}],this.setView("#dashboard-content",new c.NoAccessView),this.apiUrl="noAccess"}}),e=b.RouteObject.extend({layout:"with_sidebar",routes:{changePassword:{route:"changePassword",roles:["_admin","_reader","_replicator"]},addAdmin:{roles:["_admin"],route:"addAdmin"}},initialize:function(){this.navDrop=this.setView("#sidebar-content",new c.NavDropDown({model:b.session}))},changePassword:function(){this.navDrop.setTab("change-password"),this.setView("#dashboard-content",new c.ChangePassword({model:b.session}))},addAdmin:function(){this.navDrop.setTab("add-admin"),this.setView("#dashboard-content",new c.CreateAdminView({login_after:!1,model:b.session}))},crumbs:[{name:"User Management",link:"#"}]});return c.RouteObjects=[d,e],c}),define("addons/auth/base",["app","api","addons/auth/routes"],function(a,b,c){return c.session=new c.Session,b.setSession(c.session),c.initialize=function(){c.navLink=new c.NavLink({model:c.session}),b.addHeaderLink({title:"Auth",href:"#_auth",view:c.navLink,icon:"fonticon-user",bottomNav:!0,establish:[b.session.fetchUser()]});var a=function(a,b){var c=$.Deferred();return a.isAdminParty()?c.resolve():a.matchesRoles(b)?c.resolve():c.reject(),[c]},d=function(){b.navigate("/noAccess")};b.auth.registerAuth(a),b.auth.registerAuthDenied(d),b.session.on("change",function(){b.session.isLoggedIn()?b.addHeaderLink({footerNav:!0,href:"#logout",title:"Logout",icon:"",className:"logout"}):b.removeHeaderLink({title:"Logout",footerNav:!0})})},c}),define("addons/verifyinstall/resources",["app","api","modules/databases/resources","modules/documents/resources"],function(a,b,c,d){var e,f,g=b.addon(),h=new c.Model({id:"verifytestdb",name:"verifytestdb"}),i=new c.Model({id:"verifytestdb_replicate",name:"verifytestdb_replicate"});return g.testProcess={saveDoc:function(){return e=new d.Doc({_id:"test_doc_1",a:1},{database:h}),e.save()},destroyDoc:function(){return e.destroy()},updateDoc:function(){return e.set({b:"hello"}),e.save()},saveDB:function(){return h.save()},setupDB:function(a){var c=b.Deferred();return a.fetch().then(function(){return a.destroy()},function(){c.resolve()}).then(function(){c.resolve()},function(a,b,d){"Unauthorized"===d&&c.reject(a,b,d)}),c},setup:function(){return b.when([this.setupDB(h),this.setupDB(i)])},testView:function(){var a=b.Deferred(),c=$.get(f.url()+"/_view/testview");return c.then(function(b){var c=JSON.parse(b).rows[0];if(6===c.value)return a.resolve();var d={reason:"Values expect 6, got "+c.value};a.reject({responseText:JSON.stringify(d)})},a.reject),a},setupView:function(){var a=new d.Doc({_id:"test_doc10",a:1},{database:h}),c=new d.Doc({_id:"test_doc_20",a:2},{database:h}),e=new d.Doc({_id:"test_doc_30",a:3},{database:h});return f=new d.Doc({_id:"_design/view_check",views:{testview:{map:"function (doc) { emit(doc._id, doc.a); }",reduce:"_sum"}}},{database:h}),b.when([a.save(),c.save(),e.save(),f.save()])
+},setupReplicate:function(){return $.ajax({url:"/_replicate",contentType:"application/json",type:"POST",dataType:"json",processData:!1,data:JSON.stringify({create_target:!0,source:"verifytestdb",target:"verifytestdb_replicate"})})},testReplicate:function(){var a=b.Deferred(),c=i.fetch();return c.then(function(){var b=i.get("doc_count");if(4===b)return a.resolve(),void 0;var c={reason:"Replication Failed, expected 4 docs got "+b};a.reject({responseText:JSON.stringify(c)})},a.reject),a},removeDBs:function(){i.destroy(),h.destroy()}},g}),define("addons/verifyinstall/views",["app","api","addons/verifyinstall/resources"],function(a,b,c){return c.Main=b.View.extend({template:"addons/verifyinstall/templates/main",events:{"click #start":"startTest"},initialize:function(){_.bindAll(this)},setPass:function(a){this.$("#"+a).html("&#10003;")},setError:function(a,c){this.$("#"+a).html("&#x2717;"),b.addNotification({msg:"Error: "+c,type:"error",selector:"#error"})},complete:function(){b.addNotification({msg:"Success! You Couchdb install is working. Time to Relax",type:"success",selector:"#error"})},enableButton:function(){this.$("#start").removeAttr("disabled").text("Verify Installation")},disableButton:function(){this.$("#start").attr("disabled","disabled").text("Verifying")},formatError:function(a){var b=this.enableButton,c=this.setError;return function(d){b(),d&&c(a,JSON.parse(d.responseText).reason)}},startTest:function(){this.disableButton(),this.$(".status").text("");var a=c.testProcess,b=this.setPass,d=this.complete,e=(this.setError,this.formatError);a.setup().then(function(){return a.saveDB()},e("create-database")).then(function(){return b("create-database"),a.saveDoc()},e("create-document")).then(function(){return b("create-document"),a.updateDoc()},e("update-document")).then(function(){return b("update-document"),a.destroyDoc()},e("delete-document")).then(function(){return b("delete-document"),a.setupView()},e("create-view")).then(function(){return a.testView()},e("create-view")).then(function(){return b("create-view"),a.setupReplicate()},e("create-view")).then(function(){return a.testReplicate()},e("replicate")).then(function(){b("replicate"),d(),a.removeDBs()},e("replicate")),this.enableButton()}}),c}),define("addons/verifyinstall/routes",["app","api","addons/verifyinstall/views"],function(a,b,c){var d=b.RouteObject.extend({layout:"one_pane",routes:{verifyinstall:"verifyInstall"},selectedHeader:"Verify",verifyInstall:function(){this.setView("#dashboard-content",new c.Main({}))},crumbs:[{name:"Verify Couchdb Installation",link:"#"}]});return c.RouteObjects=[d],c}),define("addons/verifyinstall/base",["app","api","addons/verifyinstall/routes"],function(a,b,c){return c.initialize=function(){b.addHeaderLink({title:"Verify",href:"#verifyinstall",icon:"fonticon-circle-check",bottomNav:!0})},c}),define("load_addons",["addons/activetasks/base","addons/config/base","addons/logs/base","addons/stats/base","addons/replication/base","addons/plugins/base","addons/contribute/base","addons/permissions/base","addons/compaction/base","addons/auth/base","addons/verifyinstall/base"],function(){var a={addons:arguments};return a}),define("router",["require","app","initialize","api","modules/fauxton/base","modules/fauxton/layout","modules/databases/base","modules/documents/base","modules/pouchdb/base","load_addons"],function(a,b,c,d,e,f,g,h,i,j){var k=[g,h],l={},m=b.router=Backbone.Router.extend({routes:{},beforeUnload:function(a,b){l[a]=b},removeBeforeUnload:function(a){delete l[a]},navigate:function(a,b){var c=!0,d=_.find(_.map(l,function(a){return a()}),function(a){return a?!0:void 0});d&&(c=window.confirm(d)),c&&Backbone.Router.prototype.navigate(a,b)},addModuleRouteObject:function(a){var c=this,e=this.masterLayout,f=a.prototype.getRouteUrls();_.each(f,function(f){this.route(f,f.toString(),function(){var g=Array.prototype.slice.call(arguments),h=a.prototype.getRouteRoles(f),i=b.auth.checkAccess(h);i.then(function(){c.activeRouteObject&&c.activeRouteObject.hasRoute(f)||(c.activeRouteObject&&c.activeRouteObject.removeViews(),c.activeRouteObject=new a(f,e,g));var b=c.activeRouteObject;b.routeCallback(f,g),b.renderWith(f,e,g)},function(){d.auth.authDeniedCb()})})},this)},setModuleRoutes:function(){_.each(k,function(a){a&&_.each(a.RouteObjects,this.addModuleRouteObject,this)},this),_.each(j.addons,function(a){a&&(a.initialize(),a.RouteObjects&&_.each(a.RouteObjects,this.addModuleRouteObject,this))},this)},initialize:function(){this.navBar=b.navBar=new e.NavBar,this.apiBar=b.apiBar=new e.ApiBar,this.auth=b.auth=d.auth,b.session=d.session,b.masterLayout=this.masterLayout=new f(this.navBar,this.apiBar),b.footer=new e.Footer({el:"#footer-content"}),this.setModuleRoutes(),$("#app-container").html(this.masterLayout.el),this.masterLayout.render(),$.when.apply(null,b.footer.establish()).done(function(){b.footer.render()})},triggerRouteEvent:function(a,b){if(this.activeRouteObject){var c=[a].concat(b);this.activeRouteObject.trigger.apply(this.activeRouteObject,c),this.activeRouteObject.renderWith(c,this.masterLayout,b)}}});return m}),require(["app","router"],function(a,b){a.router=new b,Backbone.history.start({pushState:!1,root:a.root}),$(document).on("click","a:not([data-bypass])",function(b){var c={prop:$(this).prop("href"),attr:$(this).attr("href")},d=location.protocol+"//"+location.host+a.root;c.prop&&c.prop.slice(0,d.length)===d&&(b.preventDefault(),a.router.navigate(c.attr,!0))})}),define("main",function(){}),require.config({deps:["main"],paths:{libs:"../assets/js/libs",plugins:"../assets/js/plugins",jquery:"../assets/js/libs/jquery",lodash:"../assets/js/libs/lodash",backbone:"../assets/js/libs/backbone","backbone.layoutmanger":"../assets/js/plugins/backbone.layoutmanager",bootstrap:"../assets/js/libs/bootstrap",spin:"../assets/js/libs/spin.min",d3:"../assets/js/libs/d3","nv.d3":"../assets/js/libs/nv.d3",ace:"../assets/js/libs/ace"},baseUrl:"/",map:{"*":{underscore:"lodash"}},shim:{backbone:{deps:["lodash","jquery"],exports:"Backbone"},bootstrap:{deps:["jquery"],exports:"Bootstrap"},"plugins/prettify":[],"plugins/jquery.form":["jquery"]}}),define("config",function(){});
\ No newline at end of file