diff --git a/config/plugins/visualizations/mvpapp/config/mvpapp.xml b/config/plugins/visualizations/mvpapp/config/mvpapp.xml new file mode 100644 index 00000000000..1d595e15952 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/config/mvpapp.xml @@ -0,0 +1,16 @@ + + + + + + HistoryDatasetAssociation + MzSQlite + dataset_id + + + + dataset_id + + + _blank + \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot new file mode 100755 index 00000000000..b93a4953fff Binary files /dev/null and b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot differ diff --git a/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg new file mode 100755 index 00000000000..94fb5490a2e --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf new file mode 100755 index 00000000000..1413fc609ab Binary files /dev/null and b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf differ diff --git a/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff new file mode 100755 index 00000000000..9e612858f80 Binary files /dev/null and b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff differ diff --git a/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 new file mode 100755 index 00000000000..64539b54c37 Binary files /dev/null and b/config/plugins/visualizations/mvpapp/static/css/Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/config/plugins/visualizations/mvpapp/static/css/app.css b/config/plugins/visualizations/mvpapp/static/css/app.css new file mode 100644 index 00000000000..09aa4bbc8eb --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/app.css @@ -0,0 +1,99 @@ + +body { + padding-top: 70px; +} +.navbar-fixed-top { + background-color: #9e9f9f; +} + +.selected-peptide { + background-color: lightblue; +} + +.shadow { + -webkit-box-shadow: 1px 1px 2px 3px #ccc; /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */ + -moz-box-shadow: 1px 1px 2px 3px #ccc; /* Firefox 3.5 - 3.6 */ + box-shadow: 1px 1px 2px 3px #ccc; /* Opera 10.5, IE 9, Firefox 4+, Chrome 6+, iOS 5 */ + margin: 4px; + padding: 4px; +} + +.used-for-filtering { + background-color: darkgrey; + color: #afd9ee; +} + +.fixed-height-panel { + height: 500px; + overflow-y: scroll; +} + +.aa { + font-family: monospace; + font-size: 14pt; + border-radius: 5px; +} + +.aa_mod { + border-radius:10px 10px 10px 10px; + border:solid 1px darkslategray; + background-color: darkslategray; + color: #cccccc; + cursor: pointer; +} + +.aa_header { + margin-right: 10px; +} + + +div .score_name { + margin: 5px; +} + +div .selected{ + background-color: #1c94c4; +} + +a:link { + text-decoration: none; +} + +a:visited { + text-decoration: none; +} + +a:hover { + text-decoration: none; +} + +a:active { + text-decoration: none; +} + +path.fdr_path_passed { + stroke: black; + fill: none; + stroke-width: 2px; + +} + +path.fdr_path_failed { + stroke: orange; + fill: none; + stroke-width: 2px; + +} + +.panel_test { + background-color: red; +} + +.glyphicon-question-sign { + cursor: pointer; +} + +.modal-body { + max-height: calc(100vh - 212px); + overflow-y: auto; +} \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/datatables.min.css b/config/plugins/visualizations/mvpapp/static/css/datatables.min.css new file mode 100755 index 00000000000..699d3ae1dee --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/datatables.min.css @@ -0,0 +1,22 @@ +/* + * This combined file was created by the DataTables downloader builder: + * https://datatables.net/download + * + * To rebuild or modify this file with the latest versions of the included + * software please visit: + * https://datatables.net/download/#bs-3.3.7/dt-1.10.15 + * + * Included libraries: + * Bootstrap 3.3.7, DataTables 1.10.15 + */ + +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot);src:url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff) format('woff'),url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(Bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.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;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{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:-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;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{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:-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-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{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:-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-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{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:-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-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{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:-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)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-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-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;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.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-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}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.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{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";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;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.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:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ + +table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0;background-color: white}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} + + diff --git a/config/plugins/visualizations/mvpapp/static/css/igv.css b/config/plugins/visualizations/mvpapp/static/css/igv.css new file mode 100644 index 00000000000..77bdb630cfb --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/igv.css @@ -0,0 +1,1076 @@ +.igv-color-swatch { + display: flex; + flex-flow: row; + flex-wrap: wrap; + justify-content: center; + align-items: center; + width: 24px; + height: 24px; + border-style: solid; + border-width: 1px; + border-color: transparent; } + .igv-color-swatch i.fa { + display: block; } + .igv-color-swatch i.fa:hover, + .igv-color-swatch i.fa:focus, + .igv-color-swatch i.fa:active { + cursor: pointer; + color: #0f0f0f; } + +.igv-color-swatch:hover, +.igv-color-swatch:focus, +.igv-color-swatch:active { + border-color: #dddddd; } + +.igv-colorpicker-menu-close-button { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: flex-end; + align-items: center; + width: 100%; + height: 32px; + margin-top: 4px; + margin-bottom: 4px; + padding-right: 8px; } + .igv-colorpicker-menu-close-button i.fa { + display: block; + margin-left: 4px; + margin-right: 4px; + color: #5f5f5f; } + .igv-colorpicker-menu-close-button i.fa:hover, + .igv-colorpicker-menu-close-button i.fa:focus, + .igv-colorpicker-menu-close-button i.fa:active { + cursor: pointer; + color: #0f0f0f; } + +.igv-position-absolute { + position: absolute; + top: 0; + left: 0; } + +.igv-generic-container { + width: 256px; + z-index: 5000; + background-color: white; + border-style: solid; + border-width: thin; + border-color: #dddddd; + cursor: pointer; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + align-items: center; } + .igv-generic-container div:first-child { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: flex-end; + align-items: center; + height: 24px; + width: 100%; + background-color: #dddddd; } + .igv-generic-container div:first-child i.fa { + margin-right: 4px; + display: block; + color: #5f5f5f; } + .igv-generic-container div:first-child i.fa:hover, + .igv-generic-container div:first-child i.fa:focus, + .igv-generic-container div:first-child i.fa:active { + cursor: pointer; + color: #0f0f0f; } + +#igvControlDiv { + position: relative; } + +#igv-content-header { + position: relative; + height: 16px; + clear: both; + margin-top: 10px; + white-space: nowrap; } + #igv-content-header .igv-ideogram-left-shim { + position: relative; + height: 100%; + width: 50px; + display: inline-block; + background-color: white; } + #igv-content-header .igv-ideogram-content-div { + position: relative; + height: 100%; + display: inline-block; + background-color: white; } + #igv-content-header .igv-ideogram-content-div canvas { + width: 100%; + height: 100%; } + #igv-content-header .igv-ideogram-content-div-border-right { + border-right-color: #292929; + border-right-style: solid; + border-right-width: 1px; } + +.igv-multi-locus-panel-border { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 1px; + background-color: green; + border-right-color: #ff0000; + border-right-style: solid; + border-right-width: 1px; } + +#igv-navbar { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + margin-top: 2px; + margin-bottom: 4px; + position: relative; + top: 0; + left: 0; + height: 32px; + width: 100%; + border-style: solid; + border-radius: 3px; + border-width: thin; + border-color: #bfbfbf; + background-color: #f3f3f3; } + #igv-navbar i { + cursor: pointer; + color: #666666; } + #igv-navbar i:hover, + #igv-navbar i:focus, + #igv-navbar i:active { + color: #434343; } + #igv-navbar #igv-nav-bar-left-container { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + height: 32px; } + #igv-navbar #igv-nav-bar-left-container #igv-logo { + width: 34px; + height: 32px; + margin-left: 8px; + margin-right: 32px; } + #igv-navbar #igv-nav-bar-left-container #igv-drag-and-drop-presentation-button { + margin-right: 32px; } + #igv-navbar #igv-nav-bar-left-container #igv-current_genome { + height: 32px; + margin-right: 16px; + user-select: none; + color: #444; + font-family: "Open Sans", sans-serif; + font-size: 12px; + font-weight: 400; + line-height: 32px; + text-align: center; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + height: 32px; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-chromosome-select-widget-container { + width: 96px; + margin-right: 4px; + height: 70%; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-chromosome-select-widget-container select { + display: block; + outline: none; + font-family: "Open Sans", sans-serif; + font-size: 12px; + font-weight: 400; + color: #444; + width: 100%; + height: 100%; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + height: 75%; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container { + width: 260px; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: center; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container input { + display: block; + width: 85%; + padding-left: 8px; + margin-right: 8px; + line-height: 20px; + text-align: left; + font-family: "Open Sans", sans-serif; + font-size: 12px; + font-weight: 400; + color: #444; + outline: none; + border-style: solid; + border-radius: 3px; + border-width: thin; + border-color: #bfbfbf; + background-color: white; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container div { + height: 100%; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container div i { + font-size: 18px; } + #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-windowsizepanel-content-div { + margin-left: 4px; + user-select: none; + font-family: "Open Sans", sans-serif; + font-size: 12px; + font-weight: 400; + color: #444; } + #igv-navbar #igv-nav-bar-right-container { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; } + #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + margin-right: 8px; } + #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container div { + margin-left: 0; + margin-right: 4px; } + #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container div:last-child { + margin-left: 0; + margin-right: 0; } + #igv-navbar #igv-nav-bar-right-container #igv-zoom-widget { + user-select: none; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + width: 44px; + margin-left: 16px; + margin-right: 8px; } + #igv-navbar #igv-nav-bar-right-container #igv-zoom-widget div i { + font-size: 24px; } + +.igv-nav-bar-button { + height: 18px; + min-width: 96px; + text-transform: capitalize; + user-select: none; + line-height: 18px; + text-align: center; + font-family: "Open Sans", sans-serif; + font-size: 11px; + font-weight: 200; + color: #737373; + background-color: #f3f3f3; + border-color: #737373; + border-style: solid; + border-width: thin; + border-radius: 10px; } + +.igv-nav-bar-button-clicked { + color: white; + background-color: #737373; } + +.igv-nav-bar-button:hover { + cursor: pointer; } + +#igv-logo-nonav { + margin-left: 4px; + margin-top: 12px; + position: absolute; + top: 0; + left: 0; + width: 34px; + height: 16px; } + +.igv-search-results { + position: absolute; + top: 32px; + left: 2px; + height: 320px; + width: 213px; + background-color: white; + border-color: #7F7F7F; + border-style: solid; + border-width: thin; + overflow-x: hidden; + overflow-y: auto; + z-index: 9999; } + .igv-search-results tr { + font-family: "Open Sans", sans-serif; + font-size: small; + font-weight: 400; + color: #444; } + .igv-search-results tr:hover, + .igv-search-results tr:focus, + .igv-search-results tr:active { + cursor: pointer; + font-weight: 700; + color: #141414; } + +.igv-karyo-div { + position: relative; + left: 0; + top: 0; + height: 200px; } + +.igv-karyo-hide { + height: 0; + overflow: hidden; } + +.igv-karyo-content-div { + left: 0; + top: 0; + width: 100%; + height: 100%; } + +.igv-karyo-canvas { + left: 0; + top: 0; + width: 100%; + height: 100%; } + +.igv-root-div { + position: relative; + left: 0; + right: 0; + height: auto; + margin-left: 10px; + margin-right: 10px; + padding-top: 4px; } + +.igv-content-div { + position: relative; + width: 100%; + height: 100%; } + +.igv-track-container-div { + position: relative; + clear: both; } + +.igv-track-div { + position: relative; + width: 100%; + margin-top: 2px; + margin-bottom: 2px; } + +.igv-viewport-container { + position: absolute; + left: 50px; + right: 50px; + height: 100%; + white-space: nowrap; + overflow-x: hidden; + overflow-y: hidden; } + +.igv-viewport-div { + position: relative; + display: inline-block; + height: 100%; + overflow-x: hidden; + overflow-y: hidden; } + +.igv-viewport-content-div { + position: absolute; + width: 100%; } + +.igv-viewport-message { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + color: rgba(0, 0, 0, 0.15); + font-family: "Open Sans", sans-serif; + font-size: 25px; + font-weight: bold; + user-select: none; } + +.igv-whole-genome-container { + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-between; + width: 100%; + height: 100%; + background-color: white; } + .igv-whole-genome-container div { + font-family: "Open Sans", sans-serif; + font-size: 10px; + font-weight: 400; + color: #444; + height: 100%; + text-align: center; + border-right-color: #bfbfbf; + border-right-style: solid; + border-right-width: thin; } + .igv-whole-genome-container div span { + display: block; + padding-top: 6px; + text-overflow: ellipsis; } + .igv-whole-genome-container div:last-child { + border-right-color: transparent; } + .igv-whole-genome-container div:hover, + .igv-whole-genome-container div:focus, + .igv-whole-genome-container div:active { + cursor: pointer; + background-color: #efefef; } + +.igv-viewport-div-border-right { + border-right-color: #292929; + border-right-style: solid; + border-right-width: 1px; } + +.igv-viewport-fa-close { + position: absolute; + top: 4px; + right: 4px; + font-size: 16px; + color: #666666; + z-index: 1000; } + +.igv-viewport-fa-close:hover { + cursor: pointer; + color: #434343; } + +.igv-viewport-content-ruler-div { + position: absolute; + left: 50%; + top: 25%; + transform: translate(-50%, -25%); + font-family: "Open Sans", sans-serif; + font-size: 12px; + font-weight: 200; + text-align: center; + min-width: 16px; + z-index: 64; + color: #0066ff; + background-color: white; + padding: 1px; } + +.igv-viewport-content-ruler-div:hover, +.igv-viewport-content-ruler-div:focus, +.igv-viewport-content-ruler-div:active { + cursor: pointer; + color: white; + background-color: #0066ff; } + +.igv-viewport-ruler { + font-family: "Open Sans", sans-serif; + font-size: 10px; + font-weight: 200; + text-align: center; } + .igv-viewport-ruler > div { + height: 100%; } + +.igv-viewport-sequence { + font-family: "Open Sans", sans-serif; + font-size: 8px; + font-weight: 200; + text-align: center; } + +.igv-viewport-spinner { + pointer-events: none; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1024; + color: #737373; } + +.igv-ruler-sweeper-div { + display: none; + pointer-events: none; + position: absolute; + top: 0; + left: 0; + width: 0; + height: 100%; + z-index: 99999; + background-color: rgba(68, 134, 247, 0.25); } + +.igv-right-hand-gutter { + position: absolute; + right: 0; + width: 36px; + height: 100%; + background: white; + text-align: center; } + .igv-right-hand-gutter i { + position: absolute; + top: 0; + right: 0; + padding-right: 6px; + font-size: 20px; + cursor: pointer; + color: grey; } + .igv-right-hand-gutter i:hover, + .igv-right-hand-gutter i:focus, + .igv-right-hand-gutter i:active { + color: #333333; } + +.igv-left-hand-gutter { + position: absolute; + left: 0; + width: 50px; + height: 100%; } + .igv-left-hand-gutter canvas { + position: absolute; } + +.igv-track-menu-container { + background-color: white; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; } + .igv-track-menu-container div { + padding-left: 4px; + padding-right: 4px; + padding-top: 2px; + padding-bottom: 2px; + background-color: white; } + .igv-track-menu-container div i { + padding-right: 2px; } + .igv-track-menu-container div:hover, + .igv-track-menu-container div:focus, + .igv-track-menu-container div:active { + cursor: pointer; + background-color: #efefef; } + .igv-track-menu-container a { + color: inherit; + text-decoration: none; } + +.igv-track-menu-border-top { + border-top-color: #a2a2a2; + border-top-style: solid; + border-top-width: thin; } + +.igv-track-menu-category { + padding-left: 4px; + font-weight: 400; } + +.igv-track-drag-scrim { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 256; + background-color: rgba(68, 134, 247, 0.25); } + +.igv-track-manipulation-handle { + cursor: pointer; + position: absolute; + right: 36px; + width: 12px; + margin-left: 2px; + height: 100%; + box-sizing: border-box; + font-size: medium; + border-color: #c4c4c4; + border-style: solid; + border-width: thin; + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; + z-index: 512; + background-color: #c4c4c4; } + +.igv-track-manipulation-handle:hover, +.igv-track-manipulation-handle:focus, +.igv-track-manipulation-handle:active { + border-color: #7e7e7e; + background-color: #7e7e7e; } + +.igv-track-label { + position: absolute; + left: 8px; + top: 4px; + width: auto; + height: auto; + max-width: 200px; + padding-left: 4px; + padding-right: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-family: "Open Sans", sans-serif; + font-size: small; + font-weight: 400; + text-align: center; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + border-color: #444; + border-radius: 2px; + border-style: solid; + border-width: thin; + background-color: white; + z-index: 128; + cursor: pointer; } + +.igv-track-label:hover, +.igv-track-label:focus, +.igv-track-label:active { + background-color: rgba(0, 0, 0, 0.05); } + +.igv-scrollbar-outer-div { + position: absolute; + top: 0; + right: 0; + width: 14px; + height: 100%; + background-color: white; } + .igv-scrollbar-outer-div div { + position: absolute; + top: 0; + left: 3px; + width: 8px; + border-style: solid; + border-width: thin; + border-color: #c4c4c4; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + background-color: white; } + .igv-scrollbar-outer-div div:hover, + .igv-scrollbar-outer-div div:focus, + .igv-scrollbar-outer-div div:active { + cursor: pointer; + background-color: #c4c4c4; } + +.zoom-in-notice-container { + position: absolute; + top: 25%; + left: 50%; } + .zoom-in-notice-container div { + position: relative; + left: -50%; + font-family: "Open Sans", sans-serif; + font-size: medium; + font-weight: 400; + color: #3f3f3f; + background-color: rgba(255, 255, 255, 0.51); + z-index: 64; } + +.igv-center-guide { + pointer-events: none; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + width: 8px; + z-index: 8; + display: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + border-left-style: dashed; + border-left-width: thin; + border-right-style: dashed; + border-right-width: thin; } + +.igv-center-guide-wide { + background-color: transparent; + border-left-color: rgba(127, 127, 127, 0.51); + border-right-color: rgba(127, 127, 127, 0.51); } + +.igv-center-guide-thin { + left: 50%; + width: 1px; + background-color: transparent; + border-left-color: rgba(127, 127, 127, 0.51); + border-right-color: transparent; + /*background-color: rgba(127, 127, 127, 0.51);*/ + /*border-left-color: rgba(0,0,0,0);*/ + /*border-right-color: rgba(0,0,0,0);*/ } + +.igv-cursor-tracking-guide { + pointer-events: none; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + width: 1px; + z-index: 1; + border-left-style: dotted; + border-left-width: thin; + border-left-color: rgba(127, 127, 127, 0.76); + display: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } + +.igv-clickable { + cursor: pointer; + background-color: white; } + +#color-by-tag { + color: #444; } + +#color-by-tag:hover, +#color-by-tag:focus, +#color-by-tag:active { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: white; + border-color: #444; + border-radius: 2px; + border-style: solid; + border-width: thin; + background-color: #7f7f7f; } + +.igv-user-feedback { + position: fixed; + top: 50%; + left: 50%; + width: 36em; + height: 27em; + margin-top: -9em; + /*set to a negative number 1/2 of your height*/ + margin-left: -15em; + /*set to a negative number 1/2 of your width*/ + background-color: white; + border-color: #a2a2a2; + border-style: solid; + border-width: thin; + font-family: "Open Sans", sans-serif; + font-size: medium; + font-weight: 400; + color: #444; } + .igv-user-feedback div:first-child { + position: absolute; + top: 0; + left: 0; + right: 0; + width: 100%; + height: 32px; + border-bottom-color: #a2a2a2; + border-bottom-style: solid; + border-bottom-width: thin; + background-color: white; } + .igv-user-feedback div:first-child i { + font-size: 20px; } + .igv-user-feedback div:first-child i:first-child { + position: absolute; + top: 0; + left: 0; + padding: 8px; + color: red; } + .igv-user-feedback div:first-child i:last-child { + position: absolute; + top: 0; + right: 0; + padding: 8px; + cursor: pointer; + color: grey; } + .igv-user-feedback div:first-child i:last-child:hover, + .igv-user-feedback div:first-child i:last-child:focus, + .igv-user-feedback div:first-child i:last-child:active { + color: #333333; } + .igv-user-feedback div:last-child { + padding-left: 48px; + padding-top: 8px; + padding-right: 48px; + padding-bottom: 8px; + position: absolute; + top: 33px; + left: 0; + right: 0; + bottom: 0; + background-color: white; } + +.igv-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } + +.igv-generic-dialog-container { + position: absolute; + top: 0; + left: 0; + width: 300px; + height: 200px; + font-family: "Open Sans", sans-serif; + font-size: medium; + font-weight: 200; + border-color: #7F7F7F; + border-radius: 4px; + border-style: solid; + border-width: thin; + z-index: 2048; + background-color: white; + display: flex; + flex-flow: column; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-header { + width: 100%; + height: 24px; + cursor: move; + border-color: #c4c4c4; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-style: solid; + border-width: thin; + background-color: #c4c4c4; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: flex-end; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-header div { + height: 24px; + width: 16px; + margin-right: 6px; + text-align: center; + line-height: 24px; + color: #444; + font-size: medium; } + .igv-generic-dialog-container .igv-generic-dialog-header div:hover { + cursor: pointer; } + .igv-generic-dialog-container .igv-generic-dialog-one-liner { + margin-top: 8px; + width: 95%; + color: #373737; + line-height: 24px; + text-align: left; + padding-left: 8px; + background-color: white; } + .igv-generic-dialog-container .igv-generic-dialog-label-input { + margin-top: 8px; + width: 95%; + height: 24px; + color: #373737; + line-height: 24px; + padding-left: 8px; + background-color: white; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-label-input div { + width: 30%; + height: 100%; + font-size: 16px; + text-align: right; + padding-right: 8px; + background-color: white; } + .igv-generic-dialog-container .igv-generic-dialog-label-input input { + display: block; + height: 100%; + width: 100%; + padding-left: 4px; + font-family: "Open Sans", sans-serif; + font-weight: 400; + color: #373737; + text-align: left; + outline: none; + border-style: solid; + border-width: thin; + border-color: #7F7F7F; + background-color: white; } + .igv-generic-dialog-container .igv-generic-dialog-label-input input { + width: 50%; + font-size: 16px; } + .igv-generic-dialog-container .igv-generic-dialog-input { + margin-top: 8px; + width: calc(100% - 16px); + height: 24px; + color: #373737; + line-height: 24px; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-around; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-input input { + display: block; + height: 100%; + width: 100%; + padding-left: 4px; + font-family: "Open Sans", sans-serif; + font-weight: 400; + color: #373737; + text-align: left; + outline: none; + border-style: solid; + border-width: thin; + border-color: #7F7F7F; + background-color: white; } + .igv-generic-dialog-container .igv-generic-dialog-input input { + font-size: 16px; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel { + width: 100%; + height: 28px; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-around; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div { + margin-top: 32px; + color: white; + font-family: "Open Sans", sans-serif; + font-size: 14px; + font-weight: 200; + width: 75px; + height: 28px; + line-height: 28px; + text-align: center; + border-color: transparent; + border-style: solid; + border-width: thin; + border-radius: 2px; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child { + margin-left: 32px; + margin-right: 0; + background-color: #5ea4e0; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child { + margin-left: 0; + margin-right: 32px; + background-color: #c4c4c4; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover { + cursor: pointer; + background-color: #3b5c7f; } + .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover { + cursor: pointer; + background-color: #7f7f7f; } + .igv-generic-dialog-container .igv-generic-dialog-ok { + width: 100%; + height: 36px; + margin-top: 32px; + display: flex; + flex-flow: row; + flex-wrap: nowrap; + justify-content: space-around; + align-items: center; } + .igv-generic-dialog-container .igv-generic-dialog-ok div { + width: 98px; + height: 36px; + line-height: 36px; + text-align: center; + color: white; + font-family: "Open Sans", sans-serif; + font-size: medium; + font-weight: 200; + border-color: white; + border-style: solid; + border-width: thin; + border-radius: 4px; + background-color: #2B81AF; } + .igv-generic-dialog-container .igv-generic-dialog-ok div:hover { + cursor: pointer; + background-color: #25597f; } + +.igv-popover { + position: absolute; + top: 0; + left: 0; + min-width: 128px; + z-index: 4096; + font-family: "Open Sans", sans-serif; + font-size: small; + font-weight: 400; + color: #444; + background: white; + border-radius: 4px; + border-color: #7F7F7F; + border-style: solid; + border-width: thin; + display: none; } + +.igv-popover-header { + position: relative; + top: 0; + left: 0; + width: 100%; + height: 20px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-color: #7F7F7F; + border-bottom-style: solid; + border-bottom-width: thin; + background-color: #eee; } + .igv-popover-header div { + position: absolute; + top: 3px; + right: 3px; + height: 100%; + width: 16px; + text-align: center; + line-height: 100%; + cursor: pointer; + color: #444; + font-size: small; } + .igv-popover-header div:hover { + color: white; } + +.igv-popover-track-popup-content { + position: relative; + top: 0; + left: 0; + max-height: 384px; + overflow-x: hidden; + overflow-y: auto; } + +.igv-popover-name-value { + cursor: default; + text-wrap: none; + white-space: nowrap; + max-width: 384px; } + +.igv-popover-name { + font-weight: bold; + padding-right: 4px; + float: left; } + +.igv-popover-value { + padding-left: 4px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 256px; + display: inline-block; } + +.igv-spinner-container { + color: #3f3f3f; + width: 100%; + height: 100%; + text-align: center; + padding-top: 8px; + font-size: 24px; + z-index: 512; } + +.igv-fa-check-hidden { + color: rgba(255, 255, 255, 0); } + +.validateTips { + border: 1px solid transparent; + padding: 0.3em; } + .validateTips fieldset { + border: 0; } + +.igv-spacer-10 { + height: 10px; + width: 100%; + font-size: 0; + margin: 0; + padding: 0; + border: 0; + display: block; } + +/*# sourceMappingURL=igv.css.map */ diff --git a/config/plugins/visualizations/mvpapp/static/css/igv.css.map b/config/plugins/visualizations/mvpapp/static/css/igv.css.map new file mode 100644 index 00000000000..acc860086d0 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/igv.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAGA,iBAAkB;EAEhB,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,GAAG;EACd,SAAS,EAAE,IAAI;EACf,eAAe,EAAE,MAAM;EACvB,WAAW,EAAE,MAAM;EAEnB,KAAK,EAXiB,IAAI;EAY1B,MAAM,EAZgB,IAAI;EAc1B,YAAY,EAAE,KAAK;EACnB,YAAY,EAdkB,GAAG;EAejC,YAAY,EAAE,WAAW;EAEzB,sBAAK;IACH,OAAO,EAAE,KAAK;EAGhB;;+BAEY;IACV,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;;AAIlB;;wBAEyB;EACvB,YAAY,EAAE,OAAO;;AAGvB,kCAAmC;EAEjC,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,GAAG;EACd,SAAS,EAAE,MAAM;EACjB,eAAe,EAAE,QAAQ;EACzB,WAAW,EAAE,MAAM;EAEnB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,GAAG;EAElB,aAAa,EAAE,GAAG;EAElB,uCAAK;IACH,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,GAAG;IAChB,YAAY,EAAE,GAAG;IACjB,KAAK,EAAE,OAAO;EAGhB;;gDAEY;IACV,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;;AC/DlB,sBAAuB;EACrB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;;AAGT,sBAAuB;EAErB,KAAK,EAAE,KAAK;EAEZ,OAAO,EAAE,IAAI;EAEb,gBAAgB,EAAE,KAAK;EAEvB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAClB,YAAY,EAAE,OAAO;EAErB,MAAM,EAAE,OAAO;EAEf,OAAO,EAAE,IAAI;EACb,cAAc,EAAE,GAAG;EACnB,SAAS,EAAE,IAAI;EACf,eAAe,EAAE,UAAU;EAC3B,WAAW,EAAE,MAAM;EAGnB,sCAAgB;IACd,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,QAAQ;IACzB,WAAW,EAAE,MAAM;IAEnB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IAEX,gBAAgB,EAAE,OAAO;IAGzB,2CAAK;MACH,YAAY,EAAE,GAAG;MACjB,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,OAAO;IAGhB;;sDAEY;MACV,MAAM,EAAE,OAAO;MACf,KAAK,EAAE,OAAO;;ACgBpB,cAAe;EACb,QAAQ,EAAE,QAAQ;;AAGpB,mBAAoB;EAElB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EA7Cc,IAAI;EA8CxB,KAAK,EAAE,IAAI;EAEX,UAAU,EAAE,IAAI;EAEhB,WAAW,EAAE,MAAM;EAEnB,2CAAwB;IACtB,QAAQ,EAAE,QAAQ;IAElB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IAEX,OAAO,EAAE,YAAY;IAErB,gBAAgB,EAAE,KAAK;EAIzB,6CAA0B;IACxB,QAAQ,EAAE,QAAQ;IAElB,MAAM,EAAE,IAAI;IAEZ,OAAO,EAAE,YAAY;IAErB,gBAAgB,EAAE,KAAK;IAEvB,oDAAO;MACL,KAAK,EAAC,IAAI;MACV,MAAM,EAAC,IAAI;EAKf,0DAAuC;IACrC,kBAAkB,EA7EG,OAAO;IA+E5B,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,EAjFG,GAAG;;AAuF5B,6BAA8B;EAC5B,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EAEP,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,GAAG;EAEV,gBAAgB,EAAE,KAAK;EAEvB,kBAAkB,EAAE,OAAO;EAC3B,kBAAkB,EAAE,KAAK;EACzB,kBAAkB,EAAE,GAAG;;AAKzB,WAAY;EAEV,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,GAAG;EACd,SAAS,EAAE,MAAM;EACjB,eAAe,EAAE,aAAa;EAC9B,WAAW,EAAE,MAAM;EAEnB,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,GAAG;EAElB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,MAAM,EA9IY,IAAI;EA+ItB,KAAK,EAAE,IAAI;EAEX,YAAY,EAAE,KAAK;EACnB,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,IAAI;EAElB,YAAY,EAnIK,OAAO;EAoIxB,gBAAgB,EArJc,OAAO;EAuJrC,aAAE;IACA,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;EAGhB;;sBAEU;IACR,KAAK,EAAE,OAAO;EAGhB,uCAA4B;IAE1B,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,MAAM;IAEnB,MAAM,EA3KU,IAAI;IA8KpB,iDAAU;MACR,KAAK,EAAE,IAAI;MACX,MAAM,EAhLQ,IAAI;MAkLlB,WAAW,EAAE,GAAG;MAChB,YAAY,EAAE,IAAI;IAIpB,8EAAuC;MACrC,YAAY,EAAE,IAAI;IAGpB,2DAAoB;MAElB,MAAM,EA7LQ,IAAI;MA+LlB,YAAY,EAAE,IAAI;MAElB,WAAW,EAAE,IAAI;MAEjB,KAAK,EAAE,IAAI;MACX,WAAW,EAvMO,uBAAuB;MAwMzC,SAAS,EAtMQ,IAAI;MAuMrB,WAAW,EAAE,GAAG;MAChB,WAAW,EAvMG,IAAI;MAwMlB,UAAU,EAAE,MAAM;IAMpB,6DAAsB;MAEpB,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,GAAG;MACd,SAAS,EAAE,MAAM;MACjB,eAAe,EAAE,aAAa;MAC9B,WAAW,EAAE,MAAM;MAEnB,MAAM,EAtNQ,IAAI;MAyNlB,qGAAwC;QACtC,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,GAAG;QAEjB,MAAM,EAAE,GAAG;QAEX,4GAAO;UAEL,OAAO,EAAE,KAAK;UAEd,OAAO,EAAE,IAAI;UAEb,WAAW,EAxOG,uBAAuB;UAyOrC,SAAS,EAvOI,IAAI;UAwOjB,WAAW,EAAE,GAAG;UAChB,KAAK,EAAE,IAAI;UAEX,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;MAIhB,mFAAsB;QACpB,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,MAAM;QACjB,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE,MAAM;QAEnB,MAAM,EAAE,GAAG;QAGX,yGAAsB;UACpB,KAAK,EAAE,KAAK;UAEZ,OAAO,EAAE,IAAI;UACb,SAAS,EAAE,GAAG;UACd,SAAS,EAAE,MAAM;UACjB,eAAe,EAAE,UAAU;UAC3B,WAAW,EAAE,MAAM;UAGnB,+GAAM;YACJ,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,GAAG;YAEV,YAAY,EAAE,GAAG;YACjB,YAAY,EAAE,GAAG;YAEjB,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,IAAI;YAEhB,WAAW,EAhRC,uBAAuB;YAiRnC,SAAS,EA/QE,IAAI;YAgRf,WAAW,EAAE,GAAG;YAChB,KAAK,EAAE,IAAI;YAEX,OAAO,EAAE,IAAI;YAEb,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,GAAG;YAClB,YAAY,EAAE,IAAI;YAClB,YAAY,EArQL,OAAO;YAuQd,gBAAgB,EAAE,KAAK;UAIzB,6GAAI;YACF,MAAM,EAAE,IAAI;YAGZ,+GAAE;cACA,SAAS,EAAE,IAAI;QAQrB,oHAAiC;UAC/B,WAAW,EAAE,GAAG;UAEhB,WAAW,EAAE,IAAI;UAEjB,WAAW,EAlTG,uBAAuB;UAmTrC,SAAS,EAjTI,IAAI;UAkTjB,WAAW,EAAE,GAAG;UAChB,KAAK,EAAE,IAAI;EASnB,wCAA6B;IAE3B,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,MAAM;IAGnB,6EAAqC;MAEnC,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,GAAG;MACd,SAAS,EAAE,MAAM;MACjB,eAAe,EAAE,aAAa;MAC9B,WAAW,EAAE,MAAM;MAEnB,YAAY,EAAE,GAAG;MAEjB,iFAAI;QACF,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,GAAG;MAGnB,4FAAe;QACb,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;IAMnB,yDAAiB;MAEf,WAAW,EAAE,IAAI;MAEjB,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,GAAG;MACd,SAAS,EAAE,MAAM;MACjB,eAAe,EAAE,aAAa;MAC9B,WAAW,EAAE,MAAM;MAEnB,KAAK,EAAE,IAAI;MAEX,WAAW,EAAE,IAAI;MACjB,YAAY,EAAE,GAAG;MAGf,+DAAE;QACA,SAAS,EAAE,IAAI;;AAWzB,mBAAoB;EAClB,MAAM,EArXmB,IAAI;EAsX7B,SAAS,EArXe,IAAI;EAsX5B,cAAc,EAAE,UAAU;EAE1B,WAAW,EAAE,IAAI;EAEjB,WAAW,EA3Xc,IAAI;EA4X7B,UAAU,EAAE,MAAM;EAClB,WAAW,EAnYW,uBAAuB;EAoY7C,SAAS,EA5XmB,IAAI;EA6XhC,WAAW,EAAE,GAAG;EAEhB,KAAK,EAlYuB,OAAO;EAmYnC,gBAAgB,EApYc,OAAO;EAsYrC,YAAY,EArYgB,OAAO;EAsYnC,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,IAAI;;AAGrB,2BAA4B;EAC1B,KAAK,EAAE,KAAK;EACZ,gBAAgB,EA7YY,OAAO;;AAgZrC,yBAA0B;EACxB,MAAM,EAAE,OAAO;;AAIjB,eAAgB;EACd,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,IAAI;EAChB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;;AAId,mBAAoB;EAClB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;EACT,IAAI,EAAE,GAAG;EACT,MAAM,EAAE,KAAK;EACb,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,KAAK;EACvB,YAAY,EA1YG,OAAO;EA2YtB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,IAAI;EAEb,sBAAG;IACD,WAAW,EApbS,uBAAuB;IAqb3C,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,IAAI;EAGb;;+BAEW;IACT,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,OAAO;;AAMlB,cAAe;EACb,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,CAAC;EACN,MAAM,EAAC,KAAK;;AAGd,eAAgB;EACd,MAAM,EAAE,CAAC;EACT,QAAQ,EAAE,MAAM;;AAGlB,sBAAuB;EACrB,IAAI,EAAC,CAAC;EACN,GAAG,EAAC,CAAC;EACL,KAAK,EAAC,IAAI;EACV,MAAM,EAAC,IAAI;;AAGb,iBAAkB;EAChB,IAAI,EAAC,CAAC;EACN,GAAG,EAAC,CAAC;EACL,KAAK,EAAC,IAAI;EACV,MAAM,EAAC,IAAI;;AAIb,aAAc;EAEZ,QAAQ,EAAE,QAAQ;EAElB,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EAER,MAAM,EAAE,IAAI;EAEZ,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAElB,WAAW,EAAC,GAAG;;AAGjB,gBAAiB;EACf,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,MAAM,EAAC,IAAI;;AAGb,wBAAyB;EACvB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;;AAGb,cAAe;EACb,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,GAAG;EACf,aAAa,EAAE,GAAG;;AAGpB,uBAAwB;EACtB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAG,IAAI;EACX,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,WAAW,EAAE,MAAM;EAEnB,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,MAAM;;AAIpB,iBAAkB;EAChB,QAAQ,EAAE,QAAQ;EAGlB,OAAO,EAAE,YAAY;EAErB,MAAM,EAAE,IAAI;EAEZ,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,MAAM;;AAGpB,yBAA0B;EACxB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;;AAGb,qBAAsB;EACpB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;EAChC,KAAK,EAAE,mBAAmB;EAC1B,WAAW,EAriBW,uBAAuB;EAsiB7C,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,IAAI;;AAGnB,2BAA4B;EAC1B,OAAO,EAAC,IAAI;EACZ,SAAS,EAAE,GAAG;EACd,SAAS,EAAE,MAAM;EACjB,eAAe,EAAE,aAAa;EAE9B,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,gBAAgB,EAAE,KAAK;EAEvB,+BAAI;IAEF,WAAW,EAxjBS,uBAAuB;IAyjB3C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,IAAI;IAEX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,MAAM;IAQlB,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,EAAE,IAAI;IARxB,oCAAK;MACH,OAAO,EAAE,KAAK;MACd,WAAW,EAAE,GAAG;MAChB,aAAa,EAAE,QAAQ;EAQ3B,0CAAe;IACb,kBAAkB,EAAE,WAAW;EAGjC;;wCAEY;IACV,MAAM,EAAE,OAAO;IACf,gBAAgB,EAAE,OAAO;;AAK7B,8BAA+B;EAC7B,kBAAkB,EA7jBK,OAAO;EA+jB9B,kBAAkB,EAAE,KAAK;EACzB,kBAAkB,EAjkBK,GAAG;;AAokB5B,sBAAuB;EACrB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,KAAK,EAAE,GAAG;EAEV,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO;EAEd,OAAO,EAAE,IAAI;;AAIf,4BAA6B;EAC3B,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;;AAGhB,+BAAgC;EAC9B,QAAQ,EAAE,QAAQ;EAElB,IAAI,EAAC,GAAG;EACR,GAAG,EAAC,GAAG;EACP,SAAS,EAAE,qBAAqB;EAEhC,WAAW,EAvnBW,uBAAuB;EAwnB7C,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;EAEhB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EAGf,OAAO,EAAC,EAAE;EAEV,KAAK,EAlmBgB,OAAgB;EAmmBrC,gBAAgB,EAAE,KAAK;EAEvB,OAAO,EAAE,GAAG;;AAGd;;sCAEwC;EACtC,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,KAAK;EACZ,gBAAgB,EA7mBK,OAAgB;;AAgnBvC,mBAAoB;EAClB,WAAW,EAhpBW,uBAAuB;EAipB7C,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,MAAM;EAElB,yBAAK;IACH,MAAM,EAAE,IAAI;;AAIhB,sBAAuB;EACrB,WAAW,EA3pBW,uBAAuB;EA4pB7C,SAAS,EAAE,GAAG;EACd,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,MAAM;;AAGpB,qBAAsB;EACpB,cAAc,EAAC,IAAI;EACnB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,SAAS,EAAE,qBAAqB;EAChC,OAAO,EAAE,IAAI;EACb,KAAK,EAnqBuB,OAAO;;AAsqBrC,sBAAuB;EAErB,OAAO,EAAE,IAAI;EAEb,cAAc,EAAE,IAAI;EAEpB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EACR,MAAM,EAAC,IAAI;EAEX,OAAO,EAAC,KAAK;EAEb,gBAAgB,EA3pBQ,wBAAwB;;AA+pBlD,sBAAuB;EACrB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,CAAC;EACR,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,MAAM;EAElB,wBAAE;IACA,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;IACR,aAAa,EAAE,GAAG;IAClB,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;EAGb;;iCAEU;IACR,KAAK,EAAE,OAAmB;;AAM9B,qBAAsB;EACpB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,4BAAO;IACL,QAAQ,EAAE,QAAQ;;AAMtB,yBAA0B;EAExB,gBAAgB,EAAE,KAAK;EACvB,yBAAyB,EAAE,GAAG;EAC9B,0BAA0B,EAAE,GAAG;EAE/B,6BAAI;IACF,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,WAAW,EAAE,GAAG;IAChB,cAAc,EAAE,GAAG;IACnB,gBAAgB,EAAE,KAAK;IAEvB,+BAAE;MACA,aAAa,EAAE,GAAG;EAKtB;;sCAEY;IACV,MAAM,EAAE,OAAO;IACf,gBAAgB,EAAE,OAAkB;EAGtC,2BAAE;IACA,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,IAAI;;AAKzB,0BAA2B;EACzB,gBAAgB,EAAE,OAAO;EACzB,gBAAgB,EAAE,KAAK;EACvB,gBAAgB,EAAE,IAAI;;AAGxB,wBAAyB;EACvB,YAAY,EAAE,GAAG;EACjB,WAAW,EAAE,GAAG;;AAGlB,qBAAsB;EAEpB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,CAAC;EACP,GAAG,EAAE,CAAC;EAEN,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,OAAO,EAAE,GAAG;EACZ,gBAAgB,EA9vBQ,wBAAwB;;AAkwBlD,8BAA+B;EAE7B,MAAM,EAAE,OAAO;EAEf,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,IAAI;EAEX,WAAW,EAAE,GAAG;EAEhB,MAAM,EAAE,IAAI;EAEZ,UAAU,EAAE,UAAU;EAEtB,SAAS,EAAE,MAAM;EAEjB,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAClB,uBAAuB,EAAE,GAAG;EAC5B,0BAA0B,EAAE,GAAG;EAE/B,OAAO,EAAE,GAAG;EAEZ,gBAAgB,EAAE,OAAO;;AAI3B;;qCAEsC;EAEpC,YAAY,EAAE,OAAO;EACrB,gBAAgB,EAAE,OAAO;;AAK3B,gBAAiB;EAEf,QAAQ,EAAE,QAAQ;EAElB,IAAI,EAAE,GAAG;EACT,GAAG,EAAE,GAAG;EAER,KAAK,EAAE,IAAI;EACX,MAAM,EAAC,IAAI;EACX,SAAS,EAAE,KAAK;EAEhB,YAAY,EAAE,GAAG;EACjB,aAAa,EAAE,GAAG;EAElB,WAAW,EAAE,MAAM;EACnB,QAAQ,EAAE,MAAM;EAChB,aAAa,EAAE,QAAQ;EAEvB,WAAW,EAx1BW,uBAAuB;EAy1B7C,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAEhB,UAAU,EAAE,MAAM;EAElB,WAAW,EAAE,IAAI;EACjB,gBAAgB,EAAE,IAAI;EACtB,mBAAmB,EAAE,IAAI;EAEzB,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAElB,gBAAgB,EAAE,KAAK;EAEvB,OAAO,EAAE,GAAG;EAEZ,MAAM,EAAE,OAAO;;AAGjB;;uBAEyB;EACvB,gBAAgB,EAAE,mBAAmB;;AAIvC,wBAAyB;EACvB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,CAAC;EACR,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,gBAAgB,EAAE,KAAK;EAEvB,4BAAI;IACF,QAAQ,EAAC,QAAQ;IACjB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,GAAG;IACT,KAAK,EAAC,GAAG;IAET,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,OAAO;IAErB,sBAAsB,EAAE,GAAG;IAC3B,uBAAuB,EAAE,GAAG;IAE5B,yBAAyB,EAAE,GAAG;IAC9B,0BAA0B,EAAE,GAAG;IAE/B,gBAAgB,EAAE,KAAK;EAGzB;;qCAEW;IACT,MAAM,EAAE,OAAO;IACf,gBAAgB,EAAE,OAAO;;AAM7B,yBAA0B;EACxB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EAET,6BAAI;IACF,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,IAAI;IACV,WAAW,EAl6BS,uBAAuB;IAm6B3C,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,yBAAyB;IAC3C,OAAO,EAAE,EAAE;;AAKf,iBAAkB;EAEhB,cAAc,EAAC,IAAI;EAEnB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,GAAG;EACT,KAAK,EAAE,GAAG;EAEV,OAAO,EAAE,CAAC;EAEV,OAAO,EAAE,IAAI;EAEb,WAAW,EAAE,IAAI;EACjB,gBAAgB,EAAE,IAAI;EACtB,mBAAmB,EAAE,IAAI;EAEzB,iBAAiB,EAAE,MAAM;EACzB,iBAAiB,EAAE,IAAI;EACvB,kBAAkB,EAAE,MAAM;EAC1B,kBAAkB,EAAE,IAAI;;AAI1B,sBAAuB;EACrB,gBAAgB,EAAE,WAAa;EAC/B,iBAAiB,EAAE,yBAAyB;EAC5C,kBAAkB,EAAE,yBAAyB;;AAG/C,sBAAuB;EAErB,IAAI,EAAE,GAAG;EACT,KAAK,EAAE,GAAG;EAEV,gBAAgB,EAAE,WAAa;EAC/B,iBAAiB,EAAE,yBAAyB;EAC5C,kBAAkB,EAAE,WAAa;EAEjC,gDAAgD;EAChD,qCAAqC;EACrC,sCAAsC;;AAGxC,0BAA2B;EACzB,cAAc,EAAE,IAAI;EACpB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,GAAG;EACT,KAAK,EAAE,GAAG;EAEV,OAAO,EAAE,CAAC;EAEV,iBAAiB,EAAE,MAAM;EACzB,iBAAiB,EAAE,IAAI;EACvB,iBAAiB,EAAE,yBAAyB;EAE5C,OAAO,EAAE,IAAI;EAEb,WAAW,EAAE,IAAI;EACjB,gBAAgB,EAAE,IAAI;EACtB,mBAAmB,EAAE,IAAI;;AAG3B,cAAe;EACb,MAAM,EAAE,OAAO;EACf,gBAAgB,EAAE,KAAK;;AAGzB,aAAc;EACZ,KAAK,EAAE,IAAI;;AAGb;;oBAEsB;EAEpB,MAAM,EAAE,OAAO;EAEf,YAAY,EAAE,GAAG;EACjB,aAAa,EAAE,GAAG;EAElB,KAAK,EAAE,KAAK;EAEZ,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAElB,gBAAgB,EAAE,OAAO;;AAK3B,kBAAmB;EAEjB,QAAQ,EAAC,KAAK;EACd,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EAET,KAAK,EAAC,IAAI;EACV,MAAM,EAAC,IAAI;EAEX,UAAU,EAAE,IAAI;EAAE,+CAA+C;EACjE,WAAW,EAAE,KAAK;EAAE,8CAA8C;EAElE,gBAAgB,EAAE,KAAK;EAEvB,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAElB,WAAW,EA9hCW,uBAAuB;EA+hC7C,SAAS,EAAE,MAAM;EACjB,WAAW,EAAE,GAAG;EAChB,KAAK,EAAE,IAAI;EAEX,kCAAgB;IACd,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IAEZ,mBAAmB,EAAE,OAAO;IAC5B,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,KAAK;IAEvB,oCAAE;MACA,SAAS,EAAE,IAAI;IAGjB,gDAAc;MACZ,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,CAAC;MACN,IAAI,EAAE,CAAC;MACP,OAAO,EAAE,GAAG;MACZ,KAAK,EAAE,GAAG;IAGZ,+CAAa;MACX,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,CAAC;MACN,KAAK,EAAE,CAAC;MACR,OAAO,EAAE,GAAG;MACZ,MAAM,EAAE,OAAO;MACf,KAAK,EAAE,IAAI;IAGb;;0DAEqB;MACnB,KAAK,EAAE,OAAmB;EAK9B,iCAAe;IACb,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,GAAG;IACnB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,gBAAgB,EAAE,KAAK;;AAK3B,aAAc;EACZ,WAAW,EAAE,MAAM;EACnB,QAAQ,EAAE,MAAM;EAChB,aAAa,EAAE,QAAQ;;AAIzB,6BAA8B;EAE5B,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAC,CAAC;EAEN,KAAK,EAAC,KAAK;EACX,MAAM,EAAC,KAAK;EAEZ,WAAW,EA5mCW,uBAAuB;EA6mC7C,SAAS,EAAE,MAAM;EACjB,WAAW,EAAE,GAAG;EAEhB,YAAY,EA9kCG,OAAO;EA+kCtB,aAAa,EAAE,GAAG;EAClB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAElB,OAAO,EAAE,IAAI;EAEb,gBAAgB,EAAE,KAAK;EAEvB,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,MAAM;EACjB,SAAS,EAAE,MAAM;EACjB,eAAe,EAAE,UAAU;EAC3B,WAAW,EAAE,MAAM;EAGnB,wDAA2B;IACzB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IAEZ,MAAM,EAAE,IAAI;IAEZ,YAAY,EAAE,OAAkB;IAChC,sBAAsB,EAAE,GAAG;IAC3B,uBAAuB,EAAE,GAAG;IAC5B,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,IAAI;IAElB,gBAAgB,EAAE,OAAkB;IAEpC,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,QAAQ;IACzB,WAAW,EAAE,MAAM;IAGnB,4DAAI;MACF,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,IAAI;MACX,YAAY,EAAE,GAAG;MAEjB,UAAU,EAAE,MAAM;MAClB,WAAW,EAAE,IAAI;MAEjB,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,MAAM;IAGnB,kEAAU;MACR,MAAM,EAAE,OAAO;EAMnB,2DAA8B;IAC5B,UAAU,EAAE,GAAG;IAEf,KAAK,EAAE,GAAG;IAGV,KAAK,EA3oCa,OAAO;IA6oCzB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,GAAG;IAEjB,gBAAgB,EAAE,KAAK;EAIzB,6DAAgC;IAC9B,UAAU,EAAE,GAAG;IAEf,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,IAAI;IAEZ,KAAK,EA3pCa,OAAO;IA6pCzB,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,GAAG;IAEjB,gBAAgB,EAAE,KAAK;IAEvB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,UAAU;IAC3B,WAAW,EAAE,MAAM;IAEnB,iEAAI;MACF,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,IAAI;MAEZ,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,KAAK;MACjB,aAAa,EAAE,GAAG;MAElB,gBAAgB,EAAE,KAAK;IA5qC3B,mEAAM;MACJ,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,IAAI;MAEX,YAAY,EAAE,GAAG;MAEjB,WAAW,EA9CS,uBAAuB;MA+C3C,WAAW,EAAE,GAAG;MAChB,KAAK,EAba,OAAO;MAczB,UAAU,EAAE,IAAI;MAEhB,OAAO,EAAE,IAAI;MAEb,YAAY,EAAE,KAAK;MACnB,YAAY,EAAE,IAAI;MAClB,YAAY,EArBC,OAAO;MAuBpB,gBAAgB,EAAE,KAAK;IA8pCvB,mEAAM;MACJ,KAAK,EAAE,GAAG;MACV,SAAS,EAAE,IAAI;EAMnB,uDAA0B;IACxB,UAAU,EAAE,GAAG;IAEf,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,IAAI;IAEZ,KAAK,EAlsCa,OAAO;IAosCzB,WAAW,EAAE,IAAI;IAEjB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,MAAM;IAtsCrB,6DAAM;MACJ,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,IAAI;MACZ,KAAK,EAAE,IAAI;MAEX,YAAY,EAAE,GAAG;MAEjB,WAAW,EA9CS,uBAAuB;MA+C3C,WAAW,EAAE,GAAG;MAChB,KAAK,EAba,OAAO;MAczB,UAAU,EAAE,IAAI;MAEhB,OAAO,EAAE,IAAI;MAEb,YAAY,EAAE,KAAK;MACnB,YAAY,EAAE,IAAI;MAClB,YAAY,EArBC,OAAO;MAuBpB,gBAAgB,EAAE,KAAK;IAurCvB,6DAAM;MACJ,SAAS,EAAE,IAAI;EAMnB,2DAA8B;IAE5B,KAAK,EAAE,IAAI;IACX,MAAM,EA/uCU,IAAI;IAivCpB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,MAAM;IAEnB,+DAAI;MACF,UAAU,EAAE,IAAI;MAEhB,KAAK,EAAE,KAAK;MACZ,WAAW,EAtwCO,uBAAuB;MAuwCzC,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAEhB,KAAK,EAhwCQ,IAAI;MAiwCjB,MAAM,EAhwCQ,IAAI;MAkwClB,WAAW,EAlwCG,IAAI;MAmwClB,UAAU,EAAE,MAAM;MAElB,YAAY,EAAE,WAAW;MACzB,YAAY,EAAE,KAAK;MACnB,YAAY,EAAE,IAAI;MAClB,aAAa,EAtwCQ,GAAG;IA0wC1B,2EAAgB;MACd,WAAW,EAAE,IAAI;MACjB,YAAY,EAAE,CAAC;MACf,gBAAgB,EA3wCA,OAAO;IA8wCzB,0EAAe;MACb,WAAW,EAAE,CAAC;MACd,YAAY,EAAE,IAAI;MAClB,gBAAgB,EA9wCI,OAAO;IAixC7B,iFAAsB;MACpB,MAAM,EAAE,OAAO;MACf,gBAAgB,EArxCM,OAAO;IAwxC/B,gFAAqB;MACnB,MAAM,EAAE,OAAO;MACf,gBAAgB,EAvxCU,OAAO;EA6xCrC,oDAAuB;IAErB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IAEZ,UAAU,EAAE,IAAI;IAEhB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,MAAM;IAEnB,wDAAI;MACF,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MAEZ,WAAW,EAAE,IAAI;MACjB,UAAU,EAAE,MAAM;MAClB,KAAK,EAAE,KAAK;MACZ,WAAW,EAp0CO,uBAAuB;MAq0CzC,SAAS,EAAE,MAAM;MACjB,WAAW,EAAE,GAAG;MAEhB,YAAY,EAAE,KAAK;MACnB,YAAY,EAAE,KAAK;MACnB,YAAY,EAAE,IAAI;MAClB,aAAa,EAAE,GAAG;MAClB,gBAAgB,EAAE,OAAO;IAG3B,8DAAU;MACR,MAAM,EAAE,OAAO;MACf,gBAAgB,EAAE,OAAO;;AAQ/B,YAAa;EAEX,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EAEP,SAAS,EAAE,KAAK;EAEhB,OAAO,EAAE,IAAI;EAEb,WAAW,EAn2CW,uBAAuB;EAo2C7C,SAAS,EAAE,KAAK;EAChB,WAAW,EAAE,GAAG;EAChB,KAAK,EAAE,IAAI;EAEX,UAAU,EAAE,KAAK;EAEjB,aAAa,EAAE,GAAG;EAClB,YAAY,EAz0CG,OAAO;EA00CtB,YAAY,EAAE,KAAK;EACnB,YAAY,EAAE,IAAI;EAElB,OAAO,EAAE,IAAI;;AAGf,mBAAoB;EAElB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EAEP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,sBAAsB,EAAE,GAAG;EAC3B,uBAAuB,EAAE,GAAG;EAC5B,mBAAmB,EA31CJ,OAAO;EA41CtB,mBAAmB,EAAE,KAAK;EAC1B,mBAAmB,EAAE,IAAI;EAEzB,gBAAgB,EAAE,IAAI;EAEtB,uBAAI;IAEF,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IAEV,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IAEX,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,IAAI;IAEf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;EAIpB,6BAAU;IACR,KAAK,EAAE,KAAK;;AAKhB,gCAAiC;EAC/B,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,IAAI;;AAGlB,uBAAwB;EACtB,MAAM,EAAE,OAAO;EACf,SAAS,EAAE,IAAI;EACf,WAAW,EAAC,MAAM;EAClB,SAAS,EAAE,KAAK;;AAGlB,iBAAkB;EAChB,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,IAAI;;AAGb,kBAAmB;EACjB,YAAY,EAAE,GAAG;EACjB,QAAQ,EAAE,MAAM;EAChB,WAAW,EAAC,MAAM;EAClB,aAAa,EAAC,QAAQ;EACtB,SAAS,EAAC,KAAK;EACf,OAAO,EAAC,YAAY;;AAGtB,sBAAuB;EACrB,KAAK,EAAE,OAAO;EACd,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,GAAG;EAChB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;;AAGd,oBAAqB;EACnB,KAAK,EAAE,sBAAsB;;AAG/B,aAAc;EACZ,MAAM,EAAE,qBAAqB;EAC7B,OAAO,EAAE,KAAK;EAEd,sBAAS;IACP,MAAM,EAAE,CAAC;;AAIb,cAAe;EACb,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,CAAC;EACZ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,KAAK", +"sources": ["_igv-colorpicker.scss","_igv-generic-container.scss","igv.scss"], +"names": [], +"file": "igv.css" +} \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.png b/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.png new file mode 100644 index 00000000000..2f0b5550fb5 Binary files /dev/null and b/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.png differ diff --git a/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.svg b/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.svg new file mode 100644 index 00000000000..4bc36909ea0 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/img/cursor_logo.svg @@ -0,0 +1,21 @@ + + + + dugla_cursor_logo 2 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/img/igv-logo.svg b/config/plugins/visualizations/mvpapp/static/css/img/igv-logo.svg new file mode 100644 index 00000000000..2c325c3a76e --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/img/igv-logo.svg @@ -0,0 +1,14 @@ + + + + IGV + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/jquery-ui.min.css b/config/plugins/visualizations/mvpapp/static/css/jquery-ui.min.css new file mode 100755 index 00000000000..efccc47678c --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.11.4 - 2015-03-11 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/lorikeet.css b/config/plugins/visualizations/mvpapp/static/css/lorikeet.css new file mode 100644 index 00000000000..bd1478a3d7d --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/lorikeet.css @@ -0,0 +1,153 @@ +/*$LastChangedDate$*/ +/*$LastChangedBy$*/ +/*$LastChangedRevision$*/ + +@media print { + .noprint { + display:none; + } +} + +div.lorikeet { + width:100%; + background-color: #FFFFFF; + color: #000000; + font-family: "Trebuchet MS",Arial,sans-serif; + font-size: 10pt; + font-style: normal; + margin: 0; + padding: 0; +} + +div.lorikeet div.bar { + background-color:#F5F5DC; + color:black; +} +div.lorikeet td { + background-color:#FFFFEF; + border:1px solid black; + padding: 5px; +} + +div.lorikeet td.optionCell { + background-color: white; + border: 1px dotted #666666; + padding: 5px; + margin:5px; +} + +div.lorikeet .link { + text-decoration: underline; + cursor:pointer; + color:sienna; +} +div.lorikeet .font_small { + font-size: 8pt; +} +div.lorikeet .zoom_out_link { + background-image: url('../images/lorikeet/zoom_out.png'); + background-repeat: no-repeat; + width:20px; + height:20px; + cursor:pointer; +} +div.lorikeet .zoom_in_link { + background-image: url('../images/lorikeet/zoom_in.png'); + background-repeat: no-repeat; + width:20px; + height:20px; + cursor:pointer; +} + + +/* THE FOLLOWING STYLES ARE FOR THE TABLE DISPLAYING THE SEQUENCE AND FRAGMENT ION MASS */ +div.lorikeet .ionTable { + border-collapse:collapse; + border-color:#DDDDDD; +} +div.lorikeet .ionTable th { + background-color:#BDB76B; + border: 1px solid #666666; +} +div.lorikeet .ionTable td { + border: 1px solid #666666; + text-align: center; + background-color:#FFFFFF; + font-size: 8pt; +} + +/* style for a cell containing a residue from the sequence */ +div.lorikeet .ionTable td.seq { + font-weight: bold; + background-color:#BDB76B; +} + +/* style for cell containing a modified residue */ +div.lorikeet .ionTable td.modified{ + background-color:gold; +} + +/* style for cell containing the fragment indices */ +div.lorikeet .ionTable td.numCell { + background-color:#F5F5DC; + color:#777777; +} + + +/* style for cell containing a fragment m/z that matches a peak in the scan */ +div.lorikeet .ionTable td.matchIon { + font-weight:bold; + opacity:0.8; + filter: alpha(opacity=80); /*For IE*/ + -moz-opacity:0.8; /*Old Mozilla browsers*/ + color:white; +} + + +/* THE FOLLOWING STYLES ARE FOR THE TABLE DISPLAYING VARIABLE MODIFICATIONS */ +div.lorikeet .varModsTable { + border-collapse:collapse; +} + +div.lorikeet .varModsTable td { + border: 0px; + text-align: left; + font-size: 10pt; + padding: 1px 5px 1px 0px; +} + +/* + * THE FOLLOWING STYLES ARE FOR THE SLIDERS CONTROLLING THE PLOT SIZE + */ + +/* + * jQuery UI Slider @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.0em; height: 0.9em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;} + +.ui-slider-horizontal { height: .3em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; } +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; +background-image: url('../images/lorikeet/slider_handle.png'); +background-repeat: no-repeat; +font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } + +/* Component containers +----------------------------------*/ +.ui-widget { } +.ui-widget .ui-widget { } +.ui-widget-content { border: 1px solid #888888/*{borderColorContent}*/; background: #CFCFCF/*{bgColorContent}*/ ; color: #111111/*{fcContent}*/; } +.ui-widget-content a { color: #000000/*{fcContent}*/; } \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/css/msi.css b/config/plugins/visualizations/mvpapp/static/css/msi.css new file mode 100644 index 00000000000..5e2e28c858e --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/css/msi.css @@ -0,0 +1,442 @@ +body { + padding-top: 70px; +} +.navbar-fixed-top { + background-color: #9e9f9f; +} + +.vertical-align { + display: flex; + align-items: center; +} + +.row{ + margin-top: 10px; + margin-bottom: 15px; +} + +.msi_button { + margin-bottom: 10px; +} + +.ui-widget-content { + background: none; + border: none; +} + +.ui-widget-header { + background: rgba(255, 255, 255, 0); + border: 1px solid rgba(195, 219, 255, 0); +} + +.score-filter { + border: 1px solid #DDD; +} + +.brush .extent { + fill-opacity: .125; + shape-rendering: crispEdges; +} + +#galaxy_save { + background-color: #9e9f9f; + color: #337ab7; +} + +.galaxy_file { + padding: 10px 10px 10px 10px; + background-color: #bbbbbb; +} + +.selected_file { + background-color: #4cae4c; +} + +svg { + font: 10px sans-serif; +} + +.resize path { + fill: #666; + fill-opacity: .8; + stroke: #000; + stroke-width: 1.5px; +} + +path { + fill: currentColor; + stroke: steelblue; + stroke-width: 1.5px; +} + +.axis path, +.axis line { + fill: none; + stroke: #000; + shape-rendering: crispEdges; +} + +.low_score { + color: darkblue; +} +.high_score { + color: red; +} + +.score-svg-component { + background: rgba(195, 219, 255, 0.31); +} + +.glyphicon-ok-circle { + color: green; +} + +.glyphicon-ok { + color: green; +} + +.pep_seq { + font-family: "Courier New", Courier, monospace; + font-size: large; + font-weight: bold; +} + +.pep_seq_selected { + background: rgba(70, 130, 180, 0.62); +} + +#selectable .ui-selecting { background: rgba(70, 130, 180, 0.62); } +#selectable .ui-selected { background: darkblue; color: white; } + +.well { + background-color: #DDDDDD; + border: 1px solid #DDDDDD; +} + +.btn-group { + padding-bottom: 15px; +} + +.p_accession { + background-color: rgba(128, 128, 128, 0.04); +} + +.prot-sequence { + color: rgba(14, 92, 173, 0.5); + max-height: 300px; + overflow-y: scroll; + overflow-x: scroll; +} + +.pep-cov { + color: rgb(14, 92, 173); +} + +.pep-cov-hide { + color: transparent; +} + +.inv { + color: transparent; +} + +#mod_banner { + font-weight: 200; + overflow-y: scroll; + margin-bottom: 20px +} + +.baseMod { + cursor: help; + color: rgb(10, 173, 63); + font-size: larger; + text-shadow: 0 1px 0 #ccc, + 0 2px 0 #c9c9c9, + 0 3px 0 #bbb, + 0 4px 0 #b9b9b9, + 0 5px 0 #aaa, + 0 6px 1px rgba(0,0,0,.1), + 0 0 5px rgba(0,0,0,.1), + 0 1px 3px rgba(0,0,0,.3), + 0 3px 5px rgba(0,0,0,.2), + 0 5px 10px rgba(0,0,0,.25), + 0 10px 10px rgba(0,0,0,.2), + 0 20px 20px rgba(0,0,0,.15); +} + +.file_picker { + cursor: pointer; + padding: 2em; +} + +.fdr_score { + display: block; + width: 400px; + padding: 10px; + cursor: pointer; + background-color: #337ab7; +} + +.fdr_pct_value { + display: block; + padding: 5px; + cursor: pointer; +} + +.detail_table_title { + cursor: pointer; + padding: 5px; +} + +.scan-mark { + padding: 10px; +} + +.u-config { + cursor: pointer; +} +.config-true { + color: green; +} + +.config-false { + color: red; +} + +.mod-require { + cursor: pointer; +} + +td.details-control { + width: 20px; + background: url('../images/details_open.png') no-repeat center center; + cursor: pointer; +} +tr.shown td.details-control { + background: url('../images/details_close.png') no-repeat center center; +} + +.app_nav_btn { + background-color: transparent; + color: #337ab7; +} + +.igv_track_div { + padding: 10px; +} + +.igv_load_track { + background-color: gainsboro; +} + +.fv-protein { + cursor: pointer; +} + +.fv-protein:hover { + color: #337ab7; +} + +.fv-seq { + font-size: 1.25em; +} + +.fv-entry { + background-color: gainsboro; + margin: 5px; +} + +.filter-entry { + padding: 5px 5px 5px 5px; + cursor: pointer; +} + +.filter-entry-selected { + background-color: #1b6d85; +} + +/** +Amino Acid Color Triple Amino Acid Color Triple +ASP,GLU bright red [230,10,10] CYS,MET yellow [230,230,0] +LYS,ARG blue [20,90,255] SER,THR orange [250,150,0] +PHE,TYR mid blue [50,50,170] ASN,GLN cyan [0,220,220] +GLY light grey [235,235,235] LEU,VAL,ILE green [15,130,15] +ALA dark grey [200,200,200] TRP pink [180,90,180] +HIS pale blue [130,130,210] PRO flesh [220,150,130] +*/ + +.amino_acid { + fill: #feedde; + stroke: gray; + stroke-width: 1px; +} + +.reference_mismatch { + fill: #9c3e0d; + stroke: #9c3e0d; + stroke-width: 5px; +} + +.align_match { + stroke: gray; + stroke-width: 1px; +} + +.ctx { + fill: #feedde; + stroke: gray; + stroke-width: 1px; +} + +.asp, .glu { + fill: rgb(230, 10, 10); +} + +.lys, .arg { + fill: rgb(20, 90, 255); +} + +.phe, .tyr { + fill: rgb(50, 50, 170); +} + +.gly { + fill: rgb(235, 235, 235); +} + +.ala { + fill: rgb(200, 200, 200); +} + +.his { + fill: rgb(130, 130, 210); +} + +.cys, .met { + fill: rgb(230, 230, 0); +} + +.ser, .thr { + fill: rgb(250, 150, 0); +} + +.asn, .gln { + fill: rgb(0, 220, 220); +} + +.leu, .val, .ile { + fill: rgb(15, 130, 15); +} + +.trp { + fill: rgb(180, 90, 180); +} + +.pro { + fill: rgb(220, 150, 130); +} + +.aa_residue { + text-shadow: 1px 1px 2px white; + font-family: monospace; + font-size: 18px; + fill: black; +} + +.txt_pep { + font-family: monospace; + font-size: 18px; + fill: black; +} + +.offset { + font-family: monospace; + font-size: 10px; + fill: black; +} + + + +.psm { + fill: #fd8d3c; + stroke: gray; +} + +.ctx_psm { + fill: #fd8d3c; +} + +.ctx_peptide { + fill: #fdbe85; +} + +.peptide { + fill: #fdbe85; + stroke: gray; +} + +.locator { + stroke-width: 100%; + stroke: #333333; + opacity: 0.2; +} + +.genome_line { + stroke: gray; + stroke-width: 1; + cursor: pointer; +} + +.genome_dummy { + stroke-width: 40px; + stroke: #a8a8a8; + stroke-dasharray: 1,1; +} + +.ptm { + fill: #E5E7E9; +} + +text.ptm { + fill: #6E2C00; + text-shadow: 2px 2px 3px #AEB6BF; +} + +text.itraq4plex { + fill: #884EA0; + text-shadow: 2px 2px 3px #AEB6BF; +} + +text.oxidation { + fill: #2471A3; + text-shadow: 2px 2px 3px #AEB6BF; +} + +.mismatch { + fill: #018571; +} + +.score_line { + fill: none; + stroke: steelblue; + opacity: 0.5; + stroke-width: 4px; + cursor: pointer; +} + +.decoy_score_pct { + fill: steelblue; + opacity: 0.5; + stroke: gray; + cursor:pointer; +} + +.tooltip { + background: steelblue; + color: white; +} + +.tooltip-inner { + background: steelblue; + color:white; +} diff --git a/config/plugins/visualizations/mvpapp/static/js/application.js b/config/plugins/visualizations/mvpapp/static/js/application.js new file mode 100644 index 00000000000..16b9f1b4fbc --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/js/application.js @@ -0,0 +1,3980 @@ + +/** + * Handles modification provisioning. + * Uses chained Promises to efficiently generate all modifications in memory. + */ +var PeptideModifications = (function(pm){ + + //[iTRAQ4plex]RTLNISHNLH{S:Phospho}LLPEVSPM{K:iTRAQ4plex}NR + //Returns an html formatted sequence including modifications for a list of peptide ids found in pepIDs + pm.htmlFormatSequences = function (objs) { //pepIDs + objs.data.forEach(function(cv){ + let s = undefined; + if (cv['"Sequence"']) { + s = cv['"Sequence"']; + } else { + s = cv['"PEPTIDE_ID"']; + } + + s = s.replace(/{([A-Z]):(.+?)}/g, '$1'); + s = s.replace(/\[(\S+?)\]/g, '•'); + + //For older versions + s = s.replace(/^([A-Z]){(.+?)}/g,'•$1'); + s = s.replace(/([A-Z]){(.+?)}/g, '$1'); + + //For the olders version + cv['"Sequence"'] = s; + }); + return objs; + }; + return pm; + +}(PeptideModifications || {}));// eslint-disable-line no-use-before-define + + +/** + * Handles score summary information. Scores are dynamic and can be quite numerous. + * + */ +var ScoreSummary = (function(sSum){ + + sSum.scoreSummary = {}; + sSum.rankedScores = null; + + //Generates list of scores ranked by pct of scores present. + sSum.getRankedScores = function() { + var scoreArray = []; + Object.keys(sSum.scoreSummary).forEach(function(cv){ + scoreArray.push([cv, sSum.scoreSummary[cv].pct_scores_present]); + }); + scoreArray.sort(function(a,b){ + return b[1] - a[1]; + }); + sSum.rankedScores = scoreArray; + sSum.publish('RankedScoresAvailable', sSum.rankedScores); + }; + + sSum.generateScores = function() { + var q = 'SELECT score_summary.* from score_summary'; + var url = sSum.href + '/api/datasets/' + + sSum.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + var self = this; + $.get(url + encodeURIComponent(q), function(data){ + var scoreNames; + data.data.forEach(function (cv, idx) { + var obj = {}; + if (idx === 0) { + scoreNames = cv; + } else { + for (var i = 0; i < scoreNames.length; i++) { + obj[scoreNames[i]] = cv[i]; + } + self.scoreSummary[cv[scoreNames.indexOf("score_name")]] = obj; + } + }); + sSum.publish("ScoreSummaryComplete", sSum.scoreSummary); + }); + }; + + sSum.init = function (confObj) { + sSum.href = confObj.href; + sSum.datasetID = confObj.datasetID; + sSum.generateScores(); + sSum.subscribe('RequestRankedScores', function(){ + if (sSum.rankedScores) { + sSum.publish('RankedScoresAvailable', sSum.rankedScores); + } else { + sSum.getRankedScores(); + } + }) + }; + + return sSum; +}(ScoreSummary || {}));// eslint-disable-line no-use-before-define + +/** + * Object for building AJAX server-side data providers to a datatable + * + * confObj.baseQuery is an object: + * An example: + * { + * SELECT: 'pe.Peptide_pkid, p.sequence, COUNT(DISTINCT(pe.DBSequence_pkid)) AS ProteinCount, COUNT(DISTINCT(pe.SpectrumIdentification_pkid)) AS SpectralCount', + * FROM: 'PeptideEvidence pe, Peptide p', + * WHERE: 'pe.Peptide_pkid = p.pkid', + * GROUPBY: 'pe.Peptide_pkid' + * } + * + * confObj.rowIDField indicates that the SQL field named should be the key to the + * data row. In gerneral this will be a id field. If present, the field will be marked + * as non-visible OPTIONAL + */ +function AjaxDataProvider(confObj) { // eslint-disable-line no-unused-vars + var self = this; + + this.baseQuery = confObj.baseQuery; + this.href = confObj.href; + this.historyID = confObj.historyID; + this.datasetID = confObj.datasetID; + this.rowIDField = confObj.rowIDField; + this.columnNames = confObj.columnNames; + this.searchColumn = confObj.searchColumn; + this.searchTable = confObj.searchTable; + this.tableDivID = confObj.tableDivID; + this.filtered = false; + this.customSQL = confObj.customSQL; + this.initCompleteCB = confObj.callBackFN || function(){}; + + this.scoreSummary = confObj.scoreSummary || false; + + this.sequenceFormatter = confObj.sequenceFormatter || null; + + this.url = this.href + '/api/datasets/' + + this.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + + this.recordsTotal = null; + this.recordsFiltered = null; + this.scoresByType = {}; + + //Need to get score datatypes from the SQLite table + (function(){ + var q = 'SELECT score_summary.score_name, score_summary.score_type FROM score_summary'; + var s = self; + $.get(self.url + encodeURIComponent(q), + function(data){ + data.data.forEach(function (cv) { + if (!(cv[1] in s.scoresByType)) { + s.scoresByType[cv[1]] = [] + } + s.scoresByType[cv[1]].push(cv[0]) + }); + }); + })(); + + this.buildInClause = function (searchStr) { + var rStr = ' AND ' + this.searchColumn + ' IN ('; + + rStr += searchStr + ')'; + + return rStr; + }; + + this.buildLikeClause = function (searchStr) { + let rx = RegExp(/(LIKE \"%[A-Z]*%\")/g); + let matches = searchStr.match(rx); + let rStr = ' AND '; + let colName = this.searchColumn; + + matches.forEach(function(m){ + rStr += colName + ' ' + m + ' OR '; + }); + rStr = rStr.slice(0, rStr.lastIndexOf(' OR ')); + return rStr; + }; + + //---------------------------------------------------------------- Functions + this.buildBaseQuery = function (searchReq) { + var rStr = null; + + if (this.customSQL) { + rStr = this.customSQL; + } else { + rStr = 'SELECT ' + this.baseQuery.SELECT + ' FROM ' + this.baseQuery.FROM; + rStr += this.baseQuery.WHERE ? ' WHERE ' + this.baseQuery.WHERE : ''; + } + + // Search value can be multiple values within a string. + if (searchReq.value) { + if (searchReq.value.indexOf("%") > -1) { + rStr += this.buildLikeClause(searchReq.value); + } else { + rStr += this.buildInClause(searchReq.value); + } + } + + if (!this.customSQL) { + rStr += this.baseQuery.GROUPBY ? ' GROUP BY ' + this.baseQuery.GROUPBY : ''; + } + + return rStr; + }; + + this.getTotalRecordCount = function (callParms, callbackFN, enclState) { + var sStr = this.buildBaseQuery(callParms.search); + var finalFn = this.queryData; + var parms = callParms; + var dFn = callbackFN; + var callingState = enclState; + $.get(this.url + encodeURIComponent('SELECT COUNT(*) FROM (' + sStr + ')'), function (data) { + callingState.recordsTotal = data.data[1][0]; + callingState.recordsFiltered = callingState.recordsTotal; + finalFn(parms, dFn, callingState); + }); + }.bind(this); + + this.getFilteredRecordCount = function (callParms, callbackFN, enclState) { + var sStr = this.buildBaseQuery(callParms.search); + sStr = 'SELECT COUNT(*) FROM (' + sStr + ')'; + var nextFN = this.queryData; + var parms = callParms; + var destFN = callbackFN; + var callingState = enclState; + $.get(this.url + encodeURIComponent(sStr), function (data) { + callingState.recordsFiltered = data.data[1][0]; + nextFN(parms, destFN, callingState); + }); + }; + + //Returns column definitions for the datatable. + this.getColumnNames = function () { + var rValue = this.columnNames; + + if (this.rowIDField) { + rValue.forEach(function (cv) { + if (cv.title === this.rowIDField) { + cv.visible = false; + } + }.bind(this)); + } + return rValue; + }; + + // Helper function for odering based on table request. + // {column: 2, dir: "DESC"} + this.orderFunction = function (orderArray) { + var orderStr = ''; + + orderArray.forEach(function (cv) { + var isCast = false; + var orderColName = this.columnNames[cv.column].title; + this.scoresByType.REAL.forEach(function(t){ + if (orderColName === t) { + isCast = true; + } + }); + if (isCast) { + orderStr += ' ORDER BY CAST(' + this.columnNames[cv.column].data + ' AS REAL) ' + + cv.dir + ' '; + } else { + orderStr += ' ORDER BY ' + this.columnNames[cv.column].data + ' ' + + cv.dir + ' '; + } + + }.bind(this)); + + return orderStr; + }; + + this.queryData = function (callParms, callbackFN, enclState) { + var self = enclState; + var sqlStatement = self.buildBaseQuery(callParms.search); + var requestParms = callParms; + var rowField = self.rowIDField; + var formatFunc = self.sequenceFormatter; + + var isNumber = function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + }; + + // Ordering per callParms + sqlStatement += self.orderFunction(requestParms.order); + + //Add limit and offset + sqlStatement += ' LIMIT ' + requestParms.length + ' OFFSET ' + requestParms.start; + + $.get(self.url + encodeURIComponent(sqlStatement), function (data) { + var retParms = requestParms; + var retObj = {}; + var cNames = data.data[0]; + + retObj.draw = retParms.draw; + retObj.recordsTotal = this.recordsTotal; + retObj.recordsFiltered = this.recordsFiltered; + retObj.data = []; + + data.data.slice(1).forEach(function (cv) { + var obj = {}; + cv.forEach(function (d, idx) { + var escapedField = '"' + cNames[idx] + '"'; + if (isNumber(d)) + { + obj[escapedField] = Number.parseFloat(d); + } else { + obj[escapedField] = d; + } + + }); + if (rowField) { + obj.DT_RowId = obj['"' + rowField + '"']; + obj.DT_RowData = { + key: obj['"' + rowField + '"'], + fObj: obj + }; + } + retObj.orderable = true; + retObj.data.push(obj); + }); + if (formatFunc) { + retObj = formatFunc(retObj); + } + callbackFN(retObj); + }.bind(self)); + }; + + /** + * Called from the DataTable table. + * Need to state check: + * - Is this the first call or pagination call. If first, + * need to get the total DB count for the base query before + * running the base query. + * - Is this a call based on filter and its first filter call: + * Need to get DB count on base plus filter query, then + * run the filter query. + * - Is this a clear filter call, that is we are in a filtered state, but + * now the user has cleared the filter. + * - Ths filter call can never be the absolute first call. Table is rendered + * from the first call. + * + */ + this.provideData = function (callParms, callbackFN) { + + if (!this.recordsTotal) { + this.getTotalRecordCount(callParms, callbackFN, this); + } else if ((callParms.search.value.length > 0) && (!this.filtered)) { + // Table is asking for a filtered query. It is the first filtered request + this.filtered = true; + this.getFilteredRecordCount(callParms, callbackFN, this); + } else if ((callParms.search.value.length === 0) && (this.filtered)) { + // Table is resetting from filtering. + this.filtered = false; + this.recordsFiltered = this.recordsTotal; + this.queryData(callParms, callbackFN, this); + } else { + this.queryData(callParms, callbackFN, this); + } + }; + + this.fillDOM = function () { + var cbFn = this.initCompleteCB; + var options = { + scrollX: true, + dom: 'rtipl', + processing: true, + serverSide: true, + ajax: function (data, callbackFN) { + this.provideData(data, callbackFN); + }.bind(this), + columns: this.getColumnNames() + } + + $('#' + this.tableDivID).DataTable(options) + .on( 'init.dt', function () { + $('#progress-div').empty(); + cbFn(); + } ); + }; + + this.generateTable = function () { + // Do we need to get column names? + if (!this.columnNames) { + // Need to dynamically generate column names. + $.get(this.url + encodeURIComponent(this.buildBaseQuery({value: ""})) + ' LIMIT 0', + function (data) { + this.columnNames = []; + data.data[0].forEach(function (cn) { + var obj = {}; + obj.data = '"' + cn + '"'; // Some of the feeding applications use illegal characters in their column names. + obj.title = cn; + this.columnNames.push(obj); + }.bind(this)); + this.fillDOM(); + }.bind(this)); + } else { + this.fillDOM(); + } + + }; + + // this.clearContents = function() { + // let dElem = $('#' + this.tableDivID); + // let dt = $(dElem.selector).DataTable(); + // dt.destroy(); + // dElem.empty(); + // this.columnNames = null; + // this.recordsTotal = null; + // this.recordsFiltered = null; + // this.filtered = false; + // this.customSQL = null; + // }; +} + + + +/** + * Module for handling GUI presentation and data filtering based on the protein FDR threshold used by the + * search application. + */ +var FDRPresentation = (function(fdr){ + + fdr.ignoreScores = ["theoretical mass","tic","score_name"]; + fdr.scoreName = null; + fdr.scoreValue = null; + fdr.softwareName = null; + fdr.softwareVersion = null; + fdr.fdrProtocolName = null; + fdr.fdrProtocolValue = null; + + //Use plotly.js for scatter plots + fdr.buildPlotlyPlots = function(){ + Object.keys(FDRPresentation.graphPackage).forEach(function(k, kIdx){ + //key is score name, eg: PeptideShaker PSM Score + + var passed = { + y: FDRPresentation.graphPackage[k].passed, + x: Array.from({length: FDRPresentation.graphPackage[k].passed.length}, (x,i) => i), + mode: 'markers', + type: 'scattergl', + name: 'Passed FDR Threshold', + hoverinfo: 'y' + }; + + var failed = { + y: FDRPresentation.graphPackage[k].failed, + x: Array.from({length: FDRPresentation.graphPackage[k].failed.length}, (x,i) => i), + mode: 'markers', + type: 'scattergl', + name: 'Failed FDR Threshold', + hoverinfo: 'y' + }; + var data = [passed, failed]; + var layout = { + title: k, + xaxis: { + title: 'PSM Index', + showticklabels: false + }, + height: 500 + }; + + var forClick = document.getElementById('panel_' + kIdx); + + Plotly.newPlot('panel_' + kIdx, data, layout); + + // forClick.on('plotly_click', function(data){ + // var filter_yval = 0; + // data.points.forEach(function(dp) { + // if (dp.y > filter_yval) { + // filter_yval = dp.y + // } + // }); + // document.getElementById('filter_' + kIdx).innerText = 'Filter data by ' + k + ' score value >= ' + filter_yval; + // var node = document.createElement("button"); + // node.innerText = 'Filter'; + // node.style = "margin: 5px;"; + // node.setAttribute('score_name', k); + // node.setAttribute('score_value', filter_yval); + // node.addEventListener('click', function(){ + // console.log('Filtering now.'); + // console.log('using score ' + this.getAttribute('score_name')); + // console.log('value of ' + this.getAttribute('score_value')); + // }) + // document.getElementById('filter_' + kIdx).appendChild(node); + // }) + + }); + }; + + //Get the actual scores for the discovered fields. + fdr.getScoreData = function(fieldNames){ + let qStr = 'SELECT PSM.passThreshold, '; + let baseURL = fdr.href + '/api/datasets/' + fdr.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + let url = baseURL; + + fieldNames.forEach(function(cv){ + qStr += 'PSM."' + cv + '",'; + }); + qStr = qStr.slice(0, qStr.lastIndexOf(',')); + qStr += ' FROM psm_entries PSM;'; + url += encodeURIComponent(qStr); + + $.get(url, function(data) { + var graphPackage = {}; + var fNames = data.data[0].slice(1); + data.data[0].slice(1).forEach(function (sn) { + graphPackage[sn] = {}; + graphPackage[sn].passed = []; + graphPackage[sn].failed = []; + }); + data.data.slice(1).forEach(function (cv) { + cv.slice(1).forEach(function (x, xidx) { + if (cv[0] === "true") { + graphPackage[fNames[xidx]].passed.push(x); + } else { + graphPackage[fNames[xidx]].failed.push(x); + } + }); + }); + fNames.forEach(function(y){ + graphPackage[y].passed.sort(function(a,b){return a-b;}); + graphPackage[y].failed.sort(function(a,b){return b-a;}); + }); + FDRPresentation.graphPackage = graphPackage; + + url = baseURL + encodeURIComponent("SELECT protein_detection_protocol.name,protein_detection_protocol.value, " + + " analysis_software.name, analysis_software.version " + + " FROM protein_detection_protocol, analysis_software"); + + $.get(url, function(data){ + FDRPresentation.fdrProtocolName = data.data[1][0]; + FDRPresentation.fdrProtocolValue = data.data[1][1]; + FDRPresentation.softwareName = data.data[1][2]; + FDRPresentation.softwareVersion = data.data[1][3]; + FDRPresentation.preparePlotlyPanel(); + FDRPresentation.buildPlotlyPlots(); + $('#' + FDRPresentation.divID).hide(); //Start hidden. + FDRPresentation.publish("FDRDataPrepared"); + }); + }); + + }; + + //Get REAL scores that have full coverage. These scores will be used in plots + fdr.getScores = function(){ + let qStr = 'SELECT score_summary.score_name FROM score_summary WHERE score_summary.pct_scores_present = 1 AND \n' + + 'score_summary.score_type = "REAL"'; + let url = fdr.href + '/api/datasets/' + fdr.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + url += encodeURIComponent(qStr); + + $.get(url, function(data){ + var graphScores = []; + data.data.slice(1).forEach(function(cv){ + if (FDRPresentation.ignoreScores.indexOf(cv[0]) === -1) { + graphScores.push(cv[0]); + } + }); + FDRPresentation.getScoreData(graphScores); + }); + + }; + + + //Builds GUI panel for Plotly plots + fdr.preparePlotlyPanel = function() { + let domStr = '
' + + '
' + + '

' + + '' + + 'ID Scores

' + + '
' + + '
##SOFTWARE_NAME## (##SOFTWARE_VERSION##) ##FDR_PROTOCOL_NAME## at ##FDR_PROTOCOL_VALUE##
' + + '##SCORE_DOM##' + + '
'; + + var sDom = ''; + Object.keys(FDRPresentation.graphPackage).forEach(function(k, kIdx){ + sDom += '
'; + sDom += '
'; + }); + + domStr = domStr.replace('##SCORE_DOM##', sDom); + domStr = domStr.replace('##SOFTWARE_NAME##', fdr.softwareName); + domStr = domStr.replace('##SOFTWARE_VERSION##', fdr.softwareVersion); + domStr = domStr.replace('##FDR_PROTOCOL_NAME##', fdr.fdrProtocolName); + domStr = domStr.replace('##FDR_PROTOCOL_VALUE##', fdr.fdrProtocolValue); + + $('#' + fdr.divID).append($.parseHTML(domStr)); + + }; + + fdr.init = function(confObj){ + fdr.href = confObj.href; + fdr.datasetID = confObj.datasetID; + fdr.divID = confObj.divID; + fdr.callBackFN = confObj.callBackFN; + fdr.getScores(); + }; + + return fdr; +}(FDRPresentation || {}));//eslint-disable-line no-use-before-define + + + +/** + * User can add tracks to IGV. These tracks are data entries in the current Galaxy history. + * This code manages interactions betweem user and Galaxy history. + */ +var IGVTrackManager = (function(itm){ + + itm.validTrackTypes = ['bed', 'gff', 'gff3', 'gtf', 'wig', 'bigWig', 'bedGraph', 'bam', 'vcf', 'seg']; + itm.trackGroups = {'bed': 'annotation', 'gff': 'annotation', 'gff3': 'annotation', 'gtf': 'annotation', + 'wig': 'wig', 'bigWig': 'wig', 'bedGraph': 'wig', 'bam': 'alignment', 'vcf': 'variant', 'seg': 'seg'}; + itm.galaxyTrackFiles = null; + + itm.queryGalaxyHistory = function() { + let url = itm.galaxyConfiguration.href + + '/api/histories/' + itm.galaxyConfiguration.historyID + '/contents/'; + + $.get(url, function(data){ + let files = []; + data.forEach(function(d){ + let obj = {}; + if (Object.keys(d).indexOf('extension') > -1 && d.visible) { + if (IGVTrackManager.validTrackTypes.indexOf(d.extension.toLowerCase()) > -1) { + obj.id = d.id; + obj.name = d.name; + obj.sourceType = d.extension; + obj.trackGroup = itm.trackGroups[d.extension.toLowerCase()]; + + if (d.extension.toLowerCase() === 'bam') { + obj.indexURL = itm.galaxyConfiguration.href + d.url + '/metadata_file?metadata_file=bam_index'; + } + + files.push(obj); + } + } + }); + itm.galaxyTrackFiles = files; + itm.publish("ValidTrackFilesAvailable", itm.galaxyTrackFiles); + }); + }; + + itm.init = function(confObj){ + + itm.galaxyConfiguration = confObj.galaxyConfiguration; + + itm.subscribe("NeedValidTrackFiles", function(){ + if (itm.galaxyTrackFiles) { + itm.publish("ValidTrackFilesAvailable", itm.galaxyTrackFiles); + } else { + itm.queryGalaxyHistory(); + } + }); + }; + + return itm; +}(IGVTrackManager || {}));//eslint-disable-line no-use-before-define + +const GenomeWarningText = { + 'text': '

IGV - Galaxy - Genomes

' + + '

The IGV viewer requires access to full genome sequences.

Galaxy can provide access to a genome sequences via the internal API. This allows for the use of custom reference sequences.

' + + '

In addition, IGV has a set of reference genomes that are available to all users of the IGV.js tool

' + + '

However, the genome associated with the mz.SQLite history entry is not working with the Galaxy API nor is it a standard IGV genome.

' + + '

Until this issue is resolved, you will not be able to see a reference sequence in the MVP viewer.

' +}; + +/** + * Module code for creating and managing the IGV.js browser. + * + * Galaxy history entry for the MZ.Sqlite _must_ have a valid DBKey assigned. + * @param confObj + * @constructor + */ +function IGVModule(confObj) { + + this.addTrackCB = confObj.addTrackCB; + this.igvDiv = confObj.igvDiv; + this.data = confObj.data; + if (confObj.genome) { + this.genome = confObj.genome; + } else { + this.genome = confObj.dbkey || "hg19"; //A default value // TODO: Really?? + } + + this.hidden = false; + if (confObj.fasta_file) { + this.fasta_file = confObj.fasta_file; + } + if (confObj.fasta_index) { + this.fasta_index = confObj.fasta_index; + } +} + +//Build all the custom UI surrounding the IGV browser. +IGVModule.prototype.fillChrome = function () { + const IGVOverviewHelp = { + 'text': '

Purpose

' + + '

The IGV panel is the Broad Institutes IGV viewer for web applications

' + + '

At the start, the IGV viewer is centered around the chromosome location you clicked on in the Peptide-Protein Viewer

' + + '

You can move about the entire genome from the IGV viewer. In addition you can load tracks based on data files' + + ' in your current Galaxy history (for instance: BAM, BED or GTF files).

' + + '

Note that you cannot change the underlying genome. The genome is set by your Galaxy history.

' + } + + let pStr = '
' + + '
Genome: ' + this.genome + '
' + + '
' + + '' + + '
' + + '
' + + '
' + + '
' + + '
'; + let self = this; + + $('#' + this.igvDiv).append($.parseHTML(pStr)); + + $('#add-track').on('click', function(){ + self.addTrackCB(); + }); + + $('#igv_overview_help').on('click', function() { + BuildHelpPanel.showHelp({ + 'helpText':IGVOverviewHelp.text, + 'title': 'IGV Overview Help' + }); + }); + + $('.kill-igv-browser').on('click', function () { + self.hidden = true; + $('#igvDiv').hide(); + }); + +}; + +IGVModule.prototype.loadTrack = function(o) { + igv.browser.loadTrack(o); +}; + +IGVModule.prototype.goToLocation = function (loc) { + if (this.hidden) { + $('#igvDiv').show(); + } + igv.browser.search(loc); +}; + +IGVModule.prototype.showBrowser = function () { + + let ref = {}; + // Are we working from a Galaxy genome or IGV reference? + if (this.fasta_file) { + ref['fastaURL'] = this.fasta_file; + ref['indexURL'] = this.fasta_index; + } else { + ref['genome'] = this.genome; + } + + let options = { + reference: ref, + locus: this.data.chrom + ":" + this.data.start + "-" + this.data.end + }; + this.fillChrome(); + igv.createBrowser(document.getElementById("browser-location"), options); +}; + +var IGVManager = (function (igm) { + let validTrackFiles = null; + + igm.goToLocation = function(strL) { + igm.browser.goToLocation(strL); + }; + + igm.showTrackModal = function(){ + let s = ''; + let trackList = ''; + + if (validTrackFiles.length == 0) { + $('#igvDiv').prepend(''); + $('#add-track').attr("disabled", "disabled"); + } else { + validTrackFiles.forEach(function(t){ + trackList += '
  • ' + t.name + ''; + }); + s = s.replace('##TRACK_LIST##', trackList); + $('#master_modal').empty().append(s); + + $('.track-id-item').on('click', function(){ + $(this).toggleClass('selected'); + }); + + $('#btn-load-track').on('click', function(){ + $('.track-id-item.selected').each(function(){ + let apiCall = igm.galaxyConfiguration.href + '/api/histories/' + + igm.galaxyConfiguration.historyID +'/contents/' + $(this).attr('gid') + '/display'; + let opts = {}; + opts.type = $(this).attr('trackGroup'); + opts.sourceType = $(this).attr('sourcetype'); + opts.url = apiCall; + opts. name = $(this).text(); + if ($(this).attr('indexURL')) { + opts.indexURL = $(this).attr('indexURL'); + } + igm.browser.loadTrack(opts); + + }); + $('#galaxy-tracks').modal('hide'); + }); + + $('#galaxy-tracks').modal({'backdrop': false}); + } + }; + + igm.addIGVTrack = function(){ + if (validTrackFiles) { + igm.showTrackModal(validTrackFiles) + } else { + igm.subscribe("ValidTrackFilesAvailable", function(d){ + validTrackFiles = d; + igm.showTrackModal(validTrackFiles); + }); + igm.publish("NeedValidTrackFiles"); + } + }; + + igm.createNewBrowser = function(confObj){ + confObj.addTrackCB = igm.addIGVTrack; + igm.browser = new IGVModule(confObj); + igm.browser.showBrowser(); + }; + + + //IGV default genome use. + // We are here because of a Galaxy API call failure. Fall back to one of the + // supported IGV genomes. Otherwise, inform the user we are having an issue. + igm.defaultGenomeConfig = function(defaultObject) { + let hosted_genomes = [ + "hg38", + "hg19", + "hg18", + "mm10", + "gorGor4", + "panTro4", + "panPan2", + "susScr11", + "bosTau8", + "canFam3", + "rn6", + "danRer11", + "danRer10", + "dm6", + "ce11", + "sacCer3", + ]; + + //Do we have an exact match "galaxy dbKey": "mm10" <-> "hosted_genomes": "mm10"? + let idx = hosted_genomes.indexOf(defaultObject.genome.toLowerCase()); + let igv_genome = ''; + if (idx > -1) { + igv_genome = hosted_genomes[idx]; + defaultObject.igvConfObj.fasta_file = null; + defaultObject.igvConfObj.fasta_index = null; + defaultObject.igvConfObj.genome = igv_genome; + igm.createNewBrowser(defaultObject.igvConfObj); + } else { + // Got a partial match?? mm9 will match mm10 + let rx = /\D+/; + let galaxy_genome = rx.exec(defaultObject.genome.toLowerCase()); + for (let i = 0; i < hosted_genomes.length; i++) { + let result = rx.exec(hosted_genomes[i]); + if (result[0] === galaxy_genome[0]) { + // First match and we are out. + defaultObject.igvConfObj.fasta_file = null; + defaultObject.igvConfObj.fasta_index = null; + defaultObject.igvConfObj.genome = result["input"]; + igm.createNewBrowser(defaultObject.igvConfObj); + } + } + // No matches at all + BuildHelpPanel.showHelp({ + 'helpText':GenomeWarningText.text, + 'title': 'Missing Genome: ' + defaultObject.genome + }); + } + } + + igm.buildModule = function (confOb) { + //Get URI for index file and fasta file, URI call will be based on dbkey. + //http://localhost:8080/api/genomes/mmXX/genome_uri + let uri = this.galaxyConfiguration.href + '/api/genomes/' + + this.galaxyConfiguration.dbkey + '/genome_uri'; + let cobj = confOb; + fetch(uri) + .then((resp) => resp.json()) + .then(function(data){ + cobj.fasta_file = data["fasta_file"]; + cobj.fasta_index = data["fasta_index"]; + igm.createNewBrowser(cobj); + }).catch(function(error){ + // There is an error coming back from the API call. Fallback to IGV functionality. + // Use IGV supported genomes only. + igm.defaultGenomeConfig({ + 'genome': cobj.dbkey, + 'igvConfObj': cobj + }); + }) + }; + + igm.init = function(confObj) { + igm.galaxyConfiguration = confObj.galaxyConfiguration; + }; + + return igm; +}(IGVManager || {}));//eslint-disable-line no-use-before-define + +/** + * Name: PSMProteinViewer.js + * Author: mcgo0092@umn.edu + * Created: Mar 1 2016 + * + * Description: + * This is a D3.js based svg generator. It is meant to show a user + * the relationship between user chosen PSM sequences, associated + * peptide sequences and the originating protein. + * + */ + +let PSMProteinViewer = (function () { + /** + * + * @param confObj The object containing protein information.
    With the following elements
    + * + * baseDiv: '#id' The DOM element to insert all SVGs. + * genome: [ + * { + cds_end:143 + cds_start:0 + chrom:"15" + end:41096310 + name:"H0YMN5" + start:41096167 + strand:"-" + * } + * ], + * protein: { + * sequence: [] Array of peptide sequences + * offset: x If the offset should start at something else than 0 + * name: 'protein name' The protein name. + * } + * peptideList: [ + * { + * sequence: [], sequence array + * offset: int, where does the peptide start on the protein + * score: '', string of a score to show in tooltip + * } ... + * ] + * @constructor + */ + function PSMProteinViewer(confObj) { + + var self = this; + var viewObject = confObj; + + this.dbkey = confObj.dbkey; + + //Callback function for requesting an MSMS render of a PSM + this.msmsRender = confObj.msmsRender; + + //Basic configuration values + + //Holds all the protein information + this.proteinObj = confObj.protein; + //Holds all the PSMs + this.peptideList = confObj.peptideList; + + if (confObj.genome) { + this.genomeList = confObj.genome; + } else { + this.genomeList = []; + } + ; + + + this.aaAbrev = { + "A": "ala", + "R": "arg", + "N": "asn", + "D": "asp", + "C": "cys", + "Q": "gln", + "E": "glu", + "G": "gly", + "H": "his", + "I": "ile", + "L": "leu", + "K": "lys", + "M": "met", + "F": "phe", + "P": "pro", + "S": "ser", + "T": "thr", + "W": "trp", + "Y": "tyr", + "V": "val", + "B": "asx", + "Z": "glx", + "X": "xaa" + }; + + //Modifications, dynamically set from input + this.modifications = []; + var boundList = this.modifications; + this.peptideList.forEach(function (p) { + if (p.hasOwnProperty('mods')) { + p.mods.forEach(function (m) { + if (boundList.indexOf(m[1]) === -1) { + boundList.push(m[1]); + } + }); + } + }); + + //Protein rect size in focus area + this.prtSz = 20; + //rounded rect + this.rXrY = 5; + //Opacity + this.rectOpacity = .75; + //Text Y buffer + this.txtYBuffer = 4; + //Track where the protein is showing 0 === beginning of protein + //This is never > 0, it is the translate x offset + this.prtSeqXPos = 0; + //Show protein sequence offset every xth aa. Default is every 10th residue + this.offsetModal = 10; + //maximum Y offset when all peptides are rendered. + this.maxFocusY = 0; + //protein rect size in context area + this.ctxPrtSz = 5; + //Holds y coordinates of drawn peptides. Used for packing + this.psmExclusions = []; + + this.margin = {left: 50, right: 50, top: 50, bottom: 50}; + + //base div for svg, will be overridden by user + this.baseDiv = confObj.baseDiv || 'body'; + + //div for igv.js viewer + this.igvDiv = confObj.igvDiv; + + //Prep for SVG creation + //add context and focus divs. + $(self.baseDiv).append($.parseHTML('
    ')); + $(self.baseDiv).append($.parseHTML('
    ')); + $(self.baseDiv).append($.parseHTML('
    ')); + $(self.baseDiv).append($.parseHTML('
    ')); + + //SVG holding protein name and desciption + this.prtNameSVG = d3.select('#prt_name') + .append('svg') + .attr('width', function () { + return $('div#prt_name').width() - self.margin.left - self.margin.right; + }) + .attr('height', 50); + + this.genomeSVG = d3.select("#genome") + .append('svg') + .attr('width', function () { + return $('div#prt_name').width() - self.margin.left - self.margin.right; + }) + .attr('height', 50); + + //SVG holding the focus graphics + this.focusSVG = d3.select('#focus') + .append('svg') + .attr('width', function () { + return $('div#focus').width() - self.margin.left - self.margin.right; + }) + .attr('height', '100%'); + //Focus 'g' + this.focusGroup = null; + + //SVG holding the context graphics + this.contextSVG = d3.select('#context') + .append('svg') + .attr('width', function () { + return $('div#context').width() - self.margin.left - self.margin.right; + }) + .attr('height', '100%'); + + //Context 'g' + this.contextGroup = null; + //Genome group + this.genomeGroup = null; + + //Context svg uses a d3 scale. + this.ctxXScale = d3.scaleLinear() + .domain([0, self.proteinObj.sequence.length]) + .range([0, parseInt(self.contextSVG.style('width'))]); + + //Rendering functions and helpers ------------------------------------- + + //Moves the focus locator line to the corrected position in the context SVG. + this.lineRelocator = function () { + var newX1 = (-1) * ((self.prtSeqXPos / self.prtSz)); + var newX2 = newX1 + (Math.floor(parseInt(self.focusSVG.style('width')) / self.prtSz)); + + d3.select('line.locator') + .attr('x1', self.ctxXScale(newX1)) + .attr('x2', self.ctxXScale(newX2)); + }; + + //Allows for proper packing of sequences. + //No overlapping of peptide sequences in the y direction. + this.calcExclusionZone = function (len, offset, sizeOffset) { + var factor = 2; + + self.psmExclusions.map(function (cv) { + if (((offset <= cv[1]) && (offset >= cv[0])) || ((offset + (len - 1) <= cv[1]) && (offset + (len - 1) >= cv[0]))) { + factor += 1; + } + }); + + self.psmExclusions.push([offset, offset + (len - 1)]); + return (factor * sizeOffset); + }; + + this.styleMods = function (data, idx) { + var elemIDX = idx; + if (data.hasOwnProperty('mods')) { + data.mods.forEach(function (aMod) { + var offset = aMod[0] === 0 ? 0 : aMod[0] - 1; //TODO: talk to JJ about this crazy offset issue in the DB + $('rect.peptide_' + elemIDX + ':eq(' + offset + ')').addClass('ptm'); + $('text.peptide_' + elemIDX + ':eq(' + offset + ')').addClass(aMod[1].toLowerCase()); + }); + } + }; + + //Rendering functions and helpers ------------------------------------- + + //Div for tooltip display used as user hovers + this.ttDiv = d3.select("body").append("div") + .attr("class", "tooltip") + .attr("id", "d3-tooltip") + .style("opacity", 0); + + //Actual SVG rendering + this.renderSVG = function () { + + //Protein name and description + self.prtNameSVG.append('g') + .append('text') + .text(function () { + return self.proteinObj.name; + }) + .attr('x', 0) + .attr('y', 20) + .attr("font-family", "sans-serif") + .attr("font-size", "20px"); + + + //Add drag behavior. + self.focusGroup = self.focusSVG.append('g') + .attr('transform', 'translate(0,5)') + .call(d3.drag().on('drag', function () { + self.prtSeqXPos += d3.event.dx; + //Confine the sequence line from running off the left + if (self.prtSeqXPos > 0) { + self.prtSeqXPos = 0; + } + //Confine the sequence line from running off the right + if (Math.abs(self.prtSeqXPos) > (self.proteinObj.sequence.length - 20) * self.prtSz) { + self.prtSeqXPos = (-1) * ((self.proteinObj.sequence.length - 20) * self.prtSz); + } + d3.select(this).attr('transform', 'translate(' + self.prtSeqXPos + ',0)'); + //move the genome group + if (self.genomeGroup) { + self.genomeGroup.attr('transform', 'translate(' + self.prtSeqXPos + ',0)'); + } + self.lineRelocator(); + })); + + + self.genomeGroup = self.genomeSVG.append('g') + .attr('transform', 'translate(0,0)'); + //Draw the genome schematic, if needed + if (self.genomeList.length > 0) { + + //SVG patterns for showing genomic information + $('div #genome').find('g').append('' + + '' + + '' + + '' + + '' + + '' + + ' ' + + '' + + ''); + + self.genomeGroup.selectAll('rect') + .data(self.genomeList) + .enter().append('rect') + .attr('x', function (d) { + return (d['cds_start'] / 3) * self.prtSz; + }) + .attr('y', 0) + .attr('width', function (d) { + var x = (d['cds_end'] / 3) - (d['cds_start'] / 3); + return x * self.prtSz; + }) + .attr('height', 8) + .attr('class', 'genome_line') + .attr('fill', function (d) { + if (d['strand'] === '+') { + return 'url(#genomePlus)'; + } else { + return 'url(#genomeNeg)' + } + }) + .attr('rx', self.rXrY) + .attr('ry', self.rXrY) + .on('click', function () { + let d = d3.select(this).data()[0]; + let options = {}; + + if (PSMProteinViewer.igvModule) { + //already created just search + IGVManager.goToLocation(d.chrom + ":" + d.start + "-" + d.end); + } else { + options.igvDiv = self.igvDiv; + options.data = d; + options.dbkey = self.dbkey; + //Does self have a dbkey assigned? If not, inform the + //user they must associated the history entry with a + //reference genome. + if (self.dbkey === "?") { + //TODO: modal, message banner or something else besides alert?? + alert('The mz.sqlite database must be associated with a reference genome'); + } else { + IGVManager.buildModule(options); + } + PSMProteinViewer.igvModule = true; + } + }) + .append('svg:title') + .text(function (d) { + var s = 'Go to ' + d['chrom'] + ':' + d['start'].toLocaleString() + + '-' + d['end'].toLocaleString() + ' on an open IGV browser.'; + return s; + }); + + + self.genomeGroup.selectAll('text') + .data(self.genomeList) + .enter().append('text') + .text(function (d) { + return 'Chr: ' + d['chrom']; + }) + .attr('x', function (d) { + return ((d['cds_start'] / 3) * self.prtSz) + 3; + } + ) + .attr('y', 18) + .attr('font-size', '16') + .attr('transform', 'translate(0,10)'); + } else { + //Add a 'dummy' genome line to indicate the lack of genomic coordinates. + self.genomeSVG.selectAll('line') + .data([1]) + .enter().append('line') + .attr('x1', 0) + .attr('x2', function () { + return $('div#genome').width(); + }) + .attr('class', 'genome_dummy') + .attr('y1', 0) + .attr('y2', 0); + + self.genomeSVG.append('text') + .text('No Genomic Coordinates Available') + .attr('x', 10) + .attr('y', 15) + .attr('font-size', "18"); + + } + + //Draw variant<->reference comparison ====================================================================== + self.variantGroup = self.genomeGroup.append('g').attr('transform', 'translate(0,30)'); + // Alignments + // aligns: [[40, 50], [50, 55]] + viewObject.variantInformation.aligns.forEach(function (a) { + self.variantGroup.append('g').attr('transform', 'translate(0,10)').append('rect') + .attr('x', a[0] * self.prtSz) + .attr('y', 0) + .attr('width', ((a[1] - a[0]) * self.prtSz)) + .attr('height', 3) + .attr('fill', '#9c3e0d') + .attr('class', 'align_match') + .append('svg:title') + .text('Aligned with reference sequence.'); + }); + + // Deletions + // Object loc:20 missing:"ELV" + viewObject.variantInformation.deletions.forEach(function (v) { + self.variantGroup.append('polygon') + .attr('points', function () { + var idx = v.loc; + var a = [idx * self.prtSz, self.prtSz]; + var b = [a[0] + (self.prtSz / 2), 0]; + var c = [a[0] - (self.prtSz / 2), 0]; + return (a.toString() + ' ' + b.toString() + ' ' + c.toString()); + }) + .attr('fill', '#9c3e0d') + .append('svg:title') + .text('Deletion of ' + v.missing + ' from reference seqeunce.'); + }); + + // Additions + // additions: [{loc: 30, added: 'ELV'}] + viewObject.variantInformation.additions.forEach(function (v) { + var offset = v.loc; + var addLen = v.added.length; + self.variantGroup.append('polygon') + .attr('points', function () { + var a = [offset * self.prtSz, self.prtSz]; + var b = [(offset + addLen) * self.prtSz, self.prtSz]; + var c = [(a[0] + b[0]) / 2, 0]; + return (a.toString() + ' ' + b.toString() + ' ' + c.toString()); + }) + .attr('fill', '#9c3e0d') + .append('svg:title') + .text('Addition to reference sequence.'); + }); + //========================================================================================================== + + //Draw the protein sequence rects + self.focusGroup.selectAll('rect') + .data(self.proteinObj.sequence) + .enter().append('rect') + .attr('class', function (d, i) { + var rClass = 'amino_acid'; + var vObj = viewObject; + //substituitions: [{loc: 5, ref:'X'},{loc: 10, ref:'X'}], + vObj.variantInformation.substitutions.forEach(function (sub) { + if (sub.loc === i) { + rClass = 'reference_mismatch'; + } + }); + return rClass; + }) + .attr('x', function (d, i) { + return i * self.prtSz; + }) + .attr('y', 0) + .attr('rx', self.rXrY) + .attr('ry', self.rXrY) + .attr('width', self.prtSz) + .attr('height', self.prtSz) + .attr('opacity', self.rectOpacity); + + //Draw protein residue text + self.focusGroup.selectAll('text.aa_residue') + .data(self.proteinObj.sequence) + .enter().append('text') + .attr('class', 'aa_residue') + .text(function (d) { + return d; + }) + .attr('x', function (d, i) { + return (i * self.prtSz) + (self.prtSz / 2.0); + }) + .attr('y', self.prtSz - self.txtYBuffer) + .attr('text-anchor', 'middle'); + + //Draw sequence offsets. I think it looks better than an axis. + self.focusGroup.selectAll('text.offset') + .data(self.proteinObj.sequence) + .enter().append('text') + .attr('class', 'offset') + .text(function (d, i) { + if (i % self.offsetModal === 0) { + return i; + } + }) + .attr('x', function (d, i) { + return i * self.prtSz + (self.prtSz / 2.0); + }) + .attr('y', 2 * (self.prtSz - self.txtYBuffer)) + .attr('text-anchor', 'middle'); + + //Begin context rendering + self.contextGroup = self.contextSVG.append('g') + .attr('transform', 'translate(0,0)'); + + //Draw the focus locator, want it as the bottom layer so has to draw first. + self.contextGroup + .append('line') + .call(d3.drag().on('drag', function () { + var evtX = 0; + var numAA = 0; + var focusSVGW = parseInt(self.focusSVG.style('width')); + var focusW = self.ctxXScale(Math.floor(parseInt(self.focusSVG.style('width')) / self.prtSz)); + + //never let locator go beyond left margin + evtX = d3.event.x < 0 ? 0.0 : d3.event.x; + //never let evtX push locator beyond right margin + if ((focusSVGW - evtX) < focusW) { + evtX = focusSVGW - Math.ceil(focusW); + } + + numAA = Math.ceil(evtX / self.ctxXScale(1)); + + d3.select(this) + .attr('x1', function () { + return self.ctxXScale(numAA); + }) + .attr('x2', function () { + return self.ctxXScale(numAA) + self.ctxXScale(Math.floor(parseInt(self.focusSVG.style('width')) / self.prtSz)); + }); + + self.prtSeqXPos = -1 * (Math.floor(numAA * self.prtSz)); + self.focusGroup.attr('transform', 'translate(' + self.prtSeqXPos + ',5)'); + if (self.genomeGroup) { + self.genomeGroup.attr('transform', 'translate(' + self.prtSeqXPos + ',0)'); + } + }) + .on('end', function () { + self.focusGroup.attr('transform', 'translate(' + self.prtSeqXPos + ',5)'); + }) + ) + .attr('class', 'locator') + .attr('x1', 0) + .attr('y1', 10) + .attr('x2', function () { + var vizAA = Math.floor(parseInt(self.focusSVG.style('width')) / self.prtSz); + return self.ctxXScale(vizAA); + }) + .attr('y2', 10); + + //Draw the scaled protein sequence + self.contextGroup.selectAll('rect.ctx') + .data(self.proteinObj.sequence) + .enter().append('rect') + .attr('class', function () { + return "ctx"; + }) + .attr('x', function (d, i) { + return self.ctxXScale(i); + }) + .attr('y', 0) + .attr('width', function () { + return self.ctxXScale(1); + }) + .attr('height', self.ctxPrtSz) + .on('mouseover', function (d, i) { + var ctxWidth = $('div#context').width(); + var xPxPos = d3.event.pageX; + + self.ttDiv.html(d + "
    Offset: " + i); + + if (xPxPos > (ctxWidth / 2.0)) { + xPxPos -= parseInt(self.ttDiv.style('width')); + } + + self.ttDiv.style("left", (xPxPos) + "px") + .style("top", (d3.event.pageY - 50) + "px"); + + self.ttDiv.transition() + .duration(200) + .style("opacity", .9); + + }) + .on("mouseout", function () { + self.ttDiv.transition() + .duration(500) + .style("opacity", 0); + }); + + + //Draw PSMs/Peptides onto focus and context svgs + self.peptideList.map(function (obj, idx) { + var baseY = self.calcExclusionZone(obj.sequence.length, obj.offset, self.prtSz); + var tScore; + var msmsCallback = self.msmsRender; + + if (obj.score) { + tScore = obj.score; + } else { + tScore = 'No Score'; + } + + if (baseY > self.maxFocusY) { + self.maxFocusY = baseY; + } + + self.focusGroup.selectAll("rect.peptide_" + idx) + .data(obj.sequence) + .enter().append("rect") + .attr("class", function (d, i) { + var c = obj.class + ' peptide_' + idx; + if (obj.mismatch.indexOf(i) > -1) { + c += ' mismatch'; + } + return c; + }) + .attr("x", function (d, i) { + i += obj.offset; + return i * self.prtSz + }) + .attr("y", baseY) + .attr("width", self.prtSz) + .attr("height", self.prtSz) + .attr("opacity", .70); + + self.focusGroup.selectAll("text.peptide_" + idx) + .data(obj.sequence) + .enter().append("text") + .attr('class', 'txt_pep peptide_' + idx) + .attr('feature_type', obj.class) + .attr('score_val', tScore) + .text(function (d) { + return d; + }) + .attr("x", function (d, i) { + i += obj.offset; + return i * self.prtSz + (self.prtSz / 2); + }) + .attr("y", baseY + (self.prtSz - self.txtYBuffer)) + .attr("text-anchor", "middle") + .attr('spectrum_identID', obj.spectrum_identID) + .on('click', function () { + msmsCallback(d3.select(this).attr('spectrum_identID')); + }) + .on('mouseover', function () { + var classes = d3.select(this).attr('class'); + var xPxPos = d3.event.pageX; + + var scoreTop = $('#focus').position().top; + var focusWidth = $('#focus').width(); + + + var ttText = d3.select(this).attr('feature_type').toLowerCase() === 'psm' ? 'Target PSM' : 'PSM'; + var stHTML = '' + ttText + '
    ' + + d3.select(this).attr('score_val'); + + //Add modifications to tooltip + self.modifications.forEach(function (aMod) { + if (classes.indexOf(aMod.toLowerCase()) >= 0) { + stHTML += '

    Modification:' + aMod + '

    '; + } + }); + + self.ttDiv.html(stHTML); + + self.ttDiv + .style("left", function () { + if (xPxPos <= focusWidth / 2) { + return (focusWidth / 2) + 'px'; + } else { + return (focusWidth / 4) + 'px'; + } + }) + .style("top", scoreTop + "px"); + + self.ttDiv.transition() + .duration(200) + .style("opacity", .9); + + }) + .on("mouseout", function () { + self.ttDiv.transition() + .duration(500) + .style("opacity", 0); + }); + + //Rects into the context svg + baseY = baseY / 4.0; + self.contextGroup.selectAll('rect.ctx_psm_' + idx) + .data(obj.sequence) + .enter() + .append('rect') + .attr('class', function (d, i) { + var c = 'ctx_' + obj.class + ' ctx_psm_' + idx; + + if (obj.mismatch.indexOf(i) > -1) { + c += ' mismatch'; + } + + return c; + }) + .attr('x', function (d, i) { + i += obj.offset; + return self.ctxXScale(i); + }) + .attr('y', baseY) + .attr('width', self.ctxXScale(1)) + .attr('height', self.ctxPrtSz); + + self.styleMods(obj, idx); + }); + + //Focus height needs to be set now that everything is drawn + self.focusSVG.attr('height', self.maxFocusY + 50); + self.contextSVG.attr('height', (self.maxFocusY / 4) + 50); //TODO: ratio of the two rect sizes. + } + + } + + return PSMProteinViewer; +})(); +/* eslint-disable-line no-use-before-define, no-unused-vars */ + +const PeptideOverviewHelp = { + 'text': '

    Purpose

    ' + + '

    The Peptide Overview panel gives quick access to information about: unique peptide sequences (Sequences), displayed with any covalent modifications to specific amino acids highlighted and annotated via mouse-over, number of PSMs matched to each sequence (Spectra Count) and the number of inferred proteins containing each peptide sequence (Protein Count). Data can be sorted be each of these columns in ascending or descending order.

    ' + + '
    ' + + '

    Actions

    ' + + '
    PSMs for Selected Peptides
    Show PSMs for all selected unique peptide sequences in the Peptide Overview table. All PSMs matching to this peptide are shown, without filtering by scoring metrics.
    ' + + '
    PSMs filtered by Score
    You can filter PSMs by their associated scores. You can filter just the PSMs linked with the selected peptide sequences in the table or filter for PSMs from the entire dataset. To select filtering criteria, a filtering panel will become visible.
    ' + + '
    Load from Galaxy
    You can load a pre-filtered single-column tabular file from Galaxy containing peptide sequences of interest. The column must contain a peptide sequence on each line, one per line.
    ' + + '
    Peptide-Protein Viewer
    Displays a peptide sequence aligned within the overall protein sequence(s) from which it is derived. Other peptides from the dataset also derived from this protein are displayed as well. This viewer also displays genomic coordinates coding for the protein sequence, from which the IGV viewer can be launched.
    ' + + '
    Render
    Generate a Lorikeet view of a single, annotated MS/MS scan for each peptide shown in the overview table. Based on the score selected from the dropdown menu, the highest quality MS/MS spectra matching each peptide will be shown.
    ' + + '
    Filter
    Filter and select peptides based on sequence information query entered in the text box.
    ' + + '

    ' +}; + +const PSMDetailHelp = { + 'text': '

    Purpose

    ' + + '

    This panel contains all the details for a set of selected peptide sequences, including any scoring metrics available for the highest quality PSM for the peptide. Each column is sortable. Click on any row, and the best scoring, annotated MS/MS spectra will be generated for viewing using the Lorikeet tool.

    ' + + '

    Actions

    ' + + '
    Row Click
    Click on any peptide sequence in a row to generate the view of the annotated MS/MS spectra matched to this sequence. Clicking on multiple rows will generate separate MS/MS visualizations.
    ' +}; + + + +/** + * Module of code for managing and presenting a peptide-centric view of the mz-sqlite db. + */ +var PeptideView = (function (pv) { + + pv.baseQuery = { + 'SELECT': 'spectrum_counts.ENCODED_SEQUENCE AS Sequence, spectrum_counts.SPECTRA_COUNT AS "Spectra Count", protein_counts.PROTEIN_COUNT AS "Protein Count", spectrum_counts.peptide_id', + 'FROM': 'spectrum_counts, protein_counts', + 'WHERE': 'protein_counts.SII_ID = spectrum_counts.SII_ID' + }; + pv.columnValues = ''; + pv.tableElm = '
    '; + pv.visibleScores = []; + pv.forPSMRendering = []; + pv.filteringFiles = []; + pv.candidateFiles = {}; + pv.candidateFilesPanel = false; + + pv.prepareFilterSequences = function (lst) { + if (lst.length > 0) { + if (lst.indexOf('%') > -1) { + pv.filterByLike(lst.split(/\s|,|;|:/).toLocaleString()); + } else { + pv.filterBySequences(lst.split(/\W/).toLocaleString()); + } + + } else { + console.log('User wants to filter on an empty list'); + } + }; + + pv.domEdit = function () { + var e = $('#' + pv.baseDiv); + e.empty(); + var tt = "Generate a single MSMS scan for each peptide in the overview table. The best MSMS will be determined by the chosen score."; + e.append($.parseHTML('
    ' + + '

    Peptide Overview

    Help?
    ' + + '
    ' + + '
    ' + + '
    ' + + '' + + '' + + '' + + '' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + pv.tableElm + '
    ' + + '' + + '
    ')); + $('.render-btn').attr('disabled', 'disabled'); + + + //Wire + $('#psm-filter-ul li').on('click', function () { + let type = $(this).attr('value'); + + if (type === 'current') { + if (pv.forPSMRendering.length === 0) { + let table = $('#data-table').DataTable(); + table.$('tr').toggleClass('selected-peptide'); + table.$('.selected-peptide').each(function () { + pv.forPSMRendering.push(table.$(this).data()); + }); + pv.publish("ScoreFilteringRequest", pv.forPSMRendering); + } + } else { + pv.publish("GlobalScoreFilterRequest"); + } + + $('html, body').animate({ + scrollTop: ($('#score_filter_div').offset().top) + },1000); + $('#psm-filtered').tooltip('hide'); + }); + + $('#psm-all').on('click', function () { + if (pv.forPSMRendering.length > 0) { + pv.appendDetailDOM('Selected Peptides'); + pv.createDetailTable(pv.forPSMRendering); + } + }); + + //filter code + $('button.pep-filter').on('click', function () { + if ($(this).text() === 'Filter') { + pv.prepareFilterSequences($('input.pep-filter').val()) + } else { + //Clear any existing filtering + $('input.pep-filter').val(''); + $('#data-table').DataTable().search(''); + $('#data-table').DataTable().draw(); + } + + }); + + //Help panel for peptide overview + $('#peptide_overview_help').on('click', function() { + BuildHelpPanel.showHelp({ + 'helpText':PeptideOverviewHelp.text, + 'title': 'Peptide Overview Help' + }); + }); + }; + + pv.destroyDetailTable = function () { + var el = $('#detail_div'); + el.empty(); + }; + + pv.appendDetailDOM = function (sequence) { + var el = $('#detail_div'); + el.empty(); + el.append($.parseHTML('
    ' + + '
    ' + + '
    ' + + '

    PSM Detail for ' + sequence + '

    Help?
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ')); + + $('.kill-detail-table').on('click', pv.destroyDetailTable); + + $('#psm_detail_help').on('click', function(){ + BuildHelpPanel.showHelp( + { + 'helpText': PSMDetailHelp.text, + 'title': 'PSM Details for Selected Unique Peptides' + }); + }); + + $('#pep-prot-psm_view').on('click', function () { + var ids = []; + var data = $('#data-detail-table').DataTable().data(); + for (var idx = 0; idx < data.length; idx++) { + ids.push(data[idx]["\"id\""]); + } + pv.publish('userRequestsViewInProteins', ids.toString()); + }); + + }; + + pv.buildScoreQuery = function () { + var q = " psm_entries.id, psm_entries.sequence, psm_entries.spectrumID, psm_entries.spectrumTitle, "; + pv.visibleScores.forEach(function (cv) { + q += 'psm_entries."' + cv + '",'; + }); + q = q.slice(0, q.lastIndexOf(',')); + return q; + }; + + //an array of id objects + pv.createDetailTable = function (idArray, fStr) { + let idStr = ''; + let filterStr = fStr || null; + + idArray.forEach(function (o) { + idStr += '"' + o.key + '",'; + }); + + idStr = idStr.slice(0, idStr.lastIndexOf(',')); + + let setDetailRowClick = function () { + $('#data-detail-table').find('tbody').on('click', 'tr', function () { + $(this).toggleClass('selected-peptide'); + pv.publish('renderPSMForPeptide', { + pkid: $(this).data().key, + spectrumID: $(this).data().fObj['"spectrumID"'], + spectrumTitle: $(this).data().fObj['"spectrumTitle"'] + }); + }); + }; + + let option = { + tableDivID: 'data-detail-table', + rowIDField: 'id', + baseQuery: { + 'SELECT': 'psm_entries.*', + 'FROM': ' psm_entries', + 'WHERE': 'psm_entries.id in (' + idStr + ') ' + }, + href: pv.galaxyConfiguration.href, + datasetID: pv.galaxyConfiguration.datasetID, + callBackFN: setDetailRowClick + }; + + if (idStr.length === 0) { + //Do not restrict psm_entries.id, this is a global request + option.baseQuery.WHERE = ''; + } + + if (fStr) { + if (option.baseQuery.WHERE.length === 0) { + option.baseQuery.WHERE += ' ' + fStr + ' '; + } else { + option.baseQuery.WHERE += ' AND ' + fStr + ' '; + } + + } + + if (pv.visibleScores.length > 0) { + option.baseQuery['SELECT'] = pv.buildScoreQuery(); + } + + option.scoreSummary = true; + + psmDetailDP = new AjaxDataProvider(option); + psmDetailDP.generateTable(); + //Move to table + $('html, body').animate({ + scrollTop: ($('#detail_div').offset().top) + },1000); + $('#psm-all').tooltip('hide'); + }; + + pv.wireTable = function () { + //Table is initialized + pv.publish('dataTableInitialized', {}); + let table = $('#data-table').DataTable(); + + table.on('draw', function () { + pv.forPSMRendering = []; + }); + + $('#data-table tbody').on('click', 'tr', function () { + let t = $('#data-table').DataTable(); + //New approach + if ($(this).hasClass('selected-peptide')) { + $(this).toggleClass('selected-peptide'); + let d = t.$(this).data(); + if (pv.forPSMRendering.indexOf(d) > -1) { + pv.forPSMRendering.splice(pv.forPSMRendering.indexOf(d), 1); + } + } else { + //$('#data-table tbody tr').each(function(){$(this).removeClass('selected-peptide')}); + $(this).addClass('selected-peptide'); + pv.forPSMRendering.push(t.$(this).data()); + + //pv.createDetailTable(t.$('tr.selected-peptide').data()); + } + + }); + }; + + pv.makeTableAndQuery = function (sqlStr) { + pv.domEdit(); + + pv.dataProvider = new AjaxDataProvider({ + baseQuery: sqlStr, + rowIDField: 'PEPTIDE_ID', + href: pv.galaxyConfiguration.href, + datasetID: pv.galaxyConfiguration.datasetID, + tableDivID: 'data-table', + searchColumn: 'spectrum_counts.SEQUENCE', + callBackFN: pv.wireTable, + sequenceFormatter: PeptideModifications.htmlFormatSequences, + modificationCount: pv.galaxyConfiguration.tableRowCount.peptide_modifications + }); + + pv.dataProvider.generateTable(); + + }; + + + pv.clearSeachFiltering = function () { + $('#data-table').DataTable().search('').draw(); + }; + + pv.setSearchFiltering = function (s) { + $('#data-table').DataTable().search(s).draw(); + }; + + /** + * User wishes to filter by a large list of peptide sequences. + * List comes from current Galaxy history. + * @param listSeq + */ + pv.filterBySequences = function (listSeq) { + let escapedStr = ''; + + //Clear any existing filtering + PeptideView.clearSeachFiltering(); + + listSeq.split(',').forEach(function (cv, idx) { + if (idx > 0) { + escapedStr += ',"' + cv + '"'; + } else { + escapedStr += '"' + cv + '"'; + } + }); + + PeptideView.setSearchFiltering(escapedStr); + }; + + pv.filterByLike = function (listSeq) { + let rStr = ''; + + PeptideView.clearSeachFiltering(); + + rStr += ' LIKE ' + '"' + listSeq.split(',')[0] + '"'; + + PeptideView.setSearchFiltering(rStr); + } + + pv.prepareRenderScores = function (data) { + var liS = ''; + + $('#score-type-ul').empty(); + + data.forEach(function (cv) { + var s = '
  • ' + cv + ' ASC
  • '; + s += '
  • ' + cv + ' DSC
  • '; + + if (cv.indexOf('PeptideShaker') > -1) { + //prepend in str + liS = s.concat(liS); + } else { + //append in str + liS = liS.concat(s); + } + }); + + $('#score-type-ul').append($.parseHTML(liS)); + $('#score-type-ul li').on('click', function () { + var scoreName = $(this).attr('s_name'); + var sortDir = $(this).attr('s_dir'); + var rowData = $('#data-table').DataTable().rows().data(); + var numRows = rowData.length; + var idx; + var peptides = []; + + for (idx = 0; idx < numRows; idx += 1) { + peptides.push(rowData[idx]['"PEPTIDE_ID"']); + } + + pv.publish('renderBestPSM', { + peptideIDs: peptides.toString(), + scoreField: scoreName, + sortDir: sortDir + }); + }); + //Render btn now is operational + $('.render-btn').removeAttr("disabled"); + + }; + + pv.resetTable = function () { + let tbl = $('#data-table').DataTable(); + tbl.destroy(); + $('#data-table').empty(); + pv.dataProvider = null; + pv.makeTableAndQuery(pv.baseQuery); + }; + + pv.reBuildTable = function (name, value) { + let tbl = $('#data-table').DataTable(); + let q = { + 'SELECT': 'DISTINCT spectrum_counts.ENCODED_SEQUENCE AS Sequence, spectrum_counts.SPECTRA_COUNT AS "Spectra Count", protein_counts.PROTEIN_COUNT AS "Protein Count", spectrum_counts.peptide_id', + 'FROM': 'spectrum_counts, protein_counts, psm_entries', + 'WHERE': 'protein_counts.SII_ID = spectrum_counts.SII_ID AND psm_entries.id = spectrum_counts.PEPTIDE_ID AND psm_entries."' + name + '" >= ' + value + }; + tbl.destroy(); + $('#data-table').empty(); + pv.dataProvider = null; + pv.makeTableAndQuery(q); + }; + + pv.getPeptideFilterSequences = function (files) { + + }; + + pv.buildFileSelectPanel = function () { + let str = '
    ' + + '
    Choose Tabular File(s) for Peptide Filtering
    \n' + + '
    ##FILES_HERE##
    ' + + '
    '; + + let fDiv = '
    '; + Object.keys(pv.candidateFiles).forEach(function (key) { + fDiv += '
    ' + pv.candidateFiles[key]['name'] + '
    ' + }); + fDiv += '
    '; + str = str.replace('##FILES_HERE##', fDiv); + + $('#overview_row').prepend($.parseHTML(str)); + $('.candidate-file').on('click', function () { + if ($(this).hasClass('shadow')) { + $(this).removeClass('shadow'); + $(this).addClass('used-for-filtering'); + } else { + $(this).addClass('shadow'); + $(this).removeClass('used-for-filtering'); + } + }); + + $('#cancel-this').on('click', function(){ + $('.candidate-file.used-for-filtering').each(function () { + $(this).removeClass('used-for-filtering'); + $(this).addClass('shadow'); + }); + $('#user-filter-list').toggle(); + }); + + $('#filter-with').on('click', function () { + pv.filteringFiles = []; + $('.candidate-file.used-for-filtering').each(function () { + pv.filteringFiles.push(pv.candidateFiles[$(this).attr('dID')]); + }); + if (pv.filteringFiles.length > 0) { + pv.publish('ParseCandidateFiles', pv.filteringFiles); + } + $('#user-filter-list').toggle(); + }); + + pv.candidateFilesPanel = true; + + }; + + pv.init = function (confObj) { + pv.baseDiv = confObj.baseDiv; + pv.galaxyConfiguration = confObj.galaxyConfiguration; + + pv.makeTableAndQuery(pv.baseQuery); + + pv.subscribe('UserRemovedFDRFilter', function () { + pv.resetTable(); + }); + pv.subscribe('VisibleScores', function (arg) { + //These are the scores the user wants to see + pv.visibleScores = arg; + pv.prepareRenderScores(arg); + }); + + pv.publish('RequestVisibleScores'); + + pv.publish('RequestRankedScores', {}); + + pv.subscribe('CandidateFilesParsed', function (arg) { //TODO: this needs to be an accessible function + let od = $('#overview_div'); + pv.filteringFiles = arg.data; + od.removeClass('col-md-12'); + od.addClass('col-md-8'); + $('#data-table').DataTable().draw(); + SequenceByFile.init({ + pageSize: 50, + seqData: pv.filteringFiles, + elID: 'overview_row', + callBack: pv.filterBySequences + }); + }); + + pv.subscribe('CandidateFilesAvailable', function (arg) { + var b = $('#btn-load-from-galaxy'); + var bProt = $('#btn-view-in-protein'); + //Can allow the user to load a peptide file from history. + b.removeAttr("disabled"); + + arg.forEach(function (cv) { + pv.candidateFiles[cv.obj['id']] = cv; + }); + + b.on('click', function () { + if (pv.candidateFilesPanel) { + $('#user-filter-list').toggle(); + } else { + pv.buildFileSelectPanel(); + } + }); + bProt.removeAttr('disabled'); + bProt.on('click', function () { + var ids = []; + var data = $('#data-table').DataTable().data(); + for (var idx = 0; idx < data.length; idx++) { + ids.push(data[idx]["\"PEPTIDE_ID\""]); + } + pv.publish('userRequestsViewInProteins', ids.toString()); + }); + }); + + pv.subscribe("UserProvidesScoreFiltering", function (data) { + pv.appendDetailDOM('Score Filtered PSMs'); + pv.createDetailTable(data['data'], data['fStr']); + //Hide Peptide Overview. User is focusing on filtered PSMs. + document.getElementById('overview_div').setAttribute('style', 'display:none'); + }); + + pv.subscribe("UserClearedScoreFilter", function () { + //User is finished with filtered PSMs, present Peptide Overview. + document.getElementById('overview_div').setAttribute('style', 'display:visible'); + + let table = $('#data-table').DataTable(); + table.$('tr').removeClass('selected-peptide'); + pv.forPSMRendering = []; + }); + + $('[data-toggle="tooltip"]').tooltip(); + }; + + return pv; + +}(PeptideView || {}));// eslint-disable-line no-use-before-define +const LorikeetHelp = { + 'text': '

    Purpose

    ' + + '

    The Lorikeet viewer allows users to view and explore the MS/MS spectra which results in matches to specific peptide sequences. Annotated MS/MS are shown for peptide sequences clicked on in the PSM Detail for Selected Peptides window, or those generated using the Render button. Lorikeet allows users to select various attributes of peptide MS/MS spectra to annotate (left side) and view a tabular summary peaks matching to selected fragment ions within the spectrum. More information on Lorikeet is available at GitHub

    ' + + '

    Along the top, you can delete, “thumbs up” or “thumbs down” the scan. Scans receiving a thumbs up assignment are tagged, and can be exported back to Galaxy for further analysis if desired.

    ' +}; + +/** + * The lorikeet options instance + * @constructor + */ +function LorikeetInstance(){ + + this.options = { + "sequence": null, + "staticMods": [], + "variableMods": [], + "ntermMod": 0, // additional mass to be added to the n-term + "ctermMod": 0, // additional mass to be added to the c-term + "peaks": [], + "massError": 0.1, + "scanNum": null, + "fileName": null, + "charge": null, + "precursorMz": null, + "ms1peaks": null, + "ms1scanLabel": null, + "precursorPeaks": null, + "precursorPeakClickFn": null, + "zoomMs1": false, + "width": 750, // width of the ms/ms plot + "height": 450, // height of the ms/ms plot + "extraPeakSeries": [], + residueSpecificNeutralLosses: false, + showIonTable: true, + showViewingOptions: true, + showOptionsTable: true, //false + showInternalIonOption: true, + showInternalIonTable: true, + showMHIonOption: false, + showAllTable: false, + showSequenceInfo: true + }; + +} + + + + +/** + * + * Module for rendering the PSM to Lorikeet + * + * 1 - Find PSMs associated with a list of peptide ids. + * 2 - User has chosen a score to use for ranking. + * 3 - Get PSM based on the 'best' scoring for desired score. + * 4 - Generate Lorikeet MSMS based on 3 + * + */ +var RenderPSM = (function(rpm){ + + rpm.currentSpectra = {}; + rpm.renderedSpectra = {}; + rpm.idMapping = {}; + + rpm.determineModType = function(arr, type) { + rVal = []; + + arr.forEach(function(m){ + if (m.modType === type) { + rVal.push(m); + } + }); + + return rVal; + }; + + //Determine nature of mod: fixed, variable, cterm or nterm + rpm.setModTypes = function(currentSpectra, obj){ + let sequenceLength = currentSpectra.sequence.length; + let mods = []; + if (currentSpectra.modifications != undefined) { + mods = currentSpectra.modifications; + } + + obj.staticMods = []; + obj.variableMods = []; + obj.ntermMod = 0; // additional mass to be added to the n-term + obj.ctermMod = 0; // additional mass to be added to the c-term + + mods.forEach(function(m){ + let residueMod = true; + let am = {}; + if (m.index === 0) { + obj.ntermMod += m.modMass; + residueMod = false; + } + if (m.index === sequenceLength + 1) { + obj.ctermMod += m.modMass; + residueMod = false; + } + if (residueMod) { + if (m.modType === "fixed") { + // Example: [{"modMass":57.0,"aminoAcid":"C"}]; + am.modMass = m.modMass; + am.aminoAcid = m.aminoAcid; + obj.staticMods.push(am); + } else { + //Example: [ {index: 14, modMass: 16.0, aminoAcid: 'M'} ] + am.index = m.index; + am.modMass = m.modMass; + am.aminoAcid = m.aminoAcid; + obj.variableMods.push(am); + } + } + }); + + }; + + rpm.renderSpectrum = function(spectrumID){ + var slug = '
    ' + + '
    #PH#Help?
    ' + + '
    ' + + '' + + '' + + '' + + '
    ' + + '
    #PB#
    '; + var lObj = new LorikeetInstance(); + + //Hold a map for the complicated scan id and title so it is html compliant + var scanIndex = Object.keys(rpm.renderedSpectra).length + 1; + rpm.idMapping[scanIndex] = spectrumID; + + slug = slug.replace(/#ID#/g, scanIndex); + slug = slug.replace(/#SID#/g, spectrumID); + slug = slug.replace('#PH#', rpm.currentSpectra[spectrumID].sequence); + slug = slug.replace('#PB#', '
    '); + lObj.scanNum = spectrumID; + lObj.sequence = rpm.currentSpectra[spectrumID].sequence; + lObj.peaks = rpm.currentSpectra[spectrumID].peaks; + lObj.width = 750; + lObj.height = 450; + lObj.showInternalIonTable = true; + lObj.showInternalIonOption = true; + lObj.showAllTable = true; + lObj.showOptionsTable = true; + lObj.labelReporters = true; + lObj.showMHIonOption = true; + rpm.setModTypes(rpm.currentSpectra[spectrumID], lObj); + + $('#lorikeet_zone').prepend($.parseHTML(slug)); + $('#lm_' + scanIndex).specview(lObj); + + $('.lorikeet_help').on('click', function(){ + BuildHelpPanel.showHelp({ + 'helpText':LorikeetHelp.text, + 'title': 'Lorikeet MS/MS Viewer' + }); + }); + + //Wire the review buttons + $('.unverify-scan').on('click', function(){ + $('#' + $(this).val()).removeClass().addClass('panel panel-danger'); + rpm.publish('userUnverifiedSpectrum', { + scanID: $(this).attr('spec_id') + }); + }); + $('.delete-scan').on('click', function () { + $('#' + $(this).val()).remove(); + }); + $('.verify-scan').on('click', function () { + $('#' + $(this).val()).removeClass().addClass('panel panel-success'); + rpm.publish('userVerifiedSpectrum', { + spectrum_title: RenderPSM.renderedSpectra[rpm.idMapping[$(this).val()]].Spectrum_title, + spectrum_pkid: RenderPSM.renderedSpectra[rpm.idMapping[$(this).val()]].Spectrum_pkid, + peptide_pkid: RenderPSM.renderedSpectra[rpm.idMapping[$(this).val()]].Peptide_pkid, + sequence: RenderPSM.renderedSpectra[rpm.idMapping[$(this).val()]].sequence + }); + }); + + }; + + rpm.getSequences = function() { + var sql = 'SELECT peptides.id, peptides.sequence FROM peptides ' + + 'WHERE peptides.id in (##PEPS##)'; + var pepList = ''; + var url = rpm.galaxyConfiguration.href + '/api/datasets/' + + rpm.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + + Object.keys(rpm.currentSpectra).forEach(function(k, idx){ + if (idx > 0) { + pepList += ',"' + rpm.currentSpectra[k].Peptide_pkid + '"'; + } else { + pepList += '"' + rpm.currentSpectra[k].Peptide_pkid + '"'; + } + }); + sql = sql.replace('##PEPS##', pepList); + url += sql; + + $.get(url, function(data){ + var seqByPep = {} + data.data.slice(1).forEach(function(cv){ + seqByPep[cv[0]] = cv[1]; + }); + Object.keys(rpm.currentSpectra).forEach(function(k){ + rpm.currentSpectra[k].sequence = seqByPep[rpm.currentSpectra[k].Peptide_pkid]; + }); + + //Can now actually render the MSMS + Object.keys(rpm.currentSpectra).forEach(function(k){ + rpm.renderSpectrum(k); + rpm.renderedSpectra[k] = rpm.currentSpectra[k]; + }); + }); + }; + + rpm.getModifications = function(){ + var sql = 'SELECT PM.peptide_ref, PM.location, PM.residue, PM.monoisotopicMassDelta, PM.modType ' + + 'FROM peptide_modifications PM WHERE PM.peptide_ref in (##PEPS##)'; + var pepList = ''; + var url = rpm.galaxyConfiguration.href + '/api/datasets/' + + rpm.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + + Object.keys(rpm.currentSpectra).forEach(function(k, idx){ + if (idx > 0) { + pepList += ',"' + rpm.currentSpectra[k].Peptide_pkid + '"'; + } else { + pepList += '"' + rpm.currentSpectra[k].Peptide_pkid + '"'; + } + }); + sql = sql.replace('##PEPS##', pepList); + url += sql; + + $.get(url, function(data){ + var modsByPepID = {}; + data.data.slice(1).forEach(function(cv){ + var obj = {}; + obj.index = cv[1]; // === 0 ? 1 : cv[1]; 0 means n-term 1 means the first amino acid. + obj.modMass = cv[3]; + obj.aminoAcid = cv[2]; + obj.modType = cv[4]; + + if (!(cv[0] in modsByPepID)) { + modsByPepID[cv[0]] = []; + } + modsByPepID[cv[0]].push(obj); + }); + Object.keys(rpm.currentSpectra).forEach(function(k){ + rpm.currentSpectra[k].modifications = modsByPepID[rpm.currentSpectra[k].Peptide_pkid]; + }); + rpm.getSequences(); + }); + }; + + rpm.buildPeaks = function(){ + var sqlSlug = 'SELECT scans.mzValues, scans.intensities, scans.spectrumID, scans.spectrumTitle FROM scans \n' + + 'WHERE scans.spectrumTitle = "##SPECTRUM_TITLE##" AND scans.spectrumID = "##SPECTRUM_ID##"'; + //var pepList = ''; + var url = rpm.galaxyConfiguration.href + '/api/datasets/' + + rpm.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + var sql = ''; + + Object.keys(rpm.currentSpectra).forEach(function(k, idx){ + if (idx > 0) { + sql = sql + ' UNION ' + sqlSlug; + } else { + sql = sqlSlug; + } + sql = sql.replace('##SPECTRUM_TITLE##', rpm.currentSpectra[k].Spectrum_title); + sql = sql.replace('##SPECTRUM_ID##', rpm.currentSpectra[k].Spectrum_pkid); + }); + url += sql; + + $.get(url, function(data){ + data.data.slice(1).forEach(function(cv){ + var moz = JSON.parse(cv[0]); + var intensity = JSON.parse(cv[1]); + var cPeaks = rpm.currentSpectra[cv[2] + "," + cv[3]].peaks = []; + + moz.forEach(function(cv,idx){ + cPeaks.push([ + cv, + intensity[idx] + ]); + }); + + }); + rpm.getModifications(); + }); + }; + + rpm.beginBulkRender = function(obj) { + + var sql = 'SELECT psm_entries.id, psm_entries.spectrumID, psm_entries.spectrumTitle, ' + + '##MM##(psm_entries."##SCORE##") AS "##SCORE##" ' + + 'FROM psm_entries ' + + ' WHERE ' + + ' psm_entries.id IN (##ID_LIST##)' + + 'GROUP BY psm_entries.id'; + + var rx_score = /##SCORE##/g; + var m_m = obj.sortDir === 'ASC' ? 'MIN' : 'MAX'; + var url = rpm.galaxyConfiguration.href + '/api/datasets/' + + rpm.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + + var escapedIDs = obj.peptideIDs.split(',').map(function(x){return '"' + x + '"'}).toString(); + + sql = sql.replace('##ID_LIST##', escapedIDs); + sql = sql.replace(rx_score, obj.scoreField); + sql = sql.replace('##MM##', m_m); + + url = url + sql; + $.get(url, function(data){ + data.data.slice(1).forEach(function(cv){ + var obj = {}; + obj.Peptide_pkid = cv[0]; + obj.Spectrum_pkid = cv[1]; + obj.Spectrum_title = cv[2] + rpm.currentSpectra[obj.Spectrum_pkid + "," + obj.Spectrum_title] = obj + }); + rpm.buildPeaks(); + }); + }; + + rpm.beginSinglePSM = function(obj){ + var sql = 'SELECT psm_entries.id, psm_entries.spectrumID, psm_entries.spectrumTitle ' + + 'FROM psm_entries WHERE psm_entries.spectrumID = ##ID## AND psm_entries.spectrumTitle = ##TITLE## '; + var url = rpm.galaxyConfiguration.href + '/api/datasets/' + + rpm.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + sql = sql.replace('##ID##', '"' + obj.spectrumID + '"'); + sql = sql.replace('##TITLE##', '"' + obj.spectrumTitle + '"'); + url += sql; + + $.get(url, function(data){ + data.data.slice(1).forEach(function(cv){ + var obj = {}; + obj.Peptide_pkid = cv[0]; + obj.Spectrum_pkid = cv[1]; + obj.Spectrum_title = cv[2] + rpm.currentSpectra[obj.Spectrum_pkid + "," + obj.Spectrum_title] = obj + }); + rpm.buildPeaks(); + }); + }; + + rpm.manageClearing = function() { + $('#clear_scans').removeAttr("disabled").on('click', function(){ + $('#lorikeet_zone').children().each(function(){$(this).remove()}); + $(this).attr('disabled', 'disabled'); + $('#clear_scans').tooltip('hide'); + }); + }; + + rpm.init = function(confObj) { + rpm.galaxyConfiguration = confObj.galaxyConfiguration; + + rpm.subscribe('renderPSMForPeptide', function(arg){ + rpm.currentSpectra = {}; + rpm.beginSinglePSM({ + peptideID: arg.pkid, + spectrumID: arg.spectrumID, + spectrumTitle: arg.spectrumTitle + }); + rpm.manageClearing(); + + + $('html, body').animate({ + scrollTop: ($('#lorikeet_zone').offset().top) + },1000); + + + }); + + rpm.subscribe('renderBestPSM', function(arg){ + rpm.currentSpectra = {}; + rpm.beginBulkRender({ + peptideIDs: arg.peptideIDs, + scoreField: arg.scoreField, + sortDir: arg.sortDir + }); + $('html, body').animate({ + scrollTop: ($('#lorikeet_zone').offset().top) + },1000); + rpm.manageClearing(); + }); + }; + + return rpm; + +}(RenderPSM || {}));// eslint-disable-line no-use-before-define +const ScoreFilterHelp = { + 'text': '

    Purpose

    The Scores for Filtering panel allows you to search for PSMs ' + + 'based on individual PSM scores. From the Score dropdown, you can choose one or multiple ' + + 'PSM scores for fitering.


    ' + + '

    Actions

    ' + + '
    All conditions are true
    Each chosen score filter must be true
    ' + + '
    Any condition is true
    Any one score filter is true
    ' + + '
    Filter Now
    Produces a table of PSMs fulfilling your score filtering.

    ' +} + +/** + * Module for allowing user to filter PSMs based on one or more score value. + */ +//$('#score-filter-rows').children().length +var ScoreFilterModule = (function(sfm){ + + sfm.scoreSummary = null; + sfm.guiDiv = 'score_filter_div'; + + + sfm.buildScoreFilterRow = function(sName){ + var rId = Math.random().toString(36).replace(/[^a-z]+/g, ''); + let divStr = '
    ' + + '
    ' + sName + '
    ' + + '
    MIN: ' + sfm.scoreSummary[sName]["min_value"] + ' MAX: ' + sfm.scoreSummary[sName]["max_value"] + '
    '; + + divStr += '
    '; + + divStr += '
    '; + + + return divStr; + }; + + sfm.prepareDOM = function() { + let dStr = '

    Scores for Filtering

    ' + + 'Help?' + + '
    ' + + '' + + '
    ' + + '
    ' + + '' + + ' ' + + '' + + '
    '; + let scores = ''; + + Object.keys(sfm.scoreSummary).sort().forEach(function(cv){ + if(sfm.scoreSummary[cv]['score_type'] === 'REAL') { + scores += '
  • ' + cv + '
  • '; + } + }); + + dStr = dStr.replace('##LIST##', scores); + $('#' + sfm.guiDiv).append($.parseHTML(dStr)); + + //wire + $('.score_filter_name').on('click', function(){ + let divStr = sfm.buildScoreFilterRow($(this).text()); + $('#score-filter-rows').append(divStr); + + $('.filter-remove').on('click', function(){ + document.getElementById($(this).attr('delete-row')).remove(); + }); + + }); + + $('#score-filter-clear').on('click', function(){ + $('#' + sfm.guiDiv).empty(); + sfm.publish("UserClearedScoreFilter"); + }); + + $('#score-filter-now').on('click', function(){ + let filterStr = ' '; + let ops = {'gt': '>', 'gte': '>=', 'lt': '<', 'lte': '<='}; + //$('input[name=q-type]:checked').val() =>"any-clause" | "all-clause" + + $('#score-filter-rows').children().each(function(){ + filterStr += 'psm_entries."' + $(this).find('.sf-name').text() + '" ' + + ops[$(this).find('.score_filter_op').val()] + ' ' + $(this).find('.sf-number').val() + + ' ' + $('input[name=q-type]:checked').val() + ' '; + }); + filterStr = filterStr.slice(0, filterStr.lastIndexOf(' ' + $('input[name=q-type]:checked').val() + ' ')); + + sfm.publish("UserProvidesScoreFiltering", { + fStr: filterStr, + data: sfm.peptideObjs + }); + }); + + $('#score_filter_help').on('click', function() { + BuildHelpPanel.showHelp({ + 'helpText': ScoreFilterHelp.text, + 'title': 'Score Filter Help' + }); + }); + }; + + sfm.prepareScoreFiltering = function(data){ + sfm.peptideObjs = data; + sfm.prepareDOM(); + }; + + sfm.init = function(confObj) { + + if (confObj['baseDiv']) { + sfm.guiDiv = confObj['baseDiv']; + } + + sfm.subscribe('ScoreSummaryComplete', function(data){ + sfm.scoreSummary = data; + }); + + sfm.subscribe('ScoreFilteringRequest', function (data) { + sfm.prepareScoreFiltering(data); + }); + + sfm.subscribe('GlobalScoreFilterRequest', function(){ + sfm.peptideObjs = []; + sfm.prepareDOM(); + }); + + }; + + return sfm; +}(ScoreFilterModule||{}));//eslint-disable-line no-use-before-define +/** + * Manages the presentation of peptide sequences by file and by paging within file. + */ +var SequenceByFile = (function(sbf){ + + sbf.drawTable = function(){ + var domStr = '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    Filtering Sequences
    ' + + '
    ' + + '
    ' + + '
    '; + + sbf.pagedData.forEach(function(cv){ + + if (cv[1].length > 0) { + + domStr += '
    ' + + '
    ' + cv[0] + '
    ' + + '
    ' + cv[1][0] + '' + + ' to ' + + '' + cv[1].slice(-1) + '
    ' + + '
    '; + } + }); + + domStr += '
    '; + + $('#' + sbf.elID).append($.parseHTML(domStr)); + + $('.filter-by').on('click', function(){ + + $('.filter-by').each(function(){ + if (!$(this).hasClass('shadow')) { + $(this).removeClass('used-for-filtering'); + $(this).addClass('shadow'); + } + }); + + $(this).removeClass('shadow'); + $(this).addClass('used-for-filtering'); + sbf.filterFunc($(this).attr('data-entries')); + }); + + $('.clear-filter').on('click', function(){ + var od = $('#overview_div'); + $('#sequence_data_div').remove(); + + od.removeClass('col-md-8'); + od.addClass('col-md-12'); + $('#data-table').DataTable().search(''); + $('#data-table').DataTable().draw(); + }); + + }; + + sbf.pageData = function(){ + + sbf.pagedData = []; + + Object.keys(sbf.seqData).forEach(function(k){ + var numPages = Math.floor(sbf.seqData[k].length/sbf.pageSize); + var curPage; + + if (numPages === 0) { + sbf.pagedData.push([k, sbf.seqData[k]]); + } else { + //Page the large sequence array. + for (curPage = 0; curPage <= numPages; curPage += 1) { + sbf.pagedData.push( + [ + k + ' : Page ' + (curPage + 1), + sbf.seqData[k].slice((curPage * sbf.pageSize),((curPage * sbf.pageSize) + sbf.pageSize)) + ]); + } + } + }); + sbf.drawTable(); + }; + + sbf.init = function(confObj) { + sbf.pageSize = confObj.pageSize || 50; + sbf.seqData = confObj.seqData; + sbf.elID = confObj.elID; + sbf.pageData(); + sbf.filterFunc = confObj.callBack; + }; + + return sbf; +}(SequenceByFile || {}));// eslint-disable-line no-use-before-define +var VerifiedScans = (function(vs){ + + vs.psmEntrySQL = 'SELECT psm_entries.* FROM psm_entries ' + + 'WHERE psm_entries.spectrumID = ##ID## AND ' + + 'psm_entries.spectrumTitle = ##TITLE##'; + + vs.galaxyHeader = []; + + /** + * key: spectrum ID + * deleted: [T|F] + * score: + * sequence: peptide sequence + * savedToGalaxy: [T|F] + * + * @type {{}} + */ + vs.verifiedScans = {}; + + vs.sendToGalaxy = function(){ + var fData = vs.galaxyHeader.join('\t') + '\n'; + var payload = { + 'files_0|url_paste': null, + 'dbkey': '?', + 'file_type': 'tabular', + 'files_0|type': 'upload_dataset', + 'files_0|space_to_tab': null, + 'files_0|to_posix_lines': 'Yes' + }; + var postData = { + history_id: vs.galaxyConfiguration.historyID, + tool_id: 'upload1', + inputs: null + }; + + Object.keys(vs.verifiedScans).forEach(function(k){ + if (!vs.verifiedScans[k].savedToGalaxy && !vs.verifiedScans[k].deleted) { + fData += vs.verifiedScans[k].psmEntry.join('\t') + '\n'; + vs.verifiedScans[k].savedToGalaxy = true; + } + }); + + payload['files_0|url_paste'] = fData; + postData.inputs = JSON.stringify(payload); + + $.ajax({ + url: vs.galaxyConfiguration.href + '/api/tools', + type: 'POST', + error: function () { + console.log('ERROR in POSTING sequence file.'); + }, + success: function (data) { + console.log('ID for file is ' + data.outputs[0].id); + VerifiedScans.verifiedScans = {}; + $('#scan-count-badge').text(VerifiedScans.eligibleScansCount()); + }, + data: postData + }); + vs.eligibleScansCount(); + }; + + vs.eligibleScansCount = function(){ + var rVal = 0; + + Object.keys(vs.verifiedScans).forEach(function(cv){ + if (!(vs.verifiedScans[cv].deleted) && !vs.verifiedScans[cv].savedToGalaxy) { + rVal += 1; + } + }); + + if (rVal === 0) { + $('#scans-to-galaxy').attr('disabled', 'disabled') + } else { + $('#scans-to-galaxy').removeAttr('disabled'); + } + + return rVal + }; + + vs.removeScan = function(id) { + if (id in vs.verifiedScans) { + vs.verifiedScans[id].deleted = true; + $('#scan-count-badge').text(vs.eligibleScansCount()); + } + }; + + vs.addScore = function(id){ + var sql = vs.psmEntrySQL.replace('##ID##', '"' + id.split(',')[0] + '"'); + sql = sql.replace('##TITLE##', '"' + id.split(',')[1] + '"'); + var specID = id; + + $.get(vs.url + sql, function(data){ + if (vs.galaxyHeader.length === 0) { + vs.galaxyHeader = vs.galaxyHeader.concat(data.data[0]); + } + vs.verifiedScans[specID].psmEntry = data.data[1]; + }); + + }; + + vs.init = function(confObj){ + vs.galaxyConfiguration = confObj.galaxyConfiguration; + vs.url = vs.galaxyConfiguration.href + '/api/datasets/' + + vs.galaxyConfiguration.datasetID + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + + /** arg -> + * spectrum_pkid: RenderPSM.currentSpectra[$(this).val()].Spectrum_pkid, + peptide_pkid: RenderPSM.currentSpectra[$(this).val()].Peptide_pkid, + spectrum_title: + sequence: RenderPSM.currentSpectra[$(this).val()].sequence + + */ + vs.subscribe('userVerifiedSpectrum', function (arg){ + if (!((arg.spectrum_pkid + ',' + arg.spectrum_title) in vs.verifiedScans)) { + vs.verifiedScans[arg.spectrum_pkid + ',' + arg.spectrum_title] = { + deleted: false, + savedToGalaxy: false, + sequence: arg.sequence, + peptide_pkid: arg.peptide_pkid, + spectrum_pkid: arg.spectrum_pkid, + spectrum_title: arg.spectrum_title + + }; + vs.addScore(arg.spectrum_pkid + ',' + arg.spectrum_title); + } else { + vs.verifiedScans[arg.spectrum_pkid + ',' + arg.spectrum_title].deleted = false; + } + $('#scan-count-badge').text(vs.eligibleScansCount()); + }); + vs.subscribe('userUnverifiedSpectrum', function (arg){ + vs.removeScan(arg.scanID); + }); + + $('#scans-to-galaxy').on('click', function(){ + vs.sendToGalaxy(); + $('#scans-to-galaxy').tooltip('hide'); + }).attr('disabled', 'disabled'); + }; + + return vs; + +}(VerifiedScans || {}));// eslint-disable-line no-use-before-define + +const FeatureViewerHelp = { + 'title': 'Peptide-Protein Viewer Help', + 'helpText': '

    Purpose

    ' + + '

    The Peptide-Protein viewer displays the complete amino acid sequence for any selected protein within the sequence database used for matching MS/MS data.

    ' + + '
      ' + + '
    • The bottom line shows an overview map of the entire sequence, along with any PSMs matched to the sequence colored in yellow bars. The darker orange colored bar represents the peptide of interest selected originally from the Peptide Overview page which maps to this protein.
    • ' + + '
    • The lines above show a zoomed in view of selected regions of the protein sequence, with peptides from any PSMs below the overall protein sequence. Amino acids identified with post-translational modifications are shaded in gray; amino acid variants as compared to a reference are colored in brown within the overall protein sequence map.
    • ' + + '
    • The thinner top line above the amino acid sequence depicts the coding region on the chromosome for the protein, with arrows indicating the direction of transcription for these genomic coordinates. Breaks in this line indicate joining points of exons composing the mature gene product.
    • ' + + '
    ' + + '

    Actions

    ' + + '
    ' + + '
    Selected regions for viewing from the overall protein sequence
    ' + + '
    The gray rectangular box can be slid along the linear map of the protein sequence to view any given region of the protein sequence (and any corresponding PSMs) with higher resolution.
    ' + + '
    Opening Integrated Genomics Viewer (IGV)
    ' + + '
    Clicking on the thinner top line (with arrows indicating directionality) will open up the interactive IGV viewer, which can be used to map and characterize peptide sequences of interest against transcripts and genomic coding regions. The IGV tool opens within the same browser window
    ' + + '
    ' +}; + +//Code to manage creating and presenting peptide > protein > genome feature viewing +var featureViewer = { + + modalHTML: '', + + requestMSMSRender: function(id){ + featureViewer.publish('renderSingleMSMS', id); + }, + + //Gets CIGAR string from DB and transforms to JSON + getVarianceData: function(accession, dbsID, pepID, nextFunc) { + const proteinID = dbsID; + const peptideID = pepID; + const lAccession = accession; + const lNextFunc = nextFunc; + let url = featureViewer.galaxyConfiguration.href + '/api/datasets/##genomicDataset##?data_type=raw_data&provider=sqlite-table&headers=True&query='; + let sql = 'SELECT VA.cigar FROM variant_annotation VA WHERE VA.name = "' + accession + '"'; + + url = url.replace('##genomicDataset##', featureViewer.cigarDataset); + + /** + * '191=1X68=1X120=1X133=1X162=1X175=1X2=1X6=1X51=1X232=1X57=1*' + * matches + [['191', '='], + [ '1', 'X' ], + [ '68', '=' ], + [ '1', 'X' ], + [ '120', '=' ], + [ '1', 'X' ], + [ '133', '=' ], + [ '1', 'X' ], + [ '162', '=' ], + [ '1', 'X' ], + [ '175', '=' ], + [ '1', 'X' ], + [ '2', '=' ], + [ '1', 'X' ], + [ '6', '=' ], + [ '1', 'X' ], + [ '51', '=' ], + [ '1', 'X' ], + [ '232', '=' ], + [ '1', 'X' ], + [ '57', '=' ] ] + > + + substitutions: [{loc: 5, ref:'X'},{loc: 10, ref:'X'}], + deletions: [{loc: 12, missing: 'MILK'}, {loc: 20, missing: 'ELV'}], + additions: [{loc: 30, added: 'ELV'}], + aligns: [[40, 150], [20,30]] + + */ + + $.get(url + sql, function(data){ + let cigar;// = data.data[1][0]; + const re = RegExp('([0-9]+)([=|X|M|I|D])', 'g'); + let match; + let obj = { + substitutions: [], + deletions: [], + additions: [], + aligns: [] + }; + let idx = 0; //Starting offset into the protein sequence. + let offset; + + if (data.data.length < 2) { + if (lNextFunc) { + lNextFunc(lAccession, proteinID, peptideID); + } else { + featureViewer.queryFeatures(proteinID, peptideID); + } + } else { + + cigar = data.data[1][0]; + + while (match = re.exec(cigar)) { + offset = idx + Number.parseInt(match[1]) - 1; + switch (match[2]) { + case "=": + case "M": + obj.aligns.push([idx, offset]); + break; + case "X": + obj.substitutions.push({loc: offset}); + break; + case "D": + break; + case "I": + break; + } + idx += Number.parseInt(match[1]); + } + featureViewer.variantInformation = obj; + if (lNextFunc) { + lNextFunc(lAccession, proteinID, peptideID); + } else { + featureViewer.queryFeatures(proteinID, peptideID); + } + } + }); + + }, + + //http://localhost:8080/api/datasets/?data_type=raw_data&provider=sqlite-table&headers=True&query= + getGenomicCoordinate: function (accession, dbsID, pepID, nextFunc) { + var proteinID = dbsID; + var peptideID = pepID; + var fv = featureViewer; + var url = fv.galaxyConfiguration.href + '/api/datasets/##genomicDataset##?data_type=raw_data&provider=sqlite-table&headers=True&query='; + var sql = 'SELECT feature_cds_map.* FROM feature_cds_map WHERE feature_cds_map.name = "' + accession + '"'; + url = url.replace('##genomicDataset##', fv.genomicDataset); + + //TODO: catch error here for no find. + $.get(url + sql, function (data) { + var names = data.data[0]; + + featureViewer.genomicCoordinates = []; + + data.data.slice(1).forEach(function (d) { + var obj = {}; + d.forEach(function (cv, idx) { + obj[names[idx]] = cv; + }); + featureViewer.genomicCoordinates.push(obj); + }); + if (nextFunc) { + nextFunc(accession, proteinID, peptideID); + } else { + featureViewer.queryFeatures(proteinID, peptideID); + } + + }); + }, + + formatRawData: function (data) { + var objD = {}; //temporary obj + + /** + * 0: "start" + 1:"end" + 2:"isDecoy" + 3:"location" + 4:"name" + 5:"id" + 6:"sequence" + 7:"spectrumID" + 8:"spectrumTitle" + 9:"theoretical mass" + */ + + data.data.slice(1).forEach(function (d) { + var key = d[5]; //the psm id + if (!(key in objD)) { + objD[key] = {}; + objD[key].peptidePKID = d[5]; + objD[key].seq = d[6].split(''); + objD[key].start = d[0]; + objD[key].end = d[1]; + objD[key].isDecoy = d[2]; + objD[key].mods = []; + if (d[3] !== null) { + objD[key].mods.push([d[3], d[4]]); //[mod offset, mod name] + } + objD[key].spectrum_identID = d[7]; + objD[key].scores = [data.data[0].slice(10), d.slice(10)]; + } else { + //Multiple mods exist on the peptide. + if (d[3] !== null) { + objD[key].mods.push([d[3], d[4]]); //[mod offset, mod name] + } + } + }); + + return objD; + }, + + buildFeatures: function (data) { + var sqlData = data.sqlData; + var targetPeptide = featureViewer.peptideList[data.peptideID]; + var genomeArray = (featureViewer.genomicCoordinates) ? featureViewer.genomicCoordinates : null; + + var viewObject = { + dbkey: featureViewer.dbkey, + igvDiv: 'igvDiv', + baseDiv: '#' + featureViewer.baseDiv, + genome: genomeArray, + msmsRender: featureViewer.requestMSMSRender, + protein: (function () { + var obj = {}; + targetPeptide.proteins.forEach(function (d) { + if (d.protein_pkid.toString() === data.proteinID) { + obj.name = d.accession + ' : ' + d.description; + //Is there a sequence? + if (d.sequence) { + obj.sequence = d.sequence.split(''); //String to array. + } else { + obj.sequence = []; + } + } + }); + return obj; + })(), + peptideList: [], + variantInformation: featureViewer.variantInformation + }; + + var feats = featureViewer.formatRawData(sqlData); + + Object.keys(feats).forEach(function (k) { + var obj = {}; + var d = feats[k]; + obj.sequence = d.seq; + obj.offset = d.start - 1; //index starts at 1, want an offset. + obj.mismatch = []; + obj.spectrum_identID = d.spectrum_identID; + //Does this sequence differ from the protein sequence?? + (function () { + var p = viewObject.protein.sequence; + var f = obj.offset; + obj.sequence.forEach(function (d, i) { + if (!( p[i+f] === d)) { + obj.mismatch.push(i); + } + }); + })(); + + obj.score = (function () { + var s = '
    '; + d.scores[0].forEach(function (a, i) { + s += '
    ' + a + '
    ' + d.scores[1][i] + '
    '; + }); + return s + '
    '; + })(); + + if (d.mods.length > 0) { + obj.mods = d.mods; + } + + if (d.peptidePKID.toString() === data.peptideID) { + //This is feature 1 + obj['class'] = 'psm'; + } else { + obj['class'] = 'peptide'; + } + viewObject.peptideList.push(obj); + }); + + $('#' + featureViewer.baseDiv).empty(); + featureViewer.view = new PSMProteinViewer(viewObject); + featureViewer.view.renderSVG(); + $('#protein_viewer').prepend(''); + $('#clear_map').on('click', function () { + $('#' + featureViewer.baseDiv).empty(); + document.getElementById('d3-tooltip').remove(); + + }); + document.getElementById('fv_help').addEventListener('click', () => { + BuildHelpPanel.showHelp(FeatureViewerHelp); + }); + }, + + queryFeatures: function (dbs_id, pep_id) { + //The target peptide sequence + var vScores = ''; + var peptideID = pep_id; + var sql = 'SELECT\n' + + ' PE.start, PE.end, PE.isDecoy,\n' + + ' PM.location, PM.name, PSM.id, PSM.sequence, PSM.spectrumID, PSM.spectrumTitle, ##SCORES##\n' + + ' FROM\n' + + ' peptide_evidence PE,\n' + + ' peptides P, psm_entries PSM\n' + + ' LEFT OUTER JOIN peptide_modifications PM ON P.id = PM.peptide_ref\n' + + ' WHERE\n' + + ' PE.dBSequence_ref = "'+ dbs_id + '" AND\n' + + ' PE.peptide_ref = P.id AND\n' + + ' PSM.id = P.id'; + + if (featureViewer.visibleScores) { + featureViewer.visibleScores.forEach(function(cs){ + vScores += 'PSM."' + cs + '",'; + }); + vScores = vScores.slice(0, vScores.lastIndexOf(',')); + sql = encodeURIComponent(sql.replace("##SCORES##", vScores)); + } else { + sql = sql.replace("##SCORES##", "PSM.*") + } + + + featureViewer.queryFunc(sql, function (data) { + featureViewer.buildFeatures({ + sqlData: data, + peptideID: peptideID, + proteinID: dbs_id + }); + }); + + }, + + showDOM: function () { + var domS = featureViewer.modalHTML.replace('##TITLE##', 'View Peptides in Protein'); + var s = ''; + var pl = featureViewer.peptideList; + + Object.keys(pl).forEach(function (d, idx) { + s += '
    '; + s += '
    '; + //Iterate over the 1 .. n proteins this peptide is associated to. + pl[d].proteins.forEach(function (pObj) { + s += '
    '; + s += '
    ' + pObj['accession'] + '
    '; + //s += '
    ' + pObj['description'] + '
    '; + s += '
    '; + }); + s += '
    '; + }); + + domS = domS.replace('##BODY##', s); + $('#master_modal').empty().append(domS); + + $('.fv-protein').on('click', function () { + if ($(this).text().indexOf('REVERSED') > -1) { + var s = ''; + $('#' + featureViewer.baseDiv).append(s); + $('#peptide_protein').modal('hide'); + return; + } + + //Does the user history have genomic coordinates, variant coordinates, none or both? + if (featureViewer.genomicDataset) { + if (featureViewer.cigarDataset) { + featureViewer.getGenomicCoordinate( + $(this).find('.p_accession').text(), + $(this).attr('dbs_id'), + $(this).attr('pep_id'), + featureViewer.getVarianceData); + } else { + featureViewer.getGenomicCoordinate( + $(this).find('.p_accession').text(), + $(this).attr('dbs_id'), + $(this).attr('pep_id'), + null); + } + + } else if (featureViewer.cigarDataset) { + featureViewer.getVarianceData( + $(this).find('.p_accession').text(), + $(this).attr('dbs_id'), + $(this).attr('pep_id'), + null); + } + else { + featureViewer.queryFeatures($(this).attr('dbs_id'), $(this).attr('pep_id')); + } + + $('#peptide_protein').modal('hide'); + }); + + $('#peptide_protein').find('.btn-primary').on('click', function () { + $('#peptide_protein').modal('hide'); + }); + + $('#peptide_protein').modal('show'); + }, + + getProteinData: function (lst) { + var s = 'SELECT PE.peptide_ref, DB.id, DB.accession, DB.description, DB.sequence, DB.length ' + + ' FROM db_sequence DB, peptide_evidence PE ' + + ' WHERE PE.peptide_ref IN (##PEP_IDS##) AND PE.dBSequence_ref = DB.id'; + s = s.replace('##PEP_IDS##', lst.toString()); + + featureViewer.queryFunc(s, function (data) { + data.data.slice(1).forEach(function (d) { + var obj = {}; + if (!('proteins' in featureViewer.peptideList[d[0]])) { + featureViewer.peptideList[d[0]]['proteins'] = []; + } + obj['protein_pkid'] = d[1]; + obj['accession'] = d[2]; + obj['description'] = d[3]; + obj['length'] = d[5]; + obj['sequence'] = d[4]; + featureViewer.peptideList[d[0]]['proteins'].push(obj); + }); + featureViewer.showDOM(); + }); + }, + + getPeptideSequences: function (lst) { + var s = 'SELECT peptides.id, peptides.sequence FROM peptides WHERE peptides.id IN (##IDs##)' + var pepIDS = []; + lst.split(',').forEach(function(cv){ + pepIDS.push('"' + cv + '"'); + }); + s = s.replace('##IDs##', pepIDS.toString()); + + featureViewer.queryFunc(s, function (data) { + featureViewer.peptideList = {}; + data.data.slice(1).forEach(function (d) { + featureViewer.peptideList[d[0]] = {}; + featureViewer.peptideList[d[0]]['sequence'] = d[1]; + }); + featureViewer.getProteinData(pepIDS); + }); + + }, + + init: function (obj) { + featureViewer.galaxyConfiguration = obj.galaxyConfiguration; + featureViewer.baseDiv = obj.baseDiv; + featureViewer.queryFunc = obj.queryFunc; + featureViewer.variantInformation = { + substitutions: [], + deletions: [], + additions: [], + aligns: [] + }; + featureViewer.dbkey = obj.galaxyConfiguration.dbkey; + + + //Do we have Genomic metadata? + (function () { + var url = featureViewer.galaxyConfiguration.href + '/api/histories/' + featureViewer.galaxyConfiguration.historyID + '/contents/'; + + $.get(url, function (data) { + //Need to check if delete = True + data.forEach(function (d) { + if (d['extension'] === 'sqlite' && d['deleted'] === false && d['visible'] === true) { + $.get(featureViewer.galaxyConfiguration.href + d['url'], function (data) { + if (data['peek'].indexOf('feature_cds_map') > -1) { + featureViewer.genomicDataset = data['id']; + } + if (data['peek'].indexOf('variant_annotation') > -1) { + featureViewer.cigarDataset = data['id']; + } + }); + } + }); + }); + })(); + + featureViewer.subscribe('VisibleScores', function(arg){ + //These are the scores the user wants to see + featureViewer.visibleScores = arg; + }); + + featureViewer.subscribe('userRequestsViewInProteins', function (arg) { + //Get sequences and start the process + featureViewer.getPeptideSequences(arg); + }); + + } +};/** + * Module for basic SQL queries against galaxy. + * @type {{}} + */ +var gQuery = { + + href: null, + dataSetID: null, + + query: function(sql, callBackFN){ + var url = gQuery.href; + url += '/api/datasets/' + gQuery.datasetID + + '?data_type=raw_data&provider=sqlite-table&headers=True&query='; + url += sql; + + $.get(url, function (data) { + callBackFN(data); + }).fail(function(jqXHR) { + alert( "ERROR: query \n" + jqXHR.responseText + " \nfailed."); + }); + + }, + + init: function(confObj) { + gQuery.href = confObj.href; + gQuery.datasetID = confObj.datasetID; + } +} +/** + * Generate JSON of peptide sequences by file for filtering. + */ +var PeptideSequenceFilter = (function (psf) { + + psf.pepsByFile = {}; + psf.candidateFiles = []; + psf.timer; + + psf.historyContents = function (url) { + return new Promise(function (resolve,reject) { + psf.timer = setTimeout(function(){ + alert("Sorry, Galaxy is not responding. I have waited as long as I can. Grab a coffee, relax, and refresh the app in a bit."); + reject(new Error("Requesting data from Galaxy timeout")); + }, 30000); + $.get(url, resolve); + }); + }; + + psf.pepAJAX = function (fObj, cb) { + var url = psf.galaxyConfiguration.href + + '/api/histories/' + psf.galaxyConfiguration.historyID + + '/contents/' + fObj.obj.id + '/display'; + var cb_fn = cb; + var obj = fObj; + $.get(url, function (data) { + var cleanSequence = []; + + data.split('\n').forEach(function (v) { + var rx = new RegExp('[^a-z]|sequence', 'i'); //"sequence" cannot be in the string bc the column is named seqeunce???? + if (!v.match(rx)) { + if (v.length > 0) { + cleanSequence.push(v); + } + } + }); + psf.pepsByFile[obj.obj.name] = cleanSequence; + + cb_fn(); + }); + }; + + psf.peptideFileContents = function (fObj) { + var obj = fObj; + return new Promise(function (resolve) { + psf.pepAJAX(obj, resolve); + }) + }; + + /** + * Process REST return of list of user's current history. + * Want to find any entries that are not deleted and tabular. + */ + psf.processHistoryList = function (data) { + var availableFiles = []; + clearTimeout(psf.timer); + data.forEach(function (cv) { + if ((cv.extension === 'tabular') && !cv.deleted) { + availableFiles.push({ + name: cv.name, + obj: cv + }); + } + }); + psf.candidateFiles = availableFiles; + psf.publish('CandidateFilesAvailable', psf.candidateFiles); + psf.subscribe('ParseCandidateFiles', function (data) { + psf.parseCandidateFiles(data); + }) + + //TODO: Stop here and present available files to user. + }; + + psf.parseCandidateFiles = function (availableFiles) { + //promise chain to ensure that all tabular files are processed before letting user access + availableFiles + .map(psf.peptideFileContents) + .reduce( + function (chain, filePromise) { + return chain.then(function () { + return filePromise + }) + }, + Promise.resolve() //fulfilled Promise to start the reduce chain. + ) + .then(function () { + psf.publish('CandidateFilesParsed', { + data: psf.pepsByFile + }); + }); + }; + + psf.loadData = function () { + var url = psf.galaxyConfiguration.href + '/api/histories/' + psf.galaxyConfiguration.historyID + '/contents'; + var prHistory = psf.historyContents(url); + prHistory.then(psf.processHistoryList); + }; + + psf.init = function (confObj) { + psf.galaxyConfiguration = confObj.galaxyConfiguration; + psf.subscribe('dataTableInitialized', function () { + psf.loadData(); + }); + }; + + return psf; +}(PeptideSequenceFilter || {})); // eslint-disable-line no-use-before-define + +/** + * General utility for building and presenting modal help + */ +var BuildHelpPanel = (function (bhp){ + bhp.domStr = ''; + + bhp.finalDom = ''; + + bhp.showHelp = function(confObj) { + + bhp.finalDom = bhp.domStr.replace('#HELP_TEXT#', confObj.helpText); + bhp.finalDom = bhp.finalDom.replace('#MODAL_TITLE#', confObj.title) + $('#master_modal').empty().append(bhp.finalDom); + $('#user_help_modal').modal('show'); + } + return bhp; +}(BuildHelpPanel || {})); + +/** + * Handle general configurations for the app. + */ +var ConfigModal = (function (cm){ + + cm.userDefaults = { + 'tool_tip_visible': true + }; + + cm.domStr = ''; + + cm.showConfig = function(){ + $('#master_modal').empty().append(cm.domStr); + + Object.keys(cm.userDefaults).forEach(function (k) { + var s = 'input[value="' + k + '"]'; + document.querySelector(s).checked = cm.userDefaults[k]; + }); + + $('#save_config_change').on('click', function(){ + var configs = document.querySelectorAll('input[class="app_config"]'); + var msgObj = {}; + configs.forEach(function (cv) { + msgObj[cv.getAttribute('value')] = cv.checked; + cm.userDefaults[cv.getAttribute('value')] = cv.checked; + }); + cm.publish('UserChangedDefaults', msgObj); + $('#app_config_modal').modal('hide'); + }); + + $('#app_config_modal').modal('show'); + }; + + return cm; + +}(ConfigModal || {})); + + +/** + * There can be many, many scores available to the user. This code allows for + * managing which scores are visible. + * + * By default, only scores that are present on > 85% of PSM entries are visible. + */ +var ScoreDefaults = (function (sd){ + + sd.defaultThreshold = 0.85; + sd.scoreProperties = {}; + + sd.resetDOM = function() { + $('#score_default_div').empty(); + $('#score_defaults').removeAttr(" disabled"); + } + + sd.modifyVisibleScores = function(){ + var rVal = []; + $('div .score_name').each(function(){ + sd.scoreProperties[$(this).text()] = $(this).hasClass('selected'); + }); + + Object.keys(sd.scoreProperties).forEach(function(key){ + if (sd.scoreProperties[key]) { + rVal.push(key); + } + }); + sd.publish('VisibleScores', rVal); + + sd.resetDOM(); + }; + + sd.showDOM = function(){ + + let domStr = '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    Choose Score Visibility
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    '; + + //Build out the panel body + var scoreStr = ''; + Object.keys(sd.scoreProperties).forEach(function(s, idx){ + + if (idx === 0) { + scoreStr = '
    '; + } + if ((idx % 2 === 0) && (idx > 0)) { + scoreStr += '
    '; + } + + if (sd.scoreProperties[s]) { + scoreStr += '
    ' + s + '
    ' + } else { + scoreStr += '
    ' + s + '
    ' + } + + if (idx % 2 > 0) { + scoreStr += '
    '; + } + }); + + domStr += scoreStr + '
    '; + $('#score_default_div').append(domStr); + $('div .score_name').on('click', function(){ + $(this).toggleClass('selected'); + + }); + $('#clear_div_btn').on('click', function(){ + sd.resetDOM(); + }); + $('#set_score_defaults_btn').on('click', sd.modifyVisibleScores); + }; + + sd.prepareDOM = function() { + let b = $('#score_defaults'); + b.removeAttr("disabled"); + b.on('click', function() { + $('#score_defaults').attr('disabled', 'disabled'); + sd.showDOM(); + $('#score_defaults').tooltip('hide'); + }); + }; + + sd.init = function () { + + sd.subscribe('RequestVisibleScores', function(){ + var rVal = []; + Object.keys(sd.scoreProperties).forEach(function(key){ + if (sd.scoreProperties[key]) { + rVal.push(key); + } + }); + sd.publish('VisibleScores', rVal); + sd.prepareDOM(); + }); + + sd.subscribe('RankedScoresAvailable', function(arg){ + //arg is an array of [scorename, pct coverage] ordered by pct coverage desc + arg.forEach(function(s){ + if (s[1] > sd.defaultThreshold) { + //By default show + sd.scoreProperties[s[0]] = true; + } else { + //By default hide + sd.scoreProperties[s[0]] = false; + } + }); + + }); + sd.publish('RequestRankedScores'); + + }; + + return sd; +}(ScoreDefaults || {}));//eslint-disable-line no-use-before-define + + +const MVPHelp = { + 'text': '

    Purpose

    The Galaxy-based MVP visualization plugin enables viewing of results produced from workflows integrating genomic sequencing data and mass spectrometry (MS)-based proteomics data, commonly known as proteogenomics. The multi-functional tool allows for organization and filtering of results, quality assessment of tandem mass spectrometry (MS/MS) data matched to peptide sequences, and visualization of data at both the protein and gene level. A user can, with relatively few keystrokes, filter and order large datasets down to a manageable subset. Due to the tools use of server-side caching, large data sets are handled as quickly as small datasets.

    ' + + '

    MVP incorporates the Lorikeet viewer for visualizing MS/MS data as well as the Integrated Genomics Viewer (IGV) for mapping peptide and protein sequences to genomic coordinates, essential for characterizing protein sequence variants arising from gene and transcript variants.

    ' + + '

    The starting page provides peptide-centric overview of peptide spectral matches (PSMs) identified using sequence database searching against a protein sequence database, and summarized in a MZSqlite-formatted input file. From this page, a user can carry-out a number of operations, including:

    ' + + '
    • PSMs linked to unique peptide sequences of interest
    • ' + + '
    • PSMs passing scoring thresholds to ensure quality
    • ' + + '
    • Visualization of MS/MS annotation and quality for selected PSMs
    • ' + + '
    • Mapping PSMs to overall protein sequences
    • ' + + '
    • Mapping protein sequences to genomic coordinates
    • ' + + '
    • Visualization of protein sequence variants comparison to reference protein and gene sequences
    • ' + + '
    • Archiving of PSMs of interest and automated transfer of selected results back to Galaxy for further analyses
    • ' + + '
    • Archiving of visualizations
    ' + + '

    Actions

    ' + + '
    ID Scores
    Clicking on this button provides a view of the distribution of PSMs for the entire dataset based on false discovery rate (FDR) estimates of the sequence database searching tools used to produce PSMs, if available. This shows the percent of PSMs passing FDR thresholds dependent on assigned PSM scores. Clicking on the button a second time removes the graph.
    ' + + '
    ID Features
    Clicking on this button generates the list of scoring metrics produced by the sequence database searching software used to generate PSMs. The user can select the scoring metrics to be shown when examining in detail any PSMs matching to peptide sequences of interest.
    ' + + '
    Export Scans
    Clicking this button automatically exports selected peptide sequences and associated MS/MS data back to Galaxy, where it is shown as a new item in the active History in tabular format
    ' + +}; + + +/** + * Mediator pattern as main application. + */ +var MVPApplication = (function (app) { + app.debug = true; //Listen in on event publish + app.galaxyConfiguration = {}; + app.events = {}; + app.userDefaults = null; + + //Hold some basic defaults. User can override. + app.app_defaults = { + "tool_tip_visible": true + }; + + /** + * Allows objects to subscribe to an event. + * @param event name + * @param fn call back function for event + * @returns {subscribe} + */ + app.subscribe = function (event, fn) { + if (!app.events[event]) { + app.events[event] = []; + } + app.events[event].push({ + context: this, + callback: fn + }); + return this; + }; + + /** + * Unsubscribes from the event queue + * @param event + * @param fn + */ + app.unsubscribe = function (event) { + app.event[event].filter(function (cv) { + return this === cv.context; + }.bind(this)); + }; + + + /** + * Allows objects to broadcast the occurrence of an event. + * All subscribers to the event will have their callback functions + * called. + * + * @param event name + * @returns {*} + */ + app.publish = function (event) { + var args, subscription; + + if (!app.events[event]) { + return false; + } + args = Array.prototype.slice.call(arguments, 1); + + if (app.debug) { + console.log('APP PUBLISH: ' + event + ' ARGS: ' + args); + } + + app.events[event].map(function (cv) { + subscription = cv; + subscription.callback.apply(subscription.context, args); + }); + return this; + }; + + /** + * Adds the subscribe and publish functions to an object + * @param obj + */ + app.installTo = function (obj) { + obj.subscribe = app.subscribe; + obj.publish = app.publish; + obj.unsubscribe = app.unsubscribe; + }; + + //Load modules + app.init = function (confObj) { + this.galaxyConfiguration = confObj; + + $('#dataset_name').text(this.galaxyConfiguration.dataName); + + this.subscribe("ScoreSummaryComplete", function(){ + console.log('Score summary complete, begin table construction'); + ScoreDefaults.init(); + PeptideView.init({ + galaxyConfiguration: this.galaxyConfiguration, + baseDiv: 'overview_div' + }); + + }); + + this.subscribe("FDRDataPrepared", function(){ + $('#fdr_module').removeAttr('disabled') + .on('click', function(){ + $('#fdr_div').toggle(); + $('html, body').animate({ + scrollTop: ($('#fdr_div').offset().top) + },500); + $('#fdr_module').tooltip('hide') + }); + + }); + + this.subscribe('UserChangedDefaults', function(data){ + Object.keys(data).forEach(function(k){ + console.log('UserChangedDefaults ' + k + " : " + data[k]); + app.app_defaults[k] = data[k]; + if (k === 'tool_tip_visible') { + if (data[k]) { + $('[data-toggle="tooltip"]').tooltip(); + } else { + $('[data-toggle="tooltip"]').tooltip('destroy'); + } + } + + }); + }); + + this.installTo(ScoreSummary); + this.installTo(PeptideView); + this.installTo(RenderPSM); + this.installTo(VerifiedScans); + this.installTo(PeptideSequenceFilter); + this.installTo(featureViewer); + this.installTo(gQuery); + this.installTo(ScoreDefaults); + this.installTo(FDRPresentation); + this.installTo(ScoreFilterModule); + this.installTo(IGVManager); + this.installTo(IGVTrackManager); + this.installTo(BuildHelpPanel); + this.installTo(ConfigModal); + + ScoreFilterModule.init({}); + + gQuery.init({ + href: this.galaxyConfiguration.href, + datasetID: this.galaxyConfiguration.datasetID + }); + + featureViewer.init({ + galaxyConfiguration: this.galaxyConfiguration, + baseDiv: 'protein_viewer', + queryFunc: gQuery.query, + dbkey: this.galaxyConfiguration.dbkey + }); + + RenderPSM.init({ + galaxyConfiguration: this.galaxyConfiguration + }); + + + VerifiedScans.init({ + galaxyConfiguration: this.galaxyConfiguration + }); + + PeptideSequenceFilter.init({ + galaxyConfiguration: this.galaxyConfiguration + }); + + ScoreSummary.init({ + href: this.galaxyConfiguration.href, + datasetID: this.galaxyConfiguration.datasetID + }); + + IGVManager.init({ + galaxyConfiguration: this.galaxyConfiguration + }); + + IGVTrackManager.init({ + galaxyConfiguration: this.galaxyConfiguration + }); + + if (("protein_detection_protocol" in confObj.tableRowCount)){ + FDRPresentation.init({ + href: this.galaxyConfiguration.href, + datasetID: this.galaxyConfiguration.datasetID, + divID: "fdr_div", + callBackFN: PeptideView.reBuildTable + }); + } + $('[data-toggle="tooltip"]').tooltip(); + + $('#mvp_help').on('click', function(){ + BuildHelpPanel.showHelp({ + 'helpText': MVPHelp.text, + 'title': 'Multi-omics Visualization Platform (MVP) Viewer' + }); + }); + + $('#mvp_full_window').on('click', function(){ + $('#mvp_full_window').tooltip('hide'); + window.open('#', '_blank'); + }); + + $('#mvp_config').on('click', function(){ + ConfigModal.showConfig(); + }); + }; + + return { + run: function(confbj) { + app.init(confbj); + } + } + +}(MVPApplication || {})); // eslint-disable-line no-use-before-define \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/js/lib/aminoacid.js b/config/plugins/visualizations/mvpapp/static/js/lib/aminoacid.js new file mode 100755 index 00000000000..1fe8c936432 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/js/lib/aminoacid.js @@ -0,0 +1,66 @@ +// $LastChangedDate$ +// $LastChangedBy$ +// $LastChangedRevision$ + +function AminoAcid(aaCode, aaShortName, aaName, monoMass, avgMass) { + this.code = aaCode; + this.shortName = aaShortName; + this.name = aaName; + this.mono = monoMass; + this.avg = avgMass; + + this.get = _getAA; +} + +AminoAcid.A = new AminoAcid ("A", "Ala", "Alanine", 71.037113805, 71.0779); +AminoAcid.R = new AminoAcid ("R", "Arg", "Arginine", 156.101111050, 156.18568); +AminoAcid.N = new AminoAcid ("N", "Asn", "Asparagine", 114.042927470, 114.10264); +AminoAcid.D = new AminoAcid ("D", "Asp", "Aspartic Acid", 115.026943065, 115.0874); +AminoAcid.C = new AminoAcid ("C", "Cys", "Cysteine", 103.009184505, 103.1429); +AminoAcid.E = new AminoAcid ("E", "Glu", "Glutamine", 129.042593135, 129.11398); +AminoAcid.Q = new AminoAcid ("Q", "Gln", "Glutamic Acid", 128.058577540, 128.12922); +AminoAcid.G = new AminoAcid ("G", "Gly", "Glycine", 57.021463735, 57.05132); +AminoAcid.H = new AminoAcid ("H", "His", "Histidine", 137.058911875, 137.13928); +AminoAcid.I = new AminoAcid ("I", "Ile", "Isoleucine", 113.084064015, 113.15764); +AminoAcid.L = new AminoAcid ("L", "Leu", "Leucine", 113.084064015, 113.15764); +AminoAcid.K = new AminoAcid ("K", "Lys", "Lysine", 128.094963050, 128.17228); +AminoAcid.M = new AminoAcid ("M", "Met", "Methionine", 131.040484645, 131.19606); +AminoAcid.F = new AminoAcid ("F", "Phe", "Phenylalanine", 147.068413945, 147.17386); +AminoAcid.P = new AminoAcid ("P", "Pro", "Proline", 97.052763875, 97.11518); +AminoAcid.S = new AminoAcid ("S", "Ser", "Serine", 87.032028435, 87.0773); +AminoAcid.T = new AminoAcid ("T", "Thr", "Threonine", 101.047678505, 101.10388); +AminoAcid.W = new AminoAcid ("W", "Trp", "Tryptophan", 186.079312980, 186.2099); +AminoAcid.Y = new AminoAcid ("Y", "Tyr", "Tyrosine", 163.063328575, 163.17326); +AminoAcid.V = new AminoAcid ("V", "Val", "Valine", 99.068413945, 99.13106); + + +AminoAcid.aa = []; +AminoAcid.aa["A"] = AminoAcid.A; +AminoAcid.aa["R"] = AminoAcid.R; +AminoAcid.aa["N"] = AminoAcid.N; +AminoAcid.aa["D"] = AminoAcid.D; +AminoAcid.aa["C"] = AminoAcid.C; +AminoAcid.aa["E"] = AminoAcid.E; +AminoAcid.aa["Q"] = AminoAcid.Q; +AminoAcid.aa["G"] = AminoAcid.G; +AminoAcid.aa["H"] = AminoAcid.H; +AminoAcid.aa["I"] = AminoAcid.I; +AminoAcid.aa["L"] = AminoAcid.L; +AminoAcid.aa["K"] = AminoAcid.K; +AminoAcid.aa["M"] = AminoAcid.M; +AminoAcid.aa["F"] = AminoAcid.F; +AminoAcid.aa["P"] = AminoAcid.P; +AminoAcid.aa["S"] = AminoAcid.S; +AminoAcid.aa["T"] = AminoAcid.T; +AminoAcid.aa["W"] = AminoAcid.W; +AminoAcid.aa["Y"] = AminoAcid.Y; +AminoAcid.aa["V"] = AminoAcid.V; + +AminoAcid.get = _getAA; + +function _getAA(aaCode) { + if(AminoAcid.aa[aaCode]) + return AminoAcid.aa[aaCode]; + else + return new AminoAcid(aaCode, aaCode, 0.0, 0.0); +} diff --git a/config/plugins/visualizations/mvpapp/static/js/lib/d3.min.js b/config/plugins/visualizations/mvpapp/static/js/lib/d3.min.js new file mode 100644 index 00000000000..97e95812f50 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/js/lib/d3.min.js @@ -0,0 +1,2 @@ +// https://d3js.org Version 4.12.2. Copyright 2017 Mike Bostock. +(function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";function n(t,n){return tn?1:t>=n?0:NaN}function e(t){return 1===t.length&&(t=function(t){return function(e,r){return n(t(e),r)}}(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}function r(t,n){return[t,n]}function i(t){return null===t?NaN:+t}function o(t,n){var e,r,o=t.length,u=0,a=-1,c=0,s=0;if(null==n)for(;++a1)return s/(u-1)}function u(t,n){var e=o(t,n);return e?Math.sqrt(e):e}function a(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=Ys?10:o>=Bs?5:o>=Hs?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ys?10:o>=Bs?5:o>=Hs?2:1)}function p(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Ys?i*=10:o>=Bs?i*=5:o>=Hs&&(i*=2),n=1)return+e(t[r-1],r-1,t);var r,o=(r-1)*n,u=Math.floor(o),a=+e(t[u],u,t);return a+(+e(t[u+1],u+1,t)-a)*(o-u)}}function g(t){for(var n,e,r,i=t.length,o=-1,u=0;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e}function _(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r}function y(t){if(!(i=t.length))return[];for(var n=-1,e=_(t,m),r=new Array(e);++n=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Js.hasOwnProperty(n)?{space:Js[n],local:t}:t}function A(t){var n=E(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Qs&&n.documentElement.namespaceURI===Qs?n.createElement(t):n.createElementNS(e,t)}})(n)}function C(){return new z}function z(){this._="@"+(++Ks).toString(36)}function P(t,n,e){return t=R(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function R(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function L(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;rn?1:t>=n?0:NaN}function Z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G(t,n){return t.style.getPropertyValue(n)||Z(t).getComputedStyle(t,null).getPropertyValue(n)}function Q(t){return t.trim().split(/^|\s+/)}function J(t){return t.classList||new K(t)}function K(t){this._node=t,this._names=Q(t.getAttribute("class")||"")}function tt(t,n){for(var e=J(t),r=-1,i=n.length;++r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=hf.exec(t))?St(parseInt(n[1],16)):(n=pf.exec(t))?new zt(n[1],n[2],n[3],1):(n=df.exec(t))?new zt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=vf.exec(t))?Et(n[1],n[2],n[3],n[4]):(n=gf.exec(t))?Et(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=_f.exec(t))?Pt(n[1],n[2]/100,n[3]/100,1):(n=yf.exec(t))?Pt(n[1],n[2]/100,n[3]/100,n[4]):mf.hasOwnProperty(t)?St(mf[t]):"transparent"===t?new zt(NaN,NaN,NaN,0):null}function St(t){return new zt(t>>16&255,t>>8&255,255&t,1)}function Et(t,n,e,r){return r<=0&&(t=n=e=NaN),new zt(t,n,e,r)}function At(t){return t instanceof Nt||(t=kt(t)),t?(t=t.rgb(),new zt(t.r,t.g,t.b,t.opacity)):new zt}function Ct(t,n,e,r){return 1===arguments.length?At(t):new zt(t,n,e,null==r?1:r)}function zt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Pt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Lt(t,n,e,r)}function Rt(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Lt)return new Lt(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=kt(t)),!t)return new Lt;if(t instanceof Lt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new Lt(u,a,c,t.opacity)}(t):new Lt(t,n,e,null==r?1:r)}function Lt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Dt(t){if(t instanceof Ot)return new Ot(t.l,t.a,t.b,t.opacity);if(t instanceof jt){var n=t.h*xf;return new Ot(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof zt||(t=At(t));var e=Bt(t.r),r=Bt(t.g),i=Bt(t.b),o=Ft((.4124564*e+.3575761*r+.1804375*i)/wf),u=Ft((.2126729*e+.7151522*r+.072175*i)/Mf);return new Ot(116*u-16,500*(o-u),200*(u-Ft((.0193339*e+.119192*r+.9503041*i)/Tf)),t.opacity)}function Ut(t,n,e,r){return 1===arguments.length?Dt(t):new Ot(t,n,e,null==r?1:r)}function Ot(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ft(t){return t>Ef?Math.pow(t,1/3):t/Sf+Nf}function It(t){return t>kf?t*t*t:Sf*(t-Nf)}function Yt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Bt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ht(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof jt)return new jt(t.h,t.c,t.l,t.opacity);t instanceof Ot||(t=Dt(t));var n=Math.atan2(t.b,t.a)*bf;return new jt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new jt(t,n,e,null==r?1:r)}function jt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Xt(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);t instanceof zt||(t=At(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Lf*r+Pf*n-Rf*e)/(Lf+Pf-Rf),o=r-i,u=(zf*(e-i)-Af*o)/Cf,a=Math.sqrt(u*u+o*o)/(zf*i*(1-i)),c=a?Math.atan2(u,o)*bf-120:NaN;return new Vt(c<0?c+360:c,a,i,t.opacity)}(t):new Vt(t,n,e,null==r?1:r)}function Vt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function $t(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}function Wt(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):Gt(isNaN(t)?n:t)}function Kt(t){return 1==(t=+t)?tn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Gt(isNaN(n)?e:n)}}function tn(t,n){var e=n-t;return e?Qt(t,e):Gt(isNaN(t)?n:t)}function nn(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:on(e,r)})),o=Xf.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:on(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:on(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,c),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:on(t,e)},{i:a-2,x:on(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,c),o=u=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--ul}function wn(){ll=(fl=pl.now())+hl,ul=al=0;try{bn()}finally{ul=0,function(){var t,n,e=Ff,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ff=n);If=t,Tn(r)}(),ll=0}}function Mn(){var t=pl.now(),n=t-fl;n>sl&&(hl-=n,fl=t)}function Tn(t){if(!ul){al&&(al=clearTimeout(al));t-ll>24?(t<1/0&&(al=setTimeout(wn,t-pl.now()-hl)),cl&&(cl=clearInterval(cl))):(cl||(fl=pl.now(),cl=setInterval(Mn,sl)),ul=1,dl(wn))}}function Nn(t,n,e){var r=new mn;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}function kn(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};(function(t,n,e){function r(c){var s,f,l,h;if(e.state!==yl)return o();for(s in a)if((h=a[s]).name===e.name){if(h.state===xl)return Nn(r);h.state===bl?(h.state=Ml,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete a[s]):+s_l)throw new Error("too late; already scheduled");return e}function En(t,n){var e=An(t,n);if(e.state>ml)throw new Error("too late; already started");return e}function An(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Cn(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>ml&&e.stateMath.abs(t[1]-D[1])?b=!0:x=!0),D=t,m=!0,Xn(),o()}function o(){var t;switch(_=D[0]-q[0],y=D[1]-q[1],T){case Jl:case Ql:N&&(_=Math.max(C-a,Math.min(P-p,_)),s=a+_,d=p+_),k&&(y=Math.max(z-l,Math.min(R-v,y)),h=l+y,g=v+y);break;case Kl:N<0?(_=Math.max(C-a,Math.min(P-a,_)),s=a+_,d=p):N>0&&(_=Math.max(C-p,Math.min(P-p,_)),s=a,d=p+_),k<0?(y=Math.max(z-l,Math.min(R-l,y)),h=l+y,g=v):k>0&&(y=Math.max(z-v,Math.min(R-v,y)),h=l,g=v+y);break;case th:N&&(s=Math.max(C,Math.min(P,a-_*N)),d=Math.max(C,Math.min(P,p+_*N))),k&&(h=Math.max(z,Math.min(R,l-y*k)),g=Math.max(z,Math.min(R,v+y*k)))}d0&&(a=s-_),k<0?v=g-y:k>0&&(l=h-y),T=Jl,I.attr("cursor",ih.selection),o());break;default:return}Xn()},!0).on("keyup.brush",function(){switch(t.event.keyCode){case 16:L&&(x=b=L=!1,o());break;case 18:T===th&&(N<0?p=d:N>0&&(a=s),k<0?v=g:k>0&&(l=h),T=Kl,o());break;case 32:T===Jl&&(t.event.altKey?(N&&(p=d-_*N,a=s+_*N),k&&(v=g-y*k,l=h+y*k),T=th):(N<0?p=d:N>0&&(a=s),k<0?v=g:k>0&&(l=h),T=Kl),I.attr("cursor",ih[M]),o());break;default:return}Xn()},!0).on("mousemove.brush",e,!0).on("mouseup.brush",u,!0);vt(t.event.view)}jn(),Cn(w),r.call(w),U.start()}}function a(){var t=this.__brush||{selection:null};return t.extent=s.apply(this,arguments),t.dim=n,t}var c,s=Wn,f=$n,l=N(e,"start","brush","end"),h=6;return e.move=function(t,e){t.selection?t.on("start.brush",function(){i(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){i(this,arguments).end()}).tween("brush",function(){function t(t){u.selection=1===t&&Gn(s)?null:f(t),r.call(o),a.brush()}var o=this,u=o.__brush,a=i(o,arguments),c=u.selection,s=n.input("function"==typeof e?e.apply(this,arguments):e,u.extent),f=cn(c,s);return c&&s?t:t(1)}):t.each(function(){var t=arguments,o=this.__brush,u=n.input("function"==typeof e?e.apply(this,t):e,o.extent),a=i(this,t).beforestart();Cn(this),o.selection=null==u||Gn(u)?null:u,r.call(this),a.start().brush().end()})},o.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){D(new function(t,n,e){this.target=t,this.type=n,this.selection=e}(e,t,n.output(this.state.selection)),l.apply,l,[t,this.that,this.args])}},e.extent=function(t){return arguments.length?(s="function"==typeof t?t:Hn([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),e):s},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:Hn(!!t),e):f},e.handleSize=function(t){return arguments.length?(h=+t,e):h},e.on=function(){var t=l.on.apply(l,arguments);return t===l?e:t},e}function Jn(t){return function(){return t}}function Kn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function te(){return new Kn}function ne(t){return t.source}function ee(t){return t.target}function re(t){return t.radius}function ie(t){return t.startAngle}function oe(t){return t.endAngle}function ue(){}function ae(t,n){var e=new ue;if(t instanceof ue)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i=u?s=!0:(e=t.charCodeAt(a++))===Mh?f=!0:e===Th&&(f=!0,t.charCodeAt(a)===Mh&&++a),t.slice(r+1,n-1).replace(/""/g,'"')}for(;a=(o=(v+_)/2))?v=o:_=o,(f=e>=(u=(g+y)/2))?g=u:y=u,i=p,!(p=p[l=f<<1|s]))return i[l]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),n===a&&e===c)return d.next=p,i?i[l]=d:t._root=d,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(s=n>=(o=(v+_)/2))?v=o:_=o,(f=e>=(u=(g+y)/2))?g=u:y=u}while((l=f<<1|s)==(h=(c>=u)<<1|a>=o));return i[h]=p,i[l]=d,t}function me(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function xe(t){return t[0]}function be(t){return t[1]}function we(t,n,e){var r=new Me(null==n?xe:n,null==e?be:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Me(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Te(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function Ne(t){return t.x+t.vx}function ke(t){return t.y+t.vy}function Se(t){return t.index}function Ee(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function Ae(t){return t.x}function Ce(t){return t.y}function ze(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Pe(t){return(t=ze(Math.abs(t)))?t[1]:NaN}function Re(t,n){var e=ze(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function Le(t){return new qe(t)}function qe(t){if(!(n=Ih.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(c=!0,f="g"):Fh[f]||(f=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=c,this.precision=s,this.type=f}function De(t){return t}function Ue(t){function n(t){function n(t){var n,r,u,f=g,x=_;if("c"===v)x=y(t)+x,t="";else{var b=(t=+t)<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),f=(b?"("===s?s:"-":"-"===s||"("===s?"":s)+f,x=x+("s"===v?Bh[8+Dh/3]:"")+(b&&"("===s?")":""),m)for(n=-1,r=t.length;++n(u=t.charCodeAt(n))||u>57){x=(46===u?i+t.slice(n+1):t.slice(n))+x,t=t.slice(0,n);break}}p&&!l&&(t=e(t,1/0));var w=f.length+t.length+x.length,M=w>1)+f+t+x+M.slice(w);break;default:t=M+f+t+x}return o(t)}var a=(t=Le(t)).fill,c=t.align,s=t.sign,f=t.symbol,l=t.zero,h=t.width,p=t.comma,d=t.precision,v=t.type,g="$"===f?r[0]:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?r[1]:/[%p]/.test(v)?u:"",y=Fh[v],m=!v||/[defgprs%]/.test(v);return d=null==d?v?6:12:/[gprs]/.test(v)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),n.toString=function(){return t+""},n}var e=t.grouping&&t.thousands?function(t,n){return function(e,r){for(var i=e.length,o=[],u=0,a=t[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(e.substring(i-=a,i+a)),!((c+=a+1)>r));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}}(t.grouping,t.thousands):De,r=t.currency,i=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(t.numerals):De,u=t.percent||"%";return{format:n,formatPrefix:function(t,e){var r=n((t=Le(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Pe(e)/3))),o=Math.pow(10,-i),u=Bh[8+i/3];return function(t){return r(o*t)+u}}}}function Oe(n){return Yh=Ue(n),t.format=Yh.format,t.formatPrefix=Yh.formatPrefix,Yh}function Fe(t){return Math.max(0,-Pe(Math.abs(t)))}function Ie(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Pe(n)/3)))-Pe(Math.abs(t)))}function Ye(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Pe(n)-Pe(t))+1}function Be(){return new He}function He(){this.reset()}function je(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}function Xe(t){return t>1?0:t<-1?Mp:Math.acos(t)}function Ve(t){return t>1?Tp:t<-1?-Tp:Math.asin(t)}function $e(t){return(t=Up(t/2))*t}function We(){}function Ze(t,n){t&&Bp.hasOwnProperty(t.type)&&Bp[t.type](t,n)}function Ge(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i=0?1:-1,i=r*e,o=Pp(n),u=Up(n),a=$h*u,c=Vh*o+a*Pp(i),s=a*r*Up(i);Hp.add(zp(s,c)),Xh=t,Vh=o,$h=u}function rr(t){return[zp(t[1],t[0]),Ve(t[2])]}function ir(t){var n=t[0],e=t[1],r=Pp(e);return[r*Pp(n),r*Up(n),Up(e)]}function or(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ur(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function ar(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function cr(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function sr(t){var n=Fp(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function fr(t,n){ep.push(rp=[Wh=t,Gh=t]),nQh&&(Qh=n)}function lr(t,n){var e=ir([t*Ep,n*Ep]);if(np){var r=ur(np,e),i=ur([r[1],-r[0],0],r);sr(i),i=rr(i);var o,u=t-Jh,a=u>0?1:-1,c=i[0]*Sp*a,s=Ap(u)>180;s^(a*JhQh&&(Qh=o):(c=(c+360)%360-180,s^(a*JhQh&&(Qh=n))),s?t_r(Wh,Gh)&&(Gh=t):_r(t,Gh)>_r(Wh,Gh)&&(Wh=t):Gh>=Wh?(tGh&&(Gh=t)):t>Jh?_r(Wh,t)>_r(Wh,Gh)&&(Gh=t):_r(t,Gh)>_r(Wh,Gh)&&(Wh=t)}else ep.push(rp=[Wh=t,Gh=t]);nQh&&(Qh=n),np=e,Jh=t}function hr(){$p.point=lr}function pr(){rp[0]=Wh,rp[1]=Gh,$p.point=fr,np=null}function dr(t,n){if(np){var e=t-Jh;Vp.add(Ap(e)>180?e+(e>0?360:-360):e)}else Kh=t,tp=n;Xp.point(t,n),lr(t,n)}function vr(){Xp.lineStart()}function gr(){dr(Kh,tp),Xp.lineEnd(),Ap(Vp)>bp&&(Wh=-(Gh=180)),rp[0]=Wh,rp[1]=Gh,np=null}function _r(t,n){return(n-=t)<0?n+360:n}function yr(t,n){return t[0]-n[0]}function mr(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nMp?t-kp:t<-Mp?t+kp:t,n]}function Rr(t,n,e){return(t%=kp)?n||e?zr(qr(t),Dr(n,e)):qr(t):n||e?Dr(n,e):Pr}function Lr(t){return function(n,e){return n+=t,[n>Mp?n-kp:n<-Mp?n+kp:n,e]}}function qr(t){var n=Lr(t);return n.invert=Lr(-t),n}function Dr(t,n){function e(t,n){var e=Pp(n),a=Pp(t)*e,c=Up(t)*e,s=Up(n),f=s*r+a*i;return[zp(c*o-f*u,a*r-s*i),Ve(f*o+c*u)]}var r=Pp(t),i=Up(t),o=Pp(n),u=Up(n);return e.invert=function(t,n){var e=Pp(n),a=Pp(t)*e,c=Up(t)*e,s=Up(n),f=s*o-c*u;return[zp(c*o+s*u,a*r+f*i),Ve(f*r-a*i)]},e}function Ur(t){function n(n){return n=t(n[0]*Ep,n[1]*Ep),n[0]*=Sp,n[1]*=Sp,n}return t=Rr(t[0]*Ep,t[1]*Ep,t.length>2?t[2]*Ep:0),n.invert=function(n){return n=t.invert(n[0]*Ep,n[1]*Ep),n[0]*=Sp,n[1]*=Sp,n},n}function Or(t,n,e,r,i,o){if(e){var u=Pp(n),a=Up(n),c=r*e;null==i?(i=n+r*kp,o=n-c/2):(i=Fr(u,i),o=Fr(u,o),(r>0?io)&&(i+=r*kp));for(var s,f=i;r>0?f>o:f1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function Yr(t,n){return Ap(t[0]-n[0])=0;--o)i.point((f=s[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function jr(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=M*w,N=T>Mp,k=d*x;if(ud.add(zp(k*M*Up(T),v*b+k*Pp(T))),o+=N?w+M*kp:w,N^h>=e^y>=e){var S=ur(ir(l),ir(_));sr(S);var E=ur(i,S);sr(E);var A=(N^w>=0?-1:1)*Ve(E[2]);(r>A||r===A&&(S[0]||S[1]))&&(u+=N^w>=0?1:-1)}}return(o<-bp||o0){for(m||(i.polygonStart(),m=!0),i.lineStart(),t=0;t1&&2&o&&u.push(u.pop().concat(u.shift())),p.push(u.filter($r))}var h,p,d,v=n(i),_=Ir(),y=n(_),m=!1,x={point:o,lineStart:a,lineEnd:c,polygonStart:function(){x.point=s,x.lineStart=f,x.lineEnd=l,p=[],h=[]},polygonEnd:function(){x.point=o,x.lineStart=a,x.lineEnd=c,p=g(p);var t=Xr(h,r);p.length?(m||(i.polygonStart(),m=!0),Hr(p,Wr,t,e,i)):t&&(m||(i.polygonStart(),m=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),m&&(i.polygonEnd(),m=!1),p=h=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};return x}}function $r(t){return t.length>1}function Wr(t,n){return((t=t.x)[0]<0?t[1]-Tp-bp:Tp-t[1])-((n=n.x)[0]<0?n[1]-Tp-bp:Tp-n[1])}function Zr(t){function n(t,n){return Pp(t)*Pp(n)>i}function e(t,n,e){var r=[1,0,0],o=ur(ir(t),ir(n)),u=or(o,o),a=o[0],c=u-a*a;if(!c)return!e&&t;var s=i*u/c,f=-i*a/c,l=ur(r,o),h=cr(r,s);ar(h,cr(o,f));var p=l,d=or(h,p),v=or(p,p),g=d*d-v*(or(h,h)-1);if(!(g<0)){var _=Fp(g),y=cr(p,(-d-_)/v);if(ar(y,h),y=rr(y),!e)return y;var m,x=t[0],b=n[0],w=t[1],M=n[1];b0^y[1]<(Ap(y[0]-x)Mp^(x<=y[0]&&y[0]<=b)){var k=cr(p,(-d+_)/v);return ar(k,h),[y,rr(k)]}}}function r(n,e){var r=u?t:Mp-t,i=0;return n<-r?i|=1:n>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var i=Pp(t),o=6*Ep,u=i>0,a=Ap(i)>bp;return Vr(n,function(t){var i,o,c,s,f;return{lineStart:function(){s=c=!1,f=1},point:function(l,h){var p,d=[l,h],v=n(l,h),g=u?v?0:r(l,h):v?r(l+(l<0?Mp:-Mp),h):0;if(!i&&(s=c=v)&&t.lineStart(),v!==c&&(!(p=e(i,d))||Yr(i,p)||Yr(d,p))&&(d[0]+=bp,d[1]+=bp,v=n(d[0],d[1])),v!==c)f=0,v?(t.lineStart(),p=e(d,i),t.point(p[0],p[1])):(p=e(i,d),t.point(p[0],p[1]),t.lineEnd()),i=p;else if(a&&i&&u^v){var _;g&o||!(_=e(d,i,!0))||(f=0,u?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||i&&Yr(i,d)||t.point(d[0],d[1]),i=d,c=v,o=g},lineEnd:function(){c&&t.lineEnd(),i=null},clean:function(){return f|(s&&c)<<1}}},function(n,e,r,i){Or(i,t,o,r,n,e)},u?[0,-t]:[-Mp,t-Mp])}function Gr(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,a,s){var f=0,l=0;if(null==i||(f=u(i,a))!==(l=u(o,a))||c(i,o)<0^a>0)do{s.point(0===f||3===f?t:e,f>1?r:n)}while((f=(f+a+4)%4)!==l);else s.point(o[0],o[1])}function u(r,i){return Ap(r[0]-t)0?0:3:Ap(r[0]-e)0?2:1:Ap(r[1]-n)0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){function c(t,n){i(t,n)&&w.point(t,n)}function s(o,u){var a=i(o,u);if(l&&h.push([o,u]),x)p=o,d=u,v=a,x=!1,a&&(w.lineStart(),w.point(o,u));else if(a&&m)w.point(o,u);else{var c=[_=Math.max(sd,Math.min(cd,_)),y=Math.max(sd,Math.min(cd,y))],s=[o=Math.max(sd,Math.min(cd,o)),u=Math.max(sd,Math.min(cd,u))];!function(t,n,e,r,i,o){var u,a=t[0],c=t[1],s=0,f=1,l=n[0]-a,h=n[1]-c;if(u=e-a,l||!(u>0)){if(u/=l,l<0){if(u0){if(u>f)return;u>s&&(s=u)}if(u=i-a,l||!(u<0)){if(u/=l,l<0){if(u>f)return;u>s&&(s=u)}else if(l>0){if(u0)){if(u/=h,h<0){if(u0){if(u>f)return;u>s&&(s=u)}if(u=o-c,h||!(u<0)){if(u/=h,h<0){if(u>f)return;u>s&&(s=u)}else if(h>0){if(u0&&(t[0]=a+s*l,t[1]=c+s*h),f<1&&(n[0]=a+f*l,n[1]=c+f*h),!0}}}}}(c,s,t,n,e,r)?a&&(w.lineStart(),w.point(o,u),b=!1):(m||(w.lineStart(),w.point(c[0],c[1])),w.point(s[0],s[1]),a||w.lineEnd(),b=!1)}_=o,y=u,m=a}var f,l,h,p,d,v,_,y,m,x,b,w=u,M=Ir(),T={point:c,lineStart:function(){T.point=s,l&&l.push(h=[]),x=!0,m=!1,_=y=NaN},lineEnd:function(){f&&(s(p,d),v&&m&&M.rejoin(),f.push(M.result())),T.point=c,m&&w.lineEnd()},polygonStart:function(){w=M,f=[],l=[],b=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=l.length;er&&(h-o)*(r-u)>(p-u)*(t-o)&&++n:p<=r&&(h-o)*(r-u)<(p-u)*(t-o)&&--n;return n}(),e=b&&n,i=(f=g(f)).length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&Hr(f,a,n,o,u),u.polygonEnd()),w=u,f=l=h=null}};return T}}function Qr(){ld.point=ld.lineEnd=We}function Jr(t,n){Zp=t*=Ep,Gp=Up(n*=Ep),Qp=Pp(n),ld.point=Kr}function Kr(t,n){t*=Ep;var e=Up(n*=Ep),r=Pp(n),i=Ap(t-Zp),o=Pp(i),u=r*Up(i),a=Qp*e-Gp*r*o,c=Gp*e+Qp*r*o;fd.add(zp(Fp(u*u+a*a),c)),Zp=t,Gp=e,Qp=r}function ti(t){return fd.reset(),Je(t,ld),+fd}function ni(t,n){return hd[0]=t,hd[1]=n,ti(pd)}function ei(t,n){return!(!t||!vd.hasOwnProperty(t.type))&&vd[t.type](t,n)}function ri(t,n){return 0===ni(t,n)}function ii(t,n){var e=ni(t[0],t[1]);return ni(t[0],n)+ni(n,t[1])<=e+bp}function oi(t,n){return!!Xr(t.map(ui),ai(n))}function ui(t){return(t=t.map(ai)).pop(),t}function ai(t){return[t[0]*Ep,t[1]*Ep]}function ci(t,n,e){var r=f(t,n-bp,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function si(t,n,e){var r=f(t,n-bp,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function fi(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return f(Rp(o/_)*_,i,_).map(p).concat(f(Rp(s/y)*y,c,y).map(d)).concat(f(Rp(r/v)*v,e,v).filter(function(t){return Ap(t%_)>bp}).map(l)).concat(f(Rp(a/g)*g,u,g).filter(function(t){return Ap(t%y)>bp}).map(h))}var e,r,i,o,u,a,c,s,l,h,p,d,v=10,g=v,_=90,y=360,m=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(d(c).slice(1),p(i).reverse().slice(1),d(s).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.extentMajor(n).extentMinor(n):t.extentMinor()},t.extentMajor=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],s=+n[0][1],c=+n[1][1],o>i&&(n=o,o=i,i=n),s>c&&(n=s,s=c,c=n),t.precision(m)):[[o,s],[i,c]]},t.extentMinor=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],u=+n[1][1],r>e&&(n=r,r=e,e=n),a>u&&(n=a,a=u,u=n),t.precision(m)):[[r,a],[e,u]]},t.step=function(n){return arguments.length?t.stepMajor(n).stepMinor(n):t.stepMinor()},t.stepMajor=function(n){return arguments.length?(_=+n[0],y=+n[1],t):[_,y]},t.stepMinor=function(n){return arguments.length?(v=+n[0],g=+n[1],t):[v,g]},t.precision=function(n){return arguments.length?(m=+n,l=ci(a,u,90),h=si(r,e,m),p=ci(s,c,90),d=si(o,i,m),t):m},t.extentMajor([[-180,-90+bp],[180,90-bp]]).extentMinor([[-180,-80-bp],[180,80+bp]])}function li(t){return t}function hi(){yd.point=pi}function pi(t,n){yd.point=di,Jp=td=t,Kp=nd=n}function di(t,n){_d.add(nd*t-td*n),td=t,nd=n}function vi(){di(Jp,Kp)}function gi(t,n){Td+=t,Nd+=n,++kd}function _i(){Rd.point=yi}function yi(t,n){Rd.point=mi,gi(id=t,od=n)}function mi(t,n){var e=t-id,r=n-od,i=Fp(e*e+r*r);Sd+=i*(id+t)/2,Ed+=i*(od+n)/2,Ad+=i,gi(id=t,od=n)}function xi(){Rd.point=gi}function bi(){Rd.point=Mi}function wi(){Ti(ed,rd)}function Mi(t,n){Rd.point=Ti,gi(ed=id=t,rd=od=n)}function Ti(t,n){var e=t-id,r=n-od,i=Fp(e*e+r*r);Sd+=i*(id+t)/2,Ed+=i*(od+n)/2,Ad+=i,Cd+=(i=od*t-id*n)*(id+t),zd+=i*(od+n),Pd+=3*i,gi(id=t,od=n)}function Ni(t){this._context=t}function ki(t,n){Id.point=Si,qd=Ud=t,Dd=Od=n}function Si(t,n){Ud-=t,Od-=n,Fd.add(Fp(Ud*Ud+Od*Od)),Ud=t,Od=n}function Ei(){this._string=[]}function Ai(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ci(t){return function(n){var e=new zi;for(var r in t)e[r]=t[r];return e.stream=n,e}}function zi(){}function Pi(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Je(e,t.stream(Md)),n(Md.result()),null!=r&&t.clipExtent(r),t}function Ri(t,n,e){return Pi(t,function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),u=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([u,a])},e)}function Li(t,n,e){return Ri(t,[[0,0],n],e)}function qi(t,n,e){return Pi(t,function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,u=-i*e[0][1];t.scale(150*i).translate([o,u])},e)}function Di(t,n,e){return Pi(t,function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],u=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,u])},e)}function Ui(t,n){return+n?function(t,n){function e(r,i,o,u,a,c,s,f,l,h,p,d,v,g){var _=s-r,y=f-i,m=_*_+y*y;if(m>4*n&&v--){var x=u+h,b=a+p,w=c+d,M=Fp(x*x+b*b+w*w),T=Ve(w/=M),N=Ap(Ap(w)-1)n||Ap((_*A+y*C)/m-.5)>.3||u*h+a*p+c*d2?t[2]%360*Ep:0,r()):[x*Sp,b*Sp,w*Sp]},n.precision=function(t){return arguments.length?(E=Ui(e,S=t*t),i()):Fp(S)},n.fitExtent=function(t,e){return Ri(n,t,e)},n.fitSize=function(t,e){return Li(n,t,e)},n.fitWidth=function(t,e){return qi(n,t,e)},n.fitHeight=function(t,e){return Di(n,t,e)},function(){return o=t.apply(this,arguments),n.invert=o.invert&&function(t){return(t=s.invert((t[0]-u)/v,(a-t[1])/v))&&[t[0]*Sp,t[1]*Sp]},r()}}function Ii(t){var n=0,e=Mp/3,r=Fi(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ep,e=t[1]*Ep):[n*Sp,e*Sp]},i}function Yi(t,n){function e(t,n){var e=Fp(o-2*i*Up(n))/i;return[e*Up(t*=i),u-e*Pp(t)]}var r=Up(t),i=(r+Up(n))/2;if(Ap(i)0?n<-Tp+bp&&(n=-Tp+bp):n>Tp-bp&&(n=Tp-bp);var e=o/Dp(Wi(n),i);return[e*Up(i*t),o-e*Pp(i*t)]}var r=Pp(t),i=t===n?Up(t):qp(r/Pp(n))/qp(Wi(n)/Wi(t)),o=r*Dp(Wi(t),i)/i;return i?(e.invert=function(t,n){var e=o-n,r=Op(i)*Fp(t*t+e*e);return[zp(t,Ap(e))/i*Op(e),2*Cp(Dp(o/r,1/i))-Tp]},e):Vi}function Gi(t,n){return[t,n]}function Qi(t,n){function e(t,n){var e=o-n,r=i*t;return[e*Up(r),o-e*Pp(r)]}var r=Pp(t),i=t===n?Up(t):(r-Pp(n))/(n-t),o=r/i+t;return Ap(i)=0;)n+=e[r].value;else n=1;t.value=n}function co(t,n){var e,r,i,o,u,a=new ho(t),c=+t.value&&(a.value=t.value),s=[a];for(null==n&&(n=so);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)s.push(r=e.children[o]=new ho(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(lo)}function so(t){return t.children}function fo(t){t.data=t.data.data}function lo(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function ho(t){this.data=t,this.depth=this.height=0,this.parent=null}function po(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Vd.call(t))).length,o=[];r0&&e*e>r*r+i*i}function _o(t,n){for(var e=0;ee*e+r*r}function wo(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Mo(t){this._=t,this.next=null,this.previous=null}function To(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,c,s,f,l;if(n=t[0],n.x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;xo(e,n,r=t[2]),n=new Mo(n),e=new Mo(e),r=new Mo(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;ah&&(h=a),g=f*f*v,(p=Math.max(h/g,g/l))>d){f-=a;break}d=p}_.push(u={value:f,dice:c1&&jo(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function $o(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function Wo(t){if(!t._start)try{(function(t){for(;t._start=t._waiting&&t._active=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,Go(t)}function Go(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function Qo(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new $o(t)}function Jo(){return Math.random()}function Ko(t,n){function e(t){var n,e=s.status;if(!e&&function(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}(s)||e>=200&&e<300||304===e){if(o)try{n=o.call(r,s)}catch(t){return void a.call("error",r,t)}else n=s;a.call("load",r,n)}else a.call("error",r,t)}var r,i,o,u,a=N("beforesend","progress","load","error"),c=ae(),s=new XMLHttpRequest,f=null,l=null,h=0;if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=e:s.onreadystatechange=function(t){s.readyState>3&&e(t)},s.onprogress=function(t){a.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?c.get(t):(null==n?c.remove(t):c.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(u=t,r):u},timeout:function(t){return arguments.length?(h=+t,r):h},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",r)},password:function(t){return arguments.length<1?l:(l=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return s.open(n,t,!0,f,l),null==i||c.has("accept")||c.set("accept",i+",*/*"),s.setRequestHeader&&c.each(function(t,n){s.setRequestHeader(n,t)}),null!=i&&s.overrideMimeType&&s.overrideMimeType(i),null!=u&&(s.responseType=u),h>0&&(s.timeout=h),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=function(t){return function(n,e){t(null==n?e:null)}}(o)),null!=o&&r.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",r,s),s.send(null==e?null:e),r},abort:function(){return s.abort(),r},on:function(){var t=a.on.apply(a,arguments);return t===a?r:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return r.get(n)}return r}function tu(t,n){return function(e,r){var i=Ko(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}}function nu(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=Ko(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},o.row(r),i?o.get(i):o}}function eu(t){function n(n){var o=n+"",u=e.get(o);if(!u){if(i!==gv)return i;e.set(o,u=r.push(n))}return t[(u-1)%t.length]}var e=ae(),r=[],i=gv;return t=null==t?[]:vv.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=ae();for(var i,o,u=-1,a=t.length;++u2?su:cu,o=u=null,r}function r(n){return(o||(o=i(a,c,f?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,s)))(+n)}var i,o,u,a=_v,c=_v,s=cn,f=!1;return r.invert=function(t){return(u||(u=i(c,a,au,f?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},r.domain=function(t){return arguments.length?(a=dv.call(t,uu),e()):a.slice()},r.range=function(t){return arguments.length?(c=vv.call(t),e()):c.slice()},r.rangeRound=function(t){return c=vv.call(t),s=sn,e()},r.clamp=function(t){return arguments.length?(f=!!t,e()):f},r.interpolate=function(t){return arguments.length?(s=t,e()):s},e()}function hu(n){var e=n.domain;return n.ticks=function(t){var n=e();return l(n[0],n[n.length-1],null==t?10:t)},n.tickFormat=function(n,r){return function(n,e,r){var i,o=n[0],u=n[n.length-1],a=p(o,u,null==e?10:e);switch((r=Le(null==r?",f":r)).type){case"s":var c=Math.max(Math.abs(o),Math.abs(u));return null!=r.precision||isNaN(i=Ie(a,c))||(r.precision=i),t.formatPrefix(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Ye(a,Math.max(Math.abs(o),Math.abs(u))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Fe(a))||(r.precision=i-2*("%"===r.type))}return t.format(r)}(e(),n,r)},n.nice=function(t){null==t&&(t=10);var r,i=e(),o=0,u=i.length-1,a=i[o],c=i[u];return c0?r=h(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,t):r<0&&(r=h(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,t)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(c/r)*r,e(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(c*r)/r,e(i)),n},n}function pu(){var t=lu(au,on);return t.copy=function(){return fu(t,pu())},hu(t)}function du(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=dv.call(e,uu),t):n.slice()},t.copy=function(){return du().domain(n)},hu(t)}function vu(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;pc)break;g.push(h)}}else for(;p=1;--f)if(!((h=s*f)c)break;g.push(h)}}else g=l(p,d,Math.min(d-p,v)).map(u);return n?g.reverse():g},e.tickFormat=function(n,r){if(null==r&&(r=10===i?".0e":","),"function"!=typeof r&&(r=t.format(r)),n===1/0)return r;null==n&&(n=10);var a=Math.max(1,i*n/e.ticks().length);return function(t){var n=t/u(Math.round(o(t)));return n*i0?o[n-1]:r[0],n=i?[o[i-1],r]:[o[n-1],o[n]]},t.copy=function(){return ku().domain([e,r]).range(u)},hu(t)}function Su(){function t(t){if(t<=t)return e[Ds(n,t,0,r)]}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=vv.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=vv.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return Su().domain(n).range(e)},t}function Eu(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return yv.setTime(+n),mv.setTime(+r),t(yv),t(mv),Math.floor(e(yv,mv))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}function Au(t){return Eu(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*wv)/Mv})}function Cu(t){return Eu(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/Mv})}function zu(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pu(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ru(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Lu(t){function n(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(i=(o=(i=Pu(Ru(u.y))).getUTCDay())>4||0===o?rg.ceil(i):rg(i),i=tg.offset(i,7*(u.V-1)),u.y=i.getUTCFullYear(),u.m=i.getUTCMonth(),u.d=i.getUTCDate()+(u.w+6)%7):(i=(o=(i=n(Ru(u.y))).getDay())>4||0===o?Rv.ceil(i):Rv(i),i=Cv.offset(i,7*(u.V-1)),u.y=i.getFullYear(),u.m=i.getMonth(),u.d=i.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),o="Z"in u?Pu(Ru(u.y)).getUTCDay():n(Ru(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(o+5)%7:u.w+7*u.U-(o+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Pu(u)):n(u)}}function r(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=T[i in bg?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}var i=t.dateTime,o=t.date,u=t.time,a=t.periods,c=t.days,s=t.shortDays,f=t.months,l=t.shortMonths,h=Uu(a),p=Ou(a),d=Uu(c),v=Ou(c),g=Uu(s),_=Ou(s),y=Uu(f),m=Ou(f),x=Uu(l),b=Ou(l),w={a:function(t){return s[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return f[t.getMonth()]},c:null,d:ia,e:ia,f:sa,H:oa,I:ua,j:aa,L:ca,m:fa,M:la,p:function(t){return a[+(t.getHours()>=12)]},Q:Fa,s:Ia,S:ha,u:pa,U:da,V:va,w:ga,W:_a,x:null,X:null,y:ya,Y:ma,Z:xa,"%":Oa},M={a:function(t){return s[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return f[t.getUTCMonth()]},c:null,d:ba,e:ba,f:ka,H:wa,I:Ma,j:Ta,L:Na,m:Sa,M:Ea,p:function(t){return a[+(t.getUTCHours()>=12)]},Q:Fa,s:Ia,S:Aa,u:Ca,U:za,V:Pa,w:Ra,W:La,x:null,X:null,y:qa,Y:Da,Z:Ua,"%":Oa},T={a:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.w=_[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=v[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=x.exec(n.slice(e));return r?(t.m=b[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=m[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,n,e){return r(t,i,n,e)},d:Wu,e:Wu,f:ta,H:Gu,I:Gu,j:Zu,L:Ku,m:$u,M:Qu,p:function(t,n,e){var r=h.exec(n.slice(e));return r?(t.p=p[r[0].toLowerCase()],e+r[0].length):-1},Q:ea,s:ra,S:Ju,u:Iu,U:Yu,V:Bu,w:Fu,W:Hu,x:function(t,n,e){return r(t,o,n,e)},X:function(t,n,e){return r(t,u,n,e)},y:Xu,Y:ju,Z:Vu,"%":na};return w.x=n(o,w),w.X=n(u,w),w.c=n(i,w),M.x=n(o,M),M.X=n(u,M),M.c=n(i,M),{format:function(t){var e=n(t+="",w);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",zu);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",M);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,Pu);return n.toString=function(){return t},n}}}function qu(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function Vu(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function $u(t,n,e){var r=wg.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Wu(t,n,e){var r=wg.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Zu(t,n,e){var r=wg.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Gu(t,n,e){var r=wg.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Qu(t,n,e){var r=wg.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Ju(t,n,e){var r=wg.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Ku(t,n,e){var r=wg.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function ta(t,n,e){var r=wg.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function na(t,n,e){var r=Mg.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ea(t,n,e){var r=wg.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function ra(t,n,e){var r=wg.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function ia(t,n){return qu(t.getDate(),n,2)}function oa(t,n){return qu(t.getHours(),n,2)}function ua(t,n){return qu(t.getHours()%12||12,n,2)}function aa(t,n){return qu(1+Cv.count(Wv(t),t),n,3)}function ca(t,n){return qu(t.getMilliseconds(),n,3)}function sa(t,n){return ca(t,n)+"000"}function fa(t,n){return qu(t.getMonth()+1,n,2)}function la(t,n){return qu(t.getMinutes(),n,2)}function ha(t,n){return qu(t.getSeconds(),n,2)}function pa(t){var n=t.getDay();return 0===n?7:n}function da(t,n){return qu(Pv.count(Wv(t),t),n,2)}function va(t,n){var e=t.getDay();return t=e>=4||0===e?Dv(t):Dv.ceil(t),qu(Dv.count(Wv(t),t)+(4===Wv(t).getDay()),n,2)}function ga(t){return t.getDay()}function _a(t,n){return qu(Rv.count(Wv(t),t),n,2)}function ya(t,n){return qu(t.getFullYear()%100,n,2)}function ma(t,n){return qu(t.getFullYear()%1e4,n,4)}function xa(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+qu(n/60|0,"0",2)+qu(n%60,"0",2)}function ba(t,n){return qu(t.getUTCDate(),n,2)}function wa(t,n){return qu(t.getUTCHours(),n,2)}function Ma(t,n){return qu(t.getUTCHours()%12||12,n,2)}function Ta(t,n){return qu(1+tg.count(yg(t),t),n,3)}function Na(t,n){return qu(t.getUTCMilliseconds(),n,3)}function ka(t,n){return Na(t,n)+"000"}function Sa(t,n){return qu(t.getUTCMonth()+1,n,2)}function Ea(t,n){return qu(t.getUTCMinutes(),n,2)}function Aa(t,n){return qu(t.getUTCSeconds(),n,2)}function Ca(t){var n=t.getUTCDay();return 0===n?7:n}function za(t,n){return qu(eg.count(yg(t),t),n,2)}function Pa(t,n){var e=t.getUTCDay();return t=e>=4||0===e?ug(t):ug.ceil(t),qu(ug.count(yg(t),t)+(4===yg(t).getUTCDay()),n,2)}function Ra(t){return t.getUTCDay()}function La(t,n){return qu(rg.count(yg(t),t),n,2)}function qa(t,n){return qu(t.getUTCFullYear()%100,n,2)}function Da(t,n){return qu(t.getUTCFullYear()%1e4,n,4)}function Ua(){return"+0000"}function Oa(){return"%"}function Fa(t){return+t}function Ia(t){return Math.floor(+t/1e3)}function Ya(n){return mg=Lu(n),t.timeFormat=mg.format,t.timeParse=mg.parse,t.utcFormat=mg.utcFormat,t.utcParse=mg.utcParse,mg}function Ba(t){return new Date(t)}function Ha(t){return t instanceof Date?+t:+new Date(+t)}function ja(t,n,r,i,o,u,a,c,s){function f(e){return(a(e)=1?e_:t<=-1?-e_:Math.asin(t)}function Ga(t){return t.innerRadius}function Qa(t){return t.outerRadius}function Ja(t){return t.startAngle}function Ka(t){return t.endAngle}function tc(t){return t&&t.padAngle}function nc(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/Kg(a*a+c*c),f=s*c,l=-s*a,h=t+f,p=n+l,d=e+f,v=r+l,g=(h+d)/2,_=(p+v)/2,y=d-h,m=v-p,x=y*y+m*m,b=i-o,w=h*v-d*p,M=(m<0?-1:1)*Kg(Gg(0,b*b*x-w*w)),T=(w*m-y*M)/x,N=(-w*y-m*M)/x,k=(w*m+y*M)/x,S=(-w*y+m*M)/x,E=T-g,A=N-_,C=k-g,z=S-_;return E*E+A*A>C*C+z*z&&(T=k,N=S),{cx:T,cy:N,x01:-f,y01:-l,x11:T*(i/b-1),y11:N*(i/b-1)}}function ec(t){this._context=t}function rc(t){return new ec(t)}function ic(t){return t[0]}function oc(t){return t[1]}function uc(){function t(t){var a,c,s,f=t.length,l=!1;for(null==i&&(u=o(s=te())),a=0;a<=f;++a)!(a=f;--l)s.point(g[l],_[l]);s.lineEnd(),s.areaEnd()}v&&(g[n]=+e(h,n,t),_[n]=+i(h,n,t),s.point(r?+r(h,n,t):g[n],o?+o(h,n,t):_[n]))}if(p)return s=null,p+""||null}function n(){return uc().defined(u).curve(c).context(a)}var e=ic,r=null,i=Wa(0),o=oc,u=Wa(!0),a=null,c=rc,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:Wa(+n),r=null,t):e},t.x0=function(n){return arguments.length?(e="function"==typeof n?n:Wa(+n),t):e},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:Wa(+n),t):r},t.y=function(n){return arguments.length?(i="function"==typeof n?n:Wa(+n),o=null,t):i},t.y0=function(n){return arguments.length?(i="function"==typeof n?n:Wa(+n),t):i},t.y1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:Wa(+n),t):o},t.lineX0=t.lineY0=function(){return n().x(e).y(i)},t.lineY1=function(){return n().x(e).y(o)},t.lineX1=function(){return n().x(r).y(i)},t.defined=function(n){return arguments.length?(u="function"==typeof n?n:Wa(!!n),t):u},t.curve=function(n){return arguments.length?(c=n,null!=a&&(s=c(a)),t):c},t.context=function(n){return arguments.length?(null==n?a=s=null:s=c(a=n),t):a},t}function cc(t,n){return nt?1:n>=t?0:NaN}function sc(t){return t}function fc(t){this._curve=t}function lc(t){function n(n){return new fc(t(n))}return n._curve=t,n}function hc(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(lc(t)):n()._curve},t}function pc(){return hc(uc().curve(i_))}function dc(){var t=ac().curve(i_),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return hc(e())},delete t.lineX0,t.lineEndAngle=function(){return hc(r())},delete t.lineX1,t.lineInnerRadius=function(){return hc(i())},delete t.lineY0,t.lineOuterRadius=function(){return hc(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(lc(t)):n()._curve},t}function vc(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}function gc(t){return t.source}function _c(t){return t.target}function yc(t){function n(){var n,a=o_.call(arguments),c=e.apply(this,a),s=r.apply(this,a);if(u||(u=n=te()),t(u,+i.apply(this,(a[0]=c,a)),+o.apply(this,a),+i.apply(this,(a[0]=s,a)),+o.apply(this,a)),n)return u=null,n+""||null}var e=gc,r=_c,i=ic,o=oc,u=null;return n.source=function(t){return arguments.length?(e=t,n):e},n.target=function(t){return arguments.length?(r=t,n):r},n.x=function(t){return arguments.length?(i="function"==typeof t?t:Wa(+t),n):i},n.y=function(t){return arguments.length?(o="function"==typeof t?t:Wa(+t),n):o},n.context=function(t){return arguments.length?(u=null==t?null:t,n):u},n}function mc(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function xc(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function bc(t,n,e,r,i){var o=vc(n,e),u=vc(n,e=(e+i)/2),a=vc(r,e),c=vc(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}function wc(){}function Mc(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Tc(t){this._context=t}function Nc(t){this._context=t}function kc(t){this._context=t}function Sc(t,n){this._basis=new Tc(t),this._beta=n}function Ec(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Ac(t,n){this._context=t,this._k=(1-n)/6}function Cc(t,n){this._context=t,this._k=(1-n)/6}function zc(t,n){this._context=t,this._k=(1-n)/6}function Pc(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>t_){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>t_){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Rc(t,n){this._context=t,this._alpha=n}function Lc(t,n){this._context=t,this._alpha=n}function qc(t,n){this._context=t,this._alpha=n}function Dc(t){this._context=t}function Uc(t){return t<0?-1:1}function Oc(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Uc(o)+Uc(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Fc(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Ic(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Yc(t){this._context=t}function Bc(t){this._context=new Hc(t)}function Hc(t){this._context=t}function jc(t){this._context=t}function Xc(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e}function Zc(t,n){return t[n]}function Gc(t){var n=t.map(Qc);return Wc(t).sort(function(t,e){return n[t]-n[e]})}function Qc(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>f&&(f=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>f&&(f=o)}else if(h>0){if(o0)){if(o/=p,p<0){if(o0){if(o>l)return;o>f&&(f=o)}if(o=i-s,p||!(o<0)){if(o/=p,p<0){if(o>l)return;o>f&&(f=o)}else if(p>0){if(o0||l<1)||(f>0&&(t[0]=[c+f*h,s+f*p]),l<1&&(t[1]=[c+l*h,s+l*p]),!0)}}}}}function fs(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],s=t.left,f=t.right,l=s[0],h=s[1],p=f[0],d=f[1],v=(l+p)/2,g=(h+d)/2;if(d===h){if(v=r)return;if(l>p){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>p){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]=-O_)){var p=c*c+s*s,d=f*f+l*l,v=(l*p-s*d)/h,g=(c*d-f*p)/h,_=q_.pop()||new function(){es(this),this.x=this.y=this.arc=this.site=this.cy=null};_.arc=t,_.site=i,_.x=v+u,_.y=(_.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=_;for(var y=null,m=R_._;m;)if(_.yU_)a=a.L;else{if(!((i=o-function(t,n){var e=t.N;if(e)return xs(e,n);var r=t.site;return r[1]===n?r[0]:1/0}(a,u))>U_)){r>-U_?(n=a.P,e=a):i>-U_?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}(function(t){P_[t.index]={site:t,halfedges:[]}})(t);var c=gs(t);if(z_.insert(n,c),n||e){if(n===e)return vs(n),e=gs(n.site),z_.insert(c,e),c.edge=e.edge=us(n.site,c.site),ds(n),void ds(e);if(e){vs(n),vs(e);var s=n.site,f=s[0],l=s[1],h=t[0]-f,p=t[1]-l,d=e.site,v=d[0]-f,g=d[1]-l,_=2*(h*g-p*v),y=h*h+p*p,m=v*v+g*g,x=[(g*y-p*m)/_+f,(h*m-v*y)/_+l];cs(e.edge,s,d,x),c.edge=us(s,t,null,x),e.edge=us(t,d,null,x),ds(n),ds(e)}else c.edge=us(n.site,c.site)}}function xs(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],c=e[1],s=c-n;if(!s)return a;var f=a-r,l=1/o-1/s,h=f/s;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*s)-c+s/2+i-o/2)))/l+r:(r+a)/2}function bs(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function ws(t,n){return n[1]-t[1]||n[0]-t[0]}function Ms(t,n){var e,r,i,o=t.sort(ws).pop();for(L_=[],P_=new Array(t.length),z_=new ns,R_=new ns;;)if(i=C_,o&&(!i||o[1]U_||Math.abs(i[0][1]-i[1][1])>U_)||delete L_[o]})(u,a,c,s),function(t,n,e,r){var i,o,u,a,c,s,f,l,h,p,d,v,g=P_.length,_=!0;for(i=0;iU_||Math.abs(v-h)>U_)&&(c.splice(a,0,L_.push(as(u,p,Math.abs(d-t)U_?[t,Math.abs(l-t)U_?[Math.abs(h-r)U_?[e,Math.abs(l-e)U_?[Math.abs(h-n)r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var qs=e(n),Ds=qs.right,Us=qs.left,Os=Array.prototype,Fs=Os.slice,Is=Os.map,Ys=Math.sqrt(50),Bs=Math.sqrt(10),Hs=Math.sqrt(2),js=Array.prototype.slice,Xs=1,Vs=2,$s=3,Ws=4,Zs=1e-6,Gs={value:function(){}};k.prototype=N.prototype={constructor:k,on:function(t,n){var e,r=this._,i=function(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}(t+"",r),o=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),o=0;o=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var af=[null];st.prototype=ft.prototype={constructor:st,select:function(t){"function"!=typeof t&&(t=Y(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=x&&(x=m+1);!(y=g[x])&&++x=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=W);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):G(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=Q(t+"");if(arguments.length<2){for(var r=J(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?q:L,null==e&&(e=!1),r=0;r=240?t-240:t+120,i,r),qt(t,i,r),qt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var xf=Math.PI/180,bf=180/Math.PI,wf=.95047,Mf=1,Tf=1.08883,Nf=4/29,kf=6/29,Sf=3*kf*kf,Ef=kf*kf*kf;Mt(Ot,Ut,Tt(Nt,{brighter:function(t){return new Ot(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ot(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=Mf*It(t),n=wf*It(n),e=Tf*It(e),new zt(Yt(3.2404542*n-1.5371385*t-.4985314*e),Yt(-.969266*n+1.8760108*t+.041556*e),Yt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Mt(jt,Ht,Tt(Nt,{brighter:function(t){return new jt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new jt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Dt(this).rgb()}}));var Af=-.29227,Cf=-.90649,zf=1.97294,Pf=zf*Cf,Rf=1.78277*zf,Lf=1.78277*Af- -.14861*Cf;Mt(Vt,Xt,Tt(Nt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*xf,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new zt(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(Af*r+Cf*i)),255*(n+e*(zf*r)),this.opacity)}}));var qf,Df,Uf,Of,Ff,If,Yf=function t(n){function e(t,n){var e=r((t=Ct(t)).r,(n=Ct(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=tn(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=Kt(n);return e.gamma=t,e}(1),Bf=nn(Wt),Hf=nn(Zt),jf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xf=new RegExp(jf.source,"g"),Vf=180/Math.PI,$f={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Wf=ln(function(t){return"none"===t?$f:(qf||(qf=document.createElement("DIV"),Df=document.documentElement,Uf=document.defaultView),qf.style.transform=t,t=Uf.getComputedStyle(Df.appendChild(qf),null).getPropertyValue("transform"),Df.removeChild(qf),t=t.slice(7,-1).split(","),fn(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),Zf=ln(function(t){return null==t?$f:(Of||(Of=document.createElementNS("http://www.w3.org/2000/svg","g")),Of.setAttribute("transform",t),(t=Of.transform.baseVal.consolidate())?(t=t.matrix,fn(t.a,t.b,t.c,t.d,t.e,t.f)):$f)},", ",")",")"),Gf=Math.SQRT2,Qf=2,Jf=4,Kf=1e-12,tl=dn(Jt),nl=dn(tn),el=vn(Jt),rl=vn(tn),il=gn(Jt),ol=gn(tn),ul=0,al=0,cl=0,sl=1e3,fl=0,ll=0,hl=0,pl="object"==typeof performance&&performance.now?performance:Date,dl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};mn.prototype=xn.prototype={constructor:mn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?_n():+e)+(null==n?0:+n),this._next||If===this||(If?If._next=this:Ff=this,If=this),this._call=t,this._time=e,Tn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tn())}};var vl=N("start","end","interrupt"),gl=[],_l=0,yl=1,ml=2,xl=3,bl=4,wl=5,Ml=6,Tl=ft.prototype.constructor,Nl=0,kl=ft.prototype;Rn.prototype=Ln.prototype={constructor:Rn,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Y(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?Sn:En;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=E(t),r="transform"===e?Zf:Pn;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttributeNS(t.space,t.local))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttribute(t))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttribute(t)}})(e,r,zn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}:function(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=E(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Wf:Pn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=G(this,t),u=(this.style.removeProperty(t),G(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,o;return function(){var u=G(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=G(this,t)),u===a?null:u===r&&a===i?o:o=n(r=u,i=a)}}(t,r,zn(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var o=G(this,t);return o===e?null:o===r?i:i=n(r=o,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(zn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=An(this.node(),e).tween,o=0,u=i.length;o1e-6)if(Math.abs(f*a-c*s)>1e-6&&i){var h=e-o,p=r-u,d=a*a+c*c,v=h*h+p*p,g=Math.sqrt(d),_=Math.sqrt(l),y=i*Math.tan((gh-Math.acos((d+l-v)/(2*g*_)))/2),m=y/_,x=y/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*s)+","+(n+m*f)),this._+="A"+i+","+i+",0,0,"+ +(f*h>s*p)+","+(this._x1=t+x*a)+","+(this._y1=n+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=t+u,s=n+a,f=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+s:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+c+","+s),e&&(l<0&&(l=l%_h+_h),l>yh?this._+="A"+e+","+e+",0,1,"+f+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+f+","+(this._x1=c)+","+(this._y1=s):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=gh)+","+f+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};ue.prototype=ae.prototype={constructor:ue,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var mh=ae.prototype;he.prototype=pe.prototype={constructor:he,has:mh.has,add:function(t){return t+="",this["$"+t]=t,this},remove:mh.remove,clear:mh.clear,values:mh.keys,size:mh.size,empty:mh.empty,each:mh.each};var xh={},bh={},wh=34,Mh=10,Th=13,Nh=ve(","),kh=Nh.parse,Sh=Nh.parseRows,Eh=Nh.format,Ah=Nh.formatRows,Ch=ve("\t"),zh=Ch.parse,Ph=Ch.parseRows,Rh=Ch.format,Lh=Ch.formatRows,qh=we.prototype=Me.prototype;qh.copy=function(){var t,n,e=new Me(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Te(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Te(n));return e},qh.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return ye(this.cover(n,e),n,e,t)},qh.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,s=1/0,f=-1/0,l=-1/0;for(e=0;ef&&(f=r),il&&(l=i));for(ft||t>i||r>n||n>o))return this;var u,a,c=i-e,s=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{u=new Array(4),u[a]=s,s=u}while(c*=2,i=e+c,o=r+c,t>i||n>o);break;case 1:do{u=new Array(4),u[a]=s,s=u}while(c*=2,e=i-c,o=r+c,e>t||n>o);break;case 2:do{u=new Array(4),u[a]=s,s=u}while(c*=2,i=e+c,r=o-c,t>i||r>n);break;case 3:do{u=new Array(4),u[a]=s,s=u}while(c*=2,e=i-c,r=o-c,e>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},qh.data=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},qh.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},qh.find=function(t,n,e){var r,i,o,u,a,c,s,f=this._x0,l=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new me(v,f,l,h,p)),null==e?e=1/0:(f=t-e,l=n-e,h=t+e,p=n+e,e*=e);c=d.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>p||(u=c.x1)=_)<<1|t>=g)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=c)}else{var y=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=y*y+m*m;if(x=(a=(d+g)/2))?d=a:g=a,(f=u>=(c=(v+_)/2))?v=c:_=c,n=p,!(p=p[l=f<<1|s]))return this;if(!p.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},qh.removeAll=function(t){for(var n=0,e=t.length;n0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Re(100*t,n)},r:Re,s:function(t,n){var e=ze(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Dh=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ze(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ih=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Le.prototype=qe.prototype,qe.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var Yh,Bh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Oe({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),He.prototype={constructor:He,reset:function(){this.s=this.t=0},add:function(t){je(xp,t,this.t),je(this,xp.s,this.s),this.s?this.t+=xp.t:this.s=xp.t},valueOf:function(){return this.s}};var Hh,jh,Xh,Vh,$h,Wh,Zh,Gh,Qh,Jh,Kh,tp,np,ep,rp,ip,op,up,ap,cp,sp,fp,lp,hp,pp,dp,vp,gp,_p,yp,mp,xp=new He,bp=1e-6,wp=1e-12,Mp=Math.PI,Tp=Mp/2,Np=Mp/4,kp=2*Mp,Sp=180/Mp,Ep=Mp/180,Ap=Math.abs,Cp=Math.atan,zp=Math.atan2,Pp=Math.cos,Rp=Math.ceil,Lp=Math.exp,qp=Math.log,Dp=Math.pow,Up=Math.sin,Op=Math.sign||function(t){return t>0?1:t<0?-1:0},Fp=Math.sqrt,Ip=Math.tan,Yp={Feature:function(t,n){Ze(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++rbp?Qh=90:Vp<-bp&&(Zh=-90),rp[0]=Wh,rp[1]=Gh}},Wp={sphere:We,point:xr,lineStart:wr,lineEnd:Nr,polygonStart:function(){Wp.lineStart=kr,Wp.lineEnd=Sr},polygonEnd:function(){Wp.lineStart=wr,Wp.lineEnd=Nr}};Pr.invert=Pr;var Zp,Gp,Qp,Jp,Kp,td,nd,ed,rd,id,od,ud=Be(),ad=Vr(function(){return!0},function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?Mp:-Mp,c=Ap(o-e);Ap(c-Mp)0?Tp:-Tp),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=Mp&&(Ap(e-i)bp?Cp((Up(n)*(o=Pp(r))*Up(e)-Up(r)*(i=Pp(n))*Up(t))/(i*o*u)):(n+r)/2}(e,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=o,r=u),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}},function(t,n,e,r){var i;if(null==t)i=e*Tp,r.point(-Mp,i),r.point(0,i),r.point(Mp,i),r.point(Mp,0),r.point(Mp,-i),r.point(0,-i),r.point(-Mp,-i),r.point(-Mp,0),r.point(-Mp,i);else if(Ap(t[0]-n[0])>bp){var o=t[0]bd&&(bd=t),nwd&&(wd=n)},lineStart:We,lineEnd:We,polygonStart:We,polygonEnd:We,result:function(){var t=[[md,xd],[bd,wd]];return bd=wd=-(xd=md=1/0),t}},Td=0,Nd=0,kd=0,Sd=0,Ed=0,Ad=0,Cd=0,zd=0,Pd=0,Rd={point:gi,lineStart:_i,lineEnd:xi,polygonStart:function(){Rd.lineStart=bi,Rd.lineEnd=wi},polygonEnd:function(){Rd.point=gi,Rd.lineStart=_i,Rd.lineEnd=xi},result:function(){var t=Pd?[Cd/Pd,zd/Pd]:Ad?[Sd/Ad,Ed/Ad]:kd?[Td/kd,Nd/kd]:[NaN,NaN];return Td=Nd=kd=Sd=Ed=Ad=Cd=zd=Pd=0,t}};Ni.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,kp)}},result:We};var Ld,qd,Dd,Ud,Od,Fd=Be(),Id={point:We,lineStart:function(){Id.point=ki},lineEnd:function(){Ld&&Si(qd,Dd),Id.point=We},polygonStart:function(){Ld=!0},polygonEnd:function(){Ld=null},result:function(){var t=+Fd;return Fd.reset(),t}};Ei.prototype={_radius:4.5,_circle:Ai(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=Ai(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},zi.prototype={constructor:zi,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Yd=16,Bd=Pp(30*Ep),Hd=Ci({point:function(t,n){this.stream.point(t*Ep,n*Ep)}}),jd=ji(function(t){return Fp(2/(1+t))});jd.invert=Xi(function(t){return 2*Ve(t/2)});var Xd=ji(function(t){return(t=Xe(t))&&t/Up(t)});Xd.invert=Xi(function(t){return t}),Vi.invert=function(t,n){return[t,2*Cp(Lp(n))-Tp]},Gi.invert=Gi,Ji.invert=Xi(Cp),to.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,u=o*o;r-=e=(r*(1.007226+o*(.015085+u*(.028874*o-.044475-.005916*u)))-n)/(1.007226+o*(.045255+u*(.259866*o-.311325-.005916*11*u)))}while(Ap(e)>bp&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},no.invert=Xi(Ve),eo.invert=Xi(function(t){return 2*Cp(t)}),ro.invert=function(t,n){return[-n,2*Cp(Lp(t))-Tp]},ho.prototype=co.prototype={constructor:ho,count:function(){return this.eachAfter(ao)},each:function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},sort:function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function(){return co(this).eachBefore(fo)}};var Vd=Array.prototype.slice,$d="$",Wd={depth:-1},Zd={};Yo.prototype=Object.create(ho.prototype);var Gd=(1+Math.sqrt(5))/2,Qd=function t(n){function e(t,e,r,i,o){Ho(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Gd),Jd=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,s,f,l=-1,h=u.length,p=t.value;++l1?n:1)},e}(Gd),Kd=[].slice,tv={};$o.prototype=Qo.prototype={constructor:$o,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=Kd.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),Wo(this),this},abort:function(){return null==this._error&&Zo(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},Go(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,Go(this),this}};var nv=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Jo),ev=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Jo),rv=function t(n){function e(){var t=ev.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Jo),iv=function t(n){function e(t){return function(){for(var e=0,r=0;r0?t>1?Eu(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):xv:null};var bv=xv.range,wv=6e4,Mv=6048e5,Tv=Eu(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),Nv=Tv.range,kv=Eu(function(t){t.setTime(Math.floor(t/wv)*wv)},function(t,n){t.setTime(+t+n*wv)},function(t,n){return(n-t)/wv},function(t){return t.getMinutes()}),Sv=kv.range,Ev=Eu(function(t){var n=t.getTimezoneOffset()*wv%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Av=Ev.range,Cv=Eu(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*wv)/864e5},function(t){return t.getDate()-1}),zv=Cv.range,Pv=Au(0),Rv=Au(1),Lv=Au(2),qv=Au(3),Dv=Au(4),Uv=Au(5),Ov=Au(6),Fv=Pv.range,Iv=Rv.range,Yv=Lv.range,Bv=qv.range,Hv=Dv.range,jv=Uv.range,Xv=Ov.range,Vv=Eu(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),$v=Vv.range,Wv=Eu(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Wv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Eu(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Zv=Wv.range,Gv=Eu(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*wv)},function(t,n){return(n-t)/wv},function(t){return t.getUTCMinutes()}),Qv=Gv.range,Jv=Eu(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),Kv=Jv.range,tg=Eu(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),ng=tg.range,eg=Cu(0),rg=Cu(1),ig=Cu(2),og=Cu(3),ug=Cu(4),ag=Cu(5),cg=Cu(6),sg=eg.range,fg=rg.range,lg=ig.range,hg=og.range,pg=ug.range,dg=ag.range,vg=cg.range,gg=Eu(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),_g=gg.range,yg=Eu(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});yg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Eu(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var mg,xg=yg.range,bg={"-":"",_:" ",0:"0"},wg=/^\s*\d+/,Mg=/^%/,Tg=/[\\^$*+?|[\]().{}]/g;Ya({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ng="%Y-%m-%dT%H:%M:%S.%LZ",kg=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(Ng),Sg=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse(Ng),Eg=1e3,Ag=60*Eg,Cg=60*Ag,zg=24*Cg,Pg=7*zg,Rg=30*zg,Lg=365*zg,qg=Xa("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Dg=Xa("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Ug=Xa("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Og=Xa("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Fg=ol(Xt(300,.5,0),Xt(-240,.5,1)),Ig=ol(Xt(-100,.75,.35),Xt(80,1.5,.8)),Yg=ol(Xt(260,.75,.35),Xt(80,1.5,.8)),Bg=Xt(),Hg=Va(Xa("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),jg=Va(Xa("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Xg=Va(Xa("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Vg=Va(Xa("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),$g=Math.abs,Wg=Math.atan2,Zg=Math.cos,Gg=Math.max,Qg=Math.min,Jg=Math.sin,Kg=Math.sqrt,t_=1e-12,n_=Math.PI,e_=n_/2,r_=2*n_;ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var i_=lc(rc);fc.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var o_=Array.prototype.slice,u_={draw:function(t,n){var e=Math.sqrt(n/n_);t.moveTo(e,0),t.arc(0,0,e,0,r_)}},a_={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},c_=Math.sqrt(1/3),s_=2*c_,f_={draw:function(t,n){var e=Math.sqrt(n/s_),r=e*c_;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(n_/10)/Math.sin(7*n_/10),h_=Math.sin(r_/10)*l_,p_=-Math.cos(r_/10)*l_,d_={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=h_*e,i=p_*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=r_*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},v_={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},g_=Math.sqrt(3),__={draw:function(t,n){var e=-Math.sqrt(n/(3*g_));t.moveTo(0,2*e),t.lineTo(-g_*e,-e),t.lineTo(g_*e,-e),t.closePath()}},y_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),x_=3*(m_/2+1),b_={draw:function(t,n){var e=Math.sqrt(n/x_),r=e/2,i=e*m_,o=r,u=e*m_+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(-.5*r-y_*i,y_*r+-.5*i),t.lineTo(-.5*o-y_*u,y_*o+-.5*u),t.lineTo(-.5*a-y_*c,y_*a+-.5*c),t.lineTo(-.5*r+y_*i,-.5*i-y_*r),t.lineTo(-.5*o+y_*u,-.5*u-y_*o),t.lineTo(-.5*a+y_*c,-.5*c-y_*a),t.closePath()}},w_=[u_,a_,f_,v_,d_,__,b_];Tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Mc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Nc.prototype={areaStart:wc,areaEnd:wc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},kc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Mc(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Sc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var M_=function t(n){function e(t){return 1===n?new Tc(t):new Sc(t,n)}return e.beta=function(n){return t(+n)},e}(.85);Ac.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ec(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ec(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var T_=function t(n){function e(t){return new Ac(t,n)}return e.tension=function(n){return t(+n)},e}(0);Cc.prototype={areaStart:wc,areaEnd:wc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ec(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var N_=function t(n){function e(t){return new Cc(t,n)}return e.tension=function(n){return t(+n)},e}(0);zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ec(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var k_=function t(n){function e(t){return new zc(t,n)}return e.tension=function(n){return t(+n)},e}(0);Rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Pc(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var S_=function t(n){function e(t){return n?new Rc(t,n):new Ac(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Lc.prototype={areaStart:wc,areaEnd:wc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Pc(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var E_=function t(n){function e(t){return n?new Lc(t,n):new Cc(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pc(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var A_=function t(n){function e(t){return n?new qc(t,n):new zc(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Dc.prototype={areaStart:wc,areaEnd:wc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ic(this,this._t0,Fc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Ic(this,Fc(this,e=Oc(this,t,n)),e);break;default:Ic(this,this._t0,e=Oc(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Bc.prototype=Object.create(Yc.prototype)).point=function(t,n){Yc.prototype.point.call(this,n,t)},Hc.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},jc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=Xc(t),i=Xc(n),o=0,u=1;u=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},ns.prototype={constructor:ns,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=os(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(rs(this,e),e=(t=e).U),e.C=!1,r.C=!0,is(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(is(this,e),e=(t=e).U),e.C=!1,r.C=!0,rs(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,u=t.R;if(e=o?u?os(u):o:u,i?i.L===t?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=u,u.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,rs(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,is(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,rs(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,is(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,rs(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,is(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var C_,z_,P_,R_,L_,q_=[],D_=[],U_=1e-6,O_=1e-12;Ms.prototype={constructor:Ms,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return hs(n,t[e])});return e.data=n.site.data,e})},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){if(o=(i=e.halfedges).length)for(var i,o,u,a=e.site,c=-1,s=n[i[o-1]],f=s.left===a?s.right:s.left;++c=a)return null;var c=t-i.site[0],s=n-i.site[1],f=c*c+s*s;do{i=o.cells[r=u],u=null,i.halfedges.forEach(function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],s=n-a[1],l=c*c+s*s;lt?1:n>=t?0:NaN},t.deviation=u,t.extent=a,t.histogram=function(){function t(t){var i,o,u=t.length,a=new Array(u);for(i=0;il;)h.pop(),--d;var v,g=new Array(d+1);for(i=0;i<=d;++i)(v=g[i]=[]).x0=i>0?h[i-1]:s,v.x1=i=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},t.mean=function(t,n){var e,r=t.length,o=r,u=-1,a=0;if(null==n)for(;++u=o.length)return null!=e&&n.sort(e),null!=r?r(n):n;for(var c,s,f,l=-1,h=n.length,p=o[i++],d=ae(),v=u();++lo.length)return t;var i,a=u[e-1];return null!=r&&e>=o.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=a?i.sort(function(t,n){return a(t.key,n.key)}):i}var e,r,i,o=[],u=[];return i={object:function(n){return t(n,0,ce,se)},map:function(n){return t(n,0,fe,le)},entries:function(e){return n(t(e,0,fe,le),0)},key:function(t){return o.push(t),i},sortKeys:function(t){return u[o.length-1]=t,i},sortValues:function(t){return e=t,i},rollup:function(t){return r=t,i}}},t.set=pe,t.map=ae,t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},t.color=kt,t.rgb=Ct,t.hsl=Rt,t.lab=Ut,t.hcl=Ht,t.cubehelix=Xt,t.dispatch=N,t.drag=function(){function n(t){t.on("mousedown.drag",e).filter(g).on("touchstart.drag",o).on("touchmove.drag",u).on("touchend.drag touchcancel.drag",a).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!h&&p.apply(this,arguments)){var n=c("mouse",d.apply(this,arguments),F,this,arguments);n&&(lt(t.event.view).on("mousemove.drag",r,!0).on("mouseup.drag",i,!0),vt(t.event.view),pt(),l=!1,s=t.event.clientX,f=t.event.clientY,n("start"))}}function r(){if(dt(),!l){var n=t.event.clientX-s,e=t.event.clientY-f;l=n*n+e*e>x}_.mouse("drag")}function i(){lt(t.event.view).on("mousemove.drag mouseup.drag",null),gt(t.event.view,l),dt(),_.mouse("end")}function o(){if(p.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=d.apply(this,arguments),o=r.length;for(n=0;nc+p||is+p||or.index){var d=c-a.x-a.vx,v=s-a.y-a.vy,g=d*d+v*v;gt.r&&(t.r=t[n].r)}function r(){if(i){var n,e,r=i.length;for(o=new Array(r),n=0;n=f)){(t.data!==o||t.next)&&(0===i&&(i=_e(),p+=i*i),0===c&&(c=_e(),p+=c*c),p1?(null==n?l.remove(t):l.set(t,i(n)),o):l.get(t)},find:function(n,e,r){var i,o,u,a,c,s=0,f=t.length;for(null==r?r=1/0:r*=r,s=0;s1?(p.on(t,n),o):p.on(t)}}},t.forceX=function(t){function n(t){for(var n,e=0,u=r.length;e_r(r[0],r[1])&&(r[1]=i[1]),_r(i[0],r[1])>_r(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(a=_r(r[1],i[0]))>u&&(u=a,Wh=i[0],Gh=r[1])}return ep=rp=null,Wh===1/0||Zh===1/0?[[NaN,NaN],[NaN,NaN]]:[[Wh,Zh],[Gh,Qh]]},t.geoCentroid=function(t){ip=op=up=ap=cp=sp=fp=lp=hp=pp=dp=0,Je(t,Wp);var n=hp,e=pp,r=dp,i=n*n+e*e+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?f:c).invert(t)},t.stream=function(t){return e&&r===t?e:e=function(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=ro,t.geoRotation=Ur,t.geoStream=Je,t.geoTransform=function(t){return{stream:Ci(t)}},t.cluster=function(){function t(t){var o,u=0;t.eachAfter(function(t){var e=t.children;e?(t.x=function(t){return t.reduce(oo,0)/t.length}(e),t.y=function(t){return 1+t.reduce(uo,0)}(e)):(t.x=o?u+=n(t,o):0,t.y=0,o=t)});var a=function(t){for(var n;n=t.children;)t=n[0];return t}(t),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(t),s=a.x-n(a,c)/2,f=c.x+n(c,a)/2;return t.eachAfter(i?function(n){n.x=(n.x-t.x)*e,n.y=(t.y-n.y)*r}:function(n){n.x=(n.x-s)/(f-s)*e,n.y=(1-(t.y?n.y/t.y:1))*r})}var n=io,e=1,r=1,i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(n){return arguments.length?(i=!1,e=+n[0],r=+n[1],t):i?null:[e,r]},t.nodeSize=function(n){return arguments.length?(i=!0,e=+n[0],r=+n[1],t):i?[e,r]:null},t},t.hierarchy=co,t.pack=function(){function t(t){return t.x=e/2,t.y=r/2,n?t.eachBefore(Ao(n)).eachAfter(Co(i,.5)).eachBefore(zo(1)):t.eachBefore(Ao(Eo)).eachAfter(Co(ko,1)).eachAfter(Co(i,t.r/Math.min(e,r))).eachBefore(zo(Math.min(e,r)/(2*t.r))),t}var n=null,e=1,r=1,i=ko;return t.radius=function(e){return arguments.length?(n=function(t){return null==t?null:No(t)}(e),t):n},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i="function"==typeof n?n:So(+n),t):i},t},t.packSiblings=function(t){return To(t),t},t.packEnclose=po,t.partition=function(){function t(t){var o=t.height+1;return t.x0=t.y0=r,t.x1=n,t.y1=e/o,t.eachBefore(function(t,n){return function(e){e.children&&Ro(e,e.x0,t*(e.depth+1)/n,e.x1,t*(e.depth+2)/n);var i=e.x0,o=e.y0,u=e.x1-r,a=e.y1-r;u0)throw new Error("cycle");return o}var n=Lo,e=qo;return t.id=function(e){return arguments.length?(n=No(e),t):n},t.parentId=function(n){return arguments.length?(e=No(n),t):e},t},t.tree=function(){function t(t){var c=function(t){for(var n,e,r,i,o,u=new Yo(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new Yo(r[i],i)),e.parent=n;return(u.parent=new Yo(null,0)).children=[u],u}(t);if(c.eachAfter(n),c.parent.m=-c.z,c.eachBefore(e),a)t.eachBefore(r);else{var s=t,f=t,l=t;t.eachBefore(function(t){t.xf.x&&(f=t),t.depth>l.depth&&(l=t)});var h=s===f?1:i(s,f)/2,p=h-s.x,d=o/(f.x+h+p),v=u/(l.depth||1);t.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return t}function n(t){var n=t.children,e=t.parent.children,r=t.i?e[t.i-1]:null;if(n){(function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)})(t);var o=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+i(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+i(t._,r._));t.parent.A=function(t,n,e){if(n){for(var r,o=t,u=t,a=n,c=o.parent.children[0],s=o.m,f=u.m,l=a.m,h=c.m;a=Oo(a),o=Uo(o),a&&o;)c=Uo(c),(u=Oo(u)).a=t,(r=a.z+l-o.z-s+i(a._,o._))>0&&(Fo(Io(a,t,e),t,r),s+=r,f+=r),l+=a.m,s+=o.m,h+=c.m,f+=u.m;a&&!Oo(u)&&(u.t=a,u.m+=l-f),o&&!Uo(c)&&(c.t=o,c.m+=s-h,e=t)}return e}(t,r,t.parent.A||e[0])}function e(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t){t.x*=o,t.y=t.depth*u}var i=Do,o=1,u=1,a=null;return t.separation=function(n){return arguments.length?(i=n,t):i},t.size=function(n){return arguments.length?(a=!1,o=+n[0],u=+n[1],t):a?null:[o,u]},t.nodeSize=function(n){return arguments.length?(a=!0,o=+n[0],u=+n[1],t):a?[o,u]:null},t},t.treemap=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(n),u=[0],r&&t.eachBefore(Po),t}function n(t){var n=u[t.depth],r=t.x0+n,i=t.y0+n,o=t.x1-n,h=t.y1-n;o=n-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=u,void(s.y1=a)}for(var l=f[t],h=e/2+l,p=t+1,d=n-1;p>>1;f[v]a-i){var y=(r*_+u*g)/e;o(t,p,g,r,i,y,a),o(p,n,_,y,i,u,a)}else{var m=(i*_+a*g)/e;o(t,p,g,r,i,u,m),o(p,n,_,r,m,u,a)}}var u,a,c=t.children,s=c.length,f=new Array(s+1);for(f[0]=a=u=0;u=0;--n)s.push(t[r[o[n]][2]]);for(n=+a;na!=s>a&&u<(c-e)*(a-r)/(s-r)+e&&(f=!f),c=e,s=r;return f},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Bg.h=360*t-100,Bg.s=1.5-1.5*n,Bg.l=.8-.9*n,Bg+""},t.interpolateWarm=Ig,t.interpolateCool=Yg,t.interpolateViridis=Hg,t.interpolateMagma=jg,t.interpolateInferno=Xg,t.interpolatePlasma=Vg,t.scaleSequential=$a,t.creator=A,t.local=C,t.matcher=rf,t.mouse=F,t.namespace=E,t.namespaces=Js,t.clientPoint=O,t.select=lt,t.selectAll=function(t){return"string"==typeof t?new st([document.querySelectorAll(t)],[document.documentElement]):new st([null==t?[]:t],af)},t.selection=ft,t.selector=Y,t.selectorAll=H,t.style=G,t.touch=ht,t.touches=function(t,n){null==n&&(n=U().touches);for(var e=0,r=n?n.length:0,i=new Array(r);eh;if(c||(c=t=te()),lt_)if(d>r_-t_)c.moveTo(l*Zg(h),l*Jg(h)),c.arc(0,0,l,h,p,!v),f>t_&&(c.moveTo(f*Zg(p),f*Jg(p)),c.arc(0,0,f,p,h,v));else{var g,_,y=h,m=p,x=h,b=p,w=d,M=d,T=a.apply(this,arguments)/2,N=T>t_&&(i?+i.apply(this,arguments):Kg(f*f+l*l)),k=Qg($g(l-f)/2,+r.apply(this,arguments)),S=k,E=k;if(N>t_){var A=Za(N/f*Jg(T)),C=Za(N/l*Jg(T));(w-=2*A)>t_?(A*=v?1:-1,x+=A,b-=A):(w=0,x=b=(h+p)/2),(M-=2*C)>t_?(C*=v?1:-1,y+=C,m-=C):(M=0,y=m=(h+p)/2)}var z=l*Zg(y),P=l*Jg(y),R=f*Zg(b),L=f*Jg(b);if(k>t_){var q=l*Zg(m),D=l*Jg(m),U=f*Zg(x),O=f*Jg(x);if(dt_?function(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,f=u-i,l=a-o,h=(f*(n-o)-l*(t-i))/(l*c-f*s);return[t+h*c,n+h*s]}(z,P,U,O,q,D,R,L):[R,L],I=z-F[0],Y=P-F[1],B=q-F[0],H=D-F[1],j=1/Jg(function(t){return t>1?0:t<-1?n_:Math.acos(t)}((I*B+Y*H)/(Kg(I*I+Y*Y)*Kg(B*B+H*H)))/2),X=Kg(F[0]*F[0]+F[1]*F[1]);S=Qg(k,(f-X)/(j-1)),E=Qg(k,(l-X)/(j+1))}}M>t_?E>t_?(g=nc(U,O,z,P,l,E,v),_=nc(q,D,R,L,l,E,v),c.moveTo(g.cx+g.x01,g.cy+g.y01),Et_&&w>t_?S>t_?(g=nc(R,L,q,D,f,-S,v),_=nc(z,P,U,O,f,-S,v),c.lineTo(g.cx+g.x01,g.cy+g.y01),S0&&(p+=l);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=r&&d.sort(function(n,e){return r(t[n],t[e])}),a=0,s=p?(_-h*m)/p:0;a0?l*s:0)+m,v[c]={data:t[c],index:a,value:l,startAngle:g,endAngle:f,padAngle:y};return v}var n=sc,e=cc,r=null,i=Wa(0),o=Wa(r_),u=Wa(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Wa(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,r=null,t):e},t.sort=function(n){return arguments.length?(r=n,e=null,t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:Wa(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:Wa(+n),t):o},t.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:Wa(+n),t):u},t},t.areaRadial=dc,t.radialArea=dc,t.lineRadial=pc,t.radialLine=pc,t.pointRadial=vc,t.linkHorizontal=function(){return yc(mc)},t.linkVertical=function(){return yc(xc)},t.linkRadial=function(){var t=yc(bc);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){function t(){var t;if(r||(r=t=te()),n.apply(this,arguments).draw(r,+e.apply(this,arguments)),t)return r=null,t+""||null}var n=Wa(u_),e=Wa(64),r=null;return t.type=function(e){return arguments.length?(n="function"==typeof e?e:Wa(e),t):n},t.size=function(n){return arguments.length?(e="function"==typeof n?n:Wa(+n),t):e},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t},t.symbols=w_,t.symbolCircle=u_,t.symbolCross=a_,t.symbolDiamond=f_,t.symbolSquare=v_,t.symbolStar=d_,t.symbolTriangle=__,t.symbolWye=b_,t.curveBasisClosed=function(t){return new Nc(t)},t.curveBasisOpen=function(t){return new kc(t)},t.curveBasis=function(t){return new Tc(t)},t.curveBundle=M_,t.curveCardinalClosed=N_,t.curveCardinalOpen=k_,t.curveCardinal=T_,t.curveCatmullRomClosed=E_,t.curveCatmullRomOpen=A_,t.curveCatmullRom=S_,t.curveLinearClosed=function(t){return new Dc(t)},t.curveLinear=rc,t.curveMonotoneX=function(t){return new Yc(t)},t.curveMonotoneY=function(t){return new Bc(t)},t.curveNatural=function(t){return new jc(t)},t.curveStep=function(t){return new Vc(t,.5)},t.curveStepAfter=function(t){return new Vc(t,1)},t.curveStepBefore=function(t){return new Vc(t,0)},t.stack=function(){function t(t){var o,u,a=n.apply(this,arguments),c=t.length,s=a.length,f=new Array(s);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o1)for(var e,r,i,o,u,a,c=0,s=t[n[0]].length;c=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):r[0]=o},t.stackOffsetNone=$c,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;uyl&&e.name===n)return new Rn([[t]],Gl,n,+r)}return null},t.interrupt=Cn,t.voronoi=function(){function t(t){return new Ms(t.map(function(r,i){var o=[Math.round(n(r,i,t)/U_)*U_,Math.round(e(r,i,t)/U_)*U_];return o.index=i,o.data=r,o}),r)}var n=Kc,e=ts,r=null;return t.polygons=function(n){return t(n).polygons()},t.links=function(n){return t(n).links()},t.triangles=function(n){return t(n).triangles()},t.x=function(e){return arguments.length?(n="function"==typeof e?e:Jc(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:Jc(+n),t):e},t.extent=function(n){return arguments.length?(r=null==n?null:[[+n[0][0],+n[0][1]],[+n[1][0],+n[1][1]]],t):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},t.size=function(n){return arguments.length?(r=null==n?null:[[0,0],[+n[0],+n[1]]],t):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},t},t.zoom=function(){function n(t){t.property("__zoom",zs).on("wheel.zoom",c).on("mousedown.zoom",s).on("dblclick.zoom",f).filter(x).on("touchstart.zoom",l).on("touchmove.zoom",h).on("touchend.zoom touchcancel.zoom",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,n){return(n=Math.max(b[0],Math.min(b[1],n)))===t.k?t:new Ns(n,t.x,t.y)}function r(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Ns(t.k,r,i)}function i(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function o(t,n,e){t.on("start.zoom",function(){u(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){u(this,arguments).end()}).tween("zoom",function(){var t=arguments,r=u(this,t),o=_.apply(this,t),a=e||i(o),c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),s=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=T(s.invert(a).concat(c/s.k),f.invert(a).concat(c/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=c/n[2];t=new Ns(e,a[0]-n[0]*e,a[1]-n[1]*e)}r.zoom(null,t)}})}function u(t,n){for(var e,r=0,i=k.length;rC}n.zoom("mouse",y(r(n.that.__zoom,n.mouse[0]=F(n.that),n.mouse[1]),n.extent,w))},!0).on("mouseup.zoom",function(){e.on("mousemove.zoom mouseup.zoom",null),gt(t.event.view,n.moved),Es(),n.end()},!0),i=F(this),o=t.event.clientX,a=t.event.clientY;vt(t.event.view),Ss(),n.mouse=[i,this.__zoom.invert(i)],Cn(this),n.start()}}function f(){if(g.apply(this,arguments)){var i=this.__zoom,u=F(this),a=i.invert(u),c=i.k*(t.event.shiftKey?.5:2),s=y(r(e(i,c),u,a),_.apply(this,arguments),w);Es(),M>0?lt(this).transition().duration(M).call(o,s,u):lt(this).call(n.transform,s)}}function l(){if(g.apply(this,arguments)){var n,e,r,i,o=u(this,arguments),a=t.event.changedTouches,c=a.length;for(Ss(),e=0;e3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.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},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.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)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.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").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); + +/*! + DataTables 1.10.15 + ©2008-2017 SpryMedia Ltd - datatables.net/license +*/ +(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()), +d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords"); +a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&fb(a)}function gb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX= +a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(h("
    ").css({position:"absolute", +top:1,left:1,width:100,overflow:"scroll"}).append(h("
    ").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function jb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!== +e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);la(a,d,h(b).data())}function la(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig= +e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(hb(c),J(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=R(g),i=b.mRender?R(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")}; +b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return S(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI= +d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function Z(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;cq[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;jb&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild); +c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c").appendTo(g));b=0;for(c=l.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH); +if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart= +-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!nb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j",{"class":e?d[0]:""}).append(h("",{valign:"top",colSpan:ba(a),"class":a.oClasses.sRowEmpty}).html(c))[0];s(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ma(a),g,n,i]);s(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ma(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));s(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter; +c.bSort&&ob(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;O(a);a._drawHold=!1}function pb(a){var b=a.oClasses,c=h(a.nTable),c=h("
    ").insertBefore(c),d=a.oFeatures,e=h("
    ",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,k=0;k")[0]; +n=f[k+1];if("'"==n||'"'==n){l="";for(q=2;f[k+q]!=n;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=qb(a);else if("f"==j&&d.bFilter)g=rb(a);else if("r"==j&&d.bProcessing)g=sb(a);else if("t"==j)g=tb(a);else if("i"==j&&d.bInfo)g=ub(a);else if("p"== +j&&d.bPaginate)g=vb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("
    ",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("
    ").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ta(a,h(this).val());O(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function vb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){O(a)},b=h("
    ").addClass(a.oClasses.sPaging+ +b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;lf&& +(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none"); +s(a,null,"processing",[a,b])}function tb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("
    ",{"class":f.sScrollWrapper}).append(h("
    ",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("
    ", +{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("
    ",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("
    ",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("
    ",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left", +0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],r=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(r.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=r;a.aoDrawCallback.push({fn:ma,sName:"scrolling"});return i[0]}function ma(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"), +j=a.nScrollBody,l=h(j),q=j.style,r=h(a.nScrollFoot).children("div"),m=r.children("table"),p=h(a.nTHead),o=h(a.nTable),t=o[0],s=t.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,ac=D(a.aoColumns,"nTh"),P,L,Q,w,Wa=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==L&&a.scrollBarVis!==k)a.scrollBarVis=L,Z(a);else{a.scrollBarVis=L;o.children("thead, tfoot").remove(); +u&&(Q=u.clone().prependTo(o),P=u.find("tr"),Q=Q.find("tr"));w=p.clone().prependTo(o);p=p.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ta(a,w),function(b,c){B=$(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},Q);f=o.outerWidth();if(""===c){s.width="100%";if(U&&(o.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))s.width=v(o.outerWidth()-b);f=o.outerWidth()}else""!==d&&(s.width= +v(d),f=o.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Wa.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,ac)!==-1)a.style.width=Wa[b]},p);h(L).height(0);u&&(I(C,Q),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},Q),I(function(a,b){a.style.width=y[b]},P),h(Q).height(0));I(function(a,b){a.innerHTML='
    '+z[b]+"
    ";a.style.width=Wa[b]},L);u&&I(function(a,b){a.innerHTML='
    '+ +A[b]+"
    ";a.style.width=y[b]},Q);if(o.outerWidth()j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))s.width=v(P-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else P="100%";q.width=v(P);g.width=v(P);u&&(a.nScrollFoot.style.width=v(P));!e&&U&&(q.height=v(t.offsetHeight+b));c=o.outerWidth();n[0].style.width=v(c);i.width=v(c);d=o.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+ +(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=v(c),r[0].style.width=v(c),r[0].style[e]=d?b+"px":"0px");o.children("colgroup").insertBefore(o.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0,f=b.length,g,j;e").appendTo(j.find("tbody")); +j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=ta(a,j.find("thead")[0]);for(m=0;m").css({width:p.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Hb(a,b){var c=Ib(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Ib(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;fd&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function W(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;ae?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return ce?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,p=f[b]._aSortData;for(j=0;jg?1:0})}a.bSorted=!0}function Kb(a){for(var b,c,d=a.aoColumns,e=W(a),a=a.oLanguage.oAria,f=0,g=d.length;f/g, +"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0e?e+1:3));e=0;for(f=d.length;ee?e+1:3))}a.aLastSort=d}function Jb(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,aa(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j=f.length?[0,c[1]]:c)}));b.search!== +k&&h.extend(a.oPreviousSearch,Db(b.search));if(b.columns){d=0;for(e=b.columns.length;d=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Pa(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Nb.numbers_length,d=Math.floor(c/2);b<=c?c=X(0,b):a<=d?(c=X(0, +c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=X(b-(c-2),b):(c=X(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function fb(a){h.each({num:function(b){return Ba(b,a)},"num-fmt":function(b){return Ba(b,a,Za)},"html-num":function(b){return Ba(b,a,Ca)},"html-num-fmt":function(b){return Ba(b,a,Ca,Za)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Ob(a){return function(){var b= +[Aa(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new t(Aa(this[x.iApiIndex])):new t(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing= +function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ma(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)}; +this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase(); +return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return Aa(this[x.iApiIndex])}; +this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in m.ext.internal)e&&(this[e]=Ob(e));this.each(function(){var e={},g=1t<"F"ip>'),o.renderer)?h.isPlainObject(o.renderer)&& +!o.renderer.header&&(o.renderer.header="jqueryui"):o.renderer="jqueryui":h.extend(u,m.ext.classes,g.oClasses);q.addClass(u.sTable);o.iInitDisplayStart===k&&(o.iInitDisplayStart=g.iDisplayStart,o._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(o.bDeferLoading=!0,e=h.isArray(g.iDeferLoading),o._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,o._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=o.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Fa(a); +J(l.oLanguage,a);h.extend(true,v,a);ha(o)},error:function(){ha(o)}}),n=!0);null===g.asStripeClasses&&(o.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=o.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&(h("tbody tr",this).removeClass(e.join(" ")),o.asDestroyStripes=e.slice());e=[];r=this.getElementsByTagName("thead");0!==r.length&&(ea(o.aoHeader,r[0]),e=ta(o));if(null===g.aoColumns){r=[];j=0;for(i=e.length;j").appendTo(q)); +o.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("").appendTo(q));o.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(o.oScroll.sX!==""||o.oScroll.sY!==""))b=h("").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){o.nTFoot=b[0];ea(o.aoFooter,o.nTFoot)}if(g.aaData)for(j=0;j/g,cc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,dc=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Za=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Qb=function(a){var b=parseInt(a,10);return!isNaN(b)&& +isFinite(a)?b:null},Rb=function(a,b){$a[b]||($a[b]=RegExp(Sa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace($a[b],"."):a},ab=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Rb(a,b));c&&d&&(a=a.replace(Za,""));return!isNaN(parseFloat(a))&&isFinite(a)},Sb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:ab(a.replace(Ca,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;ea.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d")[0],$b=xa.textContent!==k,bc= +/<.*?>/g,Qa=m.util.throttle,Ub=[],w=Array.prototype,ec=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};t=function(a,b){if(!(this instanceof +t))return new t(a,b);var c=[],d=function(a){(a=ec(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;ea?new t(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=ba(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});p(["row().child.show()","row().child().show()"],function(){Wb(this,!0);return this});p(["row().child.hide()","row().child().hide()"],function(){Wb(this,!1); +return this});p(["row().child.remove()","row().child().remove()"],function(){eb(this);return this});p("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var fc=/^([^:]+):(name|visIdx|visible)$/,Xb=function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d=0?b:g.length+b];if(typeof a==="function"){var e=Da(c,f);return h.map(g,function(b,f){return a(f,Xb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(fc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[$(c,b)];case "name":return h.map(j,function(a,b){return a=== +k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()", +function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Xb,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()", +"column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,i,n,l;if(a!==k&&g.bVisible!==a){if(a){var m=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(n=j.length;id;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof m.Api)return!0;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings, +function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new t(c):c};m.camelToHungarian=J;p("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){p(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});p("clear()",function(){return this.iterator("table", +function(a){pa(a)})});p("settings()",function(){return new t(this.context,this.context)});p("init()",function(){var a=this.context;return a.length?a[0].oInit:null});p("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});p("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}), +p;b.bDestroying=!0;s(b,"aoDestroyCallback","destroy",[b]);a||(new t(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];ya(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&(h("th span."+d.sSortIcon+ +", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%p])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,1)})});h.each(["column", +"row","cell"],function(a,b){p(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});p("i18n()",function(a,b,c){var d=this.context[0],a=R(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.15";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow={nTr:null,anCells:null, +_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};m.defaults= +{aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, +this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+ +"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries", +sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"}; +Y(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};Y(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null, +bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[], +aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null, +aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a= +this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=x={buttons:{},classes:{},build:"bs-3.3.7/dt-1.10.15",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{}, +header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd", +sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead", +sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ea="",Ea="",G=Ea+"ui-state-default",ka=Ea+"css_right ui-icon ui-icon-",Yb=Ea+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(m.ext.oJUIClasses, +m.ext.classes,{sPageButton:"fg-button ui-button "+G,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:G+" sorting_asc",sSortDesc:G+" sorting_desc",sSortable:G+" sorting",sSortableAsc:G+" sorting_asc_disabled",sSortableDesc:G+" sorting_desc_disabled",sSortableNone:G+" sorting_disabled",sSortJUIAsc:ka+"triangle-1-n",sSortJUIDesc:ka+"triangle-1-s",sSortJUI:ka+"carat-2-n-s", +sSortJUIAscAllowed:ka+"carat-1-n",sSortJUIDescAllowed:ka+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+G,sScrollFoot:"dataTables_scrollFoot "+G,sHeaderTH:G,sFooterTH:G,sJUIHeader:Yb+" ui-corner-tl ui-corner-tr",sJUIFooter:Yb+" ui-corner-bl ui-corner-br"});var Nb=m.ext.pager;h.extend(Nb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a, +b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,p=0,r=function(b,d){var k,t,u,s,v=function(b){Va(a,b.data.action,true)};k=0;for(t=d.length;k").appendTo(b);r(u,s)}else{m=null;l="";switch(s){case "ellipsis":b.append('…');break;case "first":m=j.sFirst;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=s+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=j.sNext;l=s+(e",{"class":g.sPageButton+ +" "+l,"aria-controls":a.sTableId,"aria-label":i[s],"data-dt-idx":p,tabindex:a.iTabIndex,id:c===0&&typeof s==="string"?a.sTableId+"_"+s:null}).html(m).appendTo(b);Ya(u,{action:s},v);p++}}}},t;try{t=h(b).find(H.activeElement).data("dt-idx")}catch(u){}r(h(b).empty(),d);t!==k&&h(b).find("[data-dt-idx="+t+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return ab(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!cc.test(a))return null;var b=Date.parse(a); +return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return ab(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Sb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Sb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Pb," ").replace(Ca,""):""},string:function(a){return M(a)? +a:"string"===typeof a?a.replace(Pb," "):a}});var Ba=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Rb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){return Date.parse(a)||-Infinity},"html-pre":function(a){return M(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a< +b?-1:a>b?1:0},"string-desc":function(a,b){return ab?-1:0}});fb("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("
    ").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b); +h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Zb=function(a){return"string"===typeof a?a.replace(//g,">").replace(/"/g, +"""):a};m.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Zb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Zb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Ob,_fnBuildAjax:ua,_fnAjaxUpdate:nb,_fnAjaxParameters:wb,_fnAjaxUpdateDraw:xb, +_fnAjaxDataSrc:va,_fnAddColumn:Ga,_fnColumnOptions:la,_fnAdjustColumnSizing:Z,_fnVisibleToColumnIndex:$,_fnColumnIndexToVisible:aa,_fnVisbleColumns:ba,_fnGetColumns:na,_fnColumnTypes:Ia,_fnApplyColumnDefs:kb,_fnHungarianMap:Y,_fnCamelToHungarian:J,_fnLanguageCompat:Fa,_fnBrowserDetect:ib,_fnAddData:N,_fnAddTr:oa,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:lb, +_fnSplitObjNotation:La,_fnGetObjectDataFn:R,_fnSetObjectDataFn:S,_fnGetDataMaster:Ma,_fnClearTable:pa,_fnDeleteIndex:qa,_fnInvalidate:da,_fnGetRowElements:Ka,_fnCreateTr:Ja,_fnBuildHead:mb,_fnDrawHead:fa,_fnDraw:O,_fnReDraw:T,_fnAddOptionsHtml:pb,_fnDetectHeader:ea,_fnGetUniqueThs:ta,_fnFeatureHtmlFilter:rb,_fnFilterComplete:ga,_fnFilterCustom:Ab,_fnFilterColumn:zb,_fnFilter:yb,_fnFilterCreateSearch:Ra,_fnEscapeRegex:Sa,_fnFilterData:Bb,_fnFeatureHtmlInfo:ub,_fnUpdateInfo:Eb,_fnInfoMacros:Fb,_fnInitialise:ha, +_fnInitComplete:wa,_fnLengthChange:Ta,_fnFeatureHtmlLength:qb,_fnFeatureHtmlPaginate:vb,_fnPageChange:Va,_fnFeatureHtmlProcessing:sb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:tb,_fnScrollDraw:ma,_fnApplyToChildren:I,_fnCalculateColumnWidths:Ha,_fnThrottle:Qa,_fnConvertToWidth:Gb,_fnGetWidestNode:Hb,_fnGetMaxLenString:Ib,_fnStringToCss:v,_fnSortFlatten:W,_fnSort:ob,_fnSortAria:Kb,_fnSortListener:Xa,_fnSortAttachListener:Oa,_fnSortingClasses:ya,_fnSortData:Jb,_fnSaveState:za,_fnLoadState:Lb,_fnSettingsFromNode:Aa, +_fnLog:K,_fnMap:F,_fnBindAction:Ya,_fnCallbackReg:z,_fnCallbackFire:s,_fnLengthOverflow:Ua,_fnRenderer:Pa,_fnDataSource:y,_fnRowAttributes:Na,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable}); + + +/*! + DataTables Bootstrap 3 integration + ©2011-2015 SpryMedia Ltd - datatables.net/license +*/ +(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes, +{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; +l=0;for(h=f.length;l",{"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#", +"aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('
      ').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f}); + + diff --git a/config/plugins/visualizations/mvpapp/static/js/lib/excanvas.min.js b/config/plugins/visualizations/mvpapp/static/js/lib/excanvas.min.js new file mode 100755 index 00000000000..12c74f7bea8 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/js/lib/excanvas.min.js @@ -0,0 +1 @@ +if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()}; \ No newline at end of file diff --git a/config/plugins/visualizations/mvpapp/static/js/lib/igv.js b/config/plugins/visualizations/mvpapp/static/js/lib/igv.js new file mode 100644 index 00000000000..707c6238260 --- /dev/null +++ b/config/plugins/visualizations/mvpapp/static/js/lib/igv.js @@ -0,0 +1,55374 @@ +/* Module header based on https://github.com/umdjs/umd/blob/master/templates/returnExports.js + */ + +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], factory); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.igv = factory(); + } + }(this, function () { +// +// // Just return a value to define the module export. +// // This example returns an object, but the module +// // can return a function as the exported value. +// return igv; +// +// })); + + + +(function () { + + var css = '.igv-color-swatch {\n display: flex;\n flex-flow: row;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n width: 24px;\n height: 24px;\n border-style: solid;\n border-width: 1px;\n border-color: transparent; }\n .igv-color-swatch i.fa {\n display: block; }\n .igv-color-swatch i.fa:hover,\n .igv-color-swatch i.fa:focus,\n .igv-color-swatch i.fa:active {\n cursor: pointer;\n color: #0f0f0f; }\n\n.igv-color-swatch:hover,\n.igv-color-swatch:focus,\n.igv-color-swatch:active {\n border-color: #dddddd; }\n\n.igv-colorpicker-menu-close-button {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n width: 100%;\n height: 32px;\n margin-top: 4px;\n margin-bottom: 4px;\n padding-right: 8px; }\n .igv-colorpicker-menu-close-button i.fa {\n display: block;\n margin-left: 4px;\n margin-right: 4px;\n color: #5f5f5f; }\n .igv-colorpicker-menu-close-button i.fa:hover,\n .igv-colorpicker-menu-close-button i.fa:focus,\n .igv-colorpicker-menu-close-button i.fa:active {\n cursor: pointer;\n color: #0f0f0f; }\n\n.igv-position-absolute {\n position: absolute;\n top: 0;\n left: 0; }\n\n.igv-generic-container {\n width: 256px;\n z-index: 5000;\n background-color: white;\n border-style: solid;\n border-width: thin;\n border-color: #dddddd;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center; }\n .igv-generic-container div:first-child {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center;\n height: 24px;\n width: 100%;\n background-color: #dddddd; }\n .igv-generic-container div:first-child i.fa {\n margin-right: 4px;\n display: block;\n color: #5f5f5f; }\n .igv-generic-container div:first-child i.fa:hover,\n .igv-generic-container div:first-child i.fa:focus,\n .igv-generic-container div:first-child i.fa:active {\n cursor: pointer;\n color: #0f0f0f; }\n\n#igvControlDiv {\n position: relative; }\n\n#igv-content-header {\n position: relative;\n height: 16px;\n clear: both;\n margin-top: 10px;\n white-space: nowrap; }\n #igv-content-header .igv-ideogram-left-shim {\n position: relative;\n height: 100%;\n width: 50px;\n display: inline-block;\n background-color: white; }\n #igv-content-header .igv-ideogram-content-div {\n position: relative;\n height: 100%;\n display: inline-block;\n background-color: white; }\n #igv-content-header .igv-ideogram-content-div canvas {\n width: 100%;\n height: 100%; }\n #igv-content-header .igv-ideogram-content-div-border-right {\n border-right-color: #292929;\n border-right-style: solid;\n border-right-width: 1px; }\n\n.igv-multi-locus-panel-border {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 1px;\n background-color: green;\n border-right-color: #ff0000;\n border-right-style: solid;\n border-right-width: 1px; }\n\n#igv-navbar {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-top: 2px;\n margin-bottom: 4px;\n position: relative;\n top: 0;\n left: 0;\n height: 32px;\n width: 100%;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: #f3f3f3; }\n #igv-navbar i {\n cursor: pointer;\n color: #666666; }\n #igv-navbar i:hover,\n #igv-navbar i:focus,\n #igv-navbar i:active {\n color: #434343; }\n #igv-navbar #igv-nav-bar-left-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px; }\n #igv-navbar #igv-nav-bar-left-container #igv-logo {\n width: 34px;\n height: 32px;\n margin-left: 8px;\n margin-right: 32px; }\n #igv-navbar #igv-nav-bar-left-container #igv-drag-and-drop-presentation-button {\n margin-right: 32px; }\n #igv-navbar #igv-nav-bar-left-container #igv-current_genome {\n height: 32px;\n margin-right: 16px;\n user-select: none;\n color: #444;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 32px;\n text-align: center; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 32px; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-chromosome-select-widget-container {\n width: 96px;\n margin-right: 4px;\n height: 70%; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-chromosome-select-widget-container select {\n display: block;\n outline: none;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n color: #444;\n width: 100%;\n height: 100%; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n height: 75%; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container {\n width: 260px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container input {\n display: block;\n width: 85%;\n padding-left: 8px;\n margin-right: 8px;\n line-height: 20px;\n text-align: left;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n color: #444;\n outline: none;\n border-style: solid;\n border-radius: 3px;\n border-width: thin;\n border-color: #bfbfbf;\n background-color: white; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container div {\n height: 100%; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-search-container div i {\n font-size: 18px; }\n #igv-navbar #igv-nav-bar-left-container #igv-genomic-location #igv-locus-size-group #igv-windowsizepanel-content-div {\n margin-left: 4px;\n user-select: none;\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 400;\n color: #444; }\n #igv-navbar #igv-nav-bar-right-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center; }\n #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n margin-right: 8px; }\n #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container div {\n margin-left: 0;\n margin-right: 4px; }\n #igv-navbar #igv-nav-bar-right-container #igv-nav-bar-toggle-button-container div:last-child {\n margin-left: 0;\n margin-right: 0; }\n #igv-navbar #igv-nav-bar-right-container #igv-zoom-widget {\n user-select: none;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n width: 44px;\n margin-left: 16px;\n margin-right: 8px; }\n #igv-navbar #igv-nav-bar-right-container #igv-zoom-widget div i {\n font-size: 24px; }\n\n.igv-nav-bar-button {\n height: 18px;\n min-width: 96px;\n text-transform: capitalize;\n user-select: none;\n line-height: 18px;\n text-align: center;\n font-family: \"Open Sans\", sans-serif;\n font-size: 11px;\n font-weight: 200;\n color: #737373;\n background-color: #f3f3f3;\n border-color: #737373;\n border-style: solid;\n border-width: thin;\n border-radius: 10px; }\n\n.igv-nav-bar-button-clicked {\n color: white;\n background-color: #737373; }\n\n.igv-nav-bar-button:hover {\n cursor: pointer; }\n\n#igv-logo-nonav {\n margin-left: 4px;\n margin-top: 12px;\n position: absolute;\n top: 0;\n left: 0;\n width: 34px;\n height: 16px; }\n\n.igv-search-results {\n position: absolute;\n top: 32px;\n left: 2px;\n height: 320px;\n width: 213px;\n background-color: white;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 9999; }\n .igv-search-results tr {\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #444; }\n .igv-search-results tr:hover,\n .igv-search-results tr:focus,\n .igv-search-results tr:active {\n cursor: pointer;\n font-weight: 700;\n color: #141414; }\n\n.igv-karyo-div {\n position: relative;\n left: 0;\n top: 0;\n height: 200px; }\n\n.igv-karyo-hide {\n height: 0;\n overflow: hidden; }\n\n.igv-karyo-content-div {\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.igv-karyo-canvas {\n left: 0;\n top: 0;\n width: 100%;\n height: 100%; }\n\n.igv-root-div {\n position: relative;\n left: 0;\n right: 0;\n height: auto;\n margin-left: 10px;\n margin-right: 10px;\n padding-top: 4px; }\n\n.igv-content-div {\n position: relative;\n width: 100%;\n height: 100%; }\n\n.igv-track-container-div {\n position: relative;\n clear: both; }\n\n.igv-track-div {\n position: relative;\n width: 100%;\n margin-top: 2px;\n margin-bottom: 2px; }\n\n.igv-viewport-container {\n position: absolute;\n left: 50px;\n right: 50px;\n height: 100%;\n white-space: nowrap;\n overflow-x: hidden;\n overflow-y: hidden; }\n\n.igv-viewport-div {\n position: relative;\n display: inline-block;\n height: 100%;\n overflow-x: hidden;\n overflow-y: hidden; }\n\n.igv-viewport-content-div {\n position: absolute;\n width: 100%; }\n\n.igv-viewport-message {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: rgba(0, 0, 0, 0.15);\n font-family: \"Open Sans\", sans-serif;\n font-size: 25px;\n font-weight: bold;\n user-select: none; }\n\n.igv-whole-genome-container {\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n background-color: white; }\n .igv-whole-genome-container div {\n font-family: \"Open Sans\", sans-serif;\n font-size: 10px;\n font-weight: 400;\n color: #444;\n height: 100%;\n text-align: center;\n border-right-color: #bfbfbf;\n border-right-style: solid;\n border-right-width: thin; }\n .igv-whole-genome-container div span {\n display: block;\n padding-top: 6px;\n text-overflow: ellipsis; }\n .igv-whole-genome-container div:last-child {\n border-right-color: transparent; }\n .igv-whole-genome-container div:hover,\n .igv-whole-genome-container div:focus,\n .igv-whole-genome-container div:active {\n cursor: pointer;\n background-color: #efefef; }\n\n.igv-viewport-div-border-right {\n border-right-color: #292929;\n border-right-style: solid;\n border-right-width: 1px; }\n\n.igv-viewport-fa-close {\n position: absolute;\n top: 4px;\n right: 4px;\n font-size: 16px;\n color: #666666;\n z-index: 1000; }\n\n.igv-viewport-fa-close:hover {\n cursor: pointer;\n color: #434343; }\n\n.igv-viewport-content-ruler-div {\n position: absolute;\n left: 50%;\n top: 25%;\n transform: translate(-50%, -25%);\n font-family: \"Open Sans\", sans-serif;\n font-size: 12px;\n font-weight: 200;\n text-align: center;\n min-width: 16px;\n z-index: 64;\n color: #0066ff;\n background-color: white;\n padding: 1px; }\n\n.igv-viewport-content-ruler-div:hover,\n.igv-viewport-content-ruler-div:focus,\n.igv-viewport-content-ruler-div:active {\n cursor: pointer;\n color: white;\n background-color: #0066ff; }\n\n.igv-viewport-ruler {\n font-family: \"Open Sans\", sans-serif;\n font-size: 10px;\n font-weight: 200;\n text-align: center; }\n .igv-viewport-ruler > div {\n height: 100%; }\n\n.igv-viewport-sequence {\n font-family: \"Open Sans\", sans-serif;\n font-size: 8px;\n font-weight: 200;\n text-align: center; }\n\n.igv-viewport-spinner {\n pointer-events: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1024;\n color: #737373; }\n\n.igv-ruler-sweeper-div {\n display: none;\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n z-index: 99999;\n background-color: rgba(68, 134, 247, 0.25); }\n\n.igv-right-hand-gutter {\n position: absolute;\n right: 0;\n width: 36px;\n height: 100%;\n background: white;\n text-align: center; }\n .igv-right-hand-gutter i {\n position: absolute;\n top: 0;\n right: 0;\n padding-right: 6px;\n font-size: 20px;\n cursor: pointer;\n color: grey; }\n .igv-right-hand-gutter i:hover,\n .igv-right-hand-gutter i:focus,\n .igv-right-hand-gutter i:active {\n color: #333333; }\n\n.igv-left-hand-gutter {\n position: absolute;\n left: 0;\n width: 50px;\n height: 100%; }\n .igv-left-hand-gutter canvas {\n position: absolute; }\n\n.igv-track-menu-container {\n background-color: white;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px; }\n .igv-track-menu-container div {\n padding-left: 4px;\n padding-right: 4px;\n padding-top: 2px;\n padding-bottom: 2px;\n background-color: white; }\n .igv-track-menu-container div i {\n padding-right: 2px; }\n .igv-track-menu-container div:hover,\n .igv-track-menu-container div:focus,\n .igv-track-menu-container div:active {\n cursor: pointer;\n background-color: #efefef; }\n .igv-track-menu-container a {\n color: inherit;\n text-decoration: none; }\n\n.igv-track-menu-border-top {\n border-top-color: #a2a2a2;\n border-top-style: solid;\n border-top-width: thin; }\n\n.igv-track-menu-category {\n padding-left: 4px;\n font-weight: 400; }\n\n.igv-track-drag-scrim {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n z-index: 256;\n background-color: rgba(68, 134, 247, 0.25); }\n\n.igv-track-manipulation-handle {\n cursor: pointer;\n position: absolute;\n right: 36px;\n width: 12px;\n margin-left: 2px;\n height: 100%;\n box-sizing: border-box;\n font-size: medium;\n border-color: #c4c4c4;\n border-style: solid;\n border-width: thin;\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n z-index: 512;\n background-color: #c4c4c4; }\n\n.igv-track-manipulation-handle:hover,\n.igv-track-manipulation-handle:focus,\n.igv-track-manipulation-handle:active {\n border-color: #7e7e7e;\n background-color: #7e7e7e; }\n\n.igv-track-label {\n position: absolute;\n left: 8px;\n top: 4px;\n width: auto;\n height: auto;\n max-width: 200px;\n padding-left: 4px;\n padding-right: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: white;\n z-index: 128;\n cursor: pointer; }\n\n.igv-track-label:hover,\n.igv-track-label:focus,\n.igv-track-label:active {\n background-color: rgba(0, 0, 0, 0.05); }\n\n.igv-scrollbar-outer-div {\n position: absolute;\n top: 0;\n right: 0;\n width: 14px;\n height: 100%;\n background-color: white; }\n .igv-scrollbar-outer-div div {\n position: absolute;\n top: 0;\n left: 3px;\n width: 8px;\n border-style: solid;\n border-width: thin;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n background-color: white; }\n .igv-scrollbar-outer-div div:hover,\n .igv-scrollbar-outer-div div:focus,\n .igv-scrollbar-outer-div div:active {\n cursor: pointer;\n background-color: #c4c4c4; }\n\n.zoom-in-notice-container {\n position: absolute;\n top: 25%;\n left: 50%; }\n .zoom-in-notice-container div {\n position: relative;\n left: -50%;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #3f3f3f;\n background-color: rgba(255, 255, 255, 0.51);\n z-index: 64; }\n\n.igv-center-guide {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 8px;\n z-index: 8;\n display: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n border-left-style: dashed;\n border-left-width: thin;\n border-right-style: dashed;\n border-right-width: thin; }\n\n.igv-center-guide-wide {\n background-color: transparent;\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: rgba(127, 127, 127, 0.51); }\n\n.igv-center-guide-thin {\n left: 50%;\n width: 1px;\n background-color: transparent;\n border-left-color: rgba(127, 127, 127, 0.51);\n border-right-color: transparent;\n /*background-color: rgba(127, 127, 127, 0.51);*/\n /*border-left-color: rgba(0,0,0,0);*/\n /*border-right-color: rgba(0,0,0,0);*/ }\n\n.igv-cursor-tracking-guide {\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 1px;\n z-index: 1;\n border-left-style: dotted;\n border-left-width: thin;\n border-left-color: rgba(127, 127, 127, 0.76);\n display: none;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none; }\n\n.igv-clickable {\n cursor: pointer;\n background-color: white; }\n\n#color-by-tag {\n color: #444; }\n\n#color-by-tag:hover,\n#color-by-tag:focus,\n#color-by-tag:active {\n cursor: pointer;\n padding-left: 2px;\n padding-right: 2px;\n color: white;\n border-color: #444;\n border-radius: 2px;\n border-style: solid;\n border-width: thin;\n background-color: #7f7f7f; }\n\n.igv-user-feedback {\n position: fixed;\n top: 50%;\n left: 50%;\n width: 36em;\n height: 27em;\n margin-top: -9em;\n /*set to a negative number 1/2 of your height*/\n margin-left: -15em;\n /*set to a negative number 1/2 of your width*/\n background-color: white;\n border-color: #a2a2a2;\n border-style: solid;\n border-width: thin;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 400;\n color: #444; }\n .igv-user-feedback div:first-child {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 32px;\n border-bottom-color: #a2a2a2;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: white; }\n .igv-user-feedback div:first-child i {\n font-size: 20px; }\n .igv-user-feedback div:first-child i:first-child {\n position: absolute;\n top: 0;\n left: 0;\n padding: 8px;\n color: red; }\n .igv-user-feedback div:first-child i:last-child {\n position: absolute;\n top: 0;\n right: 0;\n padding: 8px;\n cursor: pointer;\n color: grey; }\n .igv-user-feedback div:first-child i:last-child:hover,\n .igv-user-feedback div:first-child i:last-child:focus,\n .igv-user-feedback div:first-child i:last-child:active {\n color: #333333; }\n .igv-user-feedback div:last-child {\n padding-left: 48px;\n padding-top: 8px;\n padding-right: 48px;\n padding-bottom: 8px;\n position: absolute;\n top: 33px;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: white; }\n\n.igv-ellipsis {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.igv-generic-dialog-container {\n position: absolute;\n top: 0;\n left: 0;\n width: 300px;\n height: 200px;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 200;\n border-color: #7F7F7F;\n border-radius: 4px;\n border-style: solid;\n border-width: thin;\n z-index: 2048;\n background-color: white;\n display: flex;\n flex-flow: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-header {\n width: 100%;\n height: 24px;\n cursor: move;\n border-color: #c4c4c4;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-style: solid;\n border-width: thin;\n background-color: #c4c4c4;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-header div {\n height: 24px;\n width: 16px;\n margin-right: 6px;\n text-align: center;\n line-height: 24px;\n color: #444;\n font-size: medium; }\n .igv-generic-dialog-container .igv-generic-dialog-header div:hover {\n cursor: pointer; }\n .igv-generic-dialog-container .igv-generic-dialog-one-liner {\n margin-top: 8px;\n width: 95%;\n color: #373737;\n line-height: 24px;\n text-align: left;\n padding-left: 8px;\n background-color: white; }\n .igv-generic-dialog-container .igv-generic-dialog-label-input {\n margin-top: 8px;\n width: 95%;\n height: 24px;\n color: #373737;\n line-height: 24px;\n padding-left: 8px;\n background-color: white;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-label-input div {\n width: 30%;\n height: 100%;\n font-size: 16px;\n text-align: right;\n padding-right: 8px;\n background-color: white; }\n .igv-generic-dialog-container .igv-generic-dialog-label-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white; }\n .igv-generic-dialog-container .igv-generic-dialog-label-input input {\n width: 50%;\n font-size: 16px; }\n .igv-generic-dialog-container .igv-generic-dialog-input {\n margin-top: 8px;\n width: calc(100% - 16px);\n height: 24px;\n color: #373737;\n line-height: 24px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-input input {\n display: block;\n height: 100%;\n width: 100%;\n padding-left: 4px;\n font-family: \"Open Sans\", sans-serif;\n font-weight: 400;\n color: #373737;\n text-align: left;\n outline: none;\n border-style: solid;\n border-width: thin;\n border-color: #7F7F7F;\n background-color: white; }\n .igv-generic-dialog-container .igv-generic-dialog-input input {\n font-size: 16px; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel {\n width: 100%;\n height: 28px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div {\n margin-top: 32px;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n font-weight: 200;\n width: 75px;\n height: 28px;\n line-height: 28px;\n text-align: center;\n border-color: transparent;\n border-style: solid;\n border-width: thin;\n border-radius: 2px; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child {\n margin-left: 32px;\n margin-right: 0;\n background-color: #5ea4e0; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child {\n margin-left: 0;\n margin-right: 32px;\n background-color: #c4c4c4; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:first-child:hover {\n cursor: pointer;\n background-color: #3b5c7f; }\n .igv-generic-dialog-container .igv-generic-dialog-ok-cancel div:last-child:hover {\n cursor: pointer;\n background-color: #7f7f7f; }\n .igv-generic-dialog-container .igv-generic-dialog-ok {\n width: 100%;\n height: 36px;\n margin-top: 32px;\n display: flex;\n flex-flow: row;\n flex-wrap: nowrap;\n justify-content: space-around;\n align-items: center; }\n .igv-generic-dialog-container .igv-generic-dialog-ok div {\n width: 98px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n color: white;\n font-family: \"Open Sans\", sans-serif;\n font-size: medium;\n font-weight: 200;\n border-color: white;\n border-style: solid;\n border-width: thin;\n border-radius: 4px;\n background-color: #2B81AF; }\n .igv-generic-dialog-container .igv-generic-dialog-ok div:hover {\n cursor: pointer;\n background-color: #25597f; }\n\n.igv-popover {\n position: absolute;\n top: 0;\n left: 0;\n min-width: 128px;\n z-index: 4096;\n font-family: \"Open Sans\", sans-serif;\n font-size: small;\n font-weight: 400;\n color: #444;\n background: white;\n border-radius: 4px;\n border-color: #7F7F7F;\n border-style: solid;\n border-width: thin;\n display: none; }\n\n.igv-popover-header {\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n height: 20px;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-color: #7F7F7F;\n border-bottom-style: solid;\n border-bottom-width: thin;\n background-color: #eee; }\n .igv-popover-header div {\n position: absolute;\n top: 3px;\n right: 3px;\n height: 100%;\n width: 16px;\n text-align: center;\n line-height: 100%;\n cursor: pointer;\n color: #444;\n font-size: small; }\n .igv-popover-header div:hover {\n color: white; }\n\n.igv-popover-track-popup-content {\n position: relative;\n top: 0;\n left: 0;\n max-height: 384px;\n overflow-x: hidden;\n overflow-y: auto; }\n\n.igv-popover-name-value {\n cursor: default;\n text-wrap: none;\n white-space: nowrap;\n max-width: 384px; }\n\n.igv-popover-name {\n font-weight: bold;\n padding-right: 4px;\n float: left; }\n\n.igv-popover-value {\n padding-left: 4px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 256px;\n display: inline-block; }\n\n.igv-spinner-container {\n color: #3f3f3f;\n width: 100%;\n height: 100%;\n text-align: center;\n padding-top: 8px;\n font-size: 24px;\n z-index: 512; }\n\n.igv-fa-check-hidden {\n color: rgba(255, 255, 255, 0); }\n\n.validateTips {\n border: 1px solid transparent;\n padding: 0.3em; }\n .validateTips fieldset {\n border: 0; }\n\n.igv-spacer-10 {\n height: 10px;\n width: 100%;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: 0;\n display: block; }\n\n/*# sourceMappingURL=igv.css.map */\n\n/*!\n * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\nsvg:not(:root).svg-inline--fa5 {\n overflow: visible;\n }\n\n.svg-inline--fa5 {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -.125em; }\n .svg-inline--fa5.fa5-lg {\n vertical-align: -.225em; }\n .svg-inline--fa5.fa5-w-1 {\n width: 0.0625em; }\n .svg-inline--fa5.fa5-w-2 {\n width: 0.125em; }\n .svg-inline--fa5.fa5-w-3 {\n width: 0.1875em; }\n .svg-inline--fa5.fa5-w-4 {\n width: 0.25em; }\n .svg-inline--fa5.fa5-w-5 {\n width: 0.3125em; }\n .svg-inline--fa5.fa5-w-6 {\n width: 0.375em; }\n .svg-inline--fa5.fa5-w-7 {\n width: 0.4375em; }\n .svg-inline--fa5.fa5-w-8 {\n width: 0.5em; }\n .svg-inline--fa5.fa5-w-9 {\n width: 0.5625em; }\n .svg-inline--fa5.fa5-w-10 {\n width: 0.625em; }\n .svg-inline--fa5.fa5-w-11 {\n width: 0.6875em; }\n .svg-inline--fa5.fa5-w-12 {\n width: 0.75em; }\n .svg-inline--fa5.fa5-w-13 {\n width: 0.8125em; }\n .svg-inline--fa5.fa5-w-14 {\n width: 0.875em; }\n .svg-inline--fa5.fa5-w-15 {\n width: 0.9375em; }\n .svg-inline--fa5.fa5-w-16 {\n /* width: 1em; */\n }\n .svg-inline--fa5.fa5-w-17 {\n width: 1.0625em; }\n .svg-inline--fa5.fa5-w-18 {\n width: 1.125em; }\n .svg-inline--fa5.fa5-w-19 {\n width: 1.1875em; }\n .svg-inline--fa5.fa5-w-20 {\n width: 1.25em; }\n .svg-inline--fa5.fa5-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa5.fa5-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa5.fa5-border {\n height: 1.5em; }\n .svg-inline--fa5.fa5-li {\n width: 2em; }\n .svg-inline--fa5.fa5-fw {\n width: 1.25em; }\n\n.fa5-layers svg.svg-inline--fa5 {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa5-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -.125em;\n width: 1em; }\n .fa5-layers svg.svg-inline--fa5 {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa5-layers-text, .fa5-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa5-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa5-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa5-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa5-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa5-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa5-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa5-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -.0667em; }\n\n.fa5-xs {\n font-size: .75em; }\n\n.fa5-sm {\n font-size: .875em; }\n\n.fa5-1x {\n font-size: 1em; }\n\n.fa5-2x {\n font-size: 2em; }\n\n.fa5-3x {\n font-size: 3em; }\n\n.fa5-4x {\n font-size: 4em; }\n\n.fa5-5x {\n font-size: 5em; }\n\n.fa5-6x {\n font-size: 6em; }\n\n.fa5-7x {\n font-size: 7em; }\n\n.fa5-8x {\n font-size: 8em; }\n\n.fa5-9x {\n font-size: 9em; }\n\n.fa5-10x {\n font-size: 10em; }\n\n.fa5-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa5-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0; }\n .fa5-ul > li {\n position: relative; }\n\n.fa5-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit; }\n\n.fa5-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa5-pull-left {\n float: left; }\n\n.fa5-pull-right {\n float: right; }\n\n.fa5.fa5-pull-left,\n.fas.fa5-pull-left,\n.far.fa5-pull-left,\n.fal.fa5-pull-left,\n.fab.fa5-pull-left {\n margin-right: .3em; }\n\n.fa5.fa5-pull-right,\n.fas.fa5-pull-right,\n.far.fa5-pull-right,\n.fal.fa5-pull-right,\n.fab.fa5-pull-right {\n margin-left: .3em; }\n\n.fa5-spin {\n -webkit-animation: fa5-spin 2s infinite linear;\n animation: fa5-spin 2s infinite linear; }\n\n.fa5-pulse {\n -webkit-animation: fa5-spin 1s infinite steps(8);\n animation: fa5-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa5-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa5-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa5-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa5-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa5-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa5-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa5-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa5-flip-horizontal.fa5-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa5-rotate-90,\n:root .fa5-rotate-180,\n:root .fa5-rotate-270,\n:root .fa5-flip-horizontal,\n:root .fa5-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa5-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa5-stack-1x,\n.fa5-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa5.fa5-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa5.fa5-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa5-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n'; + + var style = document.createElement('style'); + style.setAttribute('type', 'text/css'); + style.innerHTML = css; + + var headChildren = document.head.childNodes; + var beforeChild = null; + + for (var i = headChildren.length - 1; i > -1; i--) { + var child = headChildren[i]; + var tagName = (child.tagName || '').toUpperCase(); + if (['STYLE', 'LINK'].indexOf(tagName) > -1) { + beforeChild = child; + } + } + + document.head.insertBefore(style, beforeChild); + +})(); +/*! + * jQuery JavaScript Library v1.12.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-05-20T17:17Z + */ + +// Modified for encapsulation in igv module +// * no exports +// * no global definition +// * noConflict not supported (as _ is encapsulated its not needed) + +var $, jQuery; + +(function (global, factory) { + + + $ = factory(global); + jQuery = $; + + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function (window) { + +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +//"use strict"; + var deletedIds = []; + + var document = window.document; + + var slice = deletedIds.slice; + + var concat = deletedIds.concat; + + var push = deletedIds.push; + + var indexOf = deletedIds.indexOf; + + var class2type = {}; + + var toString = class2type.toString; + + var hasOwn = class2type.hasOwnProperty; + + var support = {}; + + + var + version = "1.12.4", + + // Define a local copy of jQuery + jQuery = function (selector, context) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init(selector, context); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function (all, letter) { + return letter.toUpperCase(); + }; + + jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function () { + return slice.call(this); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function (num) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[num + this.length] : this[num] ) : + + // Return all the elements in a clean array + slice.call(this); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function (elems) { + + // Build a new jQuery matched element set + var ret = jQuery.merge(this.constructor(), elems); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function (callback) { + return jQuery.each(this, callback); + }, + + map: function (callback) { + return this.pushStack(jQuery.map(this, function (elem, i) { + return callback.call(elem, i, elem); + })); + }, + + slice: function () { + return this.pushStack(slice.apply(this, arguments)); + }, + + first: function () { + return this.eq(0); + }, + + last: function () { + return this.eq(-1); + }, + + eq: function (i) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack(j >= 0 && j < len ? [this[j]] : []); + }, + + end: function () { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice + }; + + jQuery.extend = jQuery.fn.extend = function () { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === "boolean") { + deep = target; + + // skip the boolean and the target + target = arguments[i] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if (typeof target !== "object" && !jQuery.isFunction(target)) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if (i === length) { + target = this; + i--; + } + + for (; i < length; i++) { + + // Only deal with non-null/undefined values + if (( options = arguments[i] ) != null) { + + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && ( jQuery.isPlainObject(copy) || + ( copyIsArray = jQuery.isArray(copy) ) )) { + + if (copyIsArray) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = jQuery.extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (copy !== undefined) { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; + }; + + jQuery.extend({ + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace(/\D/g, ""), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function (msg) { + throw new Error(msg); + }, + + noop: function () { + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function (obj) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function (obj) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function (obj) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function (obj) { + + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + var realStringObj = obj && obj.toString(); + return !jQuery.isArray(obj) && ( realStringObj - parseFloat(realStringObj) + 1 ) >= 0; + }, + + isEmptyObject: function (obj) { + var name; + for (name in obj) { + return false; + } + return true; + }, + + isPlainObject: function (obj) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) { + return false; + } + + try { + + // Not own constructor property must be Object + if (obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { + return false; + } + } catch (e) { + + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if (!support.ownFirst) { + for (key in obj) { + return hasOwn.call(obj, key); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for (key in obj) { + } + + return key === undefined || hasOwn.call(obj, key); + }, + + type: function (obj) { + if (obj == null) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[toString.call(obj)] || "object" : + typeof obj; + }, + + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function (data) { + if (data && jQuery.trim(data)) { + + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function (data) { + window["eval"].call(window, data); // jscs:ignore requireDotNotation + } )(data); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function (string) { + return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); + }, + + nodeName: function (elem, name) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + each: function (obj, callback) { + var length, i = 0; + + if (isArrayLike(obj)) { + length = obj.length; + for (; i < length; i++) { + if (callback.call(obj[i], i, obj[i]) === false) { + break; + } + } + } else { + for (i in obj) { + if (callback.call(obj[i], i, obj[i]) === false) { + break; + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function (text) { + return text == null ? + "" : + ( text + "" ).replace(rtrim, ""); + }, + + // results is for internal usage only + makeArray: function (arr, results) { + var ret = results || []; + + if (arr != null) { + if (isArrayLike(Object(arr))) { + jQuery.merge(ret, + typeof arr === "string" ? + [arr] : arr + ); + } else { + push.call(ret, arr); + } + } + + return ret; + }, + + inArray: function (elem, arr, i) { + var len; + + if (arr) { + if (indexOf) { + return indexOf.call(arr, elem, i); + } + + len = arr.length; + i = i ? i < 0 ? Math.max(0, len + i) : i : 0; + + for (; i < len; i++) { + + // Skip accessing in sparse arrays + if (i in arr && arr[i] === elem) { + return i; + } + } + } + + return -1; + }, + + merge: function (first, second) { + var len = +second.length, + j = 0, + i = first.length; + + while (j < len) { + first[i++] = second[j++]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if (len !== len) { + while (second[j] !== undefined) { + first[i++] = second[j++]; + } + } + + first.length = i; + + return first; + }, + + grep: function (elems, callback, invert) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for (; i < length; i++) { + callbackInverse = !callback(elems[i], i); + if (callbackInverse !== callbackExpect) { + matches.push(elems[i]); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function (elems, callback, arg) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if (isArrayLike(elems)) { + length = elems.length; + for (; i < length; i++) { + value = callback(elems[i], i, arg); + + if (value != null) { + ret.push(value); + } + } + + // Go through every key on the object, + } else { + for (i in elems) { + value = callback(elems[i], i, arg); + + if (value != null) { + ret.push(value); + } + } + } + + // Flatten any nested arrays + return concat.apply([], ret); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function (fn, context) { + var args, proxy, tmp; + + if (typeof context === "string") { + tmp = fn[context]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if (!jQuery.isFunction(fn)) { + return undefined; + } + + // Simulated bind + args = slice.call(arguments, 2); + proxy = function () { + return fn.apply(context || this, args.concat(slice.call(arguments))); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function () { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support + }); + +// JSHint would error on this code due to the Symbol not being defined in ES5. +// Defining this global in .jshintrc would create a danger of using the global +// unguarded in another place, it seems safer to just disable JSHint for these +// three lines. + /* jshint ignore: start */ + if (typeof Symbol === "function") { + jQuery.fn[Symbol.iterator] = deletedIds[Symbol.iterator]; + } + /* jshint ignore: end */ + +// Populate the class2type map + jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), + function (i, name) { + class2type["[object " + name + "]"] = name.toLowerCase(); + }); + + function isArrayLike(obj) { + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type(obj); + + if (type === "function" || jQuery.isWindow(obj)) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; + } + + var Sizzle = + /*! + * Sizzle CSS Selector Engine v2.2.1 + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-10-17 + */ + (function (window) { + + var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function (a, b) { + if (a === b) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function (list, elem) { + var i = 0, + len = list.length; + for (; i < len; i++) { + if (list[i] === elem) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp(whitespace + "+", "g"), + rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), + + rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), + rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), + + rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"), + + rpseudo = new RegExp(pseudos), + ridentifier = new RegExp("^" + identifier + "$"), + + matchExpr = { + "ID": new RegExp("^#(" + identifier + ")"), + "CLASS": new RegExp("^\\.(" + identifier + ")"), + "TAG": new RegExp("^(" + identifier + "|[*])"), + "ATTR": new RegExp("^" + attributes), + "PSEUDO": new RegExp("^" + pseudos), + "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), + "bool": new RegExp("^(?:" + booleans + ")$", "i"), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"), + funescape = function (_, escaped, escapedWhitespace) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode(high + 0x10000) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function () { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) + try { + push.apply( + (arr = slice.call(preferredDoc.childNodes)), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[preferredDoc.childNodes.length].nodeType; + } catch (e) { + push = { + apply: arr.length ? + + // Leverage slice if possible + function (target, els) { + push_native.apply(target, slice.call(els)); + } : + + // Support: IE<9 + // Otherwise append directly + function (target, els) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ((target[j++] = els[i++])) { + } + target.length = j - 1; + } + }; + } + + function Sizzle(selector, context, results, seed) { + var m, i, elem, nid, nidselect, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if (typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if (!seed) { + + if (( context ? context.ownerDocument || context : preferredDoc ) !== document) { + setDocument(context); + } + context = context || document; + + if (documentIsHTML) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { + + // ID selector + if ((m = match[1])) { + + // Document context + if (nodeType === 9) { + if ((elem = context.getElementById(m))) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if (elem.id === m) { + results.push(elem); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if (newContext && (elem = newContext.getElementById(m)) && + contains(context, elem) && + elem.id === m) { + + results.push(elem); + return results; + } + } + + // Type selector + } else if (match[2]) { + push.apply(results, context.getElementsByTagName(selector)); + return results; + + // Class selector + } else if ((m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName) { + + push.apply(results, context.getElementsByClassName(m)); + return results; + } + } + + // Take advantage of querySelectorAll + if (support.qsa && !compilerCache[selector + " "] && + (!rbuggyQSA || !rbuggyQSA.test(selector))) { + + if (nodeType !== 1) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if (context.nodeName.toLowerCase() !== "object") { + + // Capture the context ID, setting it first if necessary + if ((nid = context.getAttribute("id"))) { + nid = nid.replace(rescape, "\\$&"); + } else { + context.setAttribute("id", (nid = expando)); + } + + // Prefix every selector in the list + groups = tokenize(selector); + i = groups.length; + nidselect = ridentifier.test(nid) ? "#" + nid : "[id='" + nid + "']"; + while (i--) { + groups[i] = nidselect + " " + toSelector(groups[i]); + } + newSelector = groups.join(","); + + // Expand context for sibling selectors + newContext = rsibling.test(selector) && testContext(context.parentNode) || + context; + } + + if (newSelector) { + try { + push.apply(results, + newContext.querySelectorAll(newSelector) + ); + return results; + } catch (qsaError) { + } finally { + if (nid === expando) { + context.removeAttribute("id"); + } + } + } + } + } + } + + // All others + return select(selector.replace(rtrim, "$1"), context, results, seed); + } + + /** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ + function createCache() { + var keys = []; + + function cache(key, value) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if (keys.push(key + " ") > Expr.cacheLength) { + // Only keep the most recent entries + delete cache[keys.shift()]; + } + return (cache[key + " "] = value); + } + + return cache; + } + + /** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ + function markFunction(fn) { + fn[expando] = true; + return fn; + } + + /** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ + function assert(fn) { + var div = document.createElement("div"); + + try { + return !!fn(div); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if (div.parentNode) { + div.parentNode.removeChild(div); + } + // release memory in IE + div = null; + } + } + + /** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ + function addHandle(attrs, handler) { + var arr = attrs.split("|"), + i = arr.length; + + while (i--) { + Expr.attrHandle[arr[i]] = handler; + } + } + + /** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ + function siblingCheck(a, b) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if (diff) { + return diff; + } + + // Check if b follows a + if (cur) { + while ((cur = cur.nextSibling)) { + if (cur === b) { + return -1; + } + } + } + + return a ? 1 : -1; + } + + /** + * Returns a function to use in pseudos for input types + * @param {String} type + */ + function createInputPseudo(type) { + return function (elem) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; + } + + /** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ + function createButtonPseudo(type) { + return function (elem) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; + } + + /** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ + function createPositionalPseudo(fn) { + return markFunction(function (argument) { + argument = +argument; + return markFunction(function (seed, matches) { + var j, + matchIndexes = fn([], seed.length, argument), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while (i--) { + if (seed[(j = matchIndexes[i])]) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); + } + + /** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ + function testContext(context) { + return context && typeof context.getElementsByTagName !== "undefined" && context; + } + +// Expose support vars for convenience + support = Sizzle.support = {}; + + /** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ + isXML = Sizzle.isXML = function (elem) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; + }; + + /** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ + setDocument = Sizzle.setDocument = function (node) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML(document); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ((parent = document.defaultView) && parent.top !== parent) { + // Support: IE 11 + if (parent.addEventListener) { + parent.addEventListener("unload", unloadHandler, false); + + // Support: IE 9 - 10 only + } else if (parent.attachEvent) { + parent.attachEvent("onunload", unloadHandler); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function (div) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function (div) { + div.appendChild(document.createComment("")); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test(document.getElementsByClassName); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function (div) { + docElem.appendChild(div).id = expando; + return !document.getElementsByName || !document.getElementsByName(expando).length; + }); + + // ID find and filter + if (support.getById) { + Expr.find["ID"] = function (id, context) { + if (typeof context.getElementById !== "undefined" && documentIsHTML) { + var m = context.getElementById(id); + return m ? [m] : []; + } + }; + Expr.filter["ID"] = function (id) { + var attrId = id.replace(runescape, funescape); + return function (elem) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function (id) { + var attrId = id.replace(runescape, funescape); + return function (elem) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function (tag, context) { + if (typeof context.getElementsByTagName !== "undefined") { + return context.getElementsByTagName(tag); + + // DocumentFragment nodes don't have gEBTN + } else if (support.qsa) { + return context.querySelectorAll(tag); + } + } : + + function (tag, context) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName(tag); + + // Filter out possible comments + if (tag === "*") { + while ((elem = results[i++])) { + if (elem.nodeType === 1) { + tmp.push(elem); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) { + if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { + return context.getElementsByClassName(className); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ((support.qsa = rnative.test(document.querySelectorAll))) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function (div) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild(div).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if (div.querySelectorAll("[msallowcapture^='']").length) { + rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if (!div.querySelectorAll("[selected]").length) { + rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if (!div.querySelectorAll("[id~=" + expando + "-]").length) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if (!div.querySelectorAll(":checked").length) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if (!div.querySelectorAll("a#" + expando + "+*").length) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function (div) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute("type", "hidden"); + div.appendChild(input).setAttribute("name", "D"); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if (div.querySelectorAll("[name=d]").length) { + rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if (!div.querySelectorAll(":enabled").length) { + rbuggyQSA.push(":enabled", ":disabled"); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ((support.matchesSelector = rnative.test((matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector)))) { + + assert(function (div) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call(div, "div"); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call(div, "[s!='']:x"); + rbuggyMatches.push("!=", pseudos); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); + rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test(docElem.compareDocumentPosition); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test(docElem.contains) ? + function (a, b) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains(bup) : + a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16 + )); + } : + function (a, b) { + if (b) { + while ((b = b.parentNode)) { + if (b === a) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function (a, b) { + + // Flag for duplicate removal + if (a === b) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if (compare) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition(b) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if (compare & 1 || + (!support.sortDetached && b.compareDocumentPosition(a) === compare)) { + + // Choose the first element that is related to our preferred document + if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) { + return -1; + } + if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf(sortInput, a) - indexOf(sortInput, b) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function (a, b) { + // Exit early if the nodes are identical + if (a === b) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [a], + bp = [b]; + + // Parentless nodes are either documents or disconnected + if (!aup || !bup) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf(sortInput, a) - indexOf(sortInput, b) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if (aup === bup) { + return siblingCheck(a, b); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ((cur = cur.parentNode)) { + ap.unshift(cur); + } + cur = b; + while ((cur = cur.parentNode)) { + bp.unshift(cur); + } + + // Walk down the tree looking for a discrepancy + while (ap[i] === bp[i]) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck(ap[i], bp[i]) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; + }; + + Sizzle.matches = function (expr, elements) { + return Sizzle(expr, null, null, elements); + }; + + Sizzle.matchesSelector = function (elem, expr) { + // Set document vars if needed + if (( elem.ownerDocument || elem ) !== document) { + setDocument(elem); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace(rattributeQuotes, "='$1']"); + + if (support.matchesSelector && documentIsHTML && !compilerCache[expr + " "] && + ( !rbuggyMatches || !rbuggyMatches.test(expr) ) && + ( !rbuggyQSA || !rbuggyQSA.test(expr) )) { + + try { + var ret = matches.call(elem, expr); + + // IE 9's matchesSelector returns false on disconnected nodes + if (ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11) { + return ret; + } + } catch (e) { + } + } + + return Sizzle(expr, document, null, [elem]).length > 0; + }; + + Sizzle.contains = function (context, elem) { + // Set document vars if needed + if (( context.ownerDocument || context ) !== document) { + setDocument(context); + } + return contains(context, elem); + }; + + Sizzle.attr = function (elem, name) { + // Set document vars if needed + if (( elem.ownerDocument || elem ) !== document) { + setDocument(elem); + } + + var fn = Expr.attrHandle[name.toLowerCase()], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? + fn(elem, name, !documentIsHTML) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute(name) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; + }; + + Sizzle.error = function (msg) { + throw new Error("Syntax error, unrecognized expression: " + msg); + }; + + /** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ + Sizzle.uniqueSort = function (results) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice(0); + results.sort(sortOrder); + + if (hasDuplicate) { + while ((elem = results[i++])) { + if (elem === results[i]) { + j = duplicates.push(i); + } + } + while (j--) { + results.splice(duplicates[j], 1); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; + }; + + /** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ + getText = Sizzle.getText = function (elem) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if (!nodeType) { + // If no nodeType, this is expected to be an array + while ((node = elem[i++])) { + // Do not traverse comment nodes + ret += getText(node); + } + } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if (typeof elem.textContent === "string") { + return elem.textContent; + } else { + // Traverse its children + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText(elem); + } + } + } else if (nodeType === 3 || nodeType === 4) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; + }; + + Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": {dir: "parentNode", first: true}, + " ": {dir: "parentNode"}, + "+": {dir: "previousSibling", first: true}, + "~": {dir: "previousSibling"} + }, + + preFilter: { + "ATTR": function (match) { + match[1] = match[1].replace(runescape, funescape); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace(runescape, funescape); + + if (match[2] === "~=") { + match[3] = " " + match[3] + " "; + } + + return match.slice(0, 4); + }, + + "CHILD": function (match) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if (match[1].slice(0, 3) === "nth") { + // nth-* requires argument + if (!match[3]) { + Sizzle.error(match[0]); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if (match[3]) { + Sizzle.error(match[0]); + } + + return match; + }, + + "PSEUDO": function (match) { + var excess, + unquoted = !match[6] && match[2]; + + if (matchExpr["CHILD"].test(match[0])) { + return null; + } + + // Accept quoted arguments as-is + if (match[3]) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if (unquoted && rpseudo.test(unquoted) && + // Get excess from tokenize (recursively) + (excess = tokenize(unquoted, true)) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { + + // excess is a negative index + match[0] = match[0].slice(0, excess); + match[2] = unquoted.slice(0, excess); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice(0, 3); + } + }, + + filter: { + + "TAG": function (nodeNameSelector) { + var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); + return nodeNameSelector === "*" ? + function () { + return true; + } : + function (elem) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function (className) { + var pattern = classCache[className + " "]; + + return pattern || + (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && + classCache(className, function (elem) { + return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); + }); + }, + + "ATTR": function (name, operator, check) { + return function (elem) { + var result = Sizzle.attr(elem, name); + + if (result == null) { + return operator === "!="; + } + if (!operator) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf(check) === 0 : + operator === "*=" ? check && result.indexOf(check) > -1 : + operator === "$=" ? check && result.slice(-check.length) === check : + operator === "~=" ? ( " " + result.replace(rwhitespace, " ") + " " ).indexOf(check) > -1 : + operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : + false; + }; + }, + + "CHILD": function (type, what, argument, first, last) { + var simple = type.slice(0, 3) !== "nth", + forward = type.slice(-4) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function (elem) { + return !!elem.parentNode; + } : + + function (elem, context, xml) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if (parent) { + + // :(first|last|only)-(child|of-type) + if (simple) { + while (dir) { + node = elem; + while ((node = node[dir])) { + if (ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [forward ? parent.firstChild : parent.lastChild]; + + // non-xml :nth-child(...) stores cache data on `parent` + if (forward && useCache) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[expando] || (node[expando] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}); + + cache = uniqueCache[type] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = nodeIndex && cache[2]; + node = nodeIndex && parent.childNodes[nodeIndex]; + + while ((node = ++nodeIndex && node && node[dir] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop())) { + + // When found, cache indexes on `parent` and break + if (node.nodeType === 1 && ++diff && node === elem) { + uniqueCache[type] = [dirruns, nodeIndex, diff]; + break; + } + } + + } else { + // Use previously-cached element index if available + if (useCache) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[expando] || (node[expando] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}); + + cache = uniqueCache[type] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if (diff === false) { + // Use the same loop as above to seek `elem` from the start + while ((node = ++nodeIndex && node && node[dir] || + (diff = nodeIndex = 0) || start.pop())) { + + if (( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && ++diff) { + + // Cache the index of each encountered element + if (useCache) { + outerCache = node[expando] || (node[expando] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[node.uniqueID] || + (outerCache[node.uniqueID] = {}); + + uniqueCache[type] = [dirruns, diff]; + } + + if (node === elem) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function (pseudo, argument) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || + Sizzle.error("unsupported pseudo: " + pseudo); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if (fn[expando]) { + return fn(argument); + } + + // But maintain support for old signatures + if (fn.length > 1) { + args = [pseudo, pseudo, "", argument]; + return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? + markFunction(function (seed, matches) { + var idx, + matched = fn(seed, argument), + i = matched.length; + while (i--) { + idx = indexOf(seed, matched[i]); + seed[idx] = !( matches[idx] = matched[i] ); + } + }) : + function (elem) { + return fn(elem, 0, args); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function (selector) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile(selector.replace(rtrim, "$1")); + + return matcher[expando] ? + markFunction(function (seed, matches, context, xml) { + var elem, + unmatched = matcher(seed, null, xml, []), + i = seed.length; + + // Match elements unmatched by `matcher` + while (i--) { + if ((elem = unmatched[i])) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function (elem, context, xml) { + input[0] = elem; + matcher(input, null, xml, results); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function (selector) { + return function (elem) { + return Sizzle(selector, elem).length > 0; + }; + }), + + "contains": markFunction(function (text) { + text = text.replace(runescape, funescape); + return function (elem) { + return ( elem.textContent || elem.innerText || getText(elem) ).indexOf(text) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction(function (lang) { + // lang value must be a valid identifier + if (!ridentifier.test(lang || "")) { + Sizzle.error("unsupported lang: " + lang); + } + lang = lang.replace(runescape, funescape).toLowerCase(); + return function (elem) { + var elemLang; + do { + if ((elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf(lang + "-") === 0; + } + } while ((elem = elem.parentNode) && elem.nodeType === 1); + return false; + }; + }), + + // Miscellaneous + "target": function (elem) { + var hash = window.location && window.location.hash; + return hash && hash.slice(1) === elem.id; + }, + + "root": function (elem) { + return elem === docElem; + }, + + "focus": function (elem) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function (elem) { + return elem.disabled === false; + }, + + "disabled": function (elem) { + return elem.disabled === true; + }, + + "checked": function (elem) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function (elem) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if (elem.parentNode) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function (elem) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + if (elem.nodeType < 6) { + return false; + } + } + return true; + }, + + "parent": function (elem) { + return !Expr.pseudos["empty"](elem); + }, + + // Element/input types + "header": function (elem) { + return rheader.test(elem.nodeName); + }, + + "input": function (elem) { + return rinputs.test(elem.nodeName); + }, + + "button": function (elem) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function (elem) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function () { + return [0]; + }), + + "last": createPositionalPseudo(function (matchIndexes, length) { + return [length - 1]; + }), + + "eq": createPositionalPseudo(function (matchIndexes, length, argument) { + return [argument < 0 ? argument + length : argument]; + }), + + "even": createPositionalPseudo(function (matchIndexes, length) { + var i = 0; + for (; i < length; i += 2) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function (matchIndexes, length) { + var i = 1; + for (; i < length; i += 2) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function (matchIndexes, length, argument) { + var i = argument < 0 ? argument + length : argument; + for (; --i >= 0;) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function (matchIndexes, length, argument) { + var i = argument < 0 ? argument + length : argument; + for (; ++i < length;) { + matchIndexes.push(i); + } + return matchIndexes; + }) + } + }; + + Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos + for (i in {radio: true, checkbox: true, file: true, password: true, image: true}) { + Expr.pseudos[i] = createInputPseudo(i); + } + for (i in {submit: true, reset: true}) { + Expr.pseudos[i] = createButtonPseudo(i); + } + +// Easy API for creating new setFilters + function setFilters() { + } + + setFilters.prototype = Expr.filters = Expr.pseudos; + Expr.setFilters = new setFilters(); + + tokenize = Sizzle.tokenize = function (selector, parseOnly) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[selector + " "]; + + if (cached) { + return parseOnly ? 0 : cached.slice(0); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while (soFar) { + + // Comma and first run + if (!matched || (match = rcomma.exec(soFar))) { + if (match) { + // Don't consume trailing commas as valid + soFar = soFar.slice(match[0].length) || soFar; + } + groups.push((tokens = [])); + } + + matched = false; + + // Combinators + if ((match = rcombinators.exec(soFar))) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace(rtrim, " ") + }); + soFar = soFar.slice(matched.length); + } + + // Filters + for (type in Expr.filter) { + if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || + (match = preFilters[type](match)))) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice(matched.length); + } + } + + if (!matched) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error(selector) : + // Cache the tokens + tokenCache(selector, groups).slice(0); + }; + + function toSelector(tokens) { + var i = 0, + len = tokens.length, + selector = ""; + for (; i < len; i++) { + selector += tokens[i].value; + } + return selector; + } + + function addCombinator(matcher, combinator, base) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function (elem, context, xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + return matcher(elem, context, xml); + } + } + } : + + // Check against all ancestor/preceding elements + function (elem, context, xml) { + var oldCache, uniqueCache, outerCache, + newCache = [dirruns, doneName]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if (xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + if (matcher(elem, context, xml)) { + return true; + } + } + } + } else { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + outerCache = elem[expando] || (elem[expando] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {}); + + if ((oldCache = uniqueCache[dir]) && + oldCache[0] === dirruns && oldCache[1] === doneName) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[2] = oldCache[2]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[dir] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ((newCache[2] = matcher(elem, context, xml))) { + return true; + } + } + } + } + } + }; + } + + function elementMatcher(matchers) { + return matchers.length > 1 ? + function (elem, context, xml) { + var i = matchers.length; + while (i--) { + if (!matchers[i](elem, context, xml)) { + return false; + } + } + return true; + } : + matchers[0]; + } + + function multipleContexts(selector, contexts, results) { + var i = 0, + len = contexts.length; + for (; i < len; i++) { + Sizzle(selector, contexts[i], results); + } + return results; + } + + function condense(unmatched, map, filter, context, xml) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for (; i < len; i++) { + if ((elem = unmatched[i])) { + if (!filter || filter(elem, context, xml)) { + newUnmatched.push(elem); + if (mapped) { + map.push(i); + } + } + } + } + + return newUnmatched; + } + + function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { + if (postFilter && !postFilter[expando]) { + postFilter = setMatcher(postFilter); + } + if (postFinder && !postFinder[expando]) { + postFinder = setMatcher(postFinder, postSelector); + } + return markFunction(function (seed, results, context, xml) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense(elems, preMap, preFilter, context, xml) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if (matcher) { + matcher(matcherIn, matcherOut, context, xml); + } + + // Apply postFilter + if (postFilter) { + temp = condense(matcherOut, postMap); + postFilter(temp, [], context, xml); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while (i--) { + if ((elem = temp[i])) { + matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); + } + } + } + + if (seed) { + if (postFinder || preFilter) { + if (postFinder) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while (i--) { + if ((elem = matcherOut[i])) { + // Restore matcherIn since elem is not yet a final match + temp.push((matcherIn[i] = elem)); + } + } + postFinder(null, (matcherOut = []), temp, xml); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while (i--) { + if ((elem = matcherOut[i]) && + (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice(preexisting, matcherOut.length) : + matcherOut + ); + if (postFinder) { + postFinder(null, results, matcherOut, xml); + } else { + push.apply(results, matcherOut); + } + } + }); + } + + function matcherFromTokens(tokens) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[tokens[0].type], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator(function (elem) { + return elem === checkContext; + }, implicitRelative, true), + matchAnyContext = addCombinator(function (elem) { + return indexOf(checkContext, elem) > -1; + }, implicitRelative, true), + matchers = [function (elem, context, xml) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext(elem, context, xml) : + matchAnyContext(elem, context, xml) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + }]; + + for (; i < len; i++) { + if ((matcher = Expr.relative[tokens[i].type])) { + matchers = [addCombinator(elementMatcher(matchers), matcher)]; + } else { + matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); + + // Return special upon seeing a positional matcher + if (matcher[expando]) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for (; j < len; j++) { + if (Expr.relative[tokens[j].type]) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher(matchers), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice(0, i - 1).concat({value: tokens[i - 2].type === " " ? "*" : ""}) + ).replace(rtrim, "$1"), + matcher, + i < j && matcherFromTokens(tokens.slice(i, j)), + j < len && matcherFromTokens((tokens = tokens.slice(j))), + j < len && toSelector(tokens) + ); + } + matchers.push(matcher); + } + } + + return elementMatcher(matchers); + } + + function matcherFromGroupMatchers(elementMatchers, setMatchers) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function (seed, context, xml, results, outermost) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]("*", outermost), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if (outermost) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for (; i !== len && (elem = elems[i]) != null; i++) { + if (byElement && elem) { + j = 0; + if (!context && elem.ownerDocument !== document) { + setDocument(elem); + xml = !documentIsHTML; + } + while ((matcher = elementMatchers[j++])) { + if (matcher(elem, context || document, xml)) { + results.push(elem); + break; + } + } + if (outermost) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if (bySet) { + // They will have gone through all possible matchers + if ((elem = !matcher && elem)) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if (seed) { + unmatched.push(elem); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if (bySet && i !== matchedCount) { + j = 0; + while ((matcher = setMatchers[j++])) { + matcher(unmatched, setMatched, context, xml); + } + + if (seed) { + // Reintegrate element matches to eliminate the need for sorting + if (matchedCount > 0) { + while (i--) { + if (!(unmatched[i] || setMatched[i])) { + setMatched[i] = pop.call(results); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense(setMatched); + } + + // Add matches to results + push.apply(results, setMatched); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if (outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1) { + + Sizzle.uniqueSort(results); + } + } + + // Override manipulation of globals by nested matchers + if (outermost) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction(superMatcher) : + superMatcher; + } + + compile = Sizzle.compile = function (selector, match /* Internal Use Only */) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[selector + " "]; + + if (!cached) { + // Generate a function of recursive functions that can be used to check each element + if (!match) { + match = tokenize(selector); + } + i = match.length; + while (i--) { + cached = matcherFromTokens(match[i]); + if (cached[expando]) { + setMatchers.push(cached); + } else { + elementMatchers.push(cached); + } + } + + // Cache the compiled function + cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; + }; + + /** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ + select = Sizzle.select = function (selector, context, results, seed) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize((selector = compiled.selector || selector)); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if (match.length === 1) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice(0); + if (tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[tokens[1].type]) { + + context = ( Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [] )[0]; + if (!context) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if (compiled) { + context = context.parentNode; + } + + selector = selector.slice(tokens.shift().value.length); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; + while (i--) { + token = tokens[i]; + + // Abort if we hit a combinator + if (Expr.relative[(type = token.type)]) { + break; + } + if ((find = Expr.find[type])) { + // Search, expanding context for leading sibling combinators + if ((seed = find( + token.matches[0].replace(runescape, funescape), + rsibling.test(tokens[0].type) && testContext(context.parentNode) || context + ))) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice(i, 1); + selector = seed.length && toSelector(tokens); + if (!selector) { + push.apply(results, seed); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile(selector, match) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test(selector) && testContext(context.parentNode) || context + ); + return results; + }; + +// One-time assignments + +// Sort stability + support.sortStable = expando.split("").sort(sortOrder).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function + support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document + setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* + support.sortDetached = assert(function (div1) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition(document.createElement("div")) & 1; + }); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx + if (!assert(function (div) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#"; + })) { + addHandle("type|href|height|width", function (elem, name, isXML) { + if (!isXML) { + return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); + } + }); + } + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") + if (!support.attributes || !assert(function (div) { + div.innerHTML = ""; + div.firstChild.setAttribute("value", ""); + return div.firstChild.getAttribute("value") === ""; + })) { + addHandle("value", function (elem, name, isXML) { + if (!isXML && elem.nodeName.toLowerCase() === "input") { + return elem.defaultValue; + } + }); + } + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies + if (!assert(function (div) { + return div.getAttribute("disabled") == null; + })) { + addHandle(booleans, function (elem, name, isXML) { + var val; + if (!isXML) { + return elem[name] === true ? name.toLowerCase() : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; + } + }); + } + + return Sizzle; + + })(window); + + + jQuery.find = Sizzle; + jQuery.expr = Sizzle.selectors; + jQuery.expr[":"] = jQuery.expr.pseudos; + jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; + jQuery.text = Sizzle.getText; + jQuery.isXMLDoc = Sizzle.isXML; + jQuery.contains = Sizzle.contains; + + + var dir = function (elem, dir, until) { + var matched = [], + truncate = until !== undefined; + + while (( elem = elem[dir] ) && elem.nodeType !== 9) { + if (elem.nodeType === 1) { + if (truncate && jQuery(elem).is(until)) { + break; + } + matched.push(elem); + } + } + return matched; + }; + + + var siblings = function (n, elem) { + var matched = []; + + for (; n; n = n.nextSibling) { + if (n.nodeType === 1 && n !== elem) { + matched.push(n); + } + } + + return matched; + }; + + + var rneedsContext = jQuery.expr.match.needsContext; + + var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); + + + var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not + function winnow(elements, qualifier, not) { + if (jQuery.isFunction(qualifier)) { + return jQuery.grep(elements, function (elem, i) { + /* jshint -W018 */ + return !!qualifier.call(elem, i, elem) !== not; + }); + + } + + if (qualifier.nodeType) { + return jQuery.grep(elements, function (elem) { + return ( elem === qualifier ) !== not; + }); + + } + + if (typeof qualifier === "string") { + if (risSimple.test(qualifier)) { + return jQuery.filter(qualifier, elements, not); + } + + qualifier = jQuery.filter(qualifier, elements); + } + + return jQuery.grep(elements, function (elem) { + return ( jQuery.inArray(elem, qualifier) > -1 ) !== not; + }); + } + + jQuery.filter = function (expr, elems, not) { + var elem = elems[0]; + + if (not) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : + jQuery.find.matches(expr, jQuery.grep(elems, function (elem) { + return elem.nodeType === 1; + })); + }; + + jQuery.fn.extend({ + find: function (selector) { + var i, + ret = [], + self = this, + len = self.length; + + if (typeof selector !== "string") { + return this.pushStack(jQuery(selector).filter(function () { + for (i = 0; i < len; i++) { + if (jQuery.contains(self[i], this)) { + return true; + } + } + })); + } + + for (i = 0; i < len; i++) { + jQuery.find(selector, self[i], ret); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function (selector) { + return this.pushStack(winnow(this, selector || [], false)); + }, + not: function (selector) { + return this.pushStack(winnow(this, selector || [], true)); + }, + is: function (selector) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test(selector) ? + jQuery(selector) : + selector || [], + false + ).length; + } + }); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) + var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function (selector, context, root) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if (!selector) { + return this; + } + + // init accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if (typeof selector === "string") { + if (selector.charAt(0) === "<" && + selector.charAt(selector.length - 1) === ">" && + selector.length >= 3) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [null, selector, null]; + + } else { + match = rquickExpr.exec(selector); + } + + // Match html or make sure no context is specified for #id + if (match && ( match[1] || !context )) { + + // HANDLE: $(html) -> $(array) + if (match[1]) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge(this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + )); + + // HANDLE: $(html, props) + if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { + for (match in context) { + + // Properties of context are called as methods if possible + if (jQuery.isFunction(this[match])) { + this[match](context[match]); + + // ...and otherwise set as attributes + } else { + this.attr(match, context[match]); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById(match[2]); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if (elem && elem.parentNode) { + + // Handle the case where IE and Opera return items + // by name instead of ID + if (elem.id !== match[2]) { + return rootjQuery.find(selector); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if (!context || context.jquery) { + return ( context || root ).find(selector); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor(context).find(selector); + } + + // HANDLE: $(DOMElement) + } else if (selector.nodeType) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if (jQuery.isFunction(selector)) { + return typeof root.ready !== "undefined" ? + root.ready(selector) : + + // Execute immediately if ready is not present + selector(jQuery); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray(selector, this); + }; + +// Give the init function the jQuery prototype for later instantiation + init.prototype = jQuery.fn; + +// Initialize central reference + rootjQuery = jQuery(document); + + + var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + + jQuery.fn.extend({ + has: function (target) { + var i, + targets = jQuery(target, this), + len = targets.length; + + return this.filter(function () { + for (i = 0; i < len; i++) { + if (jQuery.contains(this, targets[i])) { + return true; + } + } + }); + }, + + closest: function (selectors, context) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? + jQuery(selectors, context || this.context) : + 0; + + for (; i < l; i++) { + for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { + + // Always skip document fragments + if (cur.nodeType < 11 && ( pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors) )) { + + matched.push(cur); + break; + } + } + } + + return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); + }, + + // Determine the position of an element within + // the matched set of elements + index: function (elem) { + + // No argument, return index in parent + if (!elem) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if (typeof elem === "string") { + return jQuery.inArray(this[0], jQuery(elem)); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this); + }, + + add: function (selector, context) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge(this.get(), jQuery(selector, context)) + ) + ); + }, + + addBack: function (selector) { + return this.add(selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } + }); + + function sibling(cur, dir) { + do { + cur = cur[dir]; + } while (cur && cur.nodeType !== 1); + + return cur; + } + + jQuery.each({ + parent: function (elem) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function (elem) { + return dir(elem, "parentNode"); + }, + parentsUntil: function (elem, i, until) { + return dir(elem, "parentNode", until); + }, + next: function (elem) { + return sibling(elem, "nextSibling"); + }, + prev: function (elem) { + return sibling(elem, "previousSibling"); + }, + nextAll: function (elem) { + return dir(elem, "nextSibling"); + }, + prevAll: function (elem) { + return dir(elem, "previousSibling"); + }, + nextUntil: function (elem, i, until) { + return dir(elem, "nextSibling", until); + }, + prevUntil: function (elem, i, until) { + return dir(elem, "previousSibling", until); + }, + siblings: function (elem) { + return siblings(( elem.parentNode || {} ).firstChild, elem); + }, + children: function (elem) { + return siblings(elem.firstChild); + }, + contents: function (elem) { + return jQuery.nodeName(elem, "iframe") ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge([], elem.childNodes); + } + }, function (name, fn) { + jQuery.fn[name] = function (until, selector) { + var ret = jQuery.map(this, fn, until); + + if (name.slice(-5) !== "Until") { + selector = until; + } + + if (selector && typeof selector === "string") { + ret = jQuery.filter(selector, ret); + } + + if (this.length > 1) { + + // Remove duplicates + if (!guaranteedUnique[name]) { + ret = jQuery.uniqueSort(ret); + } + + // Reverse order for parents* and prev-derivatives + if (rparentsprev.test(name)) { + ret = ret.reverse(); + } + } + + return this.pushStack(ret); + }; + }); + var rnotwhite = ( /\S+/g ); + + +// Convert String-formatted options into Object-formatted ones + function createOptions(options) { + var object = {}; + jQuery.each(options.match(rnotwhite) || [], function (_, flag) { + object[flag] = true; + }); + return object; + } + + /* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ + jQuery.Callbacks = function (options) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions(options) : + jQuery.extend({}, options); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function () { + + // Enforce single-firing + locked = options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for (; queue.length; firingIndex = -1) { + memory = queue.shift(); + while (++firingIndex < list.length) { + + // Run callback and check for early termination + if (list[firingIndex].apply(memory[0], memory[1]) === false && + options.stopOnFalse) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if (!options.memory) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if (locked) { + + // Keep an empty list if we have data for future add calls + if (memory) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function () { + if (list) { + + // If we have memory from a past run, we should fire after adding + if (memory && !firing) { + firingIndex = list.length - 1; + queue.push(memory); + } + + (function add(args) { + jQuery.each(args, function (_, arg) { + if (jQuery.isFunction(arg)) { + if (!options.unique || !self.has(arg)) { + list.push(arg); + } + } else if (arg && arg.length && jQuery.type(arg) !== "string") { + + // Inspect recursively + add(arg); + } + }); + })(arguments); + + if (memory && !firing) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function () { + jQuery.each(arguments, function (_, arg) { + var index; + while (( index = jQuery.inArray(arg, list, index) ) > -1) { + list.splice(index, 1); + + // Handle firing indexes + if (index <= firingIndex) { + firingIndex--; + } + } + }); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function (fn) { + return fn ? + jQuery.inArray(fn, list) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function () { + if (list) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function () { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function () { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function () { + locked = true; + if (!memory) { + self.disable(); + } + return this; + }, + locked: function () { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function (context, args) { + if (!locked) { + args = args || []; + args = [context, args.slice ? args.slice() : args]; + queue.push(args); + if (!firing) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function () { + self.fireWith(this, arguments); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function () { + return !!fired; + } + }; + + return self; + }; + + + jQuery.extend({ + + Deferred: function (func) { + var tuples = [ + + // action, add listener, listener list, final state + ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"], + ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"], + ["notify", "progress", jQuery.Callbacks("memory")] + ], + state = "pending", + promise = { + state: function () { + return state; + }, + always: function () { + deferred.done(arguments).fail(arguments); + return this; + }, + then: function (/* fnDone, fnFail, fnProgress */) { + var fns = arguments; + return jQuery.Deferred(function (newDefer) { + jQuery.each(tuples, function (i, tuple) { + var fn = jQuery.isFunction(fns[i]) && fns[i]; + + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[tuple[1]](function () { + var returned = fn && fn.apply(this, arguments); + if (returned && jQuery.isFunction(returned.promise)) { + returned.promise() + .progress(newDefer.notify) + .done(newDefer.resolve) + .fail(newDefer.reject); + } else { + newDefer[tuple[0] + "With"]( + this === promise ? newDefer.promise() : this, + fn ? [returned] : arguments + ); + } + }); + }); + fns = null; + }).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function (obj) { + return obj != null ? jQuery.extend(obj, promise) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each(tuples, function (i, tuple) { + var list = tuple[2], + stateString = tuple[3]; + + // promise[ done | fail | progress ] = list.add + promise[tuple[1]] = list.add; + + // Handle state + if (stateString) { + list.add(function () { + + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[i ^ 1][2].disable, tuples[2][2].lock); + } + + // deferred[ resolve | reject | notify ] + deferred[tuple[0]] = function () { + deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments); + return this; + }; + deferred[tuple[0] + "With"] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise(deferred); + + // Call given func if any + if (func) { + func.call(deferred, deferred); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function (subordinate /* , ..., subordinateN */) { + var i = 0, + resolveValues = slice.call(arguments), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || + ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0, + + // the master Deferred. + // If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function (i, contexts, values) { + return function (value) { + contexts[i] = this; + values[i] = arguments.length > 1 ? slice.call(arguments) : value; + if (values === progressValues) { + deferred.notifyWith(contexts, values); + + } else if (!( --remaining )) { + deferred.resolveWith(contexts, values); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if (length > 1) { + progressValues = new Array(length); + progressContexts = new Array(length); + resolveContexts = new Array(length); + for (; i < length; i++) { + if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { + resolveValues[i].promise() + .progress(updateFunc(i, progressContexts, progressValues)) + .done(updateFunc(i, resolveContexts, resolveValues)) + .fail(deferred.reject); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if (!remaining) { + deferred.resolveWith(resolveContexts, resolveValues); + } + + return deferred.promise(); + } + }); + + +// The deferred used on DOM ready + var readyList; + + jQuery.fn.ready = function (fn) { + + // Add the callback + jQuery.ready.promise().done(fn); + + return this; + }; + + jQuery.extend({ + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function (hold) { + if (hold) { + jQuery.readyWait++; + } else { + jQuery.ready(true); + } + }, + + // Handle when the DOM is ready + ready: function (wait) { + + // Abort if there are pending holds or we're already ready + if (wait === true ? --jQuery.readyWait : jQuery.isReady) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if (wait !== true && --jQuery.readyWait > 0) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith(document, [jQuery]); + + // Trigger any bound ready events + if (jQuery.fn.triggerHandler) { + jQuery(document).triggerHandler("ready"); + jQuery(document).off("ready"); + } + } + }); + + /** + * Clean-up method for dom ready events + */ + function detach() { + if (document.addEventListener) { + document.removeEventListener("DOMContentLoaded", completed); + window.removeEventListener("load", completed); + + } else { + document.detachEvent("onreadystatechange", completed); + window.detachEvent("onload", completed); + } + } + + /** + * The ready event handler and self cleanup method + */ + function completed() { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if (document.addEventListener || + window.event.type === "load" || + document.readyState === "complete") { + + detach(); + jQuery.ready(); + } + } + + jQuery.ready.promise = function (obj) { + if (!readyList) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called + // after the browser event has already occurred. + // Support: IE6-10 + // Older IE sometimes signals "interactive" too soon + if (document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll )) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout(jQuery.ready); + + // Standards-based browsers support DOMContentLoaded + } else if (document.addEventListener) { + + // Use the handy event callback + document.addEventListener("DOMContentLoaded", completed); + + // A fallback to window.onload, that will always work + window.addEventListener("load", completed); + + // If IE event model is used + } else { + + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent("onreadystatechange", completed); + + // A fallback to window.onload, that will always work + window.attachEvent("onload", completed); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch (e) { + } + + if (top && top.doScroll) { + (function doScrollCheck() { + if (!jQuery.isReady) { + + try { + + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch (e) { + return window.setTimeout(doScrollCheck, 50); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise(obj); + }; + +// Kick off the DOM ready check even if the user does not + jQuery.ready.promise(); + + +// Support: IE<9 +// Iteration over object's inherited properties before its own + var i; + for (i in jQuery(support)) { + break; + } + support.ownFirst = i === "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run + support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom + jQuery(function () { + + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName("body")[0]; + if (!body || !body.style) { + + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement("div"); + container = document.createElement("div"); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild(container).appendChild(div); + + if (typeof div.style.zoom !== "undefined") { + + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if (val) { + + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild(container); + }); + + + (function () { + var div = document.createElement("div"); + + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch (e) { + support.deleteExpando = false; + } + + // Null elements to avoid leaks in IE. + div = null; + })(); + var acceptData = function (elem) { + var noData = jQuery.noData[( elem.nodeName + " " ).toLowerCase()], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute("classid") === noData; + }; + + + var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + + function dataAttr(elem, key, data) { + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if (data === undefined && elem.nodeType === 1) { + + var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase(); + + data = elem.getAttribute(name); + + if (typeof data === "string") { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test(data) ? jQuery.parseJSON(data) : + data; + } catch (e) { + } + + // Make sure we set the data so it isn't changed later + jQuery.data(elem, key, data); + + } else { + data = undefined; + } + } + + return data; + } + +// checks a cache object for emptiness + function isEmptyDataObject(obj) { + var name; + for (name in obj) { + + // if the public data object is empty, the private is still empty + if (name === "data" && jQuery.isEmptyObject(obj[name])) { + continue; + } + if (name !== "toJSON") { + return false; + } + } + + return true; + } + + function internalData(elem, name, data, pvt /* Internal Use Only */) { + if (!acceptData(elem)) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[internalKey] : elem[internalKey] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if (( !id || !cache[id] || ( !pvt && !cache[id].data ) ) && + data === undefined && typeof name === "string") { + return; + } + + if (!id) { + + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if (isNode) { + id = elem[internalKey] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if (!cache[id]) { + + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[id] = isNode ? {} : {toJSON: jQuery.noop}; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if (typeof name === "object" || typeof name === "function") { + if (pvt) { + cache[id] = jQuery.extend(cache[id], name); + } else { + cache[id].data = jQuery.extend(cache[id].data, name); + } + } + + thisCache = cache[id]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if (!pvt) { + if (!thisCache.data) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if (data !== undefined) { + thisCache[jQuery.camelCase(name)] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if (typeof name === "string") { + + // First Try to find as-is property data + ret = thisCache[name]; + + // Test for null|undefined property data + if (ret == null) { + + // Try to find the camelCased property + ret = thisCache[jQuery.camelCase(name)]; + } + } else { + ret = thisCache; + } + + return ret; + } + + function internalRemoveData(elem, name, pvt) { + if (!acceptData(elem)) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[jQuery.expando] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if (!cache[id]) { + return; + } + + if (name) { + + thisCache = pvt ? cache[id] : cache[id].data; + + if (thisCache) { + + // Support array or space separated string names for data keys + if (!jQuery.isArray(name)) { + + // try the string as a key before any manipulation + if (name in thisCache) { + name = [name]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase(name); + if (name in thisCache) { + name = [name]; + } else { + name = name.split(" "); + } + } + } else { + + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat(jQuery.map(name, jQuery.camelCase)); + } + + i = name.length; + while (i--) { + delete thisCache[name[i]]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) { + return; + } + } + } + + // See jQuery.data for more information + if (!pvt) { + delete cache[id].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if (!isEmptyDataObject(cache[id])) { + return; + } + } + + // Destroy the cache + if (isNode) { + jQuery.cleanData([elem], true); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if (support.deleteExpando || cache != cache.window) { + /* jshint eqeqeq: true */ + delete cache[id]; + + // When all else fails, undefined + } else { + cache[id] = undefined; + } + } + + jQuery.extend({ + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function (elem) { + elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando]; + return !!elem && !isEmptyDataObject(elem); + }, + + data: function (elem, name, data) { + return internalData(elem, name, data); + }, + + removeData: function (elem, name) { + return internalRemoveData(elem, name); + }, + + // For internal use only. + _data: function (elem, name, data) { + return internalData(elem, name, data, true); + }, + + _removeData: function (elem, name) { + return internalRemoveData(elem, name, true); + } + }); + + jQuery.fn.extend({ + data: function (key, value) { + var i, name, data, + elem = this[0], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if (key === undefined) { + if (this.length) { + data = jQuery.data(elem); + + if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) { + i = attrs.length; + while (i--) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if (attrs[i]) { + name = attrs[i].name; + if (name.indexOf("data-") === 0) { + name = jQuery.camelCase(name.slice(5)); + dataAttr(elem, name, data[name]); + } + } + } + jQuery._data(elem, "parsedAttrs", true); + } + } + + return data; + } + + // Sets multiple values + if (typeof key === "object") { + return this.each(function () { + jQuery.data(this, key); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function () { + jQuery.data(this, key, value); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr(elem, key, jQuery.data(elem, key)) : undefined; + }, + + removeData: function (key) { + return this.each(function () { + jQuery.removeData(this, key); + }); + } + }); + + + jQuery.extend({ + queue: function (elem, type, data) { + var queue; + + if (elem) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data(elem, type); + + // Speed up dequeue by getting out quickly if this is just a lookup + if (data) { + if (!queue || jQuery.isArray(data)) { + queue = jQuery._data(elem, type, jQuery.makeArray(data)); + } else { + queue.push(data); + } + } + return queue || []; + } + }, + + dequeue: function (elem, type) { + type = type || "fx"; + + var queue = jQuery.queue(elem, type), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks(elem, type), + next = function () { + jQuery.dequeue(elem, type); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if (fn === "inprogress") { + fn = queue.shift(); + startLength--; + } + + if (fn) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if (type === "fx") { + queue.unshift("inprogress"); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call(elem, next, hooks); + } + + if (!startLength && hooks) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, + // or returns the current one + _queueHooks: function (elem, type) { + var key = type + "queueHooks"; + return jQuery._data(elem, key) || jQuery._data(elem, key, { + empty: jQuery.Callbacks("once memory").add(function () { + jQuery._removeData(elem, type + "queue"); + jQuery._removeData(elem, key); + }) + }); + } + }); + + jQuery.fn.extend({ + queue: function (type, data) { + var setter = 2; + + if (typeof type !== "string") { + data = type; + type = "fx"; + setter--; + } + + if (arguments.length < setter) { + return jQuery.queue(this[0], type); + } + + return data === undefined ? + this : + this.each(function () { + var queue = jQuery.queue(this, type, data); + + // ensure a hooks for this queue + jQuery._queueHooks(this, type); + + if (type === "fx" && queue[0] !== "inprogress") { + jQuery.dequeue(this, type); + } + }); + }, + dequeue: function (type) { + return this.each(function () { + jQuery.dequeue(this, type); + }); + }, + clearQueue: function (type) { + return this.queue(type || "fx", []); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function (type, obj) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function () { + if (!( --count )) { + defer.resolveWith(elements, [elements]); + } + }; + + if (typeof type !== "string") { + obj = type; + type = undefined; + } + type = type || "fx"; + + while (i--) { + tmp = jQuery._data(elements[i], type + "queueHooks"); + if (tmp && tmp.empty) { + count++; + tmp.empty.add(resolve); + } + } + resolve(); + return defer.promise(obj); + } + }); + + + (function () { + var shrinkWrapBlocksVal; + + support.shrinkWrapBlocks = function () { + if (shrinkWrapBlocksVal != null) { + return shrinkWrapBlocksVal; + } + + // Will be changed later if needed. + shrinkWrapBlocksVal = false; + + // Minified: var b,c,d + var div, body, container; + + body = document.getElementsByTagName("body")[0]; + if (!body || !body.style) { + + // Test fired too early or in an unsupported environment, exit. + return; + } + + // Setup + div = document.createElement("div"); + container = document.createElement("div"); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild(container).appendChild(div); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + if (typeof div.style.zoom !== "undefined") { + + // Reset CSS: box-sizing; display; margin; border + div.style.cssText = + + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;" + + "padding:1px;width:1px;zoom:1"; + div.appendChild(document.createElement("div")).style.width = "5px"; + shrinkWrapBlocksVal = div.offsetWidth !== 3; + } + + body.removeChild(container); + + return shrinkWrapBlocksVal; + }; + + })(); + var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + + var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); + + + var cssExpand = ["Top", "Right", "Bottom", "Left"]; + + var isHidden = function (elem, el) { + + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem); + }; + + + function adjustCSS(elem, prop, valueParts, tween) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function () { + return tween.cur(); + } : + function () { + return jQuery.css(elem, prop, ""); + }, + initial = currentValue(), + unit = valueParts && valueParts[3] || ( jQuery.cssNumber[prop] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[prop] || unit !== "px" && +initial ) && + rcssNum.exec(jQuery.css(elem, prop)); + + if (initialInUnit && initialInUnit[3] !== unit) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[3]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style(elem, prop, initialInUnit + unit); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if (valueParts) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[1] ? + initialInUnit + ( valueParts[1] + 1 ) * valueParts[2] : + +valueParts[2]; + if (tween) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; + } + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function + var access = function (elems, fn, key, value, chainable, emptyGet, raw) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if (jQuery.type(key) === "object") { + chainable = true; + for (i in key) { + access(elems, fn, i, key[i], true, emptyGet, raw); + } + + // Sets one value + } else if (value !== undefined) { + chainable = true; + + if (!jQuery.isFunction(value)) { + raw = true; + } + + if (bulk) { + + // Bulk operations run against the entire set + if (raw) { + fn.call(elems, value); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function (elem, key, value) { + return bulk.call(jQuery(elem), value); + }; + } + } + + if (fn) { + for (; i < length; i++) { + fn( + elems[i], + key, + raw ? value : value.call(elems[i], i, fn(elems[i], key)) + ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call(elems) : + length ? fn(elems[0], key) : emptyGet; + }; + var rcheckableType = ( /^(?:checkbox|radio)$/i ); + + var rtagName = ( /<([\w:-]+)/ ); + + var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + + var rleadingWhitespace = ( /^\s+/ ); + + var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; + + + function createSafeFragment(document) { + var list = nodeNames.split("|"), + safeFrag = document.createDocumentFragment(); + + if (safeFrag.createElement) { + while (list.length) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; + } + + + (function () { + var div = document.createElement("div"), + fragment = document.createDocumentFragment(), + input = document.createElement("input"); + + // Setup + div.innerHTML = "
      a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement("nav").cloneNode(true).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild(input); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild(div); + + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input = document.createElement("input"); + input.setAttribute("type", "radio"); + input.setAttribute("checked", "checked"); + input.setAttribute("name", "t"); + + div.appendChild(input); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; + + // Support: IE<9 + // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ + support.noCloneEvent = !!div.addEventListener; + + // Support: IE<9 + // Since attributes and properties are the same in IE, + // cleanData must set properties to undefined rather than use removeAttribute + div[jQuery.expando] = 1; + support.attributes = !div.getAttribute(jQuery.expando); + })(); + + +// We have to close these tags to support XHTML (#13200) + var wrapMap = { + option: [1, ""], + legend: [1, "
      ", "
      "], + area: [1, "", ""], + + // Support: IE8 + param: [1, "", ""], + thead: [1, "", "
      "], + tr: [2, "", "
      "], + col: [2, "", "
      "], + td: [3, "", "
      "], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [0, "", ""] : [1, "X
      ", "
      "] + }; + +// Support: IE8-IE9 + wrapMap.optgroup = wrapMap.option; + + wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; + wrapMap.th = wrapMap.td; + + + function getAll(context, tag) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName(tag || "*") : + typeof context.querySelectorAll !== "undefined" ? + context.querySelectorAll(tag || "*") : + undefined; + + if (!found) { + for (found = [], elems = context.childNodes || context; + ( elem = elems[i] ) != null; + i++ + ) { + if (!tag || jQuery.nodeName(elem, tag)) { + found.push(elem); + } else { + jQuery.merge(found, getAll(elem, tag)); + } + } + } + + return tag === undefined || tag && jQuery.nodeName(context, tag) ? + jQuery.merge([context], found) : + found; + } + + +// Mark scripts as having already been evaluated + function setGlobalEval(elems, refElements) { + var elem, + i = 0; + for (; ( elem = elems[i] ) != null; i++) { + jQuery._data( + elem, + "globalEval", + !refElements || jQuery._data(refElements[i], "globalEval") + ); + } + } + + + var rhtml = /<|&#?\w+;/, + rtbody = / from table fragments + if (!support.tbody) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test(elem) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
      " && !rtbody.test(elem) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while (j--) { + if (jQuery.nodeName(( tbody = elem.childNodes[j] ), "tbody") && !tbody.childNodes.length) { + + elem.removeChild(tbody); + } + } + } + + jQuery.merge(nodes, tmp.childNodes); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while (tmp.firstChild) { + tmp.removeChild(tmp.firstChild); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if (tmp) { + safe.removeChild(tmp); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if (!support.appendChecked) { + jQuery.grep(getAll(nodes, "input"), fixDefaultChecked); + } + + i = 0; + while (( elem = nodes[i++] )) { + + // Skip elements already in the context collection (trac-4087) + if (selection && jQuery.inArray(elem, selection) > -1) { + if (ignored) { + ignored.push(elem); + } + + continue; + } + + contains = jQuery.contains(elem.ownerDocument, elem); + + // Append to fragment + tmp = getAll(safe.appendChild(elem), "script"); + + // Preserve script evaluation history + if (contains) { + setGlobalEval(tmp); + } + + // Capture executables + if (scripts) { + j = 0; + while (( elem = tmp[j++] )) { + if (rscriptType.test(elem.type || "")) { + scripts.push(elem); + } + } + } + } + + tmp = null; + + return safe; + } + + + (function () { + var i, eventName, + div = document.createElement("div"); + + // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) + for (i in {submit: true, change: true, focusin: true}) { + eventName = "on" + i; + + if (!( support[i] = eventName in window )) { + + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute(eventName, "t"); + support[i] = div.attributes[eventName].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; + })(); + + + var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + + function returnTrue() { + return true; + } + + function returnFalse() { + return false; + } + +// Support: IE9 +// See #13393 for more info + function safeActiveElement() { + try { + return document.activeElement; + } catch (err) { + } + } + + function on(elem, types, selector, data, fn, one) { + var origFn, type; + + // Types can be a map of types/handlers + if (typeof types === "object") { + + // ( types-Object, selector, data ) + if (typeof selector !== "string") { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for (type in types) { + on(elem, type, selector, data, types[type], one); + } + return elem; + } + + if (data == null && fn == null) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if (fn == null) { + if (typeof selector === "string") { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if (fn === false) { + fn = returnFalse; + } else if (!fn) { + return elem; + } + + if (one === 1) { + origFn = fn; + fn = function (event) { + + // Can use an empty set, since event contains the info + jQuery().off(event); + return origFn.apply(this, arguments); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each(function () { + jQuery.event.add(this, types, fn, data, selector); + }); + } + + /* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ + jQuery.event = { + + global: {}, + + add: function (elem, types, handler, data, selector) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data(elem); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if (!elemData) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if (handler.handler) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if (!handler.guid) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if (!( events = elemData.events )) { + events = elemData.events = {}; + } + if (!( eventHandle = elemData.handle )) { + eventHandle = elemData.handle = function (e) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && + ( !e || jQuery.event.triggered !== e.type ) ? + jQuery.event.dispatch.apply(eventHandle.elem, arguments) : + undefined; + }; + + // Add elem as a property of the handle fn to prevent a memory leak + // with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match(rnotwhite) || [""]; + t = types.length; + while (t--) { + tmp = rtypenamespace.exec(types[t]) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split(".").sort(); + + // There *must* be a type, no attaching namespace-only handlers + if (!type) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[type] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[type] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test(selector), + namespace: namespaces.join(".") + }, handleObjIn); + + // Init the event handler queue if we're the first + if (!( handlers = events[type] )) { + handlers = events[type] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if (!special.setup || + special.setup.call(elem, data, namespaces, eventHandle) === false) { + + // Bind the global event handler to the element + if (elem.addEventListener) { + elem.addEventListener(type, eventHandle, false); + + } else if (elem.attachEvent) { + elem.attachEvent("on" + type, eventHandle); + } + } + } + + if (special.add) { + special.add.call(elem, handleObj); + + if (!handleObj.handler.guid) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if (selector) { + handlers.splice(handlers.delegateCount++, 0, handleObj); + } else { + handlers.push(handleObj); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[type] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function (elem, types, handler, selector, mappedTypes) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData(elem) && jQuery._data(elem); + + if (!elemData || !( events = elemData.events )) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match(rnotwhite) || [""]; + t = types.length; + while (t--) { + tmp = rtypenamespace.exec(types[t]) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split(".").sort(); + + // Unbind all events (on this namespace, if provided) for the element + if (!type) { + for (type in events) { + jQuery.event.remove(elem, type + types[t], handler, selector, true); + } + continue; + } + + special = jQuery.event.special[type] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[type] || []; + tmp = tmp[2] && + new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); + + // Remove matching events + origCount = j = handlers.length; + while (j--) { + handleObj = handlers[j]; + + if (( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test(handleObj.namespace) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector )) { + handlers.splice(j, 1); + + if (handleObj.selector) { + handlers.delegateCount--; + } + if (special.remove) { + special.remove.call(elem, handleObj); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if (origCount && !handlers.length) { + if (!special.teardown || + special.teardown.call(elem, namespaces, elemData.handle) === false) { + + jQuery.removeEvent(elem, type, elemData.handle); + } + + delete events[type]; + } + } + + // Remove the expando if it's no longer used + if (jQuery.isEmptyObject(events)) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData(elem, "events"); + } + }, + + trigger: function (event, data, elem, onlyHandlers) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [elem || document], + type = hasOwn.call(event, "type") ? event.type : event, + namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if (elem.nodeType === 3 || elem.nodeType === 8) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if (rfocusMorph.test(type + jQuery.event.triggered)) { + return; + } + + if (type.indexOf(".") > -1) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[jQuery.expando] ? + event : + new jQuery.Event(type, typeof event === "object" && event); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.rnamespace = event.namespace ? + new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if (!event.target) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [event] : + jQuery.makeArray(data, [event]); + + // Allow special events to draw outside the lines + special = jQuery.event.special[type] || {}; + if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { + + bubbleType = special.delegateType || type; + if (!rfocusMorph.test(bubbleType + type)) { + cur = cur.parentNode; + } + for (; cur; cur = cur.parentNode) { + eventPath.push(cur); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if (tmp === ( elem.ownerDocument || document )) { + eventPath.push(tmp.defaultView || tmp.parentWindow || window); + } + } + + // Fire handlers on the event path + i = 0; + while (( cur = eventPath[i++] ) && !event.isPropagationStopped()) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data(cur, "events") || {} )[event.type] && + jQuery._data(cur, "handle"); + + if (handle) { + handle.apply(cur, data); + } + + // Native handler + handle = ontype && cur[ontype]; + if (handle && handle.apply && acceptData(cur)) { + event.result = handle.apply(cur, data); + if (event.result === false) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if (!onlyHandlers && !event.isDefaultPrevented()) { + + if ( + ( !special._default || + special._default.apply(eventPath.pop(), data) === false + ) && acceptData(elem) + ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if (ontype && elem[type] && !jQuery.isWindow(elem)) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ontype]; + + if (tmp) { + elem[ontype] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[type](); + } catch (e) { + + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if (tmp) { + elem[ontype] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function (event) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix(event); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call(arguments), + handlers = ( jQuery._data(this, "events") || {} )[event.type] || [], + special = jQuery.event.special[event.type] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if (special.preDispatch && special.preDispatch.call(this, event) === false) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call(this, event, handlers); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while (( matched = handlerQueue[i++] ) && !event.isPropagationStopped()) { + event.currentTarget = matched.elem; + + j = 0; + while (( handleObj = matched.handlers[j++] ) && !event.isImmediatePropagationStopped()) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if (!event.rnamespace || event.rnamespace.test(handleObj.namespace)) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[handleObj.origType] || {} ).handle || + handleObj.handler ).apply(matched.elem, args); + + if (ret !== undefined) { + if (( event.result = ret ) === false) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if (special.postDispatch) { + special.postDispatch.call(this, event); + } + + return event.result; + }, + + handlers: function (event, handlers) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if (delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN(event.button) || event.button < 1 )) { + + /* jshint eqeqeq: false */ + for (; cur != this; cur = cur.parentNode || this) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if (cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" )) { + matches = []; + for (i = 0; i < delegateCount; i++) { + handleObj = handlers[i]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if (matches[sel] === undefined) { + matches[sel] = handleObj.needsContext ? + jQuery(sel, this).index(cur) > -1 : + jQuery.find(sel, this, null, [cur]).length; + } + if (matches[sel]) { + matches.push(handleObj); + } + } + if (matches.length) { + handlerQueue.push({elem: cur, handlers: matches}); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if (delegateCount < handlers.length) { + handlerQueue.push({elem: this, handlers: handlers.slice(delegateCount)}); + } + + return handlerQueue; + }, + + fix: function (event) { + if (event[jQuery.expando]) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[type]; + + if (!fixHook) { + this.fixHooks[type] = fixHook = + rmouseEvent.test(type) ? this.mouseHooks : + rkeyEvent.test(type) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; + + event = new jQuery.Event(originalEvent); + + i = copy.length; + while (i--) { + prop = copy[i]; + event[prop] = originalEvent[prop]; + } + + // Support: IE<9 + // Fix target property (#1925) + if (!event.target) { + event.target = originalEvent.srcElement || document; + } + + // Support: Safari 6-8+ + // Target should not be a text node (#504, #13143) + if (event.target.nodeType === 3) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter(event, originalEvent) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + + "metaKey relatedTarget shiftKey target timeStamp view which" ).split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function (event, original) { + + // Add which for key events + if (event.which == null) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: ( "button buttons clientX clientY fromElement offsetX offsetY " + + "pageX pageY screenX screenY toElement" ).split(" "), + filter: function (event, original) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if (event.pageX == null && original.clientX != null) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if (!event.relatedTarget && fromElement) { + event.relatedTarget = fromElement === event.target ? + original.toElement : + fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if (!event.which && button !== undefined) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function () { + if (this !== safeActiveElement() && this.focus) { + try { + this.focus(); + return false; + } catch (e) { + + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function () { + if (this === safeActiveElement() && this.blur) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function () { + if (jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function (event) { + return jQuery.nodeName(event.target, "a"); + } + }, + + beforeunload: { + postDispatch: function (event) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if (event.result !== undefined && event.originalEvent) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + // Piggyback on a donor event to simulate a different one + simulate: function (type, elem, event) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + + // Previously, `originalEvent: {}` was set here, so stopPropagation call + // would not be triggered on donor event, since in our own + // jQuery.event.stopPropagation function we had a check for existence of + // originalEvent.stopPropagation method, so, consequently it would be a noop. + // + // Guard for simulated events was moved to jQuery.event.stopPropagation function + // since `originalEvent` should point to the original event for the + // constancy with other events and for more focused logic + } + ); + + jQuery.event.trigger(e, null, elem); + + if (e.isDefaultPrevented()) { + event.preventDefault(); + } + } + }; + + jQuery.removeEvent = document.removeEventListener ? + function (elem, type, handle) { + + // This "if" is needed for plain objects + if (elem.removeEventListener) { + elem.removeEventListener(type, handle); + } + } : + function (elem, type, handle) { + var name = "on" + type; + + if (elem.detachEvent) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, + // to properly expose it to GC + if (typeof elem[name] === "undefined") { + elem[name] = null; + } + + elem.detachEvent(name, handle); + } + }; + + jQuery.Event = function (src, props) { + + // Allow instantiation without the 'new' keyword + if (!( this instanceof jQuery.Event )) { + return new jQuery.Event(src, props); + } + + // Event object + if (src && src.type) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if (props) { + jQuery.extend(this, props); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[jQuery.expando] = true; + }; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html + jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function () { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if (!e) { + return; + } + + // If preventDefault exists, run it on the original event + if (e.preventDefault) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function () { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if (!e || this.isSimulated) { + return; + } + + // If stopPropagation exists, run it on the original event + if (e.stopPropagation) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function () { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if (e && e.stopImmediatePropagation) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } + }; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). + jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" + }, function (orig, fix) { + jQuery.event.special[orig] = { + delegateType: fix, + bindType: fix, + + handle: function (event) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if (!related || ( related !== target && !jQuery.contains(target, related) )) { + event.type = handleObj.origType; + ret = handleObj.handler.apply(this, arguments); + event.type = fix; + } + return ret; + } + }; + }); + +// IE submit delegation + if (!support.submit) { + + jQuery.event.special.submit = { + setup: function () { + + // Only need this for delegated form submit events + if (jQuery.nodeName(this, "form")) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add(this, "click._submit keypress._submit", function (e) { + + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ? + + // Support: IE <=8 + // We use jQuery.prop instead of elem.form + // to allow fixing the IE8 delegated submit issue (gh-2332) + // by 3rd party polyfills/workarounds. + jQuery.prop(elem, "form") : + undefined; + + if (form && !jQuery._data(form, "submit")) { + jQuery.event.add(form, "submit._submit", function (event) { + event._submitBubble = true; + }); + jQuery._data(form, "submit", true); + } + }); + + // return undefined since we don't need an event listener + }, + + postDispatch: function (event) { + + // If form was submitted by the user, bubble the event up the tree + if (event._submitBubble) { + delete event._submitBubble; + if (this.parentNode && !event.isTrigger) { + jQuery.event.simulate("submit", this.parentNode, event); + } + } + }, + + teardown: function () { + + // Only need this for delegated form submit events + if (jQuery.nodeName(this, "form")) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove(this, "._submit"); + } + }; + } + +// IE change delegation and checkbox/radio fix + if (!support.change) { + + jQuery.event.special.change = { + + setup: function () { + + if (rformElems.test(this.nodeName)) { + + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if (this.type === "checkbox" || this.type === "radio") { + jQuery.event.add(this, "propertychange._change", function (event) { + if (event.originalEvent.propertyName === "checked") { + this._justChanged = true; + } + }); + jQuery.event.add(this, "click._change", function (event) { + if (this._justChanged && !event.isTrigger) { + this._justChanged = false; + } + + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate("change", this, event); + }); + } + return false; + } + + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add(this, "beforeactivate._change", function (e) { + var elem = e.target; + + if (rformElems.test(elem.nodeName) && !jQuery._data(elem, "change")) { + jQuery.event.add(elem, "change._change", function (event) { + if (this.parentNode && !event.isSimulated && !event.isTrigger) { + jQuery.event.simulate("change", this.parentNode, event); + } + }); + jQuery._data(elem, "change", true); + } + }); + }, + + handle: function (event) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if (this !== elem || event.isSimulated || event.isTrigger || + ( elem.type !== "radio" && elem.type !== "checkbox" )) { + + return event.handleObj.handler.apply(this, arguments); + } + }, + + teardown: function () { + jQuery.event.remove(this, "._change"); + + return !rformElems.test(this.nodeName); + } + }; + } + +// Support: Firefox +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome, Safari +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 + if (!support.focusin) { + jQuery.each({focus: "focusin", blur: "focusout"}, function (orig, fix) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function (event) { + jQuery.event.simulate(fix, event.target, jQuery.event.fix(event)); + }; + + jQuery.event.special[fix] = { + setup: function () { + var doc = this.ownerDocument || this, + attaches = jQuery._data(doc, fix); + + if (!attaches) { + doc.addEventListener(orig, handler, true); + } + jQuery._data(doc, fix, ( attaches || 0 ) + 1); + }, + teardown: function () { + var doc = this.ownerDocument || this, + attaches = jQuery._data(doc, fix) - 1; + + if (!attaches) { + doc.removeEventListener(orig, handler, true); + jQuery._removeData(doc, fix); + } else { + jQuery._data(doc, fix, attaches); + } + } + }; + }); + } + + jQuery.fn.extend({ + + on: function (types, selector, data, fn) { + return on(this, types, selector, data, fn); + }, + one: function (types, selector, data, fn) { + return on(this, types, selector, data, fn, 1); + }, + off: function (types, selector, fn) { + var handleObj, type; + if (types && types.preventDefault && types.handleObj) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery(types.delegateTarget).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if (typeof types === "object") { + + // ( types-object [, selector] ) + for (type in types) { + this.off(type, selector, types[type]); + } + return this; + } + if (selector === false || typeof selector === "function") { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if (fn === false) { + fn = returnFalse; + } + return this.each(function () { + jQuery.event.remove(this, types, fn, selector); + }); + }, + + trigger: function (type, data) { + return this.each(function () { + jQuery.event.trigger(type, data, this); + }); + }, + triggerHandler: function (type, data) { + var elem = this[0]; + if (elem) { + return jQuery.event.trigger(type, data, elem, true); + } + } + }); + + + var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g, + safeFragment = createSafeFragment(document), + fragmentDiv = safeFragment.appendChild(document.createElement("div")); + +// Support: IE<8 +// Manipulating tables requires a tbody + function manipulationTarget(elem, content) { + return jQuery.nodeName(elem, "table") && + jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr") ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody")) : + elem; + } + +// Replace/restore the type attribute of script elements for safe DOM manipulation + function disableScript(elem) { + elem.type = ( jQuery.find.attr(elem, "type") !== null ) + "/" + elem.type; + return elem; + } + + function restoreScript(elem) { + var match = rscriptTypeMasked.exec(elem.type); + if (match) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; + } + + function cloneCopyEvent(src, dest) { + if (dest.nodeType !== 1 || !jQuery.hasData(src)) { + return; + } + + var type, i, l, + oldData = jQuery._data(src), + curData = jQuery._data(dest, oldData), + events = oldData.events; + + if (events) { + delete curData.handle; + curData.events = {}; + + for (type in events) { + for (i = 0, l = events[type].length; i < l; i++) { + jQuery.event.add(dest, type, events[type][i]); + } + } + } + + // make the cloned public data object a copy from the original + if (curData.data) { + curData.data = jQuery.extend({}, curData.data); + } + } + + function fixCloneNodeIssues(src, dest) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if (dest.nodeType !== 1) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if (!support.noCloneEvent && dest[jQuery.expando]) { + data = jQuery._data(dest); + + for (e in data.events) { + jQuery.removeEvent(dest, e, data.handle); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute(jQuery.expando); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if (nodeName === "script" && dest.text !== src.text) { + disableScript(dest).text = src.text; + restoreScript(dest); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if (nodeName === "object") { + if (dest.parentNode) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if (support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) )) { + dest.innerHTML = src.innerHTML; + } + + } else if (nodeName === "input" && rcheckableType.test(src.type)) { + + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if (dest.value !== src.value) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if (nodeName === "option") { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if (nodeName === "input" || nodeName === "textarea") { + dest.defaultValue = src.defaultValue; + } + } + + function domManip(collection, args, callback, ignored) { + + // Flatten any nested arrays + args = concat.apply([], args); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction(value); + + // We can't cloneNode fragments that contain checked, in WebKit + if (isFunction || + ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value) )) { + return collection.each(function (index) { + var self = collection.eq(index); + if (isFunction) { + args[0] = value.call(this, index, self.html()); + } + domManip(self, args, callback, ignored); + }); + } + + if (l) { + fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); + first = fragment.firstChild; + + if (fragment.childNodes.length === 1) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if (first || ignored) { + scripts = jQuery.map(getAll(fragment, "script"), disableScript); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for (; i < l; i++) { + node = fragment; + + if (i !== iNoClone) { + node = jQuery.clone(node, true, true); + + // Keep references to cloned scripts for later restoration + if (hasScripts) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge(scripts, getAll(node, "script")); + } + } + + callback.call(collection[i], node, i); + } + + if (hasScripts) { + doc = scripts[scripts.length - 1].ownerDocument; + + // Reenable scripts + jQuery.map(scripts, restoreScript); + + // Evaluate executable scripts on first document insertion + for (i = 0; i < hasScripts; i++) { + node = scripts[i]; + if (rscriptType.test(node.type || "") && !jQuery._data(node, "globalEval") && + jQuery.contains(doc, node)) { + + if (node.src) { + + // Optional AJAX dependency, but won't run scripts if not present + if (jQuery._evalUrl) { + jQuery._evalUrl(node.src); + } + } else { + jQuery.globalEval( + ( node.text || node.textContent || node.innerHTML || "" ) + .replace(rcleanScript, "") + ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return collection; + } + + function remove(elem, selector, keepData) { + var node, + elems = selector ? jQuery.filter(selector, elem) : elem, + i = 0; + + for (; ( node = elems[i] ) != null; i++) { + + if (!keepData && node.nodeType === 1) { + jQuery.cleanData(getAll(node)); + } + + if (node.parentNode) { + if (keepData && jQuery.contains(node.ownerDocument, node)) { + setGlobalEval(getAll(node, "script")); + } + node.parentNode.removeChild(node); + } + } + + return elem; + } + + jQuery.extend({ + htmlPrefilter: function (html) { + return html.replace(rxhtmlTag, "<$1>"); + }, + + clone: function (elem, dataAndEvents, deepDataAndEvents) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains(elem.ownerDocument, elem); + + if (support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test("<" + elem.nodeName + ">")) { + + clone = elem.cloneNode(true); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild(clone = fragmentDiv.firstChild); + } + + if (( !support.noCloneEvent || !support.noCloneChecked ) && + ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc(elem)) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll(clone); + srcElements = getAll(elem); + + // Fix all IE cloning issues + for (i = 0; ( node = srcElements[i] ) != null; ++i) { + + // Ensure that the destination node is not null; Fixes #9587 + if (destElements[i]) { + fixCloneNodeIssues(node, destElements[i]); + } + } + } + + // Copy the events from the original to the clone + if (dataAndEvents) { + if (deepDataAndEvents) { + srcElements = srcElements || getAll(elem); + destElements = destElements || getAll(clone); + + for (i = 0; ( node = srcElements[i] ) != null; i++) { + cloneCopyEvent(node, destElements[i]); + } + } else { + cloneCopyEvent(elem, clone); + } + } + + // Preserve script evaluation history + destElements = getAll(clone, "script"); + if (destElements.length > 0) { + setGlobalEval(destElements, !inPage && getAll(elem, "script")); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + cleanData: function (elems, /* internal */ forceAcceptData) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + attributes = support.attributes, + special = jQuery.event.special; + + for (; ( elem = elems[i] ) != null; i++) { + if (forceAcceptData || acceptData(elem)) { + + id = elem[internalKey]; + data = id && cache[id]; + + if (data) { + if (data.events) { + for (type in data.events) { + if (special[type]) { + jQuery.event.remove(elem, type); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent(elem, type, data.handle); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if (cache[id]) { + + delete cache[id]; + + // Support: IE<9 + // IE does not allow us to delete expando properties from nodes + // IE creates expando attributes along with the property + // IE does not have a removeAttribute function on Document nodes + if (!attributes && typeof elem.removeAttribute !== "undefined") { + elem.removeAttribute(internalKey); + + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://code.google.com/p/chromium/issues/detail?id=378607 + } else { + elem[internalKey] = undefined; + } + + deletedIds.push(id); + } + } + } + } + } + }); + + jQuery.fn.extend({ + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function (selector) { + return remove(this, selector, true); + }, + + remove: function (selector) { + return remove(this, selector); + }, + + text: function (value) { + return access(this, function (value) { + return value === undefined ? + jQuery.text(this) : + this.empty().append( + ( this[0] && this[0].ownerDocument || document ).createTextNode(value) + ); + }, null, value, arguments.length); + }, + + append: function () { + return domManip(this, arguments, function (elem) { + if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { + var target = manipulationTarget(this, elem); + target.appendChild(elem); + } + }); + }, + + prepend: function () { + return domManip(this, arguments, function (elem) { + if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { + var target = manipulationTarget(this, elem); + target.insertBefore(elem, target.firstChild); + } + }); + }, + + before: function () { + return domManip(this, arguments, function (elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this); + } + }); + }, + + after: function () { + return domManip(this, arguments, function (elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this.nextSibling); + } + }); + }, + + empty: function () { + var elem, + i = 0; + + for (; ( elem = this[i] ) != null; i++) { + + // Remove element nodes and prevent memory leaks + if (elem.nodeType === 1) { + jQuery.cleanData(getAll(elem, false)); + } + + // Remove any remaining nodes + while (elem.firstChild) { + elem.removeChild(elem.firstChild); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if (elem.options && jQuery.nodeName(elem, "select")) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function (dataAndEvents, deepDataAndEvents) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function () { + return jQuery.clone(this, dataAndEvents, deepDataAndEvents); + }); + }, + + html: function (value) { + return access(this, function (value) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if (value === undefined) { + return elem.nodeType === 1 ? + elem.innerHTML.replace(rinlinejQuery, "") : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if (typeof value === "string" && !rnoInnerhtml.test(value) && + ( support.htmlSerialize || !rnoshimcache.test(value) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test(value) ) && !wrapMap[( rtagName.exec(value) || ["", ""] )[1].toLowerCase()]) { + + value = jQuery.htmlPrefilter(value); + + try { + for (; i < l; i++) { + + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if (elem.nodeType === 1) { + jQuery.cleanData(getAll(elem, false)); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch (e) { + } + } + + if (elem) { + this.empty().append(value); + } + }, null, value, arguments.length); + }, + + replaceWith: function () { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip(this, arguments, function (elem) { + var parent = this.parentNode; + + if (jQuery.inArray(this, ignored) < 0) { + jQuery.cleanData(getAll(this)); + if (parent) { + parent.replaceChild(elem, this); + } + } + + // Force callback invocation + }, ignored); + } + }); + + jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function (name, original) { + jQuery.fn[name] = function (selector) { + var elems, + i = 0, + ret = [], + insert = jQuery(selector), + last = insert.length - 1; + + for (; i <= last; i++) { + elems = i === last ? this : this.clone(true); + jQuery(insert[i])[original](elems); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply(ret, elems.get()); + } + + return this.pushStack(ret); + }; + }); + + + var iframe, + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + + /** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ + +// Called only from within defaultDisplay + function actualDisplay(name, doc) { + var elem = jQuery(doc.createElement(name)).appendTo(doc.body), + + display = jQuery.css(elem[0], "display"); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; + } + + /** + * Try to determine the default display value of an element + * @param {String} nodeName + */ + function defaultDisplay(nodeName) { + var doc = document, + display = elemdisplay[nodeName]; + + if (!display) { + display = actualDisplay(nodeName, doc); + + // If the simple way fails, read from inside an iframe + if (display === "none" || !display) { + + // Use the already-created iframe if possible + iframe = ( iframe || jQuery("