UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

910 lines (909 loc) 28.9 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, Number_$type, Point_$type, markType } from "igniteui-angular-core"; import { Rect } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { Random } from "igniteui-angular-core"; import { isNaN_, isInfinity } from "igniteui-angular-core"; /** * @hidden */ export let CategoryTransitionSourceFramePreparer = /*@__PURE__*/ (() => { class CategoryTransitionSourceFramePreparer extends Base { constructor() { super(...arguments); this.c = new Random(0); } x(a, b, c, d, e, f, g, h, i, j, k, l) { b.ag = new Rect(0, 0, 0, 1, 1); b.k.clear(); b.p.clear(); b.s.clear(); b.v.clear(); b.n.clear(); b.m.clear(); b.l.clear(); b.i.clear(); if (b.r != null) { b.r.clear(); } let m = false; let n = false; let o = false; if (e != null) { o = e.dc; } if (f != null) { m = f.dn; } if (e != null) { n = e.dn; } let p = g; if (p == 0) { p = h; } let q = null; if (p == 20) { if (a.bo == null) { p = 1; } q = a.k4(); } switch (p) { case 20: let r = k(); this.ac(q, b, c, r, d); break; case 1: let s = k(); this.ae(b, c, s, d, o); break; case 7: this.ab(b, c, false, d, l); break; case 9: this.ad(b, c, true, d, l); break; case 10: this.ad(b, c, false, d, l); break; case 8: this.ab(b, c, true, d, l); break; case 2: this.af(b, c, false); break; case 3: this.af(b, c, true); break; case 4: this.ag(b, c, true); break; case 5: this.ag(b, c, false); break; case 6: this.l(b, c); b.ag = new Rect(0, 0.5, 0.5, 0, 0); break; case 16: if (o) { this.aa(b, c, n, d, l); } else if (d) { this.ad(b, c, m, d, l); } else { this.ab(b, c, n, d, l); } break; case 17: if (o) { this.z(b, c, !m, d, l); } else if (d) { this.ad(b, c, !m, d, l); } else { this.ab(b, c, !n, d, l); } break; case 18: if (o) { let t = k(); this.ae(b, c, t, d, o); } else if (d) { this.ab(b, c, n, d, l); } else { this.ad(b, c, m, d, l); } break; case 19: if (o) { let u = 1; this.ae(b, c, u, d, o); } else if (d) { this.ab(b, c, !n, d, l); } else { this.ad(b, c, !m, d, l); } break; case 12: if (d) { this.ag(b, c, m); } else { this.af(b, c, n); } break; case 13: if (d) { this.ag(b, c, !m); } else { this.af(b, c, !n); } break; case 14: if (d) { this.af(b, c, n); } else { this.ag(b, c, m); } break; case 15: if (d) { this.af(b, c, !n); } else { this.ag(b, c, !m); } break; case 11: this.y(b, c); break; } if (i == 0) { i = j; } b.ab(); c.ab(); switch (i) { case 3: this.d(b.k.count, p, b.u, c.u, e, f, d, l); this.d(b.s.count, p, b.t, c.t, e, f, d, l); this.d(b.v.count, p, b.w, c.w, e, f, d, l); this.d(b.n.count, p, b.q, c.q, e, f, d, l); this.d(b.m.count, p, b.o, c.o, e, f, d, l); this.o(b, c, (v, w, x) => this.d(v.count, p, b.j._inner[x], c.j._inner[x], e, f, d, l)); break; case 2: let v = k(); this.f(b.k.count, v, p, b.k, c.k, b.u, c.u, e, f, d, l); this.h(b.s.count, v, p, b.s, c.s, b.t, c.t, e, f, d, l); this.h(b.v.count, v, p, b.v, c.v, b.w, c.w, e, f, d, l); this.h(b.n.count, v, p, b.n, c.n, b.q, c.q, e, f, d, l); this.g(b.m.count, v, p, b.m, c.m, b.o, c.o, e, f, d, l); this.o(b, c, (w, x, y) => this.h(w.count, v, p, w, x, b.j._inner[y], c.j._inner[y], e, f, d, l)); break; case 4: this.e(b.k.count, p, b.u, c.u); this.e(b.s.count, p, b.t, c.t); this.e(b.v.count, p, b.w, c.w); this.e(b.n.count, p, b.q, c.q); this.e(b.m.count, p, b.o, c.o); this.o(b, c, (w, x, y) => this.e(w.count, p, b.j._inner[y], c.j._inner[y])); break; } } ac(a, b, c, d, e) { if (a.r != null || b.r != null || c.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } if (c.r == null) { c.r = new List$1(Number_$type, 0); } this.t(a.r, b.r, c.r, e, d, true); } this.r(a.k, b.k, c.k, e, d, true); this.t(a.p, b.p, c.p, e, d, true); this.w(a.s, b.s, c.s, e, d, true); this.w(a.v, b.v, c.v, e, d, true); this.w(a.n, b.n, c.n, e, d, true); this.t(a.m, b.m, c.m, e, d, true); this.t(a.l, b.l, c.l, e, d, true); this.n(a, b, c, (f, g, h, i) => this.w(f, g, h, e, d, true)); } e(a, b, c, d) { if (a == 0) { return; } for (let e = 0; e < a; e++) { c.add(1 + this.c.nextDouble()); d.add(1 + this.c.nextDouble()); } } f(a, b, c, d, e, f, g, h, i, j, k) { if (a == 0) { return; } let l = false; let m = i; if (j) { m = h; } if (m != null) { l = m.dn; } let n = k.bottom; let o = k.bottom; let p = k.top; if (j) { o = k.right; p = k.left; } if (l) { o = k.top; p = k.bottom; if (j) { o = k.left; p = k.right; } } b = Math.max(b, Math.min(p, o)); b = Math.min(b, Math.max(p, o)); n = 0; let q; for (let r = 0; r < a; r++) { q = e._inner[r]; for (let s = 1; s < q.length; s++) { if (isNaN_(q[s]) || isInfinity(q[s])) { continue; } n = Math.max(n, Math.abs(b - q[s])); } } let t; let u; let v; for (let w = 0; w < a; w++) { q = e._inner[w]; t = Math.abs(q[1] - b); u = Math.abs(q[1] - b); for (let x = 1; x < q.length; x++) { if (isNaN_(q[x]) || isInfinity(q[x])) { continue; } t = Math.max(Math.abs(q[x] - b), t); u = Math.min(Math.abs(q[x] - b), u); } let y = (t + u) / 2; if (isNaN_(y) || n == 0) { v = 1; } else { v = y / n; } f.add(2 - v); g.add(2 - v); } } h(a, b, c, d, e, f, g, h, i, j, k) { if (a == 0) { return; } let l = false; let m = i; if (j) { m = h; } if (m != null) { l = m.dn; } let n = k.bottom; let o = k.bottom; let p = k.top; if (j) { o = k.right; p = k.left; } if (l) { o = k.top; p = k.bottom; if (j) { o = k.left; p = k.right; } } b = Math.max(b, Math.min(p, o)); b = Math.min(b, Math.max(p, o)); n = 0; let q; for (let r = 0; r < a; r++) { q = e._inner[r]; if (j) { if (isNaN_(q.x) || isInfinity(q.x)) { continue; } n = Math.max(n, Math.abs(q.x - b)); } else { if (isNaN_(q.y) || isInfinity(q.y)) { continue; } n = Math.max(n, Math.abs(q.y - b)); } } let s; for (let t = 0; t < a; t++) { q = e._inner[t]; let u; if (j) { u = q.x; } else { u = q.y; } if (isNaN_(u) || isInfinity(u) || n == 0) { s = 1; } else { s = Math.abs(u - b) / n; } f.add(2 - s); g.add(2 - s); } } g(a, b, c, d, e, f, g, h, i, j, k) { if (a == 0) { return; } let l = false; let m = i; if (j) { m = h; } if (m != null) { l = m.dn; } let n = k.bottom; let o = k.bottom; let p = k.top; if (j) { o = k.right; p = k.left; } if (l) { o = k.top; p = k.bottom; if (j) { o = k.left; p = k.right; } } b = Math.max(b, Math.min(p, o)); b = Math.min(b, Math.max(p, o)); n = 0; let q; for (let r = 0; r < a; r++) { q = e._inner[r]; if (isNaN_(q) || isInfinity(q)) { continue; } n = Math.max(n, Math.abs(q - b)); } let s; for (let t = 0; t < a; t++) { q = e._inner[t]; let u; u = q; if (n == 0 || isNaN_(u) || isInfinity(u)) { s = 1; } else { s = Math.abs(u - b) / n; } f.add(2 - s); g.add(2 - s); } } d(a, b, c, d, e, f, g, h) { if (a == 0) { return; } let i = e; if (g) { i = f; } let j = false; if (i != null) { j = i.dn; } let k; for (let l = 0; l < a; l++) { if (a == 1) { k = 1; } else { k = l / (a - 1); } k = 1 - k; c.add(1 + k); d.add(1 + k); } } y(a, b) { a.k.clear(); a.p.clear(); a.s.clear(); a.v.clear(); a.n.clear(); a.m.clear(); a.l.clear(); a.i.clear(); if (a.r != null) { a.r.clear(); } if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.j(a.r, b.r); } this.i(a.k, b.k); this.j(a.p, b.p); this.m(a.s, b.s); this.m(a.v, b.v); this.m(a.n, b.n); this.j(a.m, b.m); this.j(a.l, b.l); this.o(a, b, (c, d, e) => this.m(c, d)); let c = a.k.count; let d = a.k; let e; let f; let g; let h; for (let i = 0; i < c; i++) { e = d._inner[i]; f = e[1]; g = e[1]; for (let j = 2; j < e.length; j++) { f = Math.min(f, e[j]); g = Math.max(g, e[j]); } h = (f + g) / 2; for (let k = 1; k < e.length; k++) { e[k] = h; } } let l = a.m.count; let m = a.m; let n = a.l; for (let o = 0; o < l; o++) { m._inner[o] = 0; n._inner[o] = 0; } } af(a, b, c) { if (c) { this.l(a, b); a.ag = new Rect(0, 1, 0, 0, 1); } else { this.l(a, b); a.ag = new Rect(0, 0, 0, 0, 1); } } ag(a, b, c) { if (c) { this.l(a, b); a.ag = new Rect(0, 0, 0, 1, 0); } else { this.l(a, b); a.ag = new Rect(0, 0, 1, 1, 0); } } l(a, b) { a.k.clear(); a.p.clear(); a.s.clear(); a.v.clear(); a.n.clear(); a.m.clear(); a.l.clear(); a.i.clear(); if (a.r != null) { a.r.clear(); } if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.j(a.r, b.r); } this.i(a.k, b.k); this.j(a.p, b.p); this.m(a.s, b.s); this.m(a.v, b.v); this.m(a.n, b.n); this.j(a.m, b.m); this.j(a.l, b.l); this.o(a, b, (c, d, e) => this.m(c, d)); } v(a, b, c, d, e) { let f = b.count; let g; let h; for (let i = 0; i < f; i++) { g = b._inner[i]; if (e) { if (c) { h = { $type: Point_$type, x: d, y: g.y }; } else { h = { $type: Point_$type, x: g.x, y: d }; } } else { if (c) { h = { $type: Point_$type, x: g.x, y: d }; } else { h = { $type: Point_$type, x: d, y: g.y }; } } a.add(h); } } w(a, b, c, d, e, f) { let g = c.count; let h; let i; let j = a.count; for (let k = 0; k < g; k++) { h = c._inner[k]; if (j > k) { h = a._inner[k]; } if (f) { if (d) { i = { $type: Point_$type, x: h.x, y: h.y }; } else { i = { $type: Point_$type, x: h.x, y: h.y }; } } else { if (d) { i = { $type: Point_$type, x: h.x, y: h.y }; } else { i = { $type: Point_$type, x: h.x, y: h.y }; } } b.add(i); } } m(a, b) { let c = b.count; let d; let e; for (let f = 0; f < c; f++) { d = b._inner[f]; e = { $type: Point_$type, x: d.x, y: d.y }; a.add(e); } } i(a, b) { let c = b.count; let d = b; let e; let f; let g = a; for (let h = 0; h < c; h++) { f = d._inner[h]; e = new Array(f.length); for (let i = 0; i < e.length; i++) { e[i] = f[i]; } g.add(e); } } q(a, b, c, d, e) { let f = b.count; let g = b; let h; let i; let j = a; for (let k = 0; k < f; k++) { i = g._inner[k]; h = new Array(i.length); if (e) { h[0] = i[0]; for (let l = 1; l < h.length; l++) { h[l] = d; } } else { h[0] = d; for (let m = 1; m < h.length; m++) { h[m] = i[m]; } } j.add(h); } } r(a, b, c, d, e, f) { let g = c.count; let h = c; let i; let j; let k; let l; let m = a.count; let n = b; for (let o = 0; o < g; o++) { j = h._inner[o]; l = j; if (m > o) { j = a._inner[o]; } i = new Array(j.length); if (f) { i[0] = l[0]; for (let p = 1; p < i.length; p++) { i[p] = j[p]; } } else { i[0] = l[0]; for (let q = 1; q < i.length; q++) { i[q] = j[q]; } } n.add(i); } } u(a, b) { let c = b.count; let d; for (let e = 0; e < c; e++) { d = b._inner[e]; a.add(d); } } k(a, b) { let c = b.count; let d; for (let e = 0; e < c; e++) { d = b._inner[e]; a.add(d); } } j(a, b) { let c = b.count; let d; for (let e = 0; e < c; e++) { d = b._inner[e]; a.add(d); } } s(a, b, c, d, e) { let f = b.count; let g; for (let h = 0; h < f; h++) { g = b._inner[h]; a.add(g); } } t(a, b, c, d, e, f) { let g = c.count; let h; let i = a.count; for (let j = 0; j < g; j++) { if (i > j) { h = a._inner[j]; } else { h = c._inner[j]; } b.add(h); } } ab(a, b, c, d, e) { let f = e.right; if (!c) { f = e.left; } let g = false; if (d) { g = true; } if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.s(a.r, b.r, d, f, g); } this.q(a.k, b.k, d, f, g); this.s(a.p, b.p, d, f, g); this.v(a.s, b.s, d, f, g); this.v(a.v, b.v, d, f, g); this.v(a.n, b.n, d, f, g); this.s(a.m, b.m, d, f, g); this.s(a.l, b.l, d, f, g); this.p(a, b, d, f, g); } ad(a, b, c, d, e) { let f = e.bottom; if (c) { f = e.top; } let g = true; if (d) { g = false; } if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.s(a.r, b.r, d, f, g); } this.q(a.k, b.k, d, f, g); this.s(a.p, b.p, d, f, g); this.v(a.s, b.s, d, f, g); this.v(a.v, b.v, d, f, g); this.v(a.n, b.n, d, f, g); this.s(a.m, b.m, d, f, g); this.s(a.l, b.l, d, f, g); this.p(a, b, d, f, g); } aa(a, b, c, d, e) { let f = 0; let g = false; if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.s(a.r, b.r, d, f, g); } this.q(a.k, b.k, d, f, g); this.s(a.p, b.p, d, f, g); this.v(a.s, b.s, d, f, g); this.v(a.v, b.v, d, f, g); this.v(a.n, b.n, d, f, g); this.s(a.m, b.m, d, f, g); this.s(a.l, b.l, d, f, g); this.p(a, b, d, f, g); } z(a, b, c, d, e) { let f = Math.PI * 2; let g = false; if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.s(a.r, b.r, d, f, g); } this.q(a.k, b.k, d, f, g); this.s(a.p, b.p, d, f, g); this.v(a.s, b.s, d, f, g); this.v(a.v, b.v, d, f, g); this.v(a.n, b.n, d, f, g); this.s(a.m, b.m, d, f, g); this.s(a.l, b.l, d, f, g); this.p(a, b, d, f, g); } ae(a, b, c, d, e) { if (a.r != null || b.r != null) { if (a.r == null) { a.r = new List$1(Number_$type, 0); } if (b.r == null) { b.r = new List$1(Number_$type, 0); } this.s(a.r, b.r, d, c, true); } this.q(a.k, b.k, d, c, true); if (e && a.k != null) { for (let f = 0; f < a.k.count; f++) { if (f < b.k.count) { let g = a.k._inner[f]; let h = b.k._inner[f]; g[g.length - 1] = h[h.length - 1]; } } } this.s(a.p, b.p, d, c, true); this.v(a.s, b.s, d, c, true); this.v(a.v, b.v, d, c, true); this.v(a.n, b.n, d, c, true); this.s(a.m, b.m, d, c, true); this.s(a.l, b.l, d, c, true); this.p(a, b, d, c, true); } p(a, b, c, d, e) { this.o(a, b, (f, g, h) => this.v(f, g, c, d, true)); } a(a, b) { let c = null; if (a.i.count <= b) { c = new List$1(Point_$type, 0); a.i.add(c); } else { c = a.i._inner[b]; } return c; } b(a, b) { let c = null; if (a.j.count <= b) { c = new List$1(Number_$type, 0); a.j.add(c); } else { c = a.j._inner[b]; } return c; } o(a, b, c) { let d = Math.max(a.i.count, b.i.count); for (let e = 0; e < d; e++) { let f = this.a(b, e); let g = this.a(a, e); this.b(b, e); this.b(a, e); c(g, f, e); } } n(a, b, c, d) { let e = Math.max(b.i.count, c.i.count); for (let f = 0; f < e; f++) { let g = this.a(a, f); let h = this.a(c, f); let i = this.a(b, f); this.b(a, f); this.b(c, f); this.b(b, f); d(g, i, h, f); } } } CategoryTransitionSourceFramePreparer.$t = markType(CategoryTransitionSourceFramePreparer, 'CategoryTransitionSourceFramePreparer'); return CategoryTransitionSourceFramePreparer; })();