UNPKG

quick-admin-vue3-core

Version:

以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板

1,239 lines (1,238 loc) 40.8 kB
import { defineComponent as Ft, ref as Yt, createElementBlock as lt, openBlock as vt, createElementVNode as et, createVNode as qt, createTextVNode as mt, Fragment as Ht, renderList as $t, toDisplayString as Ut, unref as Kt } from "vue"; import { a as z, aQ as jt, aR as Xt, aS as Zt, aT as St, aU as Jt, u as Qt, x as te, w as ee, aV as ae, aW as ot, aj as Et, a8 as Rt, a7 as re, aX as ie, aY as X, aZ as ne, I as oe, aa as se, o as W, a_ as bt, a$ as wt, b0 as le, a0 as F, as as ve, p as Wt, c as ue, b1 as ht, b2 as Bt, b3 as q, d as H, L as rt, b4 as ce, ah as de, b5 as ct, b6 as he, V as ge, b7 as _t, b8 as fe, G as dt, b9 as pe, C as Ot, ba as ye, bb as xe, bc as gt, bd as Ae, be as Pt, bf as me, al as Se, bg as be, bh as we, bi as Pe, bj as Te, bk as Me, aM as Le, bl as Ce, bm as ke, ap as De, J as ut, bn as Ie, bo as Ee, R as Tt, K as Re, bp as Mt, B as We, ay as Lt, _ as Be } from "./Chart.vue_vue_type_script_setup_true_lang-D42ckqgo.js"; import { _ as _e } from "./_plugin-vue_export-helper-CHgC5LLL.js"; var Oe = ( /** @class */ function(e) { z(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.makeElOption = function(a, r, o, n, l) { var v = o.axis; v.dim === "angle" && (this.animationThreshold = Math.PI / 18); var i = v.polar, u = i.getOtherAxis(v), s = u.getExtent(), c = v.dataToCoord(r), d = n.get("type"); if (d && d !== "none") { var f = jt(n), y = Ge[d](v, i, c, s); y.style = f, a.graphicKey = y.type, a.pointer = y; } var g = n.get(["label", "margin"]), p = ze(r, o, n, i, g); Xt(a, o, n, l, p); }, t; }(Zt) ); function ze(e, t, a, r, o) { var n = t.axis, l = n.dataToCoord(e), v = r.getAngleAxis().getExtent()[0]; v = v / 180 * Math.PI; var i = r.getRadiusAxis().getExtent(), u, s, c; if (n.dim === "radius") { var d = te(); Qt(d, d, v), ee(d, d, [r.cx, r.cy]), u = ae([l, -o], d); var f = t.getModel("axisLabel").get("rotate") || 0, y = ot.innerTextLayout(v, f * Math.PI / 180, -1); s = y.textAlign, c = y.textVerticalAlign; } else { var g = i[1]; u = r.coordToPoint([g + o, l]); var p = r.cx, S = r.cy; s = Math.abs(u[0] - p) / g < 0.3 ? "center" : u[0] > p ? "left" : "right", c = Math.abs(u[1] - S) / g < 0.3 ? "middle" : u[1] > S ? "top" : "bottom"; } return { position: u, align: s, verticalAlign: c }; } var Ge = { line: function(e, t, a, r) { return e.dim === "angle" ? { type: "Line", shape: Jt(t.coordToPoint([r[0], a]), t.coordToPoint([r[1], a])) } : { type: "Circle", shape: { cx: t.cx, cy: t.cy, r: a } }; }, shadow: function(e, t, a, r) { var o = Math.max(1, e.getBandWidth()), n = Math.PI / 180; return e.dim === "angle" ? { type: "Sector", shape: St( t.cx, t.cy, r[0], r[1], // In ECharts y is negative if angle is positive (-a - o / 2) * n, (-a + o / 2) * n ) } : { type: "Sector", shape: St(t.cx, t.cy, a - o / 2, a + o / 2, 0, Math.PI * 2) }; } }, Ve = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a; } return t.prototype.findAxisModel = function(a) { var r, o = this.ecModel; return o.eachComponent(a, function(n) { n.getCoordSysModel() === this && (r = n); }, this), r; }, t.type = "polar", t.dependencies = ["radiusAxis", "angleAxis"], t.defaultOption = { // zlevel: 0, z: 0, center: ["50%", "50%"], radius: "80%" }, t; }(Et) ), ft = ( /** @class */ function(e) { z(t, e); function t() { return e !== null && e.apply(this, arguments) || this; } return t.prototype.getCoordSysModel = function() { return this.getReferringComponents("polar", Rt).models[0]; }, t.type = "polarAxis", t; }(Et) ); re(ft, ie); var Ne = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a; } return t.type = "angleAxis", t; }(ft) ), Fe = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a; } return t.type = "radiusAxis", t; }(ft) ), pt = ( /** @class */ function(e) { z(t, e); function t(a, r) { return e.call(this, "radius", a, r) || this; } return t.prototype.pointToData = function(a, r) { return this.polar.pointToData(a, r)[this.dim === "radius" ? 0 : 1]; }, t; }(X) ); pt.prototype.dataToRadius = X.prototype.dataToCoord; pt.prototype.radiusToData = X.prototype.coordToData; var Ye = oe(), yt = ( /** @class */ function(e) { z(t, e); function t(a, r) { return e.call(this, "angle", a, r || [0, 360]) || this; } return t.prototype.pointToData = function(a, r) { return this.polar.pointToData(a, r)[this.dim === "radius" ? 0 : 1]; }, t.prototype.calculateCategoryInterval = function() { var a = this, r = a.getLabelModel(), o = a.scale, n = o.getExtent(), l = o.count(); if (n[1] - n[0] < 1) return 0; var v = n[0], i = a.dataToCoord(v + 1) - a.dataToCoord(v), u = Math.abs(i), s = ne(v == null ? "" : v + "", r.getFont(), "center", "top"), c = Math.max(s.height, 7), d = c / u; isNaN(d) && (d = 1 / 0); var f = Math.max(0, Math.floor(d)), y = Ye(a.model), g = y.lastAutoInterval, p = y.lastTickCount; return g != null && p != null && Math.abs(g - f) <= 1 && Math.abs(p - l) <= 1 && g > f ? f = g : (y.lastTickCount = l, y.lastAutoInterval = f), f; }, t; }(X) ); yt.prototype.dataToAngle = X.prototype.dataToCoord; yt.prototype.angleToData = X.prototype.coordToData; var zt = ["radius", "angle"], qe = ( /** @class */ function() { function e(t) { this.dimensions = zt, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new pt(), this._angleAxis = new yt(), this.axisPointerEnabled = !0, this.name = t || "", this._radiusAxis.polar = this._angleAxis.polar = this; } return e.prototype.containPoint = function(t) { var a = this.pointToCoord(t); return this._radiusAxis.contain(a[0]) && this._angleAxis.contain(a[1]); }, e.prototype.containData = function(t) { return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1]); }, e.prototype.getAxis = function(t) { var a = "_" + t + "Axis"; return this[a]; }, e.prototype.getAxes = function() { return [this._radiusAxis, this._angleAxis]; }, e.prototype.getAxesByScale = function(t) { var a = [], r = this._angleAxis, o = this._radiusAxis; return r.scale.type === t && a.push(r), o.scale.type === t && a.push(o), a; }, e.prototype.getAngleAxis = function() { return this._angleAxis; }, e.prototype.getRadiusAxis = function() { return this._radiusAxis; }, e.prototype.getOtherAxis = function(t) { var a = this._angleAxis; return t === a ? this._radiusAxis : a; }, e.prototype.getBaseAxis = function() { return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis(); }, e.prototype.getTooltipAxes = function(t) { var a = t != null && t !== "auto" ? this.getAxis(t) : this.getBaseAxis(); return { baseAxes: [a], otherAxes: [this.getOtherAxis(a)] }; }, e.prototype.dataToPoint = function(t, a) { return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], a), this._angleAxis.dataToAngle(t[1], a)]); }, e.prototype.pointToData = function(t, a) { var r = this.pointToCoord(t); return [this._radiusAxis.radiusToData(r[0], a), this._angleAxis.angleToData(r[1], a)]; }, e.prototype.pointToCoord = function(t) { var a = t[0] - this.cx, r = t[1] - this.cy, o = this.getAngleAxis(), n = o.getExtent(), l = Math.min(n[0], n[1]), v = Math.max(n[0], n[1]); o.inverse ? l = v - 360 : v = l + 360; var i = Math.sqrt(a * a + r * r); a /= i, r /= i; for (var u = Math.atan2(-r, a) / Math.PI * 180, s = u < l ? 1 : -1; u < l || u > v; ) u += s * 360; return [i, u]; }, e.prototype.coordToPoint = function(t) { var a = t[0], r = t[1] / 180 * Math.PI, o = Math.cos(r) * a + this.cx, n = -Math.sin(r) * a + this.cy; return [o, n]; }, e.prototype.getArea = function() { var t = this.getAngleAxis(), a = this.getRadiusAxis(), r = a.getExtent().slice(); r[0] > r[1] && r.reverse(); var o = t.getExtent(), n = Math.PI / 180, l = 1e-4; return { cx: this.cx, cy: this.cy, r0: r[0], r: r[1], startAngle: -o[0] * n, endAngle: -o[1] * n, clockwise: t.inverse, contain: function(v, i) { var u = v - this.cx, s = i - this.cy, c = u * u + s * s, d = this.r, f = this.r0; return d !== f && c - l <= d * d && c + l >= f * f; } }; }, e.prototype.convertToPixel = function(t, a, r) { var o = Ct(a); return o === this ? this.dataToPoint(r) : null; }, e.prototype.convertFromPixel = function(t, a, r) { var o = Ct(a); return o === this ? this.pointToData(r) : null; }, e; }() ); function Ct(e) { var t = e.seriesModel, a = e.polarModel; return a && a.coordinateSystem || t && t.coordinateSystem; } function He(e, t, a) { var r = t.get("center"), o = a.getWidth(), n = a.getHeight(); e.cx = F(r[0], o), e.cy = F(r[1], n); var l = e.getRadiusAxis(), v = Math.min(o, n) / 2, i = t.get("radius"); i == null ? i = [0, "100%"] : ve(i) || (i = [0, i]); var u = [F(i[0], v), F(i[1], v)]; l.inverse ? l.setExtent(u[1], u[0]) : l.setExtent(u[0], u[1]); } function $e(e, t) { var a = this, r = a.getAngleAxis(), o = a.getRadiusAxis(); if (r.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), e.eachSeries(function(v) { if (v.coordinateSystem === a) { var i = v.getData(); W(bt(i, "radius"), function(u) { o.scale.unionExtentFromData(i, u); }), W(bt(i, "angle"), function(u) { r.scale.unionExtentFromData(i, u); }); } }), wt(r.scale, r.model), wt(o.scale, o.model), r.type === "category" && !r.onBand) { var n = r.getExtent(), l = 360 / r.scale.count(); r.inverse ? n[1] += l : n[1] -= l, r.setExtent(n[0], n[1]); } } function Ue(e) { return e.mainType === "angleAxis"; } function kt(e, t) { var a; if (e.type = t.get("type"), e.scale = le(t), e.onBand = t.get("boundaryGap") && e.type === "category", e.inverse = t.get("inverse"), Ue(t)) { e.inverse = e.inverse !== t.get("clockwise"); var r = t.get("startAngle"), o = (a = t.get("endAngle")) !== null && a !== void 0 ? a : r + (e.inverse ? -360 : 360); e.setExtent(r, o); } t.axis = e, e.model = t; } var Ke = { dimensions: zt, create: function(e, t) { var a = []; return e.eachComponent("polar", function(r, o) { var n = new qe(o + ""); n.update = $e; var l = n.getRadiusAxis(), v = n.getAngleAxis(), i = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis"); kt(l, i), kt(v, u), He(n, r, t), a.push(n), r.coordinateSystem = n, n.model = r; }), e.eachSeries(function(r) { if (r.get("coordinateSystem") === "polar") { var o = r.getReferringComponents("polar", Rt).models[0]; if (process.env.NODE_ENV !== "production" && !o) throw new Error('Polar "' + se(r.get("polarIndex"), r.get("polarId"), 0) + '" not found'); r.coordinateSystem = o.coordinateSystem; } }), a; } }, je = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"]; function it(e, t, a) { t[1] > t[0] && (t = t.slice().reverse()); var r = e.coordToPoint([t[0], a]), o = e.coordToPoint([t[1], a]); return { x1: r[0], y1: r[1], x2: o[0], y2: o[1] }; } function nt(e) { var t = e.getRadiusAxis(); return t.inverse ? 0 : 1; } function Dt(e) { var t = e[0], a = e[e.length - 1]; t && a && Math.abs(Math.abs(t.coord - a.coord) - 360) < 1e-4 && e.pop(); } var Xe = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a.axisPointerClass = "PolarAxisPointer", a; } return t.prototype.render = function(a, r) { if (this.group.removeAll(), !!a.get("show")) { var o = a.axis, n = o.polar, l = n.getRadiusAxis().getExtent(), v = o.getTicksCoords(), i = o.getMinorTicksCoords(), u = Wt(o.getViewLabels(), function(s) { s = ue(s); var c = o.scale, d = c.type === "ordinal" ? c.getRawOrdinalNumber(s.tickValue) : s.tickValue; return s.coord = o.dataToCoord(d), s; }); Dt(u), Dt(v), W(je, function(s) { a.get([s, "show"]) && (!o.scale.isBlank() || s === "axisLine") && Ze[s](this.group, a, n, v, i, l, u); }, this); } }, t.type = "angleAxis", t; }(ht) ), Ze = { axisLine: function(e, t, a, r, o, n) { var l = t.getModel(["axisLine", "lineStyle"]), v = a.getAngleAxis(), i = Math.PI / 180, u = v.getExtent(), s = nt(a), c = s ? 0 : 1, d, f = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc"; n[c] === 0 ? d = new _t[f]({ shape: { cx: a.cx, cy: a.cy, r: n[s], startAngle: -u[0] * i, endAngle: -u[1] * i, clockwise: v.inverse }, style: l.getLineStyle(), z2: 1, silent: !0 }) : d = new fe({ shape: { cx: a.cx, cy: a.cy, r: n[s], r0: n[c] }, style: l.getLineStyle(), z2: 1, silent: !0 }), d.style.fill = null, e.add(d); }, axisTick: function(e, t, a, r, o, n) { var l = t.getModel("axisTick"), v = (l.get("inside") ? -1 : 1) * l.get("length"), i = n[nt(a)], u = Wt(r, function(s) { return new rt({ shape: it(a, [i, i + v], s.coord) }); }); e.add(q(u, { style: H(l.getModel("lineStyle").getLineStyle(), { stroke: t.get(["axisLine", "lineStyle", "color"]) }) })); }, minorTick: function(e, t, a, r, o, n) { if (o.length) { for (var l = t.getModel("axisTick"), v = t.getModel("minorTick"), i = (l.get("inside") ? -1 : 1) * v.get("length"), u = n[nt(a)], s = [], c = 0; c < o.length; c++) for (var d = 0; d < o[c].length; d++) s.push(new rt({ shape: it(a, [u, u + i], o[c][d].coord) })); e.add(q(s, { style: H(v.getModel("lineStyle").getLineStyle(), H(l.getLineStyle(), { stroke: t.get(["axisLine", "lineStyle", "color"]) })) })); } }, axisLabel: function(e, t, a, r, o, n, l) { var v = t.getCategories(!0), i = t.getModel("axisLabel"), u = i.get("margin"), s = t.get("triggerEvent"); W(l, function(c, d) { var f = i, y = c.tickValue, g = n[nt(a)], p = a.coordToPoint([g + u, c.coord]), S = a.cx, C = a.cy, k = Math.abs(p[0] - S) / g < 0.3 ? "center" : p[0] > S ? "left" : "right", D = Math.abs(p[1] - C) / g < 0.3 ? "middle" : p[1] > C ? "top" : "bottom"; if (v && v[y]) { var T = v[y]; ce(T) && T.textStyle && (f = new de(T.textStyle, i, i.ecModel)); } var K = new ct({ silent: ot.isLabelSilent(t), style: he(f, { x: p[0], y: p[1], fill: f.getTextColor() || t.get(["axisLine", "lineStyle", "color"]), text: c.formattedLabel, align: k, verticalAlign: D }) }); if (e.add(K), s) { var $ = ot.makeAxisEventDataBase(t); $.targetType = "axisLabel", $.value = c.rawLabel, ge(K).eventData = $; } }, this); }, splitLine: function(e, t, a, r, o, n) { var l = t.getModel("splitLine"), v = l.getModel("lineStyle"), i = v.get("color"), u = 0; i = i instanceof Array ? i : [i]; for (var s = [], c = 0; c < r.length; c++) { var d = u++ % i.length; s[d] = s[d] || [], s[d].push(new rt({ shape: it(a, n, r[c].coord) })); } for (var c = 0; c < s.length; c++) e.add(q(s[c], { style: H({ stroke: i[c % i.length] }, v.getLineStyle()), silent: !0, z: t.get("z") })); }, minorSplitLine: function(e, t, a, r, o, n) { if (o.length) { for (var l = t.getModel("minorSplitLine"), v = l.getModel("lineStyle"), i = [], u = 0; u < o.length; u++) for (var s = 0; s < o[u].length; s++) i.push(new rt({ shape: it(a, n, o[u][s].coord) })); e.add(q(i, { style: v.getLineStyle(), silent: !0, z: t.get("z") })); } }, splitArea: function(e, t, a, r, o, n) { if (r.length) { var l = t.getModel("splitArea"), v = l.getModel("areaStyle"), i = v.get("color"), u = 0; i = i instanceof Array ? i : [i]; for (var s = [], c = Math.PI / 180, d = -r[0].coord * c, f = Math.min(n[0], n[1]), y = Math.max(n[0], n[1]), g = t.get("clockwise"), p = 1, S = r.length; p <= S; p++) { var C = p === S ? r[0].coord : r[p].coord, k = u++ % i.length; s[k] = s[k] || [], s[k].push(new Bt({ shape: { cx: a.cx, cy: a.cy, r0: f, r: y, startAngle: d, endAngle: -C * c, clockwise: g }, silent: !0 })), d = -C * c; } for (var p = 0; p < s.length; p++) e.add(q(s[p], { style: H({ fill: i[p % i.length] }, v.getAreaStyle()), silent: !0 })); } } }, Je = ["axisLine", "axisTickLabel", "axisName"], Qe = ["splitLine", "splitArea", "minorSplitLine"], ta = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a.axisPointerClass = "PolarAxisPointer", a; } return t.prototype.render = function(a, r) { if (this.group.removeAll(), !!a.get("show")) { var o = this._axisGroup, n = this._axisGroup = new dt(); this.group.add(n); var l = a.axis, v = l.polar, i = v.getAngleAxis(), u = l.getTicksCoords(), s = l.getMinorTicksCoords(), c = i.getExtent()[0], d = l.getExtent(), f = aa(v, a, c), y = new ot(a, f); W(Je, y.add, y), n.add(y.getGroup()), pe(o, n, a), W(Qe, function(g) { a.get([g, "show"]) && !l.scale.isBlank() && ea[g](this.group, a, v, c, d, u, s); }, this); } }, t.type = "radiusAxis", t; }(ht) ), ea = { splitLine: function(e, t, a, r, o, n) { var l = t.getModel("splitLine"), v = l.getModel("lineStyle"), i = v.get("color"), u = 0, s = a.getAngleAxis(), c = Math.PI / 180, d = s.getExtent(), f = Math.abs(d[1] - d[0]) === 360 ? "Circle" : "Arc"; i = i instanceof Array ? i : [i]; for (var y = [], g = 0; g < n.length; g++) { var p = u++ % i.length; y[p] = y[p] || [], y[p].push(new _t[f]({ shape: { cx: a.cx, cy: a.cy, // ensure circle radius >= 0 r: Math.max(n[g].coord, 0), startAngle: -d[0] * c, endAngle: -d[1] * c, clockwise: s.inverse } })); } for (var g = 0; g < y.length; g++) e.add(q(y[g], { style: H({ stroke: i[g % i.length], fill: null }, v.getLineStyle()), silent: !0 })); }, minorSplitLine: function(e, t, a, r, o, n, l) { if (l.length) { for (var v = t.getModel("minorSplitLine"), i = v.getModel("lineStyle"), u = [], s = 0; s < l.length; s++) for (var c = 0; c < l[s].length; c++) u.push(new Ot({ shape: { cx: a.cx, cy: a.cy, r: l[s][c].coord } })); e.add(q(u, { style: H({ fill: null }, i.getLineStyle()), silent: !0 })); } }, splitArea: function(e, t, a, r, o, n) { if (n.length) { var l = t.getModel("splitArea"), v = l.getModel("areaStyle"), i = v.get("color"), u = 0; i = i instanceof Array ? i : [i]; for (var s = [], c = n[0].coord, d = 1; d < n.length; d++) { var f = u++ % i.length; s[f] = s[f] || [], s[f].push(new Bt({ shape: { cx: a.cx, cy: a.cy, r0: c, r: n[d].coord, startAngle: 0, endAngle: Math.PI * 2 }, silent: !0 })), c = n[d].coord; } for (var d = 0; d < s.length; d++) e.add(q(s[d], { style: H({ fill: i[d % i.length] }, v.getAreaStyle()), silent: !0 })); } } }; function aa(e, t, a) { return { position: [e.cx, e.cy], rotation: a / 180 * Math.PI, labelDirection: -1, tickDirection: -1, nameDirection: 1, labelRotate: t.getModel("axisLabel").get("rotate"), // Over splitLine and splitArea z2: 1 }; } function Gt(e) { return e.get("stack") || "__ec_stack_" + e.seriesIndex; } function Vt(e, t) { return t.dim + e.model.componentIndex; } function ra(e, t, a) { var r = {}, o = ia(ye(t.getSeriesByType(e), function(n) { return !t.isSeriesFiltered(n) && n.coordinateSystem && n.coordinateSystem.type === "polar"; })); t.eachSeriesByType(e, function(n) { if (n.coordinateSystem.type === "polar") { var l = n.getData(), v = n.coordinateSystem, i = v.getBaseAxis(), u = Vt(v, i), s = Gt(n), c = o[u][s], d = c.offset, f = c.width, y = v.getOtherAxis(i), g = n.coordinateSystem.cx, p = n.coordinateSystem.cy, S = n.get("barMinHeight") || 0, C = n.get("barMinAngle") || 0; r[s] = r[s] || []; for (var k = l.mapDimension(y.dim), D = l.mapDimension(i.dim), T = xe( l, k /* , baseDim */ ), K = i.dim !== "radius" || !n.get("roundCap", !0), $ = y.model, st = $.get("startValue"), R = y.dataToCoord(st || 0), G = 0, Z = l.count(); G < Z; G++) { var V = l.get(k, G), B = l.get(D, G), J = V >= 0 ? "p" : "n", Y = R; T && (r[s][B] || (r[s][B] = { p: R, n: R // Negative stack }), Y = r[s][B][J]); var U = void 0, j = void 0, h = void 0, x = void 0; if (y.dim === "radius") { var A = y.dataToCoord(V) - R, w = i.dataToCoord(B); Math.abs(A) < S && (A = (A < 0 ? -1 : 1) * S), U = Y, j = Y + A, h = w - d, x = h - f, T && (r[s][B][J] = j); } else { var m = y.dataToCoord(V, K) - R, b = i.dataToCoord(B); Math.abs(m) < C && (m = (m < 0 ? -1 : 1) * C), U = b + d, j = U + f, h = Y, x = Y + m, T && (r[s][B][J] = x); } l.setItemLayout(G, { cx: g, cy: p, r0: U, r: j, // Consider that positive angle is anti-clockwise, // while positive radian of sector is clockwise startAngle: -h * Math.PI / 180, endAngle: -x * Math.PI / 180, /** * Keep the same logic with bar in catesion: use end value to * control direction. Notice that if clockwise is true (by * default), the sector will always draw clockwisely, no matter * whether endAngle is greater or less than startAngle. */ clockwise: h >= x }); } } }); } function ia(e) { var t = {}; W(e, function(r, o) { var n = r.getData(), l = r.coordinateSystem, v = l.getBaseAxis(), i = Vt(l, v), u = v.getExtent(), s = v.type === "category" ? v.getBandWidth() : Math.abs(u[1] - u[0]) / n.count(), c = t[i] || { bandWidth: s, remainedWidth: s, autoWidthCount: 0, categoryGap: "20%", gap: "30%", stacks: {} }, d = c.stacks; t[i] = c; var f = Gt(r); d[f] || c.autoWidthCount++, d[f] = d[f] || { width: 0, maxWidth: 0 }; var y = F(r.get("barWidth"), s), g = F(r.get("barMaxWidth"), s), p = r.get("barGap"), S = r.get("barCategoryGap"); y && !d[f].width && (y = Math.min(c.remainedWidth, y), d[f].width = y, c.remainedWidth -= y), g && (d[f].maxWidth = g), p != null && (c.gap = p), S != null && (c.categoryGap = S); }); var a = {}; return W(t, function(r, o) { a[o] = {}; var n = r.stacks, l = r.bandWidth, v = F(r.categoryGap, l), i = F(r.gap, 1), u = r.remainedWidth, s = r.autoWidthCount, c = (u - v) / (s + (s - 1) * i); c = Math.max(c, 0), W(n, function(g, p) { var S = g.maxWidth; S && S < c && (S = Math.min(S, u), g.width && (S = Math.min(S, g.width)), u -= S, g.width = S, s--); }), c = (u - v) / (s + (s - 1) * i), c = Math.max(c, 0); var d = 0, f; W(n, function(g, p) { g.width || (g.width = c), f = g, d += g.width * (1 + i); }), f && (d -= f.width * i); var y = -d / 2; W(n, function(g, p) { a[o][p] = a[o][p] || { offset: y, width: g.width }, y += g.width * (1 + i); }); }), a; } var na = { startAngle: 90, clockwise: !0, splitNumber: 12, axisLabel: { rotate: 0 } }, oa = { splitNumber: 5 }, sa = ( /** @class */ function(e) { z(t, e); function t() { var a = e !== null && e.apply(this, arguments) || this; return a.type = t.type, a; } return t.type = "polar", t; }(Se) ); function la(e) { gt(Ae), ht.registerAxisPointerClass("PolarAxisPointer", Oe), e.registerCoordinateSystem("polar", Ke), e.registerComponentModel(Ve), e.registerComponentView(sa), Pt(e, "angle", Ne, na), Pt(e, "radius", Fe, oa), e.registerComponentView(Xe), e.registerComponentView(ta), e.registerLayout(me(ra, "bar")); } gt([be, we]); gt(Pe); Te({ type: "series.liquidFill", optionUpdated: function() { var e = this.option; e.gridSize = Math.max(Math.floor(e.gridSize), 4); }, getInitialData: function(e, t) { var a = Me(e.data, { coordDimensions: ["value"] }), r = new Le(a, this); return r.initData(e.data), r; }, defaultOption: { color: ["#294D99", "#156ACF", "#1598ED", "#45BDFF"], center: ["50%", "50%"], radius: "50%", amplitude: "8%", waveLength: "80%", phase: "auto", period: "auto", direction: "right", shape: "circle", waveAnimation: !0, animationEasing: "linear", animationEasingUpdate: "linear", animationDuration: 2e3, animationDurationUpdate: 1e3, outline: { show: !0, borderDistance: 8, itemStyle: { color: "none", borderColor: "#294D99", borderWidth: 8, shadowBlur: 20, shadowColor: "rgba(0, 0, 0, 0.25)" } }, backgroundStyle: { color: "#E3F7FF" }, itemStyle: { opacity: 0.95, shadowBlur: 50, shadowColor: "rgba(0, 0, 0, 0.4)" }, label: { show: !0, color: "#294D99", insideColor: "#fff", fontSize: 50, fontWeight: "bold", align: "center", baseline: "middle", position: "inside" }, emphasis: { itemStyle: { opacity: 0.8 } } } }); const va = Ce({ type: "ec-liquid-fill", shape: { waveLength: 0, radius: 0, radiusY: 0, cx: 0, cy: 0, waterLevel: 0, amplitude: 0, phase: 0, inverse: !1 }, buildPath: function(e, t) { t.radiusY == null && (t.radiusY = t.radius); for (var a = Math.max( Math.ceil(2 * t.radius / t.waveLength * 4) * 2, 8 ); t.phase < -Math.PI * 2; ) t.phase += Math.PI * 2; for (; t.phase > 0; ) t.phase -= Math.PI * 2; var r = t.phase / Math.PI / 2 * t.waveLength, o = t.cx - t.radius + r - t.radius * 2; e.moveTo(o, t.waterLevel); for (var n = 0, l = 0; l < a; ++l) { var v = l % 4, i = ua( l * t.waveLength / 4, v, t.waveLength, t.amplitude ); e.bezierCurveTo( i[0][0] + o, -i[0][1] + t.waterLevel, i[1][0] + o, -i[1][1] + t.waterLevel, i[2][0] + o, -i[2][1] + t.waterLevel ), l === a - 1 && (n = i[2][0]); } t.inverse ? (e.lineTo(n + o, t.cy - t.radiusY), e.lineTo(o, t.cy - t.radiusY), e.lineTo(o, t.waterLevel)) : (e.lineTo(n + o, t.cy + t.radiusY), e.lineTo(o, t.cy + t.radiusY), e.lineTo(o, t.waterLevel)), e.closePath(); } }); function ua(e, t, a, r) { return t === 0 ? [ [e + 1 / 2 * a / Math.PI / 2, r / 2], [e + 1 / 2 * a / Math.PI, r], [e + a / 4, r] ] : t === 1 ? [ [ e + 1 / 2 * a / Math.PI / 2 * (Math.PI - 2), r ], [ e + 1 / 2 * a / Math.PI / 2 * (Math.PI - 1), r / 2 ], [e + a / 4, 0] ] : t === 2 ? [ [e + 1 / 2 * a / Math.PI / 2, -r / 2], [e + 1 / 2 * a / Math.PI, -r], [e + a / 4, -r] ] : [ [ e + 1 / 2 * a / Math.PI / 2 * (Math.PI - 2), -r ], [ e + 1 / 2 * a / Math.PI / 2 * (Math.PI - 1), -r / 2 ], [e + a / 4, 0] ]; } var N = F; function It(e) { return e && e.indexOf("path://") === 0; } ke({ type: "liquidFill", render: function(e, t, a) { var r = this, o = this.group; o.removeAll(); var n = e.getData(), l = n.getItemModel(0), v = l.get("center"), i = l.get("radius"), u = a.getWidth(), s = a.getHeight(), c = Math.min(u, s), d = 0, f = 0, y = e.get("outline.show"); y && (d = e.get("outline.borderDistance"), f = N( e.get("outline.itemStyle.borderWidth"), c )); var g = N(v[0], u), p = N(v[1], s), S, C, k, D = !1, T = e.get("shape"); if (T === "container" ? (D = !0, S = [ u / 2, s / 2 ], C = [ S[0] - f / 2, S[1] - f / 2 ], k = [ N(d, u), N(d, s) ], i = [ Math.max(C[0] - k[0], 0), Math.max(C[1] - k[1], 0) ]) : (S = N(i, c) / 2, C = S - f / 2, k = N(d, c), i = Math.max(C - k, 0)), y) { var K = B(); K.style.lineWidth = f, o.add(B()); } var $ = D ? 0 : g - i, st = D ? 0 : p - i, R = null; o.add(J()); var G = this._data, Z = []; n.diff(G).add(function(h) { var x = Y(h, !1), A = x.shape.waterLevel; x.shape.waterLevel = D ? s / 2 : i, De(x, { shape: { waterLevel: A } }, e), x.z2 = 2, U(h, x, null), o.add(x), n.setItemGraphicEl(h, x), Z.push(x); }).update(function(h, x) { for (var A = G.getItemGraphicEl(x), w = Y(h, !1, A), m = {}, b = ["amplitude", "cx", "cy", "phase", "radius", "radiusY", "waterLevel", "waveLength"], M = 0; M < b.length; ++M) { var P = b[M]; w.shape.hasOwnProperty(P) && (m[P] = w.shape[P]); } for (var I = {}, L = ["fill", "opacity", "shadowBlur", "shadowColor"], M = 0; M < L.length; ++M) { var P = L[M]; w.style.hasOwnProperty(P) && (I[P] = w.style[P]); } D && (m.radiusY = s / 2), ut(A, { shape: m, x: w.x, y: w.y }, e), e.isUniversalTransitionEnabled && e.isUniversalTransitionEnabled() ? ut(A, { style: I }, e) : A.useStyle(I); var E = A.getClipPath(), _ = w.getClipPath(); A.setClipPath(w.getClipPath()), A.shape.inverse = w.inverse, E && _ && r._shape === T && !It(T) && ut(_, { shape: E.shape }, e, { isFrom: !0 }), U(h, A, A), o.add(A), n.setItemGraphicEl(h, A), Z.push(A); }).remove(function(h) { var x = G.getItemGraphicEl(h); o.remove(x); }).execute(), l.get("label.show") && o.add(j(Z)), this._shape = T, this._data = n; function V(h, x) { if (T) if (It(T)) { var A = Mt(T.slice(7), {}), w = A.getBoundingRect(), m = w.width, b = w.height; m > b ? (b = h * 2 / m * b, m = h * 2) : (m = h * 2 / b * m, b = h * 2); var M = x ? 0 : g - m / 2, P = x ? 0 : p - b / 2; return A = Mt( T.slice(7), {}, new We(M, P, m, b) ), x && (A.x = -m / 2, A.y = -b / 2), A; } else if (D) { var I = x ? -h[0] : g - h[0], L = x ? -h[1] : p - h[1]; return Lt( "rect", I, L, h[0] * 2, h[1] * 2 ); } else { var I = x ? -h : g - h, L = x ? -h : p - h; return T === "pin" ? L += h : T === "arrow" && (L -= h), Lt(T, I, L, h * 2, h * 2); } return new Ot({ shape: { cx: x ? 0 : g, cy: x ? 0 : p, r: h } }); } function B() { var h = V(S); return h.style.fill = null, h.setStyle(e.getModel("outline.itemStyle").getItemStyle()), h; } function J() { var h = V(i); h.setStyle(e.getModel("backgroundStyle").getItemStyle()), h.style.fill = null, h.z2 = 5; var x = V(i); x.setStyle(e.getModel("backgroundStyle").getItemStyle()), x.style.stroke = null; var A = new dt(); return A.add(h), A.add(x), A; } function Y(h, x, A) { var w = D ? i[0] : i, m = D ? s / 2 : i, b = n.getItemModel(h), M = b.getModel("itemStyle"), P = b.get("phase"), I = N( b.get("amplitude"), m * 2 ), L = N( b.get("waveLength"), w * 2 ), E = n.get("value", h), _ = m - E * m * 2; P = A ? A.shape.phase : P === "auto" ? h * Math.PI / 4 : P; var O = M.getItemStyle(); if (!O.fill) { var Q = e.get("color"), at = h % Q.length; O.fill = Q[at]; } var Nt = w * 2, tt = new va({ shape: { waveLength: L, radius: w, radiusY: m, cx: Nt, cy: 0, waterLevel: _, amplitude: I, phase: P, inverse: x }, style: O, x: g, y: p }); tt.shape._waterLevel = _; var xt = b.getModel("emphasis.itemStyle").getItemStyle(); xt.lineWidth = 0, tt.ensureState("emphasis").style = xt, Ie(tt); var At = V(i, !0); return At.setStyle({ fill: "white" }), tt.setClipPath(At), tt; } function U(h, x, A) { var w = n.getItemModel(h), m = w.get("period"), b = w.get("direction"), M = n.get("value", h), P = w.get("phase"); P = A ? A.shape.phase : P === "auto" ? h * Math.PI / 4 : P; var I = function(_) { var O = n.count(); return O === 0 ? _ : _ * (0.2 + (O - h) / O * 0.8); }, L = 0; m === "auto" ? L = I(5e3) : L = typeof m == "function" ? m(M, h) : m; var E = 0; b === "right" || b == null ? E = Math.PI : b === "left" ? E = -Math.PI : b === "none" ? E = 0 : console.error("Illegal direction value for liquid fill."), b !== "none" && w.get("waveAnimation") && x.animate("shape", !0).when(0, { phase: P }).when(L / 2, { phase: E + P }).when(L, { phase: E * 2 + P }).during(function() { R && R.dirty(!0); }).start(); } function j(h) { var x = l.getModel("label"); function A() { var O = e.getFormattedLabel(0, "normal"), Q = n.get("value", 0) * 100, at = n.getName(0) || e.name; return isNaN(Q) || (at = Q.toFixed(0) + "%"), O ?? at; } var w = { z2: 10, shape: { x: $, y: st, width: (D ? i[0] : i) * 2, height: (D ? i[1] : i) * 2 }, style: { fill: "transparent" }, textConfig: { position: x.get("position") || "inside" }, silent: !0 }, m = { style: { text: A(), textAlign: x.get("align"), textVerticalAlign: x.get("baseline") } }; Object.assign(m.style, Ee(x)); var b = new Tt(w), M = new Tt(w); M.disableLabelAnimation = !0, b.disableLabelAnimation = !0; var P = new ct(m), I = new ct(m); b.setTextContent(P), M.setTextContent(I); var L = x.get("insideColor"); I.style.fill = L; var E = new dt(); E.add(b), E.add(M); var _ = V(i, !0); return R = new Re({ shape: { paths: h }, x: g, y: p }), R.setClipPath(_), M.setClipPath(R), E; } }, dispose: function() { } }); const ca = { class: "real-time-tourist" }, da = { class: "actual-total f-fe-c" }, ha = { class: "actual-total f-fe-c" }, ga = /* @__PURE__ */ Ft({ __name: "RealTimeTourist", setup(e) { const t = Yt("216908"), a = { title: [ { text: (0.5 * 100).toFixed(0) + "%", left: "49%", top: "35%", textAlign: "center", textStyle: { fontSize: "16", fontWeight: "normal", color: "#ffffff", align: "center", textBorderColor: "rgba(0, 0, 0, 0)", textShadowColor: "#000", textShadowBlur: 0, textShadowOffsetX: 0, textShadowOffsetY: 1 } }, { text: "预约量", left: "49%", top: "25%", textAlign: "center", textStyle: { fontSize: "15", fontWeight: "normal", color: "#ffffff", align: "center", textBorderColor: "rgba(0, 0, 0, 0)", textShadowColor: "#000", textShadowBlur: 0, textShadowOffsetX: 0, textShadowOffsetY: 1 } } ], grid: { top: "0", left: "0px", right: "0px", bottom: "0", containLabel: !0 }, polar: { radius: ["75%", "85%"], center: ["50%", "50%"] }, angleAxis: { max: 120, clockwise: !1, axisLine: { show: !1 }, axisTick: { show: !1 }, axisLabel: { show: !1 }, splitLine: { show: !1 }, startAngle: 188 }, radiusAxis: { type: "category", show: !0, axisLabel: { show: !1 }, axisLine: { show: !1 }, axisTick: { show: !1 } }, series: [ { type: "liquidFill", radius: "70%", z: 2, center: ["50%", "50%"], data: [0.4, 0.4, 0.4], itemStyle: { color: { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: "#35FAB6" }, { offset: 1, color: "rgba(40, 209, 247,0.3)" } ], global: !1 } }, outline: { borderDistance: 0, itemStyle: { borderWidth: 2, borderColor: "#31d8d5", shadowBlur: 20, shadowColor: "#50c1a7" } }, label: { show: !1 }, backgroundStyle: { borderWidth: 1, color: { type: "radial", x: 0.5, y: 0.5, r: 0.5, colorStops: [ { offset: 0, color: "#0D2648" }, { offset: 0.8, color: "#0D2648" }, { offset: 1, color: "#228E7D" } ], global: !1 } } }, { type: "pie", radius: ["80%", "80%"], center: ["50%", "50%"], z: 1, label: { show: !1 }, silent: !0, itemStyle: { borderWidth: 2, borderType: [8, 10], borderDashOffset: 15, borderColor: "#31d8d5", color: "#11144e", borderCap: "round" }, data: [100] }, { type: "bar", data: [55], z: 10, coordinateSystem: "polar", roundCap: !0, color: "#31d8d5" } ] }; return (r, o) => (vt(), lt("div", ca, [ et("div", da, [ o[1] || (o[1] = et("div", { class: "expect-total" }, [ mt("可预约总量"), et("i", null, "999999"), mt("人") ], -1)), et("div", ha, [ (vt(!0), lt(Ht, null, $t(t.value.split(""), (n, l) => (vt(), lt("div", { key: l, class: "actual-item f-c-c" }, Ut(n), 1))), 128)), o[0] || (o[0] = et("div", { class: "actual-item f-c-c" }, "人", -1)) ]) ]), qt(Be, { option: a, height: "260px", use: [Kt(la)] }, null, 8, ["use"]) ])); } }), xa = /* @__PURE__ */ _e(ga, [["__scopeId", "data-v-08aadf4c"]]); export { xa as default };