@campus-admin/ui 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import './style.css'
2
- import { ElAffix as e, ElAlert as t, ElAnchor as n, ElAnchorLink as r, ElAside as i, ElAutoResizer as a, ElAutocomplete as o, ElAvatar as s, ElAvatarGroup as c, ElBacktop as l, ElBadge as u, ElBreadcrumb as d, ElBreadcrumbItem as f, ElButton as p, ElButtonGroup as m, ElCalendar as h, ElCard as g, ElCarousel as _, ElCarouselItem as v, ElCascader as y, ElCascaderPanel as b, ElCheckTag as x, ElCheckbox as S, ElCheckboxButton as C, ElCheckboxGroup as ee, ElCol as w, ElCollapse as T, ElCollapseItem as te, ElColorPicker as ne, ElColorPickerPanel as E, ElConfigProvider as re, ElContainer as D, ElCountdown as O, ElDatePicker as ie, ElDatePickerPanel as ae, ElDescriptions as oe, ElDescriptionsItem as se, ElDialog as ce, ElDivider as le, ElDrawer as ue, ElDropdown as de, ElDropdownItem as fe, ElDropdownMenu as pe, ElEmpty as me, ElFooter as he, ElForm as ge, ElFormItem as _e, ElHeader as ve, ElIcon as ye, ElImage as be, ElImageViewer as xe, ElInfiniteScroll as Se, ElInput as Ce, ElInputNumber as we, ElInputOtp as Te, ElInputTag as Ee, ElLink as De, ElLoadingDirective as Oe, ElMain as ke, ElMention as Ae, ElMenu as je, ElMenuItem as Me, ElMenuItemGroup as Ne, ElOption as Pe, ElOptionGroup as Fe, ElPageHeader as Ie, ElPagination as Le, ElPopconfirm as Re, ElPopover as ze, ElProgress as Be, ElRadio as Ve, ElRadioButton as He, ElRadioGroup as Ue, ElRate as We, ElResult as Ge, ElRow as Ke, ElScrollbar as qe, ElSegmented as Je, ElSelect as Ye, ElSelectV2 as Xe, ElSkeleton as Ze, ElSkeletonItem as Qe, ElSlider as $e, ElSpace as et, ElSplitter as tt, ElSplitterPanel as nt, ElStatistic as rt, ElStep as it, ElSteps as at, ElSubMenu as ot, ElSwitch as st, ElTabPane as ct, ElTable as lt, ElTableColumn as ut, ElTableV2 as dt, ElTabs as ft, ElTag as pt, ElText as mt, ElTimePicker as ht, ElTimeSelect as gt, ElTimeline as _t, ElTimelineItem as vt, ElTooltip as yt, ElTour as bt, ElTourStep as xt, ElTransfer as St, ElTree as Ct, ElTreeSelect as wt, ElTreeV2 as Tt, ElUpload as Et, ElWatermark as Dt, vLoading as Ot } from "element-plus";
2
+ import { i as e, n as t, r as n, t as r } from "./button-CNxlqu0z.js";
3
+ import { a as i, i as a, n as o, o as s, r as c, s as l, t as u } from "./loaders-DAfXYCem.js";
4
+ import { ElAffix as d, ElAlert as f, ElAnchor as p, ElAnchorLink as m, ElAside as h, ElAutoResizer as g, ElAutocomplete as _, ElAvatar as v, ElAvatarGroup as y, ElBacktop as b, ElBadge as x, ElBreadcrumb as S, ElBreadcrumbItem as C, ElButton as w, ElCalendar as T, ElCard as E, ElCarousel as D, ElCarouselItem as O, ElCascader as ee, ElCascaderPanel as k, ElCheckTag as A, ElCheckbox as j, ElCheckboxButton as M, ElCheckboxGroup as te, ElCol as ne, ElCollapse as re, ElCollapseItem as ie, ElColorPicker as ae, ElColorPickerPanel as oe, ElConfigProvider as se, ElContainer as ce, ElCountdown as le, ElDatePicker as ue, ElDatePickerPanel as de, ElDescriptions as fe, ElDescriptionsItem as pe, ElDialog as me, ElDivider as he, ElDrawer as ge, ElDropdown as _e, ElDropdownItem as ve, ElDropdownMenu as ye, ElEmpty as be, ElFooter as xe, ElForm as Se, ElFormItem as Ce, ElHeader as we, ElIcon as Te, ElImage as Ee, ElImageViewer as De, ElInfiniteScroll as Oe, ElInput as ke, ElInputNumber as Ae, ElInputOtp as je, ElInputTag as Me, ElLink as Ne, ElLoadingDirective as Pe, ElMain as Fe, ElMention as Ie, ElMenu as Le, ElMenuItem as Re, ElMenuItemGroup as ze, ElOption as Be, ElOptionGroup as Ve, ElPageHeader as He, ElPagination as Ue, ElPopconfirm as We, ElPopover as Ge, ElProgress as Ke, ElRadio as qe, ElRadioButton as Je, ElRadioGroup as Ye, ElRate as Xe, ElResult as Ze, ElRow as Qe, ElScrollbar as $e, ElSegmented as et, ElSelect as tt, ElSelectV2 as nt, ElSkeleton as rt, ElSkeletonItem as it, ElSlider as at, ElSpace as ot, ElSplitter as st, ElSplitterPanel as ct, ElStatistic as lt, ElStep as ut, ElSteps as dt, ElSubMenu as ft, ElSwitch as pt, ElTabPane as mt, ElTable as ht, ElTableColumn as gt, ElTableV2 as _t, ElTabs as vt, ElTag as yt, ElText as bt, ElTimePicker as xt, ElTimeSelect as St, ElTimeline as Ct, ElTimelineItem as wt, ElTooltip as Tt, ElTour as Et, ElTourStep as Dt, ElTransfer as Ot, ElTree as kt, ElTreeSelect as At, ElTreeV2 as jt, ElUpload as Mt, ElWatermark as Nt, vLoading as Pt } from "element-plus";
3
5
  import "element-plus/es/components/loading/style/css";
4
6
  import "element-plus/es/components/link/style/css";
5
7
  import "element-plus/es/components/text/style/css";
@@ -10,12 +12,10 @@ import "element-plus/es/components/alert/style/css";
10
12
  import "element-plus/es/components/card/style/css";
11
13
  import "element-plus/es/components/tag/style/css";
12
14
  import "element-plus/es/components/icon/style/css";
13
- import { Fragment as k, Teleport as kt, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createTextVNode as F, createVNode as I, defineComponent as L, inject as At, normalizeClass as R, normalizeStyle as z, onActivated as jt, onBeforeUnmount as Mt, onDeactivated as Nt, onMounted as Pt, openBlock as B, reactive as Ft, ref as V, renderList as H, renderSlot as U, resolveDynamicComponent as It, shallowRef as Lt, toDisplayString as W, unref as G, useSlots as Rt, vShow as zt, watch as Bt, withCtx as K, withDirectives as Vt, withModifiers as Ht } from "vue";
14
- import { ArrowDown as Ut, ArrowLeft as Wt, Bell as Gt, Brush as Kt, ChatDotRound as qt, Check as Jt, Close as Yt, Collection as Xt, DataAnalysis as Zt, Delete as Qt, Document as $t, Download as en, EditPen as tn, Expand as nn, Files as rn, Fold as an, FullScreen as on, Grid as sn, Hide as cn, Histogram as ln, HomeFilled as un, Location as dn, Menu as fn, Message as pn, Monitor as mn, Moon as hn, MoreFilled as gn, Odometer as _n, Paperclip as vn, Phone as yn, Picture as bn, Plus as xn, Promotion as Sn, Refresh as Cn, ScaleToOriginal as wn, Search as Tn, Setting as En, Star as Dn, Sunny as On, Tickets as kn, Top as An, User as jn, VideoCamera as Mn, View as Nn, Warning as Pn } from "@element-plus/icons-vue";
15
- import "element-plus/es/components/button/style/css";
16
- import "element-plus/es/components/button-group/style/css";
17
- import Fn from "element-plus/es/locale/lang/en";
18
- import In from "element-plus/es/locale/lang/zh-cn";
15
+ import { Fragment as N, Teleport as Ft, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as It, createTextVNode as z, createVNode as B, defineAsyncComponent as Lt, defineComponent as V, guardReactiveProps as Rt, nextTick as zt, normalizeClass as H, normalizeProps as Bt, normalizeStyle as U, onActivated as Vt, onBeforeUnmount as Ht, onDeactivated as Ut, onMounted as Wt, openBlock as W, reactive as Gt, ref as G, renderList as K, renderSlot as q, resolveDynamicComponent as Kt, shallowRef as qt, toDisplayString as J, unref as Y, useId as Jt, useSlots as Yt, vShow as Xt, watch as Zt, withCtx as X, withDirectives as Qt, withModifiers as $t } from "vue";
16
+ import { ArrowDown as en, ArrowLeft as tn, Bell as nn, Brush as rn, ChatDotRound as an, Check as on, Close as sn, Collection as cn, DataAnalysis as ln, Delete as un, Document as dn, Download as fn, EditPen as pn, Expand as mn, Files as hn, Fold as gn, FullScreen as _n, Grid as vn, Hide as yn, Histogram as bn, HomeFilled as xn, Location as Sn, Menu as Cn, Message as wn, Monitor as Tn, Moon as En, MoreFilled as Dn, Odometer as On, Paperclip as kn, Phone as An, Picture as jn, Plus as Mn, Promotion as Nn, Refresh as Pn, ScaleToOriginal as Fn, Search as In, Setting as Ln, Star as Rn, Sunny as zn, Tickets as Bn, Top as Vn, User as Hn, VideoCamera as Un, View as Wn, Warning as Gn } from "@element-plus/icons-vue";
17
+ import Kn from "element-plus/es/locale/lang/en";
18
+ import qn from "element-plus/es/locale/lang/zh-cn";
19
19
  import "element-plus/es/components/config-provider/style/css";
20
20
  import "element-plus/es/components/avatar/style/css";
21
21
  import "element-plus/es/components/avatar-group/style/css";
@@ -45,6 +45,16 @@ import "element-plus/es/components/segmented/style/css";
45
45
  import "element-plus/es/components/statistic/style/css";
46
46
  import "element-plus/es/components/countdown/style/css";
47
47
  import "element-plus/es/components/check-tag/style/css";
48
+ import Jn from "markdown-it";
49
+ import Yn from "markdown-it-anchor";
50
+ import Xn from "markdown-it-footnote";
51
+ import Zn from "markdown-it-container";
52
+ import Qn from "dompurify";
53
+ import "element-plus/es/components/popover/style/css";
54
+ import "element-plus/es/components/popconfirm/style/css";
55
+ import "element-plus/es/components/tooltip/style/css";
56
+ import "element-plus/es/components/dialog/style/css";
57
+ import "element-plus/es/components/drawer/style/css";
48
58
  import "element-plus/es/components/container/style/css";
49
59
  import "element-plus/es/components/header/style/css";
50
60
  import "element-plus/es/components/aside/style/css";
@@ -105,16 +115,11 @@ import "element-plus/es/components/dropdown-menu/style/css";
105
115
  import "element-plus/es/components/menu/style/css";
106
116
  import "element-plus/es/components/menu-item/style/css";
107
117
  import "element-plus/es/components/sub-menu/style/css";
108
- import "element-plus/es/components/popover/style/css";
109
- import "element-plus/es/components/popconfirm/style/css";
110
- import "element-plus/es/components/tooltip/style/css";
111
- import "element-plus/es/components/dialog/style/css";
112
- import "element-plus/es/components/drawer/style/css";
113
118
  import "element-plus/es/components/table-v2/style/css";
114
119
  import "element-plus/es/components/table/style/css";
115
120
  import "element-plus/es/components/table-column/style/css";
116
121
  // packages/ui/src/shared/registry.ts
117
- function Ln(...e) {
122
+ function $n(...e) {
118
123
  let t = {};
119
124
  for (let n of e) for (let [e, r] of Object.entries(n)) {
120
125
  if (e in t) throw Error(`[campus/ui] 组件名重复:${e}(所有域、所有分类的组件名必须唯一)`);
@@ -122,12 +127,8 @@ function Ln(...e) {
122
127
  }
123
128
  return t;
124
129
  }
125
- // packages/ui/src/shared/wrap.ts
126
- function q(e) {
127
- return e;
128
- }
129
130
  // packages/ui/src/components/basic/icon-font.ts
130
- async function Rn(e) {
131
+ async function er(e) {
131
132
  let t = getComputedStyle(e, "::before");
132
133
  if (!t.content || [
133
134
  "none",
@@ -142,151 +143,141 @@ async function Rn(e) {
142
143
  }
143
144
  }
144
145
  // packages/ui/src/components/basic/icons.ts
145
- var zn = {
146
- home: un,
147
- chart: Zt,
148
- document: $t,
149
- grid: sn,
150
- setting: En,
151
- user: jn,
152
- bell: Gt,
153
- edit: tn,
154
- monitor: mn,
155
- brush: Kt,
156
- collection: Xt,
157
- warning: Pn,
158
- files: rn,
159
- tickets: kn,
160
- histogram: ln,
161
- menu: fn,
162
- message: pn,
163
- gauge: _n,
164
- search: Tn,
165
- check: Jt,
166
- delete: Qt,
167
- star: Dn,
168
- plus: xn,
169
- download: en,
170
- fullscreen: on,
171
- refresh: Cn,
172
- exitFullscreen: wn,
173
- chat: qt,
174
- sunny: On,
175
- moon: hn,
176
- expand: nn,
177
- fold: an,
178
- hide: cn,
179
- view: Nn,
180
- arrowDown: Ut,
181
- close: Yt,
182
- location: dn,
183
- back: Wt,
184
- more: gn,
185
- attachment: vn,
186
- phone: yn,
187
- image: bn,
188
- send: Sn,
189
- pin: An,
190
- video: Mn
191
- }, Bn = /*@__PURE__*/ L({
146
+ var tr = {
147
+ home: xn,
148
+ chart: ln,
149
+ document: dn,
150
+ grid: vn,
151
+ setting: Ln,
152
+ user: Hn,
153
+ bell: nn,
154
+ edit: pn,
155
+ monitor: Tn,
156
+ brush: rn,
157
+ collection: cn,
158
+ warning: Gn,
159
+ files: hn,
160
+ tickets: Bn,
161
+ histogram: bn,
162
+ menu: Cn,
163
+ message: wn,
164
+ gauge: On,
165
+ search: In,
166
+ check: on,
167
+ delete: un,
168
+ star: Rn,
169
+ plus: Mn,
170
+ download: fn,
171
+ fullscreen: _n,
172
+ refresh: Pn,
173
+ exitFullscreen: Fn,
174
+ chat: an,
175
+ sunny: zn,
176
+ moon: En,
177
+ expand: mn,
178
+ fold: gn,
179
+ hide: yn,
180
+ view: Wn,
181
+ arrowDown: en,
182
+ close: sn,
183
+ location: Sn,
184
+ back: tn,
185
+ more: Dn,
186
+ attachment: kn,
187
+ phone: An,
188
+ image: jn,
189
+ send: Nn,
190
+ pin: Vn,
191
+ video: Un
192
+ }, nr = /*#__PURE__*/ l(/* @__PURE__ */ V({
192
193
  __name: "CaIcon",
193
194
  props: {
194
195
  name: {},
195
196
  fallback: {}
196
197
  },
197
198
  setup(e) {
198
- let t = e, n = A(() => t.name && Object.hasOwn(zn, t.name) ? zn[t.name] : void 0), r = A(() => !n.value && !!t.name?.trim()), i = V(), a = V(!1), o = A(() => n.value ?? (!a.value && t.fallback ? zn[t.fallback] : void 0));
199
- return Pt(() => {
200
- Bt(() => t.name, async (e, t, n) => {
199
+ let t = e, n = P(() => t.name && Object.hasOwn(tr, t.name) ? tr[t.name] : void 0), r = P(() => !n.value && !!t.name?.trim()), i = G(), a = G(!1), o = P(() => n.value ?? (!a.value && t.fallback ? tr[t.fallback] : void 0));
200
+ return Wt(() => {
201
+ Zt(() => t.name, async (e, t, n) => {
201
202
  a.value = !1;
202
203
  let o = !1;
203
204
  if (n(() => {
204
205
  o = !0;
205
206
  }), !r.value || !i.value) return;
206
- let s = await Rn(i.value);
207
+ let s = await er(i.value);
207
208
  o || (a.value = s);
208
209
  }, {
209
210
  immediate: !0,
210
211
  flush: "post"
211
212
  });
212
- }), (t, n) => Vt((B(), j(G(ye), { class: "ca-icon" }, {
213
- default: K(() => [r.value ? (B(), N("i", {
213
+ }), (t, n) => Qt((W(), F(Y(Te), { class: "ca-icon" }, {
214
+ default: X(() => [r.value ? (W(), L("i", {
214
215
  key: 0,
215
216
  ref_key: "glyph",
216
217
  ref: i,
217
- class: R(e.name),
218
- style: z({
218
+ class: H(e.name),
219
+ style: U({
219
220
  position: a.value ? void 0 : "absolute",
220
221
  visibility: a.value ? void 0 : "hidden"
221
222
  }),
222
223
  "aria-hidden": "true"
223
- }, null, 6)) : M("v-if", !0), o.value ? (B(), j(It(o.value), { key: 1 })) : r.value ? M("v-if", !0) : U(t.$slots, "default", {}, void 0, !0, 2)]),
224
+ }, null, 6)) : I("v-if", !0), o.value ? (W(), F(Kt(o.value), { key: 1 })) : r.value ? I("v-if", !0) : q(t.$slots, "default", {}, void 0, !0, 2)]),
224
225
  _: 3
225
- }, 512)), [[zt, o.value || a.value || !e.name]]);
226
+ }, 512)), [[Xt, o.value || a.value || !e.name]]);
226
227
  }
227
- }), Vn = (e, t) => {
228
- let n = e.__vccOpts || e;
229
- for (let [e, r] of t) n[e] = r;
230
- return n;
231
- }, Hn = /*#__PURE__*/ Vn(Bn, [["__scopeId", "data-v-b4ddb60c"]]), Un = {
228
+ }), [["__scopeId", "data-v-b4ddb60c"]]), rr = {
232
229
  key: 1,
233
230
  class: "ca-page-actions"
234
- }, Wn = /* @__PURE__ */ L({
231
+ }, ir = /* @__PURE__ */ V({
235
232
  __name: "CaPageActions",
236
233
  setup(e) {
237
- let t = V(null), n = V(!0);
238
- return Pt(() => {
234
+ let t = G(null), n = G(!0);
235
+ return Wt(() => {
239
236
  t.value = document.getElementById("ca-page-actions");
240
- }), jt(() => n.value = !0), Nt(() => n.value = !1), (e, r) => t.value ? (B(), j(kt, {
237
+ }), Vt(() => n.value = !0), Ut(() => n.value = !1), (e, r) => t.value ? (W(), F(Ft, {
241
238
  key: 0,
242
239
  to: t.value
243
- }, [n.value ? U(e.$slots, "default", {}, void 0, void 0, 0) : M("v-if", !0)], 8, ["to"])) : (B(), N("div", Un, [U(e.$slots, "default")]));
240
+ }, [n.value ? q(e.$slots, "default", {}, void 0, void 0, 0) : I("v-if", !0)], 8, ["to"])) : (W(), L("div", rr, [q(e.$slots, "default")]));
244
241
  }
245
- }), Gn = q(t), Kn = q(g), qn = q(pt), Jn = q(De), Yn = q(mt), Xn = q(qe), Zn = q(le), Qn = q(Dt), $n = {
246
- CaLink: Jn,
247
- CaText: Yn,
248
- CaScrollbar: Xn,
249
- CaDivider: Zn,
250
- CaWatermark: Qn,
251
- CaAlert: Gn,
252
- CaCard: Kn,
253
- CaIcon: Hn,
254
- CaPageActions: Wn,
255
- CaTag: qn
256
- }, er = q(p), tr = q(m), nr = {
257
- CaButton: er,
258
- CaButtonGroup: tr
259
- }, rr = Symbol("campus-translate");
260
- function J() {
261
- return At(rr, (e) => e);
262
- }
242
+ }), ar = e(f), or = e(E), sr = e(yt), cr = e(Ne), lr = e(bt), ur = e($e), dr = e(he), fr = e(Nt), pr = {
243
+ CaLink: cr,
244
+ CaText: lr,
245
+ CaScrollbar: ur,
246
+ CaDivider: dr,
247
+ CaWatermark: fr,
248
+ CaAlert: ar,
249
+ CaCard: or,
250
+ CaIcon: nr,
251
+ CaPageActions: ir,
252
+ CaTag: sr
253
+ };
263
254
  // packages/ui/src/components/chart/chart-math.ts
264
- function Y(e) {
255
+ function Z(e) {
265
256
  return typeof e == "number" && Number.isFinite(e);
266
257
  }
267
- function X(e) {
258
+ function Q(e) {
268
259
  let t = e.toFixed(2).replace(/\.?0+$/, "");
269
260
  return t === "-0" || t === "" ? "0" : t;
270
261
  }
271
- function Z(e, t, n) {
262
+ function mr(e, t, n) {
272
263
  return Math.min(n, Math.max(t, e));
273
264
  }
274
- function ir(e, t) {
265
+ function hr(e, t) {
275
266
  let n = Math.floor(Math.log10(e)), r = e / 10 ** n, i;
276
267
  return i = t ? r < 1.5 ? 1 : r < 3 ? 2 : r < 7 ? 5 : 10 : r <= 1 ? 1 : r <= 2 ? 2 : r <= 5 ? 5 : 10, i * 10 ** n;
277
268
  }
278
- function ar(e, t) {
269
+ function gr(e, t) {
279
270
  let n = Math.max(0, -Math.floor(Math.log10(t)) + 2);
280
271
  return Number(e.toFixed(Math.min(n, 12)));
281
272
  }
282
- function or(e, t, n = 5, r = !0) {
273
+ function _r(e, t, n = 5, r = !0) {
283
274
  let i = Number.isFinite(e) ? e : 0, a = Number.isFinite(t) ? t : 1;
284
275
  if (i > a && ([i, a] = [a, i]), r && (i = Math.min(i, 0), a = Math.max(a, 0)), i === a) {
285
276
  let e = i === 0 ? 1 : Math.abs(i) * .1;
286
277
  i = r && i >= 0 ? 0 : i - e, a += e;
287
278
  }
288
- let o = Math.max(2, Math.floor(n)), s = ir(ir(a - i, !1) / (o - 1), !0), c = Math.floor(i / s) * s, l = Math.ceil(a / s) * s, u = [], d = Math.round((l - c) / s);
289
- for (let e = 0; e <= d; e++) u.push(ar(c + e * s, s));
279
+ let o = Math.max(2, Math.floor(n)), s = hr(hr(a - i, !1) / (o - 1), !0), c = Math.floor(i / s) * s, l = Math.ceil(a / s) * s, u = [], d = Math.round((l - c) / s);
280
+ for (let e = 0; e <= d; e++) u.push(gr(c + e * s, s));
290
281
  return {
291
282
  min: u[0],
292
283
  max: u[u.length - 1],
@@ -294,12 +285,12 @@ function or(e, t, n = 5, r = !0) {
294
285
  ticks: u
295
286
  };
296
287
  }
297
- function sr(e, t, n, r) {
288
+ function vr(e, t, n, r) {
298
289
  let i = t - e;
299
290
  return i === 0 ? () => (n + r) / 2 : (t) => n + (t - e) / i * (r - n);
300
291
  }
301
- function cr(e, t, n, r = .2) {
302
- let i = Math.max(1, Math.floor(e)), a = (n - t) / i, o = a * (1 - Z(r, 0, .9));
292
+ function yr(e, t, n, r = .2) {
293
+ let i = Math.max(1, Math.floor(e)), a = (n - t) / i, o = a * (1 - mr(r, 0, .9));
303
294
  return {
304
295
  step: a,
305
296
  bandwidth: o,
@@ -307,13 +298,13 @@ function cr(e, t, n, r = .2) {
307
298
  center: (e) => t + e * a + a / 2
308
299
  };
309
300
  }
310
- function lr(e, t, n) {
301
+ function br(e, t, n) {
311
302
  if (e <= 0) return [];
312
303
  let r = Math.max(1, Math.floor(t / Math.max(1, n))), i = Math.max(1, Math.ceil(e / r)), a = [];
313
304
  for (let t = 0; t < e; t += i) a.push(t);
314
305
  return a;
315
306
  }
316
- function ur(e, t) {
307
+ function xr(e, t) {
317
308
  if (!e.length) return -1;
318
309
  let n = 0, r = e.length - 1;
319
310
  for (; n < r;) {
@@ -322,12 +313,12 @@ function ur(e, t) {
322
313
  }
323
314
  return n > 0 && t - e[n - 1] <= e[n] - t ? n - 1 : n;
324
315
  }
325
- function dr(e) {
316
+ function Sr(e) {
326
317
  let t = [], n = [];
327
- for (let r of e) r && Y(r.x) && Y(r.y) ? n.push(r) : n.length && (t.push(n), n = []);
318
+ for (let r of e) r && Z(r.x) && Z(r.y) ? n.push(r) : n.length && (t.push(n), n = []);
328
319
  return n.length && t.push(n), t;
329
320
  }
330
- function fr(e) {
321
+ function Cr(e) {
331
322
  let t = e.length, n = [], r = [];
332
323
  for (let i = 0; i < t - 1; i++) n.push(e[i + 1].x - e[i].x), r.push(n[i] === 0 ? 0 : (e[i + 1].y - e[i].y) / n[i]);
333
324
  let i = Array(t);
@@ -346,30 +337,30 @@ function fr(e) {
346
337
  }
347
338
  return i;
348
339
  }
349
- function pr(e, t) {
340
+ function wr(e, t) {
350
341
  if (e.length < 2) return "";
351
- if (!t || e.length === 2) return e.slice(1).map((e) => `L${X(e.x)} ${X(e.y)}`).join("");
352
- let n = fr(e), r = "";
342
+ if (!t || e.length === 2) return e.slice(1).map((e) => `L${Q(e.x)} ${Q(e.y)}`).join("");
343
+ let n = Cr(e), r = "";
353
344
  for (let t = 0; t < e.length - 1; t++) {
354
345
  let i = e[t], a = e[t + 1], o = (a.x - i.x) / 3;
355
- r += `C${X(i.x + o)} ${X(i.y + n[t] * o)} ${X(a.x - o)} ${X(a.y - n[t + 1] * o)} ${X(a.x)} ${X(a.y)}`;
346
+ r += `C${Q(i.x + o)} ${Q(i.y + n[t] * o)} ${Q(a.x - o)} ${Q(a.y - n[t + 1] * o)} ${Q(a.x)} ${Q(a.y)}`;
356
347
  }
357
348
  return r;
358
349
  }
359
- function mr(e, t = !1) {
360
- return dr(e).filter((e) => e.length >= 2).map((e) => `M${X(e[0].x)} ${X(e[0].y)}${pr(e, t)}`).join("");
350
+ function Tr(e, t = !1) {
351
+ return Sr(e).filter((e) => e.length >= 2).map((e) => `M${Q(e[0].x)} ${Q(e[0].y)}${wr(e, t)}`).join("");
361
352
  }
362
- function hr(e, t, n = !1) {
363
- return dr(e).filter((e) => e.length >= 2).map((e) => {
353
+ function Er(e, t, n = !1) {
354
+ return Sr(e).filter((e) => e.length >= 2).map((e) => {
364
355
  let r = e[0], i = e[e.length - 1];
365
- return `M${X(r.x)} ${X(t)}L${X(r.x)} ${X(r.y)}${pr(e, n)}L${X(i.x)} ${X(t)}Z`;
356
+ return `M${Q(r.x)} ${Q(t)}L${Q(r.x)} ${Q(r.y)}${wr(e, n)}L${Q(i.x)} ${Q(t)}Z`;
366
357
  }).join("");
367
358
  }
368
- function gr(e) {
359
+ function Dr(e) {
369
360
  let t = Math.max(0, ...e.map((e) => e.length)), n = Array(t).fill(0), r = Array(t).fill(0);
370
361
  return e.map((e) => Array.from({ length: t }, (t, i) => {
371
362
  let a = e[i];
372
- if (!Y(a)) return null;
363
+ if (!Z(a)) return null;
373
364
  if (a >= 0) {
374
365
  let e = n[i];
375
366
  return n[i] = e + a, {
@@ -384,25 +375,25 @@ function gr(e) {
384
375
  };
385
376
  }));
386
377
  }
387
- function _r(e) {
378
+ function Or(e) {
388
379
  let t = Infinity, n = -Infinity;
389
- for (let r of e) Y(r) && (r < t && (t = r), r > n && (n = r));
380
+ for (let r of e) Z(r) && (r < t && (t = r), r > n && (n = r));
390
381
  return t === Infinity ? null : [t, n];
391
382
  }
392
- function vr(e, t, n, r, i, a) {
383
+ function kr(e, t, n, r, i, a) {
393
384
  if (n <= 0 || r <= 0) return "";
394
- let o = Z(i, 0, Math.min(n, r) / 2), s = e + n, c = t + r;
395
- if (o === 0) return `M${X(e)} ${X(t)}H${X(s)}V${X(c)}H${X(e)}Z`;
385
+ let o = mr(i, 0, Math.min(n, r) / 2), s = e + n, c = t + r;
386
+ if (o === 0) return `M${Q(e)} ${Q(t)}H${Q(s)}V${Q(c)}H${Q(e)}Z`;
396
387
  switch (a) {
397
- case "top": return `M${X(e)} ${X(c)}V${X(t + o)}Q${X(e)} ${X(t)} ${X(e + o)} ${X(t)}H${X(s - o)}Q${X(s)} ${X(t)} ${X(s)} ${X(t + o)}V${X(c)}Z`;
398
- case "bottom": return `M${X(e)} ${X(t)}H${X(s)}V${X(c - o)}Q${X(s)} ${X(c)} ${X(s - o)} ${X(c)}H${X(e + o)}Q${X(e)} ${X(c)} ${X(e)} ${X(c - o)}Z`;
399
- case "right": return `M${X(e)} ${X(t)}H${X(s - o)}Q${X(s)} ${X(t)} ${X(s)} ${X(t + o)}V${X(c - o)}Q${X(s)} ${X(c)} ${X(s - o)} ${X(c)}H${X(e)}Z`;
400
- case "left": return `M${X(s)} ${X(t)}H${X(e + o)}Q${X(e)} ${X(t)} ${X(e)} ${X(t + o)}V${X(c - o)}Q${X(e)} ${X(c)} ${X(e + o)} ${X(c)}H${X(s)}Z`;
388
+ case "top": return `M${Q(e)} ${Q(c)}V${Q(t + o)}Q${Q(e)} ${Q(t)} ${Q(e + o)} ${Q(t)}H${Q(s - o)}Q${Q(s)} ${Q(t)} ${Q(s)} ${Q(t + o)}V${Q(c)}Z`;
389
+ case "bottom": return `M${Q(e)} ${Q(t)}H${Q(s)}V${Q(c - o)}Q${Q(s)} ${Q(c)} ${Q(s - o)} ${Q(c)}H${Q(e + o)}Q${Q(e)} ${Q(c)} ${Q(e)} ${Q(c - o)}Z`;
390
+ case "right": return `M${Q(e)} ${Q(t)}H${Q(s - o)}Q${Q(s)} ${Q(t)} ${Q(s)} ${Q(t + o)}V${Q(c - o)}Q${Q(s)} ${Q(c)} ${Q(s - o)} ${Q(c)}H${Q(e)}Z`;
391
+ case "left": return `M${Q(s)} ${Q(t)}H${Q(e + o)}Q${Q(e)} ${Q(t)} ${Q(e)} ${Q(t + o)}V${Q(c - o)}Q${Q(e)} ${Q(c)} ${Q(e + o)} ${Q(c)}H${Q(s)}Z`;
401
392
  }
402
393
  }
403
- var yr = Math.PI * 2;
404
- function br(e, t = 0, n = yr) {
405
- let r = e.map((e) => Y(e) && e > 0 ? e : 0), i = r.reduce((e, t) => e + t, 0);
394
+ var Ar = Math.PI * 2;
395
+ function jr(e, t = 0, n = Ar) {
396
+ let r = e.map((e) => Z(e) && e > 0 ? e : 0), i = r.reduce((e, t) => e + t, 0);
406
397
  if (i <= 0) return [];
407
398
  let a = t;
408
399
  return r.map((e, t) => {
@@ -416,40 +407,40 @@ function br(e, t = 0, n = yr) {
416
407
  return a = o.end, o;
417
408
  });
418
409
  }
419
- function Q(e, t, n, r) {
410
+ function $(e, t, n, r) {
420
411
  return {
421
412
  x: e + n * Math.sin(r),
422
413
  y: t - n * Math.cos(r)
423
414
  };
424
415
  }
425
- function xr(e, t, n, r, i, a) {
416
+ function Mr(e, t, n, r, i, a) {
426
417
  let o = a - i;
427
418
  if (o <= 0 || n <= 0) return "";
428
- let s = Z(r, 0, n);
429
- if (o >= yr - 1e-6) {
430
- let r = Q(e, t, n, i), a = Q(e, t, n, i + Math.PI), o = `M${X(r.x)} ${X(r.y)}A${X(n)} ${X(n)} 0 1 1 ${X(a.x)} ${X(a.y)}A${X(n)} ${X(n)} 0 1 1 ${X(r.x)} ${X(r.y)}Z`;
419
+ let s = mr(r, 0, n);
420
+ if (o >= Ar - 1e-6) {
421
+ let r = $(e, t, n, i), a = $(e, t, n, i + Math.PI), o = `M${Q(r.x)} ${Q(r.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(a.x)} ${Q(a.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(r.x)} ${Q(r.y)}Z`;
431
422
  if (s > 0) {
432
- let n = Q(e, t, s, i), r = Q(e, t, s, i + Math.PI);
433
- o += `M${X(n.x)} ${X(n.y)}A${X(s)} ${X(s)} 0 1 0 ${X(r.x)} ${X(r.y)}A${X(s)} ${X(s)} 0 1 0 ${X(n.x)} ${X(n.y)}Z`;
423
+ let n = $(e, t, s, i), r = $(e, t, s, i + Math.PI);
424
+ o += `M${Q(n.x)} ${Q(n.y)}A${Q(s)} ${Q(s)} 0 1 0 ${Q(r.x)} ${Q(r.y)}A${Q(s)} ${Q(s)} 0 1 0 ${Q(n.x)} ${Q(n.y)}Z`;
434
425
  }
435
426
  return o;
436
427
  }
437
- let c = +(o > Math.PI), l = Q(e, t, n, i), u = Q(e, t, n, a);
438
- if (s === 0) return `M${X(e)} ${X(t)}L${X(l.x)} ${X(l.y)}A${X(n)} ${X(n)} 0 ${c} 1 ${X(u.x)} ${X(u.y)}Z`;
439
- let d = Q(e, t, s, a), f = Q(e, t, s, i);
440
- return `M${X(l.x)} ${X(l.y)}A${X(n)} ${X(n)} 0 ${c} 1 ${X(u.x)} ${X(u.y)}L${X(d.x)} ${X(d.y)}A${X(s)} ${X(s)} 0 ${c} 0 ${X(f.x)} ${X(f.y)}Z`;
428
+ let c = +(o > Math.PI), l = $(e, t, n, i), u = $(e, t, n, a);
429
+ if (s === 0) return `M${Q(e)} ${Q(t)}L${Q(l.x)} ${Q(l.y)}A${Q(n)} ${Q(n)} 0 ${c} 1 ${Q(u.x)} ${Q(u.y)}Z`;
430
+ let d = $(e, t, s, a), f = $(e, t, s, i);
431
+ return `M${Q(l.x)} ${Q(l.y)}A${Q(n)} ${Q(n)} 0 ${c} 1 ${Q(u.x)} ${Q(u.y)}L${Q(d.x)} ${Q(d.y)}A${Q(s)} ${Q(s)} 0 ${c} 0 ${Q(f.x)} ${Q(f.y)}Z`;
441
432
  }
442
- function Sr(e, t, n, r, i) {
433
+ function Nr(e, t, n, r, i) {
443
434
  let a = i - r;
444
435
  if (a <= 0 || n <= 0) return "";
445
- if (a >= yr - 1e-6) {
446
- let i = Q(e, t, n, r), a = Q(e, t, n, r + Math.PI);
447
- return `M${X(i.x)} ${X(i.y)}A${X(n)} ${X(n)} 0 1 1 ${X(a.x)} ${X(a.y)}A${X(n)} ${X(n)} 0 1 1 ${X(i.x)} ${X(i.y)}`;
436
+ if (a >= Ar - 1e-6) {
437
+ let i = $(e, t, n, r), a = $(e, t, n, r + Math.PI);
438
+ return `M${Q(i.x)} ${Q(i.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(a.x)} ${Q(a.y)}A${Q(n)} ${Q(n)} 0 1 1 ${Q(i.x)} ${Q(i.y)}`;
448
439
  }
449
- let o = Q(e, t, n, r), s = Q(e, t, n, i);
450
- return `M${X(o.x)} ${X(o.y)}A${X(n)} ${X(n)} 0 ${+(a > Math.PI)} 1 ${X(s.x)} ${X(s.y)}`;
440
+ let o = $(e, t, n, r), s = $(e, t, n, i);
441
+ return `M${Q(o.x)} ${Q(o.y)}A${Q(n)} ${Q(n)} 0 ${+(a > Math.PI)} 1 ${Q(s.x)} ${Q(s.y)}`;
451
442
  }
452
- function Cr(e) {
443
+ function Pr(e) {
453
444
  return e === "gauge" ? {
454
445
  start: -3 * Math.PI / 4,
455
446
  sweep: 3 * Math.PI / 2
@@ -458,67 +449,67 @@ function Cr(e) {
458
449
  sweep: Math.PI
459
450
  } : {
460
451
  start: 0,
461
- sweep: yr
452
+ sweep: Ar
462
453
  };
463
454
  }
464
- function wr(e, t, n) {
455
+ function Fr(e, t, n) {
465
456
  if (!t?.length) return n;
466
457
  let r = [...t].sort((e, t) => e.at - t.at), i = n;
467
458
  for (let t of r) e >= t.at && (i = t.color);
468
459
  return i;
469
460
  }
470
- function Tr(e, t) {
471
- return !Y(e) || !Y(t) || t <= 0 ? 0 : Z(e / t * 100, 0, 100);
461
+ function Ir(e, t) {
462
+ return !Z(e) || !Z(t) || t <= 0 ? 0 : mr(e / t * 100, 0, 100);
472
463
  }
473
- function $(e) {
474
- return Y(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "";
464
+ function Lr(e) {
465
+ return Z(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "";
475
466
  }
476
- var Er = [[1e8, "亿"], [1e4, "万"]], Dr = [
467
+ var Rr = [[1e8, "亿"], [1e4, "万"]], zr = [
477
468
  [1e9, "B"],
478
469
  [1e6, "M"],
479
470
  [1e3, "K"]
480
471
  ];
481
- function Or(e, t = Er) {
482
- if (!Y(e)) return "";
472
+ function Br(e, t = Rr) {
473
+ if (!Z(e)) return "";
483
474
  let n = Math.abs(e);
484
475
  for (let [r, i] of t) if (n >= r) return `${Number((e / r).toFixed(2))}${i}`;
485
- return $(e);
476
+ return Lr(e);
486
477
  }
487
- function kr(e) {
488
- let t = _r(e);
478
+ function Vr(e) {
479
+ let t = Or(e);
489
480
  if (!t) return null;
490
481
  let n = -1;
491
482
  return e.forEach((e, t) => {
492
- Y(e) && (n = t);
483
+ Z(e) && (n = t);
493
484
  }), {
494
- count: e.filter(Y).length,
485
+ count: e.filter(Z).length,
495
486
  min: t[0],
496
487
  max: t[1],
497
488
  last: e[n],
498
489
  lastIndex: n
499
490
  };
500
491
  }
501
- function Ar(e) {
492
+ function Hr(e) {
502
493
  return `${Number((e * 100).toFixed(1))}%`;
503
494
  }
504
- function jr(e) {
505
- let t = V(), n = V(0), r;
506
- return Pt(() => {
495
+ function Ur(e) {
496
+ let t = G(), n = G(0), r;
497
+ return Wt(() => {
507
498
  let e = t.value;
508
499
  e && (n.value = Math.round(e.getBoundingClientRect().width), typeof ResizeObserver < "u" && (r = new ResizeObserver((e) => {
509
500
  let t = Math.round(e[e.length - 1]?.contentRect.width ?? 0);
510
501
  t > 0 && (n.value = t);
511
502
  }), r.observe(e)));
512
- }), Mt(() => r?.disconnect()), {
503
+ }), Ht(() => r?.disconnect()), {
513
504
  el: t,
514
- width: A(() => {
505
+ width: P(() => {
515
506
  let t = e?.();
516
507
  return t && t > 0 ? t : n.value > 0 ? n.value : 480;
517
508
  })
518
509
  };
519
510
  }
520
- function Mr() {
521
- let e = V(/* @__PURE__ */ new Set());
511
+ function Wr() {
512
+ let e = G(/* @__PURE__ */ new Set());
522
513
  function t(t, n) {
523
514
  let r = new Set(e.value);
524
515
  r.has(t) ? r.delete(t) : n - r.size > 1 && r.add(t), e.value = r;
@@ -528,11 +519,11 @@ function Mr() {
528
519
  toggle: t
529
520
  };
530
521
  }
531
- function Nr(e, t) {
522
+ function Gr(e, t) {
532
523
  return t ?? `var(--ca-chart-${e % 8 + 1})`;
533
524
  }
534
525
  // packages/ui/src/components/chart/parts/ChartLegend.vue?vue&type=script&setup=true&lang.ts
535
- var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
526
+ var Kr = { class: "ca-chart__legend" }, qr = /* @__PURE__ */ V({
536
527
  __name: "ChartLegend",
537
528
  props: {
538
529
  items: {},
@@ -541,16 +532,16 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
541
532
  },
542
533
  emits: ["toggle"],
543
534
  setup(e) {
544
- return (t, n) => (B(), N("ul", Pr, [(B(!0), N(k, null, H(e.items, (n, r) => (B(), N("li", { key: r }, [(B(), j(It(e.interactive ? "button" : "span"), {
545
- class: R(["ca-chart__legend-item", { "is-off": n.off }]),
535
+ return (t, n) => (W(), L("ul", Kr, [(W(!0), L(N, null, K(e.items, (n, r) => (W(), L("li", { key: r }, [(W(), F(Kt(e.interactive ? "button" : "span"), {
536
+ class: H(["ca-chart__legend-item", { "is-off": n.off }]),
546
537
  type: e.interactive ? "button" : void 0,
547
538
  "aria-pressed": e.interactive ? !n.off : void 0,
548
539
  onClick: (n) => e.interactive && t.$emit("toggle", r)
549
540
  }, {
550
- default: K(() => [P("span", {
551
- class: R(["ca-chart__key", `ca-chart__key--${e.shape ?? "box"}`]),
552
- style: z({ "--key": n.color })
553
- }, null, 6), P("span", null, W(n.name), 1)]),
541
+ default: X(() => [R("span", {
542
+ class: H(["ca-chart__key", `ca-chart__key--${e.shape ?? "box"}`]),
543
+ style: U({ "--key": n.color })
544
+ }, null, 6), R("span", null, J(n.name), 1)]),
554
545
  _: 2
555
546
  }, 1032, [
556
547
  "class",
@@ -559,21 +550,21 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
559
550
  "onClick"
560
551
  ]))]))), 128))]));
561
552
  }
562
- }), Ir = ["role"], Lr = /* @__PURE__ */ L({
553
+ }), Jr = ["role"], Yr = /* @__PURE__ */ V({
563
554
  __name: "ChartStatus",
564
555
  props: {
565
556
  loading: { type: Boolean },
566
557
  empty: { type: Boolean }
567
558
  },
568
559
  setup(e) {
569
- let t = J();
570
- return (n, r) => e.loading || e.empty ? (B(), N("div", {
560
+ let t = s();
561
+ return (n, r) => e.loading || e.empty ? (W(), L("div", {
571
562
  key: 0,
572
563
  class: "ca-chart__status",
573
564
  role: e.loading ? "status" : void 0
574
- }, W(e.loading ? G(t)("campus.chart.loading") : G(t)("campus.chart.empty")), 9, Ir)) : M("v-if", !0);
565
+ }, J(e.loading ? Y(t)("campus.chart.loading") : Y(t)("campus.chart.empty")), 9, Jr)) : I("v-if", !0);
575
566
  }
576
- }), Rr = { class: "ca-chart__sr" }, zr = { key: 0 }, Br = { scope: "row" }, Vr = /* @__PURE__ */ L({
567
+ }), Xr = { class: "ca-chart__sr" }, Zr = { key: 0 }, Qr = { scope: "row" }, $r = /* @__PURE__ */ V({
577
568
  __name: "ChartTable",
578
569
  props: {
579
570
  caption: {},
@@ -581,19 +572,19 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
581
572
  rows: {}
582
573
  },
583
574
  setup(e) {
584
- return (t, n) => (B(), N("div", Rr, [P("table", null, [
585
- e.caption ? (B(), N("caption", zr, W(e.caption), 1)) : M("v-if", !0),
586
- P("thead", null, [P("tr", null, [(B(!0), N(k, null, H(e.head, (e, t) => (B(), N("th", {
575
+ return (t, n) => (W(), L("div", Xr, [R("table", null, [
576
+ e.caption ? (W(), L("caption", Zr, J(e.caption), 1)) : I("v-if", !0),
577
+ R("thead", null, [R("tr", null, [(W(!0), L(N, null, K(e.head, (e, t) => (W(), L("th", {
587
578
  key: t,
588
579
  scope: "col"
589
- }, W(e), 1))), 128))])]),
590
- P("tbody", null, [(B(!0), N(k, null, H(e.rows, (e, t) => (B(), N("tr", { key: t }, [P("th", Br, W(e[0]), 1), (B(!0), N(k, null, H(e.slice(1), (e, t) => (B(), N("td", { key: t }, W(e), 1))), 128))]))), 128))])
580
+ }, J(e), 1))), 128))])]),
581
+ R("tbody", null, [(W(!0), L(N, null, K(e.rows, (e, t) => (W(), L("tr", { key: t }, [R("th", Qr, J(e[0]), 1), (W(!0), L(N, null, K(e.slice(1), (e, t) => (W(), L("td", { key: t }, J(e), 1))), 128))]))), 128))])
591
582
  ])]));
592
583
  }
593
- }), Hr = {
584
+ }), ei = {
594
585
  key: 0,
595
586
  class: "ca-chart__tip-title"
596
- }, Ur = { class: "ca-chart__tip-name" }, Wr = { class: "ca-chart__tip-value" }, Gr = /* @__PURE__ */ L({
587
+ }, ti = { class: "ca-chart__tip-name" }, ni = { class: "ca-chart__tip-value" }, ri = /* @__PURE__ */ V({
597
588
  __name: "ChartTooltip",
598
589
  props: {
599
590
  x: {},
@@ -603,50 +594,50 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
603
594
  rows: {}
604
595
  },
605
596
  setup(e) {
606
- return (t, n) => (B(), N("div", {
597
+ return (t, n) => (W(), L("div", {
607
598
  class: "ca-chart__tip",
608
- style: z({
599
+ style: U({
609
600
  left: `${e.x}px`,
610
601
  top: `${e.y}px`,
611
602
  transform: e.x > e.width / 2 ? "translateX(calc(-100% - 12px))" : "translateX(12px)"
612
603
  })
613
- }, [e.title ? (B(), N("div", Hr, W(e.title), 1)) : M("v-if", !0), (B(!0), N(k, null, H(e.rows, (e, t) => (B(), N("div", {
604
+ }, [e.title ? (W(), L("div", ei, J(e.title), 1)) : I("v-if", !0), (W(!0), L(N, null, K(e.rows, (e, t) => (W(), L("div", {
614
605
  key: t,
615
606
  class: "ca-chart__tip-row"
616
607
  }, [
617
- P("span", {
608
+ R("span", {
618
609
  class: "ca-chart__key",
619
- style: z({ "--key": e.color })
610
+ style: U({ "--key": e.color })
620
611
  }, null, 4),
621
- P("span", Ur, W(e.name), 1),
622
- P("span", Wr, W(e.value), 1)
612
+ R("span", ti, J(e.name), 1),
613
+ R("span", ni, J(e.value), 1)
623
614
  ]))), 128))], 4));
624
615
  }
625
- }), Kr = ["aria-busy"], qr = { class: "ca-chart__canvas" }, Jr = [
616
+ }), ii = ["aria-busy"], ai = { class: "ca-chart__canvas" }, oi = [
626
617
  "aria-label",
627
618
  "width",
628
619
  "height",
629
620
  "viewBox"
630
- ], Yr = [
621
+ ], si = [
631
622
  "x1",
632
623
  "x2",
633
624
  "y1",
634
625
  "y2"
635
- ], Xr = ["x", "y"], Zr = [
626
+ ], ci = ["x", "y"], li = [
636
627
  "x1",
637
628
  "x2",
638
629
  "y1",
639
630
  "y2"
640
- ], Qr = [
631
+ ], ui = [
641
632
  "x",
642
633
  "y",
643
634
  "text-anchor"
644
- ], $r = [
635
+ ], di = [
645
636
  "x1",
646
637
  "x2",
647
638
  "y1",
648
639
  "y2"
649
- ], ei = { class: "ca-chart__reveal" }, ti = ["d"], ni = ["d"], ri = { class: "ca-chart__fade" }, ii = ["cx", "cy"], ai = ["cx", "cy"], oi = 400, si = /* @__PURE__ */ L({
640
+ ], fi = { class: "ca-chart__reveal" }, pi = ["d"], mi = ["d"], hi = { class: "ca-chart__fade" }, gi = ["cx", "cy"], _i = ["cx", "cy"], vi = 400, yi = /* @__PURE__ */ V({
650
641
  __name: "CaLineChart",
651
642
  props: {
652
643
  categories: {},
@@ -681,28 +672,28 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
681
672
  }
682
673
  },
683
674
  setup(e) {
684
- let t = e, n = J(), { el: r, width: i } = jr(() => t.width), { hidden: a, toggle: o } = Mr(), s = A(() => t.categories.length), c = A(() => t.series.map((e, t) => ({
675
+ let t = e, n = s(), { el: r, width: i } = Ur(() => t.width), { hidden: a, toggle: o } = Wr(), c = P(() => t.categories.length), l = P(() => t.series.map((e, t) => ({
685
676
  index: t,
686
677
  name: e.name,
687
- data: e.data.slice(0, s.value),
688
- color: Nr(t, e.color)
689
- }))), l = A(() => c.value.filter((e) => !a.value.has(e.index))), u = A(() => s.value > 0 && c.value.some((e) => _r(e.data))), d = (e) => (t.valueFormatter ?? $)(e), f = A(() => n("campus.chart.compact") === "latin" ? Dr : Er), p = (e) => (t.yFormatter ?? ((e) => Or(e, f.value)))(e), m = A(() => {
690
- let e = _r(l.value.flatMap((e) => e.data)) ?? [0, 1];
691
- return or(t.yMin ?? e[0], t.yMax ?? e[1], 5, t.area || t.zero);
692
- }), h = A(() => m.value.ticks.map((e) => ({
678
+ data: e.data.slice(0, c.value),
679
+ color: Gr(t, e.color)
680
+ }))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) => Or(e.data))), f = (e) => (t.valueFormatter ?? Lr)(e), p = P(() => n("campus.chart.compact") === "latin" ? zr : Rr), m = (e) => (t.yFormatter ?? ((e) => Br(e, p.value)))(e), h = P(() => {
681
+ let e = Or(u.value.flatMap((e) => e.data)) ?? [0, 1];
682
+ return _r(t.yMin ?? e[0], t.yMax ?? e[1], 5, t.area || t.zero);
683
+ }), g = P(() => h.value.ticks.map((e) => ({
693
684
  tick: e,
694
- text: p(e)
695
- }))), g = A(() => Math.max(32, Math.max(...h.value.map((e) => e.text.length)) * 7 + 14)), _ = {
685
+ text: m(e)
686
+ }))), _ = P(() => Math.max(32, Math.max(...g.value.map((e) => e.text.length)) * 7 + 14)), v = {
696
687
  top: 12,
697
688
  right: 16,
698
689
  bottom: 28
699
- }, v = A(() => Math.max(10, i.value - g.value - _.right)), y = A(() => Math.max(10, t.height - _.top - _.bottom)), b = A(() => sr(m.value.min, m.value.max, _.top + y.value, _.top)), x = A(() => {
700
- let e = cr(s.value, g.value, g.value + v.value, 0);
701
- return Array.from({ length: s.value }, (t, n) => e.center(n));
702
- }), S = A(() => b.value(Math.max(m.value.min, Math.min(0, m.value.max)))), C = A(() => {
690
+ }, y = P(() => Math.max(10, i.value - _.value - v.right)), b = P(() => Math.max(10, t.height - v.top - v.bottom)), x = P(() => vr(h.value.min, h.value.max, v.top + b.value, v.top)), S = P(() => {
691
+ let e = yr(c.value, _.value, _.value + y.value, 0);
692
+ return Array.from({ length: c.value }, (t, n) => e.center(n));
693
+ }), C = P(() => x.value(Math.max(h.value.min, Math.min(0, h.value.max)))), w = P(() => {
703
694
  let e = Math.max(1, ...t.categories.map((e) => e.length));
704
- return lr(s.value, v.value, Math.max(40, e * 7 + 16)).map((e) => {
705
- let n = x.value[e], r = n - g.value < 20 ? "start" : i.value - n < 20 ? "end" : "middle";
695
+ return br(c.value, y.value, Math.max(40, e * 7 + 16)).map((e) => {
696
+ let n = S.value[e], r = n - _.value < 20 ? "start" : i.value - n < 20 ? "end" : "middle";
706
697
  return {
707
698
  i: e,
708
699
  x: n,
@@ -710,229 +701,229 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
710
701
  anchor: r
711
702
  };
712
703
  });
713
- }), ee = A(() => l.value.map((e) => {
714
- let n = e.data.map((e, t) => Y(e) ? {
715
- x: x.value[t],
716
- y: b.value(e)
717
- } : null), r = e.data.reduce((e, t, n) => Y(t) ? n : e, -1);
704
+ }), T = P(() => u.value.map((e) => {
705
+ let n = e.data.map((e, t) => Z(e) ? {
706
+ x: S.value[t],
707
+ y: x.value(e)
708
+ } : null), r = e.data.reduce((e, t, n) => Z(t) ? n : e, -1);
718
709
  return {
719
710
  ...e,
720
- line: mr(n, t.smooth),
721
- area: t.area ? hr(n, S.value, t.smooth) : "",
711
+ line: Tr(n, t.smooth),
712
+ area: t.area ? Er(n, C.value, t.smooth) : "",
722
713
  end: r >= 0 ? n[r] : null,
723
714
  points: n
724
715
  };
725
- })), w = V(-1);
726
- function T(e) {
716
+ })), E = G(-1);
717
+ function D(e) {
727
718
  let t = e.currentTarget.getBoundingClientRect();
728
- w.value = ur(x.value, e.clientX - t.left);
719
+ E.value = xr(S.value, e.clientX - t.left);
729
720
  }
730
- function te(e) {
731
- let t = s.value - 1, n = w.value;
732
- if (e.key === "ArrowRight") n = w.value < 0 ? 0 : Math.min(t, w.value + 1);
733
- else if (e.key === "ArrowLeft") n = w.value < 0 ? t : Math.max(0, w.value - 1);
721
+ function O(e) {
722
+ let t = c.value - 1, n = E.value;
723
+ if (e.key === "ArrowRight") n = E.value < 0 ? 0 : Math.min(t, E.value + 1);
724
+ else if (e.key === "ArrowLeft") n = E.value < 0 ? t : Math.max(0, E.value - 1);
734
725
  else if (e.key === "Home") n = 0;
735
726
  else if (e.key === "End") n = t;
736
727
  else if (e.key === "Escape") n = -1;
737
728
  else return;
738
- e.preventDefault(), w.value = n;
729
+ e.preventDefault(), E.value = n;
739
730
  }
740
- function ne(e) {
741
- e.target.matches?.(":focus-visible") && w.value < 0 && (w.value = Math.max(0, s.value - 1));
731
+ function ee(e) {
732
+ e.target.matches?.(":focus-visible") && E.value < 0 && (E.value = Math.max(0, c.value - 1));
742
733
  }
743
- let E = A(() => {
744
- let e = w.value;
745
- return e < 0 || e >= s.value ? null : {
746
- x: x.value[e],
734
+ let k = P(() => {
735
+ let e = E.value;
736
+ return e < 0 || e >= c.value ? null : {
737
+ x: S.value[e],
747
738
  title: t.categories[e],
748
- rows: l.value.map((t) => ({
739
+ rows: u.value.map((t) => ({
749
740
  name: t.name,
750
741
  color: t.color,
751
- value: Y(t.data[e]) ? d(t.data[e]) : "—"
742
+ value: Z(t.data[e]) ? f(t.data[e]) : "—"
752
743
  }))
753
744
  };
754
- }), re = A(() => t.legend ?? t.series.length > 1), D = A(() => c.value.map((e) => ({
745
+ }), A = P(() => t.legend ?? t.series.length > 1), j = P(() => l.value.map((e) => ({
755
746
  name: e.name,
756
747
  color: e.color,
757
748
  off: a.value.has(e.index)
758
- }))), O = A(() => {
749
+ }))), M = P(() => {
759
750
  let e = [n("campus.chart.summaryLine", {
760
751
  title: t.title ?? "",
761
- categories: s.value,
762
- series: c.value.length
752
+ categories: c.value,
753
+ series: l.value.length
763
754
  })];
764
- for (let r of c.value.slice(0, 6)) {
765
- let i = kr(r.data);
755
+ for (let r of l.value.slice(0, 6)) {
756
+ let i = Vr(r.data);
766
757
  i && e.push(n("campus.chart.summarySeries", {
767
758
  name: r.name,
768
- min: d(i.min),
769
- max: d(i.max),
770
- last: d(i.last),
759
+ min: f(i.min),
760
+ max: f(i.max),
761
+ last: f(i.last),
771
762
  category: t.categories[i.lastIndex] ?? ""
772
763
  }));
773
764
  }
774
765
  return e.join(" ");
775
- }), ie = A(() => t.categories.slice(0, oi).map((e, t) => [e, ...c.value.map((e) => Y(e.data[t]) ? d(e.data[t]) : "")])), ae = A(() => [n("campus.chart.category"), ...c.value.map((e) => e.name)]);
776
- return (t, n) => (B(), N("div", {
766
+ }), te = P(() => t.categories.slice(0, vi).map((e, t) => [e, ...l.value.map((e) => Z(e.data[t]) ? f(e.data[t]) : "")])), ne = P(() => [n("campus.chart.category"), ...l.value.map((e) => e.name)]);
767
+ return (t, n) => (W(), L("div", {
777
768
  ref_key: "el",
778
769
  ref: r,
779
- class: R(["ca-chart ca-line-chart", {
770
+ class: H(["ca-chart ca-line-chart", {
780
771
  "is-loading": e.loading,
781
772
  "is-animated": e.animated
782
773
  }]),
783
774
  "aria-busy": e.loading || void 0
784
775
  }, [
785
- re.value && u.value ? (B(), j(Fr, {
776
+ A.value && d.value ? (W(), F(qr, {
786
777
  key: 0,
787
- items: D.value,
778
+ items: j.value,
788
779
  shape: "line",
789
780
  interactive: "",
790
- onToggle: n[0] ||= (e) => G(o)(e, c.value.length)
791
- }, null, 8, ["items"])) : M("v-if", !0),
792
- P("div", {
781
+ onToggle: n[0] ||= (e) => Y(o)(e, l.value.length)
782
+ }, null, 8, ["items"])) : I("v-if", !0),
783
+ R("div", {
793
784
  class: "ca-chart__plot",
794
- style: z({ height: `${e.height}px` })
785
+ style: U({ height: `${e.height}px` })
795
786
  }, [
796
- P("div", qr, [u.value ? (B(), N("svg", {
787
+ R("div", ai, [d.value ? (W(), L("svg", {
797
788
  key: 0,
798
789
  class: "ca-chart__svg",
799
790
  role: "img",
800
791
  tabindex: "0",
801
- "aria-label": O.value,
802
- width: G(i),
792
+ "aria-label": M.value,
793
+ width: Y(i),
803
794
  height: e.height,
804
- viewBox: `0 0 ${G(i)} ${e.height}`,
805
- onPointermove: T,
806
- onPointerdown: T,
807
- onPointerleave: n[1] ||= (e) => w.value = -1,
808
- onKeydown: te,
809
- onFocus: ne,
810
- onBlur: n[2] ||= (e) => w.value = -1
795
+ viewBox: `0 0 ${Y(i)} ${e.height}`,
796
+ onPointermove: D,
797
+ onPointerdown: D,
798
+ onPointerleave: n[1] ||= (e) => E.value = -1,
799
+ onKeydown: O,
800
+ onFocus: ee,
801
+ onBlur: n[2] ||= (e) => E.value = -1
811
802
  }, [
812
- M(" 网格与纵轴刻度 "),
813
- P("g", null, [
814
- (B(!0), N(k, null, H(h.value, (e) => (B(), N(k, { key: e.tick }, [P("line", {
815
- class: R(e.tick === m.value.min ? "ca-chart__baseline" : "ca-chart__grid"),
816
- x1: g.value,
817
- x2: g.value + v.value,
818
- y1: b.value(e.tick),
819
- y2: b.value(e.tick)
820
- }, null, 10, Yr), P("text", {
803
+ I(" 网格与纵轴刻度 "),
804
+ R("g", null, [
805
+ (W(!0), L(N, null, K(g.value, (e) => (W(), L(N, { key: e.tick }, [R("line", {
806
+ class: H(e.tick === h.value.min ? "ca-chart__baseline" : "ca-chart__grid"),
807
+ x1: _.value,
808
+ x2: _.value + y.value,
809
+ y1: x.value(e.tick),
810
+ y2: x.value(e.tick)
811
+ }, null, 10, si), R("text", {
821
812
  class: "ca-chart__tick",
822
- x: g.value - 8,
823
- y: b.value(e.tick),
813
+ x: _.value - 8,
814
+ y: x.value(e.tick),
824
815
  dy: "0.32em",
825
816
  "text-anchor": "end"
826
- }, W(e.text), 9, Xr)], 64))), 128)),
827
- M(" 有负值时,0 线单独加深,表示正负分界 "),
828
- m.value.min < 0 ? (B(), N("line", {
817
+ }, J(e.text), 9, ci)], 64))), 128)),
818
+ I(" 有负值时,0 线单独加深,表示正负分界 "),
819
+ h.value.min < 0 ? (W(), L("line", {
829
820
  key: 0,
830
821
  class: "ca-chart__baseline",
831
- x1: g.value,
832
- x2: g.value + v.value,
833
- y1: b.value(0),
834
- y2: b.value(0)
835
- }, null, 8, Zr)) : M("v-if", !0)
822
+ x1: _.value,
823
+ x2: _.value + y.value,
824
+ y1: x.value(0),
825
+ y2: x.value(0)
826
+ }, null, 8, li)) : I("v-if", !0)
836
827
  ]),
837
- P("g", null, [(B(!0), N(k, null, H(C.value, (e) => (B(), N("text", {
828
+ R("g", null, [(W(!0), L(N, null, K(w.value, (e) => (W(), L("text", {
838
829
  key: e.i,
839
830
  class: "ca-chart__tick",
840
831
  x: e.x,
841
- y: _.top + y.value + 18,
832
+ y: v.top + b.value + 18,
842
833
  "text-anchor": e.anchor
843
- }, W(e.text), 9, Qr))), 128))]),
844
- M(" 悬停十字线:贴着最近的数据位置,读者只需要瞄准某个类目 "),
845
- E.value ? (B(), N("line", {
834
+ }, J(e.text), 9, ui))), 128))]),
835
+ I(" 悬停十字线:贴着最近的数据位置,读者只需要瞄准某个类目 "),
836
+ k.value ? (W(), L("line", {
846
837
  key: 0,
847
838
  class: "ca-chart__cross",
848
- x1: E.value.x,
849
- x2: E.value.x,
850
- y1: _.top,
851
- y2: _.top + y.value
852
- }, null, 8, $r)) : M("v-if", !0),
853
- M(" 数据 "),
854
- P("g", ei, [(B(!0), N(k, null, H(ee.value, (e) => (B(), N(k, { key: e.index }, [e.area ? (B(), N("path", {
839
+ x1: k.value.x,
840
+ x2: k.value.x,
841
+ y1: v.top,
842
+ y2: v.top + b.value
843
+ }, null, 8, di)) : I("v-if", !0),
844
+ I(" 数据 "),
845
+ R("g", fi, [(W(!0), L(N, null, K(T.value, (e) => (W(), L(N, { key: e.index }, [e.area ? (W(), L("path", {
855
846
  key: 0,
856
847
  class: "ca-chart__area",
857
848
  d: e.area,
858
- style: z({ fill: e.color })
859
- }, null, 12, ti)) : M("v-if", !0), P("path", {
849
+ style: U({ fill: e.color })
850
+ }, null, 12, pi)) : I("v-if", !0), R("path", {
860
851
  class: "ca-chart__line",
861
852
  d: e.line,
862
- style: z({ stroke: e.color })
863
- }, null, 12, ni)], 64))), 128))]),
864
- P("g", ri, [M(" 没有悬停时在每条线末端放一个点,帮助读出“最新值” "), E.value ? (B(!0), N(k, { key: 1 }, H(ee.value, (e) => (B(), N(k, { key: e.index }, [e.points[w.value] ? (B(), N("circle", {
853
+ style: U({ stroke: e.color })
854
+ }, null, 12, mi)], 64))), 128))]),
855
+ R("g", hi, [I(" 没有悬停时在每条线末端放一个点,帮助读出“最新值” "), k.value ? (W(!0), L(N, { key: 1 }, K(T.value, (e) => (W(), L(N, { key: e.index }, [e.points[E.value] ? (W(), L("circle", {
865
856
  key: 0,
866
857
  class: "ca-chart__dot",
867
- cx: e.points[w.value].x,
868
- cy: e.points[w.value].y,
858
+ cx: e.points[E.value].x,
859
+ cy: e.points[E.value].y,
869
860
  r: "4.5",
870
- style: z({ fill: e.color })
871
- }, null, 12, ai)) : M("v-if", !0)], 64))), 128)) : (B(!0), N(k, { key: 0 }, H(ee.value, (e) => Vt((B(), N("circle", {
861
+ style: U({ fill: e.color })
862
+ }, null, 12, _i)) : I("v-if", !0)], 64))), 128)) : (W(!0), L(N, { key: 0 }, K(T.value, (e) => Qt((W(), L("circle", {
872
863
  key: e.index,
873
864
  class: "ca-chart__dot",
874
865
  cx: e.end?.x,
875
866
  cy: e.end?.y,
876
867
  r: "4",
877
- style: z({ fill: e.color })
878
- }, null, 12, ii)), [[zt, e.end]])), 128))])
879
- ], 40, Jr)) : M("v-if", !0)]),
880
- E.value ? (B(), j(Gr, {
868
+ style: U({ fill: e.color })
869
+ }, null, 12, gi)), [[Xt, e.end]])), 128))])
870
+ ], 40, oi)) : I("v-if", !0)]),
871
+ k.value ? (W(), F(ri, {
881
872
  key: 0,
882
- x: E.value.x,
883
- y: _.top,
884
- width: G(i),
885
- title: E.value.title,
886
- rows: E.value.rows
873
+ x: k.value.x,
874
+ y: v.top,
875
+ width: Y(i),
876
+ title: k.value.title,
877
+ rows: k.value.rows
887
878
  }, null, 8, [
888
879
  "x",
889
880
  "y",
890
881
  "width",
891
882
  "title",
892
883
  "rows"
893
- ])) : M("v-if", !0),
894
- I(Lr, {
884
+ ])) : I("v-if", !0),
885
+ B(Yr, {
895
886
  loading: e.loading,
896
- empty: !u.value && !e.loading
887
+ empty: !d.value && !e.loading
897
888
  }, null, 8, ["loading", "empty"])
898
889
  ], 4),
899
- u.value ? (B(), j(Vr, {
890
+ d.value ? (W(), F($r, {
900
891
  key: 1,
901
892
  caption: e.title,
902
- head: ae.value,
903
- rows: ie.value
893
+ head: ne.value,
894
+ rows: te.value
904
895
  }, null, 8, [
905
896
  "caption",
906
897
  "head",
907
898
  "rows"
908
- ])) : M("v-if", !0)
909
- ], 10, Kr));
899
+ ])) : I("v-if", !0)
900
+ ], 10, ii));
910
901
  }
911
- }), ci = ["aria-busy"], li = { class: "ca-chart__canvas" }, ui = [
902
+ }), bi = ["aria-busy"], xi = { class: "ca-chart__canvas" }, Si = [
912
903
  "aria-label",
913
904
  "width",
914
905
  "height",
915
906
  "viewBox"
916
- ], di = { key: 0 }, fi = [
907
+ ], Ci = { key: 0 }, wi = [
917
908
  "x1",
918
909
  "x2",
919
910
  "y1",
920
911
  "y2"
921
- ], pi = ["x", "y"], mi = { key: 1 }, hi = [
912
+ ], Ti = ["x", "y"], Ei = { key: 1 }, Di = [
922
913
  "x1",
923
914
  "x2",
924
915
  "y1",
925
916
  "y2"
926
- ], gi = ["x", "y"], _i = ["x", "y"], vi = ["x", "y"], yi = [
917
+ ], Oi = ["x", "y"], ki = ["x", "y"], Ai = ["x", "y"], ji = [
927
918
  "x",
928
919
  "y",
929
920
  "width",
930
921
  "height"
931
- ], bi = ["d"], xi = { class: "ca-chart__fade" }, Si = [
922
+ ], Mi = ["d"], Ni = { class: "ca-chart__fade" }, Pi = [
932
923
  "x",
933
924
  "y",
934
925
  "text-anchor"
935
- ], Ci = 2, wi = 4, Ti = 400, Ei = /* @__PURE__ */ L({
926
+ ], Fi = 2, Ii = 4, Li = 400, Ri = /* @__PURE__ */ V({
936
927
  __name: "CaBarChart",
937
928
  props: {
938
929
  categories: {},
@@ -966,58 +957,58 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
966
957
  }
967
958
  },
968
959
  setup(e) {
969
- let t = e, n = J(), { el: r, width: i } = jr(() => t.width), { hidden: a, toggle: o } = Mr(), s = A(() => t.categories.length), c = A(() => t.series.map((e, t) => ({
960
+ let t = e, n = s(), { el: r, width: i } = Ur(() => t.width), { hidden: a, toggle: o } = Wr(), c = P(() => t.categories.length), l = P(() => t.series.map((e, t) => ({
970
961
  index: t,
971
962
  name: e.name,
972
- data: e.data.slice(0, s.value),
973
- color: Nr(t, e.color)
974
- }))), l = A(() => c.value.filter((e) => !a.value.has(e.index))), u = A(() => s.value > 0 && c.value.some((e) => _r(e.data))), d = (e) => (t.valueFormatter ?? $)(e), f = A(() => n("campus.chart.compact") === "latin" ? Dr : Er), p = (e) => (t.yFormatter ?? ((e) => Or(e, f.value)))(e), m = A(() => gr(l.value.map((e) => e.data))), h = A(() => {
963
+ data: e.data.slice(0, c.value),
964
+ color: Gr(t, e.color)
965
+ }))), u = P(() => l.value.filter((e) => !a.value.has(e.index))), d = P(() => c.value > 0 && l.value.some((e) => Or(e.data))), f = (e) => (t.valueFormatter ?? Lr)(e), p = P(() => n("campus.chart.compact") === "latin" ? zr : Rr), m = (e) => (t.yFormatter ?? ((e) => Br(e, p.value)))(e), h = P(() => Dr(u.value.map((e) => e.data))), g = P(() => {
975
966
  let e = [];
976
- if (t.stacked) for (let t of m.value) for (let n of t) n && e.push(n.from, n.to);
977
- else for (let t of l.value) for (let n of t.data) Y(n) && e.push(n);
978
- let n = _r(e) ?? [0, 1];
979
- return or(n[0], n[1], 5, !0);
980
- }), g = A(() => h.value.ticks.map((e) => ({
967
+ if (t.stacked) for (let t of h.value) for (let n of t) n && e.push(n.from, n.to);
968
+ else for (let t of u.value) for (let n of t.data) Z(n) && e.push(n);
969
+ let n = Or(e) ?? [0, 1];
970
+ return _r(n[0], n[1], 5, !0);
971
+ }), _ = P(() => g.value.ticks.map((e) => ({
981
972
  tick: e,
982
- text: p(e)
983
- }))), _ = A(() => {
973
+ text: m(e)
974
+ }))), v = P(() => {
984
975
  let e = 12 + (t.showValues && !t.horizontal ? 14 : 0);
985
976
  if (!t.horizontal) return {
986
977
  top: e,
987
978
  right: 16,
988
979
  bottom: 28,
989
- left: Math.max(32, Math.max(...g.value.map((e) => e.text.length)) * 7 + 14)
980
+ left: Math.max(32, Math.max(..._.value.map((e) => e.text.length)) * 7 + 14)
990
981
  };
991
- let n = Z(Math.max(1, ...t.categories.map((e) => e.length)) * 13 + 16, 48, Math.max(48, i.value * .4));
982
+ let n = mr(Math.max(1, ...t.categories.map((e) => e.length)) * 13 + 16, 48, Math.max(48, i.value * .4));
992
983
  return {
993
984
  top: e,
994
985
  right: t.showValues ? 56 : 24,
995
986
  bottom: 28,
996
987
  left: n
997
988
  };
998
- }), v = A(() => Math.max(10, i.value - _.value.left - _.value.right)), y = A(() => Math.max(10, t.height - _.value.top - _.value.bottom)), b = A(() => t.horizontal ? sr(h.value.min, h.value.max, _.value.left, _.value.left + v.value) : sr(h.value.min, h.value.max, _.value.top + y.value, _.value.top)), x = A(() => t.horizontal ? cr(s.value, _.value.top, _.value.top + y.value, .3) : cr(s.value, _.value.left, _.value.left + v.value, .3));
999
- A(() => b.value(0));
1000
- function S(e) {
989
+ }), y = P(() => Math.max(10, i.value - v.value.left - v.value.right)), b = P(() => Math.max(10, t.height - v.value.top - v.value.bottom)), x = P(() => t.horizontal ? vr(g.value.min, g.value.max, v.value.left, v.value.left + y.value) : vr(g.value.min, g.value.max, v.value.top + b.value, v.value.top)), S = P(() => t.horizontal ? yr(c.value, v.value.top, v.value.top + b.value, .3) : yr(c.value, v.value.left, v.value.left + y.value, .3));
990
+ P(() => x.value(0));
991
+ function C(e) {
1001
992
  if (!t.horizontal) return e;
1002
- let n = Math.max(2, Math.floor((_.value.left - 16) / 13));
993
+ let n = Math.max(2, Math.floor((v.value.left - 16) / 13));
1003
994
  return e.length > n ? `${e.slice(0, n - 1)}…` : e;
1004
995
  }
1005
- let C = A(() => {
996
+ let w = P(() => {
1006
997
  if (t.horizontal) return t.categories.map((e, t) => ({
1007
998
  i: t,
1008
- text: S(e),
1009
- pos: x.value.center(t)
999
+ text: C(e),
1000
+ pos: S.value.center(t)
1010
1001
  }));
1011
1002
  let e = Math.max(1, ...t.categories.map((e) => e.length));
1012
- return lr(s.value, v.value, Math.max(40, e * 7 + 16)).map((e) => ({
1003
+ return br(c.value, y.value, Math.max(40, e * 7 + 16)).map((e) => ({
1013
1004
  i: e,
1014
1005
  text: t.categories[e],
1015
- pos: x.value.center(e)
1006
+ pos: S.value.center(e)
1016
1007
  }));
1017
- }), ee = (e) => e.length * 6.5, w = A(() => {
1018
- let e = [], n = [], r = l.value.length, i = t.barSize, a = t.stacked ? x.value.bandwidth : (x.value.bandwidth - Ci * (r - 1)) / r, o = Math.max(1, Math.min(i, a)), c = t.stacked ? o : o * r + Ci * (r - 1), u = Array.from({ length: s.value }, (e, t) => {
1008
+ }), T = (e) => e.length * 6.5, E = P(() => {
1009
+ let e = [], n = [], r = u.value.length, i = t.barSize, a = t.stacked ? S.value.bandwidth : (S.value.bandwidth - Fi * (r - 1)) / r, o = Math.max(1, Math.min(i, a)), s = t.stacked ? o : o * r + Fi * (r - 1), l = Array.from({ length: c.value }, (e, t) => {
1019
1010
  let n = 0, r = 0;
1020
- for (let e of m.value) {
1011
+ for (let e of h.value) {
1021
1012
  let i = e[t];
1022
1013
  i && (n = Math.max(n, i.to), r = Math.min(r, i.to));
1023
1014
  }
@@ -1026,47 +1017,47 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1026
1017
  bottom: r
1027
1018
  };
1028
1019
  });
1029
- return l.value.forEach((r, i) => {
1030
- for (let l = 0; l < s.value; l++) {
1031
- let s = r.data[l];
1032
- if (!Y(s)) continue;
1033
- let f = x.value.center(l) - c / 2 + (t.stacked ? 0 : i * (o + Ci)), p = 0, h = s;
1020
+ return u.value.forEach((r, i) => {
1021
+ for (let u = 0; u < c.value; u++) {
1022
+ let c = r.data[u];
1023
+ if (!Z(c)) continue;
1024
+ let d = S.value.center(u) - s / 2 + (t.stacked ? 0 : i * (o + Fi)), p = 0, m = c;
1034
1025
  if (t.stacked) {
1035
- let e = m.value[i][l];
1026
+ let e = h.value[i][u];
1036
1027
  if (!e) continue;
1037
- p = e.from, h = e.to;
1028
+ p = e.from, m = e.to;
1038
1029
  }
1039
- let g = s >= 0, _ = t.stacked && p !== 0 ? Ci : 0, v = b.value(p), y = b.value(h), S = !t.stacked || (g ? h === u[l].top : h === u[l].bottom), C = S ? wi : 0, w, T;
1030
+ let g = c >= 0, _ = t.stacked && p !== 0 ? Fi : 0, v = x.value(p), y = x.value(m), b = !t.stacked || (g ? m === l[u].top : m === l[u].bottom), C = b ? Ii : 0, w, E;
1040
1031
  if (t.horizontal) {
1041
- let e = Math.min(v, y) + (g ? _ : 0), t = Math.max(v, y) - (g ? 0 : _), n = Math.max(t - e, s === 0 ? 0 : 1);
1042
- w = vr(g ? e : t - n, f, n, o, C, g ? "right" : "left"), T = g ? "0% 50%" : "100% 50%";
1032
+ let e = Math.min(v, y) + (g ? _ : 0), t = Math.max(v, y) - (g ? 0 : _), n = Math.max(t - e, c === 0 ? 0 : 1);
1033
+ w = kr(g ? e : t - n, d, n, o, C, g ? "right" : "left"), E = g ? "0% 50%" : "100% 50%";
1043
1034
  } else {
1044
- let e = Math.min(v, y) + (g ? 0 : _), t = Math.max(v, y) - (g ? _ : 0), n = Math.max(t - e, s === 0 ? 0 : 1);
1045
- w = vr(f, g ? t - n : e, o, n, C, g ? "top" : "bottom"), T = g ? "50% 100%" : "50% 0%";
1035
+ let e = Math.min(v, y) + (g ? 0 : _), t = Math.max(v, y) - (g ? _ : 0), n = Math.max(t - e, c === 0 ? 0 : 1);
1036
+ w = kr(d, g ? t - n : e, o, n, C, g ? "top" : "bottom"), E = g ? "50% 100%" : "50% 0%";
1046
1037
  }
1047
1038
  if (e.push({
1048
- key: `${r.index}-${l}`,
1039
+ key: `${r.index}-${u}`,
1049
1040
  d: w,
1050
1041
  color: r.color,
1051
- origin: T
1052
- }), t.showValues && (!t.stacked || S)) {
1053
- let e = t.stacked ? g ? u[l].top : u[l].bottom : s, i = d(e);
1042
+ origin: E
1043
+ }), t.showValues && (!t.stacked || b)) {
1044
+ let e = t.stacked ? g ? l[u].top : l[u].bottom : c, i = f(e);
1054
1045
  if (t.horizontal) {
1055
- let t = b.value(e);
1046
+ let t = x.value(e);
1056
1047
  n.push({
1057
- key: `${r.index}-${l}`,
1048
+ key: `${r.index}-${u}`,
1058
1049
  x: t + (g ? 6 : -6),
1059
- y: f + o / 2 + 4,
1050
+ y: d + o / 2 + 4,
1060
1051
  text: i,
1061
1052
  anchor: "start"
1062
1053
  });
1063
1054
  } else {
1064
- let s = t.stacked ? x.value.step : o + 4 + (a - o);
1065
- if (ee(i) <= s) {
1066
- let t = b.value(e);
1055
+ let s = t.stacked ? S.value.step : o + 4 + (a - o);
1056
+ if (T(i) <= s) {
1057
+ let t = x.value(e);
1067
1058
  n.push({
1068
- key: `${r.index}-${l}`,
1069
- x: f + o / 2,
1059
+ key: `${r.index}-${u}`,
1060
+ x: d + o / 2,
1070
1061
  y: g ? t - 5 : t + 15,
1071
1062
  text: i,
1072
1063
  anchor: "middle"
@@ -1079,217 +1070,217 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1079
1070
  bars: e,
1080
1071
  labels: n
1081
1072
  };
1082
- }), T = V(-1), te = V(0);
1083
- function ne(e) {
1084
- let n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, i = e.clientY - n.top, a = t.horizontal ? i : r, o = t.horizontal ? _.value.top : _.value.left, c = Math.floor((a - o) / x.value.step);
1085
- T.value = c >= 0 && c < s.value ? c : -1, te.value = r;
1073
+ }), D = G(-1), O = G(0);
1074
+ function ee(e) {
1075
+ let n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, i = e.clientY - n.top, a = t.horizontal ? i : r, o = t.horizontal ? v.value.top : v.value.left, s = Math.floor((a - o) / S.value.step);
1076
+ D.value = s >= 0 && s < c.value ? s : -1, O.value = r;
1086
1077
  }
1087
- function E(e) {
1088
- let n = s.value - 1, r = T.value;
1089
- if (e.key === "ArrowRight" || e.key === "ArrowDown") r = T.value < 0 ? 0 : Math.min(n, T.value + 1);
1090
- else if (e.key === "ArrowLeft" || e.key === "ArrowUp") r = T.value < 0 ? n : Math.max(0, T.value - 1);
1078
+ function k(e) {
1079
+ let n = c.value - 1, r = D.value;
1080
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") r = D.value < 0 ? 0 : Math.min(n, D.value + 1);
1081
+ else if (e.key === "ArrowLeft" || e.key === "ArrowUp") r = D.value < 0 ? n : Math.max(0, D.value - 1);
1091
1082
  else if (e.key === "Home") r = 0;
1092
1083
  else if (e.key === "End") r = n;
1093
1084
  else if (e.key === "Escape") r = -1;
1094
1085
  else return;
1095
- e.preventDefault(), T.value = r, r >= 0 && !t.horizontal && (te.value = x.value.center(r)), r >= 0 && t.horizontal && (te.value = _.value.left + v.value / 2);
1086
+ e.preventDefault(), D.value = r, r >= 0 && !t.horizontal && (O.value = S.value.center(r)), r >= 0 && t.horizontal && (O.value = v.value.left + y.value / 2);
1096
1087
  }
1097
- function re(e) {
1098
- e.target.matches?.(":focus-visible") && T.value < 0 && E(new KeyboardEvent("keydown", { key: "Home" }));
1088
+ function A(e) {
1089
+ e.target.matches?.(":focus-visible") && D.value < 0 && k(new KeyboardEvent("keydown", { key: "Home" }));
1099
1090
  }
1100
- let D = A(() => {
1101
- let e = T.value;
1102
- if (e < 0 || e >= s.value) return null;
1103
- let n = x.value.center(e);
1091
+ let j = P(() => {
1092
+ let e = D.value;
1093
+ if (e < 0 || e >= c.value) return null;
1094
+ let n = S.value.center(e);
1104
1095
  return {
1105
- x: t.horizontal ? Z(te.value, _.value.left, _.value.left + v.value) : n,
1106
- y: t.horizontal ? n : _.value.top,
1096
+ x: t.horizontal ? mr(O.value, v.value.left, v.value.left + y.value) : n,
1097
+ y: t.horizontal ? n : v.value.top,
1107
1098
  title: t.categories[e],
1108
- rows: l.value.map((t) => ({
1099
+ rows: u.value.map((t) => ({
1109
1100
  name: t.name,
1110
1101
  color: t.color,
1111
- value: Y(t.data[e]) ? d(t.data[e]) : "—"
1102
+ value: Z(t.data[e]) ? f(t.data[e]) : "—"
1112
1103
  }))
1113
1104
  };
1114
- }), O = A(() => {
1115
- if (!D.value) return null;
1116
- let e = T.value;
1105
+ }), M = P(() => {
1106
+ if (!j.value) return null;
1107
+ let e = D.value;
1117
1108
  return t.horizontal ? {
1118
- x: _.value.left,
1119
- y: x.value.center(e) - x.value.step / 2,
1120
- w: v.value,
1121
- h: x.value.step
1109
+ x: v.value.left,
1110
+ y: S.value.center(e) - S.value.step / 2,
1111
+ w: y.value,
1112
+ h: S.value.step
1122
1113
  } : {
1123
- x: x.value.center(e) - x.value.step / 2,
1124
- y: _.value.top,
1125
- w: x.value.step,
1126
- h: y.value
1114
+ x: S.value.center(e) - S.value.step / 2,
1115
+ y: v.value.top,
1116
+ w: S.value.step,
1117
+ h: b.value
1127
1118
  };
1128
- }), ie = A(() => t.legend ?? t.series.length > 1), ae = A(() => c.value.map((e) => ({
1119
+ }), te = P(() => t.legend ?? t.series.length > 1), ne = P(() => l.value.map((e) => ({
1129
1120
  name: e.name,
1130
1121
  color: e.color,
1131
1122
  off: a.value.has(e.index)
1132
- }))), oe = A(() => {
1123
+ }))), re = P(() => {
1133
1124
  let e = [n("campus.chart.summaryBar", {
1134
1125
  title: t.title ?? "",
1135
- categories: s.value,
1136
- series: c.value.length
1126
+ categories: c.value,
1127
+ series: l.value.length
1137
1128
  })];
1138
- for (let r of c.value.slice(0, 6)) {
1139
- let i = kr(r.data);
1129
+ for (let r of l.value.slice(0, 6)) {
1130
+ let i = Vr(r.data);
1140
1131
  i && e.push(n("campus.chart.summarySeries", {
1141
1132
  name: r.name,
1142
- min: d(i.min),
1143
- max: d(i.max),
1144
- last: d(i.last),
1133
+ min: f(i.min),
1134
+ max: f(i.max),
1135
+ last: f(i.last),
1145
1136
  category: t.categories[i.lastIndex] ?? ""
1146
1137
  }));
1147
1138
  }
1148
1139
  return e.join(" ");
1149
- }), se = A(() => t.categories.slice(0, Ti).map((e, t) => [e, ...c.value.map((e) => Y(e.data[t]) ? d(e.data[t]) : "")])), ce = A(() => [n("campus.chart.category"), ...c.value.map((e) => e.name)]);
1150
- return (t, n) => (B(), N("div", {
1140
+ }), ie = P(() => t.categories.slice(0, Li).map((e, t) => [e, ...l.value.map((e) => Z(e.data[t]) ? f(e.data[t]) : "")])), ae = P(() => [n("campus.chart.category"), ...l.value.map((e) => e.name)]);
1141
+ return (t, n) => (W(), L("div", {
1151
1142
  ref_key: "el",
1152
1143
  ref: r,
1153
- class: R(["ca-chart ca-bar-chart", {
1144
+ class: H(["ca-chart ca-bar-chart", {
1154
1145
  "is-loading": e.loading,
1155
1146
  "is-animated": e.animated
1156
1147
  }]),
1157
1148
  "aria-busy": e.loading || void 0
1158
1149
  }, [
1159
- ie.value && u.value ? (B(), j(Fr, {
1150
+ te.value && d.value ? (W(), F(qr, {
1160
1151
  key: 0,
1161
- items: ae.value,
1152
+ items: ne.value,
1162
1153
  interactive: "",
1163
- onToggle: n[0] ||= (e) => G(o)(e, c.value.length)
1164
- }, null, 8, ["items"])) : M("v-if", !0),
1165
- P("div", {
1154
+ onToggle: n[0] ||= (e) => Y(o)(e, l.value.length)
1155
+ }, null, 8, ["items"])) : I("v-if", !0),
1156
+ R("div", {
1166
1157
  class: "ca-chart__plot",
1167
- style: z({ height: `${e.height}px` })
1158
+ style: U({ height: `${e.height}px` })
1168
1159
  }, [
1169
- P("div", li, [u.value ? (B(), N("svg", {
1160
+ R("div", xi, [d.value ? (W(), L("svg", {
1170
1161
  key: 0,
1171
1162
  class: "ca-chart__svg",
1172
1163
  role: "img",
1173
1164
  tabindex: "0",
1174
- "aria-label": oe.value,
1175
- width: G(i),
1165
+ "aria-label": re.value,
1166
+ width: Y(i),
1176
1167
  height: e.height,
1177
- viewBox: `0 0 ${G(i)} ${e.height}`,
1178
- onPointermove: ne,
1179
- onPointerdown: ne,
1180
- onPointerleave: n[1] ||= (e) => T.value = -1,
1181
- onKeydown: E,
1182
- onFocus: re,
1183
- onBlur: n[2] ||= (e) => T.value = -1
1168
+ viewBox: `0 0 ${Y(i)} ${e.height}`,
1169
+ onPointermove: ee,
1170
+ onPointerdown: ee,
1171
+ onPointerleave: n[1] ||= (e) => D.value = -1,
1172
+ onKeydown: k,
1173
+ onFocus: A,
1174
+ onBlur: n[2] ||= (e) => D.value = -1
1184
1175
  }, [
1185
- M(" 数值轴的网格与刻度 "),
1186
- e.horizontal ? (B(), N("g", mi, [(B(!0), N(k, null, H(g.value, (e) => (B(), N(k, { key: e.tick }, [P("line", {
1187
- class: R(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
1188
- x1: b.value(e.tick),
1189
- x2: b.value(e.tick),
1190
- y1: _.value.top,
1191
- y2: _.value.top + y.value
1192
- }, null, 10, hi), P("text", {
1176
+ I(" 数值轴的网格与刻度 "),
1177
+ e.horizontal ? (W(), L("g", Ei, [(W(!0), L(N, null, K(_.value, (e) => (W(), L(N, { key: e.tick }, [R("line", {
1178
+ class: H(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
1179
+ x1: x.value(e.tick),
1180
+ x2: x.value(e.tick),
1181
+ y1: v.value.top,
1182
+ y2: v.value.top + b.value
1183
+ }, null, 10, Di), R("text", {
1193
1184
  class: "ca-chart__tick",
1194
- x: b.value(e.tick),
1195
- y: _.value.top + y.value + 18,
1185
+ x: x.value(e.tick),
1186
+ y: v.value.top + b.value + 18,
1196
1187
  "text-anchor": "middle"
1197
- }, W(e.text), 9, gi)], 64))), 128))])) : (B(), N("g", di, [(B(!0), N(k, null, H(g.value, (e) => (B(), N(k, { key: e.tick }, [P("line", {
1198
- class: R(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
1199
- x1: _.value.left,
1200
- x2: _.value.left + v.value,
1201
- y1: b.value(e.tick),
1202
- y2: b.value(e.tick)
1203
- }, null, 10, fi), P("text", {
1188
+ }, J(e.text), 9, Oi)], 64))), 128))])) : (W(), L("g", Ci, [(W(!0), L(N, null, K(_.value, (e) => (W(), L(N, { key: e.tick }, [R("line", {
1189
+ class: H(e.tick === 0 ? "ca-chart__baseline" : "ca-chart__grid"),
1190
+ x1: v.value.left,
1191
+ x2: v.value.left + y.value,
1192
+ y1: x.value(e.tick),
1193
+ y2: x.value(e.tick)
1194
+ }, null, 10, wi), R("text", {
1204
1195
  class: "ca-chart__tick",
1205
- x: _.value.left - 8,
1206
- y: b.value(e.tick),
1196
+ x: v.value.left - 8,
1197
+ y: x.value(e.tick),
1207
1198
  dy: "0.32em",
1208
1199
  "text-anchor": "end"
1209
- }, W(e.text), 9, pi)], 64))), 128))])),
1210
- M(" 类目轴标签 "),
1211
- P("g", null, [e.horizontal ? (B(!0), N(k, { key: 1 }, H(C.value, (e) => (B(), N("text", {
1200
+ }, J(e.text), 9, Ti)], 64))), 128))])),
1201
+ I(" 类目轴标签 "),
1202
+ R("g", null, [e.horizontal ? (W(!0), L(N, { key: 1 }, K(w.value, (e) => (W(), L("text", {
1212
1203
  key: e.i,
1213
1204
  class: "ca-chart__tick",
1214
- x: _.value.left - 8,
1205
+ x: v.value.left - 8,
1215
1206
  y: e.pos,
1216
1207
  dy: "0.32em",
1217
1208
  "text-anchor": "end"
1218
- }, W(e.text), 9, vi))), 128)) : (B(!0), N(k, { key: 0 }, H(C.value, (e) => (B(), N("text", {
1209
+ }, J(e.text), 9, Ai))), 128)) : (W(!0), L(N, { key: 0 }, K(w.value, (e) => (W(), L("text", {
1219
1210
  key: e.i,
1220
1211
  class: "ca-chart__tick",
1221
1212
  x: e.pos,
1222
- y: _.value.top + y.value + 18,
1213
+ y: v.value.top + b.value + 18,
1223
1214
  "text-anchor": "middle"
1224
- }, W(e.text), 9, _i))), 128))]),
1225
- O.value ? (B(), N("rect", {
1215
+ }, J(e.text), 9, ki))), 128))]),
1216
+ M.value ? (W(), L("rect", {
1226
1217
  key: 2,
1227
1218
  class: "ca-chart__band",
1228
- x: O.value.x,
1229
- y: O.value.y,
1230
- width: O.value.w,
1231
- height: O.value.h
1232
- }, null, 8, yi)) : M("v-if", !0),
1233
- P("g", null, [(B(!0), N(k, null, H(w.value.bars, (t) => (B(), N("path", {
1219
+ x: M.value.x,
1220
+ y: M.value.y,
1221
+ width: M.value.w,
1222
+ height: M.value.h
1223
+ }, null, 8, ji)) : I("v-if", !0),
1224
+ R("g", null, [(W(!0), L(N, null, K(E.value.bars, (t) => (W(), L("path", {
1234
1225
  key: t.key,
1235
- class: R(["ca-chart__bar", e.horizontal ? "ca-chart__grow-x" : "ca-chart__grow-y"]),
1226
+ class: H(["ca-chart__bar", e.horizontal ? "ca-chart__grow-x" : "ca-chart__grow-y"]),
1236
1227
  d: t.d,
1237
- style: z({
1228
+ style: U({
1238
1229
  fill: t.color,
1239
1230
  transformOrigin: t.origin
1240
1231
  })
1241
- }, null, 14, bi))), 128))]),
1242
- P("g", xi, [(B(!0), N(k, null, H(w.value.labels, (e) => (B(), N("text", {
1232
+ }, null, 14, Mi))), 128))]),
1233
+ R("g", Ni, [(W(!0), L(N, null, K(E.value.labels, (e) => (W(), L("text", {
1243
1234
  key: e.key,
1244
1235
  class: "ca-chart__value",
1245
1236
  x: e.x,
1246
1237
  y: e.y,
1247
1238
  "text-anchor": e.anchor
1248
- }, W(e.text), 9, Si))), 128))])
1249
- ], 40, ui)) : M("v-if", !0)]),
1250
- D.value ? (B(), j(Gr, {
1239
+ }, J(e.text), 9, Pi))), 128))])
1240
+ ], 40, Si)) : I("v-if", !0)]),
1241
+ j.value ? (W(), F(ri, {
1251
1242
  key: 0,
1252
- x: D.value.x,
1253
- y: D.value.y,
1254
- width: G(i),
1255
- title: D.value.title,
1256
- rows: D.value.rows
1243
+ x: j.value.x,
1244
+ y: j.value.y,
1245
+ width: Y(i),
1246
+ title: j.value.title,
1247
+ rows: j.value.rows
1257
1248
  }, null, 8, [
1258
1249
  "x",
1259
1250
  "y",
1260
1251
  "width",
1261
1252
  "title",
1262
1253
  "rows"
1263
- ])) : M("v-if", !0),
1264
- I(Lr, {
1254
+ ])) : I("v-if", !0),
1255
+ B(Yr, {
1265
1256
  loading: e.loading,
1266
- empty: !u.value && !e.loading
1257
+ empty: !d.value && !e.loading
1267
1258
  }, null, 8, ["loading", "empty"])
1268
1259
  ], 4),
1269
- u.value ? (B(), j(Vr, {
1260
+ d.value ? (W(), F($r, {
1270
1261
  key: 1,
1271
1262
  caption: e.title,
1272
- head: ce.value,
1273
- rows: se.value
1263
+ head: ae.value,
1264
+ rows: ie.value
1274
1265
  }, null, 8, [
1275
1266
  "caption",
1276
1267
  "head",
1277
1268
  "rows"
1278
- ])) : M("v-if", !0)
1279
- ], 10, ci));
1269
+ ])) : I("v-if", !0)
1270
+ ], 10, bi));
1280
1271
  }
1281
- }), Di = ["aria-busy"], Oi = { class: "ca-pie-chart__body" }, ki = { class: "ca-chart__canvas" }, Ai = [
1272
+ }), zi = ["aria-busy"], Bi = { class: "ca-pie-chart__body" }, Vi = { class: "ca-chart__canvas" }, Hi = [
1282
1273
  "aria-label",
1283
1274
  "width",
1284
1275
  "height",
1285
1276
  "viewBox"
1286
- ], ji = { class: "ca-chart__fade" }, Mi = ["d", "onPointerenter"], Ni = { class: "ca-pie-chart__label" }, Pi = {
1277
+ ], Ui = { class: "ca-chart__fade" }, Wi = ["d", "onPointerenter"], Gi = { class: "ca-pie-chart__label" }, Ki = {
1287
1278
  key: 0,
1288
1279
  class: "ca-pie-chart__sub"
1289
- }, Fi = {
1280
+ }, qi = {
1290
1281
  key: 0,
1291
1282
  class: "ca-pie-chart__legend"
1292
- }, Ii = ["onPointerenter"], Li = { class: "ca-pie-chart__name" }, Ri = { class: "ca-pie-chart__num" }, zi = { class: "ca-pie-chart__pct" }, Bi = 6, Vi = /*#__PURE__*/ Vn(/* @__PURE__ */ L({
1283
+ }, Ji = ["onPointerenter"], Yi = { class: "ca-pie-chart__name" }, Xi = { class: "ca-pie-chart__num" }, Zi = { class: "ca-pie-chart__pct" }, Qi = 6, $i = /*#__PURE__*/ l(/* @__PURE__ */ V({
1293
1284
  __name: "CaPieChart",
1294
1285
  props: {
1295
1286
  items: {},
@@ -1313,195 +1304,195 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1313
1304
  }
1314
1305
  },
1315
1306
  setup(e) {
1316
- let t = e, n = J(), { el: r, width: i } = jr(), a = (e) => (t.valueFormatter ?? $)(e), o = A(() => Z(Math.min(t.size, i.value), 96, t.size)), s = A(() => o.value / 2 - Bi), c = A(() => t.donut ? s.value * .64 : 0), l = A(() => t.items.map((e, t) => ({
1307
+ let t = e, n = s(), { el: r, width: i } = Ur(), a = (e) => (t.valueFormatter ?? Lr)(e), o = P(() => mr(Math.min(t.size, i.value), 96, t.size)), c = P(() => o.value / 2 - Qi), l = P(() => t.donut ? c.value * .64 : 0), u = P(() => t.items.map((e, t) => ({
1317
1308
  index: t,
1318
1309
  name: e.name,
1319
- value: Y(e.value) ? e.value : 0,
1320
- color: Nr(t, e.color)
1321
- }))), u = A(() => br(l.value.map((e) => e.value))), d = A(() => l.value.reduce((e, t) => e + (t.value > 0 ? t.value : 0), 0)), f = A(() => u.value.length > 0), p = V(-1), m = A(() => u.value.filter((e) => e.end > e.start).map((e) => {
1322
- let t = l.value[e.index], n = p.value === e.index ? 4 : 0;
1310
+ value: Z(e.value) ? e.value : 0,
1311
+ color: Gr(t, e.color)
1312
+ }))), d = P(() => jr(u.value.map((e) => e.value))), f = P(() => u.value.reduce((e, t) => e + (t.value > 0 ? t.value : 0), 0)), p = P(() => d.value.length > 0), m = G(-1), h = P(() => d.value.filter((e) => e.end > e.start).map((e) => {
1313
+ let t = u.value[e.index], n = m.value === e.index ? 4 : 0;
1323
1314
  return {
1324
1315
  ...e,
1325
1316
  name: t.name,
1326
1317
  color: t.color,
1327
- d: xr(o.value / 2, o.value / 2, s.value + n, c.value, e.start, e.end)
1318
+ d: Mr(o.value / 2, o.value / 2, c.value + n, l.value, e.start, e.end)
1328
1319
  };
1329
- })), h = (e) => u.value[e]?.ratio ?? 0, g = A(() => {
1330
- let e = p.value;
1331
- return e >= 0 && l.value[e] ? {
1332
- label: l.value[e].name,
1333
- value: a(l.value[e].value),
1334
- sub: Ar(h(e))
1320
+ })), g = (e) => d.value[e]?.ratio ?? 0, _ = P(() => {
1321
+ let e = m.value;
1322
+ return e >= 0 && u.value[e] ? {
1323
+ label: u.value[e].name,
1324
+ value: a(u.value[e].value),
1325
+ sub: Hr(g(e))
1335
1326
  } : {
1336
1327
  label: t.centerLabel ?? n("campus.chart.total"),
1337
- value: t.centerValue ?? a(d.value),
1328
+ value: t.centerValue ?? a(f.value),
1338
1329
  sub: ""
1339
1330
  };
1340
- }), _ = V({
1331
+ }), v = G({
1341
1332
  x: 0,
1342
1333
  y: 0
1343
1334
  });
1344
- function v(e) {
1335
+ function y(e) {
1345
1336
  let t = e.currentTarget.closest("svg").getBoundingClientRect();
1346
- _.value = {
1337
+ v.value = {
1347
1338
  x: e.clientX - t.left,
1348
1339
  y: e.clientY - t.top
1349
1340
  };
1350
1341
  }
1351
- let y = A(() => {
1352
- if (t.donut || p.value < 0 || !l.value[p.value]) return null;
1353
- let e = l.value[p.value];
1342
+ let b = P(() => {
1343
+ if (t.donut || m.value < 0 || !u.value[m.value]) return null;
1344
+ let e = u.value[m.value];
1354
1345
  return {
1355
- x: _.value.x,
1356
- y: _.value.y,
1346
+ x: v.value.x,
1347
+ y: v.value.y,
1357
1348
  title: e.name,
1358
1349
  rows: [{
1359
- name: Ar(h(p.value)),
1350
+ name: Hr(g(m.value)),
1360
1351
  color: e.color,
1361
1352
  value: a(e.value)
1362
1353
  }]
1363
1354
  };
1364
1355
  });
1365
- function b(e) {
1366
- let t = m.value.map((e) => e.index);
1356
+ function x(e) {
1357
+ let t = h.value.map((e) => e.index);
1367
1358
  if (!t.length) return;
1368
- let n = t.indexOf(p.value), r = p.value;
1359
+ let n = t.indexOf(m.value), r = m.value;
1369
1360
  if (e.key === "ArrowRight" || e.key === "ArrowDown") r = t[n < 0 ? 0 : Math.min(t.length - 1, n + 1)];
1370
1361
  else if (e.key === "ArrowLeft" || e.key === "ArrowUp") r = t[n < 0 ? t.length - 1 : Math.max(0, n - 1)];
1371
1362
  else if (e.key === "Escape") r = -1;
1372
1363
  else return;
1373
- e.preventDefault(), p.value = r;
1374
- let i = u.value[r];
1375
- i && (_.value = Q(o.value / 2, o.value / 2, (s.value + c.value) / 2, (i.start + i.end) / 2));
1364
+ e.preventDefault(), m.value = r;
1365
+ let i = d.value[r];
1366
+ i && (v.value = $(o.value / 2, o.value / 2, (c.value + l.value) / 2, (i.start + i.end) / 2));
1376
1367
  }
1377
- function x(e) {
1378
- e.target.matches?.(":focus-visible") && p.value < 0 && b(new KeyboardEvent("keydown", { key: "ArrowRight" }));
1368
+ function S(e) {
1369
+ e.target.matches?.(":focus-visible") && m.value < 0 && x(new KeyboardEvent("keydown", { key: "ArrowRight" }));
1379
1370
  }
1380
- let S = A(() => Z(Math.floor(c.value * 1.7 / Math.max(1, g.value.value.length * .62)), 13, 22)), C = A(() => {
1371
+ let C = P(() => mr(Math.floor(l.value * 1.7 / Math.max(1, _.value.value.length * .62)), 13, 22)), w = P(() => {
1381
1372
  let e = [n("campus.chart.summaryPie", {
1382
1373
  title: t.title ?? "",
1383
- count: l.value.length,
1384
- total: a(d.value)
1374
+ count: u.value.length,
1375
+ total: a(f.value)
1385
1376
  })];
1386
- for (let t of l.value.slice(0, 8)) e.push(n("campus.chart.summaryPieItem", {
1377
+ for (let t of u.value.slice(0, 8)) e.push(n("campus.chart.summaryPieItem", {
1387
1378
  name: t.name,
1388
1379
  value: a(t.value),
1389
- percent: Ar(h(t.index))
1380
+ percent: Hr(g(t.index))
1390
1381
  }));
1391
1382
  return e.join(" ");
1392
- }), ee = A(() => [
1383
+ }), T = P(() => [
1393
1384
  n("campus.chart.category"),
1394
1385
  n("campus.chart.value"),
1395
1386
  n("campus.chart.percent")
1396
- ]), w = A(() => l.value.map((e) => [
1387
+ ]), E = P(() => u.value.map((e) => [
1397
1388
  e.name,
1398
1389
  a(e.value),
1399
- Ar(h(e.index))
1390
+ Hr(g(e.index))
1400
1391
  ]));
1401
- return (t, n) => (B(), N("div", {
1392
+ return (t, n) => (W(), L("div", {
1402
1393
  ref_key: "el",
1403
1394
  ref: r,
1404
- class: R(["ca-chart ca-pie-chart", {
1395
+ class: H(["ca-chart ca-pie-chart", {
1405
1396
  "is-loading": e.loading,
1406
1397
  "is-animated": e.animated
1407
1398
  }]),
1408
1399
  "aria-busy": e.loading || void 0
1409
- }, [P("div", Oi, [
1410
- P("div", {
1400
+ }, [R("div", Bi, [
1401
+ R("div", {
1411
1402
  class: "ca-chart__plot",
1412
- style: z({
1403
+ style: U({
1413
1404
  width: `${o.value}px`,
1414
1405
  height: `${o.value}px`
1415
1406
  })
1416
1407
  }, [
1417
- P("div", ki, [f.value ? (B(), N("svg", {
1408
+ R("div", Vi, [p.value ? (W(), L("svg", {
1418
1409
  key: 0,
1419
1410
  class: "ca-chart__svg",
1420
1411
  role: "img",
1421
1412
  tabindex: "0",
1422
- "aria-label": C.value,
1413
+ "aria-label": w.value,
1423
1414
  width: o.value,
1424
1415
  height: o.value,
1425
1416
  viewBox: `0 0 ${o.value} ${o.value}`,
1426
- onKeydown: b,
1427
- onFocus: x,
1428
- onBlur: n[1] ||= (e) => p.value = -1
1429
- }, [P("g", ji, [(B(!0), N(k, null, H(m.value, (e) => (B(), N("path", {
1417
+ onKeydown: x,
1418
+ onFocus: S,
1419
+ onBlur: n[1] ||= (e) => m.value = -1
1420
+ }, [R("g", Ui, [(W(!0), L(N, null, K(h.value, (e) => (W(), L("path", {
1430
1421
  key: e.index,
1431
- class: R(["ca-chart__slice", { "is-dim": p.value >= 0 && p.value !== e.index }]),
1422
+ class: H(["ca-chart__slice", { "is-dim": m.value >= 0 && m.value !== e.index }]),
1432
1423
  d: e.d,
1433
- style: z({ fill: e.color }),
1434
- onPointerenter: (t) => p.value = e.index,
1435
- onPointermove: v,
1436
- onPointerleave: n[0] ||= (e) => p.value = -1
1437
- }, null, 46, Mi))), 128))])], 40, Ai)) : M("v-if", !0)]),
1438
- M(" 环形图中心文字:HTML 叠在 SVG 上,方便按内圈宽度换行与省略 "),
1439
- e.donut && f.value ? (B(), N("div", {
1424
+ style: U({ fill: e.color }),
1425
+ onPointerenter: (t) => m.value = e.index,
1426
+ onPointermove: y,
1427
+ onPointerleave: n[0] ||= (e) => m.value = -1
1428
+ }, null, 46, Wi))), 128))])], 40, Hi)) : I("v-if", !0)]),
1429
+ I(" 环形图中心文字:HTML 叠在 SVG 上,方便按内圈宽度换行与省略 "),
1430
+ e.donut && p.value ? (W(), L("div", {
1440
1431
  key: 0,
1441
1432
  class: "ca-pie-chart__center",
1442
- style: z({ width: `${c.value * 1.7}px` })
1433
+ style: U({ width: `${l.value * 1.7}px` })
1443
1434
  }, [
1444
- P("span", Ni, W(g.value.label), 1),
1445
- P("strong", {
1435
+ R("span", Gi, J(_.value.label), 1),
1436
+ R("strong", {
1446
1437
  class: "ca-pie-chart__value",
1447
- style: z({ fontSize: `${S.value}px` })
1448
- }, W(g.value.value), 5),
1449
- g.value.sub ? (B(), N("span", Pi, W(g.value.sub), 1)) : M("v-if", !0)
1450
- ], 4)) : M("v-if", !0),
1451
- y.value ? (B(), j(Gr, {
1438
+ style: U({ fontSize: `${C.value}px` })
1439
+ }, J(_.value.value), 5),
1440
+ _.value.sub ? (W(), L("span", Ki, J(_.value.sub), 1)) : I("v-if", !0)
1441
+ ], 4)) : I("v-if", !0),
1442
+ b.value ? (W(), F(ri, {
1452
1443
  key: 1,
1453
- x: y.value.x,
1454
- y: y.value.y,
1444
+ x: b.value.x,
1445
+ y: b.value.y,
1455
1446
  width: o.value,
1456
- title: y.value.title,
1457
- rows: y.value.rows
1447
+ title: b.value.title,
1448
+ rows: b.value.rows
1458
1449
  }, null, 8, [
1459
1450
  "x",
1460
1451
  "y",
1461
1452
  "width",
1462
1453
  "title",
1463
1454
  "rows"
1464
- ])) : M("v-if", !0),
1465
- I(Lr, {
1455
+ ])) : I("v-if", !0),
1456
+ B(Yr, {
1466
1457
  loading: e.loading,
1467
- empty: !f.value && !e.loading
1458
+ empty: !p.value && !e.loading
1468
1459
  }, null, 8, ["loading", "empty"])
1469
1460
  ], 4),
1470
- M(" 图例清单:名称 / 数值 / 占比,悬停与扇区联动 "),
1471
- e.legend && l.value.length ? (B(), N("ul", Fi, [(B(!0), N(k, null, H(l.value, (e) => (B(), N("li", {
1461
+ I(" 图例清单:名称 / 数值 / 占比,悬停与扇区联动 "),
1462
+ e.legend && u.value.length ? (W(), L("ul", qi, [(W(!0), L(N, null, K(u.value, (e) => (W(), L("li", {
1472
1463
  key: e.index,
1473
- class: R(["ca-pie-chart__row", { "is-active": p.value === e.index }]),
1474
- onPointerenter: (t) => p.value = e.value > 0 ? e.index : -1,
1475
- onPointerleave: n[2] ||= (e) => p.value = -1
1464
+ class: H(["ca-pie-chart__row", { "is-active": m.value === e.index }]),
1465
+ onPointerenter: (t) => m.value = e.value > 0 ? e.index : -1,
1466
+ onPointerleave: n[2] ||= (e) => m.value = -1
1476
1467
  }, [
1477
- P("span", {
1468
+ R("span", {
1478
1469
  class: "ca-chart__key ca-chart__key--box",
1479
- style: z({ "--key": e.color })
1470
+ style: U({ "--key": e.color })
1480
1471
  }, null, 4),
1481
- P("span", Li, W(e.name), 1),
1482
- P("span", Ri, W(a(e.value)), 1),
1483
- P("span", zi, W(G(Ar)(h(e.index))), 1)
1484
- ], 42, Ii))), 128))])) : M("v-if", !0)
1485
- ]), f.value ? (B(), j(Vr, {
1472
+ R("span", Yi, J(e.name), 1),
1473
+ R("span", Xi, J(a(e.value)), 1),
1474
+ R("span", Zi, J(Y(Hr)(g(e.index))), 1)
1475
+ ], 42, Ji))), 128))])) : I("v-if", !0)
1476
+ ]), p.value ? (W(), F($r, {
1486
1477
  key: 0,
1487
1478
  caption: e.title,
1488
- head: ee.value,
1489
- rows: w.value
1479
+ head: T.value,
1480
+ rows: E.value
1490
1481
  }, null, 8, [
1491
1482
  "caption",
1492
1483
  "head",
1493
1484
  "rows"
1494
- ])) : M("v-if", !0)], 10, Di));
1485
+ ])) : I("v-if", !0)], 10, zi));
1495
1486
  }
1496
- }), [["__scopeId", "data-v-75e32682"]]), Hi = [
1487
+ }), [["__scopeId", "data-v-75e32682"]]), ea = [
1497
1488
  "aria-label",
1498
1489
  "width",
1499
1490
  "height",
1500
1491
  "viewBox"
1501
- ], Ui = {
1492
+ ], ta = {
1502
1493
  key: 0,
1503
1494
  class: "ca-chart__reveal"
1504
- }, Wi = ["d"], Gi = ["d"], Ki = ["cx", "cy"], qi = { key: 1 }, Ji = ["d"], Yi = 4, Xi = 5, Zi = 2, Qi = /* @__PURE__ */ L({
1495
+ }, na = ["d"], ra = ["d"], ia = ["cx", "cy"], aa = { key: 1 }, oa = ["d"], sa = 4, ca = 5, la = 2, ua = /* @__PURE__ */ V({
1505
1496
  __name: "CaSparkline",
1506
1497
  props: {
1507
1498
  data: {},
@@ -1525,32 +1516,32 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1525
1516
  }
1526
1517
  },
1527
1518
  setup(e) {
1528
- let t = e, n = J(), { el: r, width: i } = jr(() => t.width), a = (e) => (t.valueFormatter ?? $)(e), o = A(() => _r(t.data)), s = A(() => Math.max(1, i.value - 8)), c = A(() => {
1519
+ let t = e, n = s(), { el: r, width: i } = Ur(() => t.width), a = (e) => (t.valueFormatter ?? Lr)(e), o = P(() => Or(t.data)), c = P(() => Math.max(1, i.value - 8)), l = P(() => {
1529
1520
  let e = t.data.length, n = o.value;
1530
1521
  if (!e || !n) return null;
1531
1522
  if (t.type === "bar") {
1532
- let r = Math.max(n[1], 0), i = Math.min(n[0], 0), a = sr(i, r === i ? i + 1 : r, t.height - 1, Xi), o = (s.value - Zi * (e - 1)) / e, c = Math.max(1, Math.min(o, 14)), l = c * e + Zi * (e - 1), u = Yi + (s.value - l) / 2;
1523
+ let r = Math.max(n[1], 0), i = Math.min(n[0], 0), a = vr(i, r === i ? i + 1 : r, t.height - 1, ca), o = (c.value - la * (e - 1)) / e, s = Math.max(1, Math.min(o, 14)), l = s * e + la * (e - 1), u = sa + (c.value - l) / 2;
1533
1524
  return {
1534
1525
  kind: "bar",
1535
1526
  bars: t.data.flatMap((e, t) => {
1536
- if (!Y(e)) return [];
1537
- let n = a(0), r = a(e), i = vr(u + t * (c + Zi), Math.min(n, r), c, Math.max(Math.abs(n - r), e === 0 ? 0 : 1), 2, e >= 0 ? "top" : "bottom");
1527
+ if (!Z(e)) return [];
1528
+ let n = a(0), r = a(e), i = kr(u + t * (s + la), Math.min(n, r), s, Math.max(Math.abs(n - r), e === 0 ? 0 : 1), 2, e >= 0 ? "top" : "bottom");
1538
1529
  return i ? [i] : [];
1539
1530
  })
1540
1531
  };
1541
1532
  }
1542
- let r = sr(n[0], n[1], t.height - Xi, Xi), a = (t) => e === 1 ? i.value / 2 : Yi + t / (e - 1) * s.value, c = t.data.map((e, t) => Y(e) ? {
1533
+ let r = vr(n[0], n[1], t.height - ca, ca), a = (t) => e === 1 ? i.value / 2 : sa + t / (e - 1) * c.value, s = t.data.map((e, t) => Z(e) ? {
1543
1534
  x: a(t),
1544
1535
  y: r(e)
1545
- } : null), l = [...c].reverse().find((e) => e) ?? null;
1536
+ } : null), l = [...s].reverse().find((e) => e) ?? null;
1546
1537
  return {
1547
1538
  kind: "line",
1548
- line: mr(c, t.smooth),
1549
- area: t.area ? hr(c, t.height - 1, t.smooth) : "",
1539
+ line: Tr(s, t.smooth),
1540
+ area: t.area ? Er(s, t.height - 1, t.smooth) : "",
1550
1541
  last: l
1551
1542
  };
1552
- }), l = A(() => {
1553
- let e = kr(t.data);
1543
+ }), u = P(() => {
1544
+ let e = Vr(t.data);
1554
1545
  return e ? n("campus.chart.summarySpark", {
1555
1546
  title: t.title ?? "",
1556
1547
  count: e.count,
@@ -1559,59 +1550,59 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1559
1550
  last: a(e.last)
1560
1551
  }) : t.title ?? "";
1561
1552
  });
1562
- return (t, n) => (B(), N("div", {
1553
+ return (t, n) => (W(), L("div", {
1563
1554
  ref_key: "el",
1564
1555
  ref: r,
1565
- class: R(["ca-chart ca-sparkline", { "is-animated": e.animated }]),
1566
- style: z({ height: `${e.height}px` })
1567
- }, [c.value ? (B(), N("svg", {
1556
+ class: H(["ca-chart ca-sparkline", { "is-animated": e.animated }]),
1557
+ style: U({ height: `${e.height}px` })
1558
+ }, [l.value ? (W(), L("svg", {
1568
1559
  key: 0,
1569
1560
  class: "ca-chart__svg",
1570
1561
  role: "img",
1571
- "aria-label": l.value,
1572
- width: G(i),
1562
+ "aria-label": u.value,
1563
+ width: Y(i),
1573
1564
  height: e.height,
1574
- viewBox: `0 0 ${G(i)} ${e.height}`
1575
- }, [c.value.kind === "line" ? (B(), N("g", Ui, [
1576
- c.value.area ? (B(), N("path", {
1565
+ viewBox: `0 0 ${Y(i)} ${e.height}`
1566
+ }, [l.value.kind === "line" ? (W(), L("g", ta, [
1567
+ l.value.area ? (W(), L("path", {
1577
1568
  key: 0,
1578
1569
  class: "ca-chart__area",
1579
- d: c.value.area,
1580
- style: z({ fill: e.color })
1581
- }, null, 12, Wi)) : M("v-if", !0),
1582
- P("path", {
1570
+ d: l.value.area,
1571
+ style: U({ fill: e.color })
1572
+ }, null, 12, na)) : I("v-if", !0),
1573
+ R("path", {
1583
1574
  class: "ca-chart__line",
1584
- d: c.value.line,
1585
- style: z({ stroke: e.color })
1586
- }, null, 12, Gi),
1587
- c.value.last ? (B(), N("circle", {
1575
+ d: l.value.line,
1576
+ style: U({ stroke: e.color })
1577
+ }, null, 12, ra),
1578
+ l.value.last ? (W(), L("circle", {
1588
1579
  key: 1,
1589
1580
  class: "ca-chart__dot",
1590
- cx: c.value.last.x,
1591
- cy: c.value.last.y,
1581
+ cx: l.value.last.x,
1582
+ cy: l.value.last.y,
1592
1583
  r: "3.5",
1593
- style: z({ fill: e.color })
1594
- }, null, 12, Ki)) : M("v-if", !0)
1595
- ])) : (B(), N("g", qi, [(B(!0), N(k, null, H(c.value.bars, (t, n) => (B(), N("path", {
1584
+ style: U({ fill: e.color })
1585
+ }, null, 12, ia)) : I("v-if", !0)
1586
+ ])) : (W(), L("g", aa, [(W(!0), L(N, null, K(l.value.bars, (t, n) => (W(), L("path", {
1596
1587
  key: n,
1597
1588
  class: "ca-chart__grow-y",
1598
1589
  d: t,
1599
- style: z({ fill: e.color })
1600
- }, null, 12, Ji))), 128))]))], 8, Hi)) : M("v-if", !0)], 6));
1590
+ style: U({ fill: e.color })
1591
+ }, null, 12, oa))), 128))]))], 8, ea)) : I("v-if", !0)], 6));
1601
1592
  }
1602
- }), $i = ["aria-busy"], ea = [
1593
+ }), da = ["aria-busy"], fa = [
1603
1594
  "aria-label",
1604
1595
  "width",
1605
1596
  "height",
1606
1597
  "viewBox"
1607
- ], ta = ["d", "stroke-width"], na = [
1598
+ ], pa = ["d", "stroke-width"], ma = [
1608
1599
  "d",
1609
1600
  "stroke-width",
1610
1601
  "stroke-dasharray"
1611
- ], ra = { class: "ca-gauge__value" }, ia = {
1602
+ ], ha = { class: "ca-gauge__value" }, ga = {
1612
1603
  key: 0,
1613
1604
  class: "ca-gauge__label"
1614
- }, aa = /*#__PURE__*/ Vn(/* @__PURE__ */ L({
1605
+ }, _a = /*#__PURE__*/ l(/* @__PURE__ */ V({
1615
1606
  __name: "CaGauge",
1616
1607
  props: {
1617
1608
  value: {},
@@ -1630,71 +1621,775 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1630
1621
  }
1631
1622
  },
1632
1623
  setup(e) {
1633
- let t = e, n = J(), r = A(() => Tr(t.value, t.max)), i = A(() => wr(r.value, t.thresholds, t.color)), a = A(() => Cr(t.shape)), o = A(() => t.size / 2), s = A(() => (t.size - t.thickness) / 2 - 1), c = A(() => t.shape === "half" ? o.value + t.thickness / 2 + 2 : t.size), l = A(() => Sr(o.value, o.value, s.value, a.value.start, a.value.start + a.value.sweep)), u = A(() => `${Number(r.value.toFixed(1))}%`), d = A(() => n("campus.chart.summaryGauge", {
1624
+ let t = e, n = s(), r = P(() => Ir(t.value, t.max)), i = P(() => Fr(r.value, t.thresholds, t.color)), a = P(() => Pr(t.shape)), o = P(() => t.size / 2), c = P(() => (t.size - t.thickness) / 2 - 1), l = P(() => t.shape === "half" ? o.value + t.thickness / 2 + 2 : t.size), u = P(() => Nr(o.value, o.value, c.value, a.value.start, a.value.start + a.value.sweep)), d = P(() => `${Number(r.value.toFixed(1))}%`), f = P(() => n("campus.chart.summaryGauge", {
1634
1625
  title: t.title ?? t.label ?? "",
1635
- value: $(typeof t.value == "number" ? t.value : 0),
1636
- max: $(t.max),
1637
- percent: u.value
1626
+ value: Lr(typeof t.value == "number" ? t.value : 0),
1627
+ max: Lr(t.max),
1628
+ percent: d.value
1638
1629
  }));
1639
- return (t, n) => (B(), N("div", {
1640
- class: R(["ca-chart ca-gauge", {
1630
+ return (t, n) => (W(), L("div", {
1631
+ class: H(["ca-chart ca-gauge", {
1641
1632
  "is-loading": e.loading,
1642
1633
  "is-animated": e.animated
1643
1634
  }]),
1644
- style: z({
1635
+ style: U({
1645
1636
  width: `${e.size}px`,
1646
- height: `${c.value}px`
1637
+ height: `${l.value}px`
1647
1638
  }),
1648
1639
  "aria-busy": e.loading || void 0
1649
- }, [(B(), N("svg", {
1640
+ }, [(W(), L("svg", {
1650
1641
  class: "ca-chart__svg",
1651
1642
  role: "img",
1652
- "aria-label": d.value,
1643
+ "aria-label": f.value,
1653
1644
  width: e.size,
1654
- height: c.value,
1655
- viewBox: `0 0 ${e.size} ${c.value}`
1645
+ height: l.value,
1646
+ viewBox: `0 0 ${e.size} ${l.value}`
1656
1647
  }, [
1657
- P("path", {
1648
+ R("path", {
1658
1649
  class: "ca-chart__track",
1659
- d: l.value,
1650
+ d: u.value,
1660
1651
  "stroke-width": e.thickness,
1661
1652
  "stroke-linecap": "round"
1662
- }, null, 8, ta),
1663
- M(" pathLength=100:dasharray 的第一个数就是百分比;0% 时不画(圆头线帽会在起点留一个小点,误导成“有进度”) "),
1664
- r.value > 0 ? (B(), N("path", {
1653
+ }, null, 8, pa),
1654
+ I(" pathLength=100:dasharray 的第一个数就是百分比;0% 时不画(圆头线帽会在起点留一个小点,误导成“有进度”) "),
1655
+ r.value > 0 ? (W(), L("path", {
1665
1656
  key: 0,
1666
1657
  class: "ca-chart__progress",
1667
- d: l.value,
1658
+ d: u.value,
1668
1659
  pathLength: "100",
1669
1660
  "stroke-width": e.thickness,
1670
1661
  "stroke-dasharray": `${r.value} 100`,
1671
- style: z({ stroke: i.value })
1672
- }, null, 12, na)) : M("v-if", !0)
1673
- ], 8, ea)), P("div", { class: R(["ca-gauge__center", { "is-half": e.shape === "half" }]) }, [U(t.$slots, "center", {}, () => [P("strong", ra, W(u.value), 1), e.label ? (B(), N("span", ia, W(e.label), 1)) : M("v-if", !0)], !0)], 2)], 14, $i));
1662
+ style: U({ stroke: i.value })
1663
+ }, null, 12, ma)) : I("v-if", !0)
1664
+ ], 8, fa)), R("div", { class: H(["ca-gauge__center", { "is-half": e.shape === "half" }]) }, [q(t.$slots, "center", {}, () => [R("strong", ha, J(d.value), 1), e.label ? (W(), L("span", ga, J(e.label), 1)) : I("v-if", !0)], !0)], 2)], 14, da));
1674
1665
  }
1675
- }), [["__scopeId", "data-v-83314498"]]), oa = {
1676
- CaLineChart: si,
1677
- CaBarChart: Ei,
1678
- CaPieChart: Vi,
1679
- CaSparkline: Qi,
1680
- CaGauge: aa
1681
- }, sa = /* @__PURE__ */ L({
1666
+ }), [["__scopeId", "data-v-83314498"]]), va = {
1667
+ CaLineChart: yi,
1668
+ CaBarChart: Ri,
1669
+ CaPieChart: $i,
1670
+ CaSparkline: ua,
1671
+ CaGauge: _a
1672
+ }, ya = /* @__PURE__ */ V({
1682
1673
  __name: "CaConfigProvider",
1683
1674
  props: { locale: {} },
1684
1675
  setup(e) {
1685
- let t = e, n = A(() => t.locale === "en-US" ? Fn : In);
1686
- return (e, t) => (B(), j(G(re), { locale: n.value }, {
1687
- default: K(() => [U(e.$slots, "default")]),
1676
+ let t = e, n = P(() => t.locale === "en-US" ? Kn : qn);
1677
+ return (e, t) => (W(), F(Y(se), { locale: n.value }, {
1678
+ default: X(() => [q(e.$slots, "default")]),
1688
1679
  _: 3
1689
1680
  }, 8, ["locale"]));
1690
1681
  }
1691
- }), ca = { CaConfigProvider: sa }, la = { class: "ca-stat ca-card" }, ua = { class: "ca-stat__head" }, da = { class: "ca-stat__title" }, fa = {
1682
+ }), ba = { CaConfigProvider: ya };
1683
+ // packages/ui/src/components/display/doc-viewer/source.ts
1684
+ function xa(e = "", t = "") {
1685
+ let n = e.split(/[?#]/)[0].split(".").pop()?.toLowerCase();
1686
+ return n === "doc" || n === "ppt" ? "legacy" : n === "md" || n === "markdown" ? "md" : n === "xls" || n === "xlsx" ? "xlsx" : [
1687
+ "pdf",
1688
+ "docx",
1689
+ "csv",
1690
+ "txt"
1691
+ ].includes(n ?? "") ? n : /pdf/.test(t) ? "pdf" : /wordprocessingml/.test(t) ? "docx" : /spreadsheetml|ms-excel/.test(t) ? "xlsx" : /markdown/.test(t) ? "md" : /csv/.test(t) ? "csv" : /^text\//.test(t) ? "txt" : "unsupported";
1692
+ }
1693
+ function Sa(e, t) {
1694
+ let n = typeof t == "number" ? t : t?.[e] ?? a[e] ?? 20 * 1024 ** 2;
1695
+ if (!Number.isFinite(n) || n <= 0) throw new c("invalidSize");
1696
+ return n;
1697
+ }
1698
+ function Ca(e, t) {
1699
+ if (e > t) throw new c("tooLarge");
1700
+ }
1701
+ function wa(e) {
1702
+ try {
1703
+ let t = new TextDecoder("utf-8", { fatal: !0 }).decode(e);
1704
+ if (t.includes("\0")) throw Error("binary");
1705
+ return t;
1706
+ } catch {
1707
+ throw new c("invalidFile");
1708
+ }
1709
+ }
1710
+ function Ta(e, t) {
1711
+ let n = new Uint8Array(e), r = (...e) => e.every((e, t) => n[t] === e);
1712
+ if (t === "pdf" && !r(37, 80, 68, 70, 45) || t === "docx" && !r(80, 75, 3, 4) || t === "xlsx" && !r(80, 75, 3, 4) && !r(208, 207, 17, 224, 161, 177, 26, 225)) throw new c("invalidFile");
1713
+ if (r(80, 75, 3, 4) && Da(e, t), [
1714
+ "md",
1715
+ "csv",
1716
+ "txt"
1717
+ ].includes(t)) {
1718
+ if (r(37, 80, 68, 70, 45) || r(80, 75) || r(208, 207, 17, 224)) throw new c("invalidFile");
1719
+ wa(e);
1720
+ }
1721
+ }
1722
+ async function Ea(e, t, n) {
1723
+ let r, i = t.filename ?? "";
1724
+ if (typeof e == "string" && t.type === "md") r = new Blob([e], { type: "text/markdown" });
1725
+ else if (typeof e == "string") {
1726
+ let a = new URL(e, location.href);
1727
+ if (![
1728
+ "http:",
1729
+ "https:",
1730
+ "blob:"
1731
+ ].includes(a.protocol)) throw new c("invalidFile");
1732
+ i ||= a.pathname;
1733
+ let o = await fetch(a, {
1734
+ ...t.fetchInit,
1735
+ signal: n
1736
+ });
1737
+ if (!o.ok) throw new c("fetchFailed", String(o.status));
1738
+ let s = o.headers.get("content-type") ?? "", l = Sa(t.type ?? xa(i, s), t.maxSize), u = o.headers.get("content-length");
1739
+ u && Ca(Number(u), l);
1740
+ let d = o.body?.getReader();
1741
+ if (!d) throw new c("fetchFailed");
1742
+ let f = [], p = 0;
1743
+ try {
1744
+ for (;;) {
1745
+ let { done: e, value: t } = await d.read();
1746
+ if (e) break;
1747
+ p += t.byteLength, Ca(p, l), f.push(t);
1748
+ }
1749
+ } catch (e) {
1750
+ throw await d.cancel(), e;
1751
+ } finally {
1752
+ d.releaseLock();
1753
+ }
1754
+ r = new Blob(f, { type: s });
1755
+ } else r = e instanceof Blob ? e : new Blob([e]);
1756
+ let a = t.type ?? xa(i, r.type);
1757
+ if (a === "unsupported" && r.size <= Sa("txt", t.maxSize)) try {
1758
+ wa(await r.arrayBuffer()), a = "txt";
1759
+ } catch {}
1760
+ return Ca(r.size, Sa(a, t.maxSize)), {
1761
+ blob: r,
1762
+ filename: i,
1763
+ type: a
1764
+ };
1765
+ }
1766
+ function Da(e, t) {
1767
+ let n = new DataView(e), r = -1;
1768
+ for (let t = e.byteLength - 22; t >= Math.max(0, e.byteLength - 65557); t--) if (n.getUint32(t, !0) === 101010256 && t + 22 + n.getUint16(t + 20, !0) === e.byteLength) {
1769
+ r = t;
1770
+ break;
1771
+ }
1772
+ if (r < 0) throw new c("invalidFile");
1773
+ let i = n.getUint16(r + 10, !0), a = n.getUint32(r + 12, !0), o = n.getUint32(r + 16, !0), s = 0;
1774
+ if (i > 1e4 || o + a !== r || n.getUint16(r + 4, !0) !== 0 || n.getUint16(r + 6, !0) !== 0) throw new c("complex");
1775
+ let l = /* @__PURE__ */ new Set();
1776
+ for (let t = 0; t < i; t++) {
1777
+ if (o + 46 > r || n.getUint32(o, !0) !== 33639248) throw new c("invalidFile");
1778
+ let t = n.getUint32(o + 24, !0);
1779
+ if (s += t, t > 20 * 1024 ** 2 || s > 50 * 1024 ** 2 || n.getUint16(o + 8, !0) & 1) throw new c("complex");
1780
+ let i = n.getUint16(o + 28, !0), a = o + 46 + i + n.getUint16(o + 30, !0) + n.getUint16(o + 32, !0);
1781
+ if (a > r) throw new c("invalidFile");
1782
+ l.add(new TextDecoder().decode(new Uint8Array(e, o + 46, i))), o = a;
1783
+ }
1784
+ if (o !== r || !l.has("[Content_Types].xml") || !l.has(t === "docx" ? "word/document.xml" : "xl/workbook.xml")) throw new c("invalidFile");
1785
+ }
1786
+ // packages/ui/src/components/display/doc-viewer/markdown.ts
1787
+ function Oa(e) {
1788
+ return /^(https?:\/\/|mailto:)/i.test(e);
1789
+ }
1790
+ function ka(e = "ca-doc-") {
1791
+ let t = new Jn({
1792
+ html: !1,
1793
+ linkify: !0,
1794
+ typographer: !1,
1795
+ maxNesting: 32
1796
+ }).use(Yn, { slugify: (t) => e + encodeURIComponent(t.toLowerCase().replace(/\s+/g, "-")) }).use(Xn);
1797
+ for (let e of [
1798
+ "tip",
1799
+ "info",
1800
+ "warning",
1801
+ "danger"
1802
+ ]) t.use(Zn, e);
1803
+ return t.block.ruler.before("fence", "ca-math", (e, t, n, r) => {
1804
+ let i = (t) => e.src.slice(e.bMarks[t] + e.tShift[t], e.eMarks[t]);
1805
+ if (e.sCount[t] - e.blkIndent >= 4 || i(t).trim() !== "$$") return !1;
1806
+ let a = t + 1;
1807
+ for (; a < n && i(a).trim() !== "$$";) a++;
1808
+ if (a === n) return !1;
1809
+ if (r) return !0;
1810
+ let o = e.push("fence", "code", 0);
1811
+ return o.info = "math", o.content = Array.from({ length: a - t - 1 }, (e, n) => i(t + n + 1)).join("\n"), e.line = a + 1, !0;
1812
+ }, { alt: [
1813
+ "paragraph",
1814
+ "reference",
1815
+ "blockquote",
1816
+ "list"
1817
+ ] }), t.core.ruler.after("inline", "ca-task-list", (e) => {
1818
+ for (let t = 0; t < e.tokens.length; t++) {
1819
+ let n = e.tokens[t];
1820
+ if (n.type !== "inline" || e.tokens[t - 1]?.type !== "paragraph_open" || e.tokens[t - 2]?.type !== "list_item_open") continue;
1821
+ let r = n.children?.[0], i = r?.content.match(/^\[([ xX])\] /);
1822
+ if (!i || !r || r.type !== "text") continue;
1823
+ r.content = r.content.slice(4);
1824
+ let a = new e.Token("html_inline", "", 0);
1825
+ a.content = `<input type="checkbox" disabled${i[1].toLowerCase() === "x" ? " checked" : ""}>`, n.children.unshift(a);
1826
+ }
1827
+ }), t;
1828
+ }
1829
+ function Aa(e, t = !1) {
1830
+ let n = Qn.sanitize(e, {
1831
+ RETURN_DOM_FRAGMENT: !0,
1832
+ ADD_TAGS: ["input"],
1833
+ ADD_ATTR: ["checked", "disabled"],
1834
+ FORBID_TAGS: [
1835
+ "style",
1836
+ "iframe",
1837
+ "script",
1838
+ "object",
1839
+ "embed",
1840
+ "form"
1841
+ ]
1842
+ });
1843
+ for (let e of n.querySelectorAll("[style]")) {
1844
+ let t = e.getAttribute("style") ?? "";
1845
+ /url\s*\(|expression|@import|[\\<>]/i.test(t) && e.removeAttribute("style");
1846
+ }
1847
+ for (let e of n.querySelectorAll("a")) {
1848
+ let t = e.getAttribute("href") ?? "";
1849
+ !Oa(t) && !(t.startsWith("#") && Array.from(n.querySelectorAll("[id]")).some((e) => "#" + e.id === t)) && e.removeAttribute("href"), e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"), t.startsWith("#") && e.removeAttribute("target");
1850
+ }
1851
+ for (let e of n.querySelectorAll("img")) !t || !/^https?:\/\//i.test(e.getAttribute("src") ?? "") ? e.remove() : (e.removeAttribute("srcset"), e.setAttribute("loading", "lazy"), e.setAttribute("referrerpolicy", "no-referrer"));
1852
+ let r = document.createElement("div");
1853
+ return r.append(n), r.innerHTML;
1854
+ }
1855
+ async function ja(e, t, n) {
1856
+ if (e.split("\n").some((e) => e.length > 1e5) || e.split("\n").length > 2e4) throw new c("complex");
1857
+ let r = ka(n), i = { docId: n }, a = r.parse(e, i), o = [], s = /* @__PURE__ */ new Set(), l = [];
1858
+ for (let e = 0; e < a.length; e++) {
1859
+ let t = a[e];
1860
+ if (t.type === "heading_open" && o.push({
1861
+ id: String(t.attrGet("id") ?? ""),
1862
+ level: Number(t.tag.slice(1)),
1863
+ text: a[e + 1]?.content ?? ""
1864
+ }), t.type !== "fence") continue;
1865
+ let i = t.info.trim().split(/\s/)[0] ?? "";
1866
+ if (i === "math" || i === "latex") try {
1867
+ let e = await u("katex");
1868
+ t.type = "html_block", t.content = e.renderToString(t.content, {
1869
+ displayMode: !0,
1870
+ throwOnError: !1,
1871
+ trust: !1,
1872
+ maxExpand: 1e3,
1873
+ maxSize: 20
1874
+ });
1875
+ } catch {
1876
+ s.add("katex");
1877
+ }
1878
+ else if (i === "mermaid") {
1879
+ let e = n + "diagram-" + l.length;
1880
+ l.push({
1881
+ id: e,
1882
+ source: t.content
1883
+ }), t.type = "html_block", t.content = `<div data-ca-diagram="${e}"><pre>${r.utils.escapeHtml(t.content)}</pre></div>`;
1884
+ } else try {
1885
+ let { codeToHtml: e } = await u("shiki"), n = {
1886
+ lang: i || "text",
1887
+ themes: {
1888
+ light: "github-light",
1889
+ dark: "github-dark"
1890
+ }
1891
+ }, r = await e(t.content, n).catch(() => e(t.content, {
1892
+ ...n,
1893
+ lang: "text"
1894
+ }));
1895
+ t.type = "html_block", t.content = r;
1896
+ } catch {
1897
+ s.add("shiki");
1898
+ }
1899
+ }
1900
+ let d = async (e) => {
1901
+ for (let t of e) if (t.children && await d(t.children), t.type === "text" && /\$[^$]+\$/.test(t.content)) try {
1902
+ let e = await u("katex");
1903
+ t.content = t.content.split(/(\$\$[\s\S]+?\$\$|\$[^$\n]+?\$)/g).map((t) => {
1904
+ if (!t.startsWith("$")) return r.utils.escapeHtml(t);
1905
+ let n = t.startsWith("$$");
1906
+ return e.renderToString(t.slice(n ? 2 : 1, n ? -2 : -1), {
1907
+ displayMode: n,
1908
+ throwOnError: !1,
1909
+ trust: !1,
1910
+ maxExpand: 1e3,
1911
+ maxSize: 20
1912
+ });
1913
+ }).join(""), t.type = "html_inline";
1914
+ } catch {
1915
+ s.add("katex");
1916
+ }
1917
+ };
1918
+ return await d(a), {
1919
+ html: Aa(r.renderer.render(a, r.options, i), t),
1920
+ headings: o,
1921
+ diagrams: l,
1922
+ warnings: [...s]
1923
+ };
1924
+ }
1925
+ function Ma(e) {
1926
+ let t = Qn.sanitize(e, {
1927
+ RETURN_DOM_FRAGMENT: !0,
1928
+ USE_PROFILES: {
1929
+ svg: !0,
1930
+ svgFilters: !0
1931
+ },
1932
+ FORBID_TAGS: [
1933
+ "foreignObject",
1934
+ "image",
1935
+ "a"
1936
+ ],
1937
+ FORBID_ATTR: ["href", "xlink:href"]
1938
+ });
1939
+ for (let e of t.querySelectorAll("*")) for (let t of Array.from(e.attributes)) /url\s*\(\s*['"]?(?!#)|[\\<>]/i.test(t.value) && e.removeAttribute(t.name);
1940
+ for (let e of t.querySelectorAll("[style], style")) {
1941
+ let t = e.tagName.toLowerCase() === "style" ? e.textContent ?? "" : e.getAttribute("style") ?? "";
1942
+ /@import|[\\<>]|url\s*\(\s*['"]?(?!#)/i.test(t) && (e.tagName.toLowerCase() === "style" ? e.remove() : e.removeAttribute("style"));
1943
+ }
1944
+ let n = document.createElement("div");
1945
+ return n.append(t), n.innerHTML;
1946
+ }
1947
+ // packages/ui/src/components/display/doc-viewer/sheets.ts
1948
+ function Na(e, t) {
1949
+ let n = e["!ref"] ?? "A1", r = (e) => {
1950
+ let t = /^([A-Z]+)([1-9]\d*)$/.exec(e);
1951
+ if (!t) throw new c("invalidFile");
1952
+ let n = 0;
1953
+ for (let e of t[1]) n = n * 26 + e.charCodeAt(0) - 64;
1954
+ return {
1955
+ r: Number(t[2]) - 1,
1956
+ c: n - 1
1957
+ };
1958
+ }, [i, a = i] = n.split(":"), o = r(i), s = r(a);
1959
+ if (![
1960
+ o.r,
1961
+ o.c,
1962
+ s.r,
1963
+ s.c
1964
+ ].every(Number.isSafeInteger) || Math.max(o.c, s.c) > 16383) throw new c("invalidFile");
1965
+ let l = s.c - o.c + 1;
1966
+ if (l > 256 || l < 1 || s.r < o.r || s.r > 1048575) throw new c("complex");
1967
+ let u = Math.min(t, Math.floor(1e5 / l), s.r - o.r + 1), d = e["!merges"] ?? [];
1968
+ if (d.length > 1e4) throw new c("complex");
1969
+ let f = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), m = 0;
1970
+ for (let e of d) {
1971
+ let t = Math.max(o.r, e.s.r), n = Math.min(o.r + u - 1, e.e.r), r = Math.max(o.c, e.s.c), i = Math.min(s.c, e.e.c);
1972
+ if (!(t > n || r > i)) {
1973
+ if (m += (n - t + 1) * (i - r + 1), m > 1e5) throw new c("complex");
1974
+ p.set(`${t},${r}`, {
1975
+ colspan: i - r + 1,
1976
+ rowspan: n - t + 1
1977
+ });
1978
+ for (let e = t; e <= n; e++) for (let n = r; n <= i; n++) (e !== t || n !== r) && f.add(`${e},${n}`);
1979
+ }
1980
+ }
1981
+ let h = (e, t) => {
1982
+ let n = "";
1983
+ for (let e = t + 1; e; e = Math.floor((e - 1) / 26)) n = String.fromCharCode(65 + (e - 1) % 26) + n;
1984
+ return n + (e + 1);
1985
+ }, g = [];
1986
+ for (let t = o.r; t < o.r + u; t++) {
1987
+ let n = [];
1988
+ for (let r = o.c; r <= s.c; r++) {
1989
+ if (f.has(`${t},${r}`)) continue;
1990
+ let i = e[h(t, r)];
1991
+ n.push({
1992
+ text: i?.v == null ? "" : String(i.w ?? i.v),
1993
+ ...p.get(`${t},${r}`) ?? {
1994
+ colspan: 1,
1995
+ rowspan: 1
1996
+ }
1997
+ });
1998
+ }
1999
+ g.push(n);
2000
+ }
2001
+ return {
2002
+ rows: g,
2003
+ shown: u,
2004
+ total: s.r - o.r + 1,
2005
+ capped: u < Math.min(t, s.r - o.r + 1)
2006
+ };
2007
+ }
2008
+ // packages/ui/src/components/display/doc-viewer/CaDocViewer.vue?vue&type=script&setup=true&lang.ts
2009
+ var Pa = ["aria-busy"], Fa = { class: "ca-doc-controls" }, Ia = { class: "ca-doc-filename" }, La = {
2010
+ key: 1,
2011
+ class: "ca-doc-state",
2012
+ role: "alert"
2013
+ }, Ra = {
2014
+ key: 0,
2015
+ class: "ca-doc-state"
2016
+ }, za = {
2017
+ key: 1,
2018
+ class: "ca-doc-state"
2019
+ }, Ba = {
2020
+ key: 2,
2021
+ class: "ca-doc-markdown-layout"
2022
+ }, Va = ["aria-label"], Ha = ["href", "onClick"], Ua = ["innerHTML"], Wa = {
2023
+ key: 3,
2024
+ class: "ca-doc-state"
2025
+ }, Ga = {
2026
+ key: 4,
2027
+ class: "ca-doc-text"
2028
+ }, Ka = ["aria-label"], qa = ["aria-label"], Ja = { key: 0 }, Ya = { key: 1 }, Xa = /* @__PURE__ */ V({
2029
+ __name: "CaDocViewer",
2030
+ props: {
2031
+ source: {},
2032
+ filename: {},
2033
+ type: {},
2034
+ loading: { type: Boolean },
2035
+ error: {},
2036
+ maxSize: {},
2037
+ toc: {
2038
+ type: Boolean,
2039
+ default: !0
2040
+ },
2041
+ allowImages: {
2042
+ type: Boolean,
2043
+ default: !1
2044
+ },
2045
+ converter: {},
2046
+ fetchInit: {},
2047
+ textLayer: { type: Boolean }
2048
+ },
2049
+ emits: [
2050
+ "load",
2051
+ "error",
2052
+ "retry",
2053
+ "download"
2054
+ ],
2055
+ setup(e, { emit: t }) {
2056
+ let n = Lt(() => import("./CaDocPdf-BMSfqmuh.js")), i = Lt(() => import("./CaDocWord-BYX69Eoh.js")), a = e, o = t, l = s(), d = "ca-doc-" + Jt().replace(/[^\w-]/g, "") + "-", f = G(), p = G(), m = G(!1), h = G(""), g = G([]), _ = G(""), v = G(""), y = G([]), b = G("unsupported"), x = qt(), S = qt(), C = qt(), w = G(""), T = G(2e3), E = G(0), D = P(() => a.filename ?? "document"), O = P(() => C.value && w.value ? Na(C.value.Sheets[w.value], T.value) : void 0), ee = P(() => a.loading || m.value), k = P(() => a.error || h.value), A = 0, j;
2057
+ function M(e) {
2058
+ let t = e instanceof Error ? e : Error(String(e));
2059
+ h.value = t instanceof c ? l(`campus.doc.${t.key}`, { name: t.detail }) : l("campus.doc.renderFailed"), m.value = !1, o("error", t);
2060
+ }
2061
+ function te() {
2062
+ m.value = !1, o("load", {
2063
+ type: b.value,
2064
+ filename: D.value
2065
+ });
2066
+ }
2067
+ function ne() {
2068
+ o("retry"), E.value++;
2069
+ }
2070
+ function re(e) {
2071
+ let t = Array.from(p.value?.querySelectorAll("[id]") ?? []).find((t) => t.id === e);
2072
+ t?.scrollIntoView({ block: "start" }), t?.setAttribute("tabindex", "-1"), t?.focus({ preventScroll: !0 });
2073
+ }
2074
+ function ie(e) {
2075
+ let t = e.target.closest("a");
2076
+ t?.getAttribute("href")?.startsWith("#") && (e.preventDefault(), re(t.getAttribute("href").slice(1)));
2077
+ }
2078
+ async function ae() {
2079
+ let e = new Event("download", { cancelable: !0 });
2080
+ if (o("download", {
2081
+ source: a.source,
2082
+ filename: D.value
2083
+ }, e), e.defaultPrevented) return;
2084
+ let t;
2085
+ try {
2086
+ if (S.value) t = URL.createObjectURL(S.value);
2087
+ else if (typeof a.source == "string" && a.type !== "md") {
2088
+ let e = new URL(a.source, location.href);
2089
+ [
2090
+ "http:",
2091
+ "https:",
2092
+ "blob:"
2093
+ ].includes(e.protocol) && (t = e.href);
2094
+ }
2095
+ if (!t) return;
2096
+ let e = document.createElement("a");
2097
+ if (e.href = t, e.download = D.value, e.rel = "noopener noreferrer", e.target = "_blank", e.click(), S.value) {
2098
+ let e = t;
2099
+ setTimeout(() => URL.revokeObjectURL(e), 1e3);
2100
+ }
2101
+ } catch (e) {
2102
+ M(e);
2103
+ }
2104
+ }
2105
+ return Zt(() => [
2106
+ a.source,
2107
+ a.filename,
2108
+ a.type,
2109
+ a.maxSize,
2110
+ a.allowImages,
2111
+ a.converter,
2112
+ a.fetchInit,
2113
+ E.value
2114
+ ], async () => {
2115
+ let e = ++A;
2116
+ j?.abort(), j = new AbortController();
2117
+ let t = j.signal, n = setTimeout(() => {
2118
+ e === A && (j?.abort(), A++, M(new c("timeout")));
2119
+ }, 3e4);
2120
+ if (h.value = "", g.value = [], _.value = "", v.value = "", y.value = [], x.value = void 0, S.value = void 0, C.value = void 0, w.value = "", T.value = 2e3, a.source instanceof Blob ? S.value = a.source : (a.source instanceof ArrayBuffer || a.type === "md" && a.source !== void 0) && (S.value = new Blob([a.source])), a.source === void 0) m.value = !1, clearTimeout(n);
2121
+ else {
2122
+ m.value = !0;
2123
+ try {
2124
+ let n = await Ea(a.source, a, t);
2125
+ if (t.aborted || e !== A) return;
2126
+ if (S.value = n.blob, n.type === "legacy" && a.converter) {
2127
+ let r = await a.converter({
2128
+ blob: n.blob,
2129
+ filename: D.value
2130
+ });
2131
+ if (t.aborted || e !== A) return;
2132
+ let i = xa("file." + r.type, r.type);
2133
+ Ca(r.blob.size, Sa(i, a.maxSize)), n = {
2134
+ blob: r.blob,
2135
+ filename: n.filename,
2136
+ type: i
2137
+ };
2138
+ }
2139
+ if (b.value = n.type, n.type === "legacy" || n.type === "unsupported") {
2140
+ m.value = !1;
2141
+ return;
2142
+ }
2143
+ let r = await n.blob.arrayBuffer();
2144
+ if (Ta(r, n.type), t.aborted || e !== A) return;
2145
+ if (n.type === "md") {
2146
+ let n = await ja(wa(r), a.allowImages, d);
2147
+ if (t.aborted || e !== A) return;
2148
+ _.value = n.html, y.value = n.headings, g.value = n.warnings, await zt();
2149
+ for (let r of n.diagrams) {
2150
+ let n;
2151
+ try {
2152
+ n = (await u("mermaid")).default;
2153
+ } catch {
2154
+ g.value.push("mermaid");
2155
+ continue;
2156
+ }
2157
+ if (t.aborted || e !== A) return;
2158
+ n.initialize({
2159
+ startOnLoad: !1,
2160
+ securityLevel: "strict",
2161
+ maxTextSize: 5e4,
2162
+ suppressErrorRendering: !0
2163
+ });
2164
+ try {
2165
+ let i = await n.render(r.id, r.source);
2166
+ if (t.aborted || e !== A) return;
2167
+ let a = Array.from(p.value?.querySelectorAll("[data-ca-diagram]") ?? []).find((e) => e.dataset.caDiagram === r.id);
2168
+ a && (a.innerHTML = Ma(i.svg));
2169
+ } catch {
2170
+ throw new c("diagramFailed");
2171
+ }
2172
+ }
2173
+ } else if (n.type === "txt") v.value = wa(r);
2174
+ else if (n.type === "xlsx" || n.type === "csv") {
2175
+ let i = await u("xlsx");
2176
+ if (t.aborted || e !== A) return;
2177
+ let a = i.read(n.type === "csv" ? wa(r) : r, {
2178
+ type: n.type === "csv" ? "string" : "array",
2179
+ raw: !0,
2180
+ cellHTML: !1,
2181
+ cellFormula: !1,
2182
+ bookVBA: !1
2183
+ });
2184
+ if (!a.SheetNames.length) throw new c("invalidFile");
2185
+ for (let e of a.SheetNames) Na(a.Sheets[e], 1);
2186
+ C.value = a, w.value = a.SheetNames[0];
2187
+ } else {
2188
+ x.value = r;
2189
+ return;
2190
+ }
2191
+ te();
2192
+ } catch (n) {
2193
+ e === A && M(t.aborted ? new c("timeout") : n);
2194
+ } finally {
2195
+ clearTimeout(n);
2196
+ }
2197
+ }
2198
+ }, { immediate: !0 }), Zt(w, () => {
2199
+ T.value = 2e3;
2200
+ }), Ht(() => {
2201
+ A++, j?.abort();
2202
+ }), (t, a) => (W(), L("section", {
2203
+ ref_key: "host",
2204
+ ref: f,
2205
+ class: "ca-doc-viewer",
2206
+ "aria-busy": ee.value
2207
+ }, [
2208
+ R("div", Fa, [q(t.$slots, "toolbar", {}, () => [R("span", Ia, J(D.value), 1)]), B(Y(r), {
2209
+ disabled: e.source === void 0,
2210
+ onClick: ae
2211
+ }, {
2212
+ default: X(() => [z(J(Y(l)("campus.doc.download")), 1)]),
2213
+ _: 1
2214
+ }, 8, ["disabled"])]),
2215
+ ee.value ? (W(), F(Y(jo), {
2216
+ key: 0,
2217
+ animated: "",
2218
+ rows: 5,
2219
+ "aria-label": Y(l)("campus.common.loading")
2220
+ }, null, 8, ["aria-label"])) : I("v-if", !0),
2221
+ k.value ? (W(), L("div", La, [R("p", null, J(k.value), 1), B(Y(r), { onClick: ne }, {
2222
+ default: X(() => [z(J(Y(l)("campus.doc.retry")), 1)]),
2223
+ _: 1
2224
+ })])) : (W(), L(N, { key: 2 }, [
2225
+ (W(!0), L(N, null, K([...new Set(g.value)], (e) => (W(), L("p", {
2226
+ key: e,
2227
+ role: "status"
2228
+ }, J(Y(l)("campus.doc.dependency", { name: e })), 1))), 128)),
2229
+ e.source === void 0 ? (W(), L("div", Ra, [q(t.$slots, "empty", {}, () => [z(J(Y(l)("campus.doc.empty")), 1)])])) : !ee.value && (b.value === "legacy" || b.value === "unsupported") ? (W(), L("div", za, [q(t.$slots, "unsupported", { type: b.value }, () => [z(J(Y(l)(b.value === "legacy" ? "campus.doc.convert" : "campus.doc.unsupported")), 1)])])) : I("v-if", !0),
2230
+ b.value === "md" && _.value ? (W(), L("div", Ba, [e.toc && y.value.length ? (W(), L("nav", {
2231
+ key: 0,
2232
+ class: "ca-doc-toc",
2233
+ "aria-label": Y(l)("campus.doc.toc")
2234
+ }, [(W(!0), L(N, null, K(y.value, (e) => (W(), L("a", {
2235
+ key: e.id,
2236
+ href: "#" + e.id,
2237
+ style: U({ paddingInlineStart: (e.level - 1) * 10 + "px" }),
2238
+ onClick: $t((t) => re(e.id), ["prevent"])
2239
+ }, J(e.text), 13, Ha))), 128))], 8, Va)) : I("v-if", !0), R("article", {
2240
+ ref_key: "body",
2241
+ ref: p,
2242
+ class: "ca-doc-markdown",
2243
+ onClick: ie,
2244
+ innerHTML: _.value
2245
+ }, null, 8, Ua)])) : b.value === "md" && !ee.value ? (W(), L("div", Wa, J(Y(l)("campus.doc.empty")), 1)) : b.value === "txt" ? (W(), L("pre", Ga, J(v.value), 1)) : I("v-if", !0),
2246
+ C.value && O.value ? (W(), L(N, { key: 5 }, [
2247
+ R("div", {
2248
+ class: "ca-doc-controls",
2249
+ role: "tablist",
2250
+ "aria-label": Y(l)("campus.doc.sheets")
2251
+ }, [(W(!0), L(N, null, K(C.value.SheetNames, (e) => (W(), F(Y(r), {
2252
+ key: e,
2253
+ role: "tab",
2254
+ "aria-selected": w.value === e,
2255
+ type: w.value === e ? "primary" : "default",
2256
+ onClick: (t) => w.value = e
2257
+ }, {
2258
+ default: X(() => [z(J(e), 1)]),
2259
+ _: 2
2260
+ }, 1032, [
2261
+ "aria-selected",
2262
+ "type",
2263
+ "onClick"
2264
+ ]))), 128))], 8, Ka),
2265
+ R("div", {
2266
+ class: "ca-doc-sheet",
2267
+ role: "region",
2268
+ "aria-label": w.value,
2269
+ tabindex: "0"
2270
+ }, [R("table", null, [R("tbody", null, [(W(!0), L(N, null, K(O.value.rows, (e, t) => (W(), L("tr", { key: t }, [(W(!0), L(N, null, K(e, (e, n) => (W(), F(Kt(t === 0 ? "th" : "td"), {
2271
+ key: n,
2272
+ colspan: e.colspan,
2273
+ rowspan: e.rowspan
2274
+ }, {
2275
+ default: X(() => [z(J(e.text), 1)]),
2276
+ _: 2
2277
+ }, 1032, ["colspan", "rowspan"]))), 128))]))), 128))])])], 8, qa),
2278
+ O.value.shown < O.value.total ? (W(), L("p", Ja, [z(J(Y(l)("campus.doc.rows", {
2279
+ shown: O.value.shown,
2280
+ total: O.value.total
2281
+ })) + " ", 1), O.value.capped ? (W(), L("span", Ya, J(Y(l)("campus.doc.complex")), 1)) : (W(), F(Y(r), {
2282
+ key: 0,
2283
+ onClick: a[0] ||= (e) => T.value += 2e3
2284
+ }, {
2285
+ default: X(() => [z(J(Y(l)("campus.doc.more")), 1)]),
2286
+ _: 1
2287
+ }))])) : I("v-if", !0)
2288
+ ], 64)) : I("v-if", !0),
2289
+ b.value === "pdf" && x.value ? (W(), F(Y(n), {
2290
+ key: Y(A),
2291
+ data: x.value,
2292
+ "text-layer": e.textLayer,
2293
+ onLoad: te,
2294
+ onError: M
2295
+ }, null, 8, ["data", "text-layer"])) : I("v-if", !0),
2296
+ b.value === "docx" && x.value ? (W(), F(Y(i), {
2297
+ key: Y(A),
2298
+ data: x.value,
2299
+ onLoad: te,
2300
+ onError: M
2301
+ }, null, 8, ["data"])) : I("v-if", !0)
2302
+ ], 64))
2303
+ ], 8, Pa));
2304
+ }
2305
+ }), Za = e(me), Qa = e(ge), $a = e(Ge), eo = e(We), to = e(Tt), no = {
2306
+ CaPopover: $a,
2307
+ CaPopconfirm: eo,
2308
+ CaTooltip: to,
2309
+ CaDialog: Za,
2310
+ CaDrawer: Qa
2311
+ }, ro = {
2312
+ key: 0,
2313
+ class: "ca-doc-meta"
2314
+ }, io = { class: "ca-doc-dialog-content" }, ao = /* @__PURE__ */ V({
2315
+ inheritAttrs: !1,
2316
+ __name: "CaDocDialog",
2317
+ props: {
2318
+ source: {},
2319
+ filename: {},
2320
+ type: {},
2321
+ loading: { type: Boolean },
2322
+ error: {},
2323
+ maxSize: {},
2324
+ toc: { type: Boolean },
2325
+ allowImages: { type: Boolean },
2326
+ converter: { type: Function },
2327
+ fetchInit: {},
2328
+ modelValue: { type: Boolean },
2329
+ title: {},
2330
+ meta: {},
2331
+ textLayer: { type: Boolean }
2332
+ },
2333
+ emits: ["update:modelValue"],
2334
+ setup(e, { emit: t }) {
2335
+ let n = e, i = t, a = s(), o = G(!1);
2336
+ try {
2337
+ o.value = localStorage.getItem("ca-doc-expanded") === "true";
2338
+ } catch {}
2339
+ let c = P(() => {
2340
+ let { modelValue: e, title: t, meta: r, ...i } = n;
2341
+ return i;
2342
+ });
2343
+ function l() {
2344
+ o.value = !o.value;
2345
+ try {
2346
+ localStorage.setItem("ca-doc-expanded", String(o.value));
2347
+ } catch {}
2348
+ }
2349
+ return (t, n) => (W(), F(Y(Za), {
2350
+ "model-value": e.modelValue,
2351
+ title: e.title || e.filename || Y(a)("campus.doc.title"),
2352
+ width: "min(900px, 90vw)",
2353
+ fullscreen: o.value,
2354
+ class: "ca-doc-dialog",
2355
+ "destroy-on-close": "",
2356
+ "close-on-click-modal": !1,
2357
+ "lock-scroll": !0,
2358
+ "close-on-press-escape": !0,
2359
+ "onUpdate:modelValue": n[1] ||= (e) => i("update:modelValue", e)
2360
+ }, {
2361
+ header: X(() => [R("div", {
2362
+ class: "ca-doc-dialog-heading",
2363
+ onDblclick: l
2364
+ }, [R("span", null, J(e.title || e.filename || Y(a)("campus.doc.title")), 1), B(Y(r), {
2365
+ "aria-pressed": o.value,
2366
+ onDblclick: n[0] ||= $t(() => {}, ["stop"]),
2367
+ onClick: l
2368
+ }, {
2369
+ default: X(() => [z(J(Y(a)(o.value ? "campus.doc.restore" : "campus.doc.expand")), 1)]),
2370
+ _: 1
2371
+ }, 8, ["aria-pressed"])], 32)]),
2372
+ default: X(() => [e.meta ? (W(), L("dl", ro, [(W(!0), L(N, null, K(e.meta, (e, t) => (W(), L(N, { key: t }, [R("dt", null, J(t), 1), R("dd", null, J(e), 1)], 64))), 128))])) : I("v-if", !0), R("div", io, [B(Xa, Bt(Rt({
2373
+ ...c.value,
2374
+ ...t.$attrs
2375
+ })), It({ _: 2 }, [K(t.$slots, (e, n) => ({
2376
+ name: n,
2377
+ fn: X((e) => [q(t.$slots, n, Bt(Rt(e || {})))])
2378
+ }))]), 1040)])]),
2379
+ _: 3
2380
+ }, 8, [
2381
+ "model-value",
2382
+ "title",
2383
+ "fullscreen"
2384
+ ]));
2385
+ }
2386
+ }), oo = { class: "ca-stat ca-card" }, so = { class: "ca-stat__head" }, co = { class: "ca-stat__title" }, lo = {
1692
2387
  key: 0,
1693
2388
  class: "ca-stat__tag"
1694
- }, pa = { class: "ca-stat__value" }, ma = {
2389
+ }, uo = { class: "ca-stat__value" }, fo = {
1695
2390
  key: 0,
1696
2391
  class: "ca-stat__hint"
1697
- }, ha = /*#__PURE__*/ Vn(/* @__PURE__ */ L({
2392
+ }, po = /*#__PURE__*/ l(/* @__PURE__ */ V({
1698
2393
  __name: "CaStatCard",
1699
2394
  props: {
1700
2395
  title: {},
@@ -1704,79 +2399,81 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1704
2399
  tag: {}
1705
2400
  },
1706
2401
  setup(e) {
1707
- let t = e, n = A(() => t.trend === void 0 ? "" : `${t.trend >= 0 ? "↑" : "↓"} ${Math.abs(t.trend)}%`);
1708
- return (t, r) => (B(), N("div", la, [
1709
- P("div", ua, [P("span", da, W(e.title), 1), e.tag ? (B(), N("span", fa, W(e.tag), 1)) : M("v-if", !0)]),
1710
- P("div", pa, [F(W(e.value) + " ", 1), n.value ? (B(), N("span", {
2402
+ let t = e, n = P(() => t.trend === void 0 ? "" : `${t.trend >= 0 ? "↑" : "↓"} ${Math.abs(t.trend)}%`);
2403
+ return (t, r) => (W(), L("div", oo, [
2404
+ R("div", so, [R("span", co, J(e.title), 1), e.tag ? (W(), L("span", lo, J(e.tag), 1)) : I("v-if", !0)]),
2405
+ R("div", uo, [z(J(e.value) + " ", 1), n.value ? (W(), L("span", {
1711
2406
  key: 0,
1712
- class: R(["ca-stat__trend", e.trend >= 0 ? "is-up" : "is-down"])
1713
- }, W(n.value), 3)) : M("v-if", !0)]),
1714
- e.hint || t.$slots.default ? (B(), N("div", ma, [U(t.$slots, "default", {}, () => [F(W(e.hint), 1)], !0)])) : M("v-if", !0)
2407
+ class: H(["ca-stat__trend", e.trend >= 0 ? "is-up" : "is-down"])
2408
+ }, J(n.value), 3)) : I("v-if", !0)]),
2409
+ e.hint || t.$slots.default ? (W(), L("div", fo, [q(t.$slots, "default", {}, () => [z(J(e.hint), 1)], !0)])) : I("v-if", !0)
1715
2410
  ]));
1716
2411
  }
1717
- }), [["__scopeId", "data-v-94d16941"]]), ga = /* @__PURE__ */ L({
2412
+ }), [["__scopeId", "data-v-94d16941"]]), mo = /* @__PURE__ */ V({
1718
2413
  __name: "CaStatusTag",
1719
2414
  props: {
1720
2415
  value: {},
1721
2416
  map: {}
1722
2417
  },
1723
2418
  setup(e) {
1724
- let t = e, n = A(() => t.map[String(t.value)] ?? {
2419
+ let t = e, n = P(() => t.map[String(t.value)] ?? {
1725
2420
  label: String(t.value),
1726
2421
  type: "info"
1727
2422
  });
1728
- return (e, t) => (B(), j(G(pt), {
2423
+ return (e, t) => (W(), F(Y(yt), {
1729
2424
  type: n.value.type ?? "info",
1730
2425
  effect: "light",
1731
2426
  size: "small"
1732
2427
  }, {
1733
- default: K(() => [F(W(n.value.label), 1)]),
2428
+ default: X(() => [z(J(n.value.label), 1)]),
1734
2429
  _: 1
1735
2430
  }, 8, ["type"]));
1736
2431
  }
1737
- }), _a = q(s), va = q(c), ya = q(u), ba = q(h), xa = q(_), Sa = q(v), Ca = q(T), wa = q(te), Ta = q(oe), Ea = q(se), Da = q(me), Oa = q(be), ka = q(xe), Aa = q(Le), ja = q(Be), Ma = q(Ge), Na = q(Ze), Pa = q(Qe), Fa = q(_t), Ia = q(vt), La = q(bt), Ra = q(xt), za = q(Ct), Ba = q(Tt), Va = q(Je), Ha = q(rt), Ua = q(O), Wa = q(x), Ga = {
1738
- CaAvatar: _a,
1739
- CaAvatarGroup: va,
1740
- CaBadge: ya,
1741
- CaCalendar: ba,
1742
- CaCarousel: xa,
1743
- CaCarouselItem: Sa,
1744
- CaCollapse: Ca,
1745
- CaCollapseItem: wa,
1746
- CaDescriptions: Ta,
1747
- CaDescriptionsItem: Ea,
1748
- CaEmpty: Da,
1749
- CaImage: Oa,
1750
- CaImageViewer: ka,
1751
- CaPagination: Aa,
1752
- CaProgress: ja,
1753
- CaResult: Ma,
1754
- CaSkeleton: Na,
1755
- CaSkeletonItem: Pa,
1756
- CaTimeline: Fa,
1757
- CaTimelineItem: Ia,
1758
- CaTour: La,
1759
- CaTourStep: Ra,
1760
- CaTree: za,
1761
- CaTreeV2: Ba,
1762
- CaSegmented: Va,
1763
- CaStatistic: Ha,
1764
- CaCountdown: Ua,
1765
- CaCheckTag: Wa,
1766
- CaStatCard: ha,
1767
- CaStatusTag: ga
1768
- }, Ka = q(D), qa = q(ve), Ja = q(i), Ya = q(ke), Xa = q(he), Za = q(Ke), Qa = q(w), $a = q(et), eo = q(tt), to = q(nt), no = {
1769
- CaContainer: Ka,
1770
- CaHeader: qa,
1771
- CaAside: Ja,
1772
- CaMain: Ya,
1773
- CaFooter: Xa,
1774
- CaRow: Za,
1775
- CaCol: Qa,
1776
- CaSpace: $a,
1777
- CaSplitter: eo,
1778
- CaSplitterPanel: to
1779
- }, ro = /* @__PURE__ */ L({
2432
+ }), ho = e(v), go = e(y), _o = e(x), vo = e(T), yo = e(D), bo = e(O), xo = e(re), So = e(ie), Co = e(fe), wo = e(pe), To = e(be), Eo = e(Ee), Do = e(De), Oo = e(Ue), ko = e(Ke), Ao = e(Ze), jo = e(rt), Mo = e(it), No = e(Ct), Po = e(wt), Fo = e(Et), Io = e(Dt), Lo = e(kt), Ro = e(jt), zo = e(et), Bo = e(lt), Vo = e(le), Ho = e(A), Uo = {
2433
+ CaAvatar: ho,
2434
+ CaAvatarGroup: go,
2435
+ CaBadge: _o,
2436
+ CaCalendar: vo,
2437
+ CaCarousel: yo,
2438
+ CaCarouselItem: bo,
2439
+ CaCollapse: xo,
2440
+ CaCollapseItem: So,
2441
+ CaDescriptions: Co,
2442
+ CaDescriptionsItem: wo,
2443
+ CaEmpty: To,
2444
+ CaImage: Eo,
2445
+ CaImageViewer: Do,
2446
+ CaPagination: Oo,
2447
+ CaProgress: ko,
2448
+ CaResult: Ao,
2449
+ CaSkeleton: jo,
2450
+ CaSkeletonItem: Mo,
2451
+ CaTimeline: No,
2452
+ CaTimelineItem: Po,
2453
+ CaTour: Fo,
2454
+ CaTourStep: Io,
2455
+ CaTree: Lo,
2456
+ CaTreeV2: Ro,
2457
+ CaSegmented: zo,
2458
+ CaStatistic: Bo,
2459
+ CaCountdown: Vo,
2460
+ CaCheckTag: Ho,
2461
+ CaDocViewer: Xa,
2462
+ CaDocDialog: ao,
2463
+ CaStatCard: po,
2464
+ CaStatusTag: mo
2465
+ }, Wo = e(ce), Go = e(we), Ko = e(h), qo = e(Fe), Jo = e(xe), Yo = e(Qe), Xo = e(ne), Zo = e(ot), Qo = e(st), $o = e(ct), es = {
2466
+ CaContainer: Wo,
2467
+ CaHeader: Go,
2468
+ CaAside: Ko,
2469
+ CaMain: qo,
2470
+ CaFooter: Jo,
2471
+ CaRow: Yo,
2472
+ CaCol: Xo,
2473
+ CaSpace: Zo,
2474
+ CaSplitter: Qo,
2475
+ CaSplitterPanel: $o
2476
+ }, ts = /* @__PURE__ */ V({
1780
2477
  __name: "CaSchemaForm",
1781
2478
  props: {
1782
2479
  fields: {},
@@ -1787,14 +2484,14 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1787
2484
  },
1788
2485
  emits: ["update:modelValue", "submit"],
1789
2486
  setup(e, { expose: t, emit: n }) {
1790
- let r = e, i = n, a = J(), o = V();
1791
- function s(e, t) {
2487
+ let r = e, i = n, a = s(), o = G();
2488
+ function c(e, t) {
1792
2489
  i("update:modelValue", {
1793
2490
  ...r.modelValue,
1794
2491
  [e]: t
1795
2492
  });
1796
2493
  }
1797
- let c = A(() => {
2494
+ let l = P(() => {
1798
2495
  let e = {};
1799
2496
  for (let t of r.fields) {
1800
2497
  if (!t.required || t.type === "switch") continue;
@@ -1811,7 +2508,7 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1811
2508
  }
1812
2509
  return e;
1813
2510
  });
1814
- async function l() {
2511
+ async function u() {
1815
2512
  try {
1816
2513
  await o.value?.validate();
1817
2514
  } catch {
@@ -1819,34 +2516,34 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1819
2516
  }
1820
2517
  i("submit", r.modelValue);
1821
2518
  }
1822
- function u() {
2519
+ function d() {
1823
2520
  o.value?.resetFields();
1824
2521
  }
1825
2522
  return t({
1826
2523
  validate: () => o.value?.validate(),
1827
- reset: u
1828
- }), (t, n) => (B(), j(G(ge), {
2524
+ reset: d
2525
+ }), (t, n) => (W(), F(Y(Se), {
1829
2526
  ref_key: "formRef",
1830
2527
  ref: o,
1831
2528
  model: e.modelValue,
1832
- rules: c.value,
2529
+ rules: l.value,
1833
2530
  "label-width": e.labelWidth,
1834
- onSubmit: Ht(l, ["prevent"])
2531
+ onSubmit: $t(u, ["prevent"])
1835
2532
  }, {
1836
- default: K(() => [(B(!0), N(k, null, H(e.fields, (t) => (B(), j(G(_e), {
2533
+ default: X(() => [(W(!0), L(N, null, K(e.fields, (t) => (W(), F(Y(Ce), {
1837
2534
  key: t.prop,
1838
2535
  label: t.label,
1839
2536
  prop: t.prop
1840
2537
  }, {
1841
- default: K(() => [t.type === "select" ? (B(), j(G(Ye), {
2538
+ default: X(() => [t.type === "select" ? (W(), F(Y(tt), {
1842
2539
  key: 0,
1843
2540
  "model-value": e.modelValue[t.prop],
1844
2541
  placeholder: t.placeholder,
1845
2542
  clearable: "",
1846
2543
  style: { width: "100%" },
1847
- "onUpdate:modelValue": (e) => s(t.prop, e)
2544
+ "onUpdate:modelValue": (e) => c(t.prop, e)
1848
2545
  }, {
1849
- default: K(() => [(B(!0), N(k, null, H(t.options, (e) => (B(), j(G(Pe), {
2546
+ default: X(() => [(W(!0), L(N, null, K(t.options, (e) => (W(), F(Y(Be), {
1850
2547
  key: String(e.value),
1851
2548
  label: e.label,
1852
2549
  value: e.value
@@ -1856,41 +2553,41 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1856
2553
  "model-value",
1857
2554
  "placeholder",
1858
2555
  "onUpdate:modelValue"
1859
- ])) : t.type === "switch" ? (B(), j(G(st), {
2556
+ ])) : t.type === "switch" ? (W(), F(Y(pt), {
1860
2557
  key: 1,
1861
2558
  "model-value": e.modelValue[t.prop],
1862
- "onUpdate:modelValue": (e) => s(t.prop, e)
1863
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : t.type === "date" ? (B(), j(G(ie), {
2559
+ "onUpdate:modelValue": (e) => c(t.prop, e)
2560
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : t.type === "date" ? (W(), F(Y(ue), {
1864
2561
  key: 2,
1865
2562
  "model-value": e.modelValue[t.prop],
1866
2563
  type: "date",
1867
2564
  "value-format": "YYYY-MM-DD",
1868
2565
  placeholder: t.placeholder,
1869
2566
  style: { width: "100%" },
1870
- "onUpdate:modelValue": (e) => s(t.prop, e)
2567
+ "onUpdate:modelValue": (e) => c(t.prop, e)
1871
2568
  }, null, 8, [
1872
2569
  "model-value",
1873
2570
  "placeholder",
1874
2571
  "onUpdate:modelValue"
1875
- ])) : t.type === "number" ? (B(), j(G(we), {
2572
+ ])) : t.type === "number" ? (W(), F(Y(Ae), {
1876
2573
  key: 3,
1877
2574
  "model-value": e.modelValue[t.prop],
1878
2575
  min: t.min,
1879
2576
  max: t.max,
1880
- "onUpdate:modelValue": (e) => s(t.prop, e)
2577
+ "onUpdate:modelValue": (e) => c(t.prop, e)
1881
2578
  }, null, 8, [
1882
2579
  "model-value",
1883
2580
  "min",
1884
2581
  "max",
1885
2582
  "onUpdate:modelValue"
1886
- ])) : (B(), j(G(Ce), {
2583
+ ])) : (W(), F(Y(ke), {
1887
2584
  key: 4,
1888
2585
  "model-value": e.modelValue[t.prop],
1889
2586
  type: t.type === "textarea" ? "textarea" : "text",
1890
2587
  rows: 3,
1891
2588
  placeholder: t.placeholder,
1892
2589
  clearable: "",
1893
- "onUpdate:modelValue": (e) => s(t.prop, e)
2590
+ "onUpdate:modelValue": (e) => c(t.prop, e)
1894
2591
  }, null, 8, [
1895
2592
  "model-value",
1896
2593
  "type",
@@ -1898,15 +2595,15 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1898
2595
  "onUpdate:modelValue"
1899
2596
  ]))]),
1900
2597
  _: 2
1901
- }, 1032, ["label", "prop"]))), 128)), e.hideActions ? M("v-if", !0) : (B(), j(G(_e), { key: 0 }, {
1902
- default: K(() => [U(t.$slots, "actions", {}, () => [I(G(p), {
2598
+ }, 1032, ["label", "prop"]))), 128)), e.hideActions ? I("v-if", !0) : (W(), F(Y(Ce), { key: 0 }, {
2599
+ default: X(() => [q(t.$slots, "actions", {}, () => [B(Y(w), {
1903
2600
  type: "primary",
1904
2601
  "native-type": "submit"
1905
2602
  }, {
1906
- default: K(() => [F(W(e.submitText ?? G(a)("campus.form.submit")), 1)]),
2603
+ default: X(() => [z(J(e.submitText ?? Y(a)("campus.form.submit")), 1)]),
1907
2604
  _: 1
1908
- }), I(G(p), { onClick: u }, {
1909
- default: K(() => [F(W(G(a)("campus.form.reset")), 1)]),
2605
+ }), B(Y(w), { onClick: d }, {
2606
+ default: X(() => [z(J(Y(a)("campus.form.reset")), 1)]),
1910
2607
  _: 1
1911
2608
  })])]),
1912
2609
  _: 3
@@ -1918,77 +2615,79 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
1918
2615
  "label-width"
1919
2616
  ]));
1920
2617
  }
1921
- }), io = q(ne), ao = q(ie), oo = q(ge), so = q(_e), co = q(Ce), lo = q(we), uo = q(Pe), fo = q(He), po = q(Ue), mo = q(Ye), ho = q(st), go = q(o), _o = q(y), vo = q(b), yo = q(S), bo = q(ee), xo = q(C), So = q(E), Co = q(ae), wo = q(Ee), To = q(Te), Eo = q(Ae), Do = q(We), Oo = q(Xe), ko = q($e), Ao = q(ht), jo = q(gt), Mo = q(St), No = q(wt), Po = q(Et), Fo = q(Fe), Io = q(Ve), Lo = {
1922
- CaAutocomplete: go,
1923
- CaCascader: _o,
1924
- CaCascaderPanel: vo,
1925
- CaCheckbox: yo,
1926
- CaCheckboxGroup: bo,
1927
- CaCheckboxButton: xo,
1928
- CaColorPickerPanel: So,
1929
- CaDatePickerPanel: Co,
1930
- CaInputTag: wo,
1931
- CaInputOtp: To,
1932
- CaMention: Eo,
1933
- CaRate: Do,
1934
- CaSelectV2: Oo,
1935
- CaSlider: ko,
1936
- CaTimePicker: Ao,
1937
- CaTimeSelect: jo,
1938
- CaTransfer: Mo,
1939
- CaTreeSelect: No,
1940
- CaUpload: Po,
1941
- CaOptionGroup: Fo,
1942
- CaRadio: Io,
1943
- CaColorPicker: io,
1944
- CaDatePicker: ao,
1945
- CaForm: oo,
1946
- CaFormItem: so,
1947
- CaInput: co,
1948
- CaInputNumber: lo,
1949
- CaOption: uo,
1950
- CaRadioButton: fo,
1951
- CaRadioGroup: po,
1952
- CaSelect: mo,
1953
- CaSwitch: ho,
1954
- CaSchemaForm: ro
1955
- }, Ro = /* @__PURE__ */ L({
2618
+ }), ns = e(ae), rs = e(ue), is = e(Se), as = e(Ce), os = e(ke), ss = e(Ae), cs = e(Be), ls = e(Je), us = e(Ye), ds = e(tt), fs = e(pt), ps = e(_), ms = e(ee), hs = e(k), gs = e(j), _s = e(te), vs = e(M), ys = e(oe), bs = e(de), xs = e(Me), Ss = e(je), Cs = e(Ie), ws = e(Xe), Ts = e(nt), Es = e(at), Ds = e(xt), Os = e(St), ks = e(Ot), As = e(At), js = e(Mt), Ms = e(Ve), Ns = e(qe), Ps = {
2619
+ CaAutocomplete: ps,
2620
+ CaCascader: ms,
2621
+ CaCascaderPanel: hs,
2622
+ CaCheckbox: gs,
2623
+ CaCheckboxGroup: _s,
2624
+ CaCheckboxButton: vs,
2625
+ CaColorPickerPanel: ys,
2626
+ CaDatePickerPanel: bs,
2627
+ CaInputTag: xs,
2628
+ CaInputOtp: Ss,
2629
+ CaMention: Cs,
2630
+ CaRate: ws,
2631
+ CaSelectV2: Ts,
2632
+ CaSlider: Es,
2633
+ CaTimePicker: Ds,
2634
+ CaTimeSelect: Os,
2635
+ CaTransfer: ks,
2636
+ CaTreeSelect: As,
2637
+ CaUpload: js,
2638
+ CaOptionGroup: Ms,
2639
+ CaRadio: Ns,
2640
+ CaColorPicker: ns,
2641
+ CaDatePicker: rs,
2642
+ CaForm: is,
2643
+ CaFormItem: as,
2644
+ CaInput: os,
2645
+ CaInputNumber: ss,
2646
+ CaOption: cs,
2647
+ CaRadioButton: ls,
2648
+ CaRadioGroup: us,
2649
+ CaSelect: ds,
2650
+ CaSwitch: fs,
2651
+ CaSchemaForm: ts
2652
+ }, Fs = /* @__PURE__ */ V({
1956
2653
  __name: "CaMenu",
1957
- setup(e) {
1958
- return (e, t) => (B(), j(G(je), { class: "ca-menu" }, {
1959
- default: K(() => [U(e.$slots, "default")]),
2654
+ setup(e, { expose: t }) {
2655
+ let n = G();
2656
+ return t({
2657
+ open: (e) => n.value?.open(e),
2658
+ close: (e) => n.value?.close(e)
2659
+ }), (e, t) => (W(), F(Y(Le), {
2660
+ ref_key: "menu",
2661
+ ref: n,
2662
+ class: "ca-menu"
2663
+ }, {
2664
+ default: X(() => [q(e.$slots, "default")]),
1960
2665
  _: 3
1961
- }));
2666
+ }, 512));
1962
2667
  }
1963
- }), zo = q(d), Bo = q(f), Vo = q(de), Ho = q(fe), Uo = q(pe), Wo = q(Me), Go = q(ot), Ko = q(e), qo = q(n), Jo = q(r), Yo = q(l), Xo = q(Ie), Zo = q(at), Qo = q(it), $o = q(ft), es = q(ct), ts = q(Ne), ns = {
1964
- CaAffix: Ko,
1965
- CaAnchor: qo,
1966
- CaAnchorLink: Jo,
1967
- CaBacktop: Yo,
1968
- CaPageHeader: Xo,
1969
- CaSteps: Zo,
1970
- CaStep: Qo,
1971
- CaTabs: $o,
1972
- CaTabPane: es,
1973
- CaMenuItemGroup: ts,
1974
- CaBreadcrumb: zo,
1975
- CaBreadcrumbItem: Bo,
1976
- CaDropdown: Vo,
1977
- CaDropdownItem: Ho,
1978
- CaDropdownMenu: Uo,
1979
- CaMenu: Ro,
1980
- CaMenuItem: Wo,
1981
- CaSubMenu: Go
1982
- }, rs = q(ce), is = q(ue), as = q(ze), os = q(Re), ss = q(yt), cs = {
1983
- CaPopover: as,
1984
- CaPopconfirm: os,
1985
- CaTooltip: ss,
1986
- CaDialog: rs,
1987
- CaDrawer: is
1988
- }, ls = { class: "ca-data-table ca-card" }, us = {
2668
+ }), Is = e(S), Ls = e(C), Rs = e(_e), zs = e(ve), Bs = e(ye), Vs = e(Re), Hs = e(ft), Us = e(d), Ws = e(p), Gs = e(m), Ks = e(b), qs = e(He), Js = e(dt), Ys = e(ut), Xs = e(vt), Zs = e(mt), Qs = e(ze), $s = {
2669
+ CaAffix: Us,
2670
+ CaAnchor: Ws,
2671
+ CaAnchorLink: Gs,
2672
+ CaBacktop: Ks,
2673
+ CaPageHeader: qs,
2674
+ CaSteps: Js,
2675
+ CaStep: Ys,
2676
+ CaTabs: Xs,
2677
+ CaTabPane: Zs,
2678
+ CaMenuItemGroup: Qs,
2679
+ CaBreadcrumb: Is,
2680
+ CaBreadcrumbItem: Ls,
2681
+ CaDropdown: Rs,
2682
+ CaDropdownItem: zs,
2683
+ CaDropdownMenu: Bs,
2684
+ CaMenu: Fs,
2685
+ CaMenuItem: Vs,
2686
+ CaSubMenu: Hs
2687
+ }, ec = { class: "ca-data-table ca-card" }, tc = {
1989
2688
  key: 1,
1990
2689
  class: "ca-data-table__toolbar"
1991
- }, ds = { class: "ca-data-table__table-scroll" }, fs = { class: "ca-data-table__footer" }, ps = { class: "ca-data-table__total" }, ms = /*#__PURE__*/ Vn(/* @__PURE__ */ L({
2690
+ }, nc = { class: "ca-data-table__table-scroll" }, rc = { class: "ca-data-table__footer" }, ic = { class: "ca-data-table__total" }, ac = /*#__PURE__*/ l(/* @__PURE__ */ V({
1992
2691
  __name: "CaDataTable",
1993
2692
  props: {
1994
2693
  columns: {},
@@ -2005,18 +2704,18 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2005
2704
  actionsWidth: {}
2006
2705
  },
2007
2706
  emits: ["selection-change"],
2008
- setup(e, { expose: n, emit: r }) {
2009
- let i = e, a = r, o = J(), s = Rt(), c = Ft({}), l = V(1), u = V(i.pageSize), d = Lt([]), f = V(0), m = V(!1), h = V(""), g = V(), _ = V(), v = 0;
2707
+ setup(e, { expose: t, emit: n }) {
2708
+ let r = e, i = n, a = s(), o = Yt(), c = Gt({}), l = G(1), u = G(r.pageSize), d = qt([]), p = G(0), m = G(!1), h = G(""), g = G(), _ = G(), v = 0;
2010
2709
  async function y() {
2011
2710
  let e = ++v;
2012
2711
  m.value = !0, h.value = "";
2013
2712
  try {
2014
- let t = await i.request({
2713
+ let t = await r.request({
2015
2714
  page: l.value,
2016
2715
  pageSize: u.value,
2017
2716
  query: {
2018
2717
  ...c,
2019
- ...i.params
2718
+ ...r.params
2020
2719
  },
2021
2720
  ..._.value ? { sort: _.value } : {}
2022
2721
  });
@@ -2025,10 +2724,10 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2025
2724
  let e = Math.max(1, Math.ceil(t.total / u.value));
2026
2725
  if (e < l.value) return l.value = e, await y();
2027
2726
  }
2028
- d.value = t.list, f.value = t.total;
2727
+ d.value = t.list, p.value = t.total;
2029
2728
  } catch (t) {
2030
2729
  if (e !== v) return;
2031
- d.value = [], f.value = 0, h.value = t instanceof Error && t.message ? t.message : o("campus.table.loadFailed");
2730
+ d.value = [], p.value = 0, h.value = t instanceof Error && t.message ? t.message : a("campus.table.loadFailed");
2032
2731
  } finally {
2033
2732
  e === v && (m.value = !1);
2034
2733
  }
@@ -2046,23 +2745,23 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2046
2745
  order: e.order
2047
2746
  } : void 0, l.value = 1, y();
2048
2747
  }
2049
- return Pt(y), Bt(() => JSON.stringify(i.params ?? {}), b), Bt(() => i.pageSize, (e) => {
2748
+ return Wt(y), Zt(() => JSON.stringify(r.params ?? {}), b), Zt(() => r.pageSize, (e) => {
2050
2749
  u.value = e, b();
2051
- }), n({
2750
+ }), t({
2052
2751
  reload: y,
2053
2752
  reset: x
2054
- }), (n, r) => (B(), N("div", ls, [
2055
- e.search?.length ? (B(), j(G(ge), {
2753
+ }), (t, n) => (W(), L("div", ec, [
2754
+ e.search?.length ? (W(), F(Y(Se), {
2056
2755
  key: 0,
2057
2756
  class: "ca-data-table__search",
2058
2757
  inline: "",
2059
- onSubmit: Ht(b, ["prevent"])
2758
+ onSubmit: $t(b, ["prevent"])
2060
2759
  }, {
2061
- default: K(() => [(B(!0), N(k, null, H(e.search, (e) => (B(), j(G(_e), {
2760
+ default: X(() => [(W(!0), L(N, null, K(e.search, (e) => (W(), F(Y(Ce), {
2062
2761
  key: e.prop,
2063
2762
  label: e.label
2064
2763
  }, {
2065
- default: K(() => [e.type === "select" ? (B(), j(G(Ye), {
2764
+ default: X(() => [e.type === "select" ? (W(), F(Y(tt), {
2066
2765
  key: 0,
2067
2766
  modelValue: c[e.prop],
2068
2767
  "onUpdate:modelValue": (t) => c[e.prop] = t,
@@ -2070,7 +2769,7 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2070
2769
  clearable: "",
2071
2770
  style: { width: "160px" }
2072
2771
  }, {
2073
- default: K(() => [(B(!0), N(k, null, H(e.options, (e) => (B(), j(G(Pe), {
2772
+ default: X(() => [(W(!0), L(N, null, K(e.options, (e) => (W(), F(Y(Be), {
2074
2773
  key: String(e.value),
2075
2774
  label: e.label,
2076
2775
  value: e.value
@@ -2080,7 +2779,7 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2080
2779
  "modelValue",
2081
2780
  "onUpdate:modelValue",
2082
2781
  "placeholder"
2083
- ])) : e.type === "date" ? (B(), j(G(ie), {
2782
+ ])) : e.type === "date" ? (W(), F(Y(ue), {
2084
2783
  key: 1,
2085
2784
  modelValue: c[e.prop],
2086
2785
  "onUpdate:modelValue": (t) => c[e.prop] = t,
@@ -2092,7 +2791,7 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2092
2791
  "modelValue",
2093
2792
  "onUpdate:modelValue",
2094
2793
  "placeholder"
2095
- ])) : (B(), j(G(Ce), {
2794
+ ])) : (W(), F(Y(ke), {
2096
2795
  key: 2,
2097
2796
  modelValue: c[e.prop],
2098
2797
  "onUpdate:modelValue": (t) => c[e.prop] = t,
@@ -2105,23 +2804,23 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2105
2804
  "placeholder"
2106
2805
  ]))]),
2107
2806
  _: 2
2108
- }, 1032, ["label"]))), 128)), I(G(_e), null, {
2109
- default: K(() => [I(G(p), {
2807
+ }, 1032, ["label"]))), 128)), B(Y(Ce), null, {
2808
+ default: X(() => [B(Y(w), {
2110
2809
  type: "primary",
2111
2810
  "native-type": "submit"
2112
2811
  }, {
2113
- default: K(() => [F(W(G(o)("campus.table.search")), 1)]),
2812
+ default: X(() => [z(J(Y(a)("campus.table.search")), 1)]),
2114
2813
  _: 1
2115
- }), I(G(p), { onClick: x }, {
2116
- default: K(() => [F(W(G(o)("campus.table.reset")), 1)]),
2814
+ }), B(Y(w), { onClick: x }, {
2815
+ default: X(() => [z(J(Y(a)("campus.table.reset")), 1)]),
2117
2816
  _: 1
2118
2817
  })]),
2119
2818
  _: 1
2120
2819
  })]),
2121
2820
  _: 1
2122
- })) : M("v-if", !0),
2123
- n.$slots.toolbar ? (B(), N("div", us, [U(n.$slots, "toolbar", { reload: y }, void 0, !0)])) : M("v-if", !0),
2124
- h.value ? (B(), j(G(t), {
2821
+ })) : I("v-if", !0),
2822
+ t.$slots.toolbar ? (W(), L("div", tc, [q(t.$slots, "toolbar", { reload: y }, void 0, !0)])) : I("v-if", !0),
2823
+ h.value ? (W(), F(Y(f), {
2125
2824
  key: 2,
2126
2825
  type: "error",
2127
2826
  "show-icon": "",
@@ -2129,32 +2828,32 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2129
2828
  title: h.value,
2130
2829
  class: "ca-data-table__error"
2131
2830
  }, {
2132
- default: K(() => [I(G(p), {
2831
+ default: X(() => [B(Y(w), {
2133
2832
  size: "small",
2134
2833
  onClick: y
2135
2834
  }, {
2136
- default: K(() => [F(W(G(o)("campus.table.retry")), 1)]),
2835
+ default: X(() => [z(J(Y(a)("campus.table.retry")), 1)]),
2137
2836
  _: 1
2138
2837
  })]),
2139
2838
  _: 1
2140
- }, 8, ["title"])) : M("v-if", !0),
2141
- P("div", ds, [Vt((B(), j(G(lt), {
2839
+ }, 8, ["title"])) : I("v-if", !0),
2840
+ R("div", nc, [Qt((W(), F(Y(ht), {
2142
2841
  ref_key: "tableRef",
2143
2842
  ref: g,
2144
2843
  data: d.value,
2145
2844
  "row-key": e.rowKey,
2146
- "empty-text": G(o)("campus.table.empty"),
2147
- onSelectionChange: r[0] ||= (e) => a("selection-change", e),
2845
+ "empty-text": Y(a)("campus.table.empty"),
2846
+ onSelectionChange: n[0] ||= (e) => i("selection-change", e),
2148
2847
  onSortChange: S
2149
2848
  }, {
2150
- default: K(() => [
2151
- e.selection ? (B(), j(G(ut), {
2849
+ default: X(() => [
2850
+ e.selection ? (W(), F(Y(gt), {
2152
2851
  key: 0,
2153
2852
  type: "selection",
2154
2853
  width: "48",
2155
2854
  "reserve-selection": ""
2156
- })) : M("v-if", !0),
2157
- (B(!0), N(k, null, H(e.columns, (e) => (B(), j(G(ut), {
2855
+ })) : I("v-if", !0),
2856
+ (W(!0), L(N, null, K(e.columns, (e) => (W(), F(Y(gt), {
2158
2857
  key: e.prop,
2159
2858
  prop: e.prop,
2160
2859
  label: e.label,
@@ -2163,10 +2862,10 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2163
2862
  align: e.align,
2164
2863
  sortable: e.sortable ? "custom" : !1
2165
2864
  }, {
2166
- default: K(({ row: t }) => [U(n.$slots, `cell-${e.prop}`, {
2167
- row: t,
2168
- value: t[e.prop]
2169
- }, () => [F(W(e.formatter ? e.formatter(t) : t[e.prop]), 1)], !0)]),
2865
+ default: X(({ row: n }) => [q(t.$slots, `cell-${e.prop}`, {
2866
+ row: n,
2867
+ value: n[e.prop]
2868
+ }, () => [z(J(e.formatter ? e.formatter(n) : n[e.prop]), 1)], !0)]),
2170
2869
  _: 2
2171
2870
  }, 1032, [
2172
2871
  "prop",
@@ -2176,28 +2875,28 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2176
2875
  "align",
2177
2876
  "sortable"
2178
2877
  ]))), 128)),
2179
- G(s).actions ? (B(), j(G(ut), {
2878
+ Y(o).actions ? (W(), F(Y(gt), {
2180
2879
  key: 1,
2181
2880
  label: e.actionsLabel,
2182
2881
  width: e.actionsWidth,
2183
2882
  fixed: "right"
2184
2883
  }, {
2185
- default: K(({ row: e }) => [U(n.$slots, "actions", { row: e }, void 0, !0)]),
2884
+ default: X(({ row: e }) => [q(t.$slots, "actions", { row: e }, void 0, !0)]),
2186
2885
  _: 3
2187
- }, 8, ["label", "width"])) : M("v-if", !0)
2886
+ }, 8, ["label", "width"])) : I("v-if", !0)
2188
2887
  ]),
2189
2888
  _: 3
2190
2889
  }, 8, [
2191
2890
  "data",
2192
2891
  "row-key",
2193
2892
  "empty-text"
2194
- ])), [[G(Ot), m.value]])]),
2195
- P("div", fs, [P("span", ps, W(G(o)("campus.table.total", { total: f.value })), 1), I(G(Le), {
2893
+ ])), [[Y(Pt), m.value]])]),
2894
+ R("div", rc, [R("span", ic, J(Y(a)("campus.table.total", { total: p.value })), 1), B(Y(Ue), {
2196
2895
  "current-page": l.value,
2197
- "onUpdate:currentPage": r[1] ||= (e) => l.value = e,
2896
+ "onUpdate:currentPage": n[1] ||= (e) => l.value = e,
2198
2897
  "page-size": u.value,
2199
- "onUpdate:pageSize": r[2] ||= (e) => u.value = e,
2200
- total: f.value,
2898
+ "onUpdate:pageSize": n[2] ||= (e) => u.value = e,
2899
+ total: p.value,
2201
2900
  "page-sizes": [
2202
2901
  10,
2203
2902
  20,
@@ -2214,15 +2913,15 @@ var Pr = { class: "ca-chart__legend" }, Fr = /* @__PURE__ */ L({
2214
2913
  ])])
2215
2914
  ]));
2216
2915
  }
2217
- }), [["__scopeId", "data-v-7e786198"]]), hs = q(lt), gs = q(ut), _s = q(dt), vs = q(a), ys = {
2218
- CaTable: hs,
2219
- CaTableColumn: gs,
2220
- CaTableV2: _s,
2221
- CaAutoResizer: vs,
2222
- CaDataTable: ms
2223
- }, bs = Ln($n, nr, oa, ca, Ga, Lo, no, ns, cs, ys), xs = {}, Ss = Ln(xs), Cs = {}, ws = {}, Ts = {}, Es = {}, Ds = {}, Os = Ln(Cs, ws, Ts, Es, Ds), ks = Ln(bs, Os, Ss);
2224
- function As(e) {
2225
- e.directive("ca-loading", Oe), e.directive("ca-infinite-scroll", Se);
2226
- for (let [t, n] of Object.entries(ks)) e.component(t, n);
2916
+ }), [["__scopeId", "data-v-7e786198"]]), oc = e(ht), sc = e(gt), cc = e(_t), lc = e(g), uc = {
2917
+ CaTable: oc,
2918
+ CaTableColumn: sc,
2919
+ CaTableV2: cc,
2920
+ CaAutoResizer: lc,
2921
+ CaDataTable: ac
2922
+ }, dc = $n(pr, n, va, ba, Uo, Ps, es, $s, no, uc), fc = {}, pc = $n(fc), mc = {}, hc = {}, gc = {}, _c = {}, vc = {}, yc = $n(mc, hc, gc, _c, vc), bc = $n(dc, yc, pc);
2923
+ function xc(e) {
2924
+ e.directive("ca-loading", Pe), e.directive("ca-infinite-scroll", Oe);
2925
+ for (let [t, n] of Object.entries(bc)) e.component(t, n);
2227
2926
  }
2228
- export { Ko as CaAffix, Gn as CaAlert, qo as CaAnchor, Jo as CaAnchorLink, Ja as CaAside, vs as CaAutoResizer, go as CaAutocomplete, _a as CaAvatar, va as CaAvatarGroup, Yo as CaBacktop, ya as CaBadge, Ei as CaBarChart, zo as CaBreadcrumb, Bo as CaBreadcrumbItem, er as CaButton, tr as CaButtonGroup, ba as CaCalendar, Kn as CaCard, xa as CaCarousel, Sa as CaCarouselItem, _o as CaCascader, vo as CaCascaderPanel, Wa as CaCheckTag, yo as CaCheckbox, xo as CaCheckboxButton, bo as CaCheckboxGroup, Qa as CaCol, Ca as CaCollapse, wa as CaCollapseItem, io as CaColorPicker, So as CaColorPickerPanel, sa as CaConfigProvider, Ka as CaContainer, Ua as CaCountdown, ms as CaDataTable, ao as CaDatePicker, Co as CaDatePickerPanel, Ta as CaDescriptions, Ea as CaDescriptionsItem, rs as CaDialog, Zn as CaDivider, is as CaDrawer, Vo as CaDropdown, Ho as CaDropdownItem, Uo as CaDropdownMenu, Da as CaEmpty, Xa as CaFooter, oo as CaForm, so as CaFormItem, aa as CaGauge, qa as CaHeader, Hn as CaIcon, Oa as CaImage, ka as CaImageViewer, co as CaInput, lo as CaInputNumber, To as CaInputOtp, wo as CaInputTag, si as CaLineChart, Jn as CaLink, Ya as CaMain, Eo as CaMention, Ro as CaMenu, Wo as CaMenuItem, ts as CaMenuItemGroup, uo as CaOption, Fo as CaOptionGroup, Wn as CaPageActions, Xo as CaPageHeader, Aa as CaPagination, Vi as CaPieChart, os as CaPopconfirm, as as CaPopover, ja as CaProgress, Io as CaRadio, fo as CaRadioButton, po as CaRadioGroup, Do as CaRate, Ma as CaResult, Za as CaRow, ro as CaSchemaForm, Xn as CaScrollbar, Va as CaSegmented, mo as CaSelect, Oo as CaSelectV2, Na as CaSkeleton, Pa as CaSkeletonItem, ko as CaSlider, $a as CaSpace, Qi as CaSparkline, eo as CaSplitter, to as CaSplitterPanel, ha as CaStatCard, Ha as CaStatistic, ga as CaStatusTag, Qo as CaStep, Zo as CaSteps, Go as CaSubMenu, ho as CaSwitch, es as CaTabPane, hs as CaTable, gs as CaTableColumn, _s as CaTableV2, $o as CaTabs, qn as CaTag, Yn as CaText, Ao as CaTimePicker, jo as CaTimeSelect, Fa as CaTimeline, Ia as CaTimelineItem, ss as CaTooltip, La as CaTour, Ra as CaTourStep, Mo as CaTransfer, za as CaTree, No as CaTreeSelect, Ba as CaTreeV2, Po as CaUpload, Qn as CaWatermark, zn as ICONS, $n as basicComponents, nr as buttonComponents, Os as campusRegistry, Cs as cardComponents, oa as chartComponents, bs as componentRegistry, ca as configComponents, Ga as displayComponents, Lo as formComponents, As as installUi, no as layoutComponents, ns as navigationComponents, Ss as omsRegistry, xs as omsSchoolComponents, cs as overlayComponents, ws as parentComponents, Ts as studentComponents, ys as tableComponents, Es as teacherComponents, Ds as telComponents, rr as translateKey, ks as uiComponents, J as useTranslate };
2927
+ export { Us as CaAffix, ar as CaAlert, Ws as CaAnchor, Gs as CaAnchorLink, Ko as CaAside, lc as CaAutoResizer, ps as CaAutocomplete, ho as CaAvatar, go as CaAvatarGroup, Ks as CaBacktop, _o as CaBadge, Ri as CaBarChart, Is as CaBreadcrumb, Ls as CaBreadcrumbItem, r as CaButton, t as CaButtonGroup, vo as CaCalendar, or as CaCard, yo as CaCarousel, bo as CaCarouselItem, ms as CaCascader, hs as CaCascaderPanel, Ho as CaCheckTag, gs as CaCheckbox, vs as CaCheckboxButton, _s as CaCheckboxGroup, Xo as CaCol, xo as CaCollapse, So as CaCollapseItem, ns as CaColorPicker, ys as CaColorPickerPanel, ya as CaConfigProvider, Wo as CaContainer, Vo as CaCountdown, ac as CaDataTable, rs as CaDatePicker, bs as CaDatePickerPanel, Co as CaDescriptions, wo as CaDescriptionsItem, Za as CaDialog, dr as CaDivider, ao as CaDocDialog, Xa as CaDocViewer, Qa as CaDrawer, Rs as CaDropdown, zs as CaDropdownItem, Bs as CaDropdownMenu, To as CaEmpty, Jo as CaFooter, is as CaForm, as as CaFormItem, _a as CaGauge, Go as CaHeader, nr as CaIcon, Eo as CaImage, Do as CaImageViewer, os as CaInput, ss as CaInputNumber, Ss as CaInputOtp, xs as CaInputTag, yi as CaLineChart, cr as CaLink, qo as CaMain, Cs as CaMention, Fs as CaMenu, Vs as CaMenuItem, Qs as CaMenuItemGroup, cs as CaOption, Ms as CaOptionGroup, ir as CaPageActions, qs as CaPageHeader, Oo as CaPagination, $i as CaPieChart, eo as CaPopconfirm, $a as CaPopover, ko as CaProgress, Ns as CaRadio, ls as CaRadioButton, us as CaRadioGroup, ws as CaRate, Ao as CaResult, Yo as CaRow, ts as CaSchemaForm, ur as CaScrollbar, zo as CaSegmented, ds as CaSelect, Ts as CaSelectV2, jo as CaSkeleton, Mo as CaSkeletonItem, Es as CaSlider, Zo as CaSpace, ua as CaSparkline, Qo as CaSplitter, $o as CaSplitterPanel, po as CaStatCard, Bo as CaStatistic, mo as CaStatusTag, Ys as CaStep, Js as CaSteps, Hs as CaSubMenu, fs as CaSwitch, Zs as CaTabPane, oc as CaTable, sc as CaTableColumn, cc as CaTableV2, Xs as CaTabs, sr as CaTag, lr as CaText, Ds as CaTimePicker, Os as CaTimeSelect, No as CaTimeline, Po as CaTimelineItem, to as CaTooltip, Fo as CaTour, Io as CaTourStep, ks as CaTransfer, Lo as CaTree, As as CaTreeSelect, Ro as CaTreeV2, js as CaUpload, fr as CaWatermark, tr as ICONS, pr as basicComponents, n as buttonComponents, yc as campusRegistry, mc as cardComponents, va as chartComponents, dc as componentRegistry, ba as configComponents, Uo as displayComponents, Ps as formComponents, xc as installUi, es as layoutComponents, $s as navigationComponents, pc as omsRegistry, fc as omsSchoolComponents, no as overlayComponents, hc as parentComponents, o as registerDocLoader, gc as studentComponents, uc as tableComponents, _c as teacherComponents, vc as telComponents, i as translateKey, bc as uiComponents, s as useTranslate };