mdarray-sol 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (683) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +35 -0
  3. data/LICENSE.txt~ +73 -0
  4. data/README.md +140 -0
  5. data/README.md~ +290 -0
  6. data/Rakefile +80 -0
  7. data/config.rb +223 -0
  8. data/doc/Nashorn.html +1406 -0
  9. data/doc/Sol.html +692 -0
  10. data/doc/Sol/BarChart.html +181 -0
  11. data/doc/Sol/BaseChart.html +799 -0
  12. data/doc/Sol/Bootstrap.html +1134 -0
  13. data/doc/Sol/Bridge.html +448 -0
  14. data/doc/Sol/Chart.html +1162 -0
  15. data/doc/Sol/CoordinateChart.html +673 -0
  16. data/doc/Sol/DCFX.html +807 -0
  17. data/doc/Sol/Dashboard.html +1967 -0
  18. data/doc/Sol/ExecMessages.html +332 -0
  19. data/doc/Sol/GuiCommunication.html +230 -0
  20. data/doc/Sol/Interval.html +1213 -0
  21. data/doc/Sol/JS.html +448 -0
  22. data/doc/Sol/LineChart.html +344 -0
  23. data/doc/Sol/LinearScale.html +334 -0
  24. data/doc/Sol/Margins.html +219 -0
  25. data/doc/Sol/OrdinalScale.html +263 -0
  26. data/doc/Sol/ReadBuffer.html +302 -0
  27. data/doc/Sol/Scale.html +462 -0
  28. data/doc/Sol/Stack.html +199 -0
  29. data/doc/Sol/TimeScale.html +396 -0
  30. data/doc/_index.html +362 -0
  31. data/doc/class_list.html +58 -0
  32. data/doc/css/common.css +1 -0
  33. data/doc/css/full_list.css +57 -0
  34. data/doc/css/style.css +339 -0
  35. data/doc/file.README.html +95 -0
  36. data/doc/file_list.html +60 -0
  37. data/doc/frames.html +26 -0
  38. data/doc/index.html +95 -0
  39. data/doc/js/app.js +219 -0
  40. data/doc/js/full_list.js +181 -0
  41. data/doc/js/jquery.js +4 -0
  42. data/doc/method_list.html +849 -0
  43. data/doc/top-level-namespace.html +135 -0
  44. data/examples/bar_chart/bar_chart.rb +268 -0
  45. data/examples/bar_plot.rb +96 -0
  46. data/examples/charts/area.rb +25 -0
  47. data/examples/charts/area_script.rb +69 -0
  48. data/examples/charts/env.rb +8 -0
  49. data/examples/charts/monthly-move.csv +6725 -0
  50. data/examples/charts/morley.csv +101 -0
  51. data/examples/charts/morley2.csv +81 -0
  52. data/examples/charts/morley3.csv +121 -0
  53. data/examples/d3_tutorial.rb +98 -0
  54. data/examples/sc_plot.rb +57 -0
  55. data/examples/scatterplot/axes.rb +111 -0
  56. data/examples/scatterplot/scatterplot.rb +221 -0
  57. data/examples/us_states/map.rb +90 -0
  58. data/examples/us_states/us-ag-productivity2004.csv +49 -0
  59. data/examples/us_states/us-cities.csv +51 -0
  60. data/examples/util/linear_scale.rb +83 -0
  61. data/examples/util/ordinal_scale.rb +72 -0
  62. data/init.rb +39 -0
  63. data/lib/jx/array_handler.js +70 -0
  64. data/lib/jx/callback.rb +255 -0
  65. data/lib/jx/hash_handler.js +87 -0
  66. data/lib/jx/irbobject.rb +121 -0
  67. data/lib/jx/js.rb +442 -0
  68. data/lib/jx/js_array.rb +31 -0
  69. data/lib/jx/js_hash.rb +76 -0
  70. data/lib/jx/js_init.rb +62 -0
  71. data/lib/jx/jsarray.rb +66 -0
  72. data/lib/jx/jsfunction.rb +73 -0
  73. data/lib/jx/jsobject.rb +188 -0
  74. data/lib/jx/jsstyle_sheet.rb +231 -0
  75. data/lib/jx/jsundefined.rb +46 -0
  76. data/lib/jx/proxy_array.rb +62 -0
  77. data/lib/jx/rbobject.rb +80 -0
  78. data/lib/jx/ruby_proxy.js +176 -0
  79. data/lib/jx/ruby_rich.js +70 -0
  80. data/lib/jx/sol.rb +109 -0
  81. data/lib/mdarray-sol.rb +34 -0
  82. data/lib/mdarray/jsmdarray.rb +39 -0
  83. data/lib/ruby_rich/bootstrap.rb +230 -0
  84. data/lib/ruby_rich/config.html +22 -0
  85. data/lib/ruby_rich/dashboard.rb +299 -0
  86. data/lib/ruby_rich/ruby_rich.rb +120 -0
  87. data/lib/sol/bar_chart.rb +35 -0
  88. data/lib/sol/base_chart.rb +148 -0
  89. data/lib/sol/chart.rb +138 -0
  90. data/lib/sol/coordinate_chart.rb +128 -0
  91. data/lib/sol/interval.rb +156 -0
  92. data/lib/sol/line_chart.rb +58 -0
  93. data/lib/sol/margins.rb +52 -0
  94. data/lib/sol/scale.rb +212 -0
  95. data/lib/sol/stack.rb +44 -0
  96. data/node_modules/bootstrap/Gruntfile.js +533 -0
  97. data/node_modules/bootstrap/dist/js/bootstrap.js +2363 -0
  98. data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
  99. data/node_modules/bootstrap/dist/js/npm.js +13 -0
  100. data/node_modules/bootstrap/grunt/bs-commonjs-generator.js +30 -0
  101. data/node_modules/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
  102. data/node_modules/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
  103. data/node_modules/bootstrap/grunt/bs-raw-files-generator.js +44 -0
  104. data/node_modules/bootstrap/js/affix.js +162 -0
  105. data/node_modules/bootstrap/js/alert.js +94 -0
  106. data/node_modules/bootstrap/js/button.js +120 -0
  107. data/node_modules/bootstrap/js/carousel.js +237 -0
  108. data/node_modules/bootstrap/js/collapse.js +211 -0
  109. data/node_modules/bootstrap/js/dropdown.js +165 -0
  110. data/node_modules/bootstrap/js/modal.js +337 -0
  111. data/node_modules/bootstrap/js/popover.js +108 -0
  112. data/node_modules/bootstrap/js/scrollspy.js +172 -0
  113. data/node_modules/bootstrap/js/tab.js +155 -0
  114. data/node_modules/bootstrap/js/tooltip.js +514 -0
  115. data/node_modules/bootstrap/js/transition.js +59 -0
  116. data/node_modules/chai/chai.js +6142 -0
  117. data/node_modules/chai/index.js +1 -0
  118. data/node_modules/chai/karma.conf.js +28 -0
  119. data/node_modules/chai/karma.sauce.js +41 -0
  120. data/node_modules/chai/lib/chai.js +93 -0
  121. data/node_modules/chai/lib/chai/assertion.js +131 -0
  122. data/node_modules/chai/lib/chai/config.js +55 -0
  123. data/node_modules/chai/lib/chai/core/assertions.js +1860 -0
  124. data/node_modules/chai/lib/chai/interface/assert.js +1645 -0
  125. data/node_modules/chai/lib/chai/interface/expect.js +34 -0
  126. data/node_modules/chai/lib/chai/interface/should.js +201 -0
  127. data/node_modules/chai/lib/chai/utils/addChainableMethod.js +112 -0
  128. data/node_modules/chai/lib/chai/utils/addMethod.js +44 -0
  129. data/node_modules/chai/lib/chai/utils/addProperty.js +48 -0
  130. data/node_modules/chai/lib/chai/utils/expectTypes.js +42 -0
  131. data/node_modules/chai/lib/chai/utils/flag.js +33 -0
  132. data/node_modules/chai/lib/chai/utils/getActual.js +20 -0
  133. data/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
  134. data/node_modules/chai/lib/chai/utils/getMessage.js +51 -0
  135. data/node_modules/chai/lib/chai/utils/getName.js +22 -0
  136. data/node_modules/chai/lib/chai/utils/getPathInfo.js +111 -0
  137. data/node_modules/chai/lib/chai/utils/getPathValue.js +43 -0
  138. data/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
  139. data/node_modules/chai/lib/chai/utils/hasProperty.js +64 -0
  140. data/node_modules/chai/lib/chai/utils/index.js +130 -0
  141. data/node_modules/chai/lib/chai/utils/inspect.js +335 -0
  142. data/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
  143. data/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +54 -0
  144. data/node_modules/chai/lib/chai/utils/overwriteMethod.js +52 -0
  145. data/node_modules/chai/lib/chai/utils/overwriteProperty.js +55 -0
  146. data/node_modules/chai/lib/chai/utils/test.js +28 -0
  147. data/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
  148. data/node_modules/chai/node_modules/assertion-error/index.js +116 -0
  149. data/node_modules/chai/node_modules/deep-eql/index.js +1 -0
  150. data/node_modules/chai/node_modules/deep-eql/karma.conf.js +20 -0
  151. data/node_modules/chai/node_modules/deep-eql/lib/eql.js +257 -0
  152. data/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/index.js +1 -0
  153. data/node_modules/chai/node_modules/deep-eql/node_modules/type-detect/lib/type.js +142 -0
  154. data/node_modules/chai/node_modules/type-detect/index.js +1 -0
  155. data/node_modules/chai/node_modules/type-detect/lib/type.js +134 -0
  156. data/node_modules/chai/sauce.browsers.js +128 -0
  157. data/node_modules/dc/Gruntfile.js +437 -0
  158. data/node_modules/dc/dc.js +10477 -0
  159. data/node_modules/dc/dc.min.js +23 -0
  160. data/node_modules/dc/docs/coverage.js +203 -0
  161. data/node_modules/dc/grunt/format-file-list.js +33 -0
  162. data/node_modules/dc/index.js +5 -0
  163. data/node_modules/dc/node_modules/crossfilter2/crossfilter.js +1401 -0
  164. data/node_modules/dc/node_modules/crossfilter2/crossfilter.min.js +1 -0
  165. data/node_modules/dc/node_modules/crossfilter2/index.js +1 -0
  166. data/node_modules/dc/node_modules/crossfilter2/src/array.js +46 -0
  167. data/node_modules/dc/node_modules/crossfilter2/src/bisect.js +44 -0
  168. data/node_modules/dc/node_modules/crossfilter2/src/crossfilter.js +872 -0
  169. data/node_modules/dc/node_modules/crossfilter2/src/filter.js +19 -0
  170. data/node_modules/dc/node_modules/crossfilter2/src/heap.js +44 -0
  171. data/node_modules/dc/node_modules/crossfilter2/src/heapselect.js +36 -0
  172. data/node_modules/dc/node_modules/crossfilter2/src/identity.js +3 -0
  173. data/node_modules/dc/node_modules/crossfilter2/src/insertionsort.js +18 -0
  174. data/node_modules/dc/node_modules/crossfilter2/src/null.js +3 -0
  175. data/node_modules/dc/node_modules/crossfilter2/src/permute.js +8 -0
  176. data/node_modules/dc/node_modules/crossfilter2/src/quicksort.js +283 -0
  177. data/node_modules/dc/node_modules/crossfilter2/src/reduce.js +19 -0
  178. data/node_modules/dc/node_modules/crossfilter2/src/zero.js +3 -0
  179. data/node_modules/dc/node_modules/d3/d3.js +9554 -0
  180. data/node_modules/dc/node_modules/d3/d3.min.js +5 -0
  181. data/node_modules/dc/node_modules/d3/package.js +13 -0
  182. data/node_modules/dc/node_modules/d3/src/arrays/ascending.js +5 -0
  183. data/node_modules/dc/node_modules/d3/src/arrays/bisect.js +36 -0
  184. data/node_modules/dc/node_modules/d3/src/arrays/descending.js +3 -0
  185. data/node_modules/dc/node_modules/d3/src/arrays/deviation.js +6 -0
  186. data/node_modules/dc/node_modules/d3/src/arrays/entries.js +5 -0
  187. data/node_modules/dc/node_modules/d3/src/arrays/extent.js +21 -0
  188. data/node_modules/dc/node_modules/d3/src/arrays/index.js +25 -0
  189. data/node_modules/dc/node_modules/d3/src/arrays/keys.js +5 -0
  190. data/node_modules/dc/node_modules/d3/src/arrays/map.js +84 -0
  191. data/node_modules/dc/node_modules/d3/src/arrays/max.js +14 -0
  192. data/node_modules/dc/node_modules/d3/src/arrays/mean.js +15 -0
  193. data/node_modules/dc/node_modules/d3/src/arrays/median.js +16 -0
  194. data/node_modules/dc/node_modules/d3/src/arrays/merge.js +21 -0
  195. data/node_modules/dc/node_modules/d3/src/arrays/min.js +14 -0
  196. data/node_modules/dc/node_modules/d3/src/arrays/nest.js +97 -0
  197. data/node_modules/dc/node_modules/d3/src/arrays/pairs.js +5 -0
  198. data/node_modules/dc/node_modules/d3/src/arrays/permute.js +5 -0
  199. data/node_modules/dc/node_modules/d3/src/arrays/quantile.js +8 -0
  200. data/node_modules/dc/node_modules/d3/src/arrays/range.js +26 -0
  201. data/node_modules/dc/node_modules/d3/src/arrays/set.js +27 -0
  202. data/node_modules/dc/node_modules/d3/src/arrays/shuffle.js +9 -0
  203. data/node_modules/dc/node_modules/d3/src/arrays/sum.js +14 -0
  204. data/node_modules/dc/node_modules/d3/src/arrays/transpose.js +15 -0
  205. data/node_modules/dc/node_modules/d3/src/arrays/values.js +5 -0
  206. data/node_modules/dc/node_modules/d3/src/arrays/variance.js +29 -0
  207. data/node_modules/dc/node_modules/d3/src/arrays/zip.js +5 -0
  208. data/node_modules/dc/node_modules/d3/src/behavior/behavior.js +1 -0
  209. data/node_modules/dc/node_modules/d3/src/behavior/drag.js +88 -0
  210. data/node_modules/dc/node_modules/d3/src/behavior/index.js +3 -0
  211. data/node_modules/dc/node_modules/d3/src/behavior/zoom.js +348 -0
  212. data/node_modules/dc/node_modules/d3/src/color/color.js +7 -0
  213. data/node_modules/dc/node_modules/d3/src/color/hcl.js +34 -0
  214. data/node_modules/dc/node_modules/d3/src/color/hsl.js +56 -0
  215. data/node_modules/dc/node_modules/d3/src/color/index.js +6 -0
  216. data/node_modules/dc/node_modules/d3/src/color/lab.js +60 -0
  217. data/node_modules/dc/node_modules/d3/src/color/rgb.js +301 -0
  218. data/node_modules/dc/node_modules/d3/src/color/xyz.js +7 -0
  219. data/node_modules/dc/node_modules/d3/src/compat/array.js +15 -0
  220. data/node_modules/dc/node_modules/d3/src/compat/date.js +3 -0
  221. data/node_modules/dc/node_modules/d3/src/compat/index.js +3 -0
  222. data/node_modules/dc/node_modules/d3/src/compat/style.js +23 -0
  223. data/node_modules/dc/node_modules/d3/src/core/array.js +2 -0
  224. data/node_modules/dc/node_modules/d3/src/core/class.js +8 -0
  225. data/node_modules/dc/node_modules/d3/src/core/document.js +15 -0
  226. data/node_modules/dc/node_modules/d3/src/core/functor.js +5 -0
  227. data/node_modules/dc/node_modules/d3/src/core/identity.js +3 -0
  228. data/node_modules/dc/node_modules/d3/src/core/index.js +3 -0
  229. data/node_modules/dc/node_modules/d3/src/core/noop.js +1 -0
  230. data/node_modules/dc/node_modules/d3/src/core/ns.js +18 -0
  231. data/node_modules/dc/node_modules/d3/src/core/rebind.js +16 -0
  232. data/node_modules/dc/node_modules/d3/src/core/source.js +3 -0
  233. data/node_modules/dc/node_modules/d3/src/core/subclass.js +11 -0
  234. data/node_modules/dc/node_modules/d3/src/core/target.js +3 -0
  235. data/node_modules/dc/node_modules/d3/src/core/true.js +3 -0
  236. data/node_modules/dc/node_modules/d3/src/core/vendor.js +10 -0
  237. data/node_modules/dc/node_modules/d3/src/core/zero.js +3 -0
  238. data/node_modules/dc/node_modules/d3/src/d3.js +23 -0
  239. data/node_modules/dc/node_modules/d3/src/dsv/csv.js +3 -0
  240. data/node_modules/dc/node_modules/d3/src/dsv/dsv.js +136 -0
  241. data/node_modules/dc/node_modules/d3/src/dsv/index.js +3 -0
  242. data/node_modules/dc/node_modules/d3/src/dsv/tsv.js +3 -0
  243. data/node_modules/dc/node_modules/d3/src/end.js +4 -0
  244. data/node_modules/dc/node_modules/d3/src/event/dispatch.js +69 -0
  245. data/node_modules/dc/node_modules/d3/src/event/drag.js +36 -0
  246. data/node_modules/dc/node_modules/d3/src/event/event.js +50 -0
  247. data/node_modules/dc/node_modules/d3/src/event/index.js +6 -0
  248. data/node_modules/dc/node_modules/d3/src/event/mouse.js +39 -0
  249. data/node_modules/dc/node_modules/d3/src/event/timer.js +82 -0
  250. data/node_modules/dc/node_modules/d3/src/event/touch.js +11 -0
  251. data/node_modules/dc/node_modules/d3/src/event/touches.js +12 -0
  252. data/node_modules/dc/node_modules/d3/src/format/collapse.js +3 -0
  253. data/node_modules/dc/node_modules/d3/src/format/format.js +3 -0
  254. data/node_modules/dc/node_modules/d3/src/format/formatPrefix.js +24 -0
  255. data/node_modules/dc/node_modules/d3/src/format/index.js +4 -0
  256. data/node_modules/dc/node_modules/d3/src/format/precision.js +3 -0
  257. data/node_modules/dc/node_modules/d3/src/format/requote.js +5 -0
  258. data/node_modules/dc/node_modules/d3/src/format/round.js +5 -0
  259. data/node_modules/dc/node_modules/d3/src/geo/albers-usa.js +129 -0
  260. data/node_modules/dc/node_modules/d3/src/geo/albers.js +11 -0
  261. data/node_modules/dc/node_modules/d3/src/geo/area.js +69 -0
  262. data/node_modules/dc/node_modules/d3/src/geo/azimuthal-equal-area.js +12 -0
  263. data/node_modules/dc/node_modules/d3/src/geo/azimuthal-equidistant.js +13 -0
  264. data/node_modules/dc/node_modules/d3/src/geo/azimuthal.js +25 -0
  265. data/node_modules/dc/node_modules/d3/src/geo/bounds.js +168 -0
  266. data/node_modules/dc/node_modules/d3/src/geo/cartesian.js +47 -0
  267. data/node_modules/dc/node_modules/d3/src/geo/centroid.js +149 -0
  268. data/node_modules/dc/node_modules/d3/src/geo/circle.js +81 -0
  269. data/node_modules/dc/node_modules/d3/src/geo/clip-antimeridian.js +95 -0
  270. data/node_modules/dc/node_modules/d3/src/geo/clip-circle.js +178 -0
  271. data/node_modules/dc/node_modules/d3/src/geo/clip-extent.js +196 -0
  272. data/node_modules/dc/node_modules/d3/src/geo/clip-polygon.js +104 -0
  273. data/node_modules/dc/node_modules/d3/src/geo/clip.js +149 -0
  274. data/node_modules/dc/node_modules/d3/src/geo/compose.js +12 -0
  275. data/node_modules/dc/node_modules/d3/src/geo/conic-conformal.js +39 -0
  276. data/node_modules/dc/node_modules/d3/src/geo/conic-equal-area.js +33 -0
  277. data/node_modules/dc/node_modules/d3/src/geo/conic-equidistant.js +36 -0
  278. data/node_modules/dc/node_modules/d3/src/geo/conic.js +16 -0
  279. data/node_modules/dc/node_modules/d3/src/geo/distance.js +13 -0
  280. data/node_modules/dc/node_modules/d3/src/geo/equirectangular.js +10 -0
  281. data/node_modules/dc/node_modules/d3/src/geo/geo.js +1 -0
  282. data/node_modules/dc/node_modules/d3/src/geo/gnomonic.js +12 -0
  283. data/node_modules/dc/node_modules/d3/src/geo/graticule.js +103 -0
  284. data/node_modules/dc/node_modules/d3/src/geo/greatArc.js +42 -0
  285. data/node_modules/dc/node_modules/d3/src/geo/index.js +33 -0
  286. data/node_modules/dc/node_modules/d3/src/geo/interpolate.js +38 -0
  287. data/node_modules/dc/node_modules/d3/src/geo/length.js +44 -0
  288. data/node_modules/dc/node_modules/d3/src/geo/mercator.js +48 -0
  289. data/node_modules/dc/node_modules/d3/src/geo/orthographic.js +12 -0
  290. data/node_modules/dc/node_modules/d3/src/geo/path-area.js +41 -0
  291. data/node_modules/dc/node_modules/d3/src/geo/path-bounds.js +21 -0
  292. data/node_modules/dc/node_modules/d3/src/geo/path-buffer.js +59 -0
  293. data/node_modules/dc/node_modules/d3/src/geo/path-centroid.js +78 -0
  294. data/node_modules/dc/node_modules/d3/src/geo/path-context.js +49 -0
  295. data/node_modules/dc/node_modules/d3/src/geo/path.js +87 -0
  296. data/node_modules/dc/node_modules/d3/src/geo/point-in-polygon.js +71 -0
  297. data/node_modules/dc/node_modules/d3/src/geo/projection.js +121 -0
  298. data/node_modules/dc/node_modules/d3/src/geo/resample.js +109 -0
  299. data/node_modules/dc/node_modules/d3/src/geo/rotation.js +79 -0
  300. data/node_modules/dc/node_modules/d3/src/geo/spherical.js +13 -0
  301. data/node_modules/dc/node_modules/d3/src/geo/stereographic.js +12 -0
  302. data/node_modules/dc/node_modules/d3/src/geo/stream.js +71 -0
  303. data/node_modules/dc/node_modules/d3/src/geo/transform.js +36 -0
  304. data/node_modules/dc/node_modules/d3/src/geo/transverse-mercator.js +31 -0
  305. data/node_modules/dc/node_modules/d3/src/geom/clip-line.js +66 -0
  306. data/node_modules/dc/node_modules/d3/src/geom/delaunay.js +6 -0
  307. data/node_modules/dc/node_modules/d3/src/geom/geom.js +1 -0
  308. data/node_modules/dc/node_modules/d3/src/geom/hull.js +91 -0
  309. data/node_modules/dc/node_modules/d3/src/geom/index.js +6 -0
  310. data/node_modules/dc/node_modules/d3/src/geom/point.js +7 -0
  311. data/node_modules/dc/node_modules/d3/src/geom/polygon.js +105 -0
  312. data/node_modules/dc/node_modules/d3/src/geom/quadtree.js +243 -0
  313. data/node_modules/dc/node_modules/d3/src/geom/voronoi.js +110 -0
  314. data/node_modules/dc/node_modules/d3/src/geom/voronoi/beach.js +186 -0
  315. data/node_modules/dc/node_modules/d3/src/geom/voronoi/cell.js +64 -0
  316. data/node_modules/dc/node_modules/d3/src/geom/voronoi/circle.js +73 -0
  317. data/node_modules/dc/node_modules/d3/src/geom/voronoi/clip.js +80 -0
  318. data/node_modules/dc/node_modules/d3/src/geom/voronoi/edge.js +50 -0
  319. data/node_modules/dc/node_modules/d3/src/geom/voronoi/index.js +59 -0
  320. data/node_modules/dc/node_modules/d3/src/geom/voronoi/red-black.js +235 -0
  321. data/node_modules/dc/node_modules/d3/src/interpolate/array.js +19 -0
  322. data/node_modules/dc/node_modules/d3/src/interpolate/ease.js +111 -0
  323. data/node_modules/dc/node_modules/d3/src/interpolate/hcl.js +20 -0
  324. data/node_modules/dc/node_modules/d3/src/interpolate/hsl.js +20 -0
  325. data/node_modules/dc/node_modules/d3/src/interpolate/index.js +14 -0
  326. data/node_modules/dc/node_modules/d3/src/interpolate/interpolate.js +26 -0
  327. data/node_modules/dc/node_modules/d3/src/interpolate/lab.js +17 -0
  328. data/node_modules/dc/node_modules/d3/src/interpolate/number.js +6 -0
  329. data/node_modules/dc/node_modules/d3/src/interpolate/object.js +25 -0
  330. data/node_modules/dc/node_modules/d3/src/interpolate/rgb.js +20 -0
  331. data/node_modules/dc/node_modules/d3/src/interpolate/round.js +6 -0
  332. data/node_modules/dc/node_modules/d3/src/interpolate/string.js +54 -0
  333. data/node_modules/dc/node_modules/d3/src/interpolate/transform.js +59 -0
  334. data/node_modules/dc/node_modules/d3/src/interpolate/uninterpolate.js +9 -0
  335. data/node_modules/dc/node_modules/d3/src/interpolate/zoom.js +53 -0
  336. data/node_modules/dc/node_modules/d3/src/layout/bundle.js +59 -0
  337. data/node_modules/dc/node_modules/d3/src/layout/chord.js +157 -0
  338. data/node_modules/dc/node_modules/d3/src/layout/cluster.js +92 -0
  339. data/node_modules/dc/node_modules/d3/src/layout/force.js +372 -0
  340. data/node_modules/dc/node_modules/d3/src/layout/hierarchy.js +136 -0
  341. data/node_modules/dc/node_modules/d3/src/layout/histogram.js +110 -0
  342. data/node_modules/dc/node_modules/d3/src/layout/index.js +13 -0
  343. data/node_modules/dc/node_modules/d3/src/layout/layout.js +1 -0
  344. data/node_modules/dc/node_modules/d3/src/layout/pack.js +211 -0
  345. data/node_modules/dc/node_modules/d3/src/layout/partition.js +51 -0
  346. data/node_modules/dc/node_modules/d3/src/layout/pie.js +78 -0
  347. data/node_modules/dc/node_modules/d3/src/layout/stack.js +247 -0
  348. data/node_modules/dc/node_modules/d3/src/layout/tree.js +240 -0
  349. data/node_modules/dc/node_modules/d3/src/layout/treemap.js +229 -0
  350. data/node_modules/dc/node_modules/d3/src/locale/ca-ES.js +16 -0
  351. data/node_modules/dc/node_modules/d3/src/locale/de-CH.js +16 -0
  352. data/node_modules/dc/node_modules/d3/src/locale/de-DE.js +16 -0
  353. data/node_modules/dc/node_modules/d3/src/locale/en-CA.js +16 -0
  354. data/node_modules/dc/node_modules/d3/src/locale/en-GB.js +16 -0
  355. data/node_modules/dc/node_modules/d3/src/locale/en-US.js +16 -0
  356. data/node_modules/dc/node_modules/d3/src/locale/es-ES.js +16 -0
  357. data/node_modules/dc/node_modules/d3/src/locale/fi-FI.js +16 -0
  358. data/node_modules/dc/node_modules/d3/src/locale/fr-CA.js +16 -0
  359. data/node_modules/dc/node_modules/d3/src/locale/fr-FR.js +16 -0
  360. data/node_modules/dc/node_modules/d3/src/locale/he-IL.js +16 -0
  361. data/node_modules/dc/node_modules/d3/src/locale/hu-HU.js +16 -0
  362. data/node_modules/dc/node_modules/d3/src/locale/it-IT.js +16 -0
  363. data/node_modules/dc/node_modules/d3/src/locale/ja-JP.js +16 -0
  364. data/node_modules/dc/node_modules/d3/src/locale/ko-KR.js +16 -0
  365. data/node_modules/dc/node_modules/d3/src/locale/locale.js +9 -0
  366. data/node_modules/dc/node_modules/d3/src/locale/mk-MK.js +16 -0
  367. data/node_modules/dc/node_modules/d3/src/locale/nl-NL.js +16 -0
  368. data/node_modules/dc/node_modules/d3/src/locale/number-format.js +155 -0
  369. data/node_modules/dc/node_modules/d3/src/locale/pl-PL.js +16 -0
  370. data/node_modules/dc/node_modules/d3/src/locale/pt-BR.js +16 -0
  371. data/node_modules/dc/node_modules/d3/src/locale/ru-RU.js +16 -0
  372. data/node_modules/dc/node_modules/d3/src/locale/sv-SE.js +16 -0
  373. data/node_modules/dc/node_modules/d3/src/locale/time-format.js +370 -0
  374. data/node_modules/dc/node_modules/d3/src/locale/time-scale.js +0 -0
  375. data/node_modules/dc/node_modules/d3/src/locale/zh-CN.js +16 -0
  376. data/node_modules/dc/node_modules/d3/src/math/abs.js +1 -0
  377. data/node_modules/dc/node_modules/d3/src/math/adder.js +34 -0
  378. data/node_modules/dc/node_modules/d3/src/math/index.js +2 -0
  379. data/node_modules/dc/node_modules/d3/src/math/number.js +7 -0
  380. data/node_modules/dc/node_modules/d3/src/math/random.js +34 -0
  381. data/node_modules/dc/node_modules/d3/src/math/transform.js +64 -0
  382. data/node_modules/dc/node_modules/d3/src/math/trigonometry.js +44 -0
  383. data/node_modules/dc/node_modules/d3/src/scale/bilinear.js +7 -0
  384. data/node_modules/dc/node_modules/d3/src/scale/category.js +58 -0
  385. data/node_modules/dc/node_modules/d3/src/scale/identity.js +33 -0
  386. data/node_modules/dc/node_modules/d3/src/scale/index.js +11 -0
  387. data/node_modules/dc/node_modules/d3/src/scale/linear.js +160 -0
  388. data/node_modules/dc/node_modules/d3/src/scale/log.js +92 -0
  389. data/node_modules/dc/node_modules/d3/src/scale/nice.js +30 -0
  390. data/node_modules/dc/node_modules/d3/src/scale/ordinal.js +102 -0
  391. data/node_modules/dc/node_modules/d3/src/scale/polylinear.js +24 -0
  392. data/node_modules/dc/node_modules/d3/src/scale/pow.js +57 -0
  393. data/node_modules/dc/node_modules/d3/src/scale/quantile.js +55 -0
  394. data/node_modules/dc/node_modules/d3/src/scale/quantize.js +44 -0
  395. data/node_modules/dc/node_modules/d3/src/scale/scale.js +10 -0
  396. data/node_modules/dc/node_modules/d3/src/scale/sqrt.js +6 -0
  397. data/node_modules/dc/node_modules/d3/src/scale/threshold.js +36 -0
  398. data/node_modules/dc/node_modules/d3/src/selection/append.js +28 -0
  399. data/node_modules/dc/node_modules/d3/src/selection/attr.js +62 -0
  400. data/node_modules/dc/node_modules/d3/src/selection/call.js +8 -0
  401. data/node_modules/dc/node_modules/d3/src/selection/classed.js +76 -0
  402. data/node_modules/dc/node_modules/d3/src/selection/data.js +117 -0
  403. data/node_modules/dc/node_modules/d3/src/selection/datum.js +7 -0
  404. data/node_modules/dc/node_modules/d3/src/selection/each.js +16 -0
  405. data/node_modules/dc/node_modules/d3/src/selection/empty.js +5 -0
  406. data/node_modules/dc/node_modules/d3/src/selection/enter-insert.js +20 -0
  407. data/node_modules/dc/node_modules/d3/src/selection/enter-select.js +27 -0
  408. data/node_modules/dc/node_modules/d3/src/selection/enter.js +21 -0
  409. data/node_modules/dc/node_modules/d3/src/selection/filter.js +28 -0
  410. data/node_modules/dc/node_modules/d3/src/selection/html.js +10 -0
  411. data/node_modules/dc/node_modules/d3/src/selection/index.js +1 -0
  412. data/node_modules/dc/node_modules/d3/src/selection/insert.js +9 -0
  413. data/node_modules/dc/node_modules/d3/src/selection/interrupt.js +27 -0
  414. data/node_modules/dc/node_modules/d3/src/selection/node.js +11 -0
  415. data/node_modules/dc/node_modules/d3/src/selection/on.js +106 -0
  416. data/node_modules/dc/node_modules/d3/src/selection/order.js +13 -0
  417. data/node_modules/dc/node_modules/d3/src/selection/property.js +43 -0
  418. data/node_modules/dc/node_modules/d3/src/selection/remove.js +13 -0
  419. data/node_modules/dc/node_modules/d3/src/selection/select.js +32 -0
  420. data/node_modules/dc/node_modules/d3/src/selection/selectAll.js +27 -0
  421. data/node_modules/dc/node_modules/d3/src/selection/selection.js +81 -0
  422. data/node_modules/dc/node_modules/d3/src/selection/size.js +7 -0
  423. data/node_modules/dc/node_modules/d3/src/selection/sort.js +15 -0
  424. data/node_modules/dc/node_modules/d3/src/selection/style.js +59 -0
  425. data/node_modules/dc/node_modules/d3/src/selection/text.js +10 -0
  426. data/node_modules/dc/node_modules/d3/src/selection/transition.js +21 -0
  427. data/node_modules/dc/node_modules/d3/src/start.js +2 -0
  428. data/node_modules/dc/node_modules/d3/src/svg/arc.js +292 -0
  429. data/node_modules/dc/node_modules/d3/src/svg/area-radial.js +14 -0
  430. data/node_modules/dc/node_modules/d3/src/svg/area.js +121 -0
  431. data/node_modules/dc/node_modules/d3/src/svg/axis.js +160 -0
  432. data/node_modules/dc/node_modules/d3/src/svg/brush.js +429 -0
  433. data/node_modules/dc/node_modules/d3/src/svg/chord.js +90 -0
  434. data/node_modules/dc/node_modules/d3/src/svg/diagonal-radial.js +27 -0
  435. data/node_modules/dc/node_modules/d3/src/svg/diagonal.js +43 -0
  436. data/node_modules/dc/node_modules/d3/src/svg/index.js +12 -0
  437. data/node_modules/dc/node_modules/d3/src/svg/line-radial.js +27 -0
  438. data/node_modules/dc/node_modules/d3/src/svg/line.js +432 -0
  439. data/node_modules/dc/node_modules/d3/src/svg/svg.js +1 -0
  440. data/node_modules/dc/node_modules/d3/src/svg/symbol.js +105 -0
  441. data/node_modules/dc/node_modules/d3/src/time/day.js +21 -0
  442. data/node_modules/dc/node_modules/d3/src/time/format-iso.js +19 -0
  443. data/node_modules/dc/node_modules/d3/src/time/format-utc.js +3 -0
  444. data/node_modules/dc/node_modules/d3/src/time/format.js +4 -0
  445. data/node_modules/dc/node_modules/d3/src/time/hour.js +14 -0
  446. data/node_modules/dc/node_modules/d3/src/time/index.js +14 -0
  447. data/node_modules/dc/node_modules/d3/src/time/interval.js +71 -0
  448. data/node_modules/dc/node_modules/d3/src/time/minute.js +13 -0
  449. data/node_modules/dc/node_modules/d3/src/time/month.js +16 -0
  450. data/node_modules/dc/node_modules/d3/src/time/scale-utc.js +25 -0
  451. data/node_modules/dc/node_modules/d3/src/time/scale.js +155 -0
  452. data/node_modules/dc/node_modules/d3/src/time/second.js +13 -0
  453. data/node_modules/dc/node_modules/d3/src/time/time.js +33 -0
  454. data/node_modules/dc/node_modules/d3/src/time/week.js +31 -0
  455. data/node_modules/dc/node_modules/d3/src/time/year.js +16 -0
  456. data/node_modules/dc/node_modules/d3/src/transition/attr.js +58 -0
  457. data/node_modules/dc/node_modules/d3/src/transition/delay.js +10 -0
  458. data/node_modules/dc/node_modules/d3/src/transition/duration.js +10 -0
  459. data/node_modules/dc/node_modules/d3/src/transition/each.js +26 -0
  460. data/node_modules/dc/node_modules/d3/src/transition/ease.js +10 -0
  461. data/node_modules/dc/node_modules/d3/src/transition/filter.js +22 -0
  462. data/node_modules/dc/node_modules/d3/src/transition/index.js +1 -0
  463. data/node_modules/dc/node_modules/d3/src/transition/remove.js +9 -0
  464. data/node_modules/dc/node_modules/d3/src/transition/select.js +28 -0
  465. data/node_modules/dc/node_modules/d3/src/transition/selectAll.js +31 -0
  466. data/node_modules/dc/node_modules/d3/src/transition/style.js +53 -0
  467. data/node_modules/dc/node_modules/d3/src/transition/subtransition.js +25 -0
  468. data/node_modules/dc/node_modules/d3/src/transition/text.js +11 -0
  469. data/node_modules/dc/node_modules/d3/src/transition/transition.js +161 -0
  470. data/node_modules/dc/node_modules/d3/src/transition/tween.js +17 -0
  471. data/node_modules/dc/node_modules/d3/src/xhr/html.js +12 -0
  472. data/node_modules/dc/node_modules/d3/src/xhr/index.js +5 -0
  473. data/node_modules/dc/node_modules/d3/src/xhr/json.js +9 -0
  474. data/node_modules/dc/node_modules/d3/src/xhr/text.js +5 -0
  475. data/node_modules/dc/node_modules/d3/src/xhr/xhr.js +126 -0
  476. data/node_modules/dc/node_modules/d3/src/xhr/xml.js +5 -0
  477. data/node_modules/dc/regression/inject-serializer.js +6 -0
  478. data/node_modules/dc/regression/stock-regression-test.js +140 -0
  479. data/node_modules/dc/spec/bar-chart-spec.js +1230 -0
  480. data/node_modules/dc/spec/base-mixin-spec.js +611 -0
  481. data/node_modules/dc/spec/biggish-data-spec.js +136 -0
  482. data/node_modules/dc/spec/box-plot-spec.js +211 -0
  483. data/node_modules/dc/spec/bubble-chart-spec.js +450 -0
  484. data/node_modules/dc/spec/bubble-overlay-spec.js +102 -0
  485. data/node_modules/dc/spec/color-spec.js +89 -0
  486. data/node_modules/dc/spec/composite-chart-spec.js +691 -0
  487. data/node_modules/dc/spec/coordinate-grid-chart-spec.js +962 -0
  488. data/node_modules/dc/spec/core-spec.js +301 -0
  489. data/node_modules/dc/spec/data-addition-spec.js +122 -0
  490. data/node_modules/dc/spec/data-count-spec.js +180 -0
  491. data/node_modules/dc/spec/data-grid-spec.js +124 -0
  492. data/node_modules/dc/spec/data-table-spec.js +251 -0
  493. data/node_modules/dc/spec/event-spec.js +41 -0
  494. data/node_modules/dc/spec/filter-dates-spec.js +92 -0
  495. data/node_modules/dc/spec/filters-spec.js +140 -0
  496. data/node_modules/dc/spec/geo-choropleth-chart-spec.js +225 -0
  497. data/node_modules/dc/spec/heatmap-spec.js +363 -0
  498. data/node_modules/dc/spec/helpers/custom_matchers.js +213 -0
  499. data/node_modules/dc/spec/helpers/fixtures.js +81 -0
  500. data/node_modules/dc/spec/helpers/geoFixtures.js +113 -0
  501. data/node_modules/dc/spec/helpers/load-jsreporter.js +37 -0
  502. data/node_modules/dc/spec/helpers/spec-helper.js +53 -0
  503. data/node_modules/dc/spec/legend-spec.js +266 -0
  504. data/node_modules/dc/spec/line-chart-spec.js +709 -0
  505. data/node_modules/dc/spec/logger-spec.js +80 -0
  506. data/node_modules/dc/spec/number-display-spec.js +168 -0
  507. data/node_modules/dc/spec/pie-chart-spec.js +677 -0
  508. data/node_modules/dc/spec/row-chart-spec.js +362 -0
  509. data/node_modules/dc/spec/scatter-plot-spec.js +336 -0
  510. data/node_modules/dc/spec/series-chart-spec.js +133 -0
  511. data/node_modules/dc/spec/utils-spec.js +110 -0
  512. data/node_modules/dc/src/banner.js +2 -0
  513. data/node_modules/dc/src/bar-chart.js +374 -0
  514. data/node_modules/dc/src/base-mixin.js +1478 -0
  515. data/node_modules/dc/src/box-plot.js +240 -0
  516. data/node_modules/dc/src/bubble-chart.js +177 -0
  517. data/node_modules/dc/src/bubble-mixin.js +244 -0
  518. data/node_modules/dc/src/bubble-overlay.js +207 -0
  519. data/node_modules/dc/src/cap-mixin.js +151 -0
  520. data/node_modules/dc/src/color-mixin.js +172 -0
  521. data/node_modules/dc/src/composite-chart.js +544 -0
  522. data/node_modules/dc/src/coordinate-grid-mixin.js +1300 -0
  523. data/node_modules/dc/src/core.js +425 -0
  524. data/node_modules/dc/src/d3.box.js +317 -0
  525. data/node_modules/dc/src/data-count.js +110 -0
  526. data/node_modules/dc/src/data-grid.js +243 -0
  527. data/node_modules/dc/src/data-table.js +419 -0
  528. data/node_modules/dc/src/errors.js +28 -0
  529. data/node_modules/dc/src/events.js +37 -0
  530. data/node_modules/dc/src/filters.js +124 -0
  531. data/node_modules/dc/src/footer.js +35 -0
  532. data/node_modules/dc/src/geo-choropleth-chart.js +279 -0
  533. data/node_modules/dc/src/heatmap.js +378 -0
  534. data/node_modules/dc/src/legend.js +277 -0
  535. data/node_modules/dc/src/line-chart.js +504 -0
  536. data/node_modules/dc/src/logger.js +40 -0
  537. data/node_modules/dc/src/margin-mixin.js +44 -0
  538. data/node_modules/dc/src/number-display.js +141 -0
  539. data/node_modules/dc/src/pie-chart.js +571 -0
  540. data/node_modules/dc/src/row-chart.js +425 -0
  541. data/node_modules/dc/src/scatter-plot.js +338 -0
  542. data/node_modules/dc/src/series-chart.js +192 -0
  543. data/node_modules/dc/src/stack-mixin.js +319 -0
  544. data/node_modules/dc/src/utils.js +290 -0
  545. data/node_modules/dc/web/docs/html/scripts/docstrap.lib.js +11 -0
  546. data/node_modules/dc/web/docs/html/scripts/fulltext-search-ui.js +89 -0
  547. data/node_modules/dc/web/docs/html/scripts/fulltext-search.js +36 -0
  548. data/node_modules/dc/web/docs/html/scripts/lunr.min.js +7 -0
  549. data/node_modules/dc/web/docs/html/scripts/prettify/jquery.min.js +6 -0
  550. data/node_modules/dc/web/docs/html/scripts/prettify/lang-css.js +21 -0
  551. data/node_modules/dc/web/docs/html/scripts/prettify/prettify.js +496 -0
  552. data/node_modules/dc/web/docs/html/scripts/sunlight.js +1157 -0
  553. data/node_modules/dc/web/docs/html/scripts/toc.js +203 -0
  554. data/node_modules/dc/web/ep/list.js +106 -0
  555. data/node_modules/dc/web/examples/lysenko-interval-tree.js +447 -0
  556. data/node_modules/dc/web/highlighter/shAutoloader.js +17 -0
  557. data/node_modules/dc/web/highlighter/shBrushJScript.js +52 -0
  558. data/node_modules/dc/web/highlighter/shBrushXml.js +69 -0
  559. data/node_modules/dc/web/highlighter/shCore.js +17 -0
  560. data/node_modules/dc/web/js/colorbrewer.js +1 -0
  561. data/node_modules/dc/web/js/crossfilter.js +1401 -0
  562. data/node_modules/dc/web/js/d3.js +9554 -0
  563. data/node_modules/dc/web/js/dc.js +10477 -0
  564. data/node_modules/dc/web/js/dc.min.js +23 -0
  565. data/node_modules/dc/web/js/env-data.js +218 -0
  566. data/node_modules/dc/web/js/jasmine-jsreporter.js +394 -0
  567. data/node_modules/dc/web/stock.js +685 -0
  568. data/node_modules/dc/web/transitions/transition-test.js +45 -0
  569. data/node_modules/jquery/dist/jquery.js +9814 -0
  570. data/node_modules/jquery/dist/jquery.min.js +4 -0
  571. data/node_modules/jquery/external/sizzle/dist/sizzle.js +2143 -0
  572. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  573. data/node_modules/jquery/src/ajax.js +845 -0
  574. data/node_modules/jquery/src/ajax/jsonp.js +100 -0
  575. data/node_modules/jquery/src/ajax/load.js +83 -0
  576. data/node_modules/jquery/src/ajax/parseJSON.js +13 -0
  577. data/node_modules/jquery/src/ajax/parseXML.js +27 -0
  578. data/node_modules/jquery/src/ajax/script.js +68 -0
  579. data/node_modules/jquery/src/ajax/var/location.js +3 -0
  580. data/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  581. data/node_modules/jquery/src/ajax/var/rquery.js +3 -0
  582. data/node_modules/jquery/src/ajax/xhr.js +167 -0
  583. data/node_modules/jquery/src/attributes.js +11 -0
  584. data/node_modules/jquery/src/attributes/attr.js +142 -0
  585. data/node_modules/jquery/src/attributes/classes.js +177 -0
  586. data/node_modules/jquery/src/attributes/prop.js +125 -0
  587. data/node_modules/jquery/src/attributes/support.js +36 -0
  588. data/node_modules/jquery/src/attributes/val.js +177 -0
  589. data/node_modules/jquery/src/callbacks.js +232 -0
  590. data/node_modules/jquery/src/core.js +494 -0
  591. data/node_modules/jquery/src/core/access.js +65 -0
  592. data/node_modules/jquery/src/core/init.js +134 -0
  593. data/node_modules/jquery/src/core/parseHTML.js +41 -0
  594. data/node_modules/jquery/src/core/ready.js +103 -0
  595. data/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
  596. data/node_modules/jquery/src/css.js +502 -0
  597. data/node_modules/jquery/src/css/addGetHookIf.js +24 -0
  598. data/node_modules/jquery/src/css/adjustCSS.js +65 -0
  599. data/node_modules/jquery/src/css/curCSS.js +60 -0
  600. data/node_modules/jquery/src/css/defaultDisplay.js +72 -0
  601. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
  602. data/node_modules/jquery/src/css/showHide.js +48 -0
  603. data/node_modules/jquery/src/css/support.js +121 -0
  604. data/node_modules/jquery/src/css/var/cssExpand.js +3 -0
  605. data/node_modules/jquery/src/css/var/getStyles.js +15 -0
  606. data/node_modules/jquery/src/css/var/isHidden.js +16 -0
  607. data/node_modules/jquery/src/css/var/rmargin.js +3 -0
  608. data/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
  609. data/node_modules/jquery/src/css/var/swap.js +24 -0
  610. data/node_modules/jquery/src/data.js +187 -0
  611. data/node_modules/jquery/src/data/Data.js +200 -0
  612. data/node_modules/jquery/src/data/var/acceptData.js +18 -0
  613. data/node_modules/jquery/src/data/var/dataPriv.js +5 -0
  614. data/node_modules/jquery/src/data/var/dataUser.js +5 -0
  615. data/node_modules/jquery/src/deferred.js +158 -0
  616. data/node_modules/jquery/src/deprecated.js +32 -0
  617. data/node_modules/jquery/src/dimensions.js +54 -0
  618. data/node_modules/jquery/src/effects.js +629 -0
  619. data/node_modules/jquery/src/effects/Tween.js +121 -0
  620. data/node_modules/jquery/src/effects/animatedSelector.js +13 -0
  621. data/node_modules/jquery/src/event.js +711 -0
  622. data/node_modules/jquery/src/event/ajax.js +20 -0
  623. data/node_modules/jquery/src/event/alias.js +27 -0
  624. data/node_modules/jquery/src/event/focusin.js +53 -0
  625. data/node_modules/jquery/src/event/support.js +9 -0
  626. data/node_modules/jquery/src/event/trigger.js +183 -0
  627. data/node_modules/jquery/src/exports/amd.js +24 -0
  628. data/node_modules/jquery/src/exports/global.js +26 -0
  629. data/node_modules/jquery/src/intro.js +44 -0
  630. data/node_modules/jquery/src/jquery.js +37 -0
  631. data/node_modules/jquery/src/manipulation.js +481 -0
  632. data/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
  633. data/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
  634. data/node_modules/jquery/src/manipulation/getAll.js +21 -0
  635. data/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
  636. data/node_modules/jquery/src/manipulation/support.js +33 -0
  637. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
  638. data/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
  639. data/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
  640. data/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
  641. data/node_modules/jquery/src/offset.js +218 -0
  642. data/node_modules/jquery/src/outro.js +2 -0
  643. data/node_modules/jquery/src/queue.js +143 -0
  644. data/node_modules/jquery/src/queue/delay.js +22 -0
  645. data/node_modules/jquery/src/selector-native.js +211 -0
  646. data/node_modules/jquery/src/selector-sizzle.js +14 -0
  647. data/node_modules/jquery/src/selector.js +1 -0
  648. data/node_modules/jquery/src/serialize.js +125 -0
  649. data/node_modules/jquery/src/traversing.js +175 -0
  650. data/node_modules/jquery/src/traversing/findFilter.js +100 -0
  651. data/node_modules/jquery/src/traversing/var/dir.js +20 -0
  652. data/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
  653. data/node_modules/jquery/src/traversing/var/siblings.js +15 -0
  654. data/node_modules/jquery/src/var/arr.js +3 -0
  655. data/node_modules/jquery/src/var/class2type.js +5 -0
  656. data/node_modules/jquery/src/var/concat.js +5 -0
  657. data/node_modules/jquery/src/var/document.js +3 -0
  658. data/node_modules/jquery/src/var/documentElement.js +5 -0
  659. data/node_modules/jquery/src/var/hasOwn.js +5 -0
  660. data/node_modules/jquery/src/var/indexOf.js +5 -0
  661. data/node_modules/jquery/src/var/pnum.js +3 -0
  662. data/node_modules/jquery/src/var/push.js +5 -0
  663. data/node_modules/jquery/src/var/rcssNum.js +7 -0
  664. data/node_modules/jquery/src/var/rnotwhite.js +3 -0
  665. data/node_modules/jquery/src/var/slice.js +5 -0
  666. data/node_modules/jquery/src/var/support.js +5 -0
  667. data/node_modules/jquery/src/var/toString.js +5 -0
  668. data/node_modules/jquery/src/wrap.js +79 -0
  669. data/target/mdarray_sol.jar +0 -0
  670. data/test/jx/test_complete.rb +35 -0
  671. data/test/jx/test_js.rb +543 -0
  672. data/test/jx/test_proxy_array.rb +239 -0
  673. data/test/jx/test_proxy_hash.rb +160 -0
  674. data/test/jx/test_proxy_lambda.rb +80 -0
  675. data/test/jx/test_rb_js_compat.rb +135 -0
  676. data/test/jx/test_style_sheets.rb +90 -0
  677. data/test/mdarray/test_mdarray.rb +75 -0
  678. data/util/cacert.pem +4095 -0
  679. data/util/download.rb +256 -0
  680. data/vendor/jxbrowser-6.8.jar +0 -0
  681. data/vendor/licence.jar +0 -0
  682. data/version.rb +2 -0
  683. metadata +817 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d<c.9;d++)i[c[d]]=a}2 o(c){1 a=r.H("J"),d=3;a.K=c;a.M="L/t";a.G="t";a.u=a.v=2(){6(!d&&(!8.7||8.7=="F"||8.7=="z")){d=q;e[c]=q;a:{4(1 p y e)6(e[p]==3)B a;j&&5.C(k)}a.u=a.v=x;a.D.O(a)}};r.N.R(a)}1 f=Q,l=h.P(),i={},e={},j=3,k=x,b;5.T=2(c){k=c;j=q};4(b=0;b<f.9;b++){1 m=f[b].w?f[b]:f[b].S(/\\s+/),g=m.w();n(m,g)}4(b=0;b<l.9;b++)6(g=i[l[b].E.A]){e[g]=3;o(g)}}})();',56,56,'|var|function|false|for|SyntaxHighlighter|if|readyState|this|length|||||||||||||||||true|document||javascript|onload|onreadystatechange|pop|null|in|complete|brush|break|highlight|parentNode|params|loaded|language|createElement|autoloader|script|src|text|type|body|removeChild|findElements|arguments|appendChild|split|all'.split('|'),0,{}))
@@ -0,0 +1,52 @@
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ ;(function()
18
+ {
19
+ // CommonJS
20
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
+
22
+ function Brush()
23
+ {
24
+ var keywords = 'break case catch continue ' +
25
+ 'default delete do else false ' +
26
+ 'for function if in instanceof ' +
27
+ 'new null return super switch ' +
28
+ 'this throw true try typeof var while with'
29
+ ;
30
+
31
+ var r = SyntaxHighlighter.regexLib;
32
+
33
+ this.regexList = [
34
+ { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
35
+ { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
36
+ { regex: r.singleLineCComments, css: 'comments' }, // one line comments
37
+ { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
38
+ { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
39
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
40
+ ];
41
+
42
+ this.forHtmlScript(r.scriptScriptTags);
43
+ };
44
+
45
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
46
+ Brush.aliases = ['js', 'jscript', 'javascript'];
47
+
48
+ SyntaxHighlighter.brushes.JScript = Brush;
49
+
50
+ // CommonJS
51
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52
+ })();
@@ -0,0 +1,69 @@
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ ;(function()
18
+ {
19
+ // CommonJS
20
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
+
22
+ function Brush()
23
+ {
24
+ function process(match, regexInfo)
25
+ {
26
+ var constructor = SyntaxHighlighter.Match,
27
+ code = match[0],
28
+ tag = new XRegExp('(&lt;|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
29
+ result = []
30
+ ;
31
+
32
+ if (match.attributes != null)
33
+ {
34
+ var attributes,
35
+ regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
36
+ '\\s*=\\s*' +
37
+ '(?<value> ".*?"|\'.*?\'|\\w+)',
38
+ 'xg');
39
+
40
+ while ((attributes = regex.exec(code)) != null)
41
+ {
42
+ result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
43
+ result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
44
+ }
45
+ }
46
+
47
+ if (tag != null)
48
+ result.push(
49
+ new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
50
+ );
51
+
52
+ return result;
53
+ }
54
+
55
+ this.regexList = [
56
+ { regex: new XRegExp('(\\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\&gt;|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
57
+ { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
58
+ { regex: new XRegExp('(&lt;|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(&gt;|>)', 'sg'), func: process }
59
+ ];
60
+ };
61
+
62
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
63
+ Brush.aliases = ['xml', 'xhtml', 'xslt', 'html'];
64
+
65
+ SyntaxHighlighter.brushes.Xml = Brush;
66
+
67
+ // CommonJS
68
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
69
+ })();
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SyntaxHighlighter
3
+ * http://alexgorbatchev.com/SyntaxHighlighter
4
+ *
5
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
6
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7
+ *
8
+ * @version
9
+ * 3.0.83 (July 02 2010)
10
+ *
11
+ * @copyright
12
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
13
+ *
14
+ * @license
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ */
17
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a<f.L;a++)I(f[a]===e)H a;H-1}M=6(f,e){K a=[],b=M.1B,c=0,d,h;I(M.1R(f)){I(e!==1d)1S 3m("2a\'t 5r 5I 5F 5B 5C 15 5E 5p");H r(f)}I(v)1S 2U("2a\'t W 3l M 59 5m 5g 5x 5i");e=e||"";O(d={2N:11,19:[],2K:6(g){H e.1i(g)>-1},3d:6(g){e+=g}};c<f.L;)I(h=B(f,c,b,d)){a.U(h.3k);c+=h.1C[0].L||1}Y I(h=n.X.W(z[b],f.1a(c))){a.U(h[0]);c+=h[0].L}Y{h=f.3a(c);I(h==="[")b=M.2I;Y I(h==="]")b=M.1B;a.U(h);c++}a=15(a.1K(""),n.Q.W(e,w,""));a.1w={1m:f,19:d.2N?d.19:N};H a};M.3v="1.5.0";M.2I=1;M.1B=2;K C=/\\$(?:(\\d\\d?|[$&`\'])|{([$\\w]+)})/g,w=/[^5h]+|([\\s\\S])(?=[\\s\\S]*\\1)/g,A=/^(?:[?*+]|{\\d+(?:,\\d*)?})\\??/,v=11,u=[],n={X:15.Z.X,1A:15.Z.1A,1C:1r.Z.1C,Q:1r.Z.Q,1e:1r.Z.1e},x=n.X.W(/()??/,"")[1]===1d,D=6(){K f=/^/g;n.1A.W(f,"");H!f.12}(),y=6(){K f=/x/g;n.Q.W("x",f,"");H!f.12}(),E=15.Z.3n!==1d,z={};z[M.2I]=/^(?:\\\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S]))/;z[M.1B]=/^(?:\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\\d*|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S])|\\(\\?[:=!]|[?*+]\\?|{\\d+(?:,\\d*)?}\\??)/;M.1h=6(f,e,a,b){u.U({2q:r(f,"g"+(E?"y":"")),2b:e,3r:a||M.1B,2p:b||N})};M.2n=6(f,e){K a=f+"/"+(e||"");H M.2n[a]||(M.2n[a]=M(f,e))};M.3c=6(f){H r(f,"g")};M.5l=6(f){H f.Q(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,"\\\\$&")};M.5e=6(f,e,a,b){e=r(e,"g"+(b&&E?"y":""));e.12=a=a||0;f=e.X(f);H b?f&&f.P===a?f:N:f};M.3q=6(){M.1h=6(){1S 2U("2a\'t 55 1h 54 3q")}};M.1R=6(f){H 53.Z.1q.W(f)==="[2m 15]"};M.3p=6(f,e,a,b){O(K c=r(e,"g"),d=-1,h;h=c.X(f);){a.W(b,h,++d,f,c);c.12===h.P&&c.12++}I(e.1J)e.12=0};M.57=6(f,e){H 6 a(b,c){K d=e[c].1I?e[c]:{1I:e[c]},h=r(d.1I,"g"),g=[],i;O(i=0;i<b.L;i++)M.3p(b[i],h,6(k){g.U(d.3j?k[d.3j]||"":k[0])});H c===e.L-1||!g.L?g:a(g,c+1)}([f],0)};15.Z.1p=6(f,e){H J.X(e[0])};15.Z.W=6(f,e){H J.X(e)};15.Z.X=6(f){K e=n.X.1p(J,14),a;I(e){I(!x&&e.L>1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;b<e.L;b++)I(a=J.1w.19[b-1])e[a]=e[b];!D&&J.1J&&!e[0].L&&J.12>e.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;d<b.L;d++)I(b[d])14[0][b[d]]=14[d+1]}I(a&&f.1J)f.12=14[14.L-2]+14[0].L;H e.1p(N,14)});Y{c=J+"";c=n.Q.W(c,f,6(){K d=14;H n.Q.W(e,C,6(h,g,i){I(g)5b(g){24"$":H"$";24"&":H d[0];24"`":H d[d.L-1].1a(0,d[d.L-2]);24"\'":H d[d.L-1].1a(d[d.L-2]+d[0].L);5a:i="";g=+g;I(!g)H h;O(;g>d.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P<a.L&&3b.Z.U.1p(b,d.1a(1));h=d[0].L;c=f.12;I(b.L>=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a<d.L&&i==N;a++)i=p(d[a],b,c);H i}6 C(a,b){K c={},d;O(d 2g a)c[d]=a[d];O(d 2g b)c[d]=b[d];H c}6 w(a,b,c,d){6 h(g){g=g||1P.5y;I(!g.1F){g.1F=g.52;g.3N=6(){J.5w=11}}c.W(d||1P,g)}a.3g?a.3g("4U"+b,h):a.4y(b,h,11)}6 A(a,b){K c=e.1Y.2j,d=N;I(c==N){c={};O(K h 2g e.1U){K g=e.1U[h];d=g.4x;I(d!=N){g.1V=h.4w();O(g=0;g<d.L;g++)c[d[g]]=h}}e.1Y.2j=c}d=e.1U[c[a]];d==N&&b!=11&&1P.1X(e.13.1x.1X+(e.13.1x.3E+a));H d}6 v(a,b){O(K c=a.1e("\\n"),d=0;d<c.L;d++)c[d]=b(c[d],d);H c.1K("\\n")}6 u(a,b){I(a==N||a.L==0||a=="\\n")H a;a=a.Q(/</g,"&1y;");a=a.Q(/ {2,}/g,6(c){O(K d="",h=0;h<c.L-1;h++)d+=e.13.1W;H d+" "});I(b!=N)a=v(a,6(c){I(c.L==0)H"";K d="";c=c.Q(/^(&2s;| )+/,6(h){d=h;H""});I(c.L==0)H d;H d+\'<17 1g="\'+b+\'">\'+c+"</17>"});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.P<b.P)H-1;Y I(a.P>b.P)H 1;Y I(a.L<b.L)H-1;Y I(a.L>b.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'<a 2h="\'+c+\'">\'+c+"</a>"+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<a.L;c++)a[c].3s=="20"&&b.U(a[c]);H b}6 f(a){a=a.1F;K b=p(a,".20",R);a=p(a,".3O",R);K c=1E.4i("3t");I(!(!a||!b||p(a,"3t"))){B(b.1c);r(b,"1m");O(K d=a.3G,h=[],g=0;g<d.L;g++)h.U(d[g].4z||d[g].4A);h=h.1K("\\r");c.39(1E.4D(h));a.39(c);c.2C();c.4C();w(c,"4u",6(){c.2G.4E(c);b.1l=b.1l.Q("1m","")})}}I(1j 3F!="1d"&&1j M=="1d")M=3F("M").M;K e={2v:{"1g-27":"","2i-1s":1,"2z-1s-2t":11,1M:N,1t:N,"42-45":R,"43-22":4,1u:R,16:R,"3V-17":R,2l:11,"41-40":R,2k:11,"1z-1k":11},13:{1W:"&2s;",2M:R,46:11,44:11,34:"4n",1x:{21:"4o 1m",2P:"?",1X:"1v\\n\\n",3E:"4r\'t 4t 1D O: ",4g:"4m 4B\'t 51 O 1z-1k 4F: ",37:\'<!4T 1z 4S "-//4V//3H 4W 1.0 4Z//4Y" "1Z://2y.3L.3K/4X/3I/3H/3I-4P.4J"><1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v</1t></3J><3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;"><T 1L="2O-3D:3C;3w-32:1.6z;"><T 1L="25-22:6A-6E;">1v</T><T 1L="25-22:.6C;3w-6B:6R;"><T>3v 3.0.76 (72 73 3x)</T><T><a 2h="1Z://3u.2w/1v" 1F="38" 1L="2f:#3y">1Z://3u.2w/1v</a></T><T>70 17 6U 71.</T><T>6T 6X-3x 6Y 6D.</T></T><T>6t 61 60 J 1k, 5Z <a 2h="6u://2y.62.2w/63-66/65?64=5X-5W&5P=5O" 1L="2f:#3y">5R</a> 5V <2R/>5U 5T 5S!</T></T></3B></1z>\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'<T 1g="16">\',d=e.16.2x,h=d.2X,g=0;g<h.L;g++)c+=(d[h[g]].1H||b)(a,h[g]);c+="</T>";H c},2o:6(a,b,c){H\'<2W><a 2h="#" 1g="6e 6h\'+b+" "+b+\'">\'+c+"</a></2W>"},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h<c.L;h++)d.U(c[h]);c=d}c=c;d=[];I(e.13.2M)c=c.1O(z());I(c.L===0)H d;O(h=0;h<c.L;h++){O(K g=c[h],i=a,k=c[h].1l,j=3W 0,l={},m=1f M("^\\\\[(?<2V>(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g<c.L;g++){b=c[g];K i=b.1F,k=b.1n,j=k.1D,l;I(j!=N){I(k["1z-1k"]=="R"||e.2v["1z-1k"]==R){d=1f e.4l(j);j="4O"}Y I(d=A(j))d=1f d;Y 6H;l=i.3X;I(h.2M){l=l;K m=x(l),s=11;I(m.1i("<![6G[")==0){m=m.4h(9);s=R}K o=m.L;I(m.1i("]]\\>")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;m<j.L;m++)j[m].P+=l}K c=A(a),d,h=1f e.1U.5Y,g=J,i="2F 1H 2Q".1e(" ");I(c!=N){d=1f c;O(K k=0;k<i.L;k++)(6(){K j=i[k];g[j]=6(){H h[j].1p(h,14)}})();d.28==N?1P.1X(e.13.1x.1X+(e.13.1x.4g+a)):h.2J.U({1I:d.28.17,2D:6(j){O(K l=j.17,m=[],s=d.2J,o=j.P+j.18.L,F=d.28,q,G=0;G<s.L;G++){q=y(l,s[G]);b(q,o);m=m.1O(q)}I(F.18!=N&&j.18!=N){q=y(j.18,F.18);b(q,j.P);m=m.1O(q)}I(F.1b!=N&&j.1b!=N){q=y(j.1b,F.1b);b(q,j.P+j[0].5Q(j.1b));m=m.1O(q)}O(j=0;j<m.L;j++)m[j].1V=c.1V;H m}})}};e.4j=6(){};e.4j.Z={V:6(a,b){K c=J.1n[a];c=c==N?b:c;K d={"R":R,"11":11}[c];H d==N?c:d},3Y:6(a){H 1E.4i(a)},4c:6(a,b){K c=[];I(a!=N)O(K d=0;d<a.L;d++)I(1j a[d]=="2m")c=c.1O(y(b,a[d]));H J.4e(c.6b(D))},4e:6(a){O(K b=0;b<a.L;b++)I(a[b]!==N)O(K c=a[b],d=c.P+c.L,h=b+1;h<a.L&&a[b]!==N;h++){K g=a[h];I(g!==N)I(g.P>d)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P<d)a[h]=N}H a},4d:6(a){K b=[],c=2u(J.V("2i-1s"));v(a,6(d,h){b.U(h+c)});H b},3U:6(a){K b=J.V("1M",[]);I(1j b!="2m"&&b.U==N)b=[b];a:{a=a.1q();K c=3W 0;O(c=c=1Q.6c(c||0,0);c<b.L;c++)I(b[c]==a){b=c;1N a}b=-1}H b!=-1},2r:6(a,b,c){a=["1s","6i"+b,"P"+a,"6r"+(b%2==0?1:2).1q()];J.3U(b)&&a.U("67");b==0&&a.U("1N");H\'<T 1g="\'+a.1K(" ")+\'">\'+c+"</T>"},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i<d;i++){K k=b?b[i]:h+i,j;I(k==0)j=e.13.1W;Y{j=g;O(K l=k.1q();l.L<j;)l="0"+l;j=l}a=j;c+=J.2r(i,k,a)}H c},49:6(a,b){a=x(a);K c=a.1e("\\n");J.V("2z-1s-2t");K d=2u(J.V("2i-1s"));a="";O(K h=J.V("1D"),g=0;g<c.L;g++){K i=c[g],k=/^(&2s;|\\s)+/.X(i),j=N,l=b?b[g]:d+g;I(k!=N){j=k[0].1q();i=i.1o(j.L);j=j.Q(" ",e.13.1W)}i=x(i);I(i.L==0)i=e.13.1W;a+=J.2r(g,l,(j!=N?\'<17 1g="\'+h+\' 5N">\'+j+"</17>":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"</4a>":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i<b.L;i++){K k=b[i],j;I(!(k===N||k.L===0)){j=c(k);h+=u(a.1o(d,k.P-d),j+"48")+u(k.1T,j+k.23);d=k.P+k.L+(k.75||0)}}h+=u(a.1o(d),c()+"48");H h},1H:6(a){K b="",c=["20"],d;I(J.V("2k")==R)J.1n.16=J.1n.1u=11;1l="20";J.V("2l")==R&&c.U("47");I((1u=J.V("1u"))==11)c.U("6S");c.U(J.V("1g-27"));c.U(J.V("1D"));a=a.Q(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"").Q(/\\r/g," ");b=J.V("43-22");I(J.V("42-45")==R)a=n(a,b);Y{O(K h="",g=0;g<b;g++)h+=" ";a=a.Q(/\\t/g,h)}a=a;a:{b=a=a;h=/<2R\\s*\\/?>|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i<b.L&&g>0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i<b.L;i++)b[i]=b[i].1o(g);a=b.1K("\\n")}I(1u)d=J.4d(a);b=J.4c(J.2J,a);b=J.4b(a,b);b=J.49(b,d);I(J.V("41-40"))b=E(b);1j 2H!="1d"&&2H.3S&&2H.3S.1C(/5s/)&&c.U("5t");H b=\'<T 1c="\'+t(J.1c)+\'" 1g="\'+c.1K(" ")+\'">\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"</2d>":"")+\'<2d 1g="17"><T 1g="3O">\'+b+"</T></2d></3P></3T></3Z></T>"},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{}))
@@ -0,0 +1 @@
1
+ var colorbrewer={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}};
@@ -0,0 +1,1401 @@
1
+ (function(exports){
2
+ crossfilter.version = "1.3.13";
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_arrayLengthenUntyped,
443
+ crossfilter_arrayWiden = crossfilter_arrayWidenUntyped;
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
+ if (array.length >= length) return array;
452
+ var copy = new array.constructor(length);
453
+ copy.set(array);
454
+ return copy;
455
+ };
456
+
457
+ crossfilter_arrayWiden = function(array, width) {
458
+ var copy;
459
+ switch (width) {
460
+ case 16: copy = crossfilter_array16(array.length); break;
461
+ case 32: copy = crossfilter_array32(array.length); break;
462
+ default: throw new Error("invalid array width!");
463
+ }
464
+ copy.set(array);
465
+ return copy;
466
+ };
467
+ }
468
+
469
+ function crossfilter_arrayUntyped(n) {
470
+ var array = new Array(n), i = -1;
471
+ while (++i < n) array[i] = 0;
472
+ return array;
473
+ }
474
+
475
+ function crossfilter_arrayLengthenUntyped(array, length) {
476
+ var n = array.length;
477
+ while (n < length) array[n++] = 0;
478
+ return array;
479
+ }
480
+
481
+ function crossfilter_arrayWidenUntyped(array, width) {
482
+ if (width > 32) throw new Error("invalid array width!");
483
+ return array;
484
+ }
485
+ function crossfilter_filterExact(bisect, value) {
486
+ return function(values) {
487
+ var n = values.length;
488
+ return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];
489
+ };
490
+ }
491
+
492
+ function crossfilter_filterRange(bisect, range) {
493
+ var min = range[0],
494
+ max = range[1];
495
+ return function(values) {
496
+ var n = values.length;
497
+ return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];
498
+ };
499
+ }
500
+
501
+ function crossfilter_filterAll(values) {
502
+ return [0, values.length];
503
+ }
504
+ function crossfilter_null() {
505
+ return null;
506
+ }
507
+ function crossfilter_zero() {
508
+ return 0;
509
+ }
510
+ function crossfilter_reduceIncrement(p) {
511
+ return p + 1;
512
+ }
513
+
514
+ function crossfilter_reduceDecrement(p) {
515
+ return p - 1;
516
+ }
517
+
518
+ function crossfilter_reduceAdd(f) {
519
+ return function(p, v) {
520
+ return p + +f(v);
521
+ };
522
+ }
523
+
524
+ function crossfilter_reduceSubtract(f) {
525
+ return function(p, v) {
526
+ return p - f(v);
527
+ };
528
+ }
529
+ exports.crossfilter = crossfilter;
530
+
531
+ function crossfilter() {
532
+ var crossfilter = {
533
+ add: add,
534
+ remove: removeData,
535
+ dimension: dimension,
536
+ groupAll: groupAll,
537
+ size: size
538
+ };
539
+
540
+ var data = [], // the records
541
+ n = 0, // the number of records; data.length
542
+ m = 0, // a bit mask representing which dimensions are in use
543
+ M = 8, // number of dimensions that can fit in `filters`
544
+ filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
545
+ filterListeners = [], // when the filters change
546
+ dataListeners = [], // when data is added
547
+ removeDataListeners = []; // when data is removed
548
+
549
+ // Adds the specified new records to this crossfilter.
550
+ function add(newData) {
551
+ var n0 = n,
552
+ n1 = newData.length;
553
+
554
+ // If there's actually new data to add…
555
+ // Merge the new data into the existing data.
556
+ // Lengthen the filter bitset to handle the new records.
557
+ // Notify listeners (dimensions and groups) that new data is available.
558
+ if (n1) {
559
+ data = data.concat(newData);
560
+ filters = crossfilter_arrayLengthen(filters, n += n1);
561
+ dataListeners.forEach(function(l) { l(newData, n0, n1); });
562
+ }
563
+
564
+ return crossfilter;
565
+ }
566
+
567
+ // Removes all records that match the current filters.
568
+ function removeData() {
569
+ var newIndex = crossfilter_index(n, n),
570
+ removed = [];
571
+ for (var i = 0, j = 0; i < n; ++i) {
572
+ if (filters[i]) newIndex[i] = j++;
573
+ else removed.push(i);
574
+ }
575
+
576
+ // Remove all matching records from groups.
577
+ filterListeners.forEach(function(l) { l(0, [], removed); });
578
+
579
+ // Update indexes.
580
+ removeDataListeners.forEach(function(l) { l(newIndex); });
581
+
582
+ // Remove old filters and data by overwriting.
583
+ for (var i = 0, j = 0, k; i < n; ++i) {
584
+ if (k = filters[i]) {
585
+ if (i !== j) filters[j] = k, data[j] = data[i];
586
+ ++j;
587
+ }
588
+ }
589
+ data.length = j;
590
+ while (n > j) filters[--n] = 0;
591
+ }
592
+
593
+ // Adds a new dimension with the specified value accessor function.
594
+ function dimension(value) {
595
+ var dimension = {
596
+ filter: filter,
597
+ filterExact: filterExact,
598
+ filterRange: filterRange,
599
+ filterFunction: filterFunction,
600
+ filterAll: filterAll,
601
+ top: top,
602
+ bottom: bottom,
603
+ group: group,
604
+ groupAll: groupAll,
605
+ dispose: dispose,
606
+ remove: dispose // for backwards-compatibility
607
+ };
608
+
609
+ var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000
610
+ zero = ~one, // inverted one, e.g., 11110111
611
+ values, // sorted, cached array
612
+ index, // value rank ↦ object id
613
+ newValues, // temporary array storing newly-added values
614
+ newIndex, // temporary array storing newly-added index
615
+ sort = quicksort_by(function(i) { return newValues[i]; }),
616
+ refilter = crossfilter_filterAll, // for recomputing filter
617
+ refilterFunction, // the custom filter function in use
618
+ indexListeners = [], // when data is added
619
+ dimensionGroups = [],
620
+ lo0 = 0,
621
+ hi0 = 0;
622
+
623
+ // Updating a dimension is a two-stage process. First, we must update the
624
+ // associated filters for the newly-added records. Once all dimensions have
625
+ // updated their filters, the groups are notified to update.
626
+ dataListeners.unshift(preAdd);
627
+ dataListeners.push(postAdd);
628
+
629
+ removeDataListeners.push(removeData);
630
+
631
+ // Incorporate any existing data into this dimension, and make sure that the
632
+ // filter bitset is wide enough to handle the new dimension.
633
+ m |= one;
634
+ if (M >= 32 ? !one : m & -(1 << M)) {
635
+ filters = crossfilter_arrayWiden(filters, M <<= 1);
636
+ }
637
+ preAdd(data, 0, n);
638
+ postAdd(data, 0, n);
639
+
640
+ // Incorporates the specified new records into this dimension.
641
+ // This function is responsible for updating filters, values, and index.
642
+ function preAdd(newData, n0, n1) {
643
+
644
+ // Permute new values into natural order using a sorted index.
645
+ newValues = newData.map(value);
646
+ newIndex = sort(crossfilter_range(n1), 0, n1);
647
+ newValues = permute(newValues, newIndex);
648
+
649
+ // Bisect newValues to determine which new records are selected.
650
+ var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
651
+ if (refilterFunction) {
652
+ for (i = 0; i < n1; ++i) {
653
+ if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one;
654
+ }
655
+ } else {
656
+ for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
657
+ for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;
658
+ }
659
+
660
+ // If this dimension previously had no data, then we don't need to do the
661
+ // more expensive merge operation; use the new values and index as-is.
662
+ if (!n0) {
663
+ values = newValues;
664
+ index = newIndex;
665
+ lo0 = lo1;
666
+ hi0 = hi1;
667
+ return;
668
+ }
669
+
670
+ var oldValues = values,
671
+ oldIndex = index,
672
+ i0 = 0,
673
+ i1 = 0;
674
+
675
+ // Otherwise, create new arrays into which to merge new and old.
676
+ values = new Array(n);
677
+ index = crossfilter_index(n, n);
678
+
679
+ // Merge the old and new sorted values, and old and new index.
680
+ for (i = 0; i0 < n0 && i1 < n1; ++i) {
681
+ if (oldValues[i0] < newValues[i1]) {
682
+ values[i] = oldValues[i0];
683
+ index[i] = oldIndex[i0++];
684
+ } else {
685
+ values[i] = newValues[i1];
686
+ index[i] = newIndex[i1++] + n0;
687
+ }
688
+ }
689
+
690
+ // Add any remaining old values.
691
+ for (; i0 < n0; ++i0, ++i) {
692
+ values[i] = oldValues[i0];
693
+ index[i] = oldIndex[i0];
694
+ }
695
+
696
+ // Add any remaining new values.
697
+ for (; i1 < n1; ++i1, ++i) {
698
+ values[i] = newValues[i1];
699
+ index[i] = newIndex[i1] + n0;
700
+ }
701
+
702
+ // Bisect again to recompute lo0 and hi0.
703
+ bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];
704
+ }
705
+
706
+ // When all filters have updated, notify index listeners of the new values.
707
+ function postAdd(newData, n0, n1) {
708
+ indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });
709
+ newValues = newIndex = null;
710
+ }
711
+
712
+ function removeData(reIndex) {
713
+ for (var i = 0, j = 0, k; i < n; ++i) {
714
+ if (filters[k = index[i]]) {
715
+ if (i !== j) values[j] = values[i];
716
+ index[j] = reIndex[k];
717
+ ++j;
718
+ }
719
+ }
720
+ values.length = j;
721
+ while (j < n) index[j++] = 0;
722
+
723
+ // Bisect again to recompute lo0 and hi0.
724
+ var bounds = refilter(values);
725
+ lo0 = bounds[0], hi0 = bounds[1];
726
+ }
727
+
728
+ // Updates the selected values based on the specified bounds [lo, hi].
729
+ // This implementation is used by all the public filter methods.
730
+ function filterIndexBounds(bounds) {
731
+ var lo1 = bounds[0],
732
+ hi1 = bounds[1];
733
+
734
+ if (refilterFunction) {
735
+ refilterFunction = null;
736
+ filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; });
737
+ lo0 = lo1;
738
+ hi0 = hi1;
739
+ return dimension;
740
+ }
741
+
742
+ var i,
743
+ j,
744
+ k,
745
+ added = [],
746
+ removed = [];
747
+
748
+ // Fast incremental update based on previous lo index.
749
+ if (lo1 < lo0) {
750
+ for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {
751
+ filters[k = index[i]] ^= one;
752
+ added.push(k);
753
+ }
754
+ } else if (lo1 > lo0) {
755
+ for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {
756
+ filters[k = index[i]] ^= one;
757
+ removed.push(k);
758
+ }
759
+ }
760
+
761
+ // Fast incremental update based on previous hi index.
762
+ if (hi1 > hi0) {
763
+ for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {
764
+ filters[k = index[i]] ^= one;
765
+ added.push(k);
766
+ }
767
+ } else if (hi1 < hi0) {
768
+ for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {
769
+ filters[k = index[i]] ^= one;
770
+ removed.push(k);
771
+ }
772
+ }
773
+
774
+ lo0 = lo1;
775
+ hi0 = hi1;
776
+ filterListeners.forEach(function(l) { l(one, added, removed); });
777
+ return dimension;
778
+ }
779
+
780
+ // Filters this dimension using the specified range, value, or null.
781
+ // If the range is null, this is equivalent to filterAll.
782
+ // If the range is an array, this is equivalent to filterRange.
783
+ // Otherwise, this is equivalent to filterExact.
784
+ function filter(range) {
785
+ return range == null
786
+ ? filterAll() : Array.isArray(range)
787
+ ? filterRange(range) : typeof range === "function"
788
+ ? filterFunction(range)
789
+ : filterExact(range);
790
+ }
791
+
792
+ // Filters this dimension to select the exact value.
793
+ function filterExact(value) {
794
+ return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values));
795
+ }
796
+
797
+ // Filters this dimension to select the specified range [lo, hi].
798
+ // The lower bound is inclusive, and the upper bound is exclusive.
799
+ function filterRange(range) {
800
+ return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values));
801
+ }
802
+
803
+ // Clears any filters on this dimension.
804
+ function filterAll() {
805
+ return filterIndexBounds((refilter = crossfilter_filterAll)(values));
806
+ }
807
+
808
+ // Filters this dimension using an arbitrary function.
809
+ function filterFunction(f) {
810
+ refilter = crossfilter_filterAll;
811
+
812
+ filterIndexFunction(refilterFunction = f);
813
+
814
+ lo0 = 0;
815
+ hi0 = n;
816
+
817
+ return dimension;
818
+ }
819
+
820
+ function filterIndexFunction(f) {
821
+ var i,
822
+ k,
823
+ x,
824
+ added = [],
825
+ removed = [];
826
+
827
+ for (i = 0; i < n; ++i) {
828
+ if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) {
829
+ if (x) filters[k] &= zero, added.push(k);
830
+ else filters[k] |= one, removed.push(k);
831
+ }
832
+ }
833
+ filterListeners.forEach(function(l) { l(one, added, removed); });
834
+ }
835
+
836
+ // Returns the top K selected records based on this dimension's order.
837
+ // Note: observes this dimension's filter, unlike group and groupAll.
838
+ function top(k) {
839
+ var array = [],
840
+ i = hi0,
841
+ j;
842
+
843
+ while (--i >= lo0 && k > 0) {
844
+ if (!filters[j = index[i]]) {
845
+ array.push(data[j]);
846
+ --k;
847
+ }
848
+ }
849
+
850
+ return array;
851
+ }
852
+
853
+ // Returns the bottom K selected records based on this dimension's order.
854
+ // Note: observes this dimension's filter, unlike group and groupAll.
855
+ function bottom(k) {
856
+ var array = [],
857
+ i = lo0,
858
+ j;
859
+
860
+ while (i < hi0 && k > 0) {
861
+ if (!filters[j = index[i]]) {
862
+ array.push(data[j]);
863
+ --k;
864
+ }
865
+ i++;
866
+ }
867
+
868
+ return array;
869
+ }
870
+
871
+ // Adds a new group to this dimension, using the specified key function.
872
+ function group(key) {
873
+ var group = {
874
+ top: top,
875
+ all: all,
876
+ reduce: reduce,
877
+ reduceCount: reduceCount,
878
+ reduceSum: reduceSum,
879
+ order: order,
880
+ orderNatural: orderNatural,
881
+ size: size,
882
+ dispose: dispose,
883
+ remove: dispose // for backwards-compatibility
884
+ };
885
+
886
+ // Ensure that this group will be removed when the dimension is removed.
887
+ dimensionGroups.push(group);
888
+
889
+ var groups, // array of {key, value}
890
+ groupIndex, // object id ↦ group id
891
+ groupWidth = 8,
892
+ groupCapacity = crossfilter_capacity(groupWidth),
893
+ k = 0, // cardinality
894
+ select,
895
+ heap,
896
+ reduceAdd,
897
+ reduceRemove,
898
+ reduceInitial,
899
+ update = crossfilter_null,
900
+ reset = crossfilter_null,
901
+ resetNeeded = true,
902
+ groupAll = key === crossfilter_null;
903
+
904
+ if (arguments.length < 1) key = crossfilter_identity;
905
+
906
+ // The group listens to the crossfilter for when any dimension changes, so
907
+ // that it can update the associated reduce values. It must also listen to
908
+ // the parent dimension for when data is added, and compute new keys.
909
+ filterListeners.push(update);
910
+ indexListeners.push(add);
911
+ removeDataListeners.push(removeData);
912
+
913
+ // Incorporate any existing data into the grouping.
914
+ add(values, index, 0, n);
915
+
916
+ // Incorporates the specified new values into this group.
917
+ // This function is responsible for updating groups and groupIndex.
918
+ function add(newValues, newIndex, n0, n1) {
919
+ var oldGroups = groups,
920
+ reIndex = crossfilter_index(k, groupCapacity),
921
+ add = reduceAdd,
922
+ initial = reduceInitial,
923
+ k0 = k, // old cardinality
924
+ i0 = 0, // index of old group
925
+ i1 = 0, // index of new record
926
+ j, // object id
927
+ g0, // old group
928
+ x0, // old key
929
+ x1, // new key
930
+ g, // group to add
931
+ x; // key of group to add
932
+
933
+ // If a reset is needed, we don't need to update the reduce values.
934
+ if (resetNeeded) add = initial = crossfilter_null;
935
+
936
+ // Reset the new groups (k is a lower bound).
937
+ // Also, make sure that groupIndex exists and is long enough.
938
+ groups = new Array(k), k = 0;
939
+ groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);
940
+
941
+ // Get the first old key (x0 of g0), if it exists.
942
+ if (k0) x0 = (g0 = oldGroups[0]).key;
943
+
944
+ // Find the first new key (x1), skipping NaN keys.
945
+ while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
946
+
947
+ // While new keys remain…
948
+ while (i1 < n1) {
949
+
950
+ // Determine the lesser of the two current keys; new and old.
951
+ // If there are no old keys remaining, then always add the new key.
952
+ if (g0 && x0 <= x1) {
953
+ g = g0, x = x0;
954
+
955
+ // Record the new index of the old group.
956
+ reIndex[i0] = k;
957
+
958
+ // Retrieve the next old key.
959
+ if (g0 = oldGroups[++i0]) x0 = g0.key;
960
+ } else {
961
+ g = {key: x1, value: initial()}, x = x1;
962
+ }
963
+
964
+ // Add the lesser group.
965
+ groups[k] = g;
966
+
967
+ // Add any selected records belonging to the added group, while
968
+ // advancing the new key and populating the associated group index.
969
+ while (!(x1 > x)) {
970
+ groupIndex[j = newIndex[i1] + n0] = k;
971
+ if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
972
+ if (++i1 >= n1) break;
973
+ x1 = key(newValues[i1]);
974
+ }
975
+
976
+ groupIncrement();
977
+ }
978
+
979
+ // Add any remaining old groups that were greater than all new keys.
980
+ // No incremental reduce is needed; these groups have no new records.
981
+ // Also record the new index of the old group.
982
+ while (i0 < k0) {
983
+ groups[reIndex[i0] = k] = oldGroups[i0++];
984
+ groupIncrement();
985
+ }
986
+
987
+ // If we added any new groups before any old groups,
988
+ // update the group index of all the old records.
989
+ if (k > i0) for (i0 = 0; i0 < n0; ++i0) {
990
+ groupIndex[i0] = reIndex[groupIndex[i0]];
991
+ }
992
+
993
+ // Modify the update and reset behavior based on the cardinality.
994
+ // If the cardinality is less than or equal to one, then the groupIndex
995
+ // is not needed. If the cardinality is zero, then there are no records
996
+ // and therefore no groups to update or reset. Note that we also must
997
+ // change the registered listener to point to the new method.
998
+ j = filterListeners.indexOf(update);
999
+ if (k > 1) {
1000
+ update = updateMany;
1001
+ reset = resetMany;
1002
+ } else {
1003
+ if (!k && groupAll) {
1004
+ k = 1;
1005
+ groups = [{key: null, value: initial()}];
1006
+ }
1007
+ if (k === 1) {
1008
+ update = updateOne;
1009
+ reset = resetOne;
1010
+ } else {
1011
+ update = crossfilter_null;
1012
+ reset = crossfilter_null;
1013
+ }
1014
+ groupIndex = null;
1015
+ }
1016
+ filterListeners[j] = update;
1017
+
1018
+ // Count the number of added groups,
1019
+ // and widen the group index as needed.
1020
+ function groupIncrement() {
1021
+ if (++k === groupCapacity) {
1022
+ reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);
1023
+ groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);
1024
+ groupCapacity = crossfilter_capacity(groupWidth);
1025
+ }
1026
+ }
1027
+ }
1028
+
1029
+ function removeData() {
1030
+ if (k > 1) {
1031
+ var oldK = k,
1032
+ oldGroups = groups,
1033
+ seenGroups = crossfilter_index(oldK, oldK);
1034
+
1035
+ // Filter out non-matches by copying matching group index entries to
1036
+ // the beginning of the array.
1037
+ for (var i = 0, j = 0; i < n; ++i) {
1038
+ if (filters[i]) {
1039
+ seenGroups[groupIndex[j] = groupIndex[i]] = 1;
1040
+ ++j;
1041
+ }
1042
+ }
1043
+
1044
+ // Reassemble groups including only those groups that were referred
1045
+ // to by matching group index entries. Note the new group index in
1046
+ // seenGroups.
1047
+ groups = [], k = 0;
1048
+ for (i = 0; i < oldK; ++i) {
1049
+ if (seenGroups[i]) {
1050
+ seenGroups[i] = k++;
1051
+ groups.push(oldGroups[i]);
1052
+ }
1053
+ }
1054
+
1055
+ if (k > 1) {
1056
+ // Reindex the group index using seenGroups to find the new index.
1057
+ for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]];
1058
+ } else {
1059
+ groupIndex = null;
1060
+ }
1061
+ filterListeners[filterListeners.indexOf(update)] = k > 1
1062
+ ? (reset = resetMany, update = updateMany)
1063
+ : k === 1 ? (reset = resetOne, update = updateOne)
1064
+ : reset = update = crossfilter_null;
1065
+ } else if (k === 1) {
1066
+ if (groupAll) return;
1067
+ for (var i = 0; i < n; ++i) if (filters[i]) return;
1068
+ groups = [], k = 0;
1069
+ filterListeners[filterListeners.indexOf(update)] =
1070
+ update = reset = crossfilter_null;
1071
+ }
1072
+ }
1073
+
1074
+ // Reduces the specified selected or deselected records.
1075
+ // This function is only used when the cardinality is greater than 1.
1076
+ function updateMany(filterOne, added, removed) {
1077
+ if (filterOne === one || resetNeeded) return;
1078
+
1079
+ var i,
1080
+ k,
1081
+ n,
1082
+ g;
1083
+
1084
+ // Add the added values.
1085
+ for (i = 0, n = added.length; i < n; ++i) {
1086
+ if (!(filters[k = added[i]] & zero)) {
1087
+ g = groups[groupIndex[k]];
1088
+ g.value = reduceAdd(g.value, data[k]);
1089
+ }
1090
+ }
1091
+
1092
+ // Remove the removed values.
1093
+ for (i = 0, n = removed.length; i < n; ++i) {
1094
+ if ((filters[k = removed[i]] & zero) === filterOne) {
1095
+ g = groups[groupIndex[k]];
1096
+ g.value = reduceRemove(g.value, data[k]);
1097
+ }
1098
+ }
1099
+ }
1100
+
1101
+ // Reduces the specified selected or deselected records.
1102
+ // This function is only used when the cardinality is 1.
1103
+ function updateOne(filterOne, added, removed) {
1104
+ if (filterOne === one || resetNeeded) return;
1105
+
1106
+ var i,
1107
+ k,
1108
+ n,
1109
+ g = groups[0];
1110
+
1111
+ // Add the added values.
1112
+ for (i = 0, n = added.length; i < n; ++i) {
1113
+ if (!(filters[k = added[i]] & zero)) {
1114
+ g.value = reduceAdd(g.value, data[k]);
1115
+ }
1116
+ }
1117
+
1118
+ // Remove the removed values.
1119
+ for (i = 0, n = removed.length; i < n; ++i) {
1120
+ if ((filters[k = removed[i]] & zero) === filterOne) {
1121
+ g.value = reduceRemove(g.value, data[k]);
1122
+ }
1123
+ }
1124
+ }
1125
+
1126
+ // Recomputes the group reduce values from scratch.
1127
+ // This function is only used when the cardinality is greater than 1.
1128
+ function resetMany() {
1129
+ var i,
1130
+ g;
1131
+
1132
+ // Reset all group values.
1133
+ for (i = 0; i < k; ++i) {
1134
+ groups[i].value = reduceInitial();
1135
+ }
1136
+
1137
+ // Add any selected records.
1138
+ for (i = 0; i < n; ++i) {
1139
+ if (!(filters[i] & zero)) {
1140
+ g = groups[groupIndex[i]];
1141
+ g.value = reduceAdd(g.value, data[i]);
1142
+ }
1143
+ }
1144
+ }
1145
+
1146
+ // Recomputes the group reduce values from scratch.
1147
+ // This function is only used when the cardinality is 1.
1148
+ function resetOne() {
1149
+ var i,
1150
+ g = groups[0];
1151
+
1152
+ // Reset the singleton group values.
1153
+ g.value = reduceInitial();
1154
+
1155
+ // Add any selected records.
1156
+ for (i = 0; i < n; ++i) {
1157
+ if (!(filters[i] & zero)) {
1158
+ g.value = reduceAdd(g.value, data[i]);
1159
+ }
1160
+ }
1161
+ }
1162
+
1163
+ // Returns the array of group values, in the dimension's natural order.
1164
+ function all() {
1165
+ if (resetNeeded) reset(), resetNeeded = false;
1166
+ return groups;
1167
+ }
1168
+
1169
+ // Returns a new array containing the top K group values, in reduce order.
1170
+ function top(k) {
1171
+ var top = select(all(), 0, groups.length, k);
1172
+ return heap.sort(top, 0, top.length);
1173
+ }
1174
+
1175
+ // Sets the reduce behavior for this group to use the specified functions.
1176
+ // This method lazily recomputes the reduce values, waiting until needed.
1177
+ function reduce(add, remove, initial) {
1178
+ reduceAdd = add;
1179
+ reduceRemove = remove;
1180
+ reduceInitial = initial;
1181
+ resetNeeded = true;
1182
+ return group;
1183
+ }
1184
+
1185
+ // A convenience method for reducing by count.
1186
+ function reduceCount() {
1187
+ return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
1188
+ }
1189
+
1190
+ // A convenience method for reducing by sum(value).
1191
+ function reduceSum(value) {
1192
+ return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
1193
+ }
1194
+
1195
+ // Sets the reduce order, using the specified accessor.
1196
+ function order(value) {
1197
+ select = heapselect_by(valueOf);
1198
+ heap = heap_by(valueOf);
1199
+ function valueOf(d) { return value(d.value); }
1200
+ return group;
1201
+ }
1202
+
1203
+ // A convenience method for natural ordering by reduce value.
1204
+ function orderNatural() {
1205
+ return order(crossfilter_identity);
1206
+ }
1207
+
1208
+ // Returns the cardinality of this group, irrespective of any filters.
1209
+ function size() {
1210
+ return k;
1211
+ }
1212
+
1213
+ // Removes this group and associated event listeners.
1214
+ function dispose() {
1215
+ var i = filterListeners.indexOf(update);
1216
+ if (i >= 0) filterListeners.splice(i, 1);
1217
+ i = indexListeners.indexOf(add);
1218
+ if (i >= 0) indexListeners.splice(i, 1);
1219
+ i = removeDataListeners.indexOf(removeData);
1220
+ if (i >= 0) removeDataListeners.splice(i, 1);
1221
+ return group;
1222
+ }
1223
+
1224
+ return reduceCount().orderNatural();
1225
+ }
1226
+
1227
+ // A convenience function for generating a singleton group.
1228
+ function groupAll() {
1229
+ var g = group(crossfilter_null), all = g.all;
1230
+ delete g.all;
1231
+ delete g.top;
1232
+ delete g.order;
1233
+ delete g.orderNatural;
1234
+ delete g.size;
1235
+ g.value = function() { return all()[0].value; };
1236
+ return g;
1237
+ }
1238
+
1239
+ // Removes this dimension and associated groups and event listeners.
1240
+ function dispose() {
1241
+ dimensionGroups.forEach(function(group) { group.dispose(); });
1242
+ var i = dataListeners.indexOf(preAdd);
1243
+ if (i >= 0) dataListeners.splice(i, 1);
1244
+ i = dataListeners.indexOf(postAdd);
1245
+ if (i >= 0) dataListeners.splice(i, 1);
1246
+ i = removeDataListeners.indexOf(removeData);
1247
+ if (i >= 0) removeDataListeners.splice(i, 1);
1248
+ m &= zero;
1249
+ return filterAll();
1250
+ }
1251
+
1252
+ return dimension;
1253
+ }
1254
+
1255
+ // A convenience method for groupAll on a dummy dimension.
1256
+ // This implementation can be optimized since it always has cardinality 1.
1257
+ function groupAll() {
1258
+ var group = {
1259
+ reduce: reduce,
1260
+ reduceCount: reduceCount,
1261
+ reduceSum: reduceSum,
1262
+ value: value,
1263
+ dispose: dispose,
1264
+ remove: dispose // for backwards-compatibility
1265
+ };
1266
+
1267
+ var reduceValue,
1268
+ reduceAdd,
1269
+ reduceRemove,
1270
+ reduceInitial,
1271
+ resetNeeded = true;
1272
+
1273
+ // The group listens to the crossfilter for when any dimension changes, so
1274
+ // that it can update the reduce value. It must also listen to the parent
1275
+ // dimension for when data is added.
1276
+ filterListeners.push(update);
1277
+ dataListeners.push(add);
1278
+
1279
+ // For consistency; actually a no-op since resetNeeded is true.
1280
+ add(data, 0, n);
1281
+
1282
+ // Incorporates the specified new values into this group.
1283
+ function add(newData, n0) {
1284
+ var i;
1285
+
1286
+ if (resetNeeded) return;
1287
+
1288
+ // Add the added values.
1289
+ for (i = n0; i < n; ++i) {
1290
+ if (!filters[i]) {
1291
+ reduceValue = reduceAdd(reduceValue, data[i]);
1292
+ }
1293
+ }
1294
+ }
1295
+
1296
+ // Reduces the specified selected or deselected records.
1297
+ function update(filterOne, added, removed) {
1298
+ var i,
1299
+ k,
1300
+ n;
1301
+
1302
+ if (resetNeeded) return;
1303
+
1304
+ // Add the added values.
1305
+ for (i = 0, n = added.length; i < n; ++i) {
1306
+ if (!filters[k = added[i]]) {
1307
+ reduceValue = reduceAdd(reduceValue, data[k]);
1308
+ }
1309
+ }
1310
+
1311
+ // Remove the removed values.
1312
+ for (i = 0, n = removed.length; i < n; ++i) {
1313
+ if (filters[k = removed[i]] === filterOne) {
1314
+ reduceValue = reduceRemove(reduceValue, data[k]);
1315
+ }
1316
+ }
1317
+ }
1318
+
1319
+ // Recomputes the group reduce value from scratch.
1320
+ function reset() {
1321
+ var i;
1322
+
1323
+ reduceValue = reduceInitial();
1324
+
1325
+ for (i = 0; i < n; ++i) {
1326
+ if (!filters[i]) {
1327
+ reduceValue = reduceAdd(reduceValue, data[i]);
1328
+ }
1329
+ }
1330
+ }
1331
+
1332
+ // Sets the reduce behavior for this group to use the specified functions.
1333
+ // This method lazily recomputes the reduce value, waiting until needed.
1334
+ function reduce(add, remove, initial) {
1335
+ reduceAdd = add;
1336
+ reduceRemove = remove;
1337
+ reduceInitial = initial;
1338
+ resetNeeded = true;
1339
+ return group;
1340
+ }
1341
+
1342
+ // A convenience method for reducing by count.
1343
+ function reduceCount() {
1344
+ return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
1345
+ }
1346
+
1347
+ // A convenience method for reducing by sum(value).
1348
+ function reduceSum(value) {
1349
+ return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
1350
+ }
1351
+
1352
+ // Returns the computed reduce value.
1353
+ function value() {
1354
+ if (resetNeeded) reset(), resetNeeded = false;
1355
+ return reduceValue;
1356
+ }
1357
+
1358
+ // Removes this group and associated event listeners.
1359
+ function dispose() {
1360
+ var i = filterListeners.indexOf(update);
1361
+ if (i >= 0) filterListeners.splice(i);
1362
+ i = dataListeners.indexOf(add);
1363
+ if (i >= 0) dataListeners.splice(i);
1364
+ return group;
1365
+ }
1366
+
1367
+ return reduceCount();
1368
+ }
1369
+
1370
+ // Returns the number of records in this crossfilter, irrespective of any filters.
1371
+ function size() {
1372
+ return n;
1373
+ }
1374
+
1375
+ return arguments.length
1376
+ ? add(arguments[0])
1377
+ : crossfilter;
1378
+ }
1379
+
1380
+ // Returns an array of size n, big enough to store ids up to m.
1381
+ function crossfilter_index(n, m) {
1382
+ return (m < 0x101
1383
+ ? crossfilter_array8 : m < 0x10001
1384
+ ? crossfilter_array16
1385
+ : crossfilter_array32)(n);
1386
+ }
1387
+
1388
+ // Constructs a new array of size n, with sequential values from 0 to n - 1.
1389
+ function crossfilter_range(n) {
1390
+ var range = crossfilter_index(n, n);
1391
+ for (var i = -1; ++i < n;) range[i] = i;
1392
+ return range;
1393
+ }
1394
+
1395
+ function crossfilter_capacity(w) {
1396
+ return w === 8
1397
+ ? 0x100 : w === 16
1398
+ ? 0x10000
1399
+ : 0x100000000;
1400
+ }
1401
+ })(typeof exports !== 'undefined' && exports || this);