/* Minification failed. Returning unminified contents.
(1,1134-1135): run-time error JS1003: Expected ':': (
(1,1137-1138): run-time error JS1100: Expected ',': {
(1,1140-1141): run-time error JS1195: Expected expression: ,
(1,1154-1155): run-time error JS1004: Expected ';': {
(1,1157-1158): run-time error JS1195: Expected expression: ,
(1,1182-1183): run-time error JS1002: Syntax error: }
(1,1207-1208): run-time error JS1002: Syntax error: }
(1,1228-1229): run-time error JS1004: Expected ';': {
(1,1370-1371): run-time error JS1195: Expected expression: ,
(1,1447-1448): run-time error JS1002: Syntax error: }
(1,2059-2060): run-time error JS1002: Syntax error: }
(1,2128-2129): run-time error JS1002: Syntax error: }
(1,2614-2615): run-time error JS1002: Syntax error: }
(1,3186-3187): run-time error JS1002: Syntax error: }
(1,3202-3203): run-time error JS1197: Too many errors. The file might not be a JavaScript file: t
 */
(function (e, t, n) { "use strict"; function s(t, n) { this.element = t, this.$element = e(t), this.settings = e.extend(!0, {}, d, n), this._defaults = d, this._name = a, this._nameLower = r, this._objPrefix = i, this._methods = o, this._methods.init(this) } const a = "jChart", r = "jChart".toLowerCase(), i = "jchart__", d = { elements: { container: null, body: null, group: null, figure: null, svg: null, segments: [], markers: null }, data: [], values: {}, placeholder: { data: { value: 0, color: { normal: "#00a3f2", active: "#00d8f2" }, draw: !0, push: !0, order: null, title: "untitled", strokeWidth: 3 } }, appearance: { type: "donut", baseColor: "transparent", segmentColor: { normal: "#00a3f2", active: "#00d8f2" }, baseOffset: 0, baseStrokeWidth: 1, strokeWidth: 3, animated: !0, title: { chartTitle: "", showValue: !0, showPercentage: !0, showSummary: !1, summaryTitle: "", summarySegment: null }, radius: 100 / (2 * Math.PI), innerCutout: .75, centerX: 21, centerY: 21, subType: "circle", isGauge: !1, gap: 1, showMarkers: !0, markerColor: "#f45a42", markerCount: 10, markerWidth: .5, rx: 0, ry: 0 }, callbacks: { onInit() { }, onRefresh() { }, onSegmentMouseover() { }, onSegmentMouseout() { } } }, o = { init(t) { t._methods.initElement(t), t.settings.callbacks.onInit && e.isFunction(t.settings.callbacks.onInit) && t.settings.callbacks.onInit.call(t) }, initElement(e) { e._methods.calculateDataValues(e), e._methods.initHtml(e) }, calculateDataValues(t) { const n = { maxval: 0 }, s = t.settings.data; for (const a in s) s.hasOwnProperty(a) && (s[a] = e.extend(!0, {}, t.settings.placeholder.data, s[a]), n.maxval += s[a].value); for (const e in s) s.hasOwnProperty(e) && (0 === n.maxval ? (s[e].percentage_raw = 0, s[e].percentage = 0) : (s[e].percentage_raw = s[e].value / n.maxval, s[e].percentage = 100 * (s[e].value / n.maxval)), null === s[e].order && (s[e].order = s.length)); s.sort(function (e, t) { return null === e.order ? 1 : null === t.order ? -1 : e.order < t.order ? -1 : e.order > t.order ? 1 : 0 }), t.settings.values = n }, initHtml(e) { e._methods.drawContainer(e), e._methods.drawBody(e) }, drawContainer(t) { "undefined" != typeof t.settings.elements.container && null !== t.settings.elements.container && t.settings.elements.container.remove(), "undefined" != typeof t.settings.elements.figure && null !== t.settings.elements.figure && t.settings.elements.figure.remove(); const n = e("<div>", { class: "jchart" }), s = e("<figure>", { class: t._objPrefix + "figure" }); t.settings.elements.container = n, t.settings.elements.figure = s, t.$element.append(n), n.append(s) }, drawBody(t) { "undefined" != typeof t.settings.elements.body && null !== t.settings.elements.body && t.settings.elements.body.remove(), "undefined" != typeof t.settings.elements.figureCaption && null !== t.settings.elements.figureCaption && t.settings.elements.figureCaption.remove(); const n = e("<div>", { class: t._objPrefix + "body" }), s = e("<figcaption>"); t.settings.elements.body = n, t.settings.elements.figureCaption = s, t.settings.elements.figure.append(n), t.settings.elements.figure.append(s), t._methods.drawBodyBase(t), t._methods.addEventListeners(t) }, drawBodyBase(t) { "undefined" != typeof t.settings.elements.svg && null !== t.settings.elements.svg && t.settings.elements.svg.remove(), "undefined" != typeof t.settings.elements.group && null !== t.settings.elements.group && t.settings.elements.group.remove(); const n = t.settings.data, s = t.settings.values; let a = null, r = null, i = null, d = []; switch (t.settings.appearance.type) { case "donut": switch (a = t._methods.drawBodyBaseDonut(t, { type: t.settings.appearance.subType }), r = a.svg, d = t._methods.drawBodySegmentDonut(t, n, s, { type: t.settings.appearance.subType }), i = t.settings.elements.body[0].appendChild(r), i.appendChild(a.ring), t.settings.appearance.subType) { case "circle": break; case "path": i.appendChild(a.ring); }if (t.settings.appearance.animated && t._methods.animationLoop(t, function (e, t) { e._methods.drawBodySegmentDonut(e, n, s, { type: e.settings.appearance.subType, updateOnly: !0, modifier: t }) }), t.settings.appearance.title.showSummary) { const e = t._methods.drawSvgText(t, { class: `${t._objPrefix}summary`, x: t.settings.appearance.centerX, y: t.settings.appearance.isGauge ? .9 * t.settings.appearance.centerY : t.settings.appearance.centerY }); if (t.settings.elements.summary = e, i.appendChild(e), t.settings.appearance.title.summaryTitle) t.settings.elements.summary.innerHTML = t.settings.appearance.title.summaryTitle; else if (null !== t.settings.appearance.title.summarySegment) { const e = t.settings.data[t.settings.appearance.title.summarySegment]; if ("undefined" != typeof e) { const n = Math.round(10 * e.percentage) / 10; t.settings.elements.summary.innerHTML = `${n}%` } } else { const e = t._methods.getDrawableSegments(t, n, !0); if (e.length) { const n = Math.round(10 * e[0].percentage) / 10; t.settings.elements.summary.innerHTML = `${n}%` } } } break; case "pie": a = t._methods.drawBodyBasePie(t), r = a.svg, d = t._methods.drawBodySegmentPie(t, n, s), i = t.settings.elements.body[0].appendChild(r), t.settings.appearance.animated && t._methods.animationLoop(t, function (e, t) { e._methods.drawBodySegmentPie(e, n, s, { updateOnly: !0, modifier: t }) }); break; case "bar": if (a = t._methods.drawBodyBaseBar(t), r = a.svg, d = t._methods.drawBodySegmentBar(t, n, s), i = t.settings.elements.body[0].appendChild(r), i.appendChild(a.background), null !== a.markers.group) { const e = a.markers.group; for (const t in a.markers.markers) a.markers.markers.hasOwnProperty(t) && e.appendChild(a.markers.markers[t]); i.appendChild(e) } if (t.settings.appearance.animated && t._methods.animationLoop(t, function (e, t) { e._methods.drawBodySegmentBar(e, n, s, { updateOnly: !0, modifier: t }) }), t.settings.appearance.title.showSummary) { t.settings.elements.summary = []; let e = 0; for (const s in n) if (n.hasOwnProperty(s)) { const a = n[s], r = t._methods.drawSvgText(t, { class: `${t._objPrefix}summary`, x: `${a.percentage / 2 + e}%`, y: "50%" }); if (e += a.percentage, t.settings.elements.summary.push(r), i.appendChild(r), null !== t.settings.appearance.title.summarySegment) { const e = t.settings.data[t.settings.appearance.title.summarySegment]; if ("undefined" != typeof e) { const t = Math.round(10 * e.percentage) / 10; r.innerHTML = `${t}%` } } else { const e = t._methods.getDrawableSegments(t, n, !0), s = Math.round(10 * e[0].percentage) / 10; r.innerHTML = `${s}%` } } } break; default: }const o = i.appendChild(t._methods.drawGroup(t)); for (const s in n) if (n.hasOwnProperty(s)) { const a = n[s].element; if ("undefined" != typeof a && "undefined" != typeof a.nodeType) { const r = o.appendChild(a), i = e(r); n[s].element = i, t.settings.elements.segments.push(i) } } t.settings.elements.svg = i, t.settings.elements.group = e(o) }, addEventListeners(t) { const n = t.settings.data; for (const s in n) if (n.hasOwnProperty(s)) { const a = n[s].element; "undefined" != typeof a && (a.on("mouseover", function () { const n = e(this), s = n.attr("d-id"); switch (n.removeClass("active"), n.addClass("active"), t.settings.appearance.type) { case "donut": switch (t.settings.appearance.subType) { case "circle": n.css("stroke", t.settings.data[s].color.active); break; case "path": n.css("fill", t.settings.data[s].color.active); }break; case "pie": n.css("fill", t.settings.data[s].color.active); break; case "bar": n.css("fill", t.settings.data[s].color.active); }t.settings.callbacks.onSegmentMouseover && e.isFunction(t.settings.callbacks.onSegmentMouseover) && t.settings.callbacks.onSegmentMouseover.call(t, s, t.settings.data[s]) }), a.on("mouseout", function () { const n = e(this), s = n.attr("d-id"); switch (n.removeClass("active"), t.settings.appearance.type) { case "donut": switch (t.settings.appearance.subType) { case "circle": n.css("stroke", ""); break; case "path": n.css("fill", ""); }break; case "pie": n.css("fill", ""); break; case "bar": n.css("fill", ""); }t.settings.callbacks.onSegmentMouseout && e.isFunction(t.settings.callbacks.onSegmentMouseout) && t.settings.callbacks.onSegmentMouseout.call(t, t.settings.data[s], t.settings.data[s]) })) } }, drawBodyBaseDonut(t, s) { const a = { type: "circle", isGauge: t.settings.appearance.isGauge, centerX: t.settings.appearance.centerX, centerY: t.settings.appearance.isGauge ? t.settings.appearance.centerY / 2 : t.settings.appearance.centerY }, r = e.extend(!0, {}, a, s); let i = {}; const d = n.createElementNS("http://www.w3.org/2000/svg", "svg"); d.setAttribute("class", t._objPrefix + "donut"), d.setAttribute("width", "100%"), d.setAttribute("height", "100%"), d.setAttribute("viewBox", `0 0 ${2 * r.centerX} ${2 * r.centerY}`), d.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); let o; switch (r.type) { case "circle": o = t._methods.drawSvgCircle(t, { class: t._objPrefix + "donut__ring" + t._objPrefix + "donut__ring-circle", fill: t.settings.appearance.baseColor, stroke: t.settings.appearance.baseColor, "stroke-width": t.settings.appearance.baseStrokeWidth }); i = { svg: d, ring: o, hole: null }; break; case "path": const e = t.settings.appearance.radius + t.settings.appearance.baseStrokeWidth, n = t.settings.appearance.radius * t.settings.appearance.innerCutout, s = n - t.settings.appearance.baseStrokeWidth, a = r.isGauge ? Math.PI : 2 * Math.PI, g = -a, m = g + 99.9999 / 100 * a, l = t.settings.appearance.centerX + Math.cos(g) * e, p = t.settings.appearance.centerY + Math.sin(g) * e, u = t.settings.appearance.centerX + Math.cos(m) * e, c = t.settings.appearance.centerY + Math.sin(m) * e, h = t.settings.appearance.centerX + Math.cos(m) * s, f = t.settings.appearance.centerY + Math.sin(m) * s, w = t.settings.appearance.centerX + Math.cos(g) * s, b = t.settings.appearance.centerY + Math.sin(g) * s; o = t._methods.drawSvgPath(t, { class: `${t._objPrefix}donut__ring ${t._objPrefix}donut__ring-path`, fill: t.settings.appearance.baseColor, d: ["M", l, p, "A", e, e, 0, 1, 1, u, c, "L", h, f, "A", s, s, 0, 1, 0, w, b, "Z"].join(" ") }), i = { svg: d, ring: o }; }return i }, drawBodySegmentDonut(t, n, s, a) { const r = { type: "circle", isGauge: t.settings.appearance.isGauge, updateOnly: !1, modifier: 1, drawableSegments: t._methods.getDrawableSegments(t, n).length }, i = e.extend(!0, {}, r, a); let d = []; n = t.settings.data; const o = 1 < i.drawableSegments || i.isGauge ? t.settings.appearance.gap : 1e-5; switch (i.type) { case "circle": const e = 25; let s = 0; for (const a in n) if (n.hasOwnProperty(a)) { const r = 100 - n[a].percentage * i.modifier; if (!0 === n[a].draw && 0 < n[a].value) { let g = {}, m = !1, l = null; const p = { segmentTitle: n[a].title, segmentValue: t._methods.numberFormat(n[a].value, 0, ",", "\xA0"), segmentPercentage: Math.round(10 * n[a].percentage) / 10 }; let u = p.segmentTitle; t.settings.appearance.title.showValue && t.settings.appearance.title.showPercentage ? u += `: ${p.segmentValue} (${p.segmentPercentage}%)` : t.settings.appearance.title.showValue ? u += `: ${p.segmentValue}` : t.settings.appearance.title.showPercentage && (u += `: ${p.segmentPercentage}%`), i.updateOnly ? (m = !0, l = n[a].element[0], g = { fill: "transparent", stroke: n[a].color.normal, "stroke-width": n[a].strokeWidth, "stroke-dasharray": Math.max(n[a].percentage * i.modifier - o, 0) + " " + (r + o), "stroke-dashoffset": e + s }) : g = { "d-id": a, class: `${t._objPrefix}donut__segment ${t._objPrefix}donut__segment-circle`, title: u, fill: "transparent", stroke: n[a].color.normal, "stroke-width": n[a].strokeWidth, "stroke-dasharray": Math.max(n[a].percentage * i.modifier - o, 0) + " " + (r + o), "stroke-dashoffset": e + s }; const c = t._methods.drawSvgCircle(t, g, m, l); i.updateOnly || (n[a].element = c, d.push(c)) } !0 === n[a].push && (s += r) } break; case "path": const a = t.settings.appearance.radius, r = a * t.settings.appearance.innerCutout, g = t.settings.appearance.centerX, m = t.settings.appearance.centerY, l = i.isGauge ? Math.PI : Math.PI / 2, p = i.isGauge ? Math.PI : 2 * Math.PI, u = o / 100; let c = u, h = -l; for (const e in i.isGauge && (h += u * l, c += u / i.drawableSegments), n) if (n.hasOwnProperty(e)) { const s = i.modifier * (Math.max(n[e].percentage_raw - c, 0) * p), o = h + s, l = (o - h) % p > Math.PI ? 1 : 0, f = g + Math.cos(h) * a, w = m + Math.sin(h) * a, b = g + Math.cos(o) * a, y = m + Math.sin(o) * a, _ = g + Math.cos(o) * r, v = m + Math.sin(o) * r, x = g + Math.cos(h) * r, k = m + Math.sin(h) * r; if (!0 === n[e].draw && 0 < n[e].value && 0 < s) { const s = ["M", f, w, "A", a, a, 0, l, 1, b, y, "L", _, v, "A", r, r, 0, l, 0, x, k, "Z"]; let o = {}, g = !1, m = null; const p = { segmentTitle: n[e].title, segmentValue: t._methods.numberFormat(n[e].value, 0, ",", "\xA0"), segmentPercentage: Math.round(10 * n[e].percentage) / 10 }; let u = p.segmentTitle; t.settings.appearance.title.showValue && t.settings.appearance.title.showPercentage ? u += `: ${p.segmentValue} (${p.segmentPercentage}%)` : t.settings.appearance.title.showValue ? u += `: ${p.segmentValue}` : t.settings.appearance.title.showPercentage && (u += `: ${p.segmentPercentage}%`), i.updateOnly ? (g = !0, m = n[e].element[0], o = { fill: n[e].color.normal, stroke: "transparent", "stroke-width": n[e].strokeWidth, d: s.join(" ") }) : o = { "d-id": e, class: `${t._objPrefix}donut__segment ${t._objPrefix}donut__segment-path`, title: u, fill: n[e].color.normal, stroke: "transparent", "stroke-width": n[e].strokeWidth, d: s.join(" ") }; const c = t._methods.drawSvgPath(t, o, g, m); i.updateOnly || (n[e].element = c, d.push(c)) } !0 === n[e].push && 0 < s && (h += s + u * p) } }return d }, drawBodyBasePie(e) { const t = n.createElementNS("http://www.w3.org/2000/svg", "svg"); return t.setAttribute("class", `${e._objPrefix}pie`), t.setAttribute("width", "100%"), t.setAttribute("height", "100%"), t.setAttribute("viewBox", "-1 -1 2 2"), t.setAttribute("style", "transform: rotate(-0.25turn)"), t.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), { svg: t } }, drawBodySegmentPie(t, n, s, a) { const r = { updateOnly: !1, modifier: 1, drawableSegments: t._methods.getDrawableSegments(t, n).length }, i = e.extend(!0, {}, r, a); let d = [], o = 1e-5, g = 0; t.settings.appearance.gap && 1 < i.drawableSegments && (o = t.settings.appearance.gap, g = .1 * o); const m = 0; let l = 0; const p = o / 100; for (const e in n) if (n.hasOwnProperty(e)) { const s = i.modifier * n[e].percentage_raw; if (!0 === n[e].draw && 0 < n[e].value) { const a = t._methods.getCoordinatesForPercent(1, m + l + p), r = t._methods.getCoordinatesForPercent(1, m + l + s - p), o = .5 < i.modifier * n[e].percentage_raw ? 1 : 0; let u = t._methods.getCoordinatesForPercent(g + p, m + l + p), c = t._methods.getCoordinatesForPercent(g + p, m + l + s - p), h = { x: (u.x + c.x) / 2, y: (u.y + c.y) / 2 }; const f = [`M ${a.x} ${a.y}`, `A 1 1 0 ${o} 1 ${r.x} ${r.y}`, `L ${h.x} ${h.y}`].join(" "); let w = {}, b = !1, y = null; const _ = { segmentTitle: n[e].title, segmentValue: t._methods.numberFormat(n[e].value, 0, ",", "\xA0"), segmentPercentage: Math.round(10 * n[e].percentage) / 10 }; let v = _.segmentTitle; t.settings.appearance.title.showValue && t.settings.appearance.title.showPercentage ? v += `: ${_.segmentValue} (${_.segmentPercentage}%)` : t.settings.appearance.title.showValue ? v += `: ${_.segmentValue}` : t.settings.appearance.title.showPercentage && (v += `: ${_.segmentPercentage}%`), i.updateOnly ? (b = !0, y = n[e].element[0], w = { fill: n[e].color.normal, d: f }) : w = { "d-id": e, class: `${t._objPrefix}pie__segment`, title: v, fill: n[e].color.normal, d: f }; const x = t._methods.drawSvgPath(t, w, b, y); i.updateOnly || (n[e].element = x, d.push(x)), l += s } else !0 === n[e].push && (l += s + p) } return d }, drawBodyBaseBar(e) { const t = n.createElementNS("http://www.w3.org/2000/svg", "svg"); t.setAttribute("class", `${e._objPrefix}bar`), t.setAttribute("width", "100%"), t.setAttribute("height", "100%"), t.setAttribute("viewBox", "0 0 100 10"), t.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); const s = e._methods.drawSvgRect(e, { fill: e.settings.appearance.baseColor }, !1, null); let a = { group: null, markers: null }; if (e.settings.appearance.showMarkers) { a.markers = [], a.group = e._methods.drawGroup(e, { class: `${e._objPrefix}markers` }); const t = e.settings.appearance.markerCount; for (let n = 0; n <= t; n++) { let s = e.settings.appearance.markerWidth, r = n * (100 / t); r -= n === t ? s : 0, r -= 0 == n || n === t ? 0 : s / 2; const i = e._methods.drawSvgRect(e, { width: s, height: "125%", x: r, fill: e.settings.appearance.markerColor }); a.markers.push(i) } } return e.settings.elements.markers = a, { svg: t, background: s, markers: a } }, drawBodySegmentBar(t, n, s, a) { const r = e.extend(!0, {}, { updateOnly: !1, modifier: 1 }, a); let i = []; let d = 0; for (const e in n) if (n.hasOwnProperty(e)) if (!0 === n[e].draw && 0 < n[e].value) { const s = 0 + d, a = n[e].percentage * r.modifier; d += n[e].percentage * r.modifier; let o = {}, g = !1, m = null; r.updateOnly ? (g = !0, m = n[e].element[0], o = { width: a, x: `${s}%`, fill: n[e].color.normal }) : o = { "d-id": e, class: `${t._objPrefix}bar__segment`, width: a, x: `${s}%`, fill: n[e].color.normal }; const l = t._methods.drawSvgRect(t, o, g, m); r.updateOnly || (n[e].element = l, i.push(l)) } else !0 === n[e].push && (d += n[e].percentage_raw); return i }, drawGroup(t, s) { const a = e.extend(!0, {}, { class: "" }, s), r = n.createElementNS("http://www.w3.org/2000/svg", "g"); for (const e in a) a.hasOwnProperty(e) && "" !== a[e] && 0 !== a[e] && r.setAttributeNS(null, e, a[e]); return r }, drawSvgCircle(t, s, a = !1, r = null) { const i = { class: "", cx: t.settings.appearance.centerX, cy: t.settings.appearance.centerY, r: t.settings.appearance.radius, fill: "#fff", stroke: "", "stroke-width": t.settings.appearance.strokeWidth, "stroke-dasharray": "", "stroke-dashoffset": "25" }, d = e.extend(!0, {}, i, s); let o = r; for (const e in a || (o = n.createElementNS("http://www.w3.org/2000/svg", "circle")), d) d.hasOwnProperty(e) && "" !== d[e] && 0 !== d[e] && o.setAttributeNS(null, e, d[e]); return o }, drawSvgRect(t, s, a = !1, r = null) { const i = { width: "100%", height: "100%", x: 0, y: 0, rx: t.settings.appearance.rx, ry: t.settings.appearance.ry, class: "", fill: "#fff", stroke: "", "stroke-width": 0 }, d = e.extend(!0, {}, i, s); let o = r; for (const e in a || (o = n.createElementNS("http://www.w3.org/2000/svg", "rect")), d) d.hasOwnProperty(e) && "" !== d[e] && 0 !== d[e] && o.setAttributeNS(null, e, d[e]); return o }, drawSvgPath(t, s, a = !1, r = null) { const i = e.extend(!0, {}, { class: "", fill: "#fff", d: "", stroke: "", "stroke-width": 0, "stroke-dasharray": "", "stroke-dashoffset": 0 }, s); let d = r; for (const e in a || (d = n.createElementNS("http://www.w3.org/2000/svg", "path")), i) i.hasOwnProperty(e) && "" !== i[e] && 0 !== i[e] && d.setAttributeNS(null, e, i[e]); return d }, drawSvgText(t, s, a = !1, r = null) { const i = e.extend(!0, {}, { class: "", x: 0, y: 0, "alignment-baseline": "middle", "text-anchor": "middle" }, s); let d = r; for (const e in a || (d = n.createElementNS("http://www.w3.org/2000/svg", "text")), i) i.hasOwnProperty(e) && "" !== i[e] && 0 !== i[e] && d.setAttributeNS(null, e, i[e]); return d }, getCoordinatesForPercent(e, t) { const n = e * Math.cos(2 * Math.PI * t), s = e * Math.sin(2 * Math.PI * t); return { x: n, y: s } }, getDrawableSegments(e, t, n = !1) { const s = t.filter(function (e) { return !0 === e.draw && 0 < e.percentage_raw }); return n && (s.sort(function (e, t) { return e.value < t.value }), s.sort()), s }, lightenRgbColors(e, t) { let n; for (let s = 3; s--; e[s] = 0 > n ? 0 : 255 < n ? 255 : 0 | n)n = e[s] + t; return e }, animationLoop(e, t, n = 1e3, s = !0) { const a = { start: performance.now(), total: n }, r = e => Math.pow(--e, 3) + 1, i = n => { a.elapsed = n - a.start; const d = a.elapsed / a.total; let o = d; s && (o = r(o)), 0 > o && (o = 0), 1 < o && (o = 1), t.apply(e, [e, o]), 1 > o && requestAnimationFrame(i) }; requestAnimationFrame(i) }, GetInstance(e) { e._methods.Log(e, e) }, Destroy(t) { t.settings.elements.container.remove(), e.removeData(t.$element, "plugin_" + t._name) }, Update(e) { e._methods.calculateDataValues(e); const t = e.settings.data, n = e.settings.values; switch (e.settings.appearance.type) { case "donut": e.settings.appearance.animated && e._methods.animationLoop(e, function (e, s) { e._methods.drawBodySegmentDonut(e, t, n, { type: e.settings.appearance.subType, updateOnly: !0, modifier: s }) }); break; case "pie": e.settings.appearance.animated && e._methods.animationLoop(e, function (e, s) { e._methods.drawBodySegmentPie(e, t, n, { updateOnly: !0, modifier: s }) }); break; default: } }, Refresh(t) { t._methods.initElement(t), t.settings.callbacks.onRefresh && e.isFunction(t.settings.callbacks.onRefresh) && t.settings.callbacks.onRefresh.call(t) }, Log(e, t) { if (console.log("*** " + e._name + " ***"), t instanceof Array) for (let e of t) console.log(e); else console.log(t) }, objSortByPositionInDOM(e, t, n) { let s, a = e; return s = t && n ? a.sort(function (e, s) { return e[t][n][0] === s[t][n][0] ? 0 : e[t][n][0].compareDocumentPosition ? 2 & e[t][n][0].compareDocumentPosition(s[t][n][0]) ? 1 : -1 : e[t][n][0].sourceIndex - s[t][n][0].sourceIndex }) : t ? a.sort(function (e, n) { return e[t][0] === n[t][0] ? 0 : e[t][0].compareDocumentPosition ? 2 & e[t][0].compareDocumentPosition(n[t][0]) ? 1 : -1 : e[t][0].sourceIndex - n[t][0].sourceIndex }) : a.sort(function (e, t) { return e[0] === t[0] ? 0 : e[0].compareDocumentPosition ? 2 & e[0].compareDocumentPosition(t[0]) ? 1 : -1 : e[0].sourceIndex - t[0].sourceIndex }), s }, numberFormat(e, t, a, r) { e = (e + "").replace(/[^0-9+\-Ee.]/g, ""); var i = isFinite(+e) ? +e : 0, n = isFinite(+t) ? Math.abs(t) : 0, d = "undefined" == typeof r ? "," : r, o = "undefined" == typeof a ? "." : a, g = ""; return g = (n ? function (e, t) { var n = Math.pow(10, t); return "" + Math.round(e * n) / n }(i, n) : "" + Math.round(i)).split("."), 3 < g[0].length && (g[0] = g[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, d)), (g[1] || "").length < n && (g[1] = g[1] || "", g[1] += Array(n - g[1].length + 1).join("0")), g.join(o) } }; e.fn.jChart = function (t) { let n = []; return this.each(function () { if (!e.data(this, "plugin_jChart")) { const a = new s(this, t); e.data(this, "plugin_jChart", a), n.push(a) } }), 1 === n.length ? n[0] : null } })(jQuery, window, document);;
