crossfilter-rails 1.1.0 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Crossfilter
2
2
  module Rails
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  (function(exports){
2
- crossfilter.version = "1.1.0";
2
+ crossfilter.version = "1.1.3";
3
3
  function crossfilter_identity(d) {
4
4
  return d;
5
5
  }
@@ -23,15 +23,18 @@ function bisect_by(f) {
23
23
  // present in a, the insertion point will be before (to the left of) any
24
24
  // existing entries. The return value is suitable for use as the first
25
25
  // argument to `array.splice` assuming that a is already sorted.
26
+ // Incomparable values such as NaN and undefined are assumed to be at the end
27
+ // of the array.
26
28
  //
27
29
  // The returned insertion point i partitions the array a into two halves so
28
30
  // that all v < x for v in a[lo:i] for the left side and all v >= x for v in
29
31
  // a[i:hi] for the right side.
30
32
  function bisectLeft(a, x, lo, hi) {
31
33
  while (lo < hi) {
32
- var mid = lo + hi >> 1;
33
- if (f(a[mid]) < x) lo = mid + 1;
34
- else hi = mid;
34
+ var mid = lo + hi >>> 1,
35
+ y = f(a[mid]);
36
+ if (x <= y || !(y <= y)) hi = mid;
37
+ else lo = mid + 1;
35
38
  }
36
39
  return lo;
37
40
  }
@@ -44,8 +47,9 @@ function bisect_by(f) {
44
47
  // a[i:hi] for the right side.
45
48
  function bisectRight(a, x, lo, hi) {
46
49
  while (lo < hi) {
47
- var mid = lo + hi >> 1;
48
- if (x < f(a[mid])) hi = mid;
50
+ var mid = lo + hi >>> 1,
51
+ y = f(a[mid]);
52
+ if (x < y || !(y <= y)) hi = mid;
49
53
  else lo = mid + 1;
50
54
  }
51
55
  return lo;
@@ -143,7 +147,7 @@ function insertionsort_by(f) {
143
147
 
144
148
  function insertionsort(a, lo, hi) {
145
149
  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) {
150
+ for (var j = i, t = a[i], x = f(t), y; j > lo && ((y = f(a[j - 1])) > x || !(y <= y)); --j) {
147
151
  a[j] = a[j - 1];
148
152
  }
149
153
  a[j] = t;
@@ -170,6 +174,16 @@ function quicksort_by(f) {
170
174
  }
171
175
 
172
176
  function quicksort(a, lo, hi) {
177
+ // First move NaN and undefined to the end.
178
+ var x, y;
179
+ while (lo < hi && !((x = f(a[hi - 1])) <= x)) hi--;
180
+ for (var i = hi; --i >= lo; ) {
181
+ x = f(y = a[i]);
182
+ if (!(x <= x)) {
183
+ a[i] = a[--hi];
184
+ a[hi] = y;
185
+ }
186
+ }
173
187
 
174
188
  // Compute the two pivots by looking at 5 elements.
175
189
  var sixth = (hi - lo) / 6 | 0,
@@ -823,8 +837,8 @@ function crossfilter() {
823
837
  // Get the first old key (x0 of g0), if it exists.
824
838
  if (k0) x0 = (g0 = oldGroups[0]).key;
825
839
 
826
- // Find the first new key (x1), skipping NaN keys.
827
- while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
840
+ // Find the first new key (x1).
841
+ x1 = key(newValues[i1]);
828
842
 
829
843
  // While new keys remain…
830
844
  while (i1 < n1) {
@@ -848,7 +862,7 @@ function crossfilter() {
848
862
 
849
863
  // Add any selected records belonging to the added group, while
850
864
  // advancing the new key and populating the associated group index.
851
- while (!(x1 > x)) {
865
+ while (x1 <= x || !(x1 <= x1) && !(x <= x)) {
852
866
  groupIndex[j = newIndex[i1] + n0] = k;
853
867
  if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
854
868
  if (++i1 >= n1) break;
@@ -1087,7 +1101,7 @@ function crossfilter() {
1087
1101
  add(data, 0, n);
1088
1102
 
1089
1103
  // Incorporates the specified new values into this group.
1090
- function add(newData, n0, n1) {
1104
+ function add(newData, n0) {
1091
1105
  var i;
1092
1106
 
1093
1107
  if (resetNeeded) return;
@@ -1 +1 @@
1
- (function(a){function b(a){return a}function c(a,b){for(var c=0,d=b.length,e=new Array(d);c<d;++c)e[c]=a[b[c]];return e}function e(a){function b(b,c,d,e){while(d<e){var f=d+e>>1;a(b[f])<c?d=f+1:e=f}return d}function c(b,c,d,e){while(d<e){var f=d+e>>1;c<a(b[f])?e=f:d=f+1}return d}return c.right=c,c.left=b,c}function g(a){function b(a,b,c){var e=c-b,f=(e>>>1)+1;while(--f>0)d(a,f,e,b);return a}function c(a,b,c){var e=c-b,f;while(--e>0)f=a[b],a[b]=a[b+e],a[b+e]=f,d(a,1,e,b);return a}function d(b,c,d,e){var f=b[--e+c],g=a(f),h;while((h=c<<1)<=d){h<d&&a(b[e+h])>a(b[e+h+1])&&h++;if(g<=a(b[e+h]))break;b[e+c]=b[e+h],c=h}b[e+c]=f}return b.sort=c,b}function i(a){function c(c,d,e,f){var g=new Array(f=Math.min(e-d,f)),h,i,j,k;for(i=0;i<f;++i)g[i]=c[d++];b(g,0,f);if(d<e){h=a(g[0]);do if(j=a(k=c[d])>h)g[0]=k,h=a(b(g,0,f)[0]);while(++d<e)}return g}var b=g(a);return c}function k(a){function b(b,c,d){for(var e=c+1;e<d;++e){for(var f=e,g=b[e],h=a(g);f>c&&a(b[f-1])>h;--f)b[f]=b[f-1];b[f]=g}return b}return b}function m(a){function c(a,c,e){return(e-c<n?b:d)(a,c,e)}function d(b,d,e){var f=(e-d)/6|0,g=d+f,h=e-1-f,i=d+e-1>>1,j=i-f,k=i+f,l=b[g],m=a(l),n=b[j],o=a(n),p=b[i],q=a(p),r=b[k],s=a(r),t=b[h],u=a(t),v;m>o&&(v=l,l=n,n=v,v=m,m=o,o=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v),m>q&&(v=l,l=p,p=v,v=m,m=q,q=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),m>s&&(v=l,l=r,r=v,v=m,m=s,s=v),q>s&&(v=p,p=r,r=v,v=q,q=s,s=v),o>u&&(v=n,n=t,t=v,v=o,o=u,u=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v);var w=n,x=o,y=r,z=s;b[g]=l,b[j]=b[d],b[i]=p,b[k]=b[e-1],b[h]=t;var A=d+1,B=e-2,C=x<=z&&x>=z;if(C)for(var D=A;D<=B;++D){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>x)for(;;){var G=a(b[B]);if(G>x){B--;continue}if(G<x){b[D]=b[A],b[A++]=b[B],b[B--]=E;break}b[D]=b[B],b[B--]=E;break}}else for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>z)for(;;){var G=a(b[B]);if(G>z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}b[d]=b[A-1],b[A-1]=w,b[e-1]=b[B+1],b[B+1]=y,c(b,d,A-1),c(b,B+2,e);if(C)return b;if(A<g&&B>h){var H,G;while((H=a(b[A]))<=x&&H>=x)++A;while((G=a(b[B]))<=z&&G>=z)--B;for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<=x&&F>=x)D!==A&&(b[D]=b[A],b[A]=E),A++;else if(F<=z&&F>=z)for(;;){var G=a(b[B]);if(G<=z&&G>=z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}}return c(b,A,B+1)}var b=k(a);return c}function t(a){return new Array(a)}function u(a,b){return function(c){var d=c.length;return[a.left(c,b,0,d),a.right(c,b,0,d)]}}function v(a,b){var c=b[0],d=b[1];return function(b){var e=b.length;return[a.left(b,c,0,e),a.left(b,d,0,e)]}}function w(a){return[0,a.length]}function x(){return null}function y(){return 0}function z(a){return a+1}function A(a){return a-1}function B(a){return function(b,c){return b+ +a(c)}}function C(a){return function(b,c){return b-a(c)}}function D(){function p(b){var c=f,d=b.length;return d&&(e=e.concat(b),k=r(k,f+=d),n.forEach(function(a){a(b,c,d)})),a}function q(a){function P(b,d,e){H=b.map(a),I=J(F(e),0,e),H=c(H,I);var g=K(H),h=g[0],i=g[1],j;for(j=0;j<h;++j)k[I[j]+d]|=p;for(j=i;j<e;++j)k[I[j]+d]|=p;if(!d){t=H,D=I,N=h,O=i;return}var l=t,m=D,n=0,o=0;t=new Array(f),D=E(f,f);for(j=0;n<d&&o<e;++j)l[n]<H[o]?(t[j]=l[n],D[j]=m[n++]):(t[j]=H[o],D[j]=I[o++]+d);for(;n<d;++n,++j)t[j]=l[n],D[j]=m[n];for(;o<e;++o,++j)t[j]=H[o],D[j]=I[o]+d;g=K(t),N=g[0],O=g[1]}function Q(a,b,c){L.forEach(function(a){a(H,I,b,c)}),H=I=null}function R(a){var b,c,d,e=a[0],f=a[1],g=[],h=[];if(e<N)for(b=e,c=Math.min(N,f);b<c;++b)k[d=D[b]]^=p,g.push(d);else if(e>N)for(b=N,c=Math.min(e,O);b<c;++b)k[d=D[b]]^=p,h.push(d);if(f>O)for(b=Math.max(e,O),c=f;b<c;++b)k[d=D[b]]^=p,g.push(d);else if(f<O)for(b=Math.max(N,f),c=O;b<c;++b)k[d=D[b]]^=p,h.push(d);return N=e,O=f,l.forEach(function(a){a(p,g,h)}),o}function S(a){return a==null?V():Array.isArray(a)?U(a):T(a)}function T(a){return R((K=u(d,a))(t))}function U(a){return R((K=v(d,a))(t))}function V(){return R((K=w)(t))}function W(a){var b=[],c=O,d;while(--c>=N&&a>0)k[d=D[c]]||(b.push(e[d]),--a);return b}function X(a){var b=[],c=N,d;while(c<O&&a>0)k[d=D[c]]||(b.push(e[d]),--a),c++;return b}function Y(a){function K(b,c,g,i){function Q(){++n===m&&(p=s(p,j<<=1),h=s(h,j),m=G(j))}var o=d,p=E(n,m),t=v,u=F,w=n,y=0,z=0,A,B,C,D,K,L;J&&(t=u=x),d=new Array(n),n=0,h=w>1?r(h,f):E(f,m),w&&(C=(B=o[0]).key);while(z<i&&!((D=a(b[z]))>=D))++z;while(z<i){if(B&&C<=D){K=B,L=C,p[y]=n;if(B=o[++y])C=B.key}else K={key:D,value:u()},L=D;d[n]=K;while(!(D>L)){h[A=c[z]+g]=n,k[A]&q||(K.value=t(K.value,e[A]));if(++z>=i)break;D=a(b[z])}Q()}while(y<w)d[p[y]=n]=o[y++],Q();if(n>y)for(y=0;y<g;++y)h[y]=p[h[y]];A=l.indexOf(H),n>1?(H=M,I=O):(n===1?(H=N,I=P):(H=x,I=x),h=null),l[A]=H}function M(a,b,c){if(a===p||J)return;var f,g,i,j;for(f=0,i=b.length;f<i;++f)k[g=b[f]]&q||(j=d[h[g]],j.value=v(j.value,e[g]));for(f=0,i=c.length;f<i;++f)(k[g=c[f]]&q)===a&&(j=d[h[g]],j.value=w(j.value,e[g]))}function N(a,b,c){if(a===p||J)return;var f,g,h,i=d[0];for(f=0,h=b.length;f<h;++f)k[g=b[f]]&q||(i.value=v(i.value,e[g]));for(f=0,h=c.length;f<h;++f)(k[g=c[f]]&q)===a&&(i.value=w(i.value,e[g]))}function O(){var a,b;for(a=0;a<n;++a)d[a].value=F();for(a=0;a<f;++a)k[a]&q||(b=d[h[a]],b.value=v(b.value,e[a]))}function P(){var a,b=d[0];b.value=F();for(a=0;a<f;++a)k[a]&q||(b.value=v(b.value,e[a]))}function Q(){return J&&(I(),J=!1),d}function R(a){var b=o(Q(),0,d.length,a);return u.sort(b,0,b.length)}function S(a,b,d){return v=a,w=b,F=d,J=!0,c}function T(){return S(z,A,y)}function U(a){return S(B(a),C(a),y)}function V(a){function b(b){return a(b.value)}return o=i(b),u=g(b),c}function W(){return V(b)}function X(){return n}var c={top:R,all:Q,reduce:S,reduceCount:T,reduceSum:U,order:V,orderNatural:W,size:X},d,h,j=8,m=G(j),n=0,o,u,v,w,F,H=x,I=x,J=!0;return arguments.length<1&&(a=b),l.push(H),L.push(K),K(t,D,0,f),T().orderNatural()}function Z(){var a=Y(x),b=a.all;return delete a.all,delete a.top,delete a.order,delete a.orderNatural,delete a.size,a.value=function(){return b()[0].value},a}var o={filter:S,filterExact:T,filterRange:U,filterAll:V,top:W,bottom:X,group:Y,groupAll:Z},p=1<<h++,q=~p,t,D,H,I,J=m(function(a){return H[a]}),K=w,L=[],N=0,O=0;return n.unshift(P),n.push(Q),h>j&&(k=s(k,j<<=1)),P(e,0,f),Q(e,0,f),o}function t(){function i(a,d,g){var i;if(h)return;for(i=d;i<f;++i)k[i]||(b=c(b,e[i]))}function j(a,f,g){var i,j,l;if(h)return;for(i=0,l=f.length;i<l;++i)k[j=f[i]]||(b=c(b,e[j]));for(i=0,l=g.length;i<l;++i)k[j=g[i]]===a&&(b=d(b,e[j]))}function m(){var a;b=g();for(a=0;a<f;++a)k[a]||(b=c(b,e[a]))}function o(b,e,f){return c=b,d=e,g=f,h=!0,a}function p(){return o(z,A,y)}function q(a){return o(B(a),C(a),y)}function r(){return h&&(m(),h=!1),b}var a={reduce:o,reduceCount:p,reduceSum:q,value:r},b,c,d,g,h=!0;return l.push(j),n.push(i),i(e,0,f),p()}function D(){return f}var a={add:p,dimension:q,groupAll:t,size:D},e=[],f=0,h=0,j=8,k=o(0),l=[],n=[];return arguments.length?p(arguments[0]):a}function E(a,b){return(b<257?o:b<65537?p:q)(a)}function F(a){var b=E(a,a);for(var c=-1;++c<a;)b[c]=c;return b}function G(a){return a===8?256:a===16?65536:4294967296}D.version="1.1.0",D.permute=c;var d=D.bisect=e(b);d.by=e;var f=D.heap=g(b);f.by=g;var h=D.heapselect=i(b);h.by=i;var j=D.insertionsort=k(b);j.by=k;var l=D.quicksort=m(b);l.by=m;var n=32,o=t,p=t,q=t,r=b,s=b;typeof Uint8Array!="undefined"&&(o=function(a){return new Uint8Array(a)},p=function(a){return new Uint16Array(a)},q=function(a){return new Uint32Array(a)},r=function(a,b){var c=new a.constructor(b);return c.set(a),c},s=function(a,b){var c;switch(b){case 16:c=p(a.length);break;case 32:c=q(a.length);break;default:throw new Error("invalid array width!")}return c.set(a),c}),a.crossfilter=D})(this);
1
+ (function(r){function n(r){return r}function t(r,n){for(var t=0,u=n.length,e=Array(u);u>t;++t)e[t]=r[n[t]];return e}function u(r){function n(n,t,u,e){for(;e>u;){var f=u+e>>>1,o=r(n[f]);o>=t||!(o>=o)?e=f:u=f+1}return u}function t(n,t,u,e){for(;e>u;){var f=u+e>>>1,o=r(n[f]);o>t||!(o>=o)?e=f:u=f+1}return u}return t.right=t,t.left=n,t}function e(r){function n(r,n,t){for(var e=t-n,f=(e>>>1)+1;--f>0;)u(r,f,e,n);return r}function t(r,n,t){for(var e,f=t-n;--f>0;)e=r[n],r[n]=r[n+f],r[n+f]=e,u(r,1,f,n);return r}function u(n,t,u,e){for(var f,o=n[--e+t],i=r(o);(f=t<<1)<=u&&(u>f&&r(n[e+f])>r(n[e+f+1])&&f++,!(i<=r(n[e+f])));)n[e+t]=n[e+f],t=f;n[e+t]=o}return n.sort=t,n}function f(r){function n(n,u,e,f){var o,i,a,c,l=Array(f=Math.min(e-u,f));for(i=0;f>i;++i)l[i]=n[u++];if(t(l,0,f),e>u){o=r(l[0]);do(a=r(c=n[u])>o)&&(l[0]=c,o=r(t(l,0,f)[0]));while(++u<e)}return l}var t=e(r);return n}function o(r){function n(n,t,u){for(var e=t+1;u>e;++e){for(var f,o=e,i=n[e],a=r(i);o>t&&((f=r(n[o-1]))>a||!(f>=f));--o)n[o]=n[o-1];n[o]=i}return n}return n}function i(r){function n(r,n,e){return(z>e-n?u:t)(r,n,e)}function t(t,u,e){for(var f,o;e>u&&!((f=r(t[e-1]))<=f);)e--;for(var i=e;--i>=u;)f=r(o=t[i]),f>=f||(t[i]=t[--e],t[e]=o);var a,c=0|(e-u)/6,l=u+c,v=e-1-c,h=u+e-1>>1,s=h-c,d=h+c,g=t[l],p=r(g),y=t[s],b=r(y),m=t[h],A=r(m),k=t[d],w=r(k),E=t[v],M=r(E);p>b&&(a=g,g=y,y=a,a=p,p=b,b=a),w>M&&(a=k,k=E,E=a,a=w,w=M,M=a),p>A&&(a=g,g=m,m=a,a=p,p=A,A=a),b>A&&(a=y,y=m,m=a,a=b,b=A,A=a),p>w&&(a=g,g=k,k=a,a=p,p=w,w=a),A>w&&(a=m,m=k,k=a,a=A,A=w,w=a),b>M&&(a=y,y=E,E=a,a=b,b=M,M=a),b>A&&(a=y,y=m,m=a,a=b,b=A,A=a),w>M&&(a=k,k=E,E=a,a=w,w=M,M=a);var x=y,U=b,z=k,N=w;t[l]=g,t[s]=t[u],t[h]=m,t[d]=t[e-1],t[v]=E;var C=u+1,S=e-2,q=N>=U&&U>=N;if(q)for(var O=C;S>=O;++O){var R=t[O],j=r(R);if(U>j)O!==C&&(t[O]=t[C],t[C]=R),++C;else if(j>U)for(;;){var B=r(t[S]);{if(!(B>U)){if(U>B){t[O]=t[C],t[C++]=t[S],t[S--]=R;break}t[O]=t[S],t[S--]=R;break}S--}}}else for(var O=C;S>=O;O++){var R=t[O],j=r(R);if(U>j)O!==C&&(t[O]=t[C],t[C]=R),++C;else if(j>N)for(;;){var B=r(t[S]);{if(!(B>N)){U>B?(t[O]=t[C],t[C++]=t[S],t[S--]=R):(t[O]=t[S],t[S--]=R);break}if(S--,O>S)break}}}if(t[u]=t[C-1],t[C-1]=x,t[e-1]=t[S+1],t[S+1]=z,n(t,u,C-1),n(t,S+2,e),q)return t;if(l>C&&S>v){for(var D,B;(D=r(t[C]))<=U&&D>=U;)++C;for(;(B=r(t[S]))<=N&&B>=N;)--S;for(var O=C;S>=O;O++){var R=t[O],j=r(R);if(U>=j&&j>=U)O!==C&&(t[O]=t[C],t[C]=R),C++;else if(N>=j&&j>=N)for(;;){var B=r(t[S]);{if(!(N>=B&&B>=N)){U>B?(t[O]=t[C],t[C++]=t[S],t[S--]=R):(t[O]=t[S],t[S--]=R);break}if(S--,O>S)break}}}}return n(t,C,S+1)}var u=o(r);return n}function a(r){return Array(r)}function c(r,n){return function(t){var u=t.length;return[r.left(t,n,0,u),r.right(t,n,0,u)]}}function l(r,n){var t=n[0],u=n[1];return function(n){var e=n.length;return[r.left(n,t,0,e),r.left(n,u,0,e)]}}function v(r){return[0,r.length]}function h(){return null}function s(){return 0}function d(r){return r+1}function g(r){return r-1}function p(r){return function(n,t){return n+ +r(t)}}function y(r){return function(n,t){return n-r(t)}}function b(){function r(r){var n=M,t=r.length;return t&&(E=E.concat(r),z=q(z,M+=t),S.forEach(function(u){u(r,n,t)})),b}function u(r){function u(n,u,e){J=n.map(r),K=T(A(e),0,e),J=t(J,K);var f,o=V(J),i=o[0],a=o[1];for(f=0;i>f;++f)z[K[f]+u]|=P;for(f=a;e>f;++f)z[K[f]+u]|=P;if(!u)return H=J,I=K,X=i,Y=a,void 0;var c=H,l=I,v=0,h=0;for(H=Array(M),I=m(M,M),f=0;u>v&&e>h;++f)c[v]<J[h]?(H[f]=c[v],I[f]=l[v++]):(H[f]=J[h],I[f]=K[h++]+u);for(;u>v;++v,++f)H[f]=c[v],I[f]=l[v];for(;e>h;++h,++f)H[f]=J[h],I[f]=K[h]+u;o=V(H),X=o[0],Y=o[1]}function o(r,n,t){W.forEach(function(r){r(J,K,n,t)}),J=K=null}function a(r){var n,t,u,e=r[0],f=r[1],o=[],i=[];if(X>e)for(n=e,t=Math.min(X,f);t>n;++n)z[u=I[n]]^=P,o.push(u);else if(e>X)for(n=X,t=Math.min(e,Y);t>n;++n)z[u=I[n]]^=P,i.push(u);if(f>Y)for(n=Math.max(e,Y),t=f;t>n;++n)z[u=I[n]]^=P,o.push(u);else if(Y>f)for(n=Math.max(X,f),t=Y;t>n;++n)z[u=I[n]]^=P,i.push(u);return X=e,Y=f,C.forEach(function(r){r(P,o,i)}),L}function b(r){return null==r?j():Array.isArray(r)?R(r):N(r)}function N(r){return a((V=c(w,r))(H))}function R(r){return a((V=l(w,r))(H))}function j(){return a((V=v)(H))}function B(r){for(var n,t=[],u=Y;--u>=X&&r>0;)z[n=I[u]]||(t.push(E[n]),--r);return t}function D(r){for(var n,t=[],u=X;Y>u&&r>0;)z[n=I[u]]||(t.push(E[n]),--r),u++;return t}function F(r){function t(n,t,e,f){function c(){++L===K&&(b=O(b,J<<=1),S=O(S,J),K=k(J))}var l,v,s,d,g,p,y=N,b=m(L,K),A=B,w=F,x=L,U=0,R=0;for(X&&(A=w=h),N=Array(L),L=0,S=x>1?q(S,M):m(M,K),x&&(s=(v=y[0]).key),d=r(n[R]);f>R;){for(v&&d>=s?(g=v,p=s,b[U]=L,(v=y[++U])&&(s=v.key)):(g={key:d,value:w()},p=d),N[L]=g;!(!(p>=d)&&(d>=d||p>=p)||(S[l=t[R]+e]=L,z[l]&Q||(g.value=A(g.value,E[l])),++R>=f));)d=r(n[R]);c()}for(;x>U;)N[b[U]=L]=y[U++],c();if(L>U)for(U=0;e>U;++U)S[U]=b[S[U]];l=C.indexOf(T),L>1?(T=u,V=i):(1===L?(T=o,V=a):(T=h,V=h),S=null),C[l]=T}function u(r,n,t){if(r!==P&&!X){var u,e,f,o;for(u=0,f=n.length;f>u;++u)z[e=n[u]]&Q||(o=N[S[e]],o.value=B(o.value,E[e]));for(u=0,f=t.length;f>u;++u)(z[e=t[u]]&Q)===r&&(o=N[S[e]],o.value=D(o.value,E[e]))}}function o(r,n,t){if(r!==P&&!X){var u,e,f,o=N[0];for(u=0,f=n.length;f>u;++u)z[e=n[u]]&Q||(o.value=B(o.value,E[e]));for(u=0,f=t.length;f>u;++u)(z[e=t[u]]&Q)===r&&(o.value=D(o.value,E[e]))}}function i(){var r,n;for(r=0;L>r;++r)N[r].value=F();for(r=0;M>r;++r)z[r]&Q||(n=N[S[r]],n.value=B(n.value,E[r]))}function a(){var r,n=N[0];for(n.value=F(),r=0;M>r;++r)z[r]&Q||(n.value=B(n.value,E[r]))}function c(){return X&&(V(),X=!1),N}function l(r){var n=R(c(),0,N.length,r);return j.sort(n,0,n.length)}function v(r,n,t){return B=r,D=n,F=t,X=!0,G}function b(){return v(d,g,s)}function A(r){return v(p(r),y(r),s)}function w(r){function n(n){return r(n.value)}return R=f(n),j=e(n),G}function x(){return w(n)}function U(){return L}var N,S,R,j,B,D,F,G={top:l,all:c,reduce:v,reduceCount:b,reduceSum:A,order:w,orderNatural:x,size:U},J=8,K=k(J),L=0,T=h,V=h,X=!0;return arguments.length<1&&(r=n),C.push(T),W.push(t),t(H,I,0,M),b().orderNatural()}function G(){var r=F(h),n=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return n()[0].value},r}var H,I,J,K,L={filter:b,filterExact:N,filterRange:R,filterAll:j,top:B,bottom:D,group:F,groupAll:G},P=1<<x++,Q=~P,T=i(function(r){return J[r]}),V=v,W=[],X=0,Y=0;return S.unshift(u),S.push(o),x>U&&(z=O(z,U<<=1)),u(E,0,M),o(E,0,M),L}function o(){function r(r,n){var t;if(!h)for(t=n;M>t;++t)z[t]||(i=a(i,E[t]))}function n(r,n,t){var u,e,f;if(!h){for(u=0,f=n.length;f>u;++u)z[e=n[u]]||(i=a(i,E[e]));for(u=0,f=t.length;f>u;++u)z[e=t[u]]===r&&(i=c(i,E[e]))}}function t(){var r;for(i=l(),r=0;M>r;++r)z[r]||(i=a(i,E[r]))}function u(r,n,t){return a=r,c=n,l=t,h=!0,v}function e(){return u(d,g,s)}function f(r){return u(p(r),y(r),s)}function o(){return h&&(t(),h=!1),i}var i,a,c,l,v={reduce:u,reduceCount:e,reduceSum:f,value:o},h=!0;return C.push(n),S.push(r),r(E,0,M),e()}function a(){return M}var b={add:r,dimension:u,groupAll:o,size:a},E=[],M=0,x=0,U=8,z=N(0),C=[],S=[];return arguments.length?r(arguments[0]):b}function m(r,n){return(257>n?N:65537>n?C:S)(r)}function A(r){for(var n=m(r,r),t=-1;++t<r;)n[t]=t;return n}function k(r){return 8===r?256:16===r?65536:4294967296}b.version="1.1.3",b.permute=t;var w=b.bisect=u(n);w.by=u;var E=b.heap=e(n);E.by=e;var M=b.heapselect=f(n);M.by=f;var x=b.insertionsort=o(n);x.by=o;var U=b.quicksort=i(n);U.by=i;var z=32,N=a,C=a,S=a,q=n,O=n;"undefined"!=typeof Uint8Array&&(N=function(r){return new Uint8Array(r)},C=function(r){return new Uint16Array(r)},S=function(r){return new Uint32Array(r)},q=function(r,n){var t=new r.constructor(n);return t.set(r),t},O=function(r,n){var t;switch(n){case 16:t=C(r.length);break;case 32:t=S(r.length);break;default:throw Error("invalid array width!")}return t.set(r),t}),r.crossfilter=b})(this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crossfilter-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubyforge_project:
73
- rubygems_version: 1.8.24
73
+ rubygems_version: 1.8.25
74
74
  signing_key:
75
75
  specification_version: 3
76
76
  summary: Gemified crossfilter.js asset for Rails