labull-framework 1.0.0 → 1.0.1

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.
@@ -1,9 +1,9 @@
1
- import { defineComponent as Ve, ref as E, computed as I, watch as It, nextTick as vn, onMounted as Mn, onBeforeUnmount as Rn, openBlock as c, createElementBlock as d, normalizeStyle as An, normalizeClass as K, unref as Z, createElementVNode as l, toDisplayString as f, createCommentVNode as $, Fragment as C, renderList as j, withModifiers as Ne, getCurrentInstance as Ls, createBlock as Ps, createTextVNode as k, withDirectives as _t, vModelCheckbox as Is, vModelText as se, withKeys as Ns, vShow as oe } from "vue";
2
- import { useRouter as On, useRoute as Ds } from "vue-router";
3
- import { b as dt, c as ae, A as De, u as jn } from "./chunk-index-BVIJeFeJ.js";
4
- import { s as $r } from "./chunk-index-BVIJeFeJ.js";
5
- import { u as qs, o as qe, b as Ln, _ as Pn, d as Fs } from "./chunk-ProductShell.vue_vue_type_style_index_0_scoped_06035587_lang-Fky1ghd2.js";
6
- const vt = "__mb", In = "call", Fe = "reply", Nn = "host-ready", Dn = "height", Us = "html, body { overflow: hidden !important; }", zs = `
1
+ import { defineComponent as Qe, ref as E, computed as I, watch as Dt, nextTick as gn, onMounted as On, onBeforeUnmount as jn, openBlock as r, createElementBlock as c, normalizeStyle as Ln, normalizeClass as K, unref as Z, createElementVNode as l, toDisplayString as f, createCommentVNode as $, Fragment as C, renderList as j, withModifiers as Ue, getCurrentInstance as Ns, createBlock as Ds, createTextVNode as k, withDirectives as _t, vModelCheckbox as qs, vModelText as le, withKeys as Fs, vShow as ie } from "vue";
2
+ import { useRouter as Pn, useRoute as Us } from "vue-router";
3
+ import { b as ct, c as re, A as ze, u as In } from "./chunk-index-BVIJeFeJ.js";
4
+ import { s as Cr } from "./chunk-index-BVIJeFeJ.js";
5
+ import { u as zs, o as He, b as Nn, _ as Dn, d as Hs } from "./chunk-ProductShell.vue_vue_type_style_index_0_scoped_06035587_lang-Fky1ghd2.js";
6
+ const bt = "__mb", qn = "call", Ke = "reply", Fn = "host-ready", Un = "height", Ks = "html, body { overflow: hidden !important; }", Vs = `
7
7
  (function () {
8
8
  var seq = 0, waiting = {}, queue = [], ready = false, last = -1;
9
9
  function call(method, args) {
@@ -11,16 +11,16 @@ const vt = "__mb", In = "call", Fe = "reply", Nn = "host-ready", Dn = "height",
11
11
  function run() {
12
12
  var id = ++seq;
13
13
  waiting[id] = { resolve: resolve, reject: reject };
14
- parent.postMessage({ '${vt}': '${In}', id: id, method: method, args: args }, '*');
14
+ parent.postMessage({ '${bt}': '${qn}', id: id, method: method, args: args }, '*');
15
15
  }
16
16
  if (ready) run(); else queue.push(run);
17
17
  });
18
18
  }
19
19
  window.addEventListener('message', function (event) {
20
20
  var data = event.data, pending;
21
- if (!data || data['${vt}'] === undefined) return;
22
- if (data['${vt}'] === '${Nn}') { ready = true; queue.splice(0).forEach(function (run) { run(); }); return; }
23
- if (data['${vt}'] !== '${Fe}') return;
21
+ if (!data || data['${bt}'] === undefined) return;
22
+ if (data['${bt}'] === '${Fn}') { ready = true; queue.splice(0).forEach(function (run) { run(); }); return; }
23
+ if (data['${bt}'] !== '${Ke}') return;
24
24
  if (!(pending = waiting[data.id])) return;
25
25
  delete waiting[data.id];
26
26
  if (data.ok) pending.resolve(data.value); else pending.reject(new Error(data.error || '调用失败'));
@@ -61,7 +61,7 @@ const vt = "__mb", In = "call", Fe = "reply", Nn = "host-ready", Dn = "height",
61
61
  if (height > 0) height += 1;
62
62
  if (height === last) return; /* 一样高就不再发:否则「宿主改高度 → 触发观察 → 又发一次」会转个不停 */
63
63
  last = height;
64
- parent.postMessage({ '${vt}': '${Dn}', height: height }, '*');
64
+ parent.postMessage({ '${bt}': '${Un}', height: height }, '*');
65
65
  }
66
66
  function start() {
67
67
  report();
@@ -70,27 +70,27 @@ const vt = "__mb", In = "call", Fe = "reply", Nn = "host-ready", Dn = "height",
70
70
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start); else start();
71
71
  setInterval(report, 500);
72
72
  })();
73
- `, Hs = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/;
74
- function qn(o) {
73
+ `, Ws = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/;
74
+ function zn(s) {
75
75
  const n = typeof window > "u" ? "http://localhost" : window.location.href;
76
- return new URL(`${De}${o}`, n);
76
+ return new URL(`${ze}${s}`, n);
77
77
  }
78
- function Ks() {
78
+ function Js() {
79
79
  try {
80
- return qn("").origin;
80
+ return zn("").origin;
81
81
  } catch {
82
82
  return typeof window > "u" ? "" : window.location.origin;
83
83
  }
84
84
  }
85
- async function Vs(o, n, i) {
86
- if (!Hs.test(n)) throw new Error(`路由名不合法:${n}(要写成 类名.方法名,例如 Customer.create)`);
87
- const a = qn(`/bx/${o}/${n}`), u = Ks();
85
+ async function Gs(s, n, i) {
86
+ if (!Ws.test(n)) throw new Error(`路由名不合法:${n}(要写成 类名.方法名,例如 Customer.create)`);
87
+ const a = zn(`/bx/${s}/${n}`), u = Js();
88
88
  if (a.origin !== u) throw new Error(`后端地址必须是本应用的(${u}):${a.origin}`);
89
89
  const b = i instanceof Blob ? i : null, m = await fetch(a.toString(), {
90
90
  method: "POST",
91
91
  credentials: "include",
92
92
  // 带上 HttpOnly 会话 cookie;authHeaders('POST') 给 CSRF 头(缺了 403)
93
- headers: b ? { "Content-Type": b.type || "application/octet-stream", ...ae("POST") } : { "Content-Type": "application/json", ...ae("POST") },
93
+ headers: b ? { "Content-Type": b.type || "application/octet-stream", ...re("POST") } : { "Content-Type": "application/json", ...re("POST") },
94
94
  body: b ?? JSON.stringify(i ?? {})
95
95
  }), p = await m.text().catch(() => "");
96
96
  if (m.ok) {
@@ -110,16 +110,16 @@ async function Vs(o, n, i) {
110
110
  }
111
111
  throw new Error(v ? `${n} 调用失败:${v.slice(0, 300)}` : `${n} 调用失败(${m.status})`);
112
112
  }
113
- function Ws(o, n) {
113
+ function Qs(s, n) {
114
114
  const i = (m) => {
115
115
  try {
116
- o.contentWindow?.postMessage(m, "*");
116
+ s.contentWindow?.postMessage(m, "*");
117
117
  } catch (p) {
118
118
  console.warn("[magic-block] 有一条宿主消息没能发给块(协议继续走):", p);
119
119
  }
120
120
  };
121
121
  async function a(m, p) {
122
- if (m === "getMe") return await dt("/auth/me");
122
+ if (m === "getMe") return await ct("/auth/me");
123
123
  if (m === "navigateTab") {
124
124
  const v = typeof p[0] == "string" ? p[0].trim() : "";
125
125
  if (!v || !n.onNavigateTab) throw new Error(`跳不了 ${v || "(空地址)"}:这个页面没有把宿主接到路由上`);
@@ -135,70 +135,70 @@ function Ws(o, n) {
135
135
  const v = typeof p[0] == "string" ? p[0].trim() : "", h = p[1];
136
136
  if (!v) throw new Error("后端调用的路由名是空的:要写成 magicBackendApi.类名.方法名(参数)");
137
137
  if (!h || typeof h != "object" || Array.isArray(h)) throw new Error(`magicBackendApi.${v}(params) 的参数要么是一个对象,要么是一个文件(File / Blob)`);
138
- return await Vs(n.uuid, v, h);
138
+ return await Gs(n.uuid, v, h);
139
139
  }
140
140
  throw new Error(`不认识的方法:${String(m)}(这块桥只有 getMe / navigateTab / context / setTabTitle / backend 五个)`);
141
141
  }
142
142
  const u = (m) => {
143
- if (m.source !== o.contentWindow) return;
143
+ if (m.source !== s.contentWindow) return;
144
144
  const p = m.data;
145
145
  if (!p) return;
146
- if (p[vt] === Dn) {
146
+ if (p[bt] === Un) {
147
147
  const h = typeof p.height == "number" ? p.height : NaN;
148
148
  Number.isFinite(h) && h > 0 && n.onHeight?.(h);
149
149
  return;
150
150
  }
151
- if (p[vt] !== In) return;
151
+ if (p[bt] !== qn) return;
152
152
  const v = p.id;
153
153
  (async () => {
154
154
  try {
155
- i({ [vt]: Fe, id: v, ok: !0, value: await a(String(p.method), p.args ?? []) });
155
+ i({ [bt]: Ke, id: v, ok: !0, value: await a(String(p.method), p.args ?? []) });
156
156
  } catch (h) {
157
- i({ [vt]: Fe, id: v, ok: !1, error: h instanceof Error ? h.message : String(h) });
157
+ i({ [bt]: Ke, id: v, ok: !1, error: h instanceof Error ? h.message : String(h) });
158
158
  }
159
159
  })();
160
160
  };
161
161
  window.addEventListener("message", u);
162
- const b = () => i({ [vt]: Nn });
163
- return b(), o.addEventListener("load", b), () => {
164
- window.removeEventListener("message", u), o.removeEventListener("load", b);
162
+ const b = () => i({ [bt]: Fn });
163
+ return b(), s.addEventListener("load", b), () => {
164
+ window.removeEventListener("message", u), s.removeEventListener("load", b);
165
165
  };
166
166
  }
167
- const Kt = "index.open.html", Re = "magic-block.open.yaml", hn = "README.open.md", _n = "requires.open.yaml", Ae = ["id", "module", "name", "brief", "requires"], gn = ["id", "module", "name", "brief"], Js = ["detail"], zt = ["models", "surface", "packages", "settings", "config", "routes", "opaque"], Gs = "surface", We = 40, Qs = /^(?![A-Za-z]:)(?!\/)[A-Za-z0-9._\-/]+$/, Ys = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Zs = /^[a-z][a-z0-9]*$/, Xs = /^[A-Za-z_][A-Za-z0-9_]*$/, to = /^([|>])([-+]?)$/, eo = "_";
168
- function yn(o) {
169
- return String(o ?? "").split("/").some((n) => n.startsWith(eo));
167
+ const Wt = "index.open.html", Le = "magic-block.open.yaml", yn = "README.open.md", kn = "requires.open.yaml", Pe = ["id", "module", "name", "brief", "requires"], $n = ["id", "module", "name", "brief"], Ys = ["detail"], Kt = ["models", "surface", "packages", "settings", "config", "routes", "opaque"], Zs = "surface", Ye = 40, Xs = /^(?![A-Za-z]:)(?!\/)[A-Za-z0-9._\-/]+$/, to = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, eo = /^[a-z][a-z0-9]*$/, no = /^[A-Za-z_][A-Za-z0-9_]*$/, so = /^([|>])([-+]?)$/, oo = "_";
168
+ function wn(s) {
169
+ return String(s ?? "").split("/").some((n) => n.startsWith(oo));
170
170
  }
171
- function no(o) {
172
- return o.length > 0 && o.length <= We && !/[\u0000-\u001f\u007f]/.test(o);
171
+ function lo(s) {
172
+ return s.length > 0 && s.length <= Ye && !/[\u0000-\u001f\u007f]/.test(s);
173
173
  }
174
- const so = {
174
+ const io = {
175
175
  id: "块的 uuid,必须与页面里挂载它时写死的那个 uuid 逐字一致",
176
176
  module: "模块名(小写字母与数字,必须以字母开头),例如 home",
177
- name: `可读名:可以用中文,不超过 ${We} 个字符`,
177
+ name: `可读名:可以用中文,不超过 ${Ye} 个字符`,
178
178
  brief: "一句话说明这个块解决什么问题",
179
179
  // 可选键:这一句不会出现在"缺少 xxx"的报文里(它不在 MANIFEST_REQUIRED 里),
180
180
  // 留着是为了让这份 Map 与 MANIFEST_KEYS 一一对上(少一个键 `tsc` 就会报)。
181
181
  requires: "依赖声明(可选):用了哪些项目模型 / 方法 / pip 包 / settings 键 / BLOCK_* 变量 / 跨块路由;草稿由导出铺的 requires.open.yaml 给(扫代码得出来的建议写在注释里)"
182
182
  };
183
- function kn(o) {
184
- const n = Object.keys(o);
183
+ function xn(s) {
184
+ const n = Object.keys(s);
185
185
  return n.length > 0 ? `现在包里有:${n.join(" / ")}` : "现在这个包是空的";
186
186
  }
187
- function re(o) {
187
+ function de(s) {
188
188
  let n = "";
189
- for (let i = 0; i < o.length; i += 1) {
190
- const a = o[i];
189
+ for (let i = 0; i < s.length; i += 1) {
190
+ const a = s[i];
191
191
  if (n)
192
192
  a === n && (n = "");
193
193
  else if (a === '"' || a === "'") n = a;
194
- else if (a === "#") return o.slice(0, i);
194
+ else if (a === "#") return s.slice(0, i);
195
195
  }
196
- return o;
196
+ return s;
197
197
  }
198
- function Je(o) {
198
+ function Ze(s) {
199
199
  let n = "";
200
- for (let i = 0; i < o.length; i += 1) {
201
- const a = o[i];
200
+ for (let i = 0; i < s.length; i += 1) {
201
+ const a = s[i];
202
202
  if (n)
203
203
  a === n && (n = "");
204
204
  else if (a === '"' || a === "'") n = a;
@@ -206,42 +206,42 @@ function Je(o) {
206
206
  }
207
207
  return -1;
208
208
  }
209
- function ce(o) {
210
- return !o || o[0] !== '"' && o[0] !== "'" ? o : o.length >= 2 && o[o.length - 1] === o[0] ? o.slice(1, -1).trim() : o;
209
+ function pe(s) {
210
+ return !s || s[0] !== '"' && s[0] !== "'" ? s : s.length >= 2 && s[s.length - 1] === s[0] ? s.slice(1, -1).trim() : s;
211
211
  }
212
- function oo(o) {
213
- const n = [...o];
212
+ function ao(s) {
213
+ const n = [...s];
214
214
  for (; n.length > 0 && !n[0].trim(); ) n.shift();
215
215
  for (; n.length > 0 && !n[n.length - 1].trim(); ) n.pop();
216
216
  const i = n.filter((u) => u.trim()).map((u) => u.length - u.trimStart().length), a = i.length > 0 ? Math.min(...i) : 0;
217
217
  return n.map((u) => u.trim() ? u.slice(a) : "").join(`
218
218
  `);
219
219
  }
220
- function Fn(o) {
221
- const n = o.trim();
220
+ function Hn(s) {
221
+ const n = s.trim();
222
222
  if (!n.startsWith("[") || !n.endsWith("]")) return null;
223
223
  const i = n.slice(1, -1).trim();
224
- return i ? i.split(",").map((a) => ce(a.trim())).filter(Boolean) : [];
224
+ return i ? i.split(",").map((a) => pe(a.trim())).filter(Boolean) : [];
225
225
  }
226
- function de(o) {
227
- return o.length - o.trimStart().length;
226
+ function fe(s) {
227
+ return s.length - s.trimStart().length;
228
228
  }
229
- function Un(o, n, i, a, u) {
229
+ function Kn(s, n, i, a, u) {
230
230
  const b = [];
231
- for (; n < o.length; ) {
232
- const m = o[n];
231
+ for (; n < s.length; ) {
232
+ const m = s[n];
233
233
  if (!m.trim()) {
234
234
  n += 1;
235
235
  continue;
236
236
  }
237
- if (de(m) <= i) break;
238
- const p = n + 1, v = re(m).trim();
237
+ if (fe(m) <= i) break;
238
+ const p = n + 1, v = de(m).trim();
239
239
  if (n += 1, !v) continue;
240
240
  if (!v.startsWith("-")) {
241
241
  u.push(`第 ${p} 行:${a} 下面只许写 - 项(读到 ${v})`);
242
242
  continue;
243
243
  }
244
- const h = ce(v.slice(1).trim());
244
+ const h = pe(v.slice(1).trim());
245
245
  if (!h) {
246
246
  u.push(`第 ${p} 行:${a} 里有一项是空的`);
247
247
  continue;
@@ -250,28 +250,28 @@ function Un(o, n, i, a, u) {
250
250
  }
251
251
  return [b, n];
252
252
  }
253
- function lo(o, n, i, a) {
253
+ function uo(s, n, i, a) {
254
254
  const u = {};
255
- for (; n < o.length; ) {
256
- const b = o[n];
255
+ for (; n < s.length; ) {
256
+ const b = s[n];
257
257
  if (!b.trim()) {
258
258
  n += 1;
259
259
  continue;
260
260
  }
261
- const m = de(b);
261
+ const m = fe(b);
262
262
  if (m <= i) break;
263
- const p = n + 1, v = re(b).trim();
263
+ const p = n + 1, v = de(b).trim();
264
264
  if (n += 1, !v) continue;
265
265
  if (v.startsWith("-")) {
266
266
  a.push(`第 ${p} 行:requires.surface 要写成「模型完整路径: [方法名, …]」,不是在列表里写(读到 ${v})`);
267
267
  continue;
268
268
  }
269
- const h = Je(v);
269
+ const h = Ze(v);
270
270
  if (h < 0) {
271
271
  a.push(`第 ${p} 行不是「键: 值」(${v}):requires.surface 下面要写「模型完整路径: [方法名, …]」,例如 core.models.WorkflowModel: [log_event, timeline]`);
272
272
  continue;
273
273
  }
274
- const y = ce(v.slice(0, h).trim()), _ = v.slice(h + 1).trim();
274
+ const y = pe(v.slice(0, h).trim()), _ = v.slice(h + 1).trim();
275
275
  if (!y) {
276
276
  a.push(`第 ${p} 行:requires.surface 里有一个空的模型路径`);
277
277
  continue;
@@ -280,7 +280,7 @@ function lo(o, n, i, a) {
280
280
  a.push(`第 ${p} 行重复写了 requires.surface.${y}:一个模型只许出现一次`);
281
281
  continue;
282
282
  }
283
- const g = Fn(_);
283
+ const g = Hn(_);
284
284
  if (g !== null) {
285
285
  u[y] = g;
286
286
  continue;
@@ -289,47 +289,47 @@ function lo(o, n, i, a) {
289
289
  a.push(`第 ${p} 行:requires.surface.${y} 的值只许是 [方法名, …] 或下面每行一个 - 方法名(读到 ${_})`);
290
290
  continue;
291
291
  }
292
- const [S, A] = Un(o, n, m, `requires.surface.${y}`, a);
292
+ const [S, A] = Kn(s, n, m, `requires.surface.${y}`, a);
293
293
  n = A, u[y] = S;
294
294
  }
295
295
  return [u, n];
296
296
  }
297
- function io(o, n, i, a) {
297
+ function ro(s, n, i, a) {
298
298
  const u = {}, b = {};
299
- for (; n < o.length; ) {
300
- const m = o[n];
299
+ for (; n < s.length; ) {
300
+ const m = s[n];
301
301
  if (!m.trim()) {
302
302
  n += 1;
303
303
  continue;
304
304
  }
305
- const p = de(m);
305
+ const p = fe(m);
306
306
  if (p <= i) break;
307
- const v = n + 1, h = re(m).trim();
307
+ const v = n + 1, h = de(m).trim();
308
308
  if (n += 1, !h) continue;
309
309
  if (h.startsWith("-")) {
310
- a.push(`第 ${v} 行:requires 下面第一层只许写七个键里的一个(${zt.join(" / ")}),不是列表项(读到 ${h})`);
310
+ a.push(`第 ${v} 行:requires 下面第一层只许写七个键里的一个(${Kt.join(" / ")}),不是列表项(读到 ${h})`);
311
311
  continue;
312
312
  }
313
- const y = Je(h);
313
+ const y = Ze(h);
314
314
  if (y < 0) {
315
- a.push(`第 ${v} 行不是「键: 值」(${h}):requires 下面要写 ${zt.join(" / ")} 里的一个,值缩进在它下面`);
315
+ a.push(`第 ${v} 行不是「键: 值」(${h}):requires 下面要写 ${Kt.join(" / ")} 里的一个,值缩进在它下面`);
316
316
  continue;
317
317
  }
318
318
  const _ = h.slice(0, y).trim(), g = h.slice(y + 1).trim();
319
- if (!zt.includes(_)) {
320
- a.push(`第 ${v} 行的键不认识(${_}):requires 只有 ${zt.join(" / ")} 这几个键`);
319
+ if (!Kt.includes(_)) {
320
+ a.push(`第 ${v} 行的键不认识(${_}):requires 只有 ${Kt.join(" / ")} 这几个键`);
321
321
  continue;
322
322
  }
323
323
  if (b[_]) {
324
324
  a.push(`第 ${v} 行重复写了 requires.${_}:一个键只许出现一次`);
325
325
  continue;
326
326
  }
327
- if (b[_] = !0, _ === Gs) {
328
- const [R, O] = lo(o, n, p, a);
327
+ if (b[_] = !0, _ === Zs) {
328
+ const [R, O] = uo(s, n, p, a);
329
329
  n = O, u.surface = R;
330
330
  continue;
331
331
  }
332
- const S = Fn(g);
332
+ const S = Hn(g);
333
333
  if (S !== null) {
334
334
  u[_] = S;
335
335
  continue;
@@ -338,36 +338,36 @@ function io(o, n, i, a) {
338
338
  a.push(`第 ${v} 行:requires.${_} 的值只许是每行一个 - 项 或一行写完的 [a, b](读到 ${g})`);
339
339
  continue;
340
340
  }
341
- const [A, B] = Un(o, n, p, `requires.${_}`, a);
341
+ const [A, B] = Kn(s, n, p, `requires.${_}`, a);
342
342
  n = B, u[_] = A;
343
343
  }
344
344
  return [u, n];
345
345
  }
346
- function ao(o, n = !0) {
347
- const i = [], a = {}, u = {}, b = o.split(/\r?\n/);
346
+ function co(s, n = !0) {
347
+ const i = [], a = {}, u = {}, b = s.split(/\r?\n/);
348
348
  let m = 0;
349
349
  for (; m < b.length; ) {
350
350
  const p = b[m], v = m + 1;
351
351
  m += 1;
352
- const h = de(p), y = re(p).trim();
352
+ const h = fe(p), y = de(p).trim();
353
353
  if (!y) continue;
354
354
  if (y.startsWith("-") && h === 0) {
355
355
  i.push(`第 ${v} 行是列表写法(${y}):清单只认「键: 值」,每个键各占一行 —— 例如 name: 客户档案(一串值请写进 requires 那一块)`);
356
356
  continue;
357
357
  }
358
- const _ = Je(y);
358
+ const _ = Ze(y);
359
359
  if (_ < 0) {
360
360
  i.push(`第 ${v} 行不是「键: 值」(${y}):清单只认「键: 值」与 # 注释 —— 要么删掉这一行,要么照 name: 客户档案 写`);
361
361
  continue;
362
362
  }
363
363
  const g = y.slice(0, _).trim();
364
- if (!Xs.test(g)) {
365
- i.push(`第 ${v} 行的键名不合法(${g}):键名只许字母或下划线开头,认得的键只有 ${Ae.join(" / ")}`);
364
+ if (!no.test(g)) {
365
+ i.push(`第 ${v} 行的键名不合法(${g}):键名只许字母或下划线开头,认得的键只有 ${Pe.join(" / ")}`);
366
366
  continue;
367
367
  }
368
- if (!(Ae.includes(g) || Js.includes(g))) {
368
+ if (!(Pe.includes(g) || Ys.includes(g))) {
369
369
  i.push(
370
- `第 ${v} 行的键不认识(${g}):清单只有 ${Ae.join(" / ")} 这几个键(其中 ${gn.join(" / ")} 必填,requires 可以不写)`
370
+ `第 ${v} 行的键不认识(${g}):清单只有 ${Pe.join(" / ")} 这几个键(其中 ${$n.join(" / ")} 必填,requires 可以不写)`
371
371
  );
372
372
  continue;
373
373
  }
@@ -379,14 +379,14 @@ function ao(o, n = !0) {
379
379
  const A = y.slice(_ + 1).trim();
380
380
  if (g === "requires") {
381
381
  if (A) {
382
- i.push(`第 ${v} 行:requires 要写成下面缩进的那一块(不支持一行写完),例如 requires: 换行后缩进两格再写 ${zt.join(" / ")} 里的一个`);
382
+ i.push(`第 ${v} 行:requires 要写成下面缩进的那一块(不支持一行写完),例如 requires: 换行后缩进两格再写 ${Kt.join(" / ")} 里的一个`);
383
383
  continue;
384
384
  }
385
- const [R, O] = io(b, m, h, i);
385
+ const [R, O] = ro(b, m, h, i);
386
386
  m = O, a.requires = R;
387
387
  continue;
388
388
  }
389
- const B = to.exec(A);
389
+ const B = so.exec(A);
390
390
  if (B) {
391
391
  const R = [];
392
392
  for (; m < b.length; ) {
@@ -394,107 +394,107 @@ function ao(o, n = !0) {
394
394
  if (D.trim() && !/^\s/.test(D)) break;
395
395
  R.push(D), m += 1;
396
396
  }
397
- let O = oo(R);
397
+ let O = ao(R);
398
398
  B[1] === ">" && (O = O.split(`
399
399
  `).map((D) => D.trim()).filter(Boolean).join(" ")), a[g] = O;
400
400
  continue;
401
401
  }
402
- a[g] = ce(A);
402
+ a[g] = pe(A);
403
403
  }
404
404
  if (!n) return [a, i];
405
- for (const p of gn) {
405
+ for (const p of $n) {
406
406
  const v = a[p] ?? "";
407
407
  if (v === "") {
408
- i.push(`清单里缺少 ${p}(或者是空的):${so[p]}`);
408
+ i.push(`清单里缺少 ${p}(或者是空的):${io[p]}`);
409
409
  continue;
410
410
  }
411
- p === "id" && !Ys.test(v) ? i.push(`清单里的 id 不是 uuid:${v} —— 要 8-4-4-4-12 那种十六进制`) : p === "module" && !Zs.test(v) ? i.push(
411
+ p === "id" && !to.test(v) ? i.push(`清单里的 id 不是 uuid:${v} —— 要 8-4-4-4-12 那种十六进制`) : p === "module" && !eo.test(v) ? i.push(
412
412
  `清单里的 module 不合法:${v} —— 它同时是 Django 的 app label,所以只许小写字母与数字、必须以字母开头(不能有横线与下划线),例如 home / orders`
413
- ) : p === "name" && !no(v) && i.push(`清单里的 name 不合法:${v} —— 不能超过 ${We} 个字符、不能含控制字符(中文可以)`);
413
+ ) : p === "name" && !lo(v) && i.push(`清单里的 name 不合法:${v} —— 不能超过 ${Ye} 个字符、不能含控制字符(中文可以)`);
414
414
  }
415
415
  return [a, i];
416
416
  }
417
- function uo(o) {
418
- return Qs.test(o) && !o.split("/").includes("..");
417
+ function po(s) {
418
+ return Xs.test(s) && !s.split("/").includes("..");
419
419
  }
420
- function ro(o) {
421
- const n = [], i = o[Kt];
422
- i === void 0 ? n.push(`包里缺入口:必须有 ${Kt}(${kn(o)})`) : i.trim() || n.push(`${Kt} 不能是空文件`);
423
- const a = o[Re];
420
+ function fo(s) {
421
+ const n = [], i = s[Wt];
422
+ i === void 0 ? n.push(`包里缺入口:必须有 ${Wt}(${xn(s)})`) : i.trim() || n.push(`${Wt} 不能是空文件`);
423
+ const a = s[Le];
424
424
  let u = {};
425
425
  if (a === void 0)
426
- n.push(`包里缺清单:必须有 ${Re}(${kn(o)})`);
426
+ n.push(`包里缺清单:必须有 ${Le}(${xn(s)})`);
427
427
  else if (!a.trim())
428
- n.push(`${Re} 不能是空文件`);
428
+ n.push(`${Le} 不能是空文件`);
429
429
  else {
430
- const [b, m] = ao(a);
430
+ const [b, m] = co(a);
431
431
  u = b, n.push(...m);
432
432
  }
433
- for (const b of Object.keys(o))
434
- uo(b) || n.push(`文件名不合法:${b}(只许字母数字与 . _ - /,且不许 .. 与绝对路径)`);
433
+ for (const b of Object.keys(s))
434
+ po(b) || n.push(`文件名不合法:${b}(只许字母数字与 . _ - /,且不许 .. 与绝对路径)`);
435
435
  return { manifest: u, issues: n };
436
436
  }
437
- function co(o) {
437
+ function mo(s) {
438
438
  const n = [];
439
- if (o.length === 0)
439
+ if (s.length === 0)
440
440
  return n.push("一个块都没勾:请在「读回改动」的结果里勾上要保存的块"), { selected: 0, issues: n };
441
- for (const i of o) {
441
+ for (const i of s) {
442
442
  const a = i.name?.trim() || "(没有名字的块)";
443
- for (const u of ro(i.files ?? {}).issues) n.push(`${a}:${u}`);
443
+ for (const u of fo(i.files ?? {}).issues) n.push(`${a}:${u}`);
444
444
  }
445
- return { selected: o.length, issues: n };
445
+ return { selected: s.length, issues: n };
446
446
  }
447
- const po = "backend_open.py", fo = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
448
- function $n(o, n) {
449
- if (fo.test(o)) return;
450
- const i = (o.split(/[?#]/)[0] ?? "").replace(/^\.\//, "").replace(/^\/+/, "");
451
- if (i in n) return yn(i) ? void 0 : i;
447
+ const bo = "backend_open.py", vo = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
448
+ function Cn(s, n) {
449
+ if (vo.test(s)) return;
450
+ const i = (s.split(/[?#]/)[0] ?? "").replace(/^\.\//, "").replace(/^\/+/, "");
451
+ if (i in n) return wn(i) ? void 0 : i;
452
452
  const a = i.split("/").pop() ?? "";
453
- return a ? Object.keys(n).find((u) => !yn(u) && (u.split("/").pop() ?? "") === a) : void 0;
453
+ return a ? Object.keys(n).find((u) => !wn(u) && (u.split("/").pop() ?? "") === a) : void 0;
454
454
  }
455
- const zn = "\0mb:";
456
- function mo(o) {
457
- return `${zn}${o}\0`;
455
+ const Vn = "\0mb:";
456
+ function ho(s) {
457
+ return `${Vn}${s}\0`;
458
458
  }
459
- const bo = /<script\b([^>]*?)\bsrc\s*=\s*(["'])(.*?)\2([^>]*)>\s*<\/script\s*>/gi, vo = /<link\b([^>]*?)\bhref\s*=\s*(["'])(.*?)\2([^>]*?)\/?>/gi;
460
- function ho(o, n) {
461
- const i = [], a = (m) => (i.push(m), mo(i.length - 1));
462
- return { html: o.replace(bo, (m, p, v, h, y) => {
463
- const _ = $n(h, n);
459
+ const _o = /<script\b([^>]*?)\bsrc\s*=\s*(["'])(.*?)\2([^>]*)>\s*<\/script\s*>/gi, go = /<link\b([^>]*?)\bhref\s*=\s*(["'])(.*?)\2([^>]*?)\/?>/gi;
460
+ function yo(s, n) {
461
+ const i = [], a = (m) => (i.push(m), ho(i.length - 1));
462
+ return { html: s.replace(_o, (m, p, v, h, y) => {
463
+ const _ = Cn(h, n);
464
464
  return _ === void 0 ? m : a(`<script${p}${y}>
465
- ${Hn(n[_] ?? "")}
465
+ ${Wn(n[_] ?? "")}
466
466
  <\/script>`);
467
- }).replace(vo, (m, p, v, h, y) => {
467
+ }).replace(go, (m, p, v, h, y) => {
468
468
  if (!/\brel\s*=\s*(?:"|')?stylesheet/i.test(`${p}${y}`)) return m;
469
- const _ = $n(h, n);
469
+ const _ = Cn(h, n);
470
470
  return _ === void 0 ? m : a(`<style>
471
471
  ${n[_]}
472
472
  </style>`);
473
473
  }), slots: i };
474
474
  }
475
- function Hn(o) {
476
- return o.replace(/<\/(script)/gi, "<\\/$1");
475
+ function Wn(s) {
476
+ return s.replace(/<\/(script)/gi, "<\\/$1");
477
477
  }
478
- function Kn(o, n) {
479
- const i = /<\/head\s*>/i.exec(o);
480
- return i ? `${o.slice(0, i.index)}${n}${o.slice(i.index)}` : `${n}${o}`;
478
+ function Jn(s, n) {
479
+ const i = /<\/head\s*>/i.exec(s);
480
+ return i ? `${s.slice(0, i.index)}${n}${s.slice(i.index)}` : `${n}${s}`;
481
481
  }
482
- function _o(o, n) {
483
- return n ? Kn(o, `<script>
484
- ${Hn(n)}
482
+ function ko(s, n) {
483
+ return n ? Jn(s, `<script>
484
+ ${Wn(n)}
485
485
  <\/script>
486
- `) : o;
486
+ `) : s;
487
487
  }
488
- function wn(o, n) {
489
- return n ? Kn(o, `<style data-magic-block="host">
488
+ function En(s, n) {
489
+ return n ? Jn(s, `<style data-magic-block="host">
490
490
  ${n}
491
491
  </style>
492
- `) : o;
492
+ `) : s;
493
493
  }
494
- function go(o, n = {}) {
495
- const i = n.bootstrap ?? "", a = n.css ?? "", u = n.themeCss ?? "", b = o[Kt];
494
+ function $o(s, n = {}) {
495
+ const i = n.bootstrap ?? "", a = n.css ?? "", u = n.themeCss ?? "", b = s[Wt];
496
496
  if (b === void 0) return "";
497
- const { html: m, slots: p } = ho(b, o), v = _o(wn(wn(m, u), a), i), h = v.split(zn);
497
+ const { html: m, slots: p } = yo(b, s), v = ko(En(En(m, u), a), i), h = v.split(Vn);
498
498
  if (h.length === 1) return v;
499
499
  let y = h[0] ?? "";
500
500
  for (let _ = 1; _ < h.length; _ += 1) {
@@ -503,47 +503,47 @@ function go(o, n = {}) {
503
503
  }
504
504
  return y;
505
505
  }
506
- const Ht = /* @__PURE__ */ new Map();
507
- let Nt = null;
508
- const Ue = /* @__PURE__ */ new Set();
509
- function yo(o) {
510
- return Ue.add(o), () => {
511
- Ue.delete(o);
506
+ const Vt = /* @__PURE__ */ new Map();
507
+ let qt = null;
508
+ const Ve = /* @__PURE__ */ new Set();
509
+ function wo(s) {
510
+ return Ve.add(s), () => {
511
+ Ve.delete(s);
512
512
  };
513
513
  }
514
- function ko() {
515
- Ht.clear(), Nt = null;
516
- for (const o of Ue) o();
514
+ function xo() {
515
+ Vt.clear(), qt = null;
516
+ for (const s of Ve) s();
517
517
  }
518
- async function $o(o) {
519
- const n = [...new Set(o)].filter(Boolean);
520
- if (n.some((i) => !Ht.has(i))) {
521
- Nt && await Nt.catch(() => {
518
+ async function Co(s) {
519
+ const n = [...new Set(s)].filter(Boolean);
520
+ if (n.some((i) => !Vt.has(i))) {
521
+ qt && await qt.catch(() => {
522
522
  });
523
- const i = n.filter((a) => !Ht.has(a));
524
- i.length > 0 && (Nt = dt(`/magic-blocks/render?ids=${i.map(encodeURIComponent).join(",")}`).then((a) => {
525
- for (const u of a) u?.id && Ht.set(u.id, u);
523
+ const i = n.filter((a) => !Vt.has(a));
524
+ i.length > 0 && (qt = ct(`/magic-blocks/render?ids=${i.map(encodeURIComponent).join(",")}`).then((a) => {
525
+ for (const u of a) u?.id && Vt.set(u.id, u);
526
526
  return a;
527
527
  }).catch(() => []).finally(() => {
528
- Nt = null;
529
- }), await Nt.catch(() => {
528
+ qt = null;
529
+ }), await qt.catch(() => {
530
530
  }));
531
531
  }
532
- return n.map((i) => Ht.get(i)).filter((i) => !!i);
532
+ return n.map((i) => Vt.get(i)).filter((i) => !!i);
533
533
  }
534
- const Ot = "labull.css", ie = "CONTROLS.lock.html";
535
- function wo(o, n) {
534
+ const Ot = "labull.css", ue = "CONTROLS.lock.html";
535
+ function Eo(s, n) {
536
536
  const i = String(n || "");
537
537
  if (/@font-face|@keyframes/i.test(i)) return !0;
538
- const a = String(o || "");
538
+ const a = String(s || "");
539
539
  return /(^|[\s,>+~])(\.p-|\.pi(?![a-z])|\.pi-|\.labull-|:root|html(?![a-z-])|body(?![a-z-])|\*|:where\()/.test(a) ? !0 : /--(?:sp|surface|primary|text-color|content|highlight|focus-ring|p-)/.test(i);
540
540
  }
541
- function Vn(o, n, i) {
542
- for (let a = 0; a < o.length; a += 1) {
543
- const u = o[a], b = String(u.cssText || ""), m = String(u.selectorText || "");
541
+ function Gn(s, n, i) {
542
+ for (let a = 0; a < s.length; a += 1) {
543
+ const u = s[a], b = String(u.cssText || ""), m = String(u.selectorText || "");
544
544
  if (u.cssRules && u.cssRules.length > 0) {
545
545
  const p = [];
546
- if (Vn(u.cssRules, p, i), p.length === 0) continue;
546
+ if (Gn(u.cssRules, p, i), p.length === 0) continue;
547
547
  const v = b.slice(0, b.indexOf("{")).trim();
548
548
  n.push(`${v} {
549
549
  ${p.map((h) => " " + h).join(`
@@ -551,11 +551,11 @@ ${p.map((h) => " " + h).join(`
551
551
  }`);
552
552
  continue;
553
553
  }
554
- wo(m, b) && (n.push(b), i.n += 1);
554
+ Eo(m, b) && (n.push(b), i.n += 1);
555
555
  }
556
556
  }
557
- function Wn() {
558
- const o = [], n = [], i = { n: 0 };
557
+ function Qn() {
558
+ const s = [], n = [], i = { n: 0 };
559
559
  let a = 0;
560
560
  const u = typeof document > "u" ? [] : Array.from(document.styleSheets);
561
561
  for (const m of u) {
@@ -569,7 +569,7 @@ function Wn() {
569
569
  }
570
570
  if (!v || v.length === 0) continue;
571
571
  const h = [];
572
- Vn(v, h, i), h.length !== 0 && (a += 1, o.push(`/* ── ${p} ── */`, ...h));
572
+ Gn(v, h, i), h.length !== 0 && (a += 1, s.push(`/* ── ${p} ── */`, ...h));
573
573
  }
574
574
  return { css: [
575
575
  "/* 生成物:每次导出都会重写,别手改。",
@@ -580,19 +580,19 @@ function Wn() {
580
580
  " *",
581
581
  " * 怎么用(块里):**什么都不用加** —— 宿主会把这一份注入每个块的 iframe(`MagicBlockHost` 的 `theme` prop),",
582
582
  ' * 所以直接写类名就行:`<button class="p-button">` / `<input class="p-inputtext">` / `<span class="p-tag">`。',
583
- " * 这一份放在开发包里是给你**查 / 对照 / 抄**用的(`" + ie + "` 里的每一块 markup 都能直接用)。",
583
+ " * 这一份放在开发包里是给你**查 / 对照 / 抄**用的(`" + ue + "` 里的每一块 markup 都能直接用)。",
584
584
  " * ⚠️ 别把它当块包文件塞进块里:它 500 KB 上下,而且宿主已经注入了一份(重复只会更慢)。",
585
585
  " * ⚠️ 块里**只有 CSS,没有 JS 组件**:下拉 / 日期 / 弹窗那些要装了 PrimeVue 才有行为,",
586
586
  " * 这里能用的是类名(按钮、输入框、标签、面板、表格、图标)。",
587
587
  " */",
588
588
  ""
589
589
  ].join(`
590
- `) + o.join(`
590
+ `) + s.join(`
591
591
  `) + `
592
592
  `, sheets: a, skipped: n, rules: i.n };
593
593
  }
594
- function xo() {
595
- const o = '<button class="p-button" type="button">主要按钮</button>', n = (m, p, v) => ` <li class="labull-step${m ? ` ${m}` : ""}">
594
+ function So() {
595
+ const s = '<button class="p-button" type="button">主要按钮</button>', n = (m, p, v) => ` <li class="labull-step${m ? ` ${m}` : ""}">
596
596
  <span class="labull-step-node"></span>
597
597
  <span class="labull-step-label">${p}</span>
598
598
  <span class="labull-step-desc">${v}</span>
@@ -606,7 +606,7 @@ function xo() {
606
606
  ["", "开发完成", "待处理"],
607
607
  ["", "验收完成", "待处理"]
608
608
  ]), b = [
609
- ["按钮", o],
609
+ ["按钮", s],
610
610
  ["次要按钮", '<button class="p-button p-button-outlined" type="button">次要按钮</button>'],
611
611
  ["纯文字按钮", '<button class="p-button p-button-text" type="button">纯文字</button>'],
612
612
  ["小按钮 + 图标", '<button class="p-button p-button-sm" type="button"><i class="pi pi-refresh"></i> 刷新</button>'],
@@ -686,21 +686,21 @@ ${b}
686
686
  </html>
687
687
  `;
688
688
  }
689
- const jt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Set(), Co = 4e3;
690
- let He = "", le = null;
691
- function xn() {
692
- for (const o of ze) o();
689
+ const jt = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Set(), To = 4e3;
690
+ let Je = "", ae = null;
691
+ function Sn() {
692
+ for (const s of We) s();
693
693
  }
694
- function Eo(o) {
695
- return ze.add(o), () => {
696
- ze.delete(o);
694
+ function Bo(s) {
695
+ return We.add(s), () => {
696
+ We.delete(s);
697
697
  };
698
698
  }
699
- function Oe() {
700
- return He;
699
+ function Ie() {
700
+ return Je;
701
701
  }
702
- function So(o, n) {
703
- const i = String(o || "").trim(), a = String(n || "").trim();
702
+ function Mo(s, n) {
703
+ const i = String(s || "").trim(), a = String(n || "").trim();
704
704
  if (!i || !a) return () => {
705
705
  };
706
706
  let u = jt.get(i);
@@ -709,37 +709,37 @@ function So(o, n) {
709
709
  b && (b.delete(a), b.size === 0 && jt.delete(i));
710
710
  };
711
711
  }
712
- function Ke(o, n, i) {
713
- const a = jt.get(String(o || ""));
712
+ function Ge(s, n, i) {
713
+ const a = jt.get(String(s || ""));
714
714
  if (!a) return null;
715
715
  for (const u of a)
716
716
  if (u !== n && !(i && !i(u)))
717
717
  return u;
718
718
  return null;
719
719
  }
720
- function To(o) {
721
- return [...jt.get(String(o || "")) ?? []];
720
+ function Ro(s) {
721
+ return [...jt.get(String(s || "")) ?? []];
722
722
  }
723
- function Bo(o, n, i) {
724
- const a = jt.get(String(o || ""));
725
- return !a || a.size === 0 || a.has(n) ? null : Ke(o, n, i);
723
+ function Ao(s, n, i) {
724
+ const a = jt.get(String(s || ""));
725
+ return !a || a.size === 0 || a.has(n) ? null : Ge(s, n, i);
726
726
  }
727
- function Jn(o, n = Co) {
728
- He = String(o || ""), le !== null && clearTimeout(le), le = setTimeout(() => {
729
- le = null, He = "", xn();
730
- }, Math.max(1, n)), xn();
727
+ function Yn(s, n = To) {
728
+ Je = String(s || ""), ae !== null && clearTimeout(ae), ae = setTimeout(() => {
729
+ ae = null, Je = "", Sn();
730
+ }, Math.max(1, n)), Sn();
731
731
  }
732
- const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"], Ao = { class: "mb__state" }, Oo = { class: "mb__brief" }, jo = {
732
+ const Oo = ["data-magic-block", "data-magic-module"], jo = ["srcdoc", "title"], Lo = { class: "mb__state" }, Po = { class: "mb__brief" }, Io = {
733
733
  key: 0,
734
734
  class: "mb__reason"
735
- }, Lo = {
735
+ }, No = {
736
736
  key: 1,
737
737
  class: "mb__issues"
738
- }, Po = {
738
+ }, Do = {
739
739
  key: 2,
740
740
  class: "mb__ring",
741
741
  "aria-hidden": "true"
742
- }, Io = ["title", "aria-label"], No = ["title", "aria-label"], Do = ["title", "aria-label"], qo = ["title", "aria-label"], Fo = /* @__PURE__ */ Ve({
742
+ }, qo = ["title", "aria-label"], Fo = ["title", "aria-label"], Uo = ["title", "aria-label"], zo = ["title", "aria-label"], Ho = /* @__PURE__ */ Qe({
743
743
  __name: "MagicBlockHost",
744
744
  props: {
745
745
  uuid: {},
@@ -747,20 +747,20 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
747
747
  module: { default: "" },
748
748
  theme: { type: Boolean, default: !0 }
749
749
  },
750
- setup(o) {
751
- const n = o, i = qs(), a = On(), { isStaff: u } = jn(), b = E(null), m = E(null), p = E(null), v = E(!1), h = E(0), y = E(0);
750
+ setup(s) {
751
+ const n = s, i = zs(), a = Pn(), { isStaff: u } = In(), b = E(null), m = E(null), p = E(null), v = E(!1), h = E(0), y = E(0);
752
752
  let _ = null, g = null, S = null, A = null, B = null, R = null;
753
- const O = I(() => n.name.trim() || n.uuid), D = I(() => p.value?.state ?? ""), st = I(() => D.value === "invalid" ? "校验不通过" : D.value === "draft" ? "未开发" : O.value), ot = I(() => (p.value?.brief ?? "").trim() || (p.value?.name ?? "").trim() || O.value), $t = I(() => (p.value?.reason ?? "").trim()), wt = I(() => p.value?.issues ?? []), T = I(() => Math.max(y.value, h.value, 1)), qt = I(() => ({ height: `${T.value}px` })), ft = I(() => {
753
+ const O = I(() => n.name.trim() || n.uuid), D = I(() => p.value?.state ?? ""), st = I(() => D.value === "invalid" ? "校验不通过" : D.value === "draft" ? "未开发" : O.value), ot = I(() => (p.value?.brief ?? "").trim() || (p.value?.name ?? "").trim() || O.value), $t = I(() => (p.value?.reason ?? "").trim()), wt = I(() => p.value?.issues ?? []), T = I(() => Math.max(y.value, h.value, 1)), Ut = I(() => ({ height: `${T.value}px` })), pt = I(() => {
754
754
  const x = {};
755
- for (const [M, q] of Object.entries(p.value?.files ?? {})) M !== po && (x[M] = q);
755
+ for (const [M, q] of Object.entries(p.value?.files ?? {})) M !== bo && (x[M] = q);
756
756
  return x;
757
- }), xt = I(() => D.value === "ok" && typeof ft.value[Kt] == "string");
757
+ }), xt = I(() => D.value === "ok" && typeof pt.value[Wt] == "string");
758
758
  let rt = null;
759
759
  function V() {
760
760
  if (!n.theme) return "";
761
761
  if (rt !== null || (rt = "", typeof document > "u")) return rt;
762
762
  try {
763
- rt = Wn().css;
763
+ rt = Qn().css;
764
764
  } catch {
765
765
  rt = "";
766
766
  }
@@ -768,8 +768,8 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
768
768
  }
769
769
  const z = I(() => {
770
770
  if (!xt.value) return "";
771
- const x = { bootstrap: zs, css: Us }, M = V();
772
- return M && (x.themeCss = M), go(ft.value, x);
771
+ const x = { bootstrap: Vs, css: Ks }, M = V();
772
+ return M && (x.themeCss = M), $o(pt.value, x);
773
773
  });
774
774
  function lt() {
775
775
  return { key: i.key, path: i.path, params: i.params, query: i.query };
@@ -780,12 +780,12 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
780
780
  const q = a.getRoutes().map((X) => X.path);
781
781
  throw new Error(`这个应用里没有页面 ${x}。能跳的页面只有:${q.length > 0 ? q.join(" / ") : "(还没有配路由)"}`);
782
782
  }
783
- return qe(x) || M.fullPath;
783
+ return He(x) || M.fullPath;
784
784
  }
785
- function ht() {
785
+ function vt() {
786
786
  S?.(), S = null;
787
787
  const x = m.value;
788
- x && (S = Ws(x, {
788
+ x && (S = Qs(x, {
789
789
  uuid: n.uuid,
790
790
  onHeight: (M) => {
791
791
  h.value = M;
@@ -798,26 +798,26 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
798
798
  }));
799
799
  }
800
800
  async function Et() {
801
- const x = n.uuid, M = await $o([x]);
801
+ const x = n.uuid, M = await Co([x]);
802
802
  x === n.uuid && (p.value = M.find((q) => q.id === x) ?? null);
803
803
  }
804
- function Vt() {
804
+ function Jt() {
805
805
  window.dispatchEvent(new CustomEvent("magic-block:open-console", { detail: { uuid: n.uuid } }));
806
806
  }
807
- function Wt(x = !1) {
808
- x && B?.(), B = So(n.uuid, i.key);
807
+ function Gt(x = !1) {
808
+ x && B?.(), B = Mo(n.uuid, i.key);
809
809
  }
810
- const it = (x) => !Ln(x, a), W = I(() => {
810
+ const it = (x) => !Nn(x, a), W = I(() => {
811
811
  if (!u.value) return "";
812
- const x = Ke(n.uuid, i.key, it);
812
+ const x = Ge(n.uuid, i.key, it);
813
813
  return x ? `管理员:切到还挂着这个块的标签 ${x}(点一下这一块会亮红框)` : "管理员:这个块只在这一条标签里挂着 —— 点一下会亮几秒红框";
814
814
  });
815
815
  function L() {
816
816
  if (!u.value) return;
817
- const x = Ke(n.uuid, i.key, it);
818
- Jn(n.uuid), x && qe(x);
817
+ const x = Ge(n.uuid, i.key, it);
818
+ Yn(n.uuid), x && He(x);
819
819
  }
820
- function mt(x) {
820
+ function ft(x) {
821
821
  let M = x.parentElement;
822
822
  for (; M; ) {
823
823
  if (getComputedStyle(M).overflowY !== "visible" && M.clientHeight > 0) return M;
@@ -828,8 +828,8 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
828
828
  function G() {
829
829
  const x = b.value;
830
830
  if (!x) return 0;
831
- const M = mt(x), q = getComputedStyle(M), X = parseFloat(q.paddingTop) || 0, Jt = parseFloat(q.paddingBottom) || 0, Gt = parseFloat(q.borderTopWidth) || 0, F = M === document.documentElement, pe = F ? Math.max(0, window.innerHeight - X - Jt) : Math.max(0, M.clientHeight - X - Jt), fe = F ? X : M.getBoundingClientRect().top + Gt + X, me = F ? window.scrollY || 0 : M.scrollTop, be = x.getBoundingClientRect().top - fe + me;
832
- return Math.max(0, Math.floor(pe - be));
831
+ const M = ft(x), q = getComputedStyle(M), X = parseFloat(q.paddingTop) || 0, Qt = parseFloat(q.paddingBottom) || 0, Yt = parseFloat(q.borderTopWidth) || 0, F = M === document.documentElement, me = F ? Math.max(0, window.innerHeight - X - Qt) : Math.max(0, M.clientHeight - X - Qt), be = F ? X : M.getBoundingClientRect().top + Yt + X, ve = F ? window.scrollY || 0 : M.scrollTop, he = x.getBoundingClientRect().top - be + ve;
832
+ return Math.max(0, Math.floor(me - he));
833
833
  }
834
834
  function Q() {
835
835
  if (!i.active.value || !b.value) return;
@@ -838,36 +838,36 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
838
838
  }
839
839
  function H() {
840
840
  if (!b.value) return;
841
- const x = mt(b.value);
841
+ const x = ft(b.value);
842
842
  _ !== x && (_ = x, g?.disconnect(), g = null), Q(), !(g || typeof ResizeObserver > "u") && (g = new ResizeObserver(() => Q()), g.observe(x));
843
843
  }
844
- return It(m, () => ht()), It(z, () => {
844
+ return Dt(m, () => vt()), Dt(z, () => {
845
845
  h.value = 0, y.value = 0, H();
846
- }, { flush: "post" }), It(() => n.uuid, () => {
847
- vn().then(() => H());
848
- }), It(() => i.active.value, (x) => {
849
- x && vn().then(() => {
846
+ }, { flush: "post" }), Dt(() => n.uuid, () => {
847
+ gn().then(() => H());
848
+ }), Dt(() => i.active.value, (x) => {
849
+ x && gn().then(() => {
850
850
  H();
851
851
  const M = b.value;
852
852
  !M || !M.isConnected || M.offsetParent === null || v.value && M.scrollIntoView({ behavior: "smooth", block: "center" });
853
853
  });
854
- }), It(() => n.uuid, () => {
855
- h.value = 0, p.value = null, Wt(!0), v.value = Oe() === n.uuid, Et();
856
- }), Mn(() => {
857
- A = yo(() => void Et()), R = Eo(() => {
858
- v.value = Oe() === n.uuid;
859
- }), v.value = Oe() === n.uuid, Wt(), H(), Et();
860
- }), Rn(() => {
854
+ }), Dt(() => n.uuid, () => {
855
+ h.value = 0, p.value = null, Gt(!0), v.value = Ie() === n.uuid, Et();
856
+ }), On(() => {
857
+ A = wo(() => void Et()), R = Bo(() => {
858
+ v.value = Ie() === n.uuid;
859
+ }), v.value = Ie() === n.uuid, Gt(), H(), Et();
860
+ }), jn(() => {
861
861
  g?.disconnect(), g = null, A?.(), A = null, R?.(), R = null, B?.(), B = null, S?.(), S = null;
862
- }), (x, M) => (c(), d("div", {
862
+ }), (x, M) => (r(), c("div", {
863
863
  ref_key: "el",
864
864
  ref: b,
865
865
  class: K(["mb", { "mb--admin": Z(u), "mb--lit": Z(u) && v.value }]),
866
- style: An(qt.value),
867
- "data-magic-block": o.uuid,
868
- "data-magic-module": o.module
866
+ style: Ln(Ut.value),
867
+ "data-magic-block": s.uuid,
868
+ "data-magic-module": s.module
869
869
  }, [
870
- xt.value ? (c(), d("iframe", {
870
+ xt.value ? (r(), c("iframe", {
871
871
  key: 0,
872
872
  ref_key: "frame",
873
873
  ref: m,
@@ -876,16 +876,16 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
876
876
  title: O.value,
877
877
  scrolling: "no",
878
878
  sandbox: "allow-scripts allow-forms allow-modals allow-popups allow-downloads"
879
- }, null, 8, Ro)) : (c(), d("div", {
879
+ }, null, 8, jo)) : (r(), c("div", {
880
880
  key: 1,
881
881
  class: K(["mb__empty", { "mb__empty--off": D.value === "invalid", "mb__empty--draft": D.value === "draft" }]),
882
882
  onClick: L
883
883
  }, [
884
- l("p", Ao, f(st.value), 1),
885
- l("p", Oo, f(ot.value), 1),
886
- D.value === "invalid" && $t.value ? (c(), d("p", jo, f($t.value), 1)) : $("", !0),
887
- D.value === "invalid" && wt.value.length > 0 ? (c(), d("ul", Lo, [
888
- (c(!0), d(C, null, j(wt.value, (q, X) => (c(), d("li", {
884
+ l("p", Lo, f(st.value), 1),
885
+ l("p", Po, f(ot.value), 1),
886
+ D.value === "invalid" && $t.value ? (r(), c("p", Io, f($t.value), 1)) : $("", !0),
887
+ D.value === "invalid" && wt.value.length > 0 ? (r(), c("ul", No, [
888
+ (r(!0), c(C, null, j(wt.value, (q, X) => (r(), c("li", {
889
889
  key: X,
890
890
  class: "mb__issue"
891
891
  }, f(q.message), 1))), 128))
@@ -893,91 +893,91 @@ const Mo = ["data-magic-block", "data-magic-module"], Ro = ["srcdoc", "title"],
893
893
  l("button", {
894
894
  class: "mb__go",
895
895
  type: "button",
896
- onClick: Ne(Vt, ["stop"])
896
+ onClick: Ue(Jt, ["stop"])
897
897
  }, "去管理台")
898
898
  ], 2)),
899
- Z(u) ? (c(), d("span", Po)) : $("", !0),
900
- Z(u) && xt.value ? (c(), d(C, { key: 3 }, [
899
+ Z(u) ? (r(), c("span", Do)) : $("", !0),
900
+ Z(u) && xt.value ? (r(), c(C, { key: 3 }, [
901
901
  l("button", {
902
902
  class: "mb__grab mb__grab--top",
903
903
  type: "button",
904
904
  title: W.value,
905
905
  "aria-label": W.value,
906
906
  onClick: L
907
- }, null, 8, Io),
907
+ }, null, 8, qo),
908
908
  l("button", {
909
909
  class: "mb__grab mb__grab--right",
910
910
  type: "button",
911
911
  title: W.value,
912
912
  "aria-label": W.value,
913
913
  onClick: L
914
- }, null, 8, No),
914
+ }, null, 8, Fo),
915
915
  l("button", {
916
916
  class: "mb__grab mb__grab--bottom",
917
917
  type: "button",
918
918
  title: W.value,
919
919
  "aria-label": W.value,
920
920
  onClick: L
921
- }, null, 8, Do),
921
+ }, null, 8, Uo),
922
922
  l("button", {
923
923
  class: "mb__grab mb__grab--left",
924
924
  type: "button",
925
925
  title: W.value,
926
926
  "aria-label": W.value,
927
927
  onClick: L
928
- }, null, 8, qo)
928
+ }, null, 8, zo)
929
929
  ], 64)) : $("", !0)
930
- ], 14, Mo));
930
+ ], 14, Oo));
931
931
  }
932
- }), Uo = /* @__PURE__ */ Pn(Fo, [["__scopeId", "data-v-7bfe650a"]]);
933
- function pt(o) {
934
- return typeof o == "string" ? o.trim() : "";
932
+ }), Ko = /* @__PURE__ */ Dn(Ho, [["__scopeId", "data-v-7bfe650a"]]);
933
+ function dt(s) {
934
+ return typeof s == "string" ? s.trim() : "";
935
935
  }
936
- function Gn(o) {
937
- const n = pt(o?.meta?.blockUuid);
936
+ function Zn(s) {
937
+ const n = dt(s?.meta?.blockUuid);
938
938
  if (n) return n;
939
- const i = o?.props;
939
+ const i = s?.props;
940
940
  if (!i || typeof i != "object" || Array.isArray(i)) return "";
941
941
  const a = i.default;
942
- return !a || typeof a != "object" || Array.isArray(a) ? "" : pt(a.uuid);
942
+ return !a || typeof a != "object" || Array.isArray(a) ? "" : dt(a.uuid);
943
943
  }
944
- function zo(o, n) {
944
+ function Vo(s, n) {
945
945
  const i = [], a = /* @__PURE__ */ new Set();
946
- for (const u of o ?? []) {
946
+ for (const u of s ?? []) {
947
947
  if (!u || u.redirect || u.components?.default !== n) continue;
948
- const b = Gn(u);
948
+ const b = Zn(u);
949
949
  if (!b || a.has(b)) continue;
950
950
  a.add(b);
951
- const m = pt(u.path), p = pt(u.meta?.title) || pt(u.meta?.sub) || m;
952
- i.push({ uuid: b, path: m, title: p, module: pt(u.meta?.module), brief: pt(u.meta?.brief) });
951
+ const m = dt(u.path), p = dt(u.meta?.title) || dt(u.meta?.sub) || m;
952
+ i.push({ uuid: b, path: m, title: p, module: dt(u.meta?.module), brief: dt(u.meta?.brief) });
953
953
  }
954
954
  return i;
955
955
  }
956
- function Ho(o, n, i) {
956
+ function Wo(s, n, i) {
957
957
  const a = /* @__PURE__ */ new Set();
958
- for (const u of i ?? []) a.add(pt(u));
959
- return zo(o, n).filter((u) => !a.has(u.uuid));
958
+ for (const u of i ?? []) a.add(dt(u));
959
+ return Vo(s, n).filter((u) => !a.has(u.uuid));
960
960
  }
961
- const Qn = "__labullBlockPage";
962
- function Ko(o) {
963
- return typeof o == "object" && o !== null && o[Qn] === !0;
961
+ const Xn = "__labullBlockPage";
962
+ function Jo(s) {
963
+ return typeof s == "object" && s !== null && s[Xn] === !0;
964
964
  }
965
- const Cn = '块标签里的东西(标题 / 按钮 / 参数展示 / 第二块区域)全部写进块自己的 index.open.html:页面这一层只回答"哪条地址是哪个块"。';
966
- function Vo(o, n) {
967
- const i = o?.components?.default;
968
- return i == null ? !1 : Ko(i) ? !0 : n != null && i === n;
965
+ const Tn = '块标签里的东西(标题 / 按钮 / 参数展示 / 第二块区域)全部写进块自己的 index.open.html:页面这一层只回答"哪条地址是哪个块"。';
966
+ function Go(s, n) {
967
+ const i = s?.components?.default;
968
+ return i == null ? !1 : Jo(i) ? !0 : n != null && i === n;
969
969
  }
970
- function Wo(o, n) {
970
+ function Qo(s, n) {
971
971
  const i = [];
972
- if (!o || o.length === 0) return i;
973
- const a = o[o.length - 1], u = pt(a?.path);
974
- if (o.findIndex((p) => Vo(p, n)) !== o.length - 1)
972
+ if (!s || s.length === 0) return i;
973
+ const a = s[s.length - 1], u = dt(a?.path);
974
+ if (s.findIndex((p) => Go(p, n)) !== s.length - 1)
975
975
  return i.push({
976
976
  code: "wrapped",
977
977
  path: u,
978
- message: `这条路由(${u || "拿不到路径"})渲染的不是块页本身:块页被包在别的组件里(包装页 / 渲染函数),或者被当成了某一层的布局。${Cn}`
978
+ message: `这条路由(${u || "拿不到路径"})渲染的不是块页本身:块页被包在别的组件里(包装页 / 渲染函数),或者被当成了某一层的布局。${Tn}`
979
979
  }), i;
980
- o.length > 1 && i.push({
980
+ s.length > 1 && i.push({
981
981
  code: "nested",
982
982
  path: u,
983
983
  message: `块路由(${u})挂在别的路由下面:父级 template 里除了 <RouterView> 还有别的东西。块路由必须是顶层那一条。`
@@ -986,38 +986,38 @@ function Wo(o, n) {
986
986
  return m.length > 0 && i.push({
987
987
  code: "extra-views",
988
988
  path: u,
989
- message: `这条路由(${u})除了默认视图还挂了具名视图(${m.join(" / ")})—— 那正是"在块旁边摆第二块内容"。${Cn}`
990
- }), Gn(a) || i.push({
989
+ message: `这条路由(${u})除了默认视图还挂了具名视图(${m.join(" / ")})—— 那正是"在块旁边摆第二块内容"。${Tn}`
990
+ }), Zn(a) || i.push({
991
991
  code: "no-uuid",
992
992
  path: u,
993
993
  message: `这条路由(${u})挂了块页却没说这是哪个块:写 meta.blockUuid(推荐)或 props: { uuid },否则这一页渲染出来是"未开发"。`
994
994
  }), i;
995
995
  }
996
- function En(o) {
997
- const n = String(o ?? "").split(/[?#]/)[0];
996
+ function Bn(s) {
997
+ const n = String(s ?? "").split(/[?#]/)[0];
998
998
  return n.startsWith("/") ? n.split("/").filter(Boolean) : null;
999
999
  }
1000
- function Sn(o) {
1001
- return o.startsWith(":") || o === "*" || o.startsWith("{") && o.endsWith("}");
1000
+ function Mn(s) {
1001
+ return s.startsWith(":") || s === "*" || s.startsWith("{") && s.endsWith("}");
1002
1002
  }
1003
- function Jo(o, n) {
1004
- const i = En(o), a = En(n);
1003
+ function Yo(s, n) {
1004
+ const i = Bn(s), a = Bn(n);
1005
1005
  return i === null || a === null || i.length !== a.length ? !1 : i.every((u, b) => {
1006
1006
  const m = a[b];
1007
- return Sn(u) || Sn(m) || u === m;
1007
+ return Mn(u) || Mn(m) || u === m;
1008
1008
  });
1009
1009
  }
1010
- function Go(o, n) {
1010
+ function Zo(s, n) {
1011
1011
  const i = [];
1012
1012
  for (const u of n ?? []) {
1013
- const b = pt(u?.path);
1013
+ const b = dt(u?.path);
1014
1014
  b && i.push(b);
1015
1015
  }
1016
1016
  if (i.length === 0) return [];
1017
1017
  const a = [];
1018
- for (const u of o ?? []) {
1019
- const b = pt(u);
1020
- b && (i.some((m) => Jo(b, m)) || a.push({
1018
+ for (const u of s ?? []) {
1019
+ const b = dt(u);
1020
+ b && (i.some((m) => Yo(b, m)) || a.push({
1021
1021
  code: "no-page",
1022
1022
  path: b,
1023
1023
  message: `依赖声明里写了要跳到 ${b},但这个应用的路由表里没有这条地址 —— 那个页面一旦改名 / 搬走,这一步就是 404(而且不会报错)。改法:把声明改成真实存在的地址,或者去路由表里补上那一条。`
@@ -1025,7 +1025,7 @@ function Go(o, n) {
1025
1025
  }
1026
1026
  return a;
1027
1027
  }
1028
- const Yn = /* @__PURE__ */ Ve({
1028
+ const ts = /* @__PURE__ */ Qe({
1029
1029
  __name: "MagicBlockPage",
1030
1030
  props: {
1031
1031
  uuid: { default: "" },
@@ -1033,32 +1033,32 @@ const Yn = /* @__PURE__ */ Ve({
1033
1033
  module: { default: "" },
1034
1034
  theme: { type: Boolean, default: !0 }
1035
1035
  },
1036
- setup(o) {
1037
- const n = o, i = Ds(), a = I(() => {
1036
+ setup(s) {
1037
+ const n = s, i = Us(), a = I(() => {
1038
1038
  const m = i.meta?.blockUuid;
1039
1039
  return typeof m == "string" && m.trim() ? m.trim() : n.uuid;
1040
- }), u = Ls()?.type, b = Wo(i.matched, u);
1040
+ }), u = Ns()?.type, b = Qo(i.matched, u);
1041
1041
  if (b.length > 0) {
1042
1042
  const m = b.map((p) => `[labull] ${p.message}`).join(`
1043
1043
  `);
1044
1044
  console.error(m);
1045
1045
  }
1046
- return (m, p) => (c(), Ps(Uo, {
1046
+ return (m, p) => (r(), Ds(Ko, {
1047
1047
  uuid: a.value,
1048
- name: o.name,
1049
- module: o.module,
1050
- theme: o.theme
1048
+ name: s.name,
1049
+ module: s.module,
1050
+ theme: s.theme
1051
1051
  }, null, 8, ["uuid", "name", "module", "theme"]));
1052
1052
  }
1053
1053
  });
1054
- function kt(o) {
1055
- return String(o ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1054
+ function kt(s) {
1055
+ return String(s ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1056
1056
  }
1057
- function Qo(o) {
1058
- return /^(https?:\/\/|mailto:|\/(?!\/))/i.test(String(o ?? "").trim());
1057
+ function Xo(s) {
1058
+ return /^(https?:\/\/|mailto:|\/(?!\/))/i.test(String(s ?? "").trim());
1059
1059
  }
1060
- function Dt(o) {
1061
- const n = String(o ?? "");
1060
+ function Ft(s) {
1061
+ const n = String(s ?? "");
1062
1062
  let i = "", a = 0;
1063
1063
  for (; a < n.length; ) {
1064
1064
  const u = n.slice(a), b = /^`([^`]+)`/.exec(u);
@@ -1072,8 +1072,8 @@ function Dt(o) {
1072
1072
  continue;
1073
1073
  }
1074
1074
  const p = /^\[([^\]]*)\]\(([^)\s]*)\)/.exec(u);
1075
- if (p && Qo(p[2])) {
1076
- i += `<a href="${kt(p[2])}" target="_blank" rel="noopener noreferrer">${Dt(p[1])}</a>`, a += p[0].length;
1075
+ if (p && Xo(p[2])) {
1076
+ i += `<a href="${kt(p[2])}" target="_blank" rel="noopener noreferrer">${Ft(p[1])}</a>`, a += p[0].length;
1077
1077
  continue;
1078
1078
  }
1079
1079
  const v = /^\*\*([^*]+)\*\*/.exec(u);
@@ -1090,15 +1090,15 @@ function Dt(o) {
1090
1090
  }
1091
1091
  return i;
1092
1092
  }
1093
- function Yo(o) {
1094
- const n = String(o ?? "").replace(/\r\n?/g, `
1093
+ function tl(s) {
1094
+ const n = String(s ?? "").replace(/\r\n?/g, `
1095
1095
  `).split(`
1096
1096
  `), i = [];
1097
1097
  let a = "", u = [], b = [], m = !1, p = [];
1098
1098
  const v = () => {
1099
- u.length > 0 && (i.push(`<p>${u.map((S) => Dt(S)).join("<br>")}</p>`), u = []);
1099
+ u.length > 0 && (i.push(`<p>${u.map((S) => Ft(S)).join("<br>")}</p>`), u = []);
1100
1100
  }, h = () => {
1101
- b.length > 0 && (i.push(`<blockquote>${b.map((S) => Dt(S)).join("<br>")}</blockquote>`), b = []);
1101
+ b.length > 0 && (i.push(`<blockquote>${b.map((S) => Ft(S)).join("<br>")}</blockquote>`), b = []);
1102
1102
  }, y = () => {
1103
1103
  a && (i.push(`</${a}>`), a = "");
1104
1104
  }, _ = () => {
@@ -1125,7 +1125,7 @@ function Yo(o) {
1125
1125
  if (B) {
1126
1126
  _();
1127
1127
  const st = B[1].length;
1128
- i.push(`<h${st}>${Dt(B[2])}</h${st}>`);
1128
+ i.push(`<h${st}>${Ft(B[2])}</h${st}>`);
1129
1129
  continue;
1130
1130
  }
1131
1131
  if (/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(A)) {
@@ -1134,12 +1134,12 @@ function Yo(o) {
1134
1134
  }
1135
1135
  const R = /^\s*[-*+]\s+(.*)$/.exec(A);
1136
1136
  if (R) {
1137
- v(), h(), g("ul"), i.push(`<li>${Dt(R[1])}</li>`);
1137
+ v(), h(), g("ul"), i.push(`<li>${Ft(R[1])}</li>`);
1138
1138
  continue;
1139
1139
  }
1140
1140
  const O = /^\s*\d+[.)]\s+(.*)$/.exec(A);
1141
1141
  if (O) {
1142
- v(), h(), g("ol"), i.push(`<li>${Dt(O[1])}</li>`);
1142
+ v(), h(), g("ol"), i.push(`<li>${Ft(O[1])}</li>`);
1143
1143
  continue;
1144
1144
  }
1145
1145
  const D = /^\s*>\s?(.*)$/.exec(A);
@@ -1152,33 +1152,33 @@ function Yo(o) {
1152
1152
  return m && i.push(`<pre><code>${kt(p.join(`
1153
1153
  `))}</code></pre>`), _(), i.join("");
1154
1154
  }
1155
- function Tn(o, n = 120) {
1156
- const a = (String(o ?? "").replace(/\r\n?/g, `
1155
+ function Rn(s, n = 120) {
1156
+ const a = (String(s ?? "").replace(/\r\n?/g, `
1157
1157
  `).split(`
1158
1158
  `).map((u) => u.trim()).find((u) => u.length > 0) ?? "").replace(/^#{1,6}\s+/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^>\s?/, "").replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/_([^_]+)_/g, "$1").replace(/\s+/g, " ").trim();
1159
1159
  return a.length > n ? `${a.slice(0, n)}…` : a;
1160
1160
  }
1161
- const je = "pages.lock.ts";
1162
- function Zo(o, n) {
1163
- const i = String(o || "").split(/[^A-Za-z0-9]+/).filter(Boolean);
1161
+ const Ne = "pages.lock.ts";
1162
+ function el(s, n) {
1163
+ const i = String(s || "").split(/[^A-Za-z0-9]+/).filter(Boolean);
1164
1164
  if (i.length === 0) return `Page${n + 1}`;
1165
1165
  const a = i.map((u) => u[0].toUpperCase() + u.slice(1)).join("");
1166
1166
  return /^[0-9]/.test(a) ? `P${a}` : a;
1167
1167
  }
1168
- function Xo(o, n) {
1169
- if (!n.has(o))
1170
- return n.add(o), o;
1168
+ function nl(s, n) {
1169
+ if (!n.has(s))
1170
+ return n.add(s), s;
1171
1171
  let i = 2;
1172
- for (; n.has(`${o}${i}`); ) i += 1;
1173
- const a = `${o}${i}`;
1172
+ for (; n.has(`${s}${i}`); ) i += 1;
1173
+ const a = `${s}${i}`;
1174
1174
  return n.add(a), a;
1175
1175
  }
1176
- function tl(o) {
1177
- const n = (o ?? []).filter((b) => b && typeof b.path == "string" && b.path.trim() !== ""), i = /* @__PURE__ */ new Set(), a = [];
1176
+ function sl(s) {
1177
+ const n = (s ?? []).filter((b) => b && typeof b.path == "string" && b.path.trim() !== ""), i = /* @__PURE__ */ new Set(), a = [];
1178
1178
  n.forEach((b, m) => {
1179
1179
  const p = b.group?.trim() || "(没写 meta.group)";
1180
1180
  let v = a.find((h) => h.title === p);
1181
- v || (v = { title: p, rows: [] }, a.push(v)), v.rows.push({ key: Xo(Zo(b.path, m), i), row: b });
1181
+ v || (v = { title: p, rows: [] }, a.push(v)), v.rows.push({ key: nl(el(b.path, m), i), row: b });
1182
1182
  });
1183
1183
  const u = [
1184
1184
  "/* 生成物:**每次导出都会重写**,别手改 —— 改了下次导出就没了。",
@@ -1271,32 +1271,32 @@ function tl(o) {
1271
1271
  ), u.join(`
1272
1272
  `);
1273
1273
  }
1274
- function Zn() {
1274
+ function es() {
1275
1275
  return typeof window < "u" && typeof window.showDirectoryPicker == "function";
1276
1276
  }
1277
- const el = "这个浏览器没法直接写你本机的文件夹(少了 File System Access API):请用 Chrome / Edge,并且从 https 或 http://localhost 打开这个页面(内网 http 会更少 API)。";
1278
- async function Le() {
1279
- if (!Zn()) throw new Error(el);
1277
+ const ol = "这个浏览器没法直接写你本机的文件夹(少了 File System Access API):请用 Chrome / Edge,并且从 https 或 http://localhost 打开这个页面(内网 http 会更少 API)。";
1278
+ async function De() {
1279
+ if (!es()) throw new Error(ol);
1280
1280
  try {
1281
- const o = await window.showDirectoryPicker({ mode: "readwrite", id: "labull-magic-block" });
1282
- return { name: o.name, handle: o };
1283
- } catch (o) {
1284
- const n = o instanceof Error ? o.name : "";
1285
- throw n === "AbortError" ? new Error("取消选目录了:想导出就再点一次「选择文件夹」") : n === "SecurityError" ? new Error(`选不了这个目录:浏览器不让(${ue(o)})—— 换一个目录,或确认页面是 https / localhost`) : new Error(`选目录失败:${ue(o)}`);
1281
+ const s = await window.showDirectoryPicker({ mode: "readwrite", id: "labull-magic-block" });
1282
+ return { name: s.name, handle: s };
1283
+ } catch (s) {
1284
+ const n = s instanceof Error ? s.name : "";
1285
+ throw n === "AbortError" ? new Error("取消选目录了:想导出就再点一次「选择文件夹」") : n === "SecurityError" ? new Error(`选不了这个目录:浏览器不让(${ce(s)})—— 换一个目录,或确认页面是 https / localhost`) : new Error(`选目录失败:${ce(s)}`);
1286
1286
  }
1287
1287
  }
1288
- function ue(o) {
1289
- return (o instanceof Error ? o.message.trim() : String(o)) || "没有说原因";
1288
+ function ce(s) {
1289
+ return (s instanceof Error ? s.message.trim() : String(s)) || "没有说原因";
1290
1290
  }
1291
- function Ge(o) {
1292
- const n = String(o ?? "").split("/");
1291
+ function Xe(s) {
1292
+ const n = String(s ?? "").split("/");
1293
1293
  for (const i of n)
1294
1294
  if (!i || i === "." || i === ".." || i.includes("\\") || /^[A-Za-z]:/.test(i))
1295
- throw new Error(`路径不合法:${o}(要相对路径,不许 .. / 盘符 / 反斜杠)`);
1295
+ throw new Error(`路径不合法:${s}(要相对路径,不许 .. / 盘符 / 反斜杠)`);
1296
1296
  return n;
1297
1297
  }
1298
- function nl(o) {
1299
- const n = String(o ?? "");
1298
+ function ll(s) {
1299
+ const n = String(s ?? "");
1300
1300
  let i = 3735928559, a = 1103547991;
1301
1301
  for (let u = 0; u < n.length; u += 1) {
1302
1302
  const b = n.charCodeAt(u);
@@ -1304,24 +1304,24 @@ function nl(o) {
1304
1304
  }
1305
1305
  return i = Math.imul(i ^ i >>> 16, 2246822507) ^ Math.imul(a ^ a >>> 13, 3266489909), a = Math.imul(a ^ a >>> 16, 2246822507) ^ Math.imul(i ^ i >>> 13, 3266489909), `${(4294967296 * (2097151 & a) + (i >>> 0)).toString(36)}:${n.length}`;
1306
1306
  }
1307
- const sl = 8;
1308
- async function gt(o, n) {
1307
+ const il = 8;
1308
+ async function gt(s, n) {
1309
1309
  let i = 0;
1310
1310
  const a = async () => {
1311
1311
  for (; ; ) {
1312
1312
  const u = i;
1313
- if (i += 1, u >= o.length) return;
1314
- await n(o[u], u);
1313
+ if (i += 1, u >= s.length) return;
1314
+ await n(s[u], u);
1315
1315
  }
1316
1316
  };
1317
- await Promise.all(Array.from({ length: Math.max(1, Math.min(sl, o.length)) }, () => a()));
1317
+ await Promise.all(Array.from({ length: Math.max(1, Math.min(il, s.length)) }, () => a()));
1318
1318
  }
1319
- function ol(o) {
1319
+ function al(s) {
1320
1320
  const n = /* @__PURE__ */ new Map();
1321
1321
  return (i) => {
1322
1322
  const a = i.join("\0"), u = n.get(a);
1323
1323
  if (u) return u;
1324
- let b = Promise.resolve(o);
1324
+ let b = Promise.resolve(s);
1325
1325
  for (let m = 0; m < i.length; m += 1) {
1326
1326
  const p = i[m], v = i.slice(0, m + 1).join("\0"), h = n.get(v);
1327
1327
  b = h ?? b.then((y) => y.getDirectoryHandle(p, { create: !0 })), h || n.set(v, b);
@@ -1329,18 +1329,18 @@ function ol(o) {
1329
1329
  return b;
1330
1330
  };
1331
1331
  }
1332
- async function ll(o, n, i) {
1332
+ async function ul(s, n, i) {
1333
1333
  try {
1334
- return await (await (await o.getFileHandle(n)).getFile()).text() === i;
1334
+ return await (await (await s.getFileHandle(n)).getFile()).text() === i;
1335
1335
  } catch {
1336
1336
  return !1;
1337
1337
  }
1338
1338
  }
1339
- async function il(o, n, i, a = {}) {
1339
+ async function rl(s, n, i, a = {}) {
1340
1340
  const u = Object.entries(n ?? {}).map(([B, R]) => {
1341
1341
  const O = String(R ?? "");
1342
- return { path: B, parts: Ge(B), body: O, digest: nl(O) };
1343
- }), b = u.length, m = [], p = ol(o.handle), v = a.verify === !0, h = a.trust, y = a.existing, _ = /* @__PURE__ */ new Map();
1342
+ return { path: B, parts: Xe(B), body: O, digest: ll(O) };
1343
+ }), b = u.length, m = [], p = al(s.handle), v = a.verify === !0, h = a.trust, y = a.existing, _ = /* @__PURE__ */ new Map();
1344
1344
  let g = 0, S = 0, A = 0;
1345
1345
  return i?.(0, b), await gt(u, async (B) => {
1346
1346
  try {
@@ -1348,7 +1348,7 @@ async function il(o, n, i, a = {}) {
1348
1348
  A += 1, _.set(B.path, B.digest);
1349
1349
  else {
1350
1350
  const R = await p(B.parts.slice(0, -1)), O = B.parts[B.parts.length - 1];
1351
- if (v && await ll(R, O, B.body))
1351
+ if (v && await ul(R, O, B.body))
1352
1352
  S += 1, _.set(B.path, B.digest);
1353
1353
  else {
1354
1354
  const st = await (await R.getFileHandle(O, { create: !0 })).createWritable();
@@ -1361,12 +1361,12 @@ async function il(o, n, i, a = {}) {
1361
1361
  }
1362
1362
  }
1363
1363
  } catch (R) {
1364
- m.push({ path: B.path, message: ue(R) });
1364
+ m.push({ path: B.path, message: ce(R) });
1365
1365
  }
1366
1366
  i?.(g + S + A + m.length, b);
1367
1367
  }), m.sort((B, R) => B.path < R.path ? -1 : B.path > R.path ? 1 : 0), { written: g, failed: m, total: b, skipped: S, trusted: A, fingerprints: _ };
1368
1368
  }
1369
- async function Pe(o, n) {
1369
+ async function qe(s, n) {
1370
1370
  const i = { items: [], topCount: 0, files: 0, dirs: 0 }, a = async (m, p) => {
1371
1371
  const v = [];
1372
1372
  for (const h of await Lt(m)) {
@@ -1377,7 +1377,7 @@ async function Pe(o, n) {
1377
1377
  i.dirs += 1, !(p >= n.maxDepth) && (n.skipDirs.includes(h.name) || v.push(h));
1378
1378
  }
1379
1379
  await gt(v, (h) => a(h, p + 1));
1380
- }, u = await Lt(o.handle), b = [];
1380
+ }, u = await Lt(s.handle), b = [];
1381
1381
  for (const m of u)
1382
1382
  if (i.items.push({ name: m.name, dir: m.kind === "directory" }), m.kind === "file") i.files += 1;
1383
1383
  else {
@@ -1386,16 +1386,16 @@ async function Pe(o, n) {
1386
1386
  }
1387
1387
  return await gt(b, (m) => a(m, 1)), i.topCount = i.items.length, i;
1388
1388
  }
1389
- async function al(o) {
1389
+ async function cl(s) {
1390
1390
  const n = [];
1391
- for (const a of await Lt(o.handle)) n.push(a.name);
1391
+ for (const a of await Lt(s.handle)) n.push(a.name);
1392
1392
  let i = 0;
1393
1393
  return await gt(n, async (a) => {
1394
- await o.handle.removeEntry(a, { recursive: !0 }), i += 1;
1394
+ await s.handle.removeEntry(a, { recursive: !0 }), i += 1;
1395
1395
  }), i;
1396
1396
  }
1397
- async function ul(o, n) {
1398
- const { wantedFiles: i, wantedDirs: a } = Xn(n), u = /* @__PURE__ */ new Set();
1397
+ async function dl(s, n) {
1398
+ const { wantedFiles: i, wantedDirs: a } = ns(n), u = /* @__PURE__ */ new Set();
1399
1399
  let b = 0;
1400
1400
  const m = async (p, v) => {
1401
1401
  const h = [], y = [];
@@ -1411,19 +1411,19 @@ async function ul(o, n) {
1411
1411
  await p.removeEntry(_, { recursive: !0 }), b += 1;
1412
1412
  }), await gt(y, ([_, g]) => m(g, _));
1413
1413
  };
1414
- return await m(o.handle, ""), { removed: b, existing: u };
1414
+ return await m(s.handle, ""), { removed: b, existing: u };
1415
1415
  }
1416
- function Xn(o) {
1416
+ function ns(s) {
1417
1417
  const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
1418
- for (const a of Object.keys(o ?? {})) {
1419
- const u = Ge(a);
1418
+ for (const a of Object.keys(s ?? {})) {
1419
+ const u = Xe(a);
1420
1420
  n.add(u.join("/"));
1421
1421
  for (let b = 1; b < u.length; b += 1) i.add(u.slice(0, b).join("/"));
1422
1422
  }
1423
1423
  return { wantedFiles: n, wantedDirs: i };
1424
1424
  }
1425
- async function rl(o, n) {
1426
- const { wantedFiles: i, wantedDirs: a } = Xn(n), u = /* @__PURE__ */ new Set(), b = async (m, p) => {
1425
+ async function pl(s, n) {
1426
+ const { wantedFiles: i, wantedDirs: a } = ns(n), u = /* @__PURE__ */ new Set(), b = async (m, p) => {
1427
1427
  const v = [];
1428
1428
  for (const h of await Lt(m)) {
1429
1429
  const y = p ? `${p}/${h.name}` : h.name;
@@ -1435,41 +1435,41 @@ async function rl(o, n) {
1435
1435
  }
1436
1436
  await gt(v, ([h, y]) => b(y, h));
1437
1437
  };
1438
- return await b(o.handle, ""), u;
1438
+ return await b(s.handle, ""), u;
1439
1439
  }
1440
- function cl(o, n) {
1441
- if (o.name === n.blocksDir)
1440
+ function fl(s, n) {
1441
+ if (s.name === n.blocksDir)
1442
1442
  throw new Error(
1443
1443
  `你选中的是「${n.blocksDir}」这一层(它就是放代码的那一层):导出会铺成 ${n.blocksDir}/${n.blocksDir}/…。请选它**上面**那一层 —— 也就是开发目录本身。`
1444
1444
  );
1445
1445
  }
1446
- async function Lt(o) {
1446
+ async function Lt(s) {
1447
1447
  const n = [];
1448
- for await (const i of o.values()) n.push(i);
1448
+ for await (const i of s.values()) n.push(i);
1449
1449
  return n.sort((i, a) => i.name < a.name ? -1 : i.name > a.name ? 1 : 0), n;
1450
1450
  }
1451
- function dl(o) {
1452
- return o.charCodeAt(0) === 65279 ? o.slice(1) : o;
1451
+ function ml(s) {
1452
+ return s.charCodeAt(0) === 65279 ? s.slice(1) : s;
1453
1453
  }
1454
- function pl(o) {
1455
- const n = o.lastIndexOf(".");
1456
- return n <= 0 ? "" : o.slice(n).toLowerCase();
1454
+ function bl(s) {
1455
+ const n = s.lastIndexOf(".");
1456
+ return n <= 0 ? "" : s.slice(n).toLowerCase();
1457
1457
  }
1458
- const fl = { folders: [], failures: [], truncated: !1 };
1459
- async function ts(o, n, i) {
1460
- const a = await Lt(o), u = new Array(a.length);
1458
+ const vl = { folders: [], failures: [], truncated: !1 };
1459
+ async function ss(s, n, i) {
1460
+ const a = await Lt(s), u = new Array(a.length);
1461
1461
  await gt(a, async (p, v) => {
1462
1462
  const h = n ? `${n}/${p.name}` : p.name, y = { files: {}, failures: [] };
1463
1463
  if (u[v] = y, p.kind === "directory") {
1464
1464
  if (i.skipDirs.includes(p.name)) return;
1465
- const g = await ts(p, h, i);
1465
+ const g = await ss(p, h, i);
1466
1466
  for (const [S, A] of Object.entries(g.files))
1467
1467
  y.files[`${p.name}/${S}`] = A;
1468
1468
  y.failures.push(...g.failures);
1469
1469
  return;
1470
1470
  }
1471
1471
  if (!i.platformFiles.includes(p.name)) {
1472
- if (!i.textExt.includes(pl(p.name))) {
1472
+ if (!i.textExt.includes(bl(p.name))) {
1473
1473
  y.failures.push({
1474
1474
  kind: "file",
1475
1475
  where: h,
@@ -1487,9 +1487,9 @@ async function ts(o, n, i) {
1487
1487
  });
1488
1488
  return;
1489
1489
  }
1490
- y.files[p.name] = dl(await _.text());
1490
+ y.files[p.name] = ml(await _.text());
1491
1491
  } catch (_) {
1492
- y.failures.push({ kind: "file", where: h, message: `读不了这个文件:${ue(_)}` });
1492
+ y.failures.push({ kind: "file", where: h, message: `读不了这个文件:${ce(_)}` });
1493
1493
  }
1494
1494
  }
1495
1495
  });
@@ -1498,10 +1498,10 @@ async function ts(o, n, i) {
1498
1498
  p && (Object.assign(b, p.files), m.push(...p.failures));
1499
1499
  return { files: b, failures: m };
1500
1500
  }
1501
- async function es(o, n, i, a) {
1502
- const u = await Lt(o), b = u.filter((_) => _.kind === "directory"), m = u.filter((_) => _.kind === "file"), p = n.join("/"), v = { folders: [], failures: [], truncated: !1 };
1501
+ async function os(s, n, i, a) {
1502
+ const u = await Lt(s), b = u.filter((_) => _.kind === "directory"), m = u.filter((_) => _.kind === "file"), p = n.join("/"), v = { folders: [], failures: [], truncated: !1 };
1503
1503
  if (b.length === 0 || m.some((_) => _.name === a.entry)) {
1504
- const _ = await ts(o, p, a);
1504
+ const _ = await ss(s, p, a);
1505
1505
  return v.folders.push({ where: p, files: _.files }), v.failures.push(..._.failures), v;
1506
1506
  }
1507
1507
  for (const _ of m)
@@ -1510,7 +1510,7 @@ async function es(o, n, i, a) {
1510
1510
  where: [...n, _.name].join("/"),
1511
1511
  message: `这一层直接放着一份文件,但它自己不是块文件夹、也没有 ${a.entry},文件没有归属`
1512
1512
  });
1513
- const h = b.map((_) => async () => a.skipDirs.includes(_.name) ? fl : i >= a.maxDepth ? {
1513
+ const h = b.map((_) => async () => a.skipDirs.includes(_.name) ? vl : i >= a.maxDepth ? {
1514
1514
  folders: [],
1515
1515
  failures: [{
1516
1516
  kind: "dir",
@@ -1518,7 +1518,7 @@ async function es(o, n, i, a) {
1518
1518
  message: `超过最大层数 ${a.maxDepth} 层还没见到 ${a.entry},没有继续往下找`
1519
1519
  }],
1520
1520
  truncated: !0
1521
- } : es(_, [...n, _.name], i + 1, a)), y = new Array(h.length);
1521
+ } : os(_, [...n, _.name], i + 1, a)), y = new Array(h.length);
1522
1522
  await gt(h, async (_, g) => {
1523
1523
  y[g] = await _();
1524
1524
  });
@@ -1526,12 +1526,12 @@ async function es(o, n, i, a) {
1526
1526
  _ && (v.folders.push(..._.folders), v.failures.push(..._.failures), _.truncated && (v.truncated = !0));
1527
1527
  return v;
1528
1528
  }
1529
- function Bn(o) {
1530
- return o >= 1024 * 1024 ? `${(o / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(o / 1024))} KB`;
1529
+ function An(s) {
1530
+ return s >= 1024 * 1024 ? `${(s / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(s / 1024))} KB`;
1531
1531
  }
1532
- async function ml(o, n) {
1533
- const i = await es(o.handle, [], 0, n), a = {
1534
- root: o.name,
1532
+ async function hl(s, n) {
1533
+ const i = await os(s.handle, [], 0, n), a = {
1534
+ root: s.name,
1535
1535
  folders: i.folders,
1536
1536
  failures: i.failures,
1537
1537
  truncated: i.truncated
@@ -1541,169 +1541,169 @@ async function ml(o, n) {
1541
1541
  );
1542
1542
  if (u > n.maxBodyBytes)
1543
1543
  throw new Error(
1544
- `这个目录读到的正文有 ${Bn(u)},超过一次读回的上限 ${Bn(n.maxBodyBytes)}:请先只留要改的那几个块,或者把大文件挪走。`
1544
+ `这个目录读到的正文有 ${An(u)},超过一次读回的上限 ${An(n.maxBodyBytes)}:请先只留要改的那几个块,或者把大文件挪走。`
1545
1545
  );
1546
1546
  return a;
1547
1547
  }
1548
- const bl = { class: "mbc__head" }, vl = ["title"], hl = ["title"], _l = {
1548
+ const _l = { class: "mbc__head" }, gl = ["title"], yl = ["title"], kl = {
1549
1549
  class: "mbc__tabs",
1550
1550
  role: "tablist"
1551
- }, gl = ["aria-selected"], yl = { class: "mbc__count" }, kl = ["title"], $l = ["aria-selected"], wl = ["title"], xl = {
1551
+ }, $l = ["aria-selected"], wl = { class: "mbc__count" }, xl = ["title"], Cl = ["aria-selected"], El = ["title"], Sl = {
1552
1552
  key: 1,
1553
1553
  class: "mbc__chip is-ok"
1554
- }, Cl = { class: "mbc__body" }, El = {
1554
+ }, Tl = { class: "mbc__body" }, Bl = {
1555
1555
  key: 0,
1556
1556
  class: "mbc__running"
1557
- }, Sl = ["aria-valuenow"], Tl = {
1557
+ }, Ml = ["aria-valuenow"], Rl = {
1558
1558
  key: 1,
1559
1559
  class: "mbc__confirm"
1560
- }, Bl = { class: "mbc__confirm-title" }, Ml = { class: "mbc__confirm-body" }, Rl = {
1560
+ }, Al = { class: "mbc__confirm-title" }, Ol = { class: "mbc__confirm-body" }, jl = {
1561
1561
  key: 0,
1562
1562
  class: "mbc__mono"
1563
- }, Al = { class: "mbc__confirm-check" }, Ol = { class: "mbc__actions" }, jl = ["disabled"], Ll = ["disabled"], Pl = ["disabled"], Il = {
1563
+ }, Ll = { class: "mbc__confirm-check" }, Pl = { class: "mbc__actions" }, Il = ["disabled"], Nl = ["disabled"], Dl = ["disabled"], ql = {
1564
1564
  key: 2,
1565
1565
  class: "mbc__confirm"
1566
- }, Nl = { class: "mbc__confirm-title" }, Dl = { class: "mbc__confirm-body" }, ql = { class: "mbc__mono" }, Fl = { class: "mbc__actions" }, Ul = ["disabled"], zl = ["disabled"], Hl = { class: "mbc__panel mbc__panel--blocks" }, Kl = { class: "mbc__title" }, Vl = { class: "mbc__count" }, Wl = {
1566
+ }, Fl = { class: "mbc__confirm-title" }, Ul = { class: "mbc__confirm-body" }, zl = { class: "mbc__mono" }, Hl = { class: "mbc__actions" }, Kl = ["disabled"], Vl = ["disabled"], Wl = { class: "mbc__panel mbc__panel--blocks" }, Jl = { class: "mbc__title" }, Gl = { class: "mbc__count" }, Ql = {
1567
1567
  key: 0,
1568
1568
  class: "mbc__count mbc__count--tag"
1569
- }, Jl = {
1569
+ }, Yl = {
1570
1570
  key: 0,
1571
1571
  class: "mbc__tagbar"
1572
- }, Gl = ["title", "onClick"], Ql = { class: "mbc__list" }, Yl = ["title", "onClick"], Zl = { class: "mbc__module" }, Xl = { class: "mbc__name" }, ti = ["title"], ei = ["title"], ni = ["title"], si = {
1572
+ }, Zl = ["title", "onClick"], Xl = { class: "mbc__list" }, ti = ["title", "onClick"], ei = { class: "mbc__module" }, ni = { class: "mbc__name" }, si = ["title"], oi = ["title"], li = ["title"], ii = {
1573
1573
  key: 2,
1574
1574
  class: "mbc__where"
1575
- }, oi = ["title"], li = {
1575
+ }, ai = ["title"], ui = {
1576
1576
  key: 0,
1577
1577
  class: "mbc__detail"
1578
- }, ii = {
1578
+ }, ri = {
1579
1579
  key: 0,
1580
1580
  class: "mbc__hint"
1581
- }, ai = { class: "mbc__meta" }, ui = ["innerHTML"], ri = {
1581
+ }, ci = { class: "mbc__meta" }, di = ["innerHTML"], pi = {
1582
1582
  key: 1,
1583
1583
  class: "mbc__hint"
1584
- }, ci = { class: "mbc__mono" }, di = ["disabled", "onClick"], pi = ["disabled", "onClick"], fi = ["disabled"], mi = { class: "mbc__hint" }, bi = { class: "mbc__loclist" }, vi = { class: "mbc__mono" }, hi = { class: "mbc__hint" }, _i = { class: "mbc__loclist mbc__loclist--inert" }, gi = { class: "mbc__mono" }, yi = { class: "mbc__reqlist" }, ki = { class: "mbc__mono" }, $i = { class: "mbc__reqtitle" }, wi = { class: "mbc__hint" }, xi = { class: "mbc__mono" }, Ci = {
1584
+ }, fi = { class: "mbc__mono" }, mi = ["disabled", "onClick"], bi = ["disabled", "onClick"], vi = ["disabled"], hi = { class: "mbc__hint" }, _i = { class: "mbc__loclist" }, gi = { class: "mbc__mono" }, yi = { class: "mbc__hint" }, ki = { class: "mbc__loclist mbc__loclist--inert" }, $i = { class: "mbc__mono" }, wi = { class: "mbc__reqlist" }, xi = { class: "mbc__mono" }, Ci = { class: "mbc__reqtitle" }, Ei = { class: "mbc__hint" }, Si = { class: "mbc__mono" }, Ti = {
1585
1585
  key: 1,
1586
1586
  class: "mbc__hint"
1587
- }, Ei = { class: "mbc__mono" }, Si = { class: "mbc__hint" }, Ti = {
1587
+ }, Bi = { class: "mbc__mono" }, Mi = { class: "mbc__hint" }, Ri = {
1588
1588
  key: 0,
1589
1589
  class: "mbc__hint"
1590
- }, Bi = ["disabled", "onClick"], Mi = ["onKeyup"], Ri = ["disabled", "onClick"], Ai = ["disabled"], Oi = {
1590
+ }, Ai = ["disabled", "onClick"], Oi = ["onKeyup"], ji = ["disabled", "onClick"], Li = ["disabled"], Pi = {
1591
1591
  key: 0,
1592
1592
  class: "mbc__tagbar"
1593
- }, ji = ["title", "onClick"], Li = {
1593
+ }, Ii = ["title", "onClick"], Ni = {
1594
1594
  key: 1,
1595
1595
  class: "mbc__tagbar"
1596
- }, Pi = ["title", "onClick"], Ii = { class: "mbc__mono" }, Ni = { class: "mbc__actions mbc__actions--row" }, Di = ["disabled", "onClick"], qi = { class: "mbc__versions" }, Fi = { class: "mbc__versions-head" }, Ui = ["disabled", "onClick"], zi = {
1596
+ }, Di = ["title", "onClick"], qi = { class: "mbc__mono" }, Fi = { class: "mbc__actions mbc__actions--row" }, Ui = ["disabled", "onClick"], zi = { class: "mbc__versions" }, Hi = { class: "mbc__versions-head" }, Ki = ["disabled", "onClick"], Vi = {
1597
1597
  key: 0,
1598
1598
  class: "mbc__hint"
1599
- }, Hi = {
1599
+ }, Wi = {
1600
1600
  key: 1,
1601
1601
  class: "mbc__versions-list"
1602
- }, Ki = { class: "mbc__mono" }, Vi = { class: "mbc__hint" }, Wi = { class: "mbc__actions" }, Ji = ["disabled", "onClick", "title"], Gi = ["disabled", "onClick", "title"], Qi = ["disabled", "onClick", "title"], Yi = ["disabled", "onClick", "title"], Zi = {
1602
+ }, Ji = { class: "mbc__mono" }, Gi = { class: "mbc__hint" }, Qi = { class: "mbc__actions" }, Yi = ["disabled", "onClick", "title"], Zi = ["disabled", "onClick", "title"], Xi = ["disabled", "onClick", "title"], ta = ["disabled", "onClick", "title"], ea = {
1603
1603
  key: 2,
1604
1604
  class: "mbc__hint"
1605
- }, Xi = {
1605
+ }, na = {
1606
1606
  key: 3,
1607
1607
  class: "mbc__viewer"
1608
- }, ta = { class: "mbc__versions-head" }, ea = { class: "mbc__mono" }, na = { class: "mbc__viewer-body" }, sa = { class: "mbc__panel mbc__panel--export" }, oa = { class: "mbc__field" }, la = ["disabled"], ia = {
1608
+ }, sa = { class: "mbc__versions-head" }, oa = { class: "mbc__mono" }, la = { class: "mbc__viewer-body" }, ia = { class: "mbc__panel mbc__panel--export" }, aa = { class: "mbc__field" }, ua = ["disabled"], ra = {
1609
1609
  key: 0,
1610
1610
  class: "mbc__field mbc__field--end"
1611
- }, aa = { class: "mbc__hint" }, ua = { class: "mbc__ok-text" }, ra = {
1611
+ }, ca = { class: "mbc__hint" }, da = { class: "mbc__ok-text" }, pa = {
1612
1612
  key: 1,
1613
1613
  class: "mbc__checknotes"
1614
- }, ca = {
1614
+ }, fa = {
1615
1615
  key: 0,
1616
1616
  class: "mbc__hint"
1617
- }, da = ["title"], pa = {
1617
+ }, ma = ["title"], ba = {
1618
1618
  key: 1,
1619
1619
  class: "mbc__hint"
1620
- }, fa = { class: "mbc__mono" }, ma = { class: "mbc__field" }, ba = { class: "mbc__radio" }, va = ["checked"], ha = { class: "mbc__radio" }, _a = ["checked"], ga = ["value", "disabled"], ya = {
1620
+ }, va = { class: "mbc__mono" }, ha = { class: "mbc__field" }, _a = { class: "mbc__radio" }, ga = ["checked"], ya = { class: "mbc__radio" }, ka = ["checked"], $a = ["value", "disabled"], wa = {
1621
1621
  key: 0,
1622
1622
  value: ""
1623
- }, ka = ["value"], $a = { class: "mbc__field" }, wa = ["value"], xa = ["disabled"], Ca = ["disabled", "title"], Ea = { class: "mbc__hint" }, Sa = {
1623
+ }, xa = ["value"], Ca = { class: "mbc__field" }, Ea = ["value"], Sa = ["disabled"], Ta = ["disabled", "title"], Ba = { class: "mbc__hint" }, Ma = {
1624
1624
  key: 2,
1625
1625
  class: "mbc__hint"
1626
- }, Ta = { class: "mbc__panel mbc__panel--read" }, Ba = { class: "mbc__field" }, Ma = ["value"], Ra = ["disabled"], Aa = ["disabled"], Oa = {
1626
+ }, Ra = { class: "mbc__panel mbc__panel--read" }, Aa = { class: "mbc__field" }, Oa = ["value"], ja = ["disabled"], La = ["disabled"], Pa = {
1627
1627
  key: 0,
1628
1628
  class: "mbc__hint"
1629
- }, ja = {
1629
+ }, Ia = {
1630
1630
  key: 1,
1631
1631
  class: "mbc__hint"
1632
- }, La = {
1632
+ }, Na = {
1633
1633
  key: 0,
1634
1634
  class: "mbc__hint"
1635
- }, Pa = { class: "mbc__ok-text" }, Ia = ["disabled"], Na = ["disabled"], Da = {
1635
+ }, Da = { class: "mbc__ok-text" }, qa = ["disabled"], Fa = ["disabled"], Ua = {
1636
1636
  key: 1,
1637
1637
  class: "mbc__scan"
1638
- }, qa = { class: "mbc__pick" }, Fa = ["disabled", "checked", "onChange"], Ua = { class: "mbc__name" }, za = { class: "mbc__module" }, Ha = { class: "mbc__hint" }, Ka = { class: "mbc__mono" }, Va = {
1638
+ }, za = { class: "mbc__pick" }, Ha = ["disabled", "checked", "onChange"], Ka = { class: "mbc__name" }, Va = { class: "mbc__module" }, Wa = { class: "mbc__hint" }, Ja = { class: "mbc__mono" }, Ga = {
1639
1639
  key: 0,
1640
1640
  class: "mbc__problem"
1641
- }, Wa = {
1641
+ }, Qa = {
1642
1642
  key: 1,
1643
1643
  class: "mbc__failures"
1644
- }, Ja = { class: "mbc__hint mbc__mono" }, Ga = {
1644
+ }, Ya = { class: "mbc__hint mbc__mono" }, Za = {
1645
1645
  key: 2,
1646
1646
  class: "mbc__hint"
1647
- }, Qa = { class: "mbc__field" }, Ya = ["title"], Za = {
1647
+ }, Xa = { class: "mbc__field" }, tu = ["title"], eu = {
1648
1648
  key: 1,
1649
1649
  class: "mbc__chip is-ok"
1650
- }, Xa = ["title"], tu = {
1650
+ }, nu = ["title"], su = {
1651
1651
  key: 3,
1652
1652
  class: "mbc__hint"
1653
- }, eu = { class: "mbc__field mbc__field--end" }, nu = ["disabled"], su = { class: "mbc__panel mbc__panel--declared" }, ou = { class: "mbc__title" }, lu = { class: "p-tag p-tag-info" }, iu = { class: "mbc__count" }, au = {
1653
+ }, ou = { class: "mbc__field mbc__field--end" }, lu = ["disabled"], iu = { class: "mbc__panel mbc__panel--declared" }, au = { class: "mbc__title" }, uu = { class: "p-tag p-tag-info" }, ru = { class: "mbc__count" }, cu = {
1654
1654
  key: 0,
1655
1655
  class: "mbc__hint"
1656
- }, uu = { class: "mbc__hint" }, ru = { class: "mbc__scan" }, cu = { class: "mbc__pick" }, du = { class: "mbc__name" }, pu = { class: "p-tag p-tag-info" }, fu = { class: "mbc__module" }, mu = { class: "mbc__hint" }, bu = { class: "mbc__mono" }, vu = { class: "mbc__hint mbc__mono" }, hu = {
1656
+ }, du = { class: "mbc__hint" }, pu = { class: "mbc__scan" }, fu = { class: "mbc__pick" }, mu = { class: "mbc__name" }, bu = { class: "p-tag p-tag-info" }, vu = { class: "mbc__module" }, hu = { class: "mbc__hint" }, _u = { class: "mbc__mono" }, gu = { class: "mbc__hint mbc__mono" }, yu = {
1657
1657
  key: 3,
1658
1658
  class: "mbc__panel mbc__panel--result"
1659
- }, _u = { class: "mbc__summary" }, gu = { class: "mbc__chip is-ok" }, yu = {
1659
+ }, ku = { class: "mbc__summary" }, $u = { class: "mbc__chip is-ok" }, wu = {
1660
1660
  key: 0,
1661
1661
  class: "mbc__chip is-bad"
1662
- }, ku = {
1662
+ }, xu = {
1663
1663
  key: 1,
1664
1664
  class: "mbc__chip is-bad"
1665
- }, $u = {
1665
+ }, Cu = {
1666
1666
  key: 2,
1667
1667
  class: "mbc__hint"
1668
- }, wu = { class: "mbc__actions" }, xu = { class: "mbc__foot" }, Cu = ["title"], Eu = {
1668
+ }, Eu = { class: "mbc__actions" }, Su = { class: "mbc__foot" }, Tu = ["title"], Bu = {
1669
1669
  key: 1,
1670
1670
  class: "mbc__error"
1671
- }, Su = {
1671
+ }, Mu = {
1672
1672
  key: 2,
1673
1673
  class: "mbc__notice"
1674
- }, Tu = {
1674
+ }, Ru = {
1675
1675
  key: 3,
1676
1676
  class: "mbc__hint mbc__foot-idle"
1677
- }, Bu = { class: "mbc__modal-box" }, Mu = { class: "mbc__modal-head" }, Ru = { class: "mbc__modal-body" }, Au = {
1677
+ }, Au = { class: "mbc__modal-box" }, Ou = { class: "mbc__modal-head" }, ju = { class: "mbc__modal-body" }, Lu = {
1678
1678
  key: 0,
1679
1679
  class: "mbc__issues-group"
1680
- }, Ou = { class: "mbc__title" }, ju = { class: "mbc__failures" }, Lu = {
1680
+ }, Pu = { class: "mbc__title" }, Iu = { class: "mbc__failures" }, Nu = {
1681
1681
  key: 1,
1682
1682
  class: "mbc__issues-group"
1683
- }, Pu = { class: "mbc__title" }, Iu = { class: "mbc__failures" }, Nu = { class: "mbc__kind" }, Du = { class: "mbc__mono" }, qu = {
1683
+ }, Du = { class: "mbc__title" }, qu = { class: "mbc__failures" }, Fu = { class: "mbc__kind" }, Uu = { class: "mbc__mono" }, zu = {
1684
1684
  key: 2,
1685
1685
  class: "mbc__issues-group"
1686
- }, Fu = { class: "mbc__title" }, Uu = { class: "mbc__failures" }, zu = { class: "mbc__mono" }, Hu = {
1686
+ }, Hu = { class: "mbc__title" }, Ku = { class: "mbc__failures" }, Vu = { class: "mbc__mono" }, Wu = {
1687
1687
  key: 3,
1688
1688
  class: "mbc__issues-group"
1689
- }, Ku = { class: "mbc__title" }, Vu = { class: "mbc__failures" }, Wu = { key: 0 }, Ju = {
1689
+ }, Ju = { class: "mbc__title" }, Gu = { class: "mbc__failures" }, Qu = { key: 0 }, Yu = {
1690
1690
  key: 1,
1691
1691
  class: "mbc__failures"
1692
- }, Gu = {
1692
+ }, Zu = {
1693
1693
  key: 4,
1694
1694
  class: "mbc__issues-group"
1695
- }, Qu = { class: "mbc__title" }, Yu = { class: "mbc__failures" }, Zu = {
1695
+ }, Xu = { class: "mbc__title" }, tr = { class: "mbc__failures" }, er = {
1696
1696
  key: 0,
1697
1697
  class: "mbc__note"
1698
- }, Xu = { class: "mbc__mono" }, tr = { class: "mbc__failures" }, er = {
1698
+ }, nr = { class: "mbc__mono" }, sr = { class: "mbc__failures" }, or = {
1699
1699
  key: 5,
1700
1700
  class: "mbc__hint"
1701
- }, nr = { class: "mbc__modal-foot" }, sr = { class: "mbc__modal-box" }, or = { class: "mbc__modal-head" }, lr = { class: "mbc__modal-body" }, ir = { class: "mbc__reports" }, ar = { class: "mbc__report-head" }, ur = { class: "mbc__mono" }, rr = { class: "mbc__report-text" }, cr = {
1701
+ }, lr = { class: "mbc__modal-foot" }, ir = { class: "mbc__modal-box" }, ar = { class: "mbc__modal-head" }, ur = { class: "mbc__modal-body" }, rr = { class: "mbc__reports" }, cr = { class: "mbc__report-head" }, dr = { class: "mbc__mono" }, pr = { class: "mbc__report-text" }, fr = {
1702
1702
  key: 0,
1703
1703
  class: "mbc__hint"
1704
- }, dr = { class: "mbc__modal-foot" }, Ie = 2, pr = 100, fr = 250, mr = /* @__PURE__ */ Ve({
1704
+ }, mr = { class: "mbc__modal-foot" }, Fe = 2, br = 100, vr = 250, hr = /* @__PURE__ */ Qe({
1705
1705
  __name: "MagicBlockConsole",
1706
- setup(o) {
1706
+ setup(s) {
1707
1707
  const n = {
1708
1708
  modified: "有改动",
1709
1709
  unchanged: "没改动",
@@ -1712,237 +1712,237 @@ const bl = { class: "mbc__head" }, vl = ["title"], hl = ["title"], _l = {
1712
1712
  两种情形共用它(前端声明了、手里却还没有那个文件夹 / 手里那个文件夹的清单 id 库里没有)
1713
1713
  —— 对用户是同一件事:这个块不在库里。 */
1714
1714
  "not-in-db": "不在数据库"
1715
- }, i = n["not-in-db"], { isStaff: a } = jn(), u = On(), { active: b } = Fs(), m = (s) => !Ln(s, u), p = E(!1), v = E(""), h = E([]), y = E(""), _ = E(""), g = E(""), S = E([]), A = E(!1), B = E(!1), R = E("blocks"), O = E(""), D = E([]), st = E(""), ot = E(""), $t = E(""), wt = E(""), T = E(!1), qt = E(!1), ft = E(!1), xt = E(!1), rt = E(!1), V = E(null), z = E(null), lt = E("one"), Ct = E(Wt()), ht = I(() => h.value.find((s) => s.id === Ct.value) ?? null), Et = () => lt.value === "all" ? {} : { blocks: [Ct.value] };
1716
- function Vt(s) {
1717
- Ct.value = s;
1715
+ }, i = n["not-in-db"], { isStaff: a } = In(), u = Pn(), { active: b } = Hs(), m = (o) => !Nn(o, u), p = E(!1), v = E(""), h = E([]), y = E(""), _ = E(""), g = E(""), S = E([]), A = E(!1), B = E(!1), R = E("blocks"), O = E(""), D = E([]), st = E(""), ot = E(""), $t = E(""), wt = E(""), T = E(!1), Ut = E(!1), pt = E(!1), xt = E(!1), rt = E(!1), V = E(null), z = E(null), lt = E("one"), Ct = E(Gt()), vt = I(() => h.value.find((o) => o.id === Ct.value) ?? null), Et = () => lt.value === "all" ? {} : { blocks: [Ct.value] };
1716
+ function Jt(o) {
1717
+ Ct.value = o;
1718
1718
  try {
1719
- window.localStorage.setItem("mb:export-block", s);
1719
+ window.localStorage.setItem("mb:export-block", o);
1720
1720
  } catch {
1721
1721
  }
1722
1722
  }
1723
- function Wt() {
1723
+ function Gt() {
1724
1724
  try {
1725
1725
  return window.localStorage.getItem("mb:export-block") ?? "";
1726
1726
  } catch {
1727
1727
  return "";
1728
1728
  }
1729
1729
  }
1730
- It(h, (s) => {
1731
- s.length !== 0 && (s.some((t) => t.id === Ct.value) || Vt(s[0].id));
1730
+ Dt(h, (o) => {
1731
+ o.length !== 0 && (o.some((t) => t.id === Ct.value) || Jt(o[0].id));
1732
1732
  });
1733
- const it = E(null), W = E(""), L = E(null), mt = E({}), G = E([]), Q = E([]), H = E(null), x = E({}), M = E(""), q = E(null);
1734
- async function X(s) {
1735
- M.value = s;
1733
+ const it = E(null), W = E(""), L = E(null), ft = E({}), G = E([]), Q = E([]), H = E(null), x = E({}), M = E(""), q = E(null);
1734
+ async function X(o) {
1735
+ M.value = o;
1736
1736
  try {
1737
- const t = await dt(`/magic-blocks/${encodeURIComponent(s)}/versions`);
1738
- x.value = { ...x.value, [s]: t.versions ?? [] };
1737
+ const t = await ct(`/magic-blocks/${encodeURIComponent(o)}/versions`);
1738
+ x.value = { ...x.value, [o]: t.versions ?? [] };
1739
1739
  } catch (t) {
1740
- Ut(t, "读版本列表");
1740
+ Ht(t, "读版本列表");
1741
1741
  } finally {
1742
1742
  M.value = "";
1743
1743
  }
1744
1744
  }
1745
- function Jt(s) {
1746
- const t = [s.current ? "当前" : "", s.empty ? "空包(代码被删过)" : ""].filter(Boolean).join("、");
1747
- return `v${s.number}${t ? ` · ${t}` : ""}`;
1745
+ function Qt(o) {
1746
+ const t = [o.current ? "当前" : "", o.empty ? "空包(代码被删过)" : ""].filter(Boolean).join("、");
1747
+ return `v${o.number}${t ? ` · ${t}` : ""}`;
1748
1748
  }
1749
- function Gt(s) {
1750
- return s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${Math.round(s / 1024)} KB` : `${(s / 1024 / 1024).toFixed(1)} MB`;
1749
+ function Yt(o) {
1750
+ return o < 1024 ? `${o} B` : o < 1024 * 1024 ? `${Math.round(o / 1024)} KB` : `${(o / 1024 / 1024).toFixed(1)} MB`;
1751
1751
  }
1752
1752
  const F = E(null);
1753
- function pe(s, t) {
1754
- return `${String(t || "").replace(/[\\/:*?"<>|]/g, "").trim() || "block"}-${s}`;
1753
+ function me(o, t) {
1754
+ return `${String(t || "").replace(/[\\/:*?"<>|]/g, "").trim() || "block"}-${o}`;
1755
1755
  }
1756
- const fe = (s) => J(async () => {
1757
- const t = pe(s.id, s.name || s.module);
1758
- let e = V.value, r = null;
1756
+ const be = (o) => J(async () => {
1757
+ const t = me(o.id, o.name || o.module);
1758
+ let e = V.value, d = null;
1759
1759
  if (e)
1760
1760
  try {
1761
- r = await Pe(e, it.value ?? await xe());
1761
+ d = await qe(e, it.value ?? await Ee());
1762
1762
  } catch {
1763
- e = null, r = null;
1763
+ e = null, d = null;
1764
1764
  }
1765
- F.value = { row: s, target: e, folder: t, inventory: r };
1766
- }, T), me = () => J(async () => {
1767
- const s = F.value;
1768
- if (F.value = null, !s) return;
1769
- const t = `「${s.row.module} / ${s.row.name || s.row.id}」`;
1770
- Ye(), U.value = { active: !0, percent: 0, stage: "清本机那个文件夹…", failed: !1 };
1765
+ F.value = { row: o, target: e, folder: t, inventory: d };
1766
+ }, T), ve = () => J(async () => {
1767
+ const o = F.value;
1768
+ if (F.value = null, !o) return;
1769
+ const t = `「${o.row.module} / ${o.row.name || o.row.id}」`;
1770
+ en(), U.value = { active: !0, percent: 0, stage: "清本机那个文件夹…", failed: !1 };
1771
1771
  let e = "";
1772
- if (s.target)
1772
+ if (o.target)
1773
1773
  try {
1774
- const r = await be(s.target, s.folder), w = await al(r);
1775
- e = `清掉了本机「${s.target.name}/${s.folder}」里的 ${w} 项`;
1776
- } catch (r) {
1777
- e = `本机那份没清成(${Pt(r)})`;
1774
+ const d = await he(o.target, o.folder), w = await cl(d);
1775
+ e = `清掉了本机「${o.target.name}/${o.folder}」里的 ${w} 项`;
1776
+ } catch (d) {
1777
+ e = `本机那份没清成(${Pt(d)})`;
1778
1778
  }
1779
1779
  else
1780
1780
  e = "没选开发目录 ⇒ 本机那份没动";
1781
- ct(60, "清库里那份代码…");
1781
+ ht(60, "清库里那份代码…");
1782
1782
  try {
1783
- await dt(`/magic-blocks/${s.row.id}`, { method: "DELETE" });
1784
- } catch (r) {
1785
- throw St(!1, "本机清了,但库里那份代码没清成"), new Error(`${e};但**库里那份代码没清成**(${Pt(r)})—— 再点一次「删除代码文件」`);
1783
+ await ct(`/magic-blocks/${o.row.id}`, { method: "DELETE" });
1784
+ } catch (d) {
1785
+ throw St(!1, "本机清了,但库里那份代码没清成"), new Error(`${e};但**库里那份代码没清成**(${Pt(d)})—— 再点一次「删除代码文件」`);
1786
1786
  }
1787
1787
  await Rt(), W.value = `${t}的代码文件已删除:${e};库里那一份也清空了 ——**块还在**(页面上会显示成占位框)。想找回来:上面「块」那一屏点开这一块 → 版本史 → 对上一版点「切回」`, g.value = `删掉了${t}的代码文件(块本身还在)`, St(!0, "完成");
1788
1788
  }, T);
1789
- async function be(s, t) {
1790
- let e = s.handle;
1791
- for (const r of Ge(t))
1792
- e = await e.getDirectoryHandle(r, { create: !0 });
1793
- return { handle: e, name: `${s.name}/${t}` };
1789
+ async function he(o, t) {
1790
+ let e = o.handle;
1791
+ for (const d of Xe(t))
1792
+ e = await e.getDirectoryHandle(d, { create: !0 });
1793
+ return { handle: e, name: `${o.name}/${t}` };
1794
1794
  }
1795
- const tt = E(null), Qt = E(!1), U = E({ active: !1, percent: 0, stage: "", failed: !1 }), ns = I(() => ({
1795
+ const tt = E(null), Zt = E(!1), U = E({ active: !1, percent: 0, stage: "", failed: !1 }), ls = I(() => ({
1796
1796
  width: `${Math.max(0, Math.min(100, U.value.percent))}%`,
1797
1797
  background: U.value.failed ? "var(--sp-color-danger)" : "var(--sp-color-primary, var(--primary-color))"
1798
1798
  }));
1799
- let ve = [], Qe = 0;
1800
- function he(s = !1) {
1801
- if (!(!s && performance.now() - Qe < fr)) {
1802
- Qe = performance.now();
1799
+ let _e = [], tn = 0;
1800
+ function ge(o = !1) {
1801
+ if (!(!o && performance.now() - tn < vr)) {
1802
+ tn = performance.now();
1803
1803
  try {
1804
- window.localStorage.setItem("mb:progress", JSON.stringify(ve));
1804
+ window.localStorage.setItem("mb:progress", JSON.stringify(_e));
1805
1805
  } catch {
1806
1806
  }
1807
1807
  }
1808
1808
  }
1809
- function ct(s, t) {
1810
- U.value = { active: !0, percent: Math.max(U.value.percent, s), stage: t, failed: !1 }, ve.push({ p: U.value.percent, s: t, t: Math.round(performance.now()) }), he();
1809
+ function ht(o, t) {
1810
+ U.value = { active: !0, percent: Math.max(U.value.percent, o), stage: t, failed: !1 }, _e.push({ p: U.value.percent, s: t, t: Math.round(performance.now()) }), ge();
1811
1811
  }
1812
- function St(s, t) {
1813
- ct(s ? 100 : U.value.percent, t), U.value = { active: !s, percent: s ? 100 : U.value.percent, stage: t, failed: !s }, he(!0);
1812
+ function St(o, t) {
1813
+ ht(o ? 100 : U.value.percent, t), U.value = { active: !o, percent: o ? 100 : U.value.percent, stage: t, failed: !o }, ge(!0);
1814
1814
  }
1815
- function Ye() {
1816
- ve = [], he(!0);
1815
+ function en() {
1816
+ _e = [], ge(!0);
1817
1817
  }
1818
- const Ze = (s) => (s.disabledReason ?? "").trim(), _e = (s) => (s.issues ?? []).map((t) => String(t?.message ?? "")).filter(Boolean), Yt = (s) => To(s.id);
1819
- function ss(s) {
1820
- y.value = y.value === s.id ? "" : s.id, y.value === s.id && X(s.id);
1818
+ const nn = (o) => (o.disabledReason ?? "").trim(), ye = (o) => (o.issues ?? []).map((t) => String(t?.message ?? "")).filter(Boolean), Xt = (o) => Ro(o.id);
1819
+ function is(o) {
1820
+ y.value = y.value === o.id ? "" : o.id, y.value === o.id && X(o.id);
1821
1821
  const t = b.value;
1822
- Jn(s.id);
1823
- const e = s.name || s.id, r = Yt(s);
1824
- if (r.length === 0) {
1822
+ Yn(o.id);
1823
+ const e = o.name || o.id, d = Xt(o);
1824
+ if (d.length === 0) {
1825
1825
  g.value = `「${e}」这次会话里还没在哪条标签上露过面:先打开挂着它的那一页,再点一次`;
1826
1826
  return;
1827
1827
  }
1828
- if (r.includes(t)) {
1829
- g.value = `「${e}」就在这一条标签上(${r.join(" / ")}):已经把它标红`;
1828
+ if (d.includes(t)) {
1829
+ g.value = `「${e}」就在这一条标签上(${d.join(" / ")}):已经把它标红`;
1830
1830
  return;
1831
1831
  }
1832
- const w = Bo(s.id, t, m);
1832
+ const w = Ao(o.id, t, m);
1833
1833
  if (w) {
1834
- g.value = `「${e}」不在这一条标签上:正在切到 ${w} 那条标签`, qe(w);
1834
+ g.value = `「${e}」不在这一条标签上:正在切到 ${w} 那条标签`, He(w);
1835
1835
  return;
1836
1836
  }
1837
- g.value = `「${e}」只挂在带参数的实例标签上(${r.join(" / ")}):不替你挑一单 —— 自己打开要看的那一页再点`;
1837
+ g.value = `「${e}」只挂在带参数的实例标签上(${d.join(" / ")}):不替你挑一单 —— 自己打开要看的那一页再点`;
1838
1838
  }
1839
- const os = (s, t) => J(async () => {
1840
- const e = await dt(
1841
- `/magic-blocks/${encodeURIComponent(s.id)}/versions/${t}`
1839
+ const as = (o, t) => J(async () => {
1840
+ const e = await ct(
1841
+ `/magic-blocks/${encodeURIComponent(o.id)}/versions/${t}`
1842
1842
  );
1843
- q.value = { id: s.id, number: t, files: e.files ?? {} }, g.value = `正在看「${s.name || s.id}」的 v${t}(只读:不会改库里任何东西)`;
1844
- }, T), ls = (s, t) => J(async () => {
1845
- window.confirm(`把「${s.name || s.id}」切回 v${t}?
1843
+ q.value = { id: o.id, number: t, files: e.files ?? {} }, g.value = `正在看「${o.name || o.id}」的 v${t}(只读:不会改库里任何东西)`;
1844
+ }, T), us = (o, t) => J(async () => {
1845
+ window.confirm(`把「${o.name || o.id}」切回 v${t}?
1846
1846
 
1847
- 这会把那一版的代码变成**当前版**,并且记成一个**新版本**(号继续 +1):历史只追加,旧版本一个都不会没。`) && (await Mt(`/magic-blocks/${encodeURIComponent(s.id)}/versions/${t}`, { updatedBy: "" }), g.value = `「${s.name || s.id}」已切回 v${t}(并记成了一个新版本)`, await Rt(), await X(s.id));
1848
- }, T), is = (s, t) => J(async () => {
1849
- window.confirm(`删掉「${s.name || s.id}」的 v${t}?
1847
+ 这会把那一版的代码变成**当前版**,并且记成一个**新版本**(号继续 +1):历史只追加,旧版本一个都不会没。`) && (await Mt(`/magic-blocks/${encodeURIComponent(o.id)}/versions/${t}`, { updatedBy: "" }), g.value = `「${o.name || o.id}」已切回 v${t}(并记成了一个新版本)`, await Rt(), await X(o.id));
1848
+ }, T), rs = (o, t) => J(async () => {
1849
+ window.confirm(`删掉「${o.name || o.id}」的 v${t}?
1850
1850
 
1851
- 这一版的代码就找不回来了(别的版本不受影响)。`) && (await dt(`/magic-blocks/${encodeURIComponent(s.id)}/versions/${t}`, { method: "DELETE" }), g.value = `删掉了「${s.name || s.id}」的 v${t}`, await X(s.id));
1852
- }, T), as = (s, t) => J(async () => {
1851
+ 这一版的代码就找不回来了(别的版本不受影响)。`) && (await ct(`/magic-blocks/${encodeURIComponent(o.id)}/versions/${t}`, { method: "DELETE" }), g.value = `删掉了「${o.name || o.id}」的 v${t}`, await X(o.id));
1852
+ }, T), cs = (o, t) => J(async () => {
1853
1853
  const e = await fetch(
1854
- `${De}/magic-blocks/${encodeURIComponent(s.id)}/versions/${t}?download=1`,
1855
- { credentials: "include", headers: ae("GET", !1) }
1854
+ `${ze}/magic-blocks/${encodeURIComponent(o.id)}/versions/${t}?download=1`,
1855
+ { credentials: "include", headers: re("GET", !1) }
1856
1856
  );
1857
1857
  if (!e.ok) throw new Error(`下载失败(HTTP ${e.status})`);
1858
- const r = await e.blob(), w = URL.createObjectURL(r);
1858
+ const d = await e.blob(), w = URL.createObjectURL(d);
1859
1859
  try {
1860
1860
  const N = document.createElement("a");
1861
- N.href = w, N.download = `magic-block-${s.name || s.id}-v${t}.zip`, document.body.appendChild(N), N.click(), N.remove();
1861
+ N.href = w, N.download = `magic-block-${o.name || o.id}-v${t}.zip`, document.body.appendChild(N), N.click(), N.remove();
1862
1862
  } finally {
1863
1863
  setTimeout(() => URL.revokeObjectURL(w), 0);
1864
1864
  }
1865
- g.value = `已下载「${s.name || s.id}」的 v${t}`;
1865
+ g.value = `已下载「${o.name || o.id}」的 v${t}`;
1866
1866
  }, T);
1867
- function us(s) {
1868
- st.value = s.id, ot.value = (s.tags ?? []).join(", ");
1869
- }
1870
- const Xe = (s) => J(async () => {
1871
- const t = ot.value.split(/[,,\s]+/).map((r) => r.trim()).filter(Boolean), e = await Mt(`/magic-blocks/${encodeURIComponent(s.id)}/tags`, { tags: t });
1872
- st.value = "", g.value = `「${s.name || s.id}」的标签已存:${(e.tags ?? []).join(" / ") || "(一个都不剩)"}`, await Rt();
1873
- }, T, "存标签"), rs = (s) => J(async () => {
1874
- const t = await Mt(`/magic-blocks/${encodeURIComponent(s.id)}/detail`, { detail: wt.value });
1875
- $t.value = "", g.value = `「${s.name || s.id}」的详情已存${(t.detail ?? "").trim() ? "" : "(清掉了)"};块包里那份 ${hn} 跟着一起写了`, await Rt();
1867
+ function ds(o) {
1868
+ st.value = o.id, ot.value = (o.tags ?? []).join(", ");
1869
+ }
1870
+ const sn = (o) => J(async () => {
1871
+ const t = ot.value.split(/[,,\s]+/).map((d) => d.trim()).filter(Boolean), e = await Mt(`/magic-blocks/${encodeURIComponent(o.id)}/tags`, { tags: t });
1872
+ st.value = "", g.value = `「${o.name || o.id}」的标签已存:${(e.tags ?? []).join(" / ") || "(一个都不剩)"}`, await Rt();
1873
+ }, T, "存标签"), ps = (o) => J(async () => {
1874
+ const t = await Mt(`/magic-blocks/${encodeURIComponent(o.id)}/detail`, { detail: wt.value });
1875
+ $t.value = "", g.value = `「${o.name || o.id}」的详情已存${(t.detail ?? "").trim() ? "" : "(清掉了)"};块包里那份 ${yn} 跟着一起写了`, await Rt();
1876
1876
  }, T, "存详情");
1877
- function cs(s) {
1878
- $t.value = s.id, wt.value = (s.detail ?? "").trim();
1877
+ function fs(o) {
1878
+ $t.value = o.id, wt.value = (o.detail ?? "").trim();
1879
1879
  }
1880
- function ds(s) {
1880
+ function ms(o) {
1881
1881
  const t = ot.value.split(/[,,\s]+/).map((e) => e.trim()).filter(Boolean);
1882
- t.some((e) => e.toLowerCase() === s.toLowerCase()) || t.push(s), ot.value = t.join(", ");
1882
+ t.some((e) => e.toLowerCase() === o.toLowerCase()) || t.push(o), ot.value = t.join(", ");
1883
1883
  }
1884
- function ps(s) {
1885
- ot.value = ot.value.split(/[,,\s]+/).map((t) => t.trim()).filter((t) => t && t.toLowerCase() !== s.toLowerCase()).join(", ");
1884
+ function bs(o) {
1885
+ ot.value = ot.value.split(/[,,\s]+/).map((t) => t.trim()).filter((t) => t && t.toLowerCase() !== o.toLowerCase()).join(", ");
1886
1886
  }
1887
- function fs(s) {
1887
+ function vs(o) {
1888
1888
  const t = O.value.trim().toLowerCase();
1889
- return t ? (s.tags ?? []).some((e) => e.toLowerCase().includes(t)) : !0;
1889
+ return t ? (o.tags ?? []).some((e) => e.toLowerCase().includes(t)) : !0;
1890
1890
  }
1891
- function Zt(s) {
1892
- const t = s.code;
1891
+ function te(o) {
1892
+ const t = o.code;
1893
1893
  return t && typeof t.total == "number" ? t : null;
1894
1894
  }
1895
- function tn(s) {
1896
- const t = Zt(s);
1895
+ function on(o) {
1896
+ const t = te(o);
1897
1897
  return t ? `${t.total} 行` : "";
1898
1898
  }
1899
- function en(s) {
1900
- const t = Zt(s);
1899
+ function ln(o) {
1900
+ const t = te(o);
1901
1901
  return t && t.nonEffective > 0 ? `另有 ${t.nonEffective} 行不生效` : "";
1902
1902
  }
1903
- function nn(s) {
1904
- const t = Zt(s);
1903
+ function an(o) {
1904
+ const t = te(o);
1905
1905
  if (!t) return "";
1906
1906
  const e = [
1907
1907
  `生效代码 ${t.total} 行 · ${t.files} 个文件(含注释与空行)`,
1908
1908
  "“生效”= 会被平台执行的那些文件;路径里任一段以 _ 开头的不算。.md / .txt / .svg 也不算。"
1909
1909
  ];
1910
- for (const r of t.byFile) e.push(`${String(r.lines).padStart(5, " ")} ${r.name}`);
1910
+ for (const d of t.byFile) e.push(`${String(d.lines).padStart(5, " ")} ${d.name}`);
1911
1911
  if (t.byFile.length === 0 && e.push("(这一块还没有生效的代码文件)"), t.nonEffective > 0) {
1912
1912
  e.push(""), e.push(`不生效 ${t.nonEffective} 行 · ${t.nonEffectiveFiles.length} 个文件(照样进库、存进版本史,但执行时被忽略)`);
1913
- for (const r of t.nonEffectiveFiles) e.push(`${String(r.lines).padStart(5, " ")} ${r.name}`);
1913
+ for (const d of t.nonEffectiveFiles) e.push(`${String(d.lines).padStart(5, " ")} ${d.name}`);
1914
1914
  }
1915
1915
  return e.join(`
1916
1916
  `);
1917
1917
  }
1918
- function ms(s) {
1919
- const t = Yt(s), e = t.length === 0 ? "点一下:这次会话里它还没在哪条标签上露过面" : `点一下:把「${s.name || s.id}」标红,并在需要时切到挂着它的标签(${t.join(" / ")})`, r = Ze(s);
1920
- return r ? `${r}
1918
+ function hs(o) {
1919
+ const t = Xt(o), e = t.length === 0 ? "点一下:这次会话里它还没在哪条标签上露过面" : `点一下:把「${o.name || o.id}」标红,并在需要时切到挂着它的标签(${t.join(" / ")})`, d = nn(o);
1920
+ return d ? `${d}
1921
1921
  ${e}` : e;
1922
1922
  }
1923
- const sn = I(() => {
1924
- const s = v.value.trim().toLowerCase();
1925
- return h.value.filter((t) => fs(t) ? s ? `${t.module} ${t.name} ${t.brief} ${t.detail ?? ""} ${t.id} v${t.version ?? ""} ${(t.tags ?? []).join(" ")}`.toLowerCase().includes(s) : !0 : !1);
1926
- }), Xt = I(() => (L.value?.blocks ?? []).filter((s) => s.canApply)), te = I(() => Xt.value.filter((s) => mt.value[s.id] === !0)), Tt = E(!1), bt = I(() => G.value.length + (L.value?.failures ?? []).length + Q.value.filter((s) => !s.ok).length), Ft = I(() => Q.value.filter((s) => !s.ok)), ge = I(() => Q.value.filter((s) => s.ok).length), ye = I(() => h.value.filter((s) => s.enabled === !1).length), Bt = I(() => (H.value?.results ?? []).filter((s) => (s.verifyNotes ?? []).length > 0)), yt = I(() => Bt.value.reduce((s, t) => s + (t.verifyNotes ?? []).length, 0)), Y = I(() => (H.value?.results ?? []).filter((s) => s.probeRan !== !0).map((s) => s.name || s.id));
1927
- function bs() {
1928
- const s = /* @__PURE__ */ new Set(), t = [];
1929
- for (const e of ke()) {
1930
- const r = typeof e?.path == "string" ? e.path.trim() : "";
1931
- if (!r || s.has(r) || r.includes(":") || r.includes("*") || e.redirect || !e.components?.default || e.meta?.tab === !1) continue;
1932
- s.add(r);
1923
+ const un = I(() => {
1924
+ const o = v.value.trim().toLowerCase();
1925
+ return h.value.filter((t) => vs(t) ? o ? `${t.module} ${t.name} ${t.brief} ${t.detail ?? ""} ${t.id} v${t.version ?? ""} ${(t.tags ?? []).join(" ")}`.toLowerCase().includes(o) : !0 : !1);
1926
+ }), ee = I(() => (L.value?.blocks ?? []).filter((o) => o.canApply)), ne = I(() => ee.value.filter((o) => ft.value[o.id] === !0)), Tt = E(!1), mt = I(() => G.value.length + (L.value?.failures ?? []).length + Q.value.filter((o) => !o.ok).length), zt = I(() => Q.value.filter((o) => !o.ok)), ke = I(() => Q.value.filter((o) => o.ok).length), $e = I(() => h.value.filter((o) => o.enabled === !1).length), Bt = I(() => (H.value?.results ?? []).filter((o) => (o.verifyNotes ?? []).length > 0)), yt = I(() => Bt.value.reduce((o, t) => o + (t.verifyNotes ?? []).length, 0)), Y = I(() => (H.value?.results ?? []).filter((o) => o.probeRan !== !0).map((o) => o.name || o.id));
1927
+ function _s() {
1928
+ const o = /* @__PURE__ */ new Set(), t = [];
1929
+ for (const e of we()) {
1930
+ const d = typeof e?.path == "string" ? e.path.trim() : "";
1931
+ if (!d || o.has(d) || d.includes(":") || d.includes("*") || e.redirect || !e.components?.default || e.meta?.tab === !1) continue;
1932
+ o.add(d);
1933
1933
  const w = e.meta?.title ?? e.meta?.sub, N = e.meta?.group;
1934
1934
  t.push({
1935
- path: r,
1936
- title: typeof w == "string" && w.trim() ? w.trim() : r,
1935
+ path: d,
1936
+ title: typeof w == "string" && w.trim() ? w.trim() : d,
1937
1937
  group: typeof N == "string" ? N.trim() : ""
1938
1938
  });
1939
1939
  }
1940
1940
  return t;
1941
1941
  }
1942
- function ke() {
1942
+ function we() {
1943
1943
  return u?.getRoutes?.() ?? [];
1944
1944
  }
1945
- const $e = I(() => Ho(ke(), Yn, h.value.map((s) => s.id))), vs = {
1945
+ const xe = I(() => Wo(we(), ts, h.value.map((o) => o.id))), gs = {
1946
1946
  models: "项目模型",
1947
1947
  surface: "模型的行为表面(方法 / 属性)",
1948
1948
  packages: "pip 包",
@@ -1951,309 +1951,312 @@ ${e}` : e;
1951
1951
  routes: "跨块跳转的地址",
1952
1952
  opaque: "豁免(只声明、不查它内部)"
1953
1953
  };
1954
- function on(s) {
1955
- const t = s.requires;
1954
+ function rn(o) {
1955
+ const t = o.requires;
1956
1956
  if (!t || typeof t != "object") return [];
1957
1957
  const e = [];
1958
- for (const [r, w] of Object.entries(vs)) {
1959
- const N = t[r], P = [];
1960
- if (r === "surface" && N && typeof N == "object")
1958
+ for (const [d, w] of Object.entries(gs)) {
1959
+ const N = t[d], P = [];
1960
+ if (d === "surface" && N && typeof N == "object")
1961
1961
  for (const [et, nt] of Object.entries(N))
1962
- for (const Se of Array.isArray(nt) ? nt : []) P.push(`${et}.${String(Se)}`);
1962
+ for (const Re of Array.isArray(nt) ? nt : []) P.push(`${et}.${String(Re)}`);
1963
1963
  else if (Array.isArray(N))
1964
1964
  for (const et of N) P.push(String(et));
1965
- P.length > 0 && e.push({ key: r, title: w, values: P });
1965
+ P.length > 0 && e.push({ key: d, title: w, values: P });
1966
1966
  }
1967
1967
  return e;
1968
1968
  }
1969
- function hs(s) {
1970
- return Go(s.requires?.routes, ke());
1969
+ function ys(o) {
1970
+ return Zo(o.requires?.routes, we());
1971
1971
  }
1972
- function Pt(s) {
1973
- return (s instanceof Error ? s.message.trim() : String(s)) || "请求没有到达后端(网络或登录态的问题),请重试";
1972
+ function Pt(o) {
1973
+ return (o instanceof Error ? o.message.trim() : String(o)) || "请求没有到达后端(网络或登录态的问题),请重试";
1974
1974
  }
1975
- function _s(s) {
1976
- const t = s?.issues;
1975
+ function ks(o) {
1976
+ const t = o?.issues;
1977
1977
  return Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : String(e?.message ?? "")).filter(Boolean) : [];
1978
1978
  }
1979
- async function Mt(s, t) {
1979
+ async function Mt(o, t) {
1980
1980
  const e = JSON.stringify(t);
1981
1981
  try {
1982
- return await dt(s, { method: "POST", body: e });
1983
- } catch (r) {
1984
- const w = Pt(r), N = await fetch(`${De}${s}`, {
1982
+ return await ct(o, { method: "POST", body: e });
1983
+ } catch (d) {
1984
+ const w = Pt(d), N = await fetch(`${ze}${o}`, {
1985
1985
  method: "POST",
1986
1986
  credentials: "include",
1987
- headers: { "Content-Type": "application/json", ...ae("POST", !0) },
1987
+ headers: { "Content-Type": "application/json", ...re("POST", !0) },
1988
1988
  body: e
1989
- }).then((et) => et.json()).catch(() => null), P = _s(N);
1989
+ }).then((et) => et.json()).catch(() => null), P = ks(N);
1990
1990
  throw P.length === 0 ? new Error(w) : new Error(`${String(N?.message ?? w)}
1991
1991
  - ${P.join(`
1992
1992
  - `)}`);
1993
1993
  }
1994
1994
  }
1995
- async function gs() {
1996
- const s = S.value.map((t) => `[${t.at}] ${t.where}
1995
+ async function $s() {
1996
+ const o = S.value.map((t) => `[${t.at}] ${t.where}
1997
1997
  ${t.text}`).join(`
1998
1998
 
1999
1999
  `);
2000
2000
  try {
2001
- await navigator.clipboard.writeText(s), g.value = `已复制 ${S.value.length} 条报错`;
2001
+ await navigator.clipboard.writeText(o), g.value = `已复制 ${S.value.length} 条报错`;
2002
2002
  } catch (t) {
2003
- Ut(t, "复制报错");
2003
+ Ht(t, "复制报错");
2004
2004
  }
2005
2005
  }
2006
- function ys() {
2007
- const s = [];
2008
- G.value.length > 0 && s.push("【前端校验拦下的】", ...G.value.map((t) => `- ${t}`), "");
2006
+ function ws() {
2007
+ const o = [];
2008
+ G.value.length > 0 && o.push("【前端校验拦下的】", ...G.value.map((t) => `- ${t}`), "");
2009
2009
  for (const t of L.value?.failures ?? [])
2010
- s.push(`【读回:${t.kind || "问题"}】${t.where || ""}`, `- ${t.message || ""}`, "");
2011
- for (const t of Ft.value)
2012
- s.push(
2010
+ o.push(`【读回:${t.kind || "问题"}】${t.where || ""}`, `- ${t.message || ""}`, "");
2011
+ for (const t of zt.value)
2012
+ o.push(
2013
2013
  `【没存成】${t.name || t.id}`,
2014
2014
  `- ${t.error || ""}`,
2015
2015
  ...(t.issues ?? []).map((e) => `- ${e}`),
2016
2016
  ""
2017
2017
  );
2018
- H.value && Y.value.length > 0 && s.push(
2018
+ H.value && Y.value.length > 0 && o.push(
2019
2019
  `【体检:这一趟没验运行期(不是错)】只做了静态判据(引用 / 字段 / 枚举在不在),运行期错误一个都没验 —— 那 ${Y.value.length} 个块的"通过"是静态通过,不等于"跑得起来":${Y.value.join(" / ")}`,
2020
2020
  ""
2021
2021
  );
2022
2022
  for (const t of Bt.value)
2023
- s.push(
2023
+ o.push(
2024
2024
  `【体检说明:提示 / 没验到(不是错)】${t.name || t.id}`,
2025
2025
  ...(t.verifyNotes ?? []).map((e) => `- ${e}`),
2026
2026
  ""
2027
2027
  );
2028
- return s.join(`
2028
+ return o.join(`
2029
2029
  `).trim() || "这一趟没有问题。";
2030
2030
  }
2031
- async function ks() {
2031
+ async function xs() {
2032
2032
  try {
2033
- await navigator.clipboard.writeText(ys()), g.value = `已复制这一趟的 ${bt.value} 条问题`;
2034
- } catch (s) {
2035
- Ut(s, "复制问题");
2033
+ await navigator.clipboard.writeText(ws()), g.value = `已复制这一趟的 ${mt.value} 条问题`;
2034
+ } catch (o) {
2035
+ Ht(o, "复制问题");
2036
2036
  }
2037
2037
  }
2038
- function Ut(s, t) {
2039
- const e = Pt(s);
2038
+ function Ht(o, t) {
2039
+ const e = Pt(o);
2040
2040
  _.value = e, S.value = [...S.value, { at: (/* @__PURE__ */ new Date()).toLocaleTimeString(), where: t, text: e }];
2041
2041
  }
2042
- function we() {
2042
+ function Ce() {
2043
2043
  _.value = "", S.value = [];
2044
2044
  }
2045
2045
  async function Rt() {
2046
2046
  try {
2047
- const s = await dt("/magic-blocks/index");
2048
- h.value = s.blocks ?? [], D.value = s.tags ?? [];
2049
- } catch (s) {
2050
- Ut(s, "读块清单");
2047
+ const o = await ct("/magic-blocks/index");
2048
+ h.value = o.blocks ?? [], D.value = o.tags ?? [];
2049
+ } catch (o) {
2050
+ Ht(o, "读块清单");
2051
2051
  }
2052
2052
  }
2053
- async function J(s, t, e = "") {
2054
- t.value = !0, we();
2053
+ async function J(o, t, e = "") {
2054
+ t.value = !0, Ce();
2055
2055
  try {
2056
- await s(), ko();
2057
- } catch (r) {
2058
- Ut(r, e || "这个动作");
2056
+ await o(), xo();
2057
+ } catch (d) {
2058
+ Ht(d, e || "这个动作");
2059
2059
  } finally {
2060
2060
  t.value = !1;
2061
2061
  }
2062
2062
  }
2063
- const $s = () => J(async () => {
2064
- qt.value = !0;
2063
+ const Cs = () => J(async () => {
2064
+ Ut.value = !0;
2065
2065
  try {
2066
- const s = await dt("/magic-blocks/check", { method: "POST", body: JSON.stringify({}) });
2067
- H.value = s;
2066
+ const o = await ct("/magic-blocks/check", { method: "POST", body: JSON.stringify({}) });
2067
+ H.value = o;
2068
2068
  const t = yt.value;
2069
- g.value = `全部魔法块重新校验完了:查了 ${s.checked} 个块,通过 ${s.passed}、停用 ${s.disabled};${Y.value.length > 0 ? `⚠️ 这一趟**没验运行期**(${Y.value.length} 个块)` : "运行期也真跑了一遍"}` + (t > 0 ? `;另有 ${t} 条"没验到 / 只提示"的说明,见下面那一段` : ""), await Rt();
2069
+ g.value = `全部魔法块重新校验完了:查了 ${o.checked} 个块,通过 ${o.passed}、停用 ${o.disabled};${Y.value.length > 0 ? `⚠️ 这一趟**没验运行期**(${Y.value.length} 个块)` : "运行期也真跑了一遍"}` + (t > 0 ? `;另有 ${t} 条"没验到 / 只提示"的说明,见下面那一段` : ""), await Rt();
2070
2070
  } finally {
2071
- qt.value = !1;
2071
+ Ut.value = !1;
2072
2072
  }
2073
- }, T), ln = (s) => J(async () => {
2074
- const t = await Le();
2075
- s === "export" ? (V.value = t, z.value || (z.value = t)) : (z.value = t, V.value || (V.value = t)), g.value = s === "export" ? `导出目录:${t.name}${z.value === t ? "(读回目录也填成它了)" : ""}` : `读回目录:${t.name}`;
2073
+ }, T), cn = (o) => J(async () => {
2074
+ const t = await De();
2075
+ o === "export" ? (V.value = t, z.value || (z.value = t)) : (z.value = t, V.value || (V.value = t)), g.value = o === "export" ? `导出目录:${t.name}${z.value === t ? "(读回目录也填成它了)" : ""}` : `读回目录:${t.name}`;
2076
2076
  }, T);
2077
- async function xe() {
2077
+ async function Ee() {
2078
2078
  if (it.value) return it.value;
2079
- const s = await dt("/magic-blocks/rules");
2080
- return it.value = s.rules, s.rules;
2079
+ const o = await ct("/magic-blocks/rules");
2080
+ return it.value = o.rules, o.rules;
2081
2081
  }
2082
- const ws = () => J(async () => {
2083
- if (!Zn()) throw new Error("这个浏览器没法直接写你本机的文件夹:请用 Chrome / Edge,并从 https 或 localhost 打开");
2084
- if (lt.value === "one" && !ht.value)
2082
+ const Es = () => J(async () => {
2083
+ if (!es()) throw new Error("这个浏览器没法直接写你本机的文件夹:请用 Chrome / Edge,并从 https 或 localhost 打开");
2084
+ if (lt.value === "one" && !vt.value)
2085
2085
  throw new Error("还没挑块:上面选「仅这一个块」时要先在下拉里挑一个块(或者把范围改成「全部块」)");
2086
- ft.value = !0, g.value = "", W.value = "", we(), Ye(), ee.length = 0, U.value = { active: !0, percent: 0, stage: "准备…", failed: !1 };
2086
+ pt.value = !0, g.value = "", W.value = "", Ce(), en(), Se.length = 0, se = performance.now(), It = null, Nt = null, U.value = { active: !0, percent: 0, stage: "准备…", failed: !1 };
2087
2087
  try {
2088
- const s = V.value ?? await Le();
2089
- V.value = s, z.value || (z.value = s);
2090
- const t = Mt("/magic-blocks/export", Et()), e = Ce(), r = it.value ? Pe(s, it.value) : null, w = await At("取包", t);
2091
- it.value = w.rules, cl(s, w.rules);
2092
- const N = r ? await At("数目录", r) : await At("数目录", Pe(s, w.rules));
2088
+ const o = V.value ?? await De();
2089
+ V.value = o, z.value || (z.value = o);
2090
+ const t = Mt("/magic-blocks/export", Et()), e = Be(), d = it.value ? qe(o, it.value) : null, w = await At("取包", t);
2091
+ it.value = w.rules, fl(o, w.rules);
2092
+ const N = d ? await At("数目录", d) : await At("数目录", qe(o, w.rules));
2093
2093
  if (N.topCount > 0) {
2094
- ct(5, "等你确认要不要先清空"), tt.value = { target: s, inventory: N };
2094
+ ht(5, "等你确认要不要先清空"), It = w, Nt = e, tt.value = { target: o, inventory: N };
2095
2095
  return;
2096
2096
  }
2097
- await Ee(s, w, { clean: !1, verify: !1, front: e });
2098
- } catch (s) {
2099
- throw St(!1, "导出失败"), s;
2097
+ await Me(o, w, { clean: !1, verify: !1, front: e });
2098
+ } catch (o) {
2099
+ throw St(!1, "导出失败"), o;
2100
2100
  } finally {
2101
- ft.value = !1;
2101
+ pt.value = !1;
2102
2102
  }
2103
- }, T), an = /* @__PURE__ */ new WeakMap(), ee = [];
2104
- function un(s, t) {
2105
- ee.push([s, Math.round(performance.now() - t)]);
2103
+ }, T), dn = /* @__PURE__ */ new WeakMap(), Se = [];
2104
+ let se = 0, It = null, Nt = null;
2105
+ function Te(o, t) {
2106
+ Se.push([o, Math.round(performance.now() - t)]);
2106
2107
  }
2107
- async function At(s, t) {
2108
+ async function At(o, t) {
2108
2109
  const e = performance.now();
2109
2110
  try {
2110
2111
  return await t;
2111
2112
  } finally {
2112
- un(s, e);
2113
+ Te(o, e);
2113
2114
  }
2114
2115
  }
2115
- function xs() {
2116
- return ee.length > 0 ? `;耗时:${ee.map(([s, t]) => `${s} ${t}ms`).join(" · ")}` : "";
2116
+ function Ss() {
2117
+ const o = Se.map(([t, e]) => `${t} ${e}ms`);
2118
+ return se > 0 && o.push(`总 ${Math.round(performance.now() - se)}ms`), o.length > 0 ? `;耗时:${o.join(" · ")}` : "";
2117
2119
  }
2118
- function Ce() {
2120
+ function Be() {
2121
+ const o = performance.now();
2122
+ let t;
2119
2123
  try {
2120
- const s = Wn();
2121
- return {
2122
- css: s.css,
2123
- controls: xo(),
2124
- note: s.skipped.length > 0 ? `;⚠️ 有 ${s.skipped.length} 张样式表读不到规则(跨源):${s.skipped.join(" / ")}` : ""
2124
+ const e = Qn();
2125
+ t = {
2126
+ css: e.css,
2127
+ controls: So(),
2128
+ note: e.skipped.length > 0 ? `;⚠️ 有 ${e.skipped.length} 张样式表读不到规则(跨源):${e.skipped.join(" / ")}` : ""
2125
2129
  };
2126
- } catch (s) {
2127
- return { css: "", controls: "", note: `;主题 CSS 没收成(${Pt(s)}):${Ot} 没写,其余照旧` };
2130
+ } catch (e) {
2131
+ t = { css: "", controls: "", note: `;主题 CSS 没收成(${Pt(e)}):${Ot} 没写,其余照旧` };
2128
2132
  }
2133
+ return Te("收主题", o), t;
2129
2134
  }
2130
- async function Ee(s, t, e) {
2131
- const { clean: r, verify: w, thorough: N, front: P } = e;
2135
+ async function Me(o, t, e) {
2136
+ const { clean: d, verify: w, thorough: N, front: P } = e;
2132
2137
  try {
2133
- ct(20, "准备写盘…");
2134
- const et = tl(bs()), nt = { ...t.files };
2135
- nt[je] = et, P.css && (nt[Ot] = P.css), P.controls && (nt[ie] = P.controls), t.exampleDir && (nt[`${t.exampleDir}/${je}`] = et, P.css && (nt[`${t.exampleDir}/${Ot}`] = P.css), P.controls && (nt[`${t.exampleDir}/${ie}`] = P.controls));
2136
- const Se = P.note;
2138
+ ht(20, "准备写盘…");
2139
+ const et = sl(_s()), nt = { ...t.files };
2140
+ nt[Ne] = et, P.css && (nt[Ot] = P.css), P.controls && (nt[ue] = P.controls), t.exampleDir && (nt[`${t.exampleDir}/${Ne}`] = et, P.css && (nt[`${t.exampleDir}/${Ot}`] = P.css), P.controls && (nt[`${t.exampleDir}/${ue}`] = P.controls));
2141
+ const Re = P.note;
2137
2142
  await new Promise((ut) => {
2138
2143
  setTimeout(ut, 0);
2139
2144
  });
2140
- let fn = "", Te;
2141
- if (r) {
2142
- ct(35, "清掉这一包不要的东西…");
2143
- const ut = await At("清多余", ul(s, nt));
2144
- Te = ut.existing, fn = ut.removed > 0 ? `,先清掉了 ${ut.removed} 项` : ",没有多余的东西要清";
2145
+ let vn = "", Ae;
2146
+ if (d) {
2147
+ ht(35, "清掉这一包不要的东西…");
2148
+ const ut = await At("清多余", dl(o, nt));
2149
+ Ae = ut.existing, vn = ut.removed > 0 ? `,先清掉了 ${ut.removed} 项` : ",没有多余的东西要清";
2145
2150
  } else
2146
- ct(35, "看一眼目录里有什么…"), Te = await At("看目录", rl(s, nt));
2147
- const Ms = an.get(s.handle), Rs = Object.keys(nt).length, Be = r ? 45 : 30;
2148
- ct(Be, `写文件 0/${Rs}…`);
2149
- let mn = 0;
2150
- const As = performance.now(), at = await il(s, nt, (ut, Me) => {
2151
- const bn = Date.now();
2152
- ut < Me && bn - mn < pr || (mn = bn, ct(Be + Math.round(ut / Math.max(1, Me) * (95 - Be)), `写文件 ${ut}/${Me}…`));
2151
+ ht(35, "看一眼目录里有什么…"), Ae = await At("看目录", pl(o, nt));
2152
+ const Os = dn.get(o.handle), js = Object.keys(nt).length, Oe = d ? 45 : 30;
2153
+ ht(Oe, `写文件 0/${js}…`);
2154
+ let hn = 0;
2155
+ const Ls = performance.now(), at = await rl(o, nt, (ut, je) => {
2156
+ const _n = Date.now();
2157
+ ut < je && _n - hn < br || (hn = _n, ht(Oe + Math.round(ut / Math.max(1, je) * (95 - Oe)), `写文件 ${ut}/${je}…`));
2153
2158
  }, {
2154
2159
  verify: w,
2155
2160
  // 🔴 账本:勾了「逐个核对磁盘」就不给它 —— 那样连上一趟铺过的也重新核对一遍。
2156
- trust: N ? void 0 : Ms,
2157
- existing: Te
2161
+ trust: N ? void 0 : Os,
2162
+ existing: Ae
2158
2163
  });
2159
- un("写盘", As), an.set(s.handle, at.fingerprints), ct(98, "收尾…");
2160
- const Os = at.failed.length > 0 ? `;⚠️ ${at.failed.length} 个文件没写成:${at.failed.slice(0, 3).map((ut) => `${ut.path}(${ut.message})`).join("、")}` + (at.failed.length > 3 ? ` 等 ${at.failed.length} 条` : "") : "", ne = [];
2161
- at.skipped > 0 && ne.push(`${at.skipped} 个与库里一字不差(逐字节比过)`), at.trusted > 0 && ne.push(`${at.trusted} 个按上一趟的账本跳过(没再碰磁盘)`);
2162
- const js = ne.length > 0 ? `,跳过 ${ne.join(" / ")}` : "";
2163
- W.value = `铺到「${s.name}」:${t.blocks} 个块、写了 ${at.written} 个文件${js}(含 ${je} / ${Ot} / ${ie})${fn}${Os}${Se}${xs()}`, g.value = at.failed.length > 0 ? "导出完了,但有文件没写成(见下面那句)" : "导出完了:用你自己的编辑器改,改完回这里「读回改动」", St(!0, "完成");
2164
+ Te("写盘", Ls), dn.set(o.handle, at.fingerprints), ht(98, "收尾…");
2165
+ const Ps = at.failed.length > 0 ? `;⚠️ ${at.failed.length} 个文件没写成:${at.failed.slice(0, 3).map((ut) => `${ut.path}(${ut.message})`).join("、")}` + (at.failed.length > 3 ? ` 等 ${at.failed.length} 条` : "") : "", oe = [];
2166
+ at.skipped > 0 && oe.push(`${at.skipped} 个与库里一字不差(逐字节比过)`), at.trusted > 0 && oe.push(`${at.trusted} 个按上一趟的账本跳过(没再碰磁盘)`);
2167
+ const Is = oe.length > 0 ? `,跳过 ${oe.join(" / ")}` : "";
2168
+ W.value = `铺到「${o.name}」:${t.blocks} 个块、写了 ${at.written} 个文件${Is}(含 ${Ne} / ${Ot} / ${ue})${vn}${Ps}${Re}${Ss()}`, g.value = at.failed.length > 0 ? "导出完了,但有文件没写成(见下面那句)" : "导出完了:用你自己的编辑器改,改完回这里「读回改动」", St(!0, "完成"), It = null, Nt = null;
2164
2169
  } catch (et) {
2165
2170
  throw St(!1, "导出中途失败(已经铺进去的文件不会自己删掉)"), et;
2166
2171
  }
2167
2172
  }
2168
- const Cs = () => J(async () => {
2169
- const s = tt.value;
2170
- if (tt.value = null, !!s) {
2171
- ft.value = !0;
2173
+ const Ts = () => J(async () => {
2174
+ const o = tt.value;
2175
+ if (tt.value = null, !!o) {
2176
+ pt.value = !0;
2172
2177
  try {
2173
- ct(15, "重新取一份开发包…");
2174
- const t = Mt("/magic-blocks/export", Et()), e = Ce(), r = await At("取包", t);
2175
- it.value = r.rules, await Ee(s.target, r, { clean: !0, verify: !0, thorough: Qt.value, front: e });
2178
+ const t = It ?? await At("取包", Mt("/magic-blocks/export", Et())), e = Nt ?? Be();
2179
+ it.value = t.rules, await Me(o.target, t, { clean: !0, verify: !0, thorough: Zt.value, front: e });
2176
2180
  } catch (t) {
2177
2181
  throw St(!1, "导出失败"), t;
2178
2182
  } finally {
2179
- ft.value = !1;
2183
+ pt.value = !1;
2180
2184
  }
2181
2185
  }
2182
- }, T), Es = () => J(async () => {
2183
- const s = tt.value;
2184
- if (tt.value = null, !!s) {
2185
- ft.value = !0;
2186
+ }, T), Bs = () => J(async () => {
2187
+ const o = tt.value;
2188
+ if (tt.value = null, !!o) {
2189
+ pt.value = !0;
2186
2190
  try {
2187
- ct(15, "重新取一份开发包…");
2188
- const t = Mt("/magic-blocks/export", Et()), e = Ce(), r = await At("取包", t);
2189
- it.value = r.rules, await Ee(s.target, r, { clean: !1, verify: !0, thorough: Qt.value, front: e });
2191
+ const t = It ?? await At("取包", Mt("/magic-blocks/export", Et())), e = Nt ?? Be();
2192
+ it.value = t.rules, await Me(o.target, t, { clean: !1, verify: !0, thorough: Zt.value, front: e });
2190
2193
  } catch (t) {
2191
2194
  throw St(!1, "导出失败"), t;
2192
2195
  } finally {
2193
- ft.value = !1;
2196
+ pt.value = !1;
2194
2197
  }
2195
2198
  }
2196
2199
  }, T);
2197
- function Ss() {
2198
- tt.value = null, U.value = { active: !1, percent: 0, stage: "", failed: !1 }, g.value = "这次没有导出(目录里的东西一个字节都没动)", W.value = "";
2200
+ function Ms() {
2201
+ tt.value = null, It = null, Nt = null, se = 0, U.value = { active: !1, percent: 0, stage: "", failed: !1 }, g.value = "这次没有导出(目录里的东西一个字节都没动)", W.value = "";
2199
2202
  }
2200
- const rn = () => J(async () => {
2201
- const s = z.value ?? await Le();
2202
- z.value = s, V.value || (V.value = s), xt.value = !0, g.value = "", G.value = [], Q.value = [];
2203
+ const pn = () => J(async () => {
2204
+ const o = z.value ?? await De();
2205
+ z.value = o, V.value || (V.value = o), xt.value = !0, g.value = "", G.value = [], Q.value = [];
2203
2206
  try {
2204
- const t = await xe().catch((P) => {
2207
+ const t = await Ee().catch((P) => {
2205
2208
  throw new Error(`取不到扫描规则(GET /magic-blocks/rules):${Pt(P)}`);
2206
- }), e = await ml(s, t), r = await dt("/magic-blocks/read", {
2209
+ }), e = await hl(o, t), d = await ct("/magic-blocks/read", {
2207
2210
  method: "POST",
2208
2211
  body: JSON.stringify({ ...e, includeMissing: !1 })
2209
2212
  });
2210
- L.value = r;
2213
+ L.value = d;
2211
2214
  const w = {};
2212
- for (const P of r.blocks ?? []) w[P.id] = P.status === "modified" && P.canApply;
2213
- mt.value = w;
2214
- const N = (r.blocks ?? []).reduce((P, et) => ({ ...P, [et.status]: (P[et.status] ?? 0) + 1 }), {});
2215
- g.value = `扫到 ${r.folders} 个文件夹、${r.files} 个文件:有改动 ${N.modified ?? 0} / 没改动 ${N.unchanged ?? 0}` + (r.complete ? "" : "(层数到了上限,没走完,可能还有块没扫到)");
2215
+ for (const P of d.blocks ?? []) w[P.id] = P.status === "modified" && P.canApply;
2216
+ ft.value = w;
2217
+ const N = (d.blocks ?? []).reduce((P, et) => ({ ...P, [et.status]: (P[et.status] ?? 0) + 1 }), {});
2218
+ g.value = `扫到 ${d.folders} 个文件夹、${d.files} 个文件:有改动 ${N.modified ?? 0} / 没改动 ${N.unchanged ?? 0}` + (d.complete ? "" : "(层数到了上限,没走完,可能还有块没扫到)");
2216
2219
  } finally {
2217
2220
  xt.value = !1;
2218
2221
  }
2219
- }, T), Ts = () => J(async () => {
2220
- const s = te.value, t = co(s);
2222
+ }, T), Rs = () => J(async () => {
2223
+ const o = ne.value, t = mo(o);
2221
2224
  if (G.value = t.issues, Q.value = [], t.issues.length > 0)
2222
2225
  throw g.value = "", new Error(`前端校验没过(${t.issues.length} 条),没有发请求:
2223
2226
  - ${t.issues.join(`
2224
2227
  - `)}`);
2225
2228
  rt.value = !0, g.value = "";
2226
2229
  try {
2227
- const e = await Mt("/magic-blocks/import", { updatedBy: "", blocks: s });
2230
+ const e = await Mt("/magic-blocks/import", { updatedBy: "", blocks: o });
2228
2231
  Q.value = e.results ?? [], g.value = `保存:成功 ${e.saved} 个、失败 ${e.failed} 个`, await Rt();
2229
- const r = g.value;
2230
- await rn(), g.value = `${r};已重新读回该目录`;
2232
+ const d = g.value;
2233
+ await pn(), g.value = `${d};已重新读回该目录`;
2231
2234
  } finally {
2232
2235
  rt.value = !1;
2233
2236
  }
2234
2237
  }, T);
2235
- function Bs(s, t) {
2238
+ function As(o, t) {
2236
2239
  const e = t.target;
2237
- mt.value[s] = e?.checked === !0;
2240
+ ft.value[o] = e?.checked === !0;
2238
2241
  }
2239
- function cn(s) {
2240
- const t = { ...mt.value };
2241
- for (const e of Xt.value) t[e.id] = s;
2242
- mt.value = t;
2242
+ function fn(o) {
2243
+ const t = { ...ft.value };
2244
+ for (const e of ee.value) t[e.id] = o;
2245
+ ft.value = t;
2243
2246
  }
2244
- function dn(s) {
2245
- const t = s.detail?.uuid ?? "";
2247
+ function mn(o) {
2248
+ const t = o.detail?.uuid ?? "";
2246
2249
  p.value = !0, y.value = t;
2247
2250
  }
2248
- function pn(s) {
2249
- s.key === "Escape" && p.value && (p.value = !1);
2251
+ function bn(o) {
2252
+ o.key === "Escape" && p.value && (p.value = !1);
2250
2253
  }
2251
- return Mn(() => {
2252
- window.addEventListener("magic-block:open-console", dn), window.addEventListener("keydown", pn), Rt(), xe().catch(() => {
2254
+ return On(() => {
2255
+ window.addEventListener("magic-block:open-console", mn), window.addEventListener("keydown", bn), Rt(), Ee().catch(() => {
2253
2256
  });
2254
- }), Rn(() => {
2255
- window.removeEventListener("magic-block:open-console", dn), window.removeEventListener("keydown", pn);
2256
- }), (s, t) => Z(a) ? (c(), d("div", {
2257
+ }), jn(() => {
2258
+ window.removeEventListener("magic-block:open-console", mn), window.removeEventListener("keydown", bn);
2259
+ }), (o, t) => Z(a) ? (r(), c("div", {
2257
2260
  key: 0,
2258
2261
  class: K(["mbc__shell", { "is-wide": B.value }])
2259
2262
  }, [
@@ -2263,30 +2266,30 @@ ${t.text}`).join(`
2263
2266
  title: "magic block 管理台",
2264
2267
  onClick: t[0] || (t[0] = (e) => p.value = !0)
2265
2268
  }, "块"),
2266
- p.value ? (c(), d("aside", {
2269
+ p.value ? (r(), c("aside", {
2267
2270
  key: 0,
2268
2271
  class: K(["mbc", { "is-wide": B.value }])
2269
2272
  }, [
2270
- l("header", bl, [
2273
+ l("header", _l, [
2271
2274
  t[44] || (t[44] = l("strong", { class: "mbc__brand" }, "magic block", -1)),
2272
2275
  l("span", {
2273
2276
  class: "mbc__count",
2274
2277
  title: `库里一共 ${h.value.length} 个块`
2275
- }, f(h.value.length) + " 个块", 9, vl),
2278
+ }, f(h.value.length) + " 个块", 9, gl),
2276
2279
  t[45] || (t[45] = l("span", { class: "mbc__grow" }, null, -1)),
2277
2280
  l("button", {
2278
2281
  class: "p-button p-button-sm p-button-text",
2279
2282
  type: "button",
2280
2283
  title: B.value ? "收起(回到右侧那条窄抽屉)" : "展开:整屏(块 / 工作区两个页签)",
2281
2284
  onClick: t[1] || (t[1] = (e) => B.value = !B.value)
2282
- }, f(B.value ? "收起" : "展开全屏"), 9, hl),
2285
+ }, f(B.value ? "收起" : "展开全屏"), 9, yl),
2283
2286
  l("button", {
2284
2287
  class: "p-button p-button-sm p-button-text",
2285
2288
  type: "button",
2286
2289
  onClick: t[2] || (t[2] = (e) => p.value = !1)
2287
2290
  }, "关闭")
2288
2291
  ]),
2289
- l("div", _l, [
2292
+ l("div", kl, [
2290
2293
  l("button", {
2291
2294
  class: K(["mbc__tab", { "is-on": R.value === "blocks" }]),
2292
2295
  type: "button",
@@ -2295,13 +2298,13 @@ ${t.text}`).join(`
2295
2298
  onClick: t[3] || (t[3] = (e) => R.value = "blocks")
2296
2299
  }, [
2297
2300
  t[46] || (t[46] = k(" 块 ", -1)),
2298
- l("span", yl, f(h.value.length), 1),
2299
- ye.value > 0 ? (c(), d("span", {
2301
+ l("span", wl, f(h.value.length), 1),
2302
+ $e.value > 0 ? (r(), c("span", {
2300
2303
  key: 0,
2301
2304
  class: "mbc__chip is-bad",
2302
- title: `${ye.value} 个块被停用(体检没过)`
2303
- }, f(ye.value) + " 停用", 9, kl)) : $("", !0)
2304
- ], 10, gl),
2305
+ title: `${$e.value} 个块被停用(体检没过)`
2306
+ }, f($e.value) + " 停用", 9, xl)) : $("", !0)
2307
+ ], 10, $l),
2305
2308
  l("button", {
2306
2309
  class: K(["mbc__tab", { "is-on": R.value === "workspace" }]),
2307
2310
  type: "button",
@@ -2310,15 +2313,15 @@ ${t.text}`).join(`
2310
2313
  onClick: t[4] || (t[4] = (e) => R.value = "workspace")
2311
2314
  }, [
2312
2315
  t[47] || (t[47] = k(" 工作区(导出 / 读回 / 校验) ", -1)),
2313
- bt.value > 0 ? (c(), d("span", {
2316
+ mt.value > 0 ? (r(), c("span", {
2314
2317
  key: 0,
2315
2318
  class: "mbc__chip is-bad",
2316
- title: `这一趟有 ${bt.value} 条问题`
2317
- }, f(bt.value), 9, wl)) : Q.value.length > 0 ? (c(), d("span", xl, f(ge.value) + " 存成", 1)) : $("", !0)
2318
- ], 10, $l)
2319
+ title: `这一趟有 ${mt.value} 条问题`
2320
+ }, f(mt.value), 9, El)) : Q.value.length > 0 ? (r(), c("span", Sl, f(ke.value) + " 存成", 1)) : $("", !0)
2321
+ ], 10, Cl)
2319
2322
  ]),
2320
- l("div", Cl, [
2321
- U.value.active ? (c(), d("div", El, [
2323
+ l("div", Tl, [
2324
+ U.value.active ? (r(), c("div", Bl, [
2322
2325
  l("div", {
2323
2326
  class: K(["mbc__progress", { "is-failed": U.value.failed }]),
2324
2327
  role: "progressbar",
@@ -2328,16 +2331,16 @@ ${t.text}`).join(`
2328
2331
  }, [
2329
2332
  l("div", {
2330
2333
  class: "mbc__progress-bar",
2331
- style: An(ns.value)
2334
+ style: Ln(ls.value)
2332
2335
  }, null, 4)
2333
- ], 10, Sl),
2336
+ ], 10, Ml),
2334
2337
  l("p", {
2335
2338
  class: K(["mbc__hint", { "mbc__progress-note": U.value.failed }])
2336
2339
  }, f(U.value.failed ? "✗" : "") + " " + f(U.value.percent) + "% · " + f(U.value.stage), 3)
2337
2340
  ])) : $("", !0),
2338
- tt.value ? (c(), d("div", Tl, [
2339
- l("p", Bl, "「" + f(tt.value.target.name) + "」里现在有 " + f(tt.value.inventory.dirs) + " 个文件夹 / " + f(tt.value.inventory.files) + " 个文件", 1),
2340
- l("p", Ml, [
2341
+ tt.value ? (r(), c("div", Rl, [
2342
+ l("p", Al, "「" + f(tt.value.target.name) + "」里现在有 " + f(tt.value.inventory.dirs) + " 个文件夹 / " + f(tt.value.inventory.files) + " 个文件", 1),
2343
+ l("p", Ol, [
2341
2344
  t[48] || (t[48] = l("b", null, "只覆盖", -1)),
2342
2345
  t[49] || (t[49] = k("(天天用这个):只把库里", -1)),
2343
2346
  t[50] || (t[50] = l("b", null, "改过 / 缺了", -1)),
@@ -2348,57 +2351,57 @@ ${t.text}`).join(`
2348
2351
  t[55] || (t[55] = k(":先删掉这一包没有的东西,其余同上。 两种都只动这个目录", -1)),
2349
2352
  t[56] || (t[56] = l("b", null, "里面", -1)),
2350
2353
  t[57] || (t[57] = k("的子项:目录本身、以及它外面的任何东西都不会被碰。", -1)),
2351
- tt.value.inventory.items.length > 0 ? (c(), d("span", Rl, "(" + f(tt.value.inventory.items.slice(0, 6).map((e) => e.name).join(" / ")) + f(tt.value.inventory.items.length > 6 ? " …" : "") + ")", 1)) : $("", !0)
2354
+ tt.value.inventory.items.length > 0 ? (r(), c("span", jl, "(" + f(tt.value.inventory.items.slice(0, 6).map((e) => e.name).join(" / ")) + f(tt.value.inventory.items.length > 6 ? " …" : "") + ")", 1)) : $("", !0)
2352
2355
  ]),
2353
- l("label", Al, [
2356
+ l("label", Ll, [
2354
2357
  _t(l("input", {
2355
- "onUpdate:modelValue": t[5] || (t[5] = (e) => Qt.value = e),
2358
+ "onUpdate:modelValue": t[5] || (t[5] = (e) => Zt.value = e),
2356
2359
  type: "checkbox"
2357
2360
  }, null, 512), [
2358
- [Is, Qt.value]
2361
+ [qs, Zt.value]
2359
2362
  ]),
2360
2363
  t[58] || (t[58] = l("span", null, [
2361
2364
  k("逐个核对磁盘(慢):把上一趟铺过的也重新读一遍比对,"),
2362
2365
  l("b", null, "你在编辑器里改过、还没读回库的那些会被库里的那份盖掉")
2363
2366
  ], -1))
2364
2367
  ]),
2365
- l("div", Ol, [
2368
+ l("div", Pl, [
2366
2369
  l("button", {
2367
2370
  class: "p-button p-button-sm",
2368
2371
  type: "button",
2369
2372
  disabled: T.value,
2370
- onClick: t[6] || (t[6] = (e) => Cs())
2371
- }, "清空并导出", 8, jl),
2373
+ onClick: t[6] || (t[6] = (e) => Ts())
2374
+ }, "清空并导出", 8, Il),
2372
2375
  l("button", {
2373
2376
  class: "p-button p-button-sm p-button-outlined",
2374
2377
  type: "button",
2375
2378
  disabled: T.value,
2376
- onClick: t[7] || (t[7] = (e) => Es())
2377
- }, "只覆盖", 8, Ll),
2379
+ onClick: t[7] || (t[7] = (e) => Bs())
2380
+ }, "只覆盖", 8, Nl),
2378
2381
  l("button", {
2379
2382
  class: "p-button p-button-sm p-button-text",
2380
2383
  type: "button",
2381
2384
  disabled: T.value,
2382
- onClick: t[8] || (t[8] = (e) => Ss())
2383
- }, "取消", 8, Pl)
2385
+ onClick: t[8] || (t[8] = (e) => Ms())
2386
+ }, "取消", 8, Dl)
2384
2387
  ])
2385
2388
  ])) : $("", !0),
2386
- F.value ? (c(), d("div", Il, [
2387
- l("p", Nl, "删掉「" + f(F.value.row.module) + " / " + f(F.value.row.name || F.value.row.id) + "」的代码文件", 1),
2388
- l("p", Dl, [
2389
+ F.value ? (r(), c("div", ql, [
2390
+ l("p", Fl, "删掉「" + f(F.value.row.module) + " / " + f(F.value.row.name || F.value.row.id) + "」的代码文件", 1),
2391
+ l("p", Ul, [
2389
2392
  t[67] || (t[67] = l("b", null, "库里那一份代码正文会被清空", -1)),
2390
2393
  t[68] || (t[68] = k("(入口 / 清单 / 后端一起); ", -1)),
2391
- F.value.target ? (c(), d(C, { key: 0 }, [
2394
+ F.value.target ? (r(), c(C, { key: 0 }, [
2392
2395
  t[59] || (t[59] = k(" 同时清掉你本机那个块文件夹 ", -1)),
2393
- l("span", ql, f(F.value.target.name) + "/" + f(F.value.folder), 1),
2394
- F.value.inventory && F.value.inventory.items.some((e) => e.name === F.value?.folder) ? (c(), d(C, { key: 0 }, [
2396
+ l("span", zl, f(F.value.target.name) + "/" + f(F.value.folder), 1),
2397
+ F.value.inventory && F.value.inventory.items.some((e) => e.name === F.value?.folder) ? (r(), c(C, { key: 0 }, [
2395
2398
  k(" (它现在在顶层,里面有东西:本次会先清空)。 ")
2396
2399
  ], 64)) : $("", !0),
2397
2400
  t[60] || (t[60] = l("b", null, "只动这一个块的文件夹", -1)),
2398
2401
  t[61] || (t[61] = k(":别的块、", -1)),
2399
2402
  t[62] || (t[62] = l("span", { class: "mbc__mono" }, "example/", -1)),
2400
2403
  t[63] || (t[63] = k("、以及目录外面的一切都不会被碰。 ", -1))
2401
- ], 64)) : (c(), d(C, { key: 1 }, [
2404
+ ], 64)) : (r(), c(C, { key: 1 }, [
2402
2405
  t[64] || (t[64] = k(" 现在没有选中开发目录 / 或者读不到它,所以", -1)),
2403
2406
  t[65] || (t[65] = l("b", null, "本机那份不动", -1)),
2404
2407
  t[66] || (t[66] = k(",只清库里那份。 ", -1))
@@ -2408,26 +2411,26 @@ ${t.text}`).join(`
2408
2411
  t[71] || (t[71] = l("b", null, "块本身留着", -1)),
2409
2412
  t[72] || (t[72] = k('(这一行不动):页面上那块会显示成占位框,而不是"库里没有这个块"; 删错了也能救回来:展开这一块 → 版本史 → 「切回」删之前那一版。 ', -1))
2410
2413
  ]),
2411
- l("div", Fl, [
2414
+ l("div", Hl, [
2412
2415
  l("button", {
2413
2416
  class: "p-button p-button-sm",
2414
2417
  type: "button",
2415
2418
  disabled: T.value,
2416
- onClick: t[9] || (t[9] = (e) => me())
2417
- }, "确认删除代码文件", 8, Ul),
2419
+ onClick: t[9] || (t[9] = (e) => ve())
2420
+ }, "确认删除代码文件", 8, Kl),
2418
2421
  l("button", {
2419
2422
  class: "p-button p-button-sm p-button-text",
2420
2423
  type: "button",
2421
2424
  disabled: T.value,
2422
2425
  onClick: t[10] || (t[10] = (e) => F.value = null)
2423
- }, "取消", 8, zl)
2426
+ }, "取消", 8, Vl)
2424
2427
  ])
2425
2428
  ])) : $("", !0),
2426
- _t(l("section", Hl, [
2427
- l("h3", Kl, [
2429
+ _t(l("section", Wl, [
2430
+ l("h3", Jl, [
2428
2431
  t[73] || (t[73] = k(" 库里的块 ", -1)),
2429
- l("span", Vl, f(sn.value.length) + " / " + f(h.value.length), 1),
2430
- O.value.trim() ? (c(), d("span", Wl, "标签:" + f(O.value), 1)) : $("", !0)
2432
+ l("span", Gl, f(un.value.length) + " / " + f(h.value.length), 1),
2433
+ O.value.trim() ? (r(), c("span", Ql, "标签:" + f(O.value), 1)) : $("", !0)
2431
2434
  ]),
2432
2435
  _t(l("input", {
2433
2436
  "onUpdate:modelValue": t[11] || (t[11] = (e) => v.value = e),
@@ -2435,9 +2438,9 @@ ${t.text}`).join(`
2435
2438
  type: "search",
2436
2439
  placeholder: "筛选 module / 名字 / 备注 / 详情 / id / 版本号 / 标签"
2437
2440
  }, null, 512), [
2438
- [se, v.value]
2441
+ [le, v.value]
2439
2442
  ]),
2440
- D.value.length > 0 ? (c(), d("div", Jl, [
2443
+ D.value.length > 0 ? (r(), c("div", Yl, [
2441
2444
  t[74] || (t[74] = l("span", { class: "mbc__label" }, "标签", -1)),
2442
2445
  _t(l("input", {
2443
2446
  "onUpdate:modelValue": t[12] || (t[12] = (e) => O.value = e),
@@ -2445,95 +2448,95 @@ ${t.text}`).join(`
2445
2448
  type: "search",
2446
2449
  placeholder: "只看贴了…的块"
2447
2450
  }, null, 512), [
2448
- [se, O.value]
2451
+ [le, O.value]
2449
2452
  ]),
2450
- (c(!0), d(C, null, j(D.value.slice(0, 24), (e) => (c(), d("button", {
2453
+ (r(!0), c(C, null, j(D.value.slice(0, 24), (e) => (r(), c("button", {
2451
2454
  key: e.tag,
2452
2455
  class: K(["p-tag mbc__tag", { "is-on": O.value.trim().toLowerCase() === e.tag.toLowerCase() }]),
2453
2456
  type: "button",
2454
2457
  title: `只看贴了「${e.tag}」的块(${e.count} 个)`,
2455
- onClick: (r) => O.value = O.value.trim().toLowerCase() === e.tag.toLowerCase() ? "" : e.tag
2456
- }, f(e.tag) + " " + f(e.count), 11, Gl))), 128)),
2457
- O.value ? (c(), d("button", {
2458
+ onClick: (d) => O.value = O.value.trim().toLowerCase() === e.tag.toLowerCase() ? "" : e.tag
2459
+ }, f(e.tag) + " " + f(e.count), 11, Zl))), 128)),
2460
+ O.value ? (r(), c("button", {
2458
2461
  key: 0,
2459
2462
  class: "p-button p-button-sm p-button-text",
2460
2463
  type: "button",
2461
2464
  onClick: t[13] || (t[13] = (e) => O.value = "")
2462
2465
  }, "清掉标签筛选")) : $("", !0)
2463
2466
  ])) : $("", !0),
2464
- l("ul", Ql, [
2465
- (c(!0), d(C, null, j(sn.value, (e) => (c(), d("li", {
2467
+ l("ul", Xl, [
2468
+ (r(!0), c(C, null, j(un.value, (e) => (r(), c("li", {
2466
2469
  key: e.id
2467
2470
  }, [
2468
2471
  l("button", {
2469
2472
  type: "button",
2470
2473
  class: K(["mbc__row", { "is-active": e.id === y.value, "is-off": e.enabled === !1 }]),
2471
- title: ms(e),
2472
- onClick: (r) => ss(e)
2474
+ title: hs(e),
2475
+ onClick: (d) => is(e)
2473
2476
  }, [
2474
- l("span", Zl, f(e.module || "unassigned"), 1),
2475
- l("span", Xl, f(e.name || e.id), 1),
2477
+ l("span", ei, f(e.module || "unassigned"), 1),
2478
+ l("span", ni, f(e.name || e.id), 1),
2476
2479
  l("span", {
2477
2480
  class: "mbc__version-badge",
2478
2481
  title: `当前是第 ${e.version || 1} 版,一共留着 ${e.versionCount ?? 1} 版`
2479
2482
  }, [
2480
2483
  k("v" + f(e.version || 1), 1),
2481
- (e.versionCount ?? 1) > 1 ? (c(), d(C, { key: 0 }, [
2484
+ (e.versionCount ?? 1) > 1 ? (r(), c(C, { key: 0 }, [
2482
2485
  k("/" + f(e.versionCount), 1)
2483
2486
  ], 64)) : $("", !0)
2484
- ], 8, ti),
2485
- (c(!0), d(C, null, j(e.tags ?? [], (r) => (c(), d("span", {
2486
- key: r,
2487
+ ], 8, si),
2488
+ (r(!0), c(C, null, j(e.tags ?? [], (d) => (r(), c("span", {
2489
+ key: d,
2487
2490
  class: "p-tag mbc__tag mbc__tag--on-row"
2488
- }, f(r), 1))), 128)),
2489
- tn(e) ? (c(), d("span", {
2491
+ }, f(d), 1))), 128)),
2492
+ on(e) ? (r(), c("span", {
2490
2493
  key: 0,
2491
2494
  class: "mbc__loc",
2492
- title: nn(e)
2493
- }, f(tn(e)), 9, ei)) : $("", !0),
2494
- en(e) ? (c(), d("span", {
2495
+ title: an(e)
2496
+ }, f(on(e)), 9, oi)) : $("", !0),
2497
+ ln(e) ? (r(), c("span", {
2495
2498
  key: 1,
2496
2499
  class: "mbc__loc mbc__loc--inert",
2497
- title: nn(e)
2498
- }, f(en(e)), 9, ni)) : $("", !0),
2499
- Yt(e).length > 0 ? (c(), d("span", si, f(Yt(e).join(" / ")), 1)) : $("", !0),
2500
+ title: an(e)
2501
+ }, f(ln(e)), 9, li)) : $("", !0),
2502
+ Xt(e).length > 0 ? (r(), c("span", ii, f(Xt(e).join(" / ")), 1)) : $("", !0),
2500
2503
  l("em", {
2501
2504
  class: K({ "is-off": e.enabled === !1 })
2502
- }, f(e.enabled === !1 ? Ze(e) || "校验失败已停用" : "可用"), 3),
2503
- (e.detail ?? "").trim() ? (c(), d("span", {
2505
+ }, f(e.enabled === !1 ? nn(e) || "校验失败已停用" : "可用"), 3),
2506
+ (e.detail ?? "").trim() ? (r(), c("span", {
2504
2507
  key: 3,
2505
2508
  class: "mbc__detail-line",
2506
- title: Z(Tn)(e.detail ?? "", 240)
2507
- }, f(Z(Tn)(e.detail ?? "")), 9, oi)) : $("", !0)
2508
- ], 10, Yl),
2509
- y.value === e.id ? (c(), d("div", li, [
2510
- (c(!0), d(C, null, j(_e(e).slice(0, Ie), (r, w) => (c(), d("p", {
2509
+ title: Z(Rn)(e.detail ?? "", 240)
2510
+ }, f(Z(Rn)(e.detail ?? "")), 9, ai)) : $("", !0)
2511
+ ], 10, ti),
2512
+ y.value === e.id ? (r(), c("div", ui, [
2513
+ (r(!0), c(C, null, j(ye(e).slice(0, Fe), (d, w) => (r(), c("p", {
2511
2514
  key: w,
2512
2515
  class: "mbc__problem"
2513
- }, f(r), 1))), 128)),
2514
- _e(e).length > Ie ? (c(), d("p", ii, "还有 " + f(_e(e).length - Ie) + " 条问题没显示出来:点上面的「校验全部魔法块」重算一遍(这几条是上次校验的结论)", 1)) : $("", !0),
2515
- l("dl", ai, [
2516
+ }, f(d), 1))), 128)),
2517
+ ye(e).length > Fe ? (r(), c("p", ri, "还有 " + f(ye(e).length - Fe) + " 条问题没显示出来:点上面的「校验全部魔法块」重算一遍(这几条是上次校验的结论)", 1)) : $("", !0),
2518
+ l("dl", ci, [
2516
2519
  t[87] || (t[87] = l("dt", null, "详情", -1)),
2517
2520
  l("dd", null, [
2518
- $t.value !== e.id ? (c(), d(C, { key: 0 }, [
2519
- (e.detail ?? "").trim() ? (c(), d("div", {
2521
+ $t.value !== e.id ? (r(), c(C, { key: 0 }, [
2522
+ (e.detail ?? "").trim() ? (r(), c("div", {
2520
2523
  key: 0,
2521
2524
  class: "mbc__blockdetail",
2522
- innerHTML: Z(Yo)(e.detail ?? "")
2523
- }, null, 8, ui)) : (c(), d("span", ri, [
2525
+ innerHTML: Z(tl)(e.detail ?? "")
2526
+ }, null, 8, di)) : (r(), c("span", pi, [
2524
2527
  t[75] || (t[75] = k("(这一块没写详情 —— 点右边「写详情」写一段**业务功能说明**:谁能用、什么场景、解决什么、输入输出是什么业务含义;用 Markdown 写,**别写路由 / 字段 / 实现方式**。这段正文住在块包内的 ", -1)),
2525
- l("span", ci, f(Z(hn)), 1),
2528
+ l("span", fi, f(Z(yn)), 1),
2526
2529
  t[76] || (t[76] = k(",导出后会跟着包走)", -1))
2527
2530
  ])),
2528
2531
  l("button", {
2529
2532
  class: "p-button p-button-sm p-button-text",
2530
2533
  type: "button",
2531
2534
  disabled: T.value,
2532
- onClick: (r) => cs(e)
2533
- }, f((e.detail ?? "").trim() ? "改详情" : "写详情"), 9, di)
2534
- ], 64)) : (c(), d(C, { key: 1 }, [
2535
+ onClick: (d) => fs(e)
2536
+ }, f((e.detail ?? "").trim() ? "改详情" : "写详情"), 9, mi)
2537
+ ], 64)) : (r(), c(C, { key: 1 }, [
2535
2538
  _t(l("textarea", {
2536
- "onUpdate:modelValue": t[14] || (t[14] = (r) => wt.value = r),
2539
+ "onUpdate:modelValue": t[14] || (t[14] = (d) => wt.value = d),
2537
2540
  class: "p-inputtext p-component mbc__detailinput",
2538
2541
  rows: "6",
2539
2542
  placeholder: `业务功能说明,用 Markdown 写 —— 例如:
@@ -2545,51 +2548,51 @@ ${t.text}`).join(`
2545
2548
  - 怎么用:搜手机号 → 打开档案
2546
2549
  (**别写**路由名 / 字段名 / 实现方式)`
2547
2550
  }, null, 512), [
2548
- [se, wt.value]
2551
+ [le, wt.value]
2549
2552
  ]),
2550
2553
  l("button", {
2551
2554
  class: "p-button p-button-sm",
2552
2555
  type: "button",
2553
2556
  disabled: T.value,
2554
- onClick: (r) => rs(e)
2555
- }, "存详情", 8, pi),
2557
+ onClick: (d) => ps(e)
2558
+ }, "存详情", 8, bi),
2556
2559
  l("button", {
2557
2560
  class: "p-button p-button-sm p-button-text",
2558
2561
  type: "button",
2559
2562
  disabled: T.value,
2560
- onClick: t[15] || (t[15] = (r) => $t.value = "")
2561
- }, "取消", 8, fi)
2563
+ onClick: t[15] || (t[15] = (d) => $t.value = "")
2564
+ }, "取消", 8, vi)
2562
2565
  ], 64))
2563
2566
  ]),
2564
2567
  t[88] || (t[88] = l("dt", null, "文件", -1)),
2565
2568
  l("dd", null, f((e.fileNames || []).join(" / ") || "(没有文件)"), 1),
2566
- Zt(e) ? (c(), d(C, { key: 0 }, [
2569
+ te(e) ? (r(), c(C, { key: 0 }, [
2567
2570
  t[80] || (t[80] = l("dt", null, "代码", -1)),
2568
2571
  l("dd", null, [
2569
2572
  l("b", null, f(e.code?.total ?? 0), 1),
2570
2573
  t[77] || (t[77] = k(" 行生效 ", -1)),
2571
- l("span", mi, "(" + f(e.code?.files ?? 0) + " 个文件,含注释与空行)", 1),
2572
- l("ul", bi, [
2573
- (c(!0), d(C, null, j(e.code?.byFile ?? [], (r) => (c(), d("li", {
2574
- key: r.name
2574
+ l("span", hi, "(" + f(e.code?.files ?? 0) + " 个文件,含注释与空行)", 1),
2575
+ l("ul", _i, [
2576
+ (r(!0), c(C, null, j(e.code?.byFile ?? [], (d) => (r(), c("li", {
2577
+ key: d.name
2575
2578
  }, [
2576
- l("span", vi, f(r.lines), 1),
2577
- k(" 行 · " + f(r.name), 1)
2579
+ l("span", gi, f(d.lines), 1),
2580
+ k(" 行 · " + f(d.name), 1)
2578
2581
  ]))), 128))
2579
2582
  ])
2580
2583
  ]),
2581
- (e.code?.nonEffective ?? 0) > 0 ? (c(), d(C, { key: 0 }, [
2584
+ (e.code?.nonEffective ?? 0) > 0 ? (r(), c(C, { key: 0 }, [
2582
2585
  t[79] || (t[79] = l("dt", null, "不生效", -1)),
2583
2586
  l("dd", null, [
2584
2587
  l("b", null, f(e.code?.nonEffective ?? 0), 1),
2585
2588
  t[78] || (t[78] = k(" 行 ", -1)),
2586
- l("span", hi, "(" + f(e.code?.nonEffectiveFiles?.length ?? 0) + " 个文件 —— `excluded/` 里那些:照样进库、进版本史,但执行时被忽略)", 1),
2587
- l("ul", _i, [
2588
- (c(!0), d(C, null, j(e.code?.nonEffectiveFiles ?? [], (r) => (c(), d("li", {
2589
- key: r.name
2589
+ l("span", yi, "(" + f(e.code?.nonEffectiveFiles?.length ?? 0) + " 个文件 —— `excluded/` 里那些:照样进库、进版本史,但执行时被忽略)", 1),
2590
+ l("ul", ki, [
2591
+ (r(!0), c(C, null, j(e.code?.nonEffectiveFiles ?? [], (d) => (r(), c("li", {
2592
+ key: d.name
2590
2593
  }, [
2591
- l("span", gi, f(r.lines), 1),
2592
- k(" 行 · " + f(r.name), 1)
2594
+ l("span", $i, f(d.lines), 1),
2595
+ k(" 行 · " + f(d.name), 1)
2593
2596
  ]))), 128))
2594
2597
  ])
2595
2598
  ])
@@ -2597,181 +2600,181 @@ ${t.text}`).join(`
2597
2600
  ], 64)) : $("", !0),
2598
2601
  t[89] || (t[89] = l("dt", null, "依赖", -1)),
2599
2602
  l("dd", null, [
2600
- on(e).length ? (c(), d(C, { key: 0 }, [
2601
- l("ul", yi, [
2602
- (c(!0), d(C, null, j(on(e), (r) => (c(), d("li", {
2603
- key: r.key
2603
+ rn(e).length ? (r(), c(C, { key: 0 }, [
2604
+ l("ul", wi, [
2605
+ (r(!0), c(C, null, j(rn(e), (d) => (r(), c("li", {
2606
+ key: d.key
2604
2607
  }, [
2605
- l("span", ki, f(r.key), 1),
2606
- l("span", $i, f(r.title), 1),
2607
- (c(!0), d(C, null, j(r.values, (w) => (c(), d("span", {
2608
+ l("span", xi, f(d.key), 1),
2609
+ l("span", Ci, f(d.title), 1),
2610
+ (r(!0), c(C, null, j(d.values, (w) => (r(), c("span", {
2608
2611
  key: w,
2609
2612
  class: "mbc__reqitem"
2610
2613
  }, f(w), 1))), 128))
2611
2614
  ]))), 128))
2612
2615
  ]),
2613
- (c(!0), d(C, null, j(hs(e), (r, w) => (c(), d("p", {
2616
+ (r(!0), c(C, null, j(ys(e), (d, w) => (r(), c("p", {
2614
2617
  key: w,
2615
2618
  class: "mbc__problem"
2616
- }, f(r.message), 1))), 128)),
2617
- l("span", wi, [
2619
+ }, f(d.message), 1))), 128)),
2620
+ l("span", Ei, [
2618
2621
  t[81] || (t[81] = k("(这是块**自己声明**的:换一个项目时,这几样东西得跟着走 —— 要改就改块包里的 ", -1)),
2619
- l("span", xi, f(Z(_n)), 1),
2622
+ l("span", Si, f(Z(kn)), 1),
2620
2623
  t[82] || (t[82] = k(",导出时会给你一份带建议的草稿)", -1))
2621
2624
  ])
2622
- ], 64)) : (c(), d("span", Ci, [
2625
+ ], 64)) : (r(), c("span", Ti, [
2623
2626
  t[83] || (t[83] = k("(这一块没声明任何外部依赖 —— 只在包内写页面的块本来就一个字都不用写; 真用到了项目模型 / settings 键 / 跨块跳转,就在 ", -1)),
2624
- l("span", Ei, f(Z(_n)), 1),
2627
+ l("span", Bi, f(Z(kn)), 1),
2625
2628
  t[84] || (t[84] = k(" 里写一份、读回即生效)", -1))
2626
2629
  ]))
2627
2630
  ]),
2628
2631
  t[90] || (t[90] = l("dt", null, "版本", -1)),
2629
2632
  l("dd", null, [
2630
2633
  k("v" + f(e.version || 1), 1),
2631
- l("span", Si, "(一共留着 " + f(e.versionCount ?? x.value[e.id]?.length ?? 1) + " 版)", 1)
2634
+ l("span", Mi, "(一共留着 " + f(e.versionCount ?? x.value[e.id]?.length ?? 1) + " 版)", 1)
2632
2635
  ]),
2633
2636
  t[91] || (t[91] = l("dt", null, "标签", -1)),
2634
2637
  l("dd", null, [
2635
- st.value !== e.id ? (c(), d(C, { key: 0 }, [
2636
- (c(!0), d(C, null, j(e.tags ?? [], (r) => (c(), d("span", {
2637
- key: r,
2638
+ st.value !== e.id ? (r(), c(C, { key: 0 }, [
2639
+ (r(!0), c(C, null, j(e.tags ?? [], (d) => (r(), c("span", {
2640
+ key: d,
2638
2641
  class: "p-tag mbc__tag"
2639
- }, f(r), 1))), 128)),
2640
- (e.tags ?? []).length === 0 ? (c(), d("span", Ti, "(没贴标签)")) : $("", !0),
2642
+ }, f(d), 1))), 128)),
2643
+ (e.tags ?? []).length === 0 ? (r(), c("span", Ri, "(没贴标签)")) : $("", !0),
2641
2644
  l("button", {
2642
2645
  class: "p-button p-button-sm p-button-text",
2643
2646
  type: "button",
2644
2647
  disabled: T.value,
2645
- onClick: (r) => us(e)
2646
- }, "改标签", 8, Bi)
2647
- ], 64)) : (c(), d(C, { key: 1 }, [
2648
+ onClick: (d) => ds(e)
2649
+ }, "改标签", 8, Ai)
2650
+ ], 64)) : (r(), c(C, { key: 1 }, [
2648
2651
  _t(l("input", {
2649
- "onUpdate:modelValue": t[16] || (t[16] = (r) => ot.value = r),
2652
+ "onUpdate:modelValue": t[16] || (t[16] = (d) => ot.value = d),
2650
2653
  class: "p-inputtext p-component mbc__taginput",
2651
2654
  type: "text",
2652
2655
  placeholder: "逗号分隔,例如:订单, 报表",
2653
- onKeyup: Ns((r) => Xe(e), ["enter"])
2654
- }, null, 40, Mi), [
2655
- [se, ot.value]
2656
+ onKeyup: Fs((d) => sn(e), ["enter"])
2657
+ }, null, 40, Oi), [
2658
+ [le, ot.value]
2656
2659
  ]),
2657
2660
  l("button", {
2658
2661
  class: "p-button p-button-sm",
2659
2662
  type: "button",
2660
2663
  disabled: T.value,
2661
- onClick: (r) => Xe(e)
2662
- }, "存标签", 8, Ri),
2664
+ onClick: (d) => sn(e)
2665
+ }, "存标签", 8, ji),
2663
2666
  l("button", {
2664
2667
  class: "p-button p-button-sm p-button-text",
2665
2668
  type: "button",
2666
2669
  disabled: T.value,
2667
- onClick: t[17] || (t[17] = (r) => st.value = "")
2668
- }, "取消", 8, Ai),
2669
- D.value.length > 0 ? (c(), d("div", Oi, [
2670
+ onClick: t[17] || (t[17] = (d) => st.value = "")
2671
+ }, "取消", 8, Li),
2672
+ D.value.length > 0 ? (r(), c("div", Pi, [
2670
2673
  t[85] || (t[85] = l("span", { class: "mbc__hint" }, "点现成的加进去:", -1)),
2671
- (c(!0), d(C, null, j(D.value.slice(0, 16), (r) => (c(), d("button", {
2672
- key: r.tag,
2674
+ (r(!0), c(C, null, j(D.value.slice(0, 16), (d) => (r(), c("button", {
2675
+ key: d.tag,
2673
2676
  class: "p-tag mbc__tag",
2674
2677
  type: "button",
2675
- title: `把「${r.tag}」加进去`,
2676
- onClick: (w) => ds(r.tag)
2677
- }, f(r.tag), 9, ji))), 128))
2678
+ title: `把「${d.tag}」加进去`,
2679
+ onClick: (w) => ms(d.tag)
2680
+ }, f(d.tag), 9, Ii))), 128))
2678
2681
  ])) : $("", !0),
2679
- ot.value.trim() ? (c(), d("div", Li, [
2682
+ ot.value.trim() ? (r(), c("div", Ni, [
2680
2683
  t[86] || (t[86] = l("span", { class: "mbc__hint" }, "这一块会贴:", -1)),
2681
- (c(!0), d(C, null, j(ot.value.split(/[,,\s]+/).filter(Boolean), (r) => (c(), d("button", {
2682
- key: r,
2684
+ (r(!0), c(C, null, j(ot.value.split(/[,,\s]+/).filter(Boolean), (d) => (r(), c("button", {
2685
+ key: d,
2683
2686
  class: "p-tag mbc__tag",
2684
2687
  type: "button",
2685
- title: `从这一块上摘掉「${r}」`,
2686
- onClick: (w) => ps(r)
2687
- }, f(r) + " ×", 9, Pi))), 128))
2688
+ title: `从这一块上摘掉「${d}」`,
2689
+ onClick: (w) => bs(d)
2690
+ }, f(d) + " ×", 9, Di))), 128))
2688
2691
  ])) : $("", !0)
2689
2692
  ], 64))
2690
2693
  ]),
2691
2694
  t[92] || (t[92] = l("dt", null, "更新", -1)),
2692
2695
  l("dd", null, f(e.updatedAt || "—"), 1),
2693
2696
  t[93] || (t[93] = l("dt", null, "id", -1)),
2694
- l("dd", Ii, f(e.id), 1)
2697
+ l("dd", qi, f(e.id), 1)
2695
2698
  ]),
2696
- l("div", Ni, [
2699
+ l("div", Fi, [
2697
2700
  l("button", {
2698
2701
  class: "p-button p-button-sm p-button-outlined",
2699
2702
  type: "button",
2700
2703
  disabled: T.value,
2701
- onClick: (r) => fe(e),
2704
+ onClick: (d) => be(e),
2702
2705
  title: "删掉这一块的代码文件:本机的文件夹 + 库里那份代码正文(点下去会先问你确认)。块本身留着,页面上会显示成占位框"
2703
- }, "删除代码文件", 8, Di)
2706
+ }, "删除代码文件", 8, Ui)
2704
2707
  ]),
2705
- l("div", qi, [
2706
- l("div", Fi, [
2708
+ l("div", zi, [
2709
+ l("div", Hi, [
2707
2710
  t[94] || (t[94] = l("strong", null, "版本(每次上传 +1,旧的都留着)", -1)),
2708
2711
  l("button", {
2709
2712
  class: "p-button p-button-sm p-button-text",
2710
2713
  type: "button",
2711
2714
  disabled: T.value,
2712
- onClick: (r) => X(e.id)
2713
- }, f(M.value === e.id ? "读版本中…" : "刷新版本"), 9, Ui)
2715
+ onClick: (d) => X(e.id)
2716
+ }, f(M.value === e.id ? "读版本中…" : "刷新版本"), 9, Ki)
2714
2717
  ]),
2715
- x.value[e.id] ? x.value[e.id].length > 0 ? (c(), d("ul", Hi, [
2716
- (c(!0), d(C, null, j(x.value[e.id], (r) => (c(), d("li", {
2717
- key: r.number,
2718
- class: K({ "is-current": r.current })
2718
+ x.value[e.id] ? x.value[e.id].length > 0 ? (r(), c("ul", Wi, [
2719
+ (r(!0), c(C, null, j(x.value[e.id], (d) => (r(), c("li", {
2720
+ key: d.number,
2721
+ class: K({ "is-current": d.current })
2719
2722
  }, [
2720
- l("span", Ki, f(Jt(r)), 1),
2721
- l("span", Vi, [
2722
- k(f(r.fileCount) + " 个文件 · " + f(Gt(r.sizeBytes)), 1),
2723
- r.createdBy ? (c(), d(C, { key: 0 }, [
2724
- k(" · " + f(r.createdBy), 1)
2723
+ l("span", Ji, f(Qt(d)), 1),
2724
+ l("span", Gi, [
2725
+ k(f(d.fileCount) + " 个文件 · " + f(Yt(d.sizeBytes)), 1),
2726
+ d.createdBy ? (r(), c(C, { key: 0 }, [
2727
+ k(" · " + f(d.createdBy), 1)
2725
2728
  ], 64)) : $("", !0),
2726
- k(" · " + f(r.createdAt || "—"), 1)
2729
+ k(" · " + f(d.createdAt || "—"), 1)
2727
2730
  ]),
2728
- l("span", Wi, [
2731
+ l("span", Qi, [
2729
2732
  l("button", {
2730
2733
  class: "p-button p-button-sm p-button-text",
2731
2734
  type: "button",
2732
- disabled: T.value || r.empty,
2733
- onClick: (w) => os(e, r.number),
2734
- title: r.empty ? "这一版是空包(代码被删过),没有正文可看" : "看这一版的正文(只读)"
2735
- }, "查看", 8, Ji),
2735
+ disabled: T.value || d.empty,
2736
+ onClick: (w) => as(e, d.number),
2737
+ title: d.empty ? "这一版是空包(代码被删过),没有正文可看" : "看这一版的正文(只读)"
2738
+ }, "查看", 8, Yi),
2736
2739
  l("button", {
2737
2740
  class: "p-button p-button-sm p-button-text",
2738
2741
  type: "button",
2739
- disabled: T.value || r.current || r.empty,
2740
- onClick: (w) => ls(e, r.number),
2741
- title: r.current ? "这一版正在跑" : "把这一版变成当前版(会记成一个新版本)"
2742
- }, "切回", 8, Gi),
2742
+ disabled: T.value || d.current || d.empty,
2743
+ onClick: (w) => us(e, d.number),
2744
+ title: d.current ? "这一版正在跑" : "把这一版变成当前版(会记成一个新版本)"
2745
+ }, "切回", 8, Zi),
2743
2746
  l("button", {
2744
2747
  class: "p-button p-button-sm p-button-text",
2745
2748
  type: "button",
2746
- disabled: T.value || r.empty,
2747
- onClick: (w) => as(e, r.number),
2748
- title: r.empty ? "空包没什么可下的" : "下载这一版(一个 zip)"
2749
- }, "下载", 8, Qi),
2749
+ disabled: T.value || d.empty,
2750
+ onClick: (w) => cs(e, d.number),
2751
+ title: d.empty ? "空包没什么可下的" : "下载这一版(一个 zip)"
2752
+ }, "下载", 8, Xi),
2750
2753
  l("button", {
2751
2754
  class: "p-button p-button-sm p-button-text",
2752
2755
  type: "button",
2753
- disabled: T.value || r.current,
2754
- onClick: (w) => is(e, r.number),
2755
- title: r.current ? "当前那一版不许删:先切到别的版本" : "删掉这一版(别的版本不受影响)"
2756
- }, "删", 8, Yi)
2756
+ disabled: T.value || d.current,
2757
+ onClick: (w) => rs(e, d.number),
2758
+ title: d.current ? "当前那一版不许删:先切到别的版本" : "删掉这一版(别的版本不受影响)"
2759
+ }, "删", 8, ta)
2757
2760
  ])
2758
2761
  ], 2))), 128))
2759
- ])) : (c(), d("p", Zi, "这个块还没有版本记录(它从没被保存过)。")) : (c(), d("p", zi, "正在读版本…(没读到时点「刷新版本」)")),
2760
- q.value && q.value.id === e.id ? (c(), d("div", Xi, [
2761
- l("div", ta, [
2762
+ ])) : (r(), c("p", ea, "这个块还没有版本记录(它从没被保存过)。")) : (r(), c("p", Vi, "正在读版本…(没读到时点「刷新版本」)")),
2763
+ q.value && q.value.id === e.id ? (r(), c("div", na, [
2764
+ l("div", sa, [
2762
2765
  l("strong", null, "看 v" + f(q.value.number) + " 的正文(只读)", 1),
2763
2766
  l("button", {
2764
2767
  class: "p-button p-button-sm p-button-text",
2765
2768
  type: "button",
2766
- onClick: t[18] || (t[18] = (r) => q.value = null)
2769
+ onClick: t[18] || (t[18] = (d) => q.value = null)
2767
2770
  }, "收起")
2768
2771
  ]),
2769
- (c(!0), d(C, null, j(q.value.files, (r, w) => (c(), d("details", {
2772
+ (r(!0), c(C, null, j(q.value.files, (d, w) => (r(), c("details", {
2770
2773
  key: w,
2771
2774
  class: "mbc__viewer-file"
2772
2775
  }, [
2773
- l("summary", ea, f(w) + "(" + f(Gt(r.length)) + ")", 1),
2774
- l("pre", na, f(r), 1)
2776
+ l("summary", oa, f(w) + "(" + f(Yt(d.length)) + ")", 1),
2777
+ l("pre", la, f(d), 1)
2775
2778
  ]))), 128))
2776
2779
  ])) : $("", !0)
2777
2780
  ])
@@ -2779,99 +2782,99 @@ ${t.text}`).join(`
2779
2782
  ]))), 128))
2780
2783
  ])
2781
2784
  ], 512), [
2782
- [oe, R.value === "blocks"]
2785
+ [ie, R.value === "blocks"]
2783
2786
  ]),
2784
- _t(l("section", sa, [
2787
+ _t(l("section", ia, [
2785
2788
  t[112] || (t[112] = l("h3", { class: "mbc__title" }, "导出去改(用你自己的编辑器)", -1)),
2786
- l("div", oa, [
2789
+ l("div", aa, [
2787
2790
  t[95] || (t[95] = l("span", { class: "mbc__label" }, "体检", -1)),
2788
2791
  l("button", {
2789
2792
  class: "p-button p-button-sm",
2790
2793
  type: "button",
2791
2794
  disabled: T.value,
2792
- onClick: t[19] || (t[19] = (e) => $s())
2793
- }, f(qt.value ? "校验中…" : "校验全部魔法块"), 9, la),
2795
+ onClick: t[19] || (t[19] = (e) => Cs())
2796
+ }, f(Ut.value ? "校验中…" : "校验全部魔法块"), 9, ua),
2794
2797
  t[96] || (t[96] = l("span", { class: "mbc__hint" }, "重新跑一遍逐块判据(试加载 + 引用深检),过不了的整块停用;改好再点一次就恢复。", -1))
2795
2798
  ]),
2796
- H.value ? (c(), d("div", ia, [
2799
+ H.value ? (r(), c("div", ra, [
2797
2800
  t[101] || (t[101] = l("span", { class: "mbc__label" }, "上一趟体检", -1)),
2798
- l("span", aa, [
2801
+ l("span", ca, [
2799
2802
  t[97] || (t[97] = k(" 查了 ", -1)),
2800
2803
  l("b", null, f(H.value.checked), 1),
2801
2804
  t[98] || (t[98] = k(" 个块:通过 ", -1)),
2802
- l("b", ua, f(H.value.passed), 1),
2805
+ l("b", da, f(H.value.passed), 1),
2803
2806
  t[99] || (t[99] = k("、停用 ", -1)),
2804
2807
  l("b", null, f(H.value.disabled), 1),
2805
2808
  t[100] || (t[100] = k("。 ", -1))
2806
2809
  ]),
2807
- yt.value > 0 ? (c(), d("button", {
2810
+ yt.value > 0 ? (r(), c("button", {
2808
2811
  key: 0,
2809
2812
  class: "p-button p-button-sm p-button-text",
2810
2813
  type: "button",
2811
2814
  onClick: t[20] || (t[20] = (e) => Tt.value = !0)
2812
2815
  }, "查看体检说明(" + f(yt.value) + ")", 1)) : $("", !0)
2813
2816
  ])) : $("", !0),
2814
- H.value ? (c(), d("div", ra, [
2815
- Y.value.length > 0 ? (c(), d("p", ca, [
2817
+ H.value ? (r(), c("div", pa, [
2818
+ Y.value.length > 0 ? (r(), c("p", fa, [
2816
2819
  l("span", {
2817
2820
  class: "mbc__chip",
2818
2821
  title: `没验运行期的块:${Y.value.join(" / ")}`
2819
- }, " ⚠️ 这一趟没验运行期(" + f(Y.value.length) + " 个块) ", 9, da),
2822
+ }, " ⚠️ 这一趟没验运行期(" + f(Y.value.length) + " 个块) ", 9, ma),
2820
2823
  t[102] || (t[102] = l("b", null, '别把"通过"读成"跑得起来"', -1)),
2821
2824
  t[103] || (t[103] = k(":探针没跑,所以运行期错误**一个都没验** —— handler 里会在运行时炸的那些(字段用错、查询写错)这一次看不出来。 探针不跑的原因逐块写在下面那些说明里(非 SQLite 的库 / 深检被关掉 / 环境起不来)。 ", -1))
2822
- ])) : (c(), d("p", pa, "运行期也**真跑**了一遍(探针跑了:每个 handler 都用它自己的内存库试跑过)。")),
2823
- Bt.value.length > 0 ? (c(), d(C, { key: 2 }, [
2824
- (c(!0), d(C, null, j(Bt.value, (e) => (c(), d("p", {
2825
+ ])) : (r(), c("p", ba, "运行期也**真跑**了一遍(探针跑了:每个 handler 都用它自己的内存库试跑过)。")),
2826
+ Bt.value.length > 0 ? (r(), c(C, { key: 2 }, [
2827
+ (r(!0), c(C, null, j(Bt.value, (e) => (r(), c("p", {
2825
2828
  key: e.id,
2826
2829
  class: "mbc__hint"
2827
2830
  }, [
2828
- l("span", fa, f(e.name || e.id), 1),
2829
- (c(!0), d(C, null, j(e.verifyNotes ?? [], (r, w) => (c(), d("span", {
2831
+ l("span", va, f(e.name || e.id), 1),
2832
+ (r(!0), c(C, null, j(e.verifyNotes ?? [], (d, w) => (r(), c("span", {
2830
2833
  key: w,
2831
2834
  class: "mbc__reqitem"
2832
- }, f(r), 1))), 128))
2835
+ }, f(d), 1))), 128))
2833
2836
  ]))), 128)),
2834
- t[104] || (t[104] = l("p", { class: "mbc__hint" }, " 以上都是**提示 / 没验到**,不是错:它们不拦保存、也不让块停用(`LABULL_REQUIRES` 默认 `warn` 档时, 依赖声明那几条判据结论只走这里)。 ", -1))
2837
+ t[104] || (t[104] = l("p", { class: "mbc__hint" }, " 以上都是**没验到 / 只提示**,不是错:它们不拦保存、也不让块停用 (依赖声明那几条判据结论只在 `LABULL_REQUIRES` **显式写成 `warn`** 时才走这里; **默认档是 `error`**,那一档下它们进的是上面那个「问题」)。 ", -1))
2835
2838
  ], 64)) : $("", !0)
2836
2839
  ])) : $("", !0),
2837
2840
  t[113] || (t[113] = l("hr", { class: "mbc__rule" }, null, -1)),
2838
- l("div", ma, [
2841
+ l("div", ha, [
2839
2842
  t[106] || (t[106] = l("span", { class: "mbc__label" }, "导出范围", -1)),
2840
- l("label", ba, [
2843
+ l("label", _a, [
2841
2844
  l("input", {
2842
2845
  type: "radio",
2843
2846
  name: "mbc-scope",
2844
2847
  value: "one",
2845
2848
  checked: lt.value === "one",
2846
2849
  onChange: t[21] || (t[21] = (e) => lt.value = "one")
2847
- }, null, 40, va),
2850
+ }, null, 40, ga),
2848
2851
  t[105] || (t[105] = k(" 仅这一个块 ", -1))
2849
2852
  ]),
2850
- l("label", ha, [
2853
+ l("label", ya, [
2851
2854
  l("input", {
2852
2855
  type: "radio",
2853
2856
  name: "mbc-scope",
2854
2857
  value: "all",
2855
2858
  checked: lt.value === "all",
2856
2859
  onChange: t[22] || (t[22] = (e) => lt.value = "all")
2857
- }, null, 40, _a),
2860
+ }, null, 40, ka),
2858
2861
  k(" 全部块(" + f(h.value.length) + " 个) ", 1)
2859
2862
  ]),
2860
- lt.value === "one" ? (c(), d("select", {
2863
+ lt.value === "one" ? (r(), c("select", {
2861
2864
  key: 0,
2862
2865
  class: "p-inputtext p-component mbc__grow",
2863
2866
  value: Ct.value,
2864
2867
  disabled: T.value || h.value.length === 0,
2865
- onChange: t[23] || (t[23] = (e) => Vt(e.target.value))
2868
+ onChange: t[23] || (t[23] = (e) => Jt(e.target.value))
2866
2869
  }, [
2867
- h.value.length === 0 ? (c(), d("option", ya, "(库里还没有块)")) : $("", !0),
2868
- (c(!0), d(C, null, j(h.value, (e) => (c(), d("option", {
2870
+ h.value.length === 0 ? (r(), c("option", wa, "(库里还没有块)")) : $("", !0),
2871
+ (r(!0), c(C, null, j(h.value, (e) => (r(), c("option", {
2869
2872
  key: e.id,
2870
2873
  value: e.id
2871
- }, f(e.module) + " / " + f(e.name || e.id), 9, ka))), 128))
2872
- ], 40, ga)) : $("", !0)
2874
+ }, f(e.module) + " / " + f(e.name || e.id), 9, xa))), 128))
2875
+ ], 40, $a)) : $("", !0)
2873
2876
  ]),
2874
- l("div", $a, [
2877
+ l("div", Ca, [
2875
2878
  t[107] || (t[107] = l("label", { for: "mbc-dir" }, "导出目录", -1)),
2876
2879
  l("input", {
2877
2880
  id: "mbc-dir",
@@ -2879,35 +2882,35 @@ ${t.text}`).join(`
2879
2882
  type: "text",
2880
2883
  readonly: "",
2881
2884
  value: V.value ? V.value.name : "(还没选:点右边那个按钮选一个文件夹)"
2882
- }, null, 8, wa),
2885
+ }, null, 8, Ea),
2883
2886
  l("button", {
2884
2887
  class: "p-button p-button-sm p-button-outlined",
2885
2888
  type: "button",
2886
2889
  disabled: T.value,
2887
- onClick: t[24] || (t[24] = (e) => ln("export"))
2888
- }, "选择文件夹", 8, xa),
2890
+ onClick: t[24] || (t[24] = (e) => cn("export"))
2891
+ }, "选择文件夹", 8, Sa),
2889
2892
  l("button", {
2890
2893
  class: "p-button p-button-sm mbc__act-export",
2891
2894
  type: "button",
2892
- disabled: T.value || lt.value === "one" && !ht.value,
2893
- title: lt.value === "one" && !ht.value ? "先在左边挑一个块(或者把范围改成「全部块」)" : "把库里的块铺到你选的文件夹",
2894
- onClick: t[25] || (t[25] = (e) => ws())
2895
- }, f(ft.value ? "导出中…" : "导出"), 9, Ca)
2895
+ disabled: T.value || lt.value === "one" && !vt.value,
2896
+ title: lt.value === "one" && !vt.value ? "先在左边挑一个块(或者把范围改成「全部块」)" : "把库里的块铺到你选的文件夹",
2897
+ onClick: t[25] || (t[25] = (e) => Es())
2898
+ }, f(pt.value ? "导出中…" : "导出"), 9, Ta)
2896
2899
  ]),
2897
- l("p", Ea, [
2898
- k(f(lt.value === "all" ? `这一趟铺全部 ${h.value.length} 个块` : ht.value ? `这一趟只铺「${ht.value.module} / ${ht.value.name || ht.value.id}」` : "先挑一个块") + " ⇒ ", 1),
2900
+ l("p", Ba, [
2901
+ k(f(lt.value === "all" ? `这一趟铺全部 ${h.value.length} 个块` : vt.value ? `这一趟只铺「${vt.value.module} / ${vt.value.name || vt.value.id}」` : "先挑一个块") + " ⇒ ", 1),
2899
2902
  t[108] || (t[108] = l("span", { class: "mbc__mono" }, "workspace/<可读名>-<块 uuid>/", -1)),
2900
2903
  t[109] || (t[109] = k(",顶层另附开发说明与 ", -1)),
2901
2904
  t[110] || (t[110] = l("span", { class: "mbc__mono" }, "example/", -1)),
2902
2905
  t[111] || (t[111] = k("。 ", -1))
2903
2906
  ]),
2904
- W.value ? (c(), d("p", Sa, f(W.value), 1)) : $("", !0)
2907
+ W.value ? (r(), c("p", Ma, f(W.value), 1)) : $("", !0)
2905
2908
  ], 512), [
2906
- [oe, R.value === "workspace"]
2909
+ [ie, R.value === "workspace"]
2907
2910
  ]),
2908
- _t(l("section", Ta, [
2911
+ _t(l("section", Ra, [
2909
2912
  t[122] || (t[122] = l("h3", { class: "mbc__title" }, "读回改动", -1)),
2910
- l("div", Ba, [
2913
+ l("div", Aa, [
2911
2914
  t[114] || (t[114] = l("label", { for: "mbc-read-dir" }, "读回目录", -1)),
2912
2915
  l("input", {
2913
2916
  id: "mbc-read-dir",
@@ -2915,49 +2918,49 @@ ${t.text}`).join(`
2915
2918
  type: "text",
2916
2919
  readonly: "",
2917
2920
  value: z.value ? z.value.name : "(还没选:导出会自动填上,也可以自己选一个)"
2918
- }, null, 8, Ma),
2921
+ }, null, 8, Oa),
2919
2922
  l("button", {
2920
2923
  class: "p-button p-button-sm p-button-outlined",
2921
2924
  type: "button",
2922
2925
  disabled: T.value,
2923
- onClick: t[26] || (t[26] = (e) => ln("read"))
2924
- }, "选择文件夹", 8, Ra),
2926
+ onClick: t[26] || (t[26] = (e) => cn("read"))
2927
+ }, "选择文件夹", 8, ja),
2925
2928
  l("button", {
2926
2929
  class: "p-button p-button-sm p-button-outlined",
2927
2930
  type: "button",
2928
2931
  disabled: T.value,
2929
- onClick: t[27] || (t[27] = (e) => rn())
2930
- }, f(xt.value ? "读回中…" : "读回改动"), 9, Aa)
2932
+ onClick: t[27] || (t[27] = (e) => pn())
2933
+ }, f(xt.value ? "读回中…" : "读回改动"), 9, La)
2931
2934
  ]),
2932
- z.value && V.value && z.value.name !== V.value.name ? (c(), d("p", Oa, " 读回的是「" + f(z.value.name) + "」(与导出目录「" + f(V.value.name) + "」不是同一个 —— 想同步就再选一次)。 ", 1)) : (c(), d("p", ja, "读回目录默认跟着导出目录;要读别的文件夹就点「选择文件夹」单独选一个。")),
2933
- L.value ? (c(), d(C, { key: 2 }, [
2934
- Xt.value.length > 0 ? (c(), d("p", La, [
2935
+ z.value && V.value && z.value.name !== V.value.name ? (r(), c("p", Pa, " 读回的是「" + f(z.value.name) + "」(与导出目录「" + f(V.value.name) + "」不是同一个 —— 想同步就再选一次)。 ", 1)) : (r(), c("p", Ia, "读回目录默认跟着导出目录;要读别的文件夹就点「选择文件夹」单独选一个。")),
2936
+ L.value ? (r(), c(C, { key: 2 }, [
2937
+ ee.value.length > 0 ? (r(), c("p", Na, [
2935
2938
  t[115] || (t[115] = k(" 扫到 ", -1)),
2936
2939
  l("b", null, f(L.value.blocks.length), 1),
2937
2940
  t[116] || (t[116] = k(" 个块,其中 ", -1)),
2938
- l("b", Pa, f(Xt.value.length), 1),
2941
+ l("b", Da, f(ee.value.length), 1),
2939
2942
  t[117] || (t[117] = k(" 个可以存;已经勾了 ", -1)),
2940
- l("b", null, f(te.value.length), 1),
2943
+ l("b", null, f(ne.value.length), 1),
2941
2944
  t[118] || (t[118] = k(" 个。 ", -1)),
2942
2945
  l("button", {
2943
2946
  class: "p-button p-button-sm p-button-text",
2944
2947
  type: "button",
2945
2948
  disabled: T.value,
2946
- onClick: t[28] || (t[28] = (e) => cn(!0))
2947
- }, "全选可存的", 8, Ia),
2949
+ onClick: t[28] || (t[28] = (e) => fn(!0))
2950
+ }, "全选可存的", 8, qa),
2948
2951
  l("button", {
2949
2952
  class: "p-button p-button-sm p-button-text",
2950
2953
  type: "button",
2951
- disabled: T.value || te.value.length === 0,
2952
- onClick: t[29] || (t[29] = (e) => cn(!1))
2953
- }, "全不选", 8, Na)
2954
+ disabled: T.value || ne.value.length === 0,
2955
+ onClick: t[29] || (t[29] = (e) => fn(!1))
2956
+ }, "全不选", 8, Fa)
2954
2957
  ])) : $("", !0),
2955
- L.value.blocks.length > 0 ? (c(), d("ul", Da, [
2956
- (c(!0), d(C, null, j(L.value.blocks, (e) => (c(), d("li", {
2958
+ L.value.blocks.length > 0 ? (r(), c("ul", Ua, [
2959
+ (r(!0), c(C, null, j(L.value.blocks, (e) => (r(), c("li", {
2957
2960
  key: e.id,
2958
- class: K(["mbc__block", { "is-picked": mt.value[e.id] === !0, "is-blocked": !e.canApply }])
2961
+ class: K(["mbc__block", { "is-picked": ft.value[e.id] === !0, "is-blocked": !e.canApply }])
2959
2962
  }, [
2960
- l("label", qa, [
2963
+ l("label", za, [
2961
2964
  l("span", {
2962
2965
  class: K(["p-checkbox p-component", { "p-disabled": !e.canApply }])
2963
2966
  }, [
@@ -2965,78 +2968,78 @@ ${t.text}`).join(`
2965
2968
  class: "p-checkbox-input",
2966
2969
  type: "checkbox",
2967
2970
  disabled: !e.canApply,
2968
- checked: mt.value[e.id] === !0,
2969
- onChange: (r) => Bs(e.id, r)
2970
- }, null, 40, Fa),
2971
+ checked: ft.value[e.id] === !0,
2972
+ onChange: (d) => As(e.id, d)
2973
+ }, null, 40, Ha),
2971
2974
  t[119] || (t[119] = l("span", { class: "p-checkbox-box" }, null, -1))
2972
2975
  ], 2),
2973
- l("span", Ua, f(e.name || e.id), 1),
2976
+ l("span", Ka, f(e.name || e.id), 1),
2974
2977
  l("span", {
2975
2978
  class: K(["p-tag", e.status === "modified" ? "p-tag-success" : e.status === "missing" ? "p-tag-warning" : e.status === "not-in-db" ? "p-tag-info" : ""])
2976
2979
  }, f(n[e.status]), 3),
2977
- l("span", za, f(e.module || "—"), 1)
2980
+ l("span", Va, f(e.module || "—"), 1)
2978
2981
  ]),
2979
- l("p", Ha, [
2980
- e.status === "missing" ? (c(), d(C, { key: 0 }, [
2982
+ l("p", Wa, [
2983
+ e.status === "missing" ? (r(), c(C, { key: 0 }, [
2981
2984
  k("目录里没有这一块,勾不上")
2982
- ], 64)) : e.status === "not-in-db" ? (c(), d(C, { key: 1 }, [
2985
+ ], 64)) : e.status === "not-in-db" ? (r(), c(C, { key: 1 }, [
2983
2986
  k("库里还没有这一块 —— 勾上它保存,就是按这一包新建")
2984
- ], 64)) : e.changedFiles.length > 0 ? (c(), d(C, { key: 2 }, [
2987
+ ], 64)) : e.changedFiles.length > 0 ? (r(), c(C, { key: 2 }, [
2985
2988
  t[120] || (t[120] = k("改了:", -1)),
2986
- l("span", Ka, f(e.changedFiles.join(" / ")), 1)
2987
- ], 64)) : (c(), d(C, { key: 3 }, [
2989
+ l("span", Ja, f(e.changedFiles.join(" / ")), 1)
2990
+ ], 64)) : (r(), c(C, { key: 3 }, [
2988
2991
  k("内容与库里一致")
2989
2992
  ], 64))
2990
2993
  ]),
2991
- e.blockedWhy ? (c(), d("p", Va, "不能存:" + f(e.blockedWhy), 1)) : $("", !0),
2992
- (e.verifyNotes ?? []).length > 0 ? (c(), d("ul", Wa, [
2993
- (c(!0), d(C, null, j(e.verifyNotes ?? [], (r, w) => (c(), d("li", {
2994
+ e.blockedWhy ? (r(), c("p", Ga, "不能存:" + f(e.blockedWhy), 1)) : $("", !0),
2995
+ (e.verifyNotes ?? []).length > 0 ? (r(), c("ul", Qa, [
2996
+ (r(!0), c(C, null, j(e.verifyNotes ?? [], (d, w) => (r(), c("li", {
2994
2997
  key: w,
2995
2998
  class: "mbc__note"
2996
- }, f(r), 1))), 128))
2999
+ }, f(d), 1))), 128))
2997
3000
  ])) : $("", !0),
2998
- l("p", Ja, f(e.folder || e.where), 1)
3001
+ l("p", Ya, f(e.folder || e.where), 1)
2999
3002
  ], 2))), 128))
3000
- ])) : (c(), d("p", Ga, "这个目录里没有认出任何块(点上面那个按钮再扫一次,或者确认文件夹名里有那个块的 uuid)。")),
3001
- l("div", Qa, [
3002
- bt.value > 0 ? (c(), d("button", {
3003
+ ])) : (r(), c("p", Za, "这个目录里没有认出任何块(点上面那个按钮再扫一次,或者确认文件夹名里有那个块的 uuid)。")),
3004
+ l("div", Xa, [
3005
+ mt.value > 0 ? (r(), c("button", {
3003
3006
  key: 0,
3004
3007
  class: "p-button p-button-sm mbc__report-btn",
3005
3008
  type: "button",
3006
- title: "点开看这一趟的全部问题(" + bt.value + " 条)",
3009
+ title: "点开看这一趟的全部问题(" + mt.value + " 条)",
3007
3010
  onClick: t[30] || (t[30] = (e) => Tt.value = !0)
3008
- }, "查看问题(" + f(bt.value) + ")⚠", 9, Ya)) : (c(), d("span", Za, "这一趟没有问题")),
3009
- L.value.unmatched.length > 0 ? (c(), d("span", {
3011
+ }, "查看问题(" + f(mt.value) + ")⚠", 9, tu)) : (r(), c("span", eu, "这一趟没有问题")),
3012
+ L.value.unmatched.length > 0 ? (r(), c("span", {
3010
3013
  key: 2,
3011
3014
  class: "mbc__chip is-bad",
3012
3015
  title: L.value.unmatched.join(" / ")
3013
- }, "认不出归属的文件夹 " + f(L.value.unmatched.length), 9, Xa)) : $("", !0)
3016
+ }, "认不出归属的文件夹 " + f(L.value.unmatched.length), 9, nu)) : $("", !0)
3014
3017
  ]),
3015
- (L.value.skipped ?? []).length > 0 ? (c(), d("p", tu, [
3018
+ (L.value.skipped ?? []).length > 0 ? (r(), c("p", su, [
3016
3019
  k(" 忽略了 " + f((L.value.skipped ?? []).length) + " 个文件夹(名字里没有 uuid,当测试文件处理 —— 与忽略 ", 1),
3017
3020
  t[121] || (t[121] = l("span", { class: "mbc__mono" }, "example/", -1)),
3018
3021
  k(" 同一个规矩):" + f((L.value.skipped ?? []).join(" / ")), 1)
3019
3022
  ])) : $("", !0),
3020
- l("div", eu, [
3023
+ l("div", ou, [
3021
3024
  l("button", {
3022
3025
  class: "p-button p-button-sm mbc__act-import",
3023
3026
  type: "button",
3024
3027
  disabled: T.value,
3025
- onClick: t[31] || (t[31] = (e) => Ts())
3026
- }, f(rt.value ? "保存中…" : `保存选中的块(${te.value.length})`), 9, nu)
3028
+ onClick: t[31] || (t[31] = (e) => Rs())
3029
+ }, f(rt.value ? "保存中…" : `保存选中的块(${ne.value.length})`), 9, lu)
3027
3030
  ])
3028
3031
  ], 64)) : $("", !0)
3029
3032
  ], 512), [
3030
- [oe, R.value === "workspace"]
3033
+ [ie, R.value === "workspace"]
3031
3034
  ]),
3032
- _t(l("section", su, [
3033
- l("h3", ou, [
3035
+ _t(l("section", iu, [
3036
+ l("h3", au, [
3034
3037
  t[123] || (t[123] = k(" 不在数据库 ", -1)),
3035
- l("span", lu, f(Z(i)), 1),
3036
- l("span", iu, f($e.value.length), 1)
3038
+ l("span", uu, f(Z(i)), 1),
3039
+ l("span", ru, f(xe.value.length), 1)
3037
3040
  ]),
3038
- $e.value.length === 0 ? (c(), d("p", au, "路由表里声明的块,库里都有那一行。")) : (c(), d(C, { key: 1 }, [
3039
- l("p", uu, [
3041
+ xe.value.length === 0 ? (r(), c("p", cu, "路由表里声明的块,库里都有那一行。")) : (r(), c(C, { key: 1 }, [
3042
+ l("p", du, [
3040
3043
  t[124] || (t[124] = k(" 这些页面的路由(", -1)),
3041
3044
  t[125] || (t[125] = l("span", { class: "mbc__mono" }, "component: MagicBlockPage", -1)),
3042
3045
  t[126] || (t[126] = k(")声明了块的 uuid, ", -1)),
@@ -3045,12 +3048,12 @@ ${t.text}`).join(`
3045
3048
  t[129] || (t[129] = l("b", null, "要建进库", -1)),
3046
3049
  k(":在上面「读回改动」里选中放这一块的文件夹(文件夹名里有 uuid), 扫出来就是一条标签写着「" + f(Z(i)) + "」、能勾能存的条目。 ", 1)
3047
3050
  ]),
3048
- l("ul", ru, [
3049
- (c(!0), d(C, null, j($e.value, (e) => (c(), d("li", {
3051
+ l("ul", pu, [
3052
+ (r(!0), c(C, null, j(xe.value, (e) => (r(), c("li", {
3050
3053
  key: e.uuid,
3051
3054
  class: "mbc__block is-blocked"
3052
3055
  }, [
3053
- l("label", cu, [
3056
+ l("label", fu, [
3054
3057
  t[130] || (t[130] = l("span", { class: "p-checkbox p-component p-disabled" }, [
3055
3058
  l("input", {
3056
3059
  class: "p-checkbox-input",
@@ -3059,36 +3062,36 @@ ${t.text}`).join(`
3059
3062
  }),
3060
3063
  l("span", { class: "p-checkbox-box" })
3061
3064
  ], -1)),
3062
- l("span", du, f(e.title || e.uuid), 1),
3063
- l("span", pu, f(Z(i)), 1),
3064
- l("span", fu, f(e.module || "—"), 1)
3065
+ l("span", mu, f(e.title || e.uuid), 1),
3066
+ l("span", bu, f(Z(i)), 1),
3067
+ l("span", vu, f(e.module || "—"), 1)
3065
3068
  ]),
3066
- l("p", mu, [
3069
+ l("p", hu, [
3067
3070
  t[131] || (t[131] = k(" 路由 ", -1)),
3068
- l("span", bu, f(e.path), 1),
3071
+ l("span", _u, f(e.path), 1),
3069
3072
  t[132] || (t[132] = k(" 声明了它,库里没有这个块 —— 手里还没有放这个块的文件夹,所以这里勾不上(勾上了也没有正文可存)。 ", -1))
3070
3073
  ]),
3071
- l("p", vu, f(e.uuid), 1)
3074
+ l("p", gu, f(e.uuid), 1)
3072
3075
  ]))), 128))
3073
3076
  ])
3074
3077
  ], 64))
3075
3078
  ], 512), [
3076
- [oe, R.value === "workspace"]
3079
+ [ie, R.value === "workspace"]
3077
3080
  ]),
3078
- R.value === "workspace" && (G.value.length > 0 || Q.value.length > 0) ? (c(), d("section", hu, [
3081
+ R.value === "workspace" && (G.value.length > 0 || Q.value.length > 0) ? (r(), c("section", yu, [
3079
3082
  t[133] || (t[133] = l("h3", { class: "mbc__title" }, "保存结果", -1)),
3080
- l("p", _u, [
3081
- l("span", gu, "存成 " + f(ge.value), 1),
3082
- Ft.value.length > 0 ? (c(), d("span", yu, "没存成 " + f(Ft.value.length), 1)) : $("", !0),
3083
- G.value.length > 0 ? (c(), d("span", ku, "前端拦下 " + f(G.value.length), 1)) : $("", !0),
3084
- Ft.value.length === 0 && G.value.length === 0 ? (c(), d("span", $u, "明细在下面那个「查看问题」里(没问题时是空的)。")) : $("", !0)
3083
+ l("p", ku, [
3084
+ l("span", $u, "存成 " + f(ke.value), 1),
3085
+ zt.value.length > 0 ? (r(), c("span", wu, "没存成 " + f(zt.value.length), 1)) : $("", !0),
3086
+ G.value.length > 0 ? (r(), c("span", xu, "前端拦下 " + f(G.value.length), 1)) : $("", !0),
3087
+ zt.value.length === 0 && G.value.length === 0 ? (r(), c("span", Cu, "明细在下面那个「查看问题」里(没问题时是空的)。")) : $("", !0)
3085
3088
  ]),
3086
- l("div", wu, [
3089
+ l("div", Eu, [
3087
3090
  l("button", {
3088
3091
  class: "p-button p-button-sm mbc__report-btn",
3089
3092
  type: "button",
3090
3093
  onClick: t[32] || (t[32] = (e) => Tt.value = !0)
3091
- }, " 查看问题(" + f(bt.value) + f(yt.value > 0 ? ` + 提示 ${yt.value}` : "") + ")⚠ ", 1)
3094
+ }, " 查看问题(" + f(mt.value) + f(yt.value > 0 ? ` + 提示 ${yt.value}` : "") + ")⚠ ", 1)
3092
3095
  ])
3093
3096
  ])) : $("", !0),
3094
3097
  t[134] || (t[134] = l("div", {
@@ -3096,100 +3099,100 @@ ${t.text}`).join(`
3096
3099
  "aria-hidden": "true"
3097
3100
  }, null, -1))
3098
3101
  ]),
3099
- l("footer", xu, [
3100
- S.value.length > 0 ? (c(), d("button", {
3102
+ l("footer", Su, [
3103
+ S.value.length > 0 ? (r(), c("button", {
3101
3104
  key: 0,
3102
3105
  class: "p-button p-button-sm mbc__report-btn",
3103
3106
  type: "button",
3104
3107
  title: "点开看全部报错(" + S.value.length + " 条)",
3105
3108
  onClick: t[33] || (t[33] = (e) => A.value = !0)
3106
- }, "查看报错(" + f(S.value.length) + " 条)⚠", 9, Cu)) : $("", !0),
3107
- _.value ? (c(), d("p", Eu, f(_.value), 1)) : g.value ? (c(), d("p", Su, f(g.value), 1)) : (c(), d("p", Tu, "—"))
3109
+ }, "查看报错(" + f(S.value.length) + " 条)⚠", 9, Tu)) : $("", !0),
3110
+ _.value ? (r(), c("p", Bu, f(_.value), 1)) : g.value ? (r(), c("p", Mu, f(g.value), 1)) : (r(), c("p", Ru, "—"))
3108
3111
  ])
3109
3112
  ], 2)) : $("", !0),
3110
- p.value && Tt.value ? (c(), d("div", {
3113
+ p.value && Tt.value ? (r(), c("div", {
3111
3114
  key: 1,
3112
3115
  class: "mbc__modal",
3113
3116
  role: "dialog",
3114
3117
  "aria-modal": "true",
3115
- onClick: t[37] || (t[37] = Ne((e) => Tt.value = !1, ["self"]))
3118
+ onClick: t[37] || (t[37] = Ue((e) => Tt.value = !1, ["self"]))
3116
3119
  }, [
3117
- l("div", Bu, [
3118
- l("header", Mu, [
3119
- l("strong", null, "读回 / 保存的问题(" + f(bt.value) + " 条" + f(yt.value > 0 ? `,另有提示 / 没验到 ${yt.value} 条` : "") + ")", 1),
3120
+ l("div", Au, [
3121
+ l("header", Ou, [
3122
+ l("strong", null, "读回 / 保存的问题(" + f(mt.value) + " 条" + f(yt.value > 0 ? `,另有提示 / 没验到 ${yt.value} 条` : "") + ")", 1),
3120
3123
  l("button", {
3121
3124
  class: "p-button p-button-sm p-button-text",
3122
3125
  type: "button",
3123
3126
  onClick: t[34] || (t[34] = (e) => Tt.value = !1)
3124
3127
  }, "收起")
3125
3128
  ]),
3126
- l("div", Ru, [
3127
- G.value.length > 0 ? (c(), d("section", Au, [
3128
- l("h4", Ou, "前端校验拦下的(" + f(G.value.length) + ")", 1),
3129
- l("ul", ju, [
3130
- (c(!0), d(C, null, j(G.value, (e, r) => (c(), d("li", { key: r }, f(e), 1))), 128))
3129
+ l("div", ju, [
3130
+ G.value.length > 0 ? (r(), c("section", Lu, [
3131
+ l("h4", Pu, "前端校验拦下的(" + f(G.value.length) + ")", 1),
3132
+ l("ul", Iu, [
3133
+ (r(!0), c(C, null, j(G.value, (e, d) => (r(), c("li", { key: d }, f(e), 1))), 128))
3131
3134
  ])
3132
3135
  ])) : $("", !0),
3133
- (L.value?.failures ?? []).length > 0 ? (c(), d("section", Lu, [
3134
- l("h4", Pu, "读回时逐条回的(" + f((L.value?.failures ?? []).length) + ")", 1),
3135
- l("ul", Iu, [
3136
- (c(!0), d(C, null, j(L.value?.failures ?? [], (e, r) => (c(), d("li", { key: r }, [
3137
- l("span", Nu, f(e.kind || "问题"), 1),
3138
- l("span", Du, f(e.where), 1),
3136
+ (L.value?.failures ?? []).length > 0 ? (r(), c("section", Nu, [
3137
+ l("h4", Du, "读回时逐条回的(" + f((L.value?.failures ?? []).length) + ")", 1),
3138
+ l("ul", qu, [
3139
+ (r(!0), c(C, null, j(L.value?.failures ?? [], (e, d) => (r(), c("li", { key: d }, [
3140
+ l("span", Fu, f(e.kind || "问题"), 1),
3141
+ l("span", Uu, f(e.where), 1),
3139
3142
  k(" " + f(e.message), 1)
3140
3143
  ]))), 128))
3141
3144
  ])
3142
3145
  ])) : $("", !0),
3143
- (L.value?.unmatched ?? []).length > 0 ? (c(), d("section", qu, [
3144
- l("h4", Fu, "认不出归属的文件夹(" + f((L.value?.unmatched ?? []).length) + ")", 1),
3145
- l("ul", Uu, [
3146
- (c(!0), d(C, null, j(L.value?.unmatched ?? [], (e, r) => (c(), d("li", { key: r }, [
3147
- l("span", zu, f(e), 1)
3146
+ (L.value?.unmatched ?? []).length > 0 ? (r(), c("section", zu, [
3147
+ l("h4", Hu, "认不出归属的文件夹(" + f((L.value?.unmatched ?? []).length) + ")", 1),
3148
+ l("ul", Ku, [
3149
+ (r(!0), c(C, null, j(L.value?.unmatched ?? [], (e, d) => (r(), c("li", { key: d }, [
3150
+ l("span", Vu, f(e), 1)
3148
3151
  ]))), 128))
3149
3152
  ])
3150
3153
  ])) : $("", !0),
3151
- Q.value.length > 0 ? (c(), d("section", Hu, [
3152
- l("h4", Ku, "保存结果(" + f(Q.value.length) + ":存成 " + f(ge.value) + ",没存成 " + f(Ft.value.length) + ")", 1),
3153
- l("ul", Vu, [
3154
- (c(!0), d(C, null, j(Q.value, (e) => (c(), d("li", {
3154
+ Q.value.length > 0 ? (r(), c("section", Wu, [
3155
+ l("h4", Ju, "保存结果(" + f(Q.value.length) + ":存成 " + f(ke.value) + ",没存成 " + f(zt.value.length) + ")", 1),
3156
+ l("ul", Gu, [
3157
+ (r(!0), c(C, null, j(Q.value, (e) => (r(), c("li", {
3155
3158
  key: e.id,
3156
3159
  class: K({ "is-ok": e.ok })
3157
3160
  }, [
3158
3161
  l("strong", null, f(e.name || e.id) + ":" + f(e.ok ? "已保存" : "没保存"), 1),
3159
- !e.ok && e.error ? (c(), d("span", Wu, f(e.error), 1)) : $("", !0),
3160
- !e.ok && (e.issues ?? []).length > 0 ? (c(), d("ul", Ju, [
3161
- (c(!0), d(C, null, j(e.issues, (r, w) => (c(), d("li", { key: w }, f(r), 1))), 128))
3162
+ !e.ok && e.error ? (r(), c("span", Qu, f(e.error), 1)) : $("", !0),
3163
+ !e.ok && (e.issues ?? []).length > 0 ? (r(), c("ul", Yu, [
3164
+ (r(!0), c(C, null, j(e.issues, (d, w) => (r(), c("li", { key: w }, f(d), 1))), 128))
3162
3165
  ])) : $("", !0)
3163
3166
  ], 2))), 128))
3164
3167
  ])
3165
3168
  ])) : $("", !0),
3166
- H.value && (Y.value.length > 0 || Bt.value.length > 0) ? (c(), d("section", Gu, [
3167
- l("h4", Qu, "体检:提示 / 没验到(**不是错**," + f(yt.value + (Y.value.length > 0 ? 1 : 0)) + " 条)", 1),
3168
- l("ul", Yu, [
3169
- Y.value.length > 0 ? (c(), d("li", Zu, [
3169
+ H.value && (Y.value.length > 0 || Bt.value.length > 0) ? (r(), c("section", Zu, [
3170
+ l("h4", Xu, "体检:提示 / 没验到(**不是错**," + f(yt.value + (Y.value.length > 0 ? 1 : 0)) + " 条)", 1),
3171
+ l("ul", tr, [
3172
+ Y.value.length > 0 ? (r(), c("li", er, [
3170
3173
  t[135] || (t[135] = l("strong", null, "这一趟没验运行期:", -1)),
3171
3174
  k(" 只做了静态判据(引用 / 字段 / 枚举在不在),运行期错误**一个都没验** —— 那 " + f(Y.value.length) + ' 个块的"通过"是**静态通过**,不等于"跑得起来"。 没验的是:', 1),
3172
- l("span", Xu, f(Y.value.join(" / ")), 1)
3175
+ l("span", nr, f(Y.value.join(" / ")), 1)
3173
3176
  ])) : $("", !0),
3174
- (c(!0), d(C, null, j(Bt.value, (e) => (c(), d("li", {
3177
+ (r(!0), c(C, null, j(Bt.value, (e) => (r(), c("li", {
3175
3178
  key: e.id,
3176
3179
  class: "mbc__note"
3177
3180
  }, [
3178
3181
  l("strong", null, f(e.name || e.id), 1),
3179
- l("ul", tr, [
3180
- (c(!0), d(C, null, j(e.verifyNotes ?? [], (r, w) => (c(), d("li", { key: w }, f(r), 1))), 128))
3182
+ l("ul", sr, [
3183
+ (r(!0), c(C, null, j(e.verifyNotes ?? [], (d, w) => (r(), c("li", { key: w }, f(d), 1))), 128))
3181
3184
  ])
3182
3185
  ]))), 128))
3183
3186
  ]),
3184
- t[136] || (t[136] = l("p", { class: "mbc__hint" }, ' 这一栏与"问题"分开:上面的都得改,这一栏**不拦保存、也不让块停用** (`LABULL_REQUIRES` 默认 `warn` 档时,依赖声明那几条判据结论只走这里)。 ', -1))
3187
+ t[136] || (t[136] = l("p", { class: "mbc__hint" }, ' 这一栏与"问题"分开:上面的都得改,这一栏**不拦保存、也不让块停用** (依赖声明那几条判据结论只在 `LABULL_REQUIRES` **显式写成 `warn`** 时才走这里; **默认档是 `error`**,那一档下它们进的是上面那个「问题」)。 ', -1))
3185
3188
  ])) : $("", !0),
3186
- bt.value === 0 && !(H.value && (Y.value.length > 0 || Bt.value.length > 0)) ? (c(), d("p", er, "这一趟没有问题。")) : $("", !0)
3189
+ mt.value === 0 && !(H.value && (Y.value.length > 0 || Bt.value.length > 0)) ? (r(), c("p", or, "这一趟没有问题。")) : $("", !0)
3187
3190
  ]),
3188
- l("footer", nr, [
3191
+ l("footer", lr, [
3189
3192
  l("button", {
3190
3193
  class: "p-button p-button-sm p-button-outlined",
3191
3194
  type: "button",
3192
- onClick: t[35] || (t[35] = (e) => ks())
3195
+ onClick: t[35] || (t[35] = (e) => xs())
3193
3196
  }, "复制全部"),
3194
3197
  l("button", {
3195
3198
  class: "p-button p-button-sm",
@@ -3199,15 +3202,15 @@ ${t.text}`).join(`
3199
3202
  ])
3200
3203
  ])
3201
3204
  ])) : $("", !0),
3202
- p.value && A.value ? (c(), d("div", {
3205
+ p.value && A.value ? (r(), c("div", {
3203
3206
  key: 2,
3204
3207
  class: "mbc__modal",
3205
3208
  role: "dialog",
3206
3209
  "aria-modal": "true",
3207
- onClick: t[42] || (t[42] = Ne((e) => A.value = !1, ["self"]))
3210
+ onClick: t[42] || (t[42] = Ue((e) => A.value = !1, ["self"]))
3208
3211
  }, [
3209
- l("div", sr, [
3210
- l("header", or, [
3212
+ l("div", ir, [
3213
+ l("header", ar, [
3211
3214
  l("strong", null, "报错(" + f(S.value.length) + " 条)", 1),
3212
3215
  l("button", {
3213
3216
  class: "p-button p-button-sm p-button-text",
@@ -3215,28 +3218,28 @@ ${t.text}`).join(`
3215
3218
  onClick: t[38] || (t[38] = (e) => A.value = !1)
3216
3219
  }, "收起")
3217
3220
  ]),
3218
- l("div", lr, [
3219
- l("ol", ir, [
3220
- (c(!0), d(C, null, j(S.value, (e, r) => (c(), d("li", { key: r }, [
3221
- l("div", ar, [
3222
- l("span", ur, f(e.at), 1),
3221
+ l("div", ur, [
3222
+ l("ol", rr, [
3223
+ (r(!0), c(C, null, j(S.value, (e, d) => (r(), c("li", { key: d }, [
3224
+ l("div", cr, [
3225
+ l("span", dr, f(e.at), 1),
3223
3226
  k(" · " + f(e.where), 1)
3224
3227
  ]),
3225
- l("pre", rr, f(e.text), 1)
3228
+ l("pre", pr, f(e.text), 1)
3226
3229
  ]))), 128))
3227
3230
  ]),
3228
- S.value.length === 0 ? (c(), d("p", cr, "这一轮没有报错。")) : $("", !0)
3231
+ S.value.length === 0 ? (r(), c("p", fr, "这一轮没有报错。")) : $("", !0)
3229
3232
  ]),
3230
- l("footer", dr, [
3233
+ l("footer", mr, [
3231
3234
  l("button", {
3232
3235
  class: "p-button p-button-sm p-button-outlined",
3233
3236
  type: "button",
3234
- onClick: t[39] || (t[39] = (e) => gs())
3237
+ onClick: t[39] || (t[39] = (e) => $s())
3235
3238
  }, "复制全部"),
3236
3239
  l("button", {
3237
3240
  class: "p-button p-button-sm p-button-text",
3238
3241
  type: "button",
3239
- onClick: t[40] || (t[40] = (e) => we())
3242
+ onClick: t[40] || (t[40] = (e) => Ce())
3240
3243
  }, "清空报错"),
3241
3244
  l("button", {
3242
3245
  class: "p-button p-button-sm",
@@ -3246,7 +3249,7 @@ ${t.text}`).join(`
3246
3249
  ])
3247
3250
  ])
3248
3251
  ])) : $("", !0),
3249
- p.value ? (c(), d("button", {
3252
+ p.value ? (r(), c("button", {
3250
3253
  key: 3,
3251
3254
  class: "mbc__close",
3252
3255
  type: "button",
@@ -3255,40 +3258,40 @@ ${t.text}`).join(`
3255
3258
  }, "×")) : $("", !0)
3256
3259
  ], 2)) : $("", !0);
3257
3260
  }
3258
- }), gr = /* @__PURE__ */ Pn(mr, [["__scopeId", "data-v-39c613cc"]]);
3259
- Object.assign(Yn, { [Qn]: !0 });
3261
+ }), $r = /* @__PURE__ */ Dn(hr, [["__scopeId", "data-v-7b9b8671"]]);
3262
+ Object.assign(ts, { [Xn]: !0 });
3260
3263
  export {
3261
- De as API_BASE,
3262
- po as BLOCK_BACKEND_FILE,
3263
- Kt as BLOCK_ENTRY,
3264
- Re as BLOCK_MANIFEST,
3265
- Qn as BLOCK_PAGE_MARK,
3266
- zs as CLIENT_SOURCE,
3267
- Ae as MANIFEST_KEYS,
3268
- Js as MANIFEST_MOVED,
3269
- gn as MANIFEST_REQUIRED,
3270
- gr as MagicBlockConsole,
3271
- Yn as MagicBlockPage,
3272
- We as NAME_MAX,
3273
- hn as README_OPEN,
3274
- zt as REQUIRES_KEYS,
3275
- _n as REQUIRES_OPEN,
3276
- Wo as blockPlacementProblems,
3277
- go as buildPreview,
3278
- co as checkSelection,
3279
- Ho as declaredMissing,
3280
- Gn as declaredUuidOf,
3281
- zo as declaredUuidsOf,
3282
- Ws as installBridge,
3283
- Ko as isBlockPage,
3284
- $o as loadBlockRender,
3285
- yo as onBlockRenderRefresh,
3286
- ao as parseManifest,
3287
- ko as refreshBlockRender,
3288
- Go as requiresRouteProblems,
3289
- Jo as sameRouteShape,
3290
- $r as setApiBase,
3291
- uo as validFileName,
3292
- no as validName,
3293
- ro as validateBlock
3264
+ ze as API_BASE,
3265
+ bo as BLOCK_BACKEND_FILE,
3266
+ Wt as BLOCK_ENTRY,
3267
+ Le as BLOCK_MANIFEST,
3268
+ Xn as BLOCK_PAGE_MARK,
3269
+ Vs as CLIENT_SOURCE,
3270
+ Pe as MANIFEST_KEYS,
3271
+ Ys as MANIFEST_MOVED,
3272
+ $n as MANIFEST_REQUIRED,
3273
+ $r as MagicBlockConsole,
3274
+ ts as MagicBlockPage,
3275
+ Ye as NAME_MAX,
3276
+ yn as README_OPEN,
3277
+ Kt as REQUIRES_KEYS,
3278
+ kn as REQUIRES_OPEN,
3279
+ Qo as blockPlacementProblems,
3280
+ $o as buildPreview,
3281
+ mo as checkSelection,
3282
+ Wo as declaredMissing,
3283
+ Zn as declaredUuidOf,
3284
+ Vo as declaredUuidsOf,
3285
+ Qs as installBridge,
3286
+ Jo as isBlockPage,
3287
+ Co as loadBlockRender,
3288
+ wo as onBlockRenderRefresh,
3289
+ co as parseManifest,
3290
+ xo as refreshBlockRender,
3291
+ Zo as requiresRouteProblems,
3292
+ Yo as sameRouteShape,
3293
+ Cr as setApiBase,
3294
+ po as validFileName,
3295
+ lo as validName,
3296
+ fo as validateBlock
3294
3297
  };