PageRenderTime 32ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/js/main.built.js

https://bitbucket.org/JT5D/data-chart-plugin
JavaScript | 359 lines | 36 code | 24 blank | 299 comment | 11 complexity | 72476d101354682c12db7ed914f78212 MD5 | raw file
  1. /*!
  2. * jQuery JavaScript Library v1.9.1
  3. * http://jquery.com/
  4. *
  5. * Includes Sizzle.js
  6. * http://sizzlejs.com/
  7. *
  8. * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
  9. * Released under the MIT license
  10. * http://jquery.org/license
  11. *
  12. * Date: 2013-2-4
  13. */
  14. /*!
  15. * Sizzle CSS Selector Engine
  16. * Copyright 2012 jQuery Foundation and other contributors
  17. * Released under the MIT license
  18. * http://sizzlejs.com/
  19. */
  20. // Underscore.js 1.4.4
  21. // http://underscorejs.org
  22. // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
  23. // Underscore may be freely distributed under the MIT license.
  24. // Underscore.string
  25. // (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>
  26. // Underscore.string is freely distributable under the terms of the MIT license.
  27. // Documentation: https://github.com/epeli/underscore.string
  28. // Some code is borrowed from MooTools and Alexandru Marasteanu.
  29. // Version '2.3.0'
  30. // Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
  31. // (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
  32. // Backbone may be freely distributed under the MIT license.
  33. // For all details and documentation:
  34. // http://backbonejs.org
  35. /**
  36. * Backbone-relational.js 0.7.1+
  37. * (c) 2011-2013 Paul Uithol and contributors (https://github.com/PaulUithol/Backbone-relational/graphs/contributors)
  38. *
  39. * Backbone-relational may be freely distributed under the MIT license; see the accompanying LICENSE.txt.
  40. * For details and documentation: https://github.com/PaulUithol/Backbone-relational.
  41. * Depends on Backbone (and thus on Underscore as well): https://github.com/documentcloud/backbone.
  42. */
  43. // Backbone.Marionette, v0.9.11
  44. // Copyright (c)2012 Derick Bailey, Muted Solutions, LLC.
  45. // Distributed under MIT license
  46. // http://github.com/derickbailey/backbone.marionette
  47. /**
  48. * Adapted from the official plugin text.js
  49. *
  50. * Uses UnderscoreJS micro-templates : http://documentcloud.github.com/underscore/#template
  51. * @author Julien Cabanès <julien@zeeagency.com>
  52. * @version 0.2
  53. *
  54. * @license RequireJS text 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
  55. * Available via the MIT or new BSD license.
  56. * see: http://github.com/jrburke/requirejs for details
  57. */
  58. /*! jQuery UI - v1.10.1 - 2013-02-28
  59. * http://jqueryui.com
  60. * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js, jquery.ui.slider.js
  61. * Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
  62. /*! backbone.paginator - v0.5 - 1/8/2013
  63. * http://github.com/addyosmani/backbone.paginator
  64. * Copyright (c) 2013 Addy Osmani; Licensed MIT */
  65. /* ===================================================
  66. * bootstrap-transition.js v2.3.0
  67. * http://twitter.github.com/bootstrap/javascript.html#transitions
  68. * ===================================================
  69. * Copyright 2012 Twitter, Inc.
  70. *
  71. * Licensed under the Apache License, Version 2.0 (the "License");
  72. * you may not use this file except in compliance with the License.
  73. * You may obtain a copy of the License at
  74. *
  75. * http://www.apache.org/licenses/LICENSE-2.0
  76. *
  77. * Unless required by applicable law or agreed to in writing, software
  78. * distributed under the License is distributed on an "AS IS" BASIS,
  79. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  80. * See the License for the specific language governing permissions and
  81. * limitations under the License.
  82. * ========================================================== */
  83. /* =========================================================
  84. * bootstrap-modal.js v2.3.0
  85. * http://twitter.github.com/bootstrap/javascript.html#modals
  86. * =========================================================
  87. * Copyright 2012 Twitter, Inc.
  88. *
  89. * Licensed under the Apache License, Version 2.0 (the "License");
  90. * you may not use this file except in compliance with the License.
  91. * You may obtain a copy of the License at
  92. *
  93. * http://www.apache.org/licenses/LICENSE-2.0
  94. *
  95. * Unless required by applicable law or agreed to in writing, software
  96. * distributed under the License is distributed on an "AS IS" BASIS,
  97. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  98. * See the License for the specific language governing permissions and
  99. * limitations under the License.
  100. * ========================================================= */
  101. /* ============================================================
  102. * bootstrap-dropdown.js v2.3.0
  103. * http://twitter.github.com/bootstrap/javascript.html#dropdowns
  104. * ============================================================
  105. * Copyright 2012 Twitter, Inc.
  106. *
  107. * Licensed under the Apache License, Version 2.0 (the "License");
  108. * you may not use this file except in compliance with the License.
  109. * You may obtain a copy of the License at
  110. *
  111. * http://www.apache.org/licenses/LICENSE-2.0
  112. *
  113. * Unless required by applicable law or agreed to in writing, software
  114. * distributed under the License is distributed on an "AS IS" BASIS,
  115. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  116. * See the License for the specific language governing permissions and
  117. * limitations under the License.
  118. * ============================================================ */
  119. /* =============================================================
  120. * bootstrap-scrollspy.js v2.3.0
  121. * http://twitter.github.com/bootstrap/javascript.html#scrollspy
  122. * =============================================================
  123. * Copyright 2012 Twitter, Inc.
  124. *
  125. * Licensed under the Apache License, Version 2.0 (the "License");
  126. * you may not use this file except in compliance with the License.
  127. * You may obtain a copy of the License at
  128. *
  129. * http://www.apache.org/licenses/LICENSE-2.0
  130. *
  131. * Unless required by applicable law or agreed to in writing, software
  132. * distributed under the License is distributed on an "AS IS" BASIS,
  133. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  134. * See the License for the specific language governing permissions and
  135. * limitations under the License.
  136. * ============================================================== */
  137. /* ========================================================
  138. * bootstrap-tab.js v2.3.0
  139. * http://twitter.github.com/bootstrap/javascript.html#tabs
  140. * ========================================================
  141. * Copyright 2012 Twitter, Inc.
  142. *
  143. * Licensed under the Apache License, Version 2.0 (the "License");
  144. * you may not use this file except in compliance with the License.
  145. * You may obtain a copy of the License at
  146. *
  147. * http://www.apache.org/licenses/LICENSE-2.0
  148. *
  149. * Unless required by applicable law or agreed to in writing, software
  150. * distributed under the License is distributed on an "AS IS" BASIS,
  151. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  152. * See the License for the specific language governing permissions and
  153. * limitations under the License.
  154. * ======================================================== */
  155. /* ===========================================================
  156. * bootstrap-tooltip.js v2.3.0
  157. * http://twitter.github.com/bootstrap/javascript.html#tooltips
  158. * Inspired by the original jQuery.tipsy by Jason Frame
  159. * ===========================================================
  160. * Copyright 2012 Twitter, Inc.
  161. *
  162. * Licensed under the Apache License, Version 2.0 (the "License");
  163. * you may not use this file except in compliance with the License.
  164. * You may obtain a copy of the License at
  165. *
  166. * http://www.apache.org/licenses/LICENSE-2.0
  167. *
  168. * Unless required by applicable law or agreed to in writing, software
  169. * distributed under the License is distributed on an "AS IS" BASIS,
  170. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  171. * See the License for the specific language governing permissions and
  172. * limitations under the License.
  173. * ========================================================== */
  174. /* ===========================================================
  175. * bootstrap-popover.js v2.3.0
  176. * http://twitter.github.com/bootstrap/javascript.html#popovers
  177. * ===========================================================
  178. * Copyright 2012 Twitter, Inc.
  179. *
  180. * Licensed under the Apache License, Version 2.0 (the "License");
  181. * you may not use this file except in compliance with the License.
  182. * You may obtain a copy of the License at
  183. *
  184. * http://www.apache.org/licenses/LICENSE-2.0
  185. *
  186. * Unless required by applicable law or agreed to in writing, software
  187. * distributed under the License is distributed on an "AS IS" BASIS,
  188. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  189. * See the License for the specific language governing permissions and
  190. * limitations under the License.
  191. * =========================================================== */
  192. /* ==========================================================
  193. * bootstrap-affix.js v2.3.0
  194. * http://twitter.github.com/bootstrap/javascript.html#affix
  195. * ==========================================================
  196. * Copyright 2012 Twitter, Inc.
  197. *
  198. * Licensed under the Apache License, Version 2.0 (the "License");
  199. * you may not use this file except in compliance with the License.
  200. * You may obtain a copy of the License at
  201. *
  202. * http://www.apache.org/licenses/LICENSE-2.0
  203. *
  204. * Unless required by applicable law or agreed to in writing, software
  205. * distributed under the License is distributed on an "AS IS" BASIS,
  206. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  207. * See the License for the specific language governing permissions and
  208. * limitations under the License.
  209. * ========================================================== */
  210. /* ==========================================================
  211. * bootstrap-alert.js v2.3.0
  212. * http://twitter.github.com/bootstrap/javascript.html#alerts
  213. * ==========================================================
  214. * Copyright 2012 Twitter, Inc.
  215. *
  216. * Licensed under the Apache License, Version 2.0 (the "License");
  217. * you may not use this file except in compliance with the License.
  218. * You may obtain a copy of the License at
  219. *
  220. * http://www.apache.org/licenses/LICENSE-2.0
  221. *
  222. * Unless required by applicable law or agreed to in writing, software
  223. * distributed under the License is distributed on an "AS IS" BASIS,
  224. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  225. * See the License for the specific language governing permissions and
  226. * limitations under the License.
  227. * ========================================================== */
  228. /* ============================================================
  229. * bootstrap-button.js v2.3.0
  230. * http://twitter.github.com/bootstrap/javascript.html#buttons
  231. * ============================================================
  232. * Copyright 2012 Twitter, Inc.
  233. *
  234. * Licensed under the Apache License, Version 2.0 (the "License");
  235. * you may not use this file except in compliance with the License.
  236. * You may obtain a copy of the License at
  237. *
  238. * http://www.apache.org/licenses/LICENSE-2.0
  239. *
  240. * Unless required by applicable law or agreed to in writing, software
  241. * distributed under the License is distributed on an "AS IS" BASIS,
  242. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  243. * See the License for the specific language governing permissions and
  244. * limitations under the License.
  245. * ============================================================ */
  246. /* =============================================================
  247. * bootstrap-collapse.js v2.3.0
  248. * http://twitter.github.com/bootstrap/javascript.html#collapse
  249. * =============================================================
  250. * Copyright 2012 Twitter, Inc.
  251. *
  252. * Licensed under the Apache License, Version 2.0 (the "License");
  253. * you may not use this file except in compliance with the License.
  254. * You may obtain a copy of the License at
  255. *
  256. * http://www.apache.org/licenses/LICENSE-2.0
  257. *
  258. * Unless required by applicable law or agreed to in writing, software
  259. * distributed under the License is distributed on an "AS IS" BASIS,
  260. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  261. * See the License for the specific language governing permissions and
  262. * limitations under the License.
  263. * ============================================================ */
  264. /* ==========================================================
  265. * bootstrap-carousel.js v2.3.0
  266. * http://twitter.github.com/bootstrap/javascript.html#carousel
  267. * ==========================================================
  268. * Copyright 2012 Twitter, Inc.
  269. *
  270. * Licensed under the Apache License, Version 2.0 (the "License");
  271. * you may not use this file except in compliance with the License.
  272. * You may obtain a copy of the License at
  273. *
  274. * http://www.apache.org/licenses/LICENSE-2.0
  275. *
  276. * Unless required by applicable law or agreed to in writing, software
  277. * distributed under the License is distributed on an "AS IS" BASIS,
  278. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  279. * See the License for the specific language governing permissions and
  280. * limitations under the License.
  281. * ========================================================== */
  282. /* =============================================================
  283. * bootstrap-typeahead.js v2.3.0
  284. * http://twitter.github.com/bootstrap/javascript.html#typeahead
  285. * =============================================================
  286. * Copyright 2012 Twitter, Inc.
  287. *
  288. * Licensed under the Apache License, Version 2.0 (the "License");
  289. * you may not use this file except in compliance with the License.
  290. * You may obtain a copy of the License at
  291. *
  292. * http://www.apache.org/licenses/LICENSE-2.0
  293. *
  294. * Unless required by applicable law or agreed to in writing, software
  295. * distributed under the License is distributed on an "AS IS" BASIS,
  296. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  297. * See the License for the specific language governing permissions and
  298. * limitations under the License.
  299. * ============================================================ */
  300. function DataChart(e){function n(){var e=[],t;return _.each($("text.legenedHLabel"),function(t){e.push(t.getBBox().width)}),t=_.max(e),t===Number.NEGATIVE_INFINITY&&(t=80),t+2}function r(){var e=t.$el.find("g.yAxisFactors")[0]||!1,n;return e?n=e.getBBox().width:n=0,n+2}function i(){var e=$("g.legenedHLabels text")[0]||!1,t;return e?t=e.getBBox().height:t=0,t}function s(e){var n=e.factors[_.last(t.display.order)];return t.display.colors[_.last(t.display.order)][n]||"#708090"}function o(e){return e?t.animate_speed:0}function u(){var e=n(),i=t.dataset,s=$(window).height()-Math.floor($("#header").height()*1.1);s/i.length<=14&&(s=i.length*14),t.dimensions={paper:{height:s,width:t.size.width,margin:10}};var o=t.dimensions;o.yAxis={height:o.paper.height-o.paper.margin*2,width:r()+e},o.xAxis={header:{height:o.paper.margin*2,width:o.paper.width-o.paper.margin*2-o.yAxis.width},footer:{height:o.paper.margin*2,width:o.paper.width-o.paper.margin*2-o.yAxis.width}},o.view={height:o.paper.height-o.paper
  301. .margin*2-o.xAxis.header.height-o.xAxis.footer.height,width:o.paper.width-o.paper.margin*2-o.yAxis.width}}function a(e){e||(e={}),t.$el=e.$el||$("div.datachart"),t.size={width:0,height:0},t.dataset=e.dataset||[],t.display={},t.display_text=e.display_text||"title",t.zoom={low:0,high:1},t.animate_speed=400,t.xScale,t.yScale,t.mean=0,t.tooltip,t.infotip}function f(e){return _.reduce(e,function(e,t){return e+t},0)/e.length}function l(){var e=_.max(_(t.dataset).pluck("error"))||0,n=_.min(_(t.dataset).pluck("error"))||0,r=_.pluck(t.dataset,"value");e===Number.NEGATIVE_INFINITY&&(e=0),n===Number.NEGATIVE_INFINITY&&(n=0),e===Number.POSITIVE_INFINITY&&(e=0),n===Number.POSITIVE_INFINITY&&(n=0),t.xScale=d3.scale.linear().domain([function(){return _.min(r)<0?(_.min(r)-Math.abs(n))*(1-t.zoom.low):_.max(r)*t.zoom.low}(),(_.max(r)+e)*t.zoom.high]).range([0,t.dimensions.view.width]),t.xAxis=d3.svg.axis().scale(t.xScale).orient("top")}function c(){t.yScale=d3.scale.ordinal().domain(_.range(t.dataset.length
  302. )).rangeRoundBands([0,t.dimensions.view.height],.25)}function h(){l(),c(),t.mean=f(_.pluck(t.dataset,"value"))}function p(){t.xAxisHeader.style("fill","none").call(t.xAxis);var e={transform:"translate(0,"+t.yScale(t.dataset.length)+")",fill:"#ccc","font-size":"12px","font-family":'"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'};t.xAxisHeader.append("g").attr("class","guide_lines_x").call(t.xAxis.tickFormat("").tickSize(-t.dimensions.view.height,0,0));var n={fill:"#000","font-size":12,"font-family":'"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'};t.xAxisHeader.selectAll("g.xAxis.header g text").style(n);var r={stroke:"#CCC"};t.xAxisHeader.selectAll("g.guide_lines_x g line").style(r)}function d(){var e=d3.selectAll("div.infotip").remove();t.infotip=d3.select("body").append("div").attr("class","infotip").style("position","absolute").style("z-index","10").style("visibility","hidden"),t.yAxisLabels.attr("transform","translate("+r()+", 0)");var i=t.yAxisLabels
  303. .selectAll(".legenedHLabel").data(t.dataset),s=n(),o=Math.floor(t.yScale.rangeBand());o>=18&&(o=18),o<=2&&(o=2);var u={"class":"legenedHLabel",y:function(e,n){return t.yScale(n)+t.yScale.rangeBand()/2},fill:"#333",width:function(e){return e[t.display_text]===undefined?0:s},"dominant-baseline":"central","text-anchor":"right","font-size":o,"font-family":'"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'};i.enter().append("text").attr(u).text(function(e){return t.display_text==="value"?Math.round(e[t.display_text]*100)/100:e[t.display_text]||""}),i.exit().remove(),i.attr(u).text(function(e){return t.display_text==="value"?Math.round(e[t.display_text]*100)/100:e[t.display_text]||""}),i.on("mouseover",function(){return t.infotip.style("visibility","visible")}).on("mousemove",function(e){return t.infotip.style("top",event.pageY-16+"px").style("left",event.pageX+10+"px").html(function(){var n=e.factors,r="<h3>"+e[t.display_text]+"</h3><ol>";return _.each(_.keys(n),function(e){r+="<li><strong>"+
  304. _.str.titleize(e)+":</strong> "+_.str.titleize(String(n[e]))+"</li>"}),r+="</ol>"})}).on("mouseout",function(){return t.infotip.style("visibility","hidden")})}function v(){var e=n(),r=t.yAxisFactors.selectAll("g").data(t.display.order),i={"class":function(e){return"factorBars "+e},height:t.dimensions.yAxis.height,width:24,opacity:function(e){return t.display.shown[e]===!1?0:1},transform:function(e,t){return"translate("+t*28+", 0)"}};r.enter().append("g").attr(i),r.exit().remove(),r.attr(i).each(g)}function m(e,n,r){var i=[],s=0,o=[];_.each(t.dataset,function(r,s){if(_.isFunction(r)===!1){var o=r.factors[t.display.order[n]],u=t.display.colors[e][o];i.push({hex:u,opt:o})}}),_.each(i,function(e,t){e.hex!==(i[t+1]||{}).hex&&(o.push({s:s,e:t,fill:e.hex,opt:e.opt}),s=t+1)});var u=d3.select(r).selectAll("rect.factorBarGrouped").remove();_.each(o,function(e){var n={"class":"factorBarGrouped",width:24,y:function(){return t.yScale(e.s)},x:0,height:function(){return e.s===e.e?t.yScale.rangeBand():
  305. t.yScale(e.e)+t.yScale.rangeBand()-t.yScale(e.s)},fill:function(){return e.fill}},i=d3.select(r).append("rect").attr(n);i.on("mouseover",function(n){var r=d3.select(this).attr("fill",d3.rgb(e.fill).brighter(.2));return t.tooltip.style("visibility","visible")}).on("mousemove",function(n){return t.tooltip.style("top",event.pageY-16+"px").style("left",event.pageX+10+"px").text(e.opt)}).on("mouseout",function(n){var r=d3.select(this).attr("fill",e.fill);return t.tooltip.style("visibility","hidden")})})}function g(){var e=this;yAxisFactorRect=d3.select(this).selectAll("rect").data(t.dataset);var n=arguments[0],r=arguments[1],i={"class":"factorBars",width:24,y:function(e,n){return t.yScale(n)},x:0,height:t.yScale.rangeBand(),fill:function(e,i){var s=e.factors[t.display.order[r]];return t.display.colors[n][s]||"#708090"}};yAxisFactorRect.enter().append("rect").attr(i),yAxisFactorRect.exit().remove(),yAxisFactorRect.transition().duration(t.animate_speed).attr(i),yAxisFactorRect.on("mouseover",function(
  306. e){return t.infotip.style("visibility","visible")}).on("mousemove",function(e){return t.infotip.style("top",event.pageY-16+"px").style("left",event.pageX+10+"px").html(function(){var t=e.factors[n],r="<h3>Combined:</h3><ol>",i=!1;return _.each(t,function(e,t){t<=2?r+="<li><strong>"+e[0]+":</strong> n = "+e[1]+";</li>":i=!0}),i&&(r+="<li>more...</li>"),r+="</ol>"})}).on("mouseout",function(e){return t.infotip.style("visibility","hidden")}),m(n,r,e)}function y(e){var n=d3.selectAll("div.tooltip").remove();t.tooltip=d3.select("body").append("div").attr("class","tooltip").style("position","absolute").style("z-index","10").style("visibility","hidden");var r=t.view.selectAll("rect").data(t.dataset),i={"class":"sampleBars",y:function(e,n){return t.yScale(n)},x:function(e,n){var r;return e.value>=0?(r=t.xScale(0),r>=t.dimensions.view.width&&(r=t.dimensions.view.width)):r=t.xScale(e.value),r<=0&&(r=0),r},width:function(e){var n,r=t.xScale(0),i=0;return e.value>=0?(r>=0&&(i=r),n=t.xScale(e.value)-
  307. i,n+i>=t.dimensions.view.width&&(n=t.dimensions.view.width-i)):n=r,n<=0&&(n=0),n},height:t.yScale.rangeBand(),fill:function(e){return s(e)}};r.enter().append("rect").attr(i),r.exit().remove(),r.transition().duration(o(e)).attr(i),r.on("mouseover",function(e){var n=d3.select(this).attr("fill",d3.rgb(s(e)).brighter(.2));return t.tooltip.style("visibility","visible")}).on("mousemove",function(e){return t.tooltip.style("top",event.pageY-16+"px").style("left",event.pageX+10+"px").text(Math.round(e.value*100)/100)}).on("mouseout",function(e){var n=d3.select(this).attr("fill",s(e));return t.tooltip.style("visibility","hidden")}),b(e)}function b(e){var n=t.view.selectAll("line.verticalError").data(t.dataset),r=function(e,n){var r=0;return e.value>=0?(r=t.xScale(e.value),n&&e.error&&(r+=t.xScale(e.error)-t.xScale(0))):(r=t.xScale(e.value),n&&e.error&&(r-=Math.abs(t.xScale(e.error)))),r>=t.dimensions.view.width&&(r=t.dimensions.view.width),r<=0&&(r=0),r},i={"class":"verticalError",x1:function(e,t
  308. ){return r(e,!0)},x2:function(e,t){return r(e,!0)},y1:function(e,n){return t.yScale(n)},y2:function(e,n){return t.yScale(n)+t.yScale.rangeBand()}},s={stroke:"rgb(224,154,37)","stroke-width":function(e){return e.error===0?0:1}};n.enter().append("svg:line").attr(i).style(s),n.exit().remove(),n.transition().duration(o(e)).attr(i).style(s);var u=t.view.selectAll("line.horizontalError").data(t.dataset),a={"class":"horizontalError",x1:function(e,t){return r(e,!1)},y1:function(e,n){return t.yScale(n)+t.yScale.rangeBand()/2},x2:function(e,t){return r(e,!0)},y2:function(e,n){return t.yScale(n)+t.yScale.rangeBand()/2}},f={stroke:"rgb(224,154,37)","stroke-width":function(e){return e.error===0?0:1}};u.enter().append("svg:line").attr(a).style(f),u.exit().remove(),u.transition().duration(o(e)).attr(a).style(f)}function w(){t.view.selectAll("line.meanBar").remove(),t.xAxisFooter.selectAll("text.mean").remove();if(t.xScale(t.mean)<t.dimensions.view.width&&t.xScale(t.mean)>0){var e=t.view.selectAll("line.meanBar"
  309. ).data([t.mean]),n={"class":"meanBar",x1:function(){return t.xScale(t.mean)},x2:function(){return t.xScale(t.mean)},y1:0,y2:t.dimensions.view.height,stroke:"#333","stroke-width":.5};e.enter().append("line").attr(n),e.exit().remove(),e.attr(n);var r=t.xAxisFooter.selectAll("text").data([t.mean]),i={"class":"mean",x:function(){return t.xScale(t.mean)},y:0,dy:14,"text-anchor":"middle",fill:"#333","font-size":"12px","font-family":'"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'};r.enter().append("text").attr(i).text(Math.round(t.mean*100)/100),r.exit().remove(),r.attr(i)}}var t=this;return this.searchHighlight=function(e){return $.each($("svg g.yAxis text.legenedHLabel"),function(t,n){var r=n.textContent.toLowerCase().trim(),i;(e==r.substring(0,e.length)||r.indexOf(e)!=-1)&&e.length>0?i="steelblue":i="#333",d3.select(n).attr("fill",i)}),this},this.refresh=function(){var e=t.dimensions;d(),u();var n={width:e.paper.width,height:e.paper.height};t.paper.attr(n);var r={height:e.
  310. yAxis.height,width:e.yAxis.width,transform:"translate("+e.paper.margin+", "+(e.paper.margin+e.xAxis.header.height)+")"};t.yAxis=t.yAxis.attr(r);var i={height:e.xAxis.header.height,width:e.xAxis.header.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", "+(e.paper.margin+e.xAxis.header.height)+")"};t.xAxisHeader=t.xAxisHeader.attr(i);var s={height:e.xAxis.header.height,width:e.xAxis.header.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", "+(e.paper.margin+e.xAxis.header.height+e.view.height)+")"};t.xAxisFooter=t.xAxisFooter.attr(s);var o={height:e.view.height,width:e.view.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", "+(e.paper.margin+e.xAxis.header.height)+")"};return t.view=t.view.attr(o),h(),p(),d(),v(),w(),y(!0),this},this.init=function(){return u(),h(),this},this.drawWindowGroups=function(){var e=t.dimensions,n={"class":"paper",width:e.paper.width,height:e.paper.height};t.paper=d3.select(t.$el[0]).append("svg").attr(n);var i={"class":"yAxis"
  311. ,height:e.yAxis.height,width:e.yAxis.width,transform:"translate("+e.paper.margin+", 0)"};t.yAxis=t.paper.append("g").attr(i),t.yAxisFactors=t.yAxis.append("g").attr("class","yAxisFactors"),t.yAxisLabels=t.yAxis.append("g").attr("class","legenedHLabels").attr("transform","translate("+r()+", 0)");var s={"class":"xAxis header",height:e.xAxis.header.height,width:e.xAxis.header.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", "+(e.paper.margin+e.xAxis.header.height)+")"};t.xAxisHeader=t.paper.append("g").attr(s);var o={"class":"xAxis footer",height:e.xAxis.header.height,width:e.xAxis.header.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", "+(e.paper.margin+e.xAxis.header.height+e.view.height)+")"};t.xAxisFooter=t.paper.append("g").attr(o);var u={"class":"view",height:e.view.height,width:e.view.width,transform:"translate("+(e.paper.margin+e.yAxis.width)+", 0)"};return t.view=t.paper.append("g").attr(u),this},this.changeZoom=function(){return l(),p(),y(!1),w(),this}
  312. ,a(e),this}(function(e,t){function P(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function B(e){var t=H[e]={};return b.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(e,n,r,i){if(!b.acceptData(e))return;var s,o,u=b.expando,a=typeof n=="string",f=e.nodeType,c=f?b.cache:e,h=f?e[u]:e[u]&&u;if((!h||!c[h]||!i&&!c[h].data)&&a&&r===t)return;h||(f?e[u]=h=l.pop()||b.guid++:h=u),c[h]||(c[h]={},f||(c[h].toJSON=b.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=b.extend(c[h],n):c[h].data=b.extend(c[h].data,n);return s=c[h],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[b.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[b.camelCase(n)])):o=s,o}function q(e,t,n){if(!b.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?b.cache:e,a=o?e[b.expando]:b.expando;if(!u[a])return;if(t){s=n?u[a]:u[a].data;if(s){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in s?t=[t]:(t=b.camelCase(t),t in s?t=[t]:t=t.split
  313. (" "));for(r=0,i=t.length;r<i;r++)delete s[t[r]];if(!(n?U:b.isEmptyObject)(s))return}}if(!n){delete u[a].data;if(!U(u[a]))return}o?b.cleanData([e],!0):b.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null}function R(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(F,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:j.test(r)?b.parseJSON(r):r}catch(s){}b.data(e,n,r)}else r=t}return r}function U(e){var t;for(t in e){if(t==="data"&&b.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function it(){return!0}function st(){return!1}function ct(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ht(e,t,n){t=t||0;if(b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if(typeof t=="string"){var r=b.grep(e,function(e){return e.nodeType===1});if(at.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b
  314. .grep(e,function(e){return b.inArray(e,t)>=0===n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Mt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function _t(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Dt(e){var t=Ct.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Pt(e,t){var n,r=0;for(;(n=e[r])!=null;r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function Ht(e,t){if(t.nodeType!==1||!b.hasData(e))return;var n,r,i,s=b._data(e),o=b._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)b.event.add(t,n,u[n][r])}o.data&&(o.data=b.extend({},o.data))}function Bt(e,t){var n,r,i;if(t.nodeType!==1)return;n=t.nodeName.toLowerCase();if(!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute
  315. (b.expando)}if(n==="script"&&t.text!==e.text)_t(t).text=e.text,Dt(t);else if(n==="object")t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML);else if(n==="input"&&xt.test(e.type))t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value);else if(n==="option")t.defaultSelected=t.selected=e.defaultSelected;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function jt(e,n){var r,s,o=0,u=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!u)for(u=[],r=e.childNodes||e;(s=r[o])!=null;o++)!n||b.nodeName(s,n)?u.push(s):b.merge(u,jt(s,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],u):u}function Ft(e){xt.test(e.type)&&(e.defaultChecked=e.checked)}function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--){t=en[i]+n;if(t in e)return t}return r}function nn(e,t){return e=t||e,b
  316. .css(e,"display")==="none"||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o<u;o++){r=e[o];if(!r.style)continue;s[o]=b._data(r,"olddisplay"),n=r.style.display,t?(!s[o]&&n==="none"&&(r.style.display=""),r.style.display===""&&nn(r)&&(s[o]=b._data(r,"olddisplay",an(r.nodeName)))):s[o]||(i=nn(r),(n&&n!=="none"||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display")))}for(o=0;o<u;o++){r=e[o];if(!r.style)continue;if(!t||r.style.display==="none"||r.style.display==="")r.style.display=t?s[o]||"":"none"}return e}function sn(e,t,n){var r=$t.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function on(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=b.css(e,n+Zt[s],!0,i)),r?(n==="content"&&(o-=b.css(e,"padding"+Zt[s],!0,i)),n!=="margin"&&(o-=b.css(e,"border"+Zt[s]+"Width",!0,i))):(o+=b.css(e,"padding"+Zt[s],!0,i),n!=="padding"&&(o+=b.css(e,"border"+Zt[s]+"Width",!0,i)));return o}function un(e,t,n){var r=!0,i=t==="width"?
  317. e.offsetWidth:e.offsetHeight,s=qt(e),o=b.support.boxSizing&&b.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=Rt(e,t,s);if(i<0||i==null)i=e.style[t];if(Jt.test(i))return i;r=o&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+on(e,t,n||(o?"border":"content"),r,s)+"px"}function an(e){var t=s,n=Qt[e];if(!n){n=fn(e,t);if(n==="none"||!n)It=(It||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=fn(e,t),It.detach();Qt[e]=n}return n}function fn(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}function vn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||cn.test(e)?r(e,i):vn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&b.type(t)==="object")for(i in t)vn(e+"["+i+"]",t[i],n,r);else r(e,t)}function _n(e){return function(t,
  318. n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(E)||[];if(b.isFunction(n))while(r=s[i++])r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Dn(e,t,n,r){function o(u){var a;return i[u]=!0,b.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f=="string"&&!s&&!i[f])return t.dataTypes.unshift(f),o(f),!1;if(s)return!(a=f)}),a}var i={},s=e===An;return o(t.dataTypes[0])||!i["*"]&&o("*")}function Pn(e,n){var r,i,s=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(u in l)u in r&&(n[l[u]]=r[u]);while(f[0]==="*")f.shift(),s===t&&(s=e.mimeType||n.getResponseHeader("Content-Type"));if(s)for(u in a)if(a[u]&&a[u].test(s)){f.unshift(u);break}if(f[0]in r)o=f[0];else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}i||(i=u)}o=o||i}if(o)return o!==f[0]&&f.unshift(o),r[o]}function Bn(e,t){var n,r
  319. ,i,s,o={},u=0,a=e.dataTypes.slice(),f=a[0];e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(a[1])for(i in e.converters)o[i.toLowerCase()]=e.converters[i];for(;r=a[++u];)if(r!=="*"){if(f!=="*"&&f!==r){i=o[f+" "+r]||o["* "+r];if(!i)for(n in o){s=n.split(" ");if(s[1]===r){i=o[f+" "+s[0]]||o["* "+s[0]];if(i){i===!0?i=o[n]:o[n]!==!0&&(r=s[0],a.splice(u--,0,r));break}}}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(l){return{state:"parsererror",error:i?l:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Gn[t]||[]).concat(Gn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,s=0,o=Qn.length,u=b.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=Xn||Yn(),n=Math.max
  320. (0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;o<a;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),s<1&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Yn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;i=!0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;tr(l,f.opts.specialEasing);for(;s<o;s++){r=Qn[s].call(f,e,l,f.opts);if(r)return r}return Zn(f,l),b.isFunction(f.opts.start)&&f.opts.start.call(e,f),b.fx.timer(b.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function tr(e,t){var n,r,i,s,o;for(i in e){r=b.camelCase(
  321. i),s=t[r],n=e[i],b.isArray(n)&&(s=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),o=b.cssHooks[r];if(o&&"expand"in o){n=o.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=s)}else t[r]=s}}function nr(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&nn(e);n.queue||(l=b._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,b.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],b.css(e,"display")==="inline"&&b.css(e,"float")==="none"&&(!b.support.inlineBlockNeedsLayout||an(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",b.support.shrinkWrapBlocks||h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t){o=t[i];if($n.exec(o)){delete t[i],a=a||o==="toggle";if(o===(m?"hide"
  322. :"show"))continue;v.push(i)}}s=v.length;if(s){u=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?b(e).show():h.done(function(){b(e).hide()}),h.done(function(){var t;b._removeData(e,"fxshow");for(t in d)b.style(e,t,d[t])});for(i=0;i<s;i++)r=v[i],f=h.createTween(r,m?u[r]:0),d[r]=u[r]||b.style(e,r),r in u||(u[r]=f.start,m&&(f.end=f.start,f.start=r==="width"||r==="height"?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}function ir(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function sr(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=typeof t,s=e.document,o=e.location,u=e.jQuery,a=e.$,f={},l=[],c="1.9.1",h=l.concat,p=l.push,d=l.slice,v=l.indexOf,m=f.toString,g=f.hasOwnProperty,y=c.trim,b=function(e,t){return new b.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,E=/\S+/g,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
  323. ,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,T=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/^[\],:{}\s]*$/,C=/(?:^|:|,)(?:\s*\[)+/g,k=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,L=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,A=/^-ms-/,O=/-([\da-z])/gi,M=function(e,t){return t.toUpperCase()},_=function(e){if(s.addEventListener||e.type==="load"||s.readyState==="complete")D(),b.ready()},D=function(){s.addEventListener?(s.removeEventListener("DOMContentLoaded",_,!1),e.removeEventListener("load",_,!1)):(s.detachEvent("onreadystatechange",_),e.detachEvent("onload",_))};b.fn=b.prototype={jquery:c,constructor:b,init:function(e,n,r){var i,o;if(!e)return this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?i=[null,e,null]:i=x.exec(e);if(i&&(i[1]||!n)){if(i[1]){n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:s,!0));if(T.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}o=s.getElementById
  324. (i[2]);if(o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=s,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return d.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},map:function(e){return this
  325. .pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:p,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!b.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((s=arguments[a])!=null)for(i in s){e=u[i],r=s[i];if(u===r)continue;l&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,o=e&&b.isArray(e)?e:[]):o=e&&b.isPlainObject(e)?e:{},u[i]=b.extend(l,o,r)):r!==t&&(u[i]=r)}return u},b.extend({noConflict:function(t){return e.$===b&&(e.$=a),t&&e.jQuery===b&&(e.jQuery=u),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?--b.readyWait:b.isReady)return;if(!s.body)return setTimeout(b.ready);b.isReady=!0;if(e!==!0&&--b.readyWait>0)return;n.resolveWith(s,[b]),b.fn.trigger&&b(s).trigger("ready").off
  326. ("ready")},isFunction:function(e){return b.type(e)==="function"},isArray:Array.isArray||function(e){return b.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):typeof e=="object"||typeof e=="function"?f[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||b.type(e)!=="object"||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||g.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||s;var r=T.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(t){if(e.JSON&&e.JSON.parse)return e
  327. .JSON.parse(t);if(t===null)return t;if(typeof t=="string"){t=b.trim(t);if(t&&N.test(t.replace(k,"@").replace(L,"]").replace(C,"")))return(new Function("return "+t))()}b.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(A,"ms-").replace(O,M)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=P(e);if(n)if(o)for(;i<s;i++){r=t.apply(e[i],n);if(r===!1)break}else for(i in e){r=t.apply(e[i],n);if(r===!1)break}else if(o)for(;i<s;i++){r=t.call(e[i],i,e[i]);if(r===!1)break}else for(
  328. i in e){r=t.call(e[i],i,e[i]);if(r===!1)break}return e},trim:y&&!y.call("\ufeff\u00a0")?function(e){return e==null?"":y.call(e)}:function(e){return e==null?"":(e+"").replace(S,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(P(Object(e))?b.merge(n,typeof e=="string"?[e]:e):p.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(v)return v.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=P(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),r!=null&&(u[u.length]=r);return h.apply([],u)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(s=e[n],n=e,e=s),b.isFunction(e)?(r=
  329. d.call(arguments,2),i=function(){return e.apply(n||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=r==null;if(b.type(r)==="object"){s=!0;for(a in r)b.access(e,n,a,r[a],!0,o,u)}else if(i!==t){s=!0,b.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(b(e),n)}));if(n)for(;a<f;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)))}return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n){n=b.Deferred();if(s.readyState==="complete")setTimeout(b.ready);else if(s.addEventListener)s.addEventListener("DOMContentLoaded",_,!1),e.addEventListener("load",_,!1);else{s.attachEvent("onreadystatechange",_),e.attachEvent("onload",_);var r=!1;try{r=e.frameElement==null&&s.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}D(),b.ready()}}()}}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error"
  330. .split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),r=b(s);var H={};b.Callbacks=function(e){e=typeof e=="string"?H[e]||B(e):b.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){r=e.memory&&t,i=!0,o=u||0,u=0,s=a.length,n=!0;for(;a&&o<s;o++)if(a[o].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,a&&(f?f.length&&l(f.shift()):r?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);r==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&r!=="string"&&i(n)})})(arguments),n?s=a.length:r&&(u=t,l(r))}return this},remove:function(){return a&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,a,r))>-1)a.splice(r,1),n&&(r<=s&&s--,r<=o&&o--)}),this},has:function(e){return e?b.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],this},disable:function(){return a=f=r=t,this},disabled:function(){return!a},lock:function(){return f=t,r||c.disable(),this},locked:function(){return!f},fireWith:function(
  331. e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!i||f)&&(n?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,s){var o=s[0],u=b.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,
  332. t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=r!==1||e&&b.isFunction(e.promise)?r:0,s=i===1?e:b.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),b.support=function(){var t,n,r,o,u,a,f,l,c,h,p=s.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};u=s.createElement("select"),f=u.appendChild(s.createElement("option")),o=p.getElementsByTagName("input"
  333. )[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:p.className!=="t",leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!o.value,optSelected:f.selected,enctype:!!s.createElement("form").enctype,html5Clone:s.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:s.compatMode==="CSS1Compat",deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,u.disabled=!0,t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}o=s.createElement("input"),o.setAttribute("value",""),t.input=o.getAttribute("value")==="",o.value="t",o.setAttribute("type","radio"),t.radioValue=
  334. o.value==="t",o.setAttribute("checked","t"),o.setAttribute("name","t"),a=s.createDocumentFragment(),a.appendChild(o),t.appendChecked=o.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+h,"t"),t[h+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle=p.style.backgroundClip==="content-box",b(function(){var n,r,o,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=s.getElementsByTagName("body")[0];if(!a)return;n=s.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"
  335. ),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=o[0].offsetHeight===0,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=c&&o[0].offsetHeight===0,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=p.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(p,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(p,null)||{width:"4px"}).width==="4px",r=p.appendChild(s.createElement("div")),r.style.cssText=p.style.cssText=u,r.style.margi