├── .nojekyll ├── libraries ├── frameworks │ └── bootstrap │ │ ├── js │ │ ├── main.js │ │ ├── plugins.js │ │ └── vendor │ │ │ ├── modernizr-2.6.1-respond-1.1.0.min.js │ │ │ └── bootstrap.min.js │ │ ├── robots.txt │ │ ├── layouts │ │ ├── slide.html │ │ ├── hero.html │ │ ├── special.html │ │ ├── hero2.html │ │ ├── div.html │ │ ├── scripts.html │ │ └── deck.html │ │ ├── ico │ │ ├── apple-touch-icon.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon-57x57-precomposed.png │ │ ├── apple-touch-icon-72x72-precomposed.png │ │ ├── apple-touch-icon-114x114-precomposed.png │ │ └── apple-touch-icon-144x144-precomposed.png │ │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ │ ├── humans.txt │ │ ├── css │ │ ├── main.css │ │ ├── bootstrap-responsive.min.css │ │ └── bootstrap-responsive.css │ │ ├── partials │ │ ├── footer.html │ │ ├── navbar.html │ │ └── head.html │ │ ├── 404.html │ │ └── index.html └── highlighters │ └── prettify │ ├── prettify.html │ ├── css │ ├── twitter-bootstrap.css │ ├── desert.css │ ├── default.css │ ├── sons-of-obsidian.css │ ├── sunburst.css │ ├── hemisu-light.css │ └── tomorrow-night-bright.css │ └── js │ └── lang-r.js ├── screenshot.png ├── screenshot cumul.png ├── smallmultiples_iris.R ├── .gitattributes ├── signal_analysis.Rmd ├── experiments.Rmd ├── .gitignore ├── signal_analysis.Rhtml ├── css └── dc.css ├── signal_slidify.Rmd ├── smallmultiples_iris.html ├── iris.json └── js └── crossfilter.js /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/slide.html: -------------------------------------------------------------------------------- 1 | {{{ slide.header }}} 2 | {{{ slide.content }}} 3 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/screenshot.png -------------------------------------------------------------------------------- /screenshot cumul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/screenshot cumul.png -------------------------------------------------------------------------------- /smallmultiples_iris.R: -------------------------------------------------------------------------------- 1 | #Various R code to play with dc.js small multiples 2 | 3 | #write the iris data as a JSON Array 4 | writeLines(rCharts::toJSONArray(iris),"iris.json") 5 | 6 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/hero.html: -------------------------------------------------------------------------------- 1 |
2 | {{{ header }}} 3 | {{{ content }}} 4 |

{{{ help }}} »

5 |
6 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/ico/apple-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timelyportfolio/rCharts_crossfilter_dcjs/HEAD/libraries/frameworks/bootstrap/ico/apple-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/special.html: -------------------------------------------------------------------------------- 1 |
2 | {{{ slide.header }}} 3 |
4 | {{{ slide.content }}} 5 |
6 |
7 | {{{ slide.code.content }}} 8 |
9 |
10 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | -- -- 7 | 8 | # THANKS 9 | 10 | 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | HTML5, CSS3 15 | jQuery, Modernizr 16 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/hero2.html: -------------------------------------------------------------------------------- 1 |
2 | {{{ header }}} 3 |
4 |
5 | {{{ content }}} 6 |
7 |
8 | {{{ video }}} 9 |
10 |
11 |

{{{ help }}} »

12 |
13 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* ========================================================================== 4 | Author's custom styles 5 | ========================================================================== */ 6 | 7 | /*.container { 8 | width: 940px; 9 | }*/ 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/partials/footer.html: -------------------------------------------------------------------------------- 1 |

Styled using Bootstrap. Hosted on GitHub. Icons from Font-Awesome. Web fonts from Google. Generated by Slidify

2 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/div.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{{ first }}} 4 |

View details »

5 |
6 |
7 | {{{ second }}} 8 |

View details »

9 |
10 |
11 | {{{ third }}} 12 |

View details »

13 |
14 |
15 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/prettify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | if (!(window.console && console.log)) { 3 | (function() { 4 | var noop = function() {}; 5 | var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; 6 | var length = methods.length; 7 | var console = window.console = {}; 8 | while (length--) { 9 | console[methods[length]] = noop; 10 | } 11 | }()); 12 | } 13 | 14 | // Place any jQuery/helper plugins in here. 15 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/scripts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /signal_analysis.Rmd: -------------------------------------------------------------------------------- 1 | # Signal Analysis with dc.js & crossfilter 2 | 3 | 4 | -------------------------------------------------------------------------------- /experiments.Rmd: -------------------------------------------------------------------------------- 1 | Start working with how we might pair crossfilter and dc.js, separately or in combination, to work with R data. Some good links are the [dc.js Nasdaq example]() and this [AAII stock picking analysis](http://www.acrodatics.com/) by [Lon Riesberg](https://twitter.com/lonriesberg). 2 | 3 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/twitter-bootstrap.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .linenums .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 18px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/partials/navbar.html: -------------------------------------------------------------------------------- 1 | 26 | 27 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/layouts/deck.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{> head }} 8 | {{{ page.assets.css }}} 9 | {{{ page.assets.jshead }}} 10 | 11 | 12 | 20 | 21 | 22 |
23 | {{{ page.content }}} 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | {{{ page.assets.js }}} 32 | {{> javascripts }} 33 | 34 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ page.title }} 4 | 5 | 6 | 7 | 13 | {{# page.cdn }} 14 | 16 | {{/ page.cdn }} 17 | {{^ page.cdn }} 18 | 19 | 20 | {{/ page.cdn }} 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/desert.css: -------------------------------------------------------------------------------- 1 | /* desert scheme ported from vim to google prettify */ 2 | pre { display: block; background-color: #333 } 3 | pre .nocode { background-color: none; color: #000 } 4 | pre .str { color: #ffa0a0 } /* string - pink */ 5 | pre .kwd { color: #f0e68c; font-weight: bold } 6 | pre .com { color: #87ceeb } /* comment - skyblue */ 7 | pre .typ { color: #98fb98 } /* type - lightgreen */ 8 | pre .lit { color: #cd5c5c } /* literal - darkred */ 9 | pre .pun { color: #fff } /* punctuation */ 10 | pre .pln { color: #fff } /* plaintext */ 11 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */ 12 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */ 13 | pre .atv { color: #ffa0a0 } /* attribute value - pink */ 14 | pre .dec { color: #98fb98 } /* decimal - lightgreen */ 15 | 16 | /* Specify class=linenums on a pre to get line numbering */ 17 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */ 18 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 19 | /* Alternate shading for lines */ 20 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 21 | 22 | @media print { 23 | pre { background-color: none } 24 | pre .str, code .str { color: #060 } 25 | pre .kwd, code .kwd { color: #006; font-weight: bold } 26 | pre .com, code .com { color: #600; font-style: italic } 27 | pre .typ, code .typ { color: #404; font-weight: bold } 28 | pre .lit, code .lit { color: #044 } 29 | pre .pun, code .pun { color: #440 } 30 | pre .pln, code .pln { color: #000 } 31 | pre .tag, code .tag { color: #006; font-weight: bold } 32 | pre .atn, code .atn { color: #404 } 33 | pre .atv, code .atv { color: #060 } 34 | } 35 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/default.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | /* SPAN elements with the classes below are added by prettyprint. */ 4 | .pln { color: #000 } /* plain text */ 5 | 6 | @media screen { 7 | .str { color: #080 } /* string content */ 8 | .kwd { color: #008 } /* a keyword */ 9 | .com { color: #800 } /* a comment */ 10 | .typ { color: #606 } /* a type name */ 11 | .lit { color: #066 } /* a literal value */ 12 | /* punctuation, lisp open bracket, lisp close bracket */ 13 | .pun, .opn, .clo { color: #660 } 14 | .tag { color: #008 } /* a markup tag name */ 15 | .atn { color: #606 } /* a markup attribute name */ 16 | .atv { color: #080 } /* a markup attribute value */ 17 | .dec, .var { color: #606 } /* a declaration; a variable name */ 18 | .fun { color: red } /* a function name */ 19 | } 20 | 21 | /* Use higher contrast and text-weight for printable form. */ 22 | @media print, projection { 23 | .str { color: #060 } 24 | .kwd { color: #006; font-weight: bold } 25 | .com { color: #600; font-style: italic } 26 | .typ { color: #404; font-weight: bold } 27 | .lit { color: #044 } 28 | .pun, .opn, .clo { color: #440 } 29 | .tag { color: #006; font-weight: bold } 30 | .atn { color: #404 } 31 | .atv { color: #060 } 32 | } 33 | 34 | /* Put a border around prettyprinted code snippets. */ 35 | pre.prettyprint { padding: 2px; border: 1px solid #888 } 36 | 37 | /* Specify class=linenums on a pre to get line numbering */ 38 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 39 | li.L0, 40 | li.L1, 41 | li.L2, 42 | li.L3, 43 | li.L5, 44 | li.L6, 45 | li.L7, 46 | li.L8 { list-style-type: none } 47 | /* Alternate shading for lines */ 48 | li.L1, 49 | li.L3, 50 | li.L5, 51 | li.L7, 52 | li.L9 { background: #eee } 53 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/sons-of-obsidian.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Derived from einaros's Sons of Obsidian theme at 3 | * http://studiostyl.es/schemes/son-of-obsidian by 4 | * Alex Ford of CodeTunnel: 5 | * http://CodeTunnel.com/blog/post/71/google-code-prettify-obsidian-theme 6 | */ 7 | 8 | .str 9 | { 10 | color: #EC7600; 11 | } 12 | .kwd 13 | { 14 | color: #93C763; 15 | } 16 | .com 17 | { 18 | color: #66747B; 19 | } 20 | .typ 21 | { 22 | color: #678CB1; 23 | } 24 | .lit 25 | { 26 | color: #FACD22; 27 | } 28 | .pun 29 | { 30 | color: #F1F2F3; 31 | } 32 | .pln 33 | { 34 | color: #F1F2F3; 35 | } 36 | .tag 37 | { 38 | color: #8AC763; 39 | } 40 | .atn 41 | { 42 | color: #E0E2E4; 43 | } 44 | .atv 45 | { 46 | color: #EC7600; 47 | } 48 | .dec 49 | { 50 | color: purple; 51 | } 52 | pre.prettyprint 53 | { 54 | border: 0px solid #888; 55 | } 56 | ol.linenums 57 | { 58 | margin-top: 0; 59 | margin-bottom: 0; 60 | } 61 | .prettyprint { 62 | background: #000; 63 | } 64 | li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 65 | { 66 | color: #555; 67 | } 68 | li.L1, li.L3, li.L5, li.L7, li.L9 { 69 | background: #111; 70 | } 71 | @media print 72 | { 73 | .str 74 | { 75 | color: #060; 76 | } 77 | .kwd 78 | { 79 | color: #006; 80 | font-weight: bold; 81 | } 82 | .com 83 | { 84 | color: #600; 85 | font-style: italic; 86 | } 87 | .typ 88 | { 89 | color: #404; 90 | font-weight: bold; 91 | } 92 | .lit 93 | { 94 | color: #044; 95 | } 96 | .pun 97 | { 98 | color: #440; 99 | } 100 | .pln 101 | { 102 | color: #000; 103 | } 104 | .tag 105 | { 106 | color: #006; 107 | font-weight: bold; 108 | } 109 | .atn 110 | { 111 | color: #404; 112 | } 113 | .atv 114 | { 115 | color: #060; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/sunburst.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | /* Vim sunburst theme by David Leibovic */ 3 | 4 | pre .str, code .str { color: #65B042; } /* string - green */ 5 | pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */ 6 | pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */ 7 | pre .typ, code .typ { color: #89bdff; } /* type - light blue */ 8 | pre .lit, code .lit { color: #3387CC; } /* literal - blue */ 9 | pre .pun, code .pun { color: #fff; } /* punctuation - white */ 10 | pre .pln, code .pln { color: #fff; } /* plaintext - white */ 11 | pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */ 12 | pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */ 13 | pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */ 14 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */ 15 | 16 | pre.prettyprint, code.prettyprint { 17 |  background-color: #000; 18 |  -moz-border-radius: 8px; 19 |  -webkit-border-radius: 8px; 20 |  -o-border-radius: 8px; 21 |  -ms-border-radius: 8px; 22 |  -khtml-border-radius: 8px; 23 |  border-radius: 8px; 24 | } 25 | 26 | pre.prettyprint { 27 |  width: 95%; 28 |  margin: 1em auto; 29 |  padding: 1em; 30 |  white-space: pre-wrap; 31 | } 32 | 33 | 34 | /* Specify class=linenums on a pre to get line numbering */ 35 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */ 36 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 37 | /* Alternate shading for lines */ 38 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 39 | 40 | @media print { 41 | pre .str, code .str { color: #060; } 42 | pre .kwd, code .kwd { color: #006; font-weight: bold; } 43 | pre .com, code .com { color: #600; font-style: italic; } 44 | pre .typ, code .typ { color: #404; font-weight: bold; } 45 | pre .lit, code .lit { color: #044; } 46 | pre .pun, code .pun { color: #440; } 47 | pre .pln, code .pln { color: #000; } 48 | pre .tag, code .tag { color: #006; font-weight: bold; } 49 | pre .atn, code .atn { color: #404; } 50 | pre .atv, code .atv { color: #060; } 51 | } 52 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/js/lang-r.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2012 Jeffrey B. Arnold 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | 16 | /** 17 | * @fileoverview 18 | * Registers a language handler for S, S-plus, and R source code. 19 | * 20 | * 21 | * To use, include prettify.js and this file in your HTML page. 22 | * Then put your code in an HTML tag like 23 | *
 code 
24 | * 25 | * Language definition from 26 | * http://cran.r-project.org/doc/manuals/R-lang.html. 27 | * Many of the regexes are shared with the pygments SLexer, 28 | * http://pygments.org/. 29 | * 30 | * @author jeffrey.arnold@gmail.com 31 | */ 32 | PR['registerLangHandler']( 33 | PR['createSimpleLexer']( 34 | [ 35 | [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'], 36 | [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'], 37 | [PR['PR_STRING'], /^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/, null, "'"] 38 | ], 39 | [ 40 | [PR['PR_COMMENT'], /^#.*/], 41 | [PR['PR_KEYWORD'], /^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/], 42 | // hex numbes 43 | [PR['PR_LITERAL'], /^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/], 44 | // Decimal numbers 45 | [PR['PR_LITERAL'], /^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/], 46 | // builtin symbols 47 | [PR['PR_LITERAL'], /^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 48 | // assignment, operators, and parens, etc. 49 | [PR['PR_PUNCTUATION'], /^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/], 50 | // valid variable names 51 | [PR['PR_PLAIN'], /^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/], 52 | // string backtick 53 | [PR['PR_STRING'], /^`.+`/] 54 | ]), 55 | ['r', 's', 'R', 'S', 'Splus']); 56 | -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/hemisu-light.css: -------------------------------------------------------------------------------- 1 | /* Hemisu Light */ 2 | /* Original theme - http://noahfrederick.com/vim-color-scheme-hemisu/ */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #111111; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #739200; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #739200; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #999999; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #ff0055; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #538192; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #111111; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #111111; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #111111; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #111111; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #739200; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #ff0055; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #111111; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #111111; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #538192; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | pre.prettyprint { 99 | background: white; 100 | font-family: Menlo, Monaco, Consolas, monospace; 101 | /* font-size: 12px;*/ 102 | line-height: 1.5; 103 | border: 1px solid #ccc; 104 | padding: 10px; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; } 111 | 112 | /* IE indents via margin-left */ 113 | li.L0, 114 | li.L1, 115 | li.L2, 116 | li.L3, 117 | li.L4, 118 | li.L5, 119 | li.L6, 120 | li.L7, 121 | li.L8, 122 | li.L9 { 123 | /* */ } 124 | 125 | /* Alternate shading for lines */ 126 | li.L1, 127 | li.L3, 128 | li.L5, 129 | li.L7, 130 | li.L9 { 131 | /* */ } -------------------------------------------------------------------------------- /libraries/highlighters/prettify/css/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #eaeaea; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #b9ca4a; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #c397d8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #969896; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #7aa6da; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #e78c45; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #eaeaea; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #eaeaea; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #eaeaea; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #d54e53; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #e78c45; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #70c0b1; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #e78c45; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #d54e53; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #7aa6da; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | pre.prettyprint { 99 | background: black; 100 | font-family: Menlo, Monaco, Consolas, monospace; 101 | font-size: 12px; 102 | line-height: 1.5; 103 | border: 1px solid #ccc; 104 | padding: 10px; } 105 | 106 | /* Specify class=linenums on a pre to get line numbering */ 107 | ol.linenums { 108 | margin-top: 0; 109 | margin-bottom: 0; } 110 | 111 | /* IE indents via margin-left */ 112 | li.L0, 113 | li.L1, 114 | li.L2, 115 | li.L3, 116 | li.L4, 117 | li.L5, 118 | li.L6, 119 | li.L7, 120 | li.L8, 121 | li.L9 { 122 | /* */ } 123 | 124 | /* Alternate shading for lines */ 125 | li.L1, 126 | li.L3, 127 | li.L5, 128 | li.L7, 129 | li.L9 { 130 | /* */ } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /signal_analysis.Rhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

Signal Analysis with dc.js & crossfilter

13 | 14 |

Signal Histogram

15 |

Average Return By Signal

16 |

Count By Year

17 | 18 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /css/dc.css: -------------------------------------------------------------------------------- 1 | .dc-chart { 2 | float: left; 3 | } 4 | 5 | .dc-chart rect.bar { 6 | stroke: none; 7 | cursor: pointer; 8 | } 9 | 10 | .dc-chart rect.bar:hover { 11 | fill-opacity: .5; 12 | } 13 | 14 | .dc-chart rect.stack1 { 15 | stroke: none; 16 | fill: red; 17 | } 18 | 19 | .dc-chart rect.stack2 { 20 | stroke: none; 21 | fill: green; 22 | } 23 | 24 | .dc-chart rect.deselected { 25 | stroke: none; 26 | fill: #ccc; 27 | } 28 | 29 | .dc-chart .pie-slice { 30 | fill: white; 31 | font-size: 12px; 32 | cursor: pointer; 33 | } 34 | 35 | .dc-chart .pie-slice :hover { 36 | fill-opacity: .8; 37 | } 38 | 39 | .dc-chart .selected path { 40 | stroke-width: 3; 41 | stroke: #ccc; 42 | fill-opacity: 1; 43 | } 44 | 45 | .dc-chart .deselected path { 46 | strok: none; 47 | fill-opacity: .5; 48 | fill: #ccc; 49 | } 50 | 51 | .dc-chart .axis path, .axis line { 52 | fill: none; 53 | stroke: #000; 54 | shape-rendering: crispEdges; 55 | } 56 | 57 | .dc-chart .axis text { 58 | font: 10px sans-serif; 59 | } 60 | 61 | .dc-chart .grid-line { 62 | fill: none; 63 | stroke: #ccc; 64 | opacity: .5; 65 | shape-rendering: crispEdges; 66 | } 67 | 68 | .dc-chart .grid-line line { 69 | fill: none; 70 | stroke: #ccc; 71 | opacity: .5; 72 | shape-rendering: crispEdges; 73 | } 74 | 75 | .dc-chart .brush rect.background { 76 | z-index: -999; 77 | } 78 | 79 | .dc-chart .brush rect.extent { 80 | fill: steelblue; 81 | fill-opacity: .125; 82 | } 83 | 84 | .dc-chart .brush .resize path { 85 | fill: #eee; 86 | stroke: #666; 87 | } 88 | 89 | .dc-chart path.line { 90 | fill: none; 91 | stroke-width: 1.5px; 92 | } 93 | 94 | .dc-chart circle.dot { 95 | stroke: none; 96 | } 97 | 98 | .dc-chart g.dc-tooltip path { 99 | fill: none; 100 | stroke: grey; 101 | stroke-opacity: .8; 102 | } 103 | 104 | .dc-chart path.area { 105 | fill-opacity: .3; 106 | stroke: none; 107 | } 108 | 109 | .dc-chart .node { 110 | font-size: 0.7em; 111 | cursor: pointer; 112 | } 113 | 114 | .dc-chart .node :hover { 115 | fill-opacity: .8; 116 | } 117 | 118 | .dc-chart .selected circle { 119 | stroke-width: 3; 120 | stroke: #ccc; 121 | fill-opacity: 1; 122 | } 123 | 124 | .dc-chart .deselected circle { 125 | strok: none; 126 | fill-opacity: .5; 127 | fill: #ccc; 128 | } 129 | 130 | .dc-chart .bubble { 131 | stroke: none; 132 | fill-opacity: 0.6; 133 | } 134 | 135 | .dc-data-count { 136 | float: right; 137 | margin-top: 15px; 138 | margin-right: 15px; 139 | } 140 | 141 | .dc-data-count .filter-count { 142 | color: #3182bd; 143 | font-weight: bold; 144 | } 145 | 146 | .dc-data-count .total-count { 147 | color: #3182bd; 148 | font-weight: bold; 149 | } 150 | 151 | .dc-data-table { 152 | } 153 | 154 | .dc-chart g.state { 155 | cursor: pointer; 156 | } 157 | 158 | .dc-chart g.state :hover { 159 | fill-opacity: .8; 160 | } 161 | 162 | .dc-chart g.state path { 163 | stroke: white; 164 | } 165 | 166 | .dc-chart g.selected path { 167 | } 168 | 169 | .dc-chart g.deselected path { 170 | fill: grey; 171 | } 172 | 173 | .dc-chart g.selected text { 174 | } 175 | 176 | .dc-chart g.deselected text { 177 | display: none; 178 | } 179 | 180 | .dc-chart g.county path { 181 | stroke: white; 182 | fill: none; 183 | } 184 | 185 | .dc-chart g.debug rect { 186 | fill: blue; 187 | fill-opacity: .2; 188 | } 189 | 190 | .dc-chart g.row rect { 191 | fill-opacity: 0.8; 192 | cursor: pointer; 193 | } 194 | 195 | .dc-chart g.row rect:hover { 196 | fill-opacity: 0.6; 197 | } 198 | 199 | .dc-chart g.row text { 200 | fill: white; 201 | font-size: 12px; 202 | cursor: pointer; 203 | } 204 | 205 | .dc-legend { 206 | font-size: 11px; 207 | } 208 | 209 | .dc-legend-item { 210 | cursor: pointer; 211 | } 212 | 213 | .dc-chart g.axis text { 214 | /* Makes it so the user can't accidentally click and select text that is meant as a label only */ 215 | -webkit-user-select: none; /* Chrome/Safari */ 216 | -moz-user-select: none; /* Firefox */ 217 | -ms-user-select: none; /* IE10 */ 218 | -o-user-select: none; 219 | user-select: none; 220 | pointer-events: none; 221 | } 222 | 223 | .dc-chart path.highlight { 224 | stroke-width: 3; 225 | fill-opacity: 1; 226 | stroke-opacity: 1; 227 | } 228 | 229 | .dc-chart .highlight { 230 | fill-opacity: 1; 231 | stroke-opacity: 1; 232 | } 233 | 234 | .dc-chart .fadeout { 235 | fill-opacity: 0.2; 236 | stroke-opacity: 0.2; 237 | } 238 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 |
    148 |
  • a mistyped address
  • 149 |
  • an out-of-date link
  • 150 |
151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /signal_slidify.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Signal Analysis Experiment with dc.js & crossfilter 3 | author: Timely Portfolio 4 | github: {user: timelyportfolio, repo: rCharts_crossfilter_dcjs, branch: "gh-pages"} 5 | framework: bootstrap 6 | mode: selfcontained 7 | highlighter: prettify 8 | hitheme: twitter-bootstrap 9 | assets: 10 | css: 11 | - "http://fonts.googleapis.com/css?family=Raleway:300" 12 | - "http://fonts.googleapis.com/css?family=Oxygen" 13 | - "css/dc.css" 14 | jshead: 15 | - "http://d3js.org/d3.v3.js" 16 | - "js/crossfilter.js" 17 | - "js/dc.js" 18 | --- 19 | 20 | 42 | 43 | Fork me on GitHub 44 | 45 | # Signal Analysis on S&P 500 using [dc.js](http://nickqizhu.github.io/dc.js/) & [crossfilter](http://square.github.io/crossfilter/) 46 | ## With Help from [R](http://r-project.org) and [slidify](http://slidify.org) 47 | 48 |
49 |
50 |

Signal Histogram

51 | 52 |
53 |

Avg Return By Signal

54 |

Count By Year

55 |
56 | 57 | 58 | ```{r results ='asis', message=F, warning=F, error=F} 59 | library(reshape2) 60 | library(plyr) 61 | library(quantmod) 62 | library(TTR) 63 | library(PerformanceAnalytics) 64 | library(rCharts) 65 | 66 | spx <- na.omit(getSymbols("^GSPC", from="1950-01-01", auto.assign=FALSE)[,4]) 67 | 68 | spx.melt <- melt(data.frame(index(spx),coredata(spx)),id.vars=1) 69 | colnames(spx.melt) <- c("date","name","price") 70 | 71 | spx.melt <- ddply( 72 | spx.melt, 73 | c("name"), 74 | transform, 75 | rsi=RSI(price, n=14) 76 | ) 77 | #lag our signal 78 | spx.melt$rsi <- as.vector( 79 | lag( 80 | as.xts( 81 | spx.melt$rsi, 82 | order.by=spx.melt$date 83 | ), 84 | k=1 85 | ) 86 | ) 87 | 88 | spx.melt <- ddply( 89 | spx.melt, 90 | c("name"), 91 | transform, 92 | ret=ROC(price,n=1,type="discrete") 93 | ) 94 | ``` 95 | 96 | 188 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 68 | 69 |
70 | 71 | 72 |
73 |

Hello, world!

74 |

This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.

75 |

Learn more »

76 |
77 | 78 | 79 |
80 |
81 |

Heading

82 |

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

83 |

View details »

84 |
85 |
86 |

Heading

87 |

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.

88 |

View details »

89 |
90 |
91 |

Heading

92 |

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

93 |

View details »

94 |
95 |
96 | 97 |
98 | 99 |
100 |

© Company 2012

101 |
102 | 103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /smallmultiples_iris.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 52 | 53 | 54 | 55 |
56 |

Signal Histogram

57 | 58 |
59 |
60 | 61 |
62 | 240 | 241 | 242 | -------------------------------------------------------------------------------- /iris.json: -------------------------------------------------------------------------------- 1 | [{"Sepal.Length":5.1,"Sepal.Width":3.5,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.9,"Sepal.Width":3,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.7,"Sepal.Width":3.2,"Petal.Length":1.3,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.6,"Sepal.Width":3.1,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.6,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.4,"Sepal.Width":3.9,"Petal.Length":1.7,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":4.6,"Sepal.Width":3.4,"Petal.Length":1.4,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.4,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.4,"Sepal.Width":2.9,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.9,"Sepal.Width":3.1,"Petal.Length":1.5,"Petal.Width":0.1,"Species":"setosa"},{"Sepal.Length":5.4,"Sepal.Width":3.7,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.8,"Sepal.Width":3.4,"Petal.Length":1.6,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.8,"Sepal.Width":3,"Petal.Length":1.4,"Petal.Width":0.1,"Species":"setosa"},{"Sepal.Length":4.3,"Sepal.Width":3,"Petal.Length":1.1,"Petal.Width":0.1,"Species":"setosa"},{"Sepal.Length":5.8,"Sepal.Width":4,"Petal.Length":1.2,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.7,"Sepal.Width":4.4,"Petal.Length":1.5,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":5.4,"Sepal.Width":3.9,"Petal.Length":1.3,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.5,"Petal.Length":1.4,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":5.7,"Sepal.Width":3.8,"Petal.Length":1.7,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.8,"Petal.Length":1.5,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":5.4,"Sepal.Width":3.4,"Petal.Length":1.7,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.7,"Petal.Length":1.5,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":4.6,"Sepal.Width":3.6,"Petal.Length":1,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.3,"Petal.Length":1.7,"Petal.Width":0.5,"Species":"setosa"},{"Sepal.Length":4.8,"Sepal.Width":3.4,"Petal.Length":1.9,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3,"Petal.Length":1.6,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.4,"Petal.Length":1.6,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":5.2,"Sepal.Width":3.5,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.2,"Sepal.Width":3.4,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.7,"Sepal.Width":3.2,"Petal.Length":1.6,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.8,"Sepal.Width":3.1,"Petal.Length":1.6,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.4,"Sepal.Width":3.4,"Petal.Length":1.5,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":5.2,"Sepal.Width":4.1,"Petal.Length":1.5,"Petal.Width":0.1,"Species":"setosa"},{"Sepal.Length":5.5,"Sepal.Width":4.2,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.9,"Sepal.Width":3.1,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.2,"Petal.Length":1.2,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.5,"Sepal.Width":3.5,"Petal.Length":1.3,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.9,"Sepal.Width":3.6,"Petal.Length":1.4,"Petal.Width":0.1,"Species":"setosa"},{"Sepal.Length":4.4,"Sepal.Width":3,"Petal.Length":1.3,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.4,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.5,"Petal.Length":1.3,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":4.5,"Sepal.Width":2.3,"Petal.Length":1.3,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":4.4,"Sepal.Width":3.2,"Petal.Length":1.3,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.5,"Petal.Length":1.6,"Petal.Width":0.6,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.8,"Petal.Length":1.9,"Petal.Width":0.4,"Species":"setosa"},{"Sepal.Length":4.8,"Sepal.Width":3,"Petal.Length":1.4,"Petal.Width":0.3,"Species":"setosa"},{"Sepal.Length":5.1,"Sepal.Width":3.8,"Petal.Length":1.6,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":4.6,"Sepal.Width":3.2,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5.3,"Sepal.Width":3.7,"Petal.Length":1.5,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":5,"Sepal.Width":3.3,"Petal.Length":1.4,"Petal.Width":0.2,"Species":"setosa"},{"Sepal.Length":7,"Sepal.Width":3.2,"Petal.Length":4.7,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":6.4,"Sepal.Width":3.2,"Petal.Length":4.5,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":6.9,"Sepal.Width":3.1,"Petal.Length":4.9,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":5.5,"Sepal.Width":2.3,"Petal.Length":4,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.5,"Sepal.Width":2.8,"Petal.Length":4.6,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":5.7,"Sepal.Width":2.8,"Petal.Length":4.5,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.3,"Sepal.Width":3.3,"Petal.Length":4.7,"Petal.Width":1.6,"Species":"versicolor"},{"Sepal.Length":4.9,"Sepal.Width":2.4,"Petal.Length":3.3,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":6.6,"Sepal.Width":2.9,"Petal.Length":4.6,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.2,"Sepal.Width":2.7,"Petal.Length":3.9,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":5,"Sepal.Width":2,"Petal.Length":3.5,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":5.9,"Sepal.Width":3,"Petal.Length":4.2,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":6,"Sepal.Width":2.2,"Petal.Length":4,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":6.1,"Sepal.Width":2.9,"Petal.Length":4.7,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":5.6,"Sepal.Width":2.9,"Petal.Length":3.6,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.7,"Sepal.Width":3.1,"Petal.Length":4.4,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":5.6,"Sepal.Width":3,"Petal.Length":4.5,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":5.8,"Sepal.Width":2.7,"Petal.Length":4.1,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":6.2,"Sepal.Width":2.2,"Petal.Length":4.5,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":5.6,"Sepal.Width":2.5,"Petal.Length":3.9,"Petal.Width":1.1,"Species":"versicolor"},{"Sepal.Length":5.9,"Sepal.Width":3.2,"Petal.Length":4.8,"Petal.Width":1.8,"Species":"versicolor"},{"Sepal.Length":6.1,"Sepal.Width":2.8,"Petal.Length":4,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.3,"Sepal.Width":2.5,"Petal.Length":4.9,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":6.1,"Sepal.Width":2.8,"Petal.Length":4.7,"Petal.Width":1.2,"Species":"versicolor"},{"Sepal.Length":6.4,"Sepal.Width":2.9,"Petal.Length":4.3,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.6,"Sepal.Width":3,"Petal.Length":4.4,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":6.8,"Sepal.Width":2.8,"Petal.Length":4.8,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":6.7,"Sepal.Width":3,"Petal.Length":5,"Petal.Width":1.7,"Species":"versicolor"},{"Sepal.Length":6,"Sepal.Width":2.9,"Petal.Length":4.5,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":5.7,"Sepal.Width":2.6,"Petal.Length":3.5,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":5.5,"Sepal.Width":2.4,"Petal.Length":3.8,"Petal.Width":1.1,"Species":"versicolor"},{"Sepal.Length":5.5,"Sepal.Width":2.4,"Petal.Length":3.7,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":5.8,"Sepal.Width":2.7,"Petal.Length":3.9,"Petal.Width":1.2,"Species":"versicolor"},{"Sepal.Length":6,"Sepal.Width":2.7,"Petal.Length":5.1,"Petal.Width":1.6,"Species":"versicolor"},{"Sepal.Length":5.4,"Sepal.Width":3,"Petal.Length":4.5,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":6,"Sepal.Width":3.4,"Petal.Length":4.5,"Petal.Width":1.6,"Species":"versicolor"},{"Sepal.Length":6.7,"Sepal.Width":3.1,"Petal.Length":4.7,"Petal.Width":1.5,"Species":"versicolor"},{"Sepal.Length":6.3,"Sepal.Width":2.3,"Petal.Length":4.4,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.6,"Sepal.Width":3,"Petal.Length":4.1,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.5,"Sepal.Width":2.5,"Petal.Length":4,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.5,"Sepal.Width":2.6,"Petal.Length":4.4,"Petal.Width":1.2,"Species":"versicolor"},{"Sepal.Length":6.1,"Sepal.Width":3,"Petal.Length":4.6,"Petal.Width":1.4,"Species":"versicolor"},{"Sepal.Length":5.8,"Sepal.Width":2.6,"Petal.Length":4,"Petal.Width":1.2,"Species":"versicolor"},{"Sepal.Length":5,"Sepal.Width":2.3,"Petal.Length":3.3,"Petal.Width":1,"Species":"versicolor"},{"Sepal.Length":5.6,"Sepal.Width":2.7,"Petal.Length":4.2,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.7,"Sepal.Width":3,"Petal.Length":4.2,"Petal.Width":1.2,"Species":"versicolor"},{"Sepal.Length":5.7,"Sepal.Width":2.9,"Petal.Length":4.2,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.2,"Sepal.Width":2.9,"Petal.Length":4.3,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":5.1,"Sepal.Width":2.5,"Petal.Length":3,"Petal.Width":1.1,"Species":"versicolor"},{"Sepal.Length":5.7,"Sepal.Width":2.8,"Petal.Length":4.1,"Petal.Width":1.3,"Species":"versicolor"},{"Sepal.Length":6.3,"Sepal.Width":3.3,"Petal.Length":6,"Petal.Width":2.5,"Species":"virginica"},{"Sepal.Length":5.8,"Sepal.Width":2.7,"Petal.Length":5.1,"Petal.Width":1.9,"Species":"virginica"},{"Sepal.Length":7.1,"Sepal.Width":3,"Petal.Length":5.9,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":6.3,"Sepal.Width":2.9,"Petal.Length":5.6,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.5,"Sepal.Width":3,"Petal.Length":5.8,"Petal.Width":2.2,"Species":"virginica"},{"Sepal.Length":7.6,"Sepal.Width":3,"Petal.Length":6.6,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":4.9,"Sepal.Width":2.5,"Petal.Length":4.5,"Petal.Width":1.7,"Species":"virginica"},{"Sepal.Length":7.3,"Sepal.Width":2.9,"Petal.Length":6.3,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.7,"Sepal.Width":2.5,"Petal.Length":5.8,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":7.2,"Sepal.Width":3.6,"Petal.Length":6.1,"Petal.Width":2.5,"Species":"virginica"},{"Sepal.Length":6.5,"Sepal.Width":3.2,"Petal.Length":5.1,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":6.4,"Sepal.Width":2.7,"Petal.Length":5.3,"Petal.Width":1.9,"Species":"virginica"},{"Sepal.Length":6.8,"Sepal.Width":3,"Petal.Length":5.5,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":5.7,"Sepal.Width":2.5,"Petal.Length":5,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":5.8,"Sepal.Width":2.8,"Petal.Length":5.1,"Petal.Width":2.4,"Species":"virginica"},{"Sepal.Length":6.4,"Sepal.Width":3.2,"Petal.Length":5.3,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":6.5,"Sepal.Width":3,"Petal.Length":5.5,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":7.7,"Sepal.Width":3.8,"Petal.Length":6.7,"Petal.Width":2.2,"Species":"virginica"},{"Sepal.Length":7.7,"Sepal.Width":2.6,"Petal.Length":6.9,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":6,"Sepal.Width":2.2,"Petal.Length":5,"Petal.Width":1.5,"Species":"virginica"},{"Sepal.Length":6.9,"Sepal.Width":3.2,"Petal.Length":5.7,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":5.6,"Sepal.Width":2.8,"Petal.Length":4.9,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":7.7,"Sepal.Width":2.8,"Petal.Length":6.7,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":6.3,"Sepal.Width":2.7,"Petal.Length":4.9,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.7,"Sepal.Width":3.3,"Petal.Length":5.7,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":7.2,"Sepal.Width":3.2,"Petal.Length":6,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.2,"Sepal.Width":2.8,"Petal.Length":4.8,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.1,"Sepal.Width":3,"Petal.Length":4.9,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.4,"Sepal.Width":2.8,"Petal.Length":5.6,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":7.2,"Sepal.Width":3,"Petal.Length":5.8,"Petal.Width":1.6,"Species":"virginica"},{"Sepal.Length":7.4,"Sepal.Width":2.8,"Petal.Length":6.1,"Petal.Width":1.9,"Species":"virginica"},{"Sepal.Length":7.9,"Sepal.Width":3.8,"Petal.Length":6.4,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":6.4,"Sepal.Width":2.8,"Petal.Length":5.6,"Petal.Width":2.2,"Species":"virginica"},{"Sepal.Length":6.3,"Sepal.Width":2.8,"Petal.Length":5.1,"Petal.Width":1.5,"Species":"virginica"},{"Sepal.Length":6.1,"Sepal.Width":2.6,"Petal.Length":5.6,"Petal.Width":1.4,"Species":"virginica"},{"Sepal.Length":7.7,"Sepal.Width":3,"Petal.Length":6.1,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":6.3,"Sepal.Width":3.4,"Petal.Length":5.6,"Petal.Width":2.4,"Species":"virginica"},{"Sepal.Length":6.4,"Sepal.Width":3.1,"Petal.Length":5.5,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6,"Sepal.Width":3,"Petal.Length":4.8,"Petal.Width":1.8,"Species":"virginica"},{"Sepal.Length":6.9,"Sepal.Width":3.1,"Petal.Length":5.4,"Petal.Width":2.1,"Species":"virginica"},{"Sepal.Length":6.7,"Sepal.Width":3.1,"Petal.Length":5.6,"Petal.Width":2.4,"Species":"virginica"},{"Sepal.Length":6.9,"Sepal.Width":3.1,"Petal.Length":5.1,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":5.8,"Sepal.Width":2.7,"Petal.Length":5.1,"Petal.Width":1.9,"Species":"virginica"},{"Sepal.Length":6.8,"Sepal.Width":3.2,"Petal.Length":5.9,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":6.7,"Sepal.Width":3.3,"Petal.Length":5.7,"Petal.Width":2.5,"Species":"virginica"},{"Sepal.Length":6.7,"Sepal.Width":3,"Petal.Length":5.2,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":6.3,"Sepal.Width":2.5,"Petal.Length":5,"Petal.Width":1.9,"Species":"virginica"},{"Sepal.Length":6.5,"Sepal.Width":3,"Petal.Length":5.2,"Petal.Width":2,"Species":"virginica"},{"Sepal.Length":6.2,"Sepal.Width":3.4,"Petal.Length":5.4,"Petal.Width":2.3,"Species":"virginica"},{"Sepal.Length":5.9,"Sepal.Width":3,"Petal.Length":5.1,"Petal.Width":1.8,"Species":"virginica"}] 2 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.1.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.1 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(['#modernizr:after{content:"',l,'";visibility:hidden}'].join(""),function(b){a=b.offsetHeight>=1}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); 9 | 10 | /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 11 | (function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/js/vendor/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); -------------------------------------------------------------------------------- /libraries/frameworks/bootstrap/css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.1.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | .clearfix { 12 | *zoom: 1; 13 | } 14 | 15 | .clearfix:before, 16 | .clearfix:after { 17 | display: table; 18 | line-height: 0; 19 | content: ""; 20 | } 21 | 22 | .clearfix:after { 23 | clear: both; 24 | } 25 | 26 | .hide-text { 27 | font: 0/0 a; 28 | color: transparent; 29 | text-shadow: none; 30 | background-color: transparent; 31 | border: 0; 32 | } 33 | 34 | .input-block-level { 35 | display: block; 36 | width: 100%; 37 | min-height: 30px; 38 | -webkit-box-sizing: border-box; 39 | -moz-box-sizing: border-box; 40 | box-sizing: border-box; 41 | } 42 | 43 | .hidden { 44 | display: none; 45 | visibility: hidden; 46 | } 47 | 48 | .visible-phone { 49 | display: none !important; 50 | } 51 | 52 | .visible-tablet { 53 | display: none !important; 54 | } 55 | 56 | .hidden-desktop { 57 | display: none !important; 58 | } 59 | 60 | .visible-desktop { 61 | display: inherit !important; 62 | } 63 | 64 | @media (min-width: 768px) and (max-width: 979px) { 65 | .hidden-desktop { 66 | display: inherit !important; 67 | } 68 | .visible-desktop { 69 | display: none !important ; 70 | } 71 | .visible-tablet { 72 | display: inherit !important; 73 | } 74 | .hidden-tablet { 75 | display: none !important; 76 | } 77 | } 78 | 79 | @media (max-width: 767px) { 80 | .hidden-desktop { 81 | display: inherit !important; 82 | } 83 | .visible-desktop { 84 | display: none !important; 85 | } 86 | .visible-phone { 87 | display: inherit !important; 88 | } 89 | .hidden-phone { 90 | display: none !important; 91 | } 92 | } 93 | 94 | @media (min-width: 1200px) { 95 | .row { 96 | margin-left: -30px; 97 | *zoom: 1; 98 | } 99 | .row:before, 100 | .row:after { 101 | display: table; 102 | line-height: 0; 103 | content: ""; 104 | } 105 | .row:after { 106 | clear: both; 107 | } 108 | [class*="span"] { 109 | float: left; 110 | min-height: 1px; 111 | margin-left: 30px; 112 | } 113 | .container, 114 | .navbar-static-top .container, 115 | .navbar-fixed-top .container, 116 | .navbar-fixed-bottom .container { 117 | width: 1170px; 118 | } 119 | .span12 { 120 | width: 1170px; 121 | } 122 | .span11 { 123 | width: 1070px; 124 | } 125 | .span10 { 126 | width: 970px; 127 | } 128 | .span9 { 129 | width: 870px; 130 | } 131 | .span8 { 132 | width: 770px; 133 | } 134 | .span7 { 135 | width: 670px; 136 | } 137 | .span6 { 138 | width: 570px; 139 | } 140 | .span5 { 141 | width: 470px; 142 | } 143 | .span4 { 144 | width: 370px; 145 | } 146 | .span3 { 147 | width: 270px; 148 | } 149 | .span2 { 150 | width: 170px; 151 | } 152 | .span1 { 153 | width: 70px; 154 | } 155 | .offset12 { 156 | margin-left: 1230px; 157 | } 158 | .offset11 { 159 | margin-left: 1130px; 160 | } 161 | .offset10 { 162 | margin-left: 1030px; 163 | } 164 | .offset9 { 165 | margin-left: 930px; 166 | } 167 | .offset8 { 168 | margin-left: 830px; 169 | } 170 | .offset7 { 171 | margin-left: 730px; 172 | } 173 | .offset6 { 174 | margin-left: 630px; 175 | } 176 | .offset5 { 177 | margin-left: 530px; 178 | } 179 | .offset4 { 180 | margin-left: 430px; 181 | } 182 | .offset3 { 183 | margin-left: 330px; 184 | } 185 | .offset2 { 186 | margin-left: 230px; 187 | } 188 | .offset1 { 189 | margin-left: 130px; 190 | } 191 | .row-fluid { 192 | width: 100%; 193 | *zoom: 1; 194 | } 195 | .row-fluid:before, 196 | .row-fluid:after { 197 | display: table; 198 | line-height: 0; 199 | content: ""; 200 | } 201 | .row-fluid:after { 202 | clear: both; 203 | } 204 | .row-fluid [class*="span"] { 205 | display: block; 206 | float: left; 207 | width: 100%; 208 | min-height: 30px; 209 | margin-left: 2.564102564102564%; 210 | *margin-left: 2.5109110747408616%; 211 | -webkit-box-sizing: border-box; 212 | -moz-box-sizing: border-box; 213 | box-sizing: border-box; 214 | } 215 | .row-fluid [class*="span"]:first-child { 216 | margin-left: 0; 217 | } 218 | .row-fluid .span12 { 219 | width: 100%; 220 | *width: 99.94680851063829%; 221 | } 222 | .row-fluid .span11 { 223 | width: 91.45299145299145%; 224 | *width: 91.39979996362975%; 225 | } 226 | .row-fluid .span10 { 227 | width: 82.90598290598291%; 228 | *width: 82.8527914166212%; 229 | } 230 | .row-fluid .span9 { 231 | width: 74.35897435897436%; 232 | *width: 74.30578286961266%; 233 | } 234 | .row-fluid .span8 { 235 | width: 65.81196581196582%; 236 | *width: 65.75877432260411%; 237 | } 238 | .row-fluid .span7 { 239 | width: 57.26495726495726%; 240 | *width: 57.21176577559556%; 241 | } 242 | .row-fluid .span6 { 243 | width: 48.717948717948715%; 244 | *width: 48.664757228587014%; 245 | } 246 | .row-fluid .span5 { 247 | width: 40.17094017094017%; 248 | *width: 40.11774868157847%; 249 | } 250 | .row-fluid .span4 { 251 | width: 31.623931623931625%; 252 | *width: 31.570740134569924%; 253 | } 254 | .row-fluid .span3 { 255 | width: 23.076923076923077%; 256 | *width: 23.023731587561375%; 257 | } 258 | .row-fluid .span2 { 259 | width: 14.52991452991453%; 260 | *width: 14.476723040552828%; 261 | } 262 | .row-fluid .span1 { 263 | width: 5.982905982905983%; 264 | *width: 5.929714493544281%; 265 | } 266 | .row-fluid .offset12 { 267 | margin-left: 105.12820512820512%; 268 | *margin-left: 105.02182214948171%; 269 | } 270 | .row-fluid .offset12:first-child { 271 | margin-left: 102.56410256410257%; 272 | *margin-left: 102.45771958537915%; 273 | } 274 | .row-fluid .offset11 { 275 | margin-left: 96.58119658119658%; 276 | *margin-left: 96.47481360247316%; 277 | } 278 | .row-fluid .offset11:first-child { 279 | margin-left: 94.01709401709402%; 280 | *margin-left: 93.91071103837061%; 281 | } 282 | .row-fluid .offset10 { 283 | margin-left: 88.03418803418803%; 284 | *margin-left: 87.92780505546462%; 285 | } 286 | .row-fluid .offset10:first-child { 287 | margin-left: 85.47008547008548%; 288 | *margin-left: 85.36370249136206%; 289 | } 290 | .row-fluid .offset9 { 291 | margin-left: 79.48717948717949%; 292 | *margin-left: 79.38079650845607%; 293 | } 294 | .row-fluid .offset9:first-child { 295 | margin-left: 76.92307692307693%; 296 | *margin-left: 76.81669394435352%; 297 | } 298 | .row-fluid .offset8 { 299 | margin-left: 70.94017094017094%; 300 | *margin-left: 70.83378796144753%; 301 | } 302 | .row-fluid .offset8:first-child { 303 | margin-left: 68.37606837606839%; 304 | *margin-left: 68.26968539734497%; 305 | } 306 | .row-fluid .offset7 { 307 | margin-left: 62.393162393162385%; 308 | *margin-left: 62.28677941443899%; 309 | } 310 | .row-fluid .offset7:first-child { 311 | margin-left: 59.82905982905982%; 312 | *margin-left: 59.72267685033642%; 313 | } 314 | .row-fluid .offset6 { 315 | margin-left: 53.84615384615384%; 316 | *margin-left: 53.739770867430444%; 317 | } 318 | .row-fluid .offset6:first-child { 319 | margin-left: 51.28205128205128%; 320 | *margin-left: 51.175668303327875%; 321 | } 322 | .row-fluid .offset5 { 323 | margin-left: 45.299145299145295%; 324 | *margin-left: 45.1927623204219%; 325 | } 326 | .row-fluid .offset5:first-child { 327 | margin-left: 42.73504273504273%; 328 | *margin-left: 42.62865975631933%; 329 | } 330 | .row-fluid .offset4 { 331 | margin-left: 36.75213675213675%; 332 | *margin-left: 36.645753773413354%; 333 | } 334 | .row-fluid .offset4:first-child { 335 | margin-left: 34.18803418803419%; 336 | *margin-left: 34.081651209310785%; 337 | } 338 | .row-fluid .offset3 { 339 | margin-left: 28.205128205128204%; 340 | *margin-left: 28.0987452264048%; 341 | } 342 | .row-fluid .offset3:first-child { 343 | margin-left: 25.641025641025642%; 344 | *margin-left: 25.53464266230224%; 345 | } 346 | .row-fluid .offset2 { 347 | margin-left: 19.65811965811966%; 348 | *margin-left: 19.551736679396257%; 349 | } 350 | .row-fluid .offset2:first-child { 351 | margin-left: 17.094017094017094%; 352 | *margin-left: 16.98763411529369%; 353 | } 354 | .row-fluid .offset1 { 355 | margin-left: 11.11111111111111%; 356 | *margin-left: 11.004728132387708%; 357 | } 358 | .row-fluid .offset1:first-child { 359 | margin-left: 8.547008547008547%; 360 | *margin-left: 8.440625568285142%; 361 | } 362 | input, 363 | textarea, 364 | .uneditable-input { 365 | margin-left: 0; 366 | } 367 | .controls-row [class*="span"] + [class*="span"] { 368 | margin-left: 30px; 369 | } 370 | input.span12, 371 | textarea.span12, 372 | .uneditable-input.span12 { 373 | width: 1156px; 374 | } 375 | input.span11, 376 | textarea.span11, 377 | .uneditable-input.span11 { 378 | width: 1056px; 379 | } 380 | input.span10, 381 | textarea.span10, 382 | .uneditable-input.span10 { 383 | width: 956px; 384 | } 385 | input.span9, 386 | textarea.span9, 387 | .uneditable-input.span9 { 388 | width: 856px; 389 | } 390 | input.span8, 391 | textarea.span8, 392 | .uneditable-input.span8 { 393 | width: 756px; 394 | } 395 | input.span7, 396 | textarea.span7, 397 | .uneditable-input.span7 { 398 | width: 656px; 399 | } 400 | input.span6, 401 | textarea.span6, 402 | .uneditable-input.span6 { 403 | width: 556px; 404 | } 405 | input.span5, 406 | textarea.span5, 407 | .uneditable-input.span5 { 408 | width: 456px; 409 | } 410 | input.span4, 411 | textarea.span4, 412 | .uneditable-input.span4 { 413 | width: 356px; 414 | } 415 | input.span3, 416 | textarea.span3, 417 | .uneditable-input.span3 { 418 | width: 256px; 419 | } 420 | input.span2, 421 | textarea.span2, 422 | .uneditable-input.span2 { 423 | width: 156px; 424 | } 425 | input.span1, 426 | textarea.span1, 427 | .uneditable-input.span1 { 428 | width: 56px; 429 | } 430 | .thumbnails { 431 | margin-left: -30px; 432 | } 433 | .thumbnails > li { 434 | margin-left: 30px; 435 | } 436 | .row-fluid .thumbnails { 437 | margin-left: 0; 438 | } 439 | } 440 | 441 | @media (min-width: 768px) and (max-width: 979px) { 442 | .row { 443 | margin-left: -20px; 444 | *zoom: 1; 445 | } 446 | .row:before, 447 | .row:after { 448 | display: table; 449 | line-height: 0; 450 | content: ""; 451 | } 452 | .row:after { 453 | clear: both; 454 | } 455 | [class*="span"] { 456 | float: left; 457 | min-height: 1px; 458 | margin-left: 20px; 459 | } 460 | .container, 461 | .navbar-static-top .container, 462 | .navbar-fixed-top .container, 463 | .navbar-fixed-bottom .container { 464 | width: 724px; 465 | } 466 | .span12 { 467 | width: 724px; 468 | } 469 | .span11 { 470 | width: 662px; 471 | } 472 | .span10 { 473 | width: 600px; 474 | } 475 | .span9 { 476 | width: 538px; 477 | } 478 | .span8 { 479 | width: 476px; 480 | } 481 | .span7 { 482 | width: 414px; 483 | } 484 | .span6 { 485 | width: 352px; 486 | } 487 | .span5 { 488 | width: 290px; 489 | } 490 | .span4 { 491 | width: 228px; 492 | } 493 | .span3 { 494 | width: 166px; 495 | } 496 | .span2 { 497 | width: 104px; 498 | } 499 | .span1 { 500 | width: 42px; 501 | } 502 | .offset12 { 503 | margin-left: 764px; 504 | } 505 | .offset11 { 506 | margin-left: 702px; 507 | } 508 | .offset10 { 509 | margin-left: 640px; 510 | } 511 | .offset9 { 512 | margin-left: 578px; 513 | } 514 | .offset8 { 515 | margin-left: 516px; 516 | } 517 | .offset7 { 518 | margin-left: 454px; 519 | } 520 | .offset6 { 521 | margin-left: 392px; 522 | } 523 | .offset5 { 524 | margin-left: 330px; 525 | } 526 | .offset4 { 527 | margin-left: 268px; 528 | } 529 | .offset3 { 530 | margin-left: 206px; 531 | } 532 | .offset2 { 533 | margin-left: 144px; 534 | } 535 | .offset1 { 536 | margin-left: 82px; 537 | } 538 | .row-fluid { 539 | width: 100%; 540 | *zoom: 1; 541 | } 542 | .row-fluid:before, 543 | .row-fluid:after { 544 | display: table; 545 | line-height: 0; 546 | content: ""; 547 | } 548 | .row-fluid:after { 549 | clear: both; 550 | } 551 | .row-fluid [class*="span"] { 552 | display: block; 553 | float: left; 554 | width: 100%; 555 | min-height: 30px; 556 | margin-left: 2.7624309392265194%; 557 | *margin-left: 2.709239449864817%; 558 | -webkit-box-sizing: border-box; 559 | -moz-box-sizing: border-box; 560 | box-sizing: border-box; 561 | } 562 | .row-fluid [class*="span"]:first-child { 563 | margin-left: 0; 564 | } 565 | .row-fluid .span12 { 566 | width: 100%; 567 | *width: 99.94680851063829%; 568 | } 569 | .row-fluid .span11 { 570 | width: 91.43646408839778%; 571 | *width: 91.38327259903608%; 572 | } 573 | .row-fluid .span10 { 574 | width: 82.87292817679558%; 575 | *width: 82.81973668743387%; 576 | } 577 | .row-fluid .span9 { 578 | width: 74.30939226519337%; 579 | *width: 74.25620077583166%; 580 | } 581 | .row-fluid .span8 { 582 | width: 65.74585635359117%; 583 | *width: 65.69266486422946%; 584 | } 585 | .row-fluid .span7 { 586 | width: 57.18232044198895%; 587 | *width: 57.12912895262725%; 588 | } 589 | .row-fluid .span6 { 590 | width: 48.61878453038674%; 591 | *width: 48.56559304102504%; 592 | } 593 | .row-fluid .span5 { 594 | width: 40.05524861878453%; 595 | *width: 40.00205712942283%; 596 | } 597 | .row-fluid .span4 { 598 | width: 31.491712707182323%; 599 | *width: 31.43852121782062%; 600 | } 601 | .row-fluid .span3 { 602 | width: 22.92817679558011%; 603 | *width: 22.87498530621841%; 604 | } 605 | .row-fluid .span2 { 606 | width: 14.3646408839779%; 607 | *width: 14.311449394616199%; 608 | } 609 | .row-fluid .span1 { 610 | width: 5.801104972375691%; 611 | *width: 5.747913483013988%; 612 | } 613 | .row-fluid .offset12 { 614 | margin-left: 105.52486187845304%; 615 | *margin-left: 105.41847889972962%; 616 | } 617 | .row-fluid .offset12:first-child { 618 | margin-left: 102.76243093922652%; 619 | *margin-left: 102.6560479605031%; 620 | } 621 | .row-fluid .offset11 { 622 | margin-left: 96.96132596685082%; 623 | *margin-left: 96.8549429881274%; 624 | } 625 | .row-fluid .offset11:first-child { 626 | margin-left: 94.1988950276243%; 627 | *margin-left: 94.09251204890089%; 628 | } 629 | .row-fluid .offset10 { 630 | margin-left: 88.39779005524862%; 631 | *margin-left: 88.2914070765252%; 632 | } 633 | .row-fluid .offset10:first-child { 634 | margin-left: 85.6353591160221%; 635 | *margin-left: 85.52897613729868%; 636 | } 637 | .row-fluid .offset9 { 638 | margin-left: 79.8342541436464%; 639 | *margin-left: 79.72787116492299%; 640 | } 641 | .row-fluid .offset9:first-child { 642 | margin-left: 77.07182320441989%; 643 | *margin-left: 76.96544022569647%; 644 | } 645 | .row-fluid .offset8 { 646 | margin-left: 71.2707182320442%; 647 | *margin-left: 71.16433525332079%; 648 | } 649 | .row-fluid .offset8:first-child { 650 | margin-left: 68.50828729281768%; 651 | *margin-left: 68.40190431409427%; 652 | } 653 | .row-fluid .offset7 { 654 | margin-left: 62.70718232044199%; 655 | *margin-left: 62.600799341718584%; 656 | } 657 | .row-fluid .offset7:first-child { 658 | margin-left: 59.94475138121547%; 659 | *margin-left: 59.838368402492065%; 660 | } 661 | .row-fluid .offset6 { 662 | margin-left: 54.14364640883978%; 663 | *margin-left: 54.037263430116376%; 664 | } 665 | .row-fluid .offset6:first-child { 666 | margin-left: 51.38121546961326%; 667 | *margin-left: 51.27483249088986%; 668 | } 669 | .row-fluid .offset5 { 670 | margin-left: 45.58011049723757%; 671 | *margin-left: 45.47372751851417%; 672 | } 673 | .row-fluid .offset5:first-child { 674 | margin-left: 42.81767955801105%; 675 | *margin-left: 42.71129657928765%; 676 | } 677 | .row-fluid .offset4 { 678 | margin-left: 37.01657458563536%; 679 | *margin-left: 36.91019160691196%; 680 | } 681 | .row-fluid .offset4:first-child { 682 | margin-left: 34.25414364640884%; 683 | *margin-left: 34.14776066768544%; 684 | } 685 | .row-fluid .offset3 { 686 | margin-left: 28.45303867403315%; 687 | *margin-left: 28.346655695309746%; 688 | } 689 | .row-fluid .offset3:first-child { 690 | margin-left: 25.69060773480663%; 691 | *margin-left: 25.584224756083227%; 692 | } 693 | .row-fluid .offset2 { 694 | margin-left: 19.88950276243094%; 695 | *margin-left: 19.783119783707537%; 696 | } 697 | .row-fluid .offset2:first-child { 698 | margin-left: 17.12707182320442%; 699 | *margin-left: 17.02068884448102%; 700 | } 701 | .row-fluid .offset1 { 702 | margin-left: 11.32596685082873%; 703 | *margin-left: 11.219583872105325%; 704 | } 705 | .row-fluid .offset1:first-child { 706 | margin-left: 8.56353591160221%; 707 | *margin-left: 8.457152932878806%; 708 | } 709 | input, 710 | textarea, 711 | .uneditable-input { 712 | margin-left: 0; 713 | } 714 | .controls-row [class*="span"] + [class*="span"] { 715 | margin-left: 20px; 716 | } 717 | input.span12, 718 | textarea.span12, 719 | .uneditable-input.span12 { 720 | width: 710px; 721 | } 722 | input.span11, 723 | textarea.span11, 724 | .uneditable-input.span11 { 725 | width: 648px; 726 | } 727 | input.span10, 728 | textarea.span10, 729 | .uneditable-input.span10 { 730 | width: 586px; 731 | } 732 | input.span9, 733 | textarea.span9, 734 | .uneditable-input.span9 { 735 | width: 524px; 736 | } 737 | input.span8, 738 | textarea.span8, 739 | .uneditable-input.span8 { 740 | width: 462px; 741 | } 742 | input.span7, 743 | textarea.span7, 744 | .uneditable-input.span7 { 745 | width: 400px; 746 | } 747 | input.span6, 748 | textarea.span6, 749 | .uneditable-input.span6 { 750 | width: 338px; 751 | } 752 | input.span5, 753 | textarea.span5, 754 | .uneditable-input.span5 { 755 | width: 276px; 756 | } 757 | input.span4, 758 | textarea.span4, 759 | .uneditable-input.span4 { 760 | width: 214px; 761 | } 762 | input.span3, 763 | textarea.span3, 764 | .uneditable-input.span3 { 765 | width: 152px; 766 | } 767 | input.span2, 768 | textarea.span2, 769 | .uneditable-input.span2 { 770 | width: 90px; 771 | } 772 | input.span1, 773 | textarea.span1, 774 | .uneditable-input.span1 { 775 | width: 28px; 776 | } 777 | } 778 | 779 | @media (max-width: 767px) { 780 | body { 781 | padding-right: 20px; 782 | padding-left: 20px; 783 | } 784 | .navbar-fixed-top, 785 | .navbar-fixed-bottom, 786 | .navbar-static-top { 787 | margin-right: -20px; 788 | margin-left: -20px; 789 | } 790 | .container-fluid { 791 | padding: 0; 792 | } 793 | .dl-horizontal dt { 794 | float: none; 795 | width: auto; 796 | clear: none; 797 | text-align: left; 798 | } 799 | .dl-horizontal dd { 800 | margin-left: 0; 801 | } 802 | .container { 803 | width: auto; 804 | } 805 | .row-fluid { 806 | width: 100%; 807 | } 808 | .row, 809 | .thumbnails { 810 | margin-left: 0; 811 | } 812 | .thumbnails > li { 813 | float: none; 814 | margin-left: 0; 815 | } 816 | [class*="span"], 817 | .row-fluid [class*="span"] { 818 | display: block; 819 | float: none; 820 | width: 100%; 821 | margin-left: 0; 822 | -webkit-box-sizing: border-box; 823 | -moz-box-sizing: border-box; 824 | box-sizing: border-box; 825 | } 826 | .span12, 827 | .row-fluid .span12 { 828 | width: 100%; 829 | -webkit-box-sizing: border-box; 830 | -moz-box-sizing: border-box; 831 | box-sizing: border-box; 832 | } 833 | .input-large, 834 | .input-xlarge, 835 | .input-xxlarge, 836 | input[class*="span"], 837 | select[class*="span"], 838 | textarea[class*="span"], 839 | .uneditable-input { 840 | display: block; 841 | width: 100%; 842 | min-height: 30px; 843 | -webkit-box-sizing: border-box; 844 | -moz-box-sizing: border-box; 845 | box-sizing: border-box; 846 | } 847 | .input-prepend input, 848 | .input-append input, 849 | .input-prepend input[class*="span"], 850 | .input-append input[class*="span"] { 851 | display: inline-block; 852 | width: auto; 853 | } 854 | .controls-row [class*="span"] + [class*="span"] { 855 | margin-left: 0; 856 | } 857 | .modal { 858 | position: fixed; 859 | top: 20px; 860 | right: 20px; 861 | left: 20px; 862 | width: auto; 863 | margin: 0; 864 | } 865 | .modal.fade.in { 866 | top: auto; 867 | } 868 | } 869 | 870 | @media (max-width: 480px) { 871 | .nav-collapse { 872 | -webkit-transform: translate3d(0, 0, 0); 873 | } 874 | .page-header h1 small { 875 | display: block; 876 | line-height: 20px; 877 | } 878 | input[type="checkbox"], 879 | input[type="radio"] { 880 | border: 1px solid #ccc; 881 | } 882 | .form-horizontal .control-label { 883 | float: none; 884 | width: auto; 885 | padding-top: 0; 886 | text-align: left; 887 | } 888 | .form-horizontal .controls { 889 | margin-left: 0; 890 | } 891 | .form-horizontal .control-list { 892 | padding-top: 0; 893 | } 894 | .form-horizontal .form-actions { 895 | padding-right: 10px; 896 | padding-left: 10px; 897 | } 898 | .modal { 899 | top: 10px; 900 | right: 10px; 901 | left: 10px; 902 | } 903 | .modal-header .close { 904 | padding: 10px; 905 | margin: -10px; 906 | } 907 | .carousel-caption { 908 | position: static; 909 | } 910 | } 911 | 912 | @media (max-width: 979px) { 913 | body { 914 | padding-top: 0; 915 | } 916 | .navbar-fixed-top, 917 | .navbar-fixed-bottom { 918 | position: static; 919 | } 920 | .navbar-fixed-top { 921 | margin-bottom: 20px; 922 | } 923 | .navbar-fixed-bottom { 924 | margin-top: 20px; 925 | } 926 | .navbar-fixed-top .navbar-inner, 927 | .navbar-fixed-bottom .navbar-inner { 928 | padding: 5px; 929 | } 930 | .navbar .container { 931 | width: auto; 932 | padding: 0; 933 | } 934 | .navbar .brand { 935 | padding-right: 10px; 936 | padding-left: 10px; 937 | margin: 0 0 0 -5px; 938 | } 939 | .nav-collapse { 940 | clear: both; 941 | } 942 | .nav-collapse .nav { 943 | float: none; 944 | margin: 0 0 10px; 945 | } 946 | .nav-collapse .nav > li { 947 | float: none; 948 | } 949 | .nav-collapse .nav > li > a { 950 | margin-bottom: 2px; 951 | } 952 | .nav-collapse .nav > .divider-vertical { 953 | display: none; 954 | } 955 | .nav-collapse .nav .nav-header { 956 | color: #777777; 957 | text-shadow: none; 958 | } 959 | .nav-collapse .nav > li > a, 960 | .nav-collapse .dropdown-menu a { 961 | padding: 9px 15px; 962 | font-weight: bold; 963 | color: #777777; 964 | -webkit-border-radius: 3px; 965 | -moz-border-radius: 3px; 966 | border-radius: 3px; 967 | } 968 | .nav-collapse .btn { 969 | padding: 4px 10px 4px; 970 | font-weight: normal; 971 | -webkit-border-radius: 4px; 972 | -moz-border-radius: 4px; 973 | border-radius: 4px; 974 | } 975 | .nav-collapse .dropdown-menu li + li a { 976 | margin-bottom: 2px; 977 | } 978 | .nav-collapse .nav > li > a:hover, 979 | .nav-collapse .dropdown-menu a:hover { 980 | background-color: #f2f2f2; 981 | } 982 | .navbar-inverse .nav-collapse .nav > li > a:hover, 983 | .navbar-inverse .nav-collapse .dropdown-menu a:hover { 984 | background-color: #111111; 985 | } 986 | .nav-collapse.in .btn-group { 987 | padding: 0; 988 | margin-top: 5px; 989 | } 990 | .nav-collapse .dropdown-menu { 991 | position: static; 992 | top: auto; 993 | left: auto; 994 | display: block; 995 | float: none; 996 | max-width: none; 997 | padding: 0; 998 | margin: 0 15px; 999 | background-color: transparent; 1000 | border: none; 1001 | -webkit-border-radius: 0; 1002 | -moz-border-radius: 0; 1003 | border-radius: 0; 1004 | -webkit-box-shadow: none; 1005 | -moz-box-shadow: none; 1006 | box-shadow: none; 1007 | } 1008 | .nav-collapse .dropdown-menu:before, 1009 | .nav-collapse .dropdown-menu:after { 1010 | display: none; 1011 | } 1012 | .nav-collapse .dropdown-menu .divider { 1013 | display: none; 1014 | } 1015 | .nav-collapse .nav > li > .dropdown-menu:before, 1016 | .nav-collapse .nav > li > .dropdown-menu:after { 1017 | display: none; 1018 | } 1019 | .nav-collapse .navbar-form, 1020 | .nav-collapse .navbar-search { 1021 | float: none; 1022 | padding: 10px 15px; 1023 | margin: 10px 0; 1024 | border-top: 1px solid #f2f2f2; 1025 | border-bottom: 1px solid #f2f2f2; 1026 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1027 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1028 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1029 | } 1030 | .navbar-inverse .nav-collapse .navbar-form, 1031 | .navbar-inverse .nav-collapse .navbar-search { 1032 | border-top-color: #111111; 1033 | border-bottom-color: #111111; 1034 | } 1035 | .navbar .nav-collapse .nav.pull-right { 1036 | float: none; 1037 | margin-left: 0; 1038 | } 1039 | .nav-collapse, 1040 | .nav-collapse.collapse { 1041 | height: 0; 1042 | overflow: hidden; 1043 | } 1044 | .navbar .btn-navbar { 1045 | display: block; 1046 | } 1047 | .navbar-static .navbar-inner { 1048 | padding-right: 10px; 1049 | padding-left: 10px; 1050 | } 1051 | } 1052 | 1053 | @media (min-width: 980px) { 1054 | .nav-collapse.collapse { 1055 | height: auto !important; 1056 | overflow: visible !important; 1057 | } 1058 | } 1059 | -------------------------------------------------------------------------------- /js/crossfilter.js: -------------------------------------------------------------------------------- 1 | (function(exports){ 2 | crossfilter.version = "1.2.0"; 3 | function crossfilter_identity(d) { 4 | return d; 5 | } 6 | crossfilter.permute = permute; 7 | 8 | function permute(array, index) { 9 | for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) { 10 | copy[i] = array[index[i]]; 11 | } 12 | return copy; 13 | } 14 | var bisect = crossfilter.bisect = bisect_by(crossfilter_identity); 15 | 16 | bisect.by = bisect_by; 17 | 18 | function bisect_by(f) { 19 | 20 | // Locate the insertion point for x in a to maintain sorted order. The 21 | // arguments lo and hi may be used to specify a subset of the array which 22 | // should be considered; by default the entire array is used. If x is already 23 | // present in a, the insertion point will be before (to the left of) any 24 | // existing entries. The return value is suitable for use as the first 25 | // argument to `array.splice` assuming that a is already sorted. 26 | // 27 | // The returned insertion point i partitions the array a into two halves so 28 | // that all v < x for v in a[lo:i] for the left side and all v >= x for v in 29 | // a[i:hi] for the right side. 30 | function bisectLeft(a, x, lo, hi) { 31 | while (lo < hi) { 32 | var mid = lo + hi >>> 1; 33 | if (f(a[mid]) < x) lo = mid + 1; 34 | else hi = mid; 35 | } 36 | return lo; 37 | } 38 | 39 | // Similar to bisectLeft, but returns an insertion point which comes after (to 40 | // the right of) any existing entries of x in a. 41 | // 42 | // The returned insertion point i partitions the array into two halves so that 43 | // all v <= x for v in a[lo:i] for the left side and all v > x for v in 44 | // a[i:hi] for the right side. 45 | function bisectRight(a, x, lo, hi) { 46 | while (lo < hi) { 47 | var mid = lo + hi >>> 1; 48 | if (x < f(a[mid])) hi = mid; 49 | else lo = mid + 1; 50 | } 51 | return lo; 52 | } 53 | 54 | bisectRight.right = bisectRight; 55 | bisectRight.left = bisectLeft; 56 | return bisectRight; 57 | } 58 | var heap = crossfilter.heap = heap_by(crossfilter_identity); 59 | 60 | heap.by = heap_by; 61 | 62 | function heap_by(f) { 63 | 64 | // Builds a binary heap within the specified array a[lo:hi]. The heap has the 65 | // property such that the parent a[lo+i] is always less than or equal to its 66 | // two children: a[lo+2*i+1] and a[lo+2*i+2]. 67 | function heap(a, lo, hi) { 68 | var n = hi - lo, 69 | i = (n >>> 1) + 1; 70 | while (--i > 0) sift(a, i, n, lo); 71 | return a; 72 | } 73 | 74 | // Sorts the specified array a[lo:hi] in descending order, assuming it is 75 | // already a heap. 76 | function sort(a, lo, hi) { 77 | var n = hi - lo, 78 | t; 79 | while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo); 80 | return a; 81 | } 82 | 83 | // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous 84 | // slice of array a[lo:lo+n]. This method can also be used to update the heap 85 | // incrementally, without incurring the full cost of reconstructing the heap. 86 | function sift(a, i, n, lo) { 87 | var d = a[--lo + i], 88 | x = f(d), 89 | child; 90 | while ((child = i << 1) <= n) { 91 | if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++; 92 | if (x <= f(a[lo + child])) break; 93 | a[lo + i] = a[lo + child]; 94 | i = child; 95 | } 96 | a[lo + i] = d; 97 | } 98 | 99 | heap.sort = sort; 100 | return heap; 101 | } 102 | var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity); 103 | 104 | heapselect.by = heapselect_by; 105 | 106 | function heapselect_by(f) { 107 | var heap = heap_by(f); 108 | 109 | // Returns a new array containing the top k elements in the array a[lo:hi]. 110 | // The returned array is not sorted, but maintains the heap property. If k is 111 | // greater than hi - lo, then fewer than k elements will be returned. The 112 | // order of elements in a is unchanged by this operation. 113 | function heapselect(a, lo, hi, k) { 114 | var queue = new Array(k = Math.min(hi - lo, k)), 115 | min, 116 | i, 117 | x, 118 | d; 119 | 120 | for (i = 0; i < k; ++i) queue[i] = a[lo++]; 121 | heap(queue, 0, k); 122 | 123 | if (lo < hi) { 124 | min = f(queue[0]); 125 | do { 126 | if (x = f(d = a[lo]) > min) { 127 | queue[0] = d; 128 | min = f(heap(queue, 0, k)[0]); 129 | } 130 | } while (++lo < hi); 131 | } 132 | 133 | return queue; 134 | } 135 | 136 | return heapselect; 137 | } 138 | var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity); 139 | 140 | insertionsort.by = insertionsort_by; 141 | 142 | function insertionsort_by(f) { 143 | 144 | function insertionsort(a, lo, hi) { 145 | for (var i = lo + 1; i < hi; ++i) { 146 | for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) { 147 | a[j] = a[j - 1]; 148 | } 149 | a[j] = t; 150 | } 151 | return a; 152 | } 153 | 154 | return insertionsort; 155 | } 156 | // Algorithm designed by Vladimir Yaroslavskiy. 157 | // Implementation based on the Dart project; see lib/dart/LICENSE for details. 158 | 159 | var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity); 160 | 161 | quicksort.by = quicksort_by; 162 | 163 | function quicksort_by(f) { 164 | var insertionsort = insertionsort_by(f); 165 | 166 | function sort(a, lo, hi) { 167 | return (hi - lo < quicksort_sizeThreshold 168 | ? insertionsort 169 | : quicksort)(a, lo, hi); 170 | } 171 | 172 | function quicksort(a, lo, hi) { 173 | // Compute the two pivots by looking at 5 elements. 174 | var sixth = (hi - lo) / 6 | 0, 175 | i1 = lo + sixth, 176 | i5 = hi - 1 - sixth, 177 | i3 = lo + hi - 1 >> 1, // The midpoint. 178 | i2 = i3 - sixth, 179 | i4 = i3 + sixth; 180 | 181 | var e1 = a[i1], x1 = f(e1), 182 | e2 = a[i2], x2 = f(e2), 183 | e3 = a[i3], x3 = f(e3), 184 | e4 = a[i4], x4 = f(e4), 185 | e5 = a[i5], x5 = f(e5); 186 | 187 | var t; 188 | 189 | // Sort the selected 5 elements using a sorting network. 190 | if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t; 191 | if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; 192 | if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t; 193 | if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; 194 | if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t; 195 | if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t; 196 | if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t; 197 | if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t; 198 | if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t; 199 | 200 | var pivot1 = e2, pivotValue1 = x2, 201 | pivot2 = e4, pivotValue2 = x4; 202 | 203 | // e2 and e4 have been saved in the pivot variables. They will be written 204 | // back, once the partitioning is finished. 205 | a[i1] = e1; 206 | a[i2] = a[lo]; 207 | a[i3] = e3; 208 | a[i4] = a[hi - 1]; 209 | a[i5] = e5; 210 | 211 | var less = lo + 1, // First element in the middle partition. 212 | great = hi - 2; // Last element in the middle partition. 213 | 214 | // Note that for value comparison, <, <=, >= and > coerce to a primitive via 215 | // Object.prototype.valueOf; == and === do not, so in order to be consistent 216 | // with natural order (such as for Date objects), we must do two compares. 217 | var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2; 218 | if (pivotsEqual) { 219 | 220 | // Degenerated case where the partitioning becomes a dutch national flag 221 | // problem. 222 | // 223 | // [ | < pivot | == pivot | unpartitioned | > pivot | ] 224 | // ^ ^ ^ ^ ^ 225 | // left less k great right 226 | // 227 | // a[left] and a[right] are undefined and are filled after the 228 | // partitioning. 229 | // 230 | // Invariants: 231 | // 1) for x in ]left, less[ : x < pivot. 232 | // 2) for x in [less, k[ : x == pivot. 233 | // 3) for x in ]great, right[ : x > pivot. 234 | for (var k = less; k <= great; ++k) { 235 | var ek = a[k], xk = f(ek); 236 | if (xk < pivotValue1) { 237 | if (k !== less) { 238 | a[k] = a[less]; 239 | a[less] = ek; 240 | } 241 | ++less; 242 | } else if (xk > pivotValue1) { 243 | 244 | // Find the first element <= pivot in the range [k - 1, great] and 245 | // put [:ek:] there. We know that such an element must exist: 246 | // When k == less, then el3 (which is equal to pivot) lies in the 247 | // interval. Otherwise a[k - 1] == pivot and the search stops at k-1. 248 | // Note that in the latter case invariant 2 will be violated for a 249 | // short amount of time. The invariant will be restored when the 250 | // pivots are put into their final positions. 251 | while (true) { 252 | var greatValue = f(a[great]); 253 | if (greatValue > pivotValue1) { 254 | great--; 255 | // This is the only location in the while-loop where a new 256 | // iteration is started. 257 | continue; 258 | } else if (greatValue < pivotValue1) { 259 | // Triple exchange. 260 | a[k] = a[less]; 261 | a[less++] = a[great]; 262 | a[great--] = ek; 263 | break; 264 | } else { 265 | a[k] = a[great]; 266 | a[great--] = ek; 267 | // Note: if great < k then we will exit the outer loop and fix 268 | // invariant 2 (which we just violated). 269 | break; 270 | } 271 | } 272 | } 273 | } 274 | } else { 275 | 276 | // We partition the list into three parts: 277 | // 1. < pivot1 278 | // 2. >= pivot1 && <= pivot2 279 | // 3. > pivot2 280 | // 281 | // During the loop we have: 282 | // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ] 283 | // ^ ^ ^ ^ ^ 284 | // left less k great right 285 | // 286 | // a[left] and a[right] are undefined and are filled after the 287 | // partitioning. 288 | // 289 | // Invariants: 290 | // 1. for x in ]left, less[ : x < pivot1 291 | // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2 292 | // 3. for x in ]great, right[ : x > pivot2 293 | for (var k = less; k <= great; k++) { 294 | var ek = a[k], xk = f(ek); 295 | if (xk < pivotValue1) { 296 | if (k !== less) { 297 | a[k] = a[less]; 298 | a[less] = ek; 299 | } 300 | ++less; 301 | } else { 302 | if (xk > pivotValue2) { 303 | while (true) { 304 | var greatValue = f(a[great]); 305 | if (greatValue > pivotValue2) { 306 | great--; 307 | if (great < k) break; 308 | // This is the only location inside the loop where a new 309 | // iteration is started. 310 | continue; 311 | } else { 312 | // a[great] <= pivot2. 313 | if (greatValue < pivotValue1) { 314 | // Triple exchange. 315 | a[k] = a[less]; 316 | a[less++] = a[great]; 317 | a[great--] = ek; 318 | } else { 319 | // a[great] >= pivot1. 320 | a[k] = a[great]; 321 | a[great--] = ek; 322 | } 323 | break; 324 | } 325 | } 326 | } 327 | } 328 | } 329 | } 330 | 331 | // Move pivots into their final positions. 332 | // We shrunk the list from both sides (a[left] and a[right] have 333 | // meaningless values in them) and now we move elements from the first 334 | // and third partition into these locations so that we can store the 335 | // pivots. 336 | a[lo] = a[less - 1]; 337 | a[less - 1] = pivot1; 338 | a[hi - 1] = a[great + 1]; 339 | a[great + 1] = pivot2; 340 | 341 | // The list is now partitioned into three partitions: 342 | // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ] 343 | // ^ ^ ^ ^ 344 | // left less great right 345 | 346 | // Recursive descent. (Don't include the pivot values.) 347 | sort(a, lo, less - 1); 348 | sort(a, great + 2, hi); 349 | 350 | if (pivotsEqual) { 351 | // All elements in the second partition are equal to the pivot. No 352 | // need to sort them. 353 | return a; 354 | } 355 | 356 | // In theory it should be enough to call _doSort recursively on the second 357 | // partition. 358 | // The Android source however removes the pivot elements from the recursive 359 | // call if the second partition is too large (more than 2/3 of the list). 360 | if (less < i1 && great > i5) { 361 | var lessValue, greatValue; 362 | while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less; 363 | while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great; 364 | 365 | // Copy paste of the previous 3-way partitioning with adaptions. 366 | // 367 | // We partition the list into three parts: 368 | // 1. == pivot1 369 | // 2. > pivot1 && < pivot2 370 | // 3. == pivot2 371 | // 372 | // During the loop we have: 373 | // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ] 374 | // ^ ^ ^ 375 | // less k great 376 | // 377 | // Invariants: 378 | // 1. for x in [ *, less[ : x == pivot1 379 | // 2. for x in [less, k[ : pivot1 < x && x < pivot2 380 | // 3. for x in ]great, * ] : x == pivot2 381 | for (var k = less; k <= great; k++) { 382 | var ek = a[k], xk = f(ek); 383 | if (xk <= pivotValue1 && xk >= pivotValue1) { 384 | if (k !== less) { 385 | a[k] = a[less]; 386 | a[less] = ek; 387 | } 388 | less++; 389 | } else { 390 | if (xk <= pivotValue2 && xk >= pivotValue2) { 391 | while (true) { 392 | var greatValue = f(a[great]); 393 | if (greatValue <= pivotValue2 && greatValue >= pivotValue2) { 394 | great--; 395 | if (great < k) break; 396 | // This is the only location inside the loop where a new 397 | // iteration is started. 398 | continue; 399 | } else { 400 | // a[great] < pivot2. 401 | if (greatValue < pivotValue1) { 402 | // Triple exchange. 403 | a[k] = a[less]; 404 | a[less++] = a[great]; 405 | a[great--] = ek; 406 | } else { 407 | // a[great] == pivot1. 408 | a[k] = a[great]; 409 | a[great--] = ek; 410 | } 411 | break; 412 | } 413 | } 414 | } 415 | } 416 | } 417 | } 418 | 419 | // The second partition has now been cleared of pivot elements and looks 420 | // as follows: 421 | // [ * | > pivot1 && < pivot2 | * ] 422 | // ^ ^ 423 | // less great 424 | // Sort the second partition using recursive descent. 425 | 426 | // The second partition looks as follows: 427 | // [ * | >= pivot1 && <= pivot2 | * ] 428 | // ^ ^ 429 | // less great 430 | // Simply sort it by recursive descent. 431 | 432 | return sort(a, less, great + 1); 433 | } 434 | 435 | return sort; 436 | } 437 | 438 | var quicksort_sizeThreshold = 32; 439 | var crossfilter_array8 = crossfilter_arrayUntyped, 440 | crossfilter_array16 = crossfilter_arrayUntyped, 441 | crossfilter_array32 = crossfilter_arrayUntyped, 442 | crossfilter_arrayLengthen = crossfilter_identity, 443 | crossfilter_arrayWiden = crossfilter_identity; 444 | 445 | if (typeof Uint8Array !== "undefined") { 446 | crossfilter_array8 = function(n) { return new Uint8Array(n); }; 447 | crossfilter_array16 = function(n) { return new Uint16Array(n); }; 448 | crossfilter_array32 = function(n) { return new Uint32Array(n); }; 449 | 450 | crossfilter_arrayLengthen = function(array, length) { 451 | var copy = new array.constructor(length); 452 | copy.set(array); 453 | return copy; 454 | }; 455 | 456 | crossfilter_arrayWiden = function(array, width) { 457 | var copy; 458 | switch (width) { 459 | case 16: copy = crossfilter_array16(array.length); break; 460 | case 32: copy = crossfilter_array32(array.length); break; 461 | default: throw new Error("invalid array width!"); 462 | } 463 | copy.set(array); 464 | return copy; 465 | }; 466 | } 467 | 468 | function crossfilter_arrayUntyped(n) { 469 | return new Array(n); 470 | } 471 | function crossfilter_filterExact(bisect, value) { 472 | return function(values) { 473 | var n = values.length; 474 | return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)]; 475 | }; 476 | } 477 | 478 | function crossfilter_filterRange(bisect, range) { 479 | var min = range[0], 480 | max = range[1]; 481 | return function(values) { 482 | var n = values.length; 483 | return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)]; 484 | }; 485 | } 486 | 487 | function crossfilter_filterAll(values) { 488 | return [0, values.length]; 489 | } 490 | function crossfilter_null() { 491 | return null; 492 | } 493 | function crossfilter_zero() { 494 | return 0; 495 | } 496 | function crossfilter_reduceIncrement(p) { 497 | return p + 1; 498 | } 499 | 500 | function crossfilter_reduceDecrement(p) { 501 | return p - 1; 502 | } 503 | 504 | function crossfilter_reduceAdd(f) { 505 | return function(p, v) { 506 | return p + +f(v); 507 | }; 508 | } 509 | 510 | function crossfilter_reduceSubtract(f) { 511 | return function(p, v) { 512 | return p - f(v); 513 | }; 514 | } 515 | exports.crossfilter = crossfilter; 516 | 517 | function crossfilter() { 518 | var crossfilter = { 519 | add: add, 520 | dimension: dimension, 521 | groupAll: groupAll, 522 | size: size 523 | }; 524 | 525 | var data = [], // the records 526 | n = 0, // the number of records; data.length 527 | m = 0, // a bit mask representing which dimensions are in use 528 | M = 8, // number of dimensions that can fit in `filters` 529 | filters = crossfilter_array8(0), // M bits per record; 1 is filtered out 530 | filterListeners = [], // when the filters change 531 | dataListeners = []; // when data is added 532 | 533 | // Adds the specified new records to this crossfilter. 534 | function add(newData) { 535 | var n0 = n, 536 | n1 = newData.length; 537 | 538 | // If there's actually new data to add… 539 | // Merge the new data into the existing data. 540 | // Lengthen the filter bitset to handle the new records. 541 | // Notify listeners (dimensions and groups) that new data is available. 542 | if (n1) { 543 | data = data.concat(newData); 544 | filters = crossfilter_arrayLengthen(filters, n += n1); 545 | dataListeners.forEach(function(l) { l(newData, n0, n1); }); 546 | } 547 | 548 | return crossfilter; 549 | } 550 | 551 | // Adds a new dimension with the specified value accessor function. 552 | function dimension(value) { 553 | var dimension = { 554 | filter: filter, 555 | filterExact: filterExact, 556 | filterRange: filterRange, 557 | filterFunction: filterFunction, 558 | filterAll: filterAll, 559 | top: top, 560 | bottom: bottom, 561 | group: group, 562 | groupAll: groupAll, 563 | remove: remove 564 | }; 565 | 566 | var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000 567 | zero = ~one, // inverted one, e.g., 11110111 568 | values, // sorted, cached array 569 | index, // value rank ↦ object id 570 | newValues, // temporary array storing newly-added values 571 | newIndex, // temporary array storing newly-added index 572 | sort = quicksort_by(function(i) { return newValues[i]; }), 573 | refilter = crossfilter_filterAll, // for recomputing filter 574 | refilterFunction, // the custom filter function in use 575 | indexListeners = [], // when data is added 576 | dimensionGroups = [], 577 | lo0 = 0, 578 | hi0 = 0; 579 | 580 | // Updating a dimension is a two-stage process. First, we must update the 581 | // associated filters for the newly-added records. Once all dimensions have 582 | // updated their filters, the groups are notified to update. 583 | dataListeners.unshift(preAdd); 584 | dataListeners.push(postAdd); 585 | 586 | // Incorporate any existing data into this dimension, and make sure that the 587 | // filter bitset is wide enough to handle the new dimension. 588 | m |= one; 589 | if (M >= 32 ? !one : m & (1 << M) - 1) { 590 | filters = crossfilter_arrayWiden(filters, M <<= 1); 591 | } 592 | preAdd(data, 0, n); 593 | postAdd(data, 0, n); 594 | 595 | // Incorporates the specified new records into this dimension. 596 | // This function is responsible for updating filters, values, and index. 597 | function preAdd(newData, n0, n1) { 598 | 599 | // Permute new values into natural order using a sorted index. 600 | newValues = newData.map(value); 601 | newIndex = sort(crossfilter_range(n1), 0, n1); 602 | newValues = permute(newValues, newIndex); 603 | 604 | // Bisect newValues to determine which new records are selected. 605 | var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i, k; 606 | if (refilterFunction) { 607 | for (i = 0; i < n1; ++i) { 608 | if (!refilterFunction(newValues[i], k = newIndex[i] + n0)) filters[k] |= one; 609 | } 610 | } else { 611 | for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one; 612 | for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one; 613 | } 614 | 615 | // If this dimension previously had no data, then we don't need to do the 616 | // more expensive merge operation; use the new values and index as-is. 617 | if (!n0) { 618 | values = newValues; 619 | index = newIndex; 620 | lo0 = lo1; 621 | hi0 = hi1; 622 | return; 623 | } 624 | 625 | var oldValues = values, 626 | oldIndex = index, 627 | i0 = 0, 628 | i1 = 0; 629 | 630 | // Otherwise, create new arrays into which to merge new and old. 631 | values = new Array(n); 632 | index = crossfilter_index(n, n); 633 | 634 | // Merge the old and new sorted values, and old and new index. 635 | for (i = 0; i0 < n0 && i1 < n1; ++i) { 636 | if (oldValues[i0] < newValues[i1]) { 637 | values[i] = oldValues[i0]; 638 | index[i] = oldIndex[i0++]; 639 | } else { 640 | values[i] = newValues[i1]; 641 | index[i] = newIndex[i1++] + n0; 642 | } 643 | } 644 | 645 | // Add any remaining old values. 646 | for (; i0 < n0; ++i0, ++i) { 647 | values[i] = oldValues[i0]; 648 | index[i] = oldIndex[i0]; 649 | } 650 | 651 | // Add any remaining new values. 652 | for (; i1 < n1; ++i1, ++i) { 653 | values[i] = newValues[i1]; 654 | index[i] = newIndex[i1] + n0; 655 | } 656 | 657 | // Bisect again to recompute lo0 and hi0. 658 | bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1]; 659 | } 660 | 661 | // When all filters have updated, notify index listeners of the new values. 662 | function postAdd(newData, n0, n1) { 663 | indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); }); 664 | newValues = newIndex = null; 665 | } 666 | 667 | // Updates the selected values based on the specified bounds [lo, hi]. 668 | // This implementation is used by all the public filter methods. 669 | function filterIndexBounds(bounds) { 670 | var lo1 = bounds[0], 671 | hi1 = bounds[1]; 672 | 673 | if (refilterFunction) { 674 | refilterFunction = null; 675 | filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; }); 676 | lo0 = lo1; 677 | hi0 = hi1; 678 | return dimension; 679 | } 680 | 681 | var i, 682 | j, 683 | k, 684 | added = [], 685 | removed = []; 686 | 687 | // Fast incremental update based on previous lo index. 688 | if (lo1 < lo0) { 689 | for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) { 690 | filters[k = index[i]] ^= one; 691 | added.push(k); 692 | } 693 | } else if (lo1 > lo0) { 694 | for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) { 695 | filters[k = index[i]] ^= one; 696 | removed.push(k); 697 | } 698 | } 699 | 700 | // Fast incremental update based on previous hi index. 701 | if (hi1 > hi0) { 702 | for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) { 703 | filters[k = index[i]] ^= one; 704 | added.push(k); 705 | } 706 | } else if (hi1 < hi0) { 707 | for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) { 708 | filters[k = index[i]] ^= one; 709 | removed.push(k); 710 | } 711 | } 712 | 713 | lo0 = lo1; 714 | hi0 = hi1; 715 | filterListeners.forEach(function(l) { l(one, added, removed); }); 716 | return dimension; 717 | } 718 | 719 | // Filters this dimension using the specified range, value, or null. 720 | // If the range is null, this is equivalent to filterAll. 721 | // If the range is an array, this is equivalent to filterRange. 722 | // Otherwise, this is equivalent to filterExact. 723 | function filter(range) { 724 | return range == null 725 | ? filterAll() : Array.isArray(range) 726 | ? filterRange(range) : typeof range === "function" 727 | ? filterFunction(range) 728 | : filterExact(range); 729 | } 730 | 731 | // Filters this dimension to select the exact value. 732 | function filterExact(value) { 733 | return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values)); 734 | } 735 | 736 | // Filters this dimension to select the specified range [lo, hi]. 737 | // The lower bound is inclusive, and the upper bound is exclusive. 738 | function filterRange(range) { 739 | return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values)); 740 | } 741 | 742 | // Clears any filters on this dimension. 743 | function filterAll() { 744 | return filterIndexBounds((refilter = crossfilter_filterAll)(values)); 745 | } 746 | 747 | // Filters this dimension using an arbitrary function. 748 | function filterFunction(f) { 749 | refilter = crossfilter_filterAll; 750 | 751 | filterIndexFunction(refilterFunction = f); 752 | 753 | lo0 = 0; 754 | hi0 = n; 755 | 756 | return dimension; 757 | } 758 | 759 | function filterIndexFunction(f) { 760 | var i, 761 | k, 762 | x, 763 | added = [], 764 | removed = []; 765 | 766 | for (i = 0; i < n; ++i) { 767 | if (!(filters[k = index[i]] & one) ^ (x = f(values[i], k))) { 768 | if (x) filters[k] &= zero, added.push(k); 769 | else filters[k] |= one, removed.push(k); 770 | } 771 | } 772 | filterListeners.forEach(function(l) { l(one, added, removed); }); 773 | } 774 | 775 | // Returns the top K selected records based on this dimension's order. 776 | // Note: observes this dimension's filter, unlike group and groupAll. 777 | function top(k) { 778 | var array = [], 779 | i = hi0, 780 | j; 781 | 782 | while (--i >= lo0 && k > 0) { 783 | if (!filters[j = index[i]]) { 784 | array.push(data[j]); 785 | --k; 786 | } 787 | } 788 | 789 | return array; 790 | } 791 | 792 | // Returns the bottom K selected records based on this dimension's order. 793 | // Note: observes this dimension's filter, unlike group and groupAll. 794 | function bottom(k) { 795 | var array = [], 796 | i = lo0, 797 | j; 798 | 799 | while (i < hi0 && k > 0) { 800 | if (!filters[j = index[i]]) { 801 | array.push(data[j]); 802 | --k; 803 | } 804 | i++; 805 | } 806 | 807 | return array; 808 | } 809 | 810 | // Adds a new group to this dimension, using the specified key function. 811 | function group(key) { 812 | var group = { 813 | top: top, 814 | all: all, 815 | reduce: reduce, 816 | reduceCount: reduceCount, 817 | reduceSum: reduceSum, 818 | order: order, 819 | orderNatural: orderNatural, 820 | size: size, 821 | remove: remove 822 | }; 823 | 824 | // Ensure that this group will be removed when the dimension is removed. 825 | dimensionGroups.push(group); 826 | 827 | var groups, // array of {key, value} 828 | groupIndex, // object id ↦ group id 829 | groupWidth = 8, 830 | groupCapacity = crossfilter_capacity(groupWidth), 831 | k = 0, // cardinality 832 | select, 833 | heap, 834 | reduceAdd, 835 | reduceRemove, 836 | reduceInitial, 837 | update = crossfilter_null, 838 | reset = crossfilter_null, 839 | resetNeeded = true; 840 | 841 | if (arguments.length < 1) key = crossfilter_identity; 842 | 843 | // The group listens to the crossfilter for when any dimension changes, so 844 | // that it can update the associated reduce values. It must also listen to 845 | // the parent dimension for when data is added, and compute new keys. 846 | filterListeners.push(update); 847 | indexListeners.push(add); 848 | 849 | // Incorporate any existing data into the grouping. 850 | add(values, index, 0, n); 851 | 852 | // Incorporates the specified new values into this group. 853 | // This function is responsible for updating groups and groupIndex. 854 | function add(newValues, newIndex, n0, n1) { 855 | var oldGroups = groups, 856 | reIndex = crossfilter_index(k, groupCapacity), 857 | add = reduceAdd, 858 | initial = reduceInitial, 859 | k0 = k, // old cardinality 860 | i0 = 0, // index of old group 861 | i1 = 0, // index of new record 862 | j, // object id 863 | g0, // old group 864 | x0, // old key 865 | x1, // new key 866 | g, // group to add 867 | x; // key of group to add 868 | 869 | // If a reset is needed, we don't need to update the reduce values. 870 | if (resetNeeded) add = initial = crossfilter_null; 871 | 872 | // Reset the new groups (k is a lower bound). 873 | // Also, make sure that groupIndex exists and is long enough. 874 | groups = new Array(k), k = 0; 875 | groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity); 876 | 877 | // Get the first old key (x0 of g0), if it exists. 878 | if (k0) x0 = (g0 = oldGroups[0]).key; 879 | 880 | // Find the first new key (x1), skipping NaN keys. 881 | while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1; 882 | 883 | // While new keys remain… 884 | while (i1 < n1) { 885 | 886 | // Determine the lesser of the two current keys; new and old. 887 | // If there are no old keys remaining, then always add the new key. 888 | if (g0 && x0 <= x1) { 889 | g = g0, x = x0; 890 | 891 | // Record the new index of the old group. 892 | reIndex[i0] = k; 893 | 894 | // Retrieve the next old key. 895 | if (g0 = oldGroups[++i0]) x0 = g0.key; 896 | } else { 897 | g = {key: x1, value: initial()}, x = x1; 898 | } 899 | 900 | // Add the lesser group. 901 | groups[k] = g; 902 | 903 | // Add any selected records belonging to the added group, while 904 | // advancing the new key and populating the associated group index. 905 | while (!(x1 > x)) { 906 | groupIndex[j = newIndex[i1] + n0] = k; 907 | if (!(filters[j] & zero)) g.value = add(g.value, data[j]); 908 | if (++i1 >= n1) break; 909 | x1 = key(newValues[i1]); 910 | } 911 | 912 | groupIncrement(); 913 | } 914 | 915 | // Add any remaining old groups that were greater than all new keys. 916 | // No incremental reduce is needed; these groups have no new records. 917 | // Also record the new index of the old group. 918 | while (i0 < k0) { 919 | groups[reIndex[i0] = k] = oldGroups[i0++]; 920 | groupIncrement(); 921 | } 922 | 923 | // If we added any new groups before any old groups, 924 | // update the group index of all the old records. 925 | if (k > i0) for (i0 = 0; i0 < n0; ++i0) { 926 | groupIndex[i0] = reIndex[groupIndex[i0]]; 927 | } 928 | 929 | // Modify the update and reset behavior based on the cardinality. 930 | // If the cardinality is less than or equal to one, then the groupIndex 931 | // is not needed. If the cardinality is zero, then there are no records 932 | // and therefore no groups to update or reset. Note that we also must 933 | // change the registered listener to point to the new method. 934 | j = filterListeners.indexOf(update); 935 | if (k > 1) { 936 | update = updateMany; 937 | reset = resetMany; 938 | } else { 939 | if (k === 1) { 940 | update = updateOne; 941 | reset = resetOne; 942 | } else { 943 | update = crossfilter_null; 944 | reset = crossfilter_null; 945 | } 946 | groupIndex = null; 947 | } 948 | filterListeners[j] = update; 949 | 950 | // Count the number of added groups, 951 | // and widen the group index as needed. 952 | function groupIncrement() { 953 | if (++k === groupCapacity) { 954 | reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1); 955 | groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth); 956 | groupCapacity = crossfilter_capacity(groupWidth); 957 | } 958 | } 959 | } 960 | 961 | // Reduces the specified selected or deselected records. 962 | // This function is only used when the cardinality is greater than 1. 963 | function updateMany(filterOne, added, removed) { 964 | if (filterOne === one || resetNeeded) return; 965 | 966 | var i, 967 | k, 968 | n, 969 | g; 970 | 971 | // Add the added values. 972 | for (i = 0, n = added.length; i < n; ++i) { 973 | if (!(filters[k = added[i]] & zero)) { 974 | g = groups[groupIndex[k]]; 975 | g.value = reduceAdd(g.value, data[k]); 976 | } 977 | } 978 | 979 | // Remove the removed values. 980 | for (i = 0, n = removed.length; i < n; ++i) { 981 | if ((filters[k = removed[i]] & zero) === filterOne) { 982 | g = groups[groupIndex[k]]; 983 | g.value = reduceRemove(g.value, data[k]); 984 | } 985 | } 986 | } 987 | 988 | // Reduces the specified selected or deselected records. 989 | // This function is only used when the cardinality is 1. 990 | function updateOne(filterOne, added, removed) { 991 | if (filterOne === one || resetNeeded) return; 992 | 993 | var i, 994 | k, 995 | n, 996 | g = groups[0]; 997 | 998 | // Add the added values. 999 | for (i = 0, n = added.length; i < n; ++i) { 1000 | if (!(filters[k = added[i]] & zero)) { 1001 | g.value = reduceAdd(g.value, data[k]); 1002 | } 1003 | } 1004 | 1005 | // Remove the removed values. 1006 | for (i = 0, n = removed.length; i < n; ++i) { 1007 | if ((filters[k = removed[i]] & zero) === filterOne) { 1008 | g.value = reduceRemove(g.value, data[k]); 1009 | } 1010 | } 1011 | } 1012 | 1013 | // Recomputes the group reduce values from scratch. 1014 | // This function is only used when the cardinality is greater than 1. 1015 | function resetMany() { 1016 | var i, 1017 | g; 1018 | 1019 | // Reset all group values. 1020 | for (i = 0; i < k; ++i) { 1021 | groups[i].value = reduceInitial(); 1022 | } 1023 | 1024 | // Add any selected records. 1025 | for (i = 0; i < n; ++i) { 1026 | if (!(filters[i] & zero)) { 1027 | g = groups[groupIndex[i]]; 1028 | g.value = reduceAdd(g.value, data[i]); 1029 | } 1030 | } 1031 | } 1032 | 1033 | // Recomputes the group reduce values from scratch. 1034 | // This function is only used when the cardinality is 1. 1035 | function resetOne() { 1036 | var i, 1037 | g = groups[0]; 1038 | 1039 | // Reset the singleton group values. 1040 | g.value = reduceInitial(); 1041 | 1042 | // Add any selected records. 1043 | for (i = 0; i < n; ++i) { 1044 | if (!(filters[i] & zero)) { 1045 | g.value = reduceAdd(g.value, data[i]); 1046 | } 1047 | } 1048 | } 1049 | 1050 | // Returns the array of group values, in the dimension's natural order. 1051 | function all() { 1052 | if (resetNeeded) reset(), resetNeeded = false; 1053 | return groups; 1054 | } 1055 | 1056 | // Returns a new array containing the top K group values, in reduce order. 1057 | function top(k) { 1058 | var top = select(all(), 0, groups.length, k); 1059 | return heap.sort(top, 0, top.length); 1060 | } 1061 | 1062 | // Sets the reduce behavior for this group to use the specified functions. 1063 | // This method lazily recomputes the reduce values, waiting until needed. 1064 | function reduce(add, remove, initial) { 1065 | reduceAdd = add; 1066 | reduceRemove = remove; 1067 | reduceInitial = initial; 1068 | resetNeeded = true; 1069 | return group; 1070 | } 1071 | 1072 | // A convenience method for reducing by count. 1073 | function reduceCount() { 1074 | return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); 1075 | } 1076 | 1077 | // A convenience method for reducing by sum(value). 1078 | function reduceSum(value) { 1079 | return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); 1080 | } 1081 | 1082 | // Sets the reduce order, using the specified accessor. 1083 | function order(value) { 1084 | select = heapselect_by(valueOf); 1085 | heap = heap_by(valueOf); 1086 | function valueOf(d) { return value(d.value); } 1087 | return group; 1088 | } 1089 | 1090 | // A convenience method for natural ordering by reduce value. 1091 | function orderNatural() { 1092 | return order(crossfilter_identity); 1093 | } 1094 | 1095 | // Returns the cardinality of this group, irrespective of any filters. 1096 | function size() { 1097 | return k; 1098 | } 1099 | 1100 | // Removes this group and associated event listeners. 1101 | function remove() { 1102 | var i = filterListeners.indexOf(update); 1103 | if (i >= 0) filterListeners.splice(i, 1); 1104 | i = indexListeners.indexOf(add); 1105 | if (i >= 0) indexListeners.splice(i, 1); 1106 | return group; 1107 | } 1108 | 1109 | return reduceCount().orderNatural(); 1110 | } 1111 | 1112 | // A convenience function for generating a singleton group. 1113 | function groupAll() { 1114 | var g = group(crossfilter_null), all = g.all; 1115 | delete g.all; 1116 | delete g.top; 1117 | delete g.order; 1118 | delete g.orderNatural; 1119 | delete g.size; 1120 | g.value = function() { return all()[0].value; }; 1121 | return g; 1122 | } 1123 | 1124 | function remove() { 1125 | dimensionGroups.forEach(function(group) { group.remove(); }); 1126 | var i = dataListeners.indexOf(preAdd); 1127 | if (i >= 0) dataListeners.splice(i, 1); 1128 | i = dataListeners.indexOf(postAdd); 1129 | if (i >= 0) dataListeners.splice(i, 1); 1130 | for (i = 0; i < n; ++i) filters[i] &= zero; 1131 | m &= zero; 1132 | return dimension; 1133 | } 1134 | 1135 | return dimension; 1136 | } 1137 | 1138 | // A convenience method for groupAll on a dummy dimension. 1139 | // This implementation can be optimized since it always has cardinality 1. 1140 | function groupAll() { 1141 | var group = { 1142 | reduce: reduce, 1143 | reduceCount: reduceCount, 1144 | reduceSum: reduceSum, 1145 | value: value, 1146 | remove: remove 1147 | }; 1148 | 1149 | var reduceValue, 1150 | reduceAdd, 1151 | reduceRemove, 1152 | reduceInitial, 1153 | resetNeeded = true; 1154 | 1155 | // The group listens to the crossfilter for when any dimension changes, so 1156 | // that it can update the reduce value. It must also listen to the parent 1157 | // dimension for when data is added. 1158 | filterListeners.push(update); 1159 | dataListeners.push(add); 1160 | 1161 | // For consistency; actually a no-op since resetNeeded is true. 1162 | add(data, 0, n); 1163 | 1164 | // Incorporates the specified new values into this group. 1165 | function add(newData, n0) { 1166 | var i; 1167 | 1168 | if (resetNeeded) return; 1169 | 1170 | // Add the added values. 1171 | for (i = n0; i < n; ++i) { 1172 | if (!filters[i]) { 1173 | reduceValue = reduceAdd(reduceValue, data[i]); 1174 | } 1175 | } 1176 | } 1177 | 1178 | // Reduces the specified selected or deselected records. 1179 | function update(filterOne, added, removed) { 1180 | var i, 1181 | k, 1182 | n; 1183 | 1184 | if (resetNeeded) return; 1185 | 1186 | // Add the added values. 1187 | for (i = 0, n = added.length; i < n; ++i) { 1188 | if (!filters[k = added[i]]) { 1189 | reduceValue = reduceAdd(reduceValue, data[k]); 1190 | } 1191 | } 1192 | 1193 | // Remove the removed values. 1194 | for (i = 0, n = removed.length; i < n; ++i) { 1195 | if (filters[k = removed[i]] === filterOne) { 1196 | reduceValue = reduceRemove(reduceValue, data[k]); 1197 | } 1198 | } 1199 | } 1200 | 1201 | // Recomputes the group reduce value from scratch. 1202 | function reset() { 1203 | var i; 1204 | 1205 | reduceValue = reduceInitial(); 1206 | 1207 | for (i = 0; i < n; ++i) { 1208 | if (!filters[i]) { 1209 | reduceValue = reduceAdd(reduceValue, data[i]); 1210 | } 1211 | } 1212 | } 1213 | 1214 | // Sets the reduce behavior for this group to use the specified functions. 1215 | // This method lazily recomputes the reduce value, waiting until needed. 1216 | function reduce(add, remove, initial) { 1217 | reduceAdd = add; 1218 | reduceRemove = remove; 1219 | reduceInitial = initial; 1220 | resetNeeded = true; 1221 | return group; 1222 | } 1223 | 1224 | // A convenience method for reducing by count. 1225 | function reduceCount() { 1226 | return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero); 1227 | } 1228 | 1229 | // A convenience method for reducing by sum(value). 1230 | function reduceSum(value) { 1231 | return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero); 1232 | } 1233 | 1234 | // Returns the computed reduce value. 1235 | function value() { 1236 | if (resetNeeded) reset(), resetNeeded = false; 1237 | return reduceValue; 1238 | } 1239 | 1240 | // Removes this group and associated event listeners. 1241 | function remove() { 1242 | var i = filterListeners.indexOf(update); 1243 | if (i >= 0) filterListeners.splice(i); 1244 | i = dataListeners.indexOf(add); 1245 | if (i >= 0) dataListeners.splice(i); 1246 | return group; 1247 | } 1248 | 1249 | return reduceCount(); 1250 | } 1251 | 1252 | // Returns the number of records in this crossfilter, irrespective of any filters. 1253 | function size() { 1254 | return n; 1255 | } 1256 | 1257 | return arguments.length 1258 | ? add(arguments[0]) 1259 | : crossfilter; 1260 | } 1261 | 1262 | // Returns an array of size n, big enough to store ids up to m. 1263 | function crossfilter_index(n, m) { 1264 | return (m < 0x101 1265 | ? crossfilter_array8 : m < 0x10001 1266 | ? crossfilter_array16 1267 | : crossfilter_array32)(n); 1268 | } 1269 | 1270 | // Constructs a new array of size n, with sequential values from 0 to n - 1. 1271 | function crossfilter_range(n) { 1272 | var range = crossfilter_index(n, n); 1273 | for (var i = -1; ++i < n;) range[i] = i; 1274 | return range; 1275 | } 1276 | 1277 | function crossfilter_capacity(w) { 1278 | return w === 8 1279 | ? 0x100 : w === 16 1280 | ? 0x10000 1281 | : 0x100000000; 1282 | } 1283 | })(this); 1284 | --------------------------------------------------------------------------------