aiflowui 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,7 +1,7 @@
1
1
  import { ref as le, computed as Q, watch as me, resolveComponent as y, openBlock as s, createBlock as G, withCtx as d, createVNode as o, unref as q, createElementVNode as C, createTextVNode as te, createElementBlock as U, toDisplayString as Z, createCommentVNode as K, inject as Me, Fragment as ae, renderList as oe, withKeys as Ot, normalizeClass as be, withModifiers as Fe, nextTick as Lt, Teleport as Dt, normalizeStyle as It, reactive as $t, markRaw as Rt, isRef as dt, withDirectives as Ne, vShow as ke, onMounted as ct, resolveDynamicComponent as Mt, provide as Re, Transition as Ft } from "vue";
2
2
  import { Upload as je, RefreshLeft as mt, CircleCheck as pt, Box as gt, View as ft, CopyDocument as vt, Download as yt, FolderOpened as _t, Grid as qe, DArrowLeft as ht, DataAnalysis as ze, Timer as He, Document as De, User as We, Close as bt, Plus as Ie, Warning as xt, QuestionFilled as he, Delete as xe, Search as Be, Loading as Ct, CircleClose as St, Cpu as Je, VideoPlay as qt } from "@element-plus/icons-vue";
3
3
  import { ElMessage as ie, ElMessageBox as ye } from "element-plus";
4
- import { defineStore as Tt } from "pinia";
4
+ import { defineStore as wt } from "pinia";
5
5
  import { addEdge as Bt, Handle as pe, Position as ge, useVueFlow as Vt, VueFlow as Pt } from "@vue-flow/core";
6
6
  import { Background as Gt } from "@vue-flow/background";
7
7
  import { Controls as Ut } from "@vue-flow/controls";
@@ -50,7 +50,7 @@ const B = {
50
50
  // 编辑
51
51
  DETAIL: "detail"
52
52
  // 详情(只读)
53
- }, Se = (c) => `${c}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, wt = (c) => ({
53
+ }, Se = (c) => `${c}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, Tt = (c) => ({
54
54
  id: Se("start"),
55
55
  type: "start",
56
56
  position: c,
@@ -286,7 +286,7 @@ const B = {
286
286
  arguments: {}
287
287
  }
288
288
  }), lt = () => {
289
- const c = wt({ x: 80, y: 300 }), n = Ue({ x: 320, y: 300 }), e = Ge({ x: 1e3, y: 300 }), O = {
289
+ const c = Tt({ x: 80, y: 300 }), n = Ue({ x: 320, y: 300 }), e = Ge({ x: 1e3, y: 300 }), O = {
290
290
  id: `e_${c.id}_${n.id}`,
291
291
  source: c.id,
292
292
  target: n.id
@@ -295,8 +295,8 @@ const B = {
295
295
  nodes: [c, n, e],
296
296
  edges: [O]
297
297
  };
298
- }, de = Tt("workflow", () => {
299
- const c = lt(), n = le(c.nodes), e = le(c.edges), O = le(null), T = le(null), i = le(/* @__PURE__ */ new Set()), g = le(/* @__PURE__ */ new Set()), h = Q(() => O.value ? n.value.find((t) => t.id === O.value) : null), A = Q(() => T.value ? e.value.find((t) => t.id === T.value) : null), R = (t) => n.value.filter((a) => a.type === t).length, $ = () => {
298
+ }, de = wt("workflow", () => {
299
+ const c = lt(), n = le(c.nodes), e = le(c.edges), O = le(null), w = le(null), i = le(/* @__PURE__ */ new Set()), g = le(/* @__PURE__ */ new Set()), h = Q(() => O.value ? n.value.find((t) => t.id === O.value) : null), A = Q(() => w.value ? e.value.find((t) => t.id === w.value) : null), R = (t) => n.value.filter((a) => a.type === t).length, $ = () => {
300
300
  const t = n.value.filter((a) => a.type === B.DATA_SOURCE);
301
301
  t.length !== 0 && (t.length === 1 ? t[0].data.label = "数据源" : t.forEach((a, r) => {
302
302
  a.data.label = `数据源 ${r + 1}`;
@@ -317,7 +317,7 @@ const B = {
317
317
  n.value = n.value.filter((b) => b.id !== t), e.value = e.value.filter(
318
318
  (b) => b.source !== t && b.target !== t
319
319
  ), O.value === t && (O.value = null), r && $();
320
- }, w = (t, a) => {
320
+ }, T = (t, a) => {
321
321
  const r = n.value.find((b) => b.id === t);
322
322
  r && (r.data = { ...r.data, ...a });
323
323
  }, u = (t, a) => {
@@ -338,7 +338,7 @@ const B = {
338
338
  e.value = Bt(t, e.value);
339
339
  }, m = (t) => {
340
340
  const a = e.value.find((r) => r.id === t);
341
- if (e.value = e.value.filter((r) => r.id !== t), T.value === t && (T.value = null), a && a.data?.branchOrder !== void 0) {
341
+ if (e.value = e.value.filter((r) => r.id !== t), w.value === t && (w.value = null), a && a.data?.branchOrder !== void 0) {
342
342
  const r = n.value.find((b) => b.id === a.source);
343
343
  r && (r.type === B.START || r.type === B.DATA_SOURCE) && e.value.filter((z) => z.source === a.source).sort((z, J) => (z.data?.branchOrder || 0) - (J.data?.branchOrder || 0)).forEach((z, J) => {
344
344
  z.data ? z.data.branchOrder = J + 1 : z.data = { branchOrder: J + 1 };
@@ -394,7 +394,7 @@ const B = {
394
394
  nodes: n,
395
395
  edges: e,
396
396
  selectedNodeId: O,
397
- selectedEdgeId: T,
397
+ selectedEdgeId: w,
398
398
  invalidNodeIds: i,
399
399
  invalidEdgeIds: g,
400
400
  // 计算属性
@@ -407,7 +407,7 @@ const B = {
407
407
  supportPatrol: I,
408
408
  addNode: F,
409
409
  removeNode: _,
410
- updateNodeData: w,
410
+ updateNodeData: T,
411
411
  updateNodePosition: u,
412
412
  addConnection: f,
413
413
  removeEdge: m,
@@ -428,20 +428,20 @@ const B = {
428
428
  }
429
429
  },
430
430
  selectNode: (t) => {
431
- O.value = t, T.value = null;
431
+ O.value = t, w.value = null;
432
432
  },
433
433
  selectEdge: (t) => {
434
- T.value = t, O.value = null;
434
+ w.value = t, O.value = null;
435
435
  },
436
436
  clearSelection: () => {
437
- O.value = null, T.value = null;
437
+ O.value = null, w.value = null;
438
438
  },
439
439
  resetWorkflow: () => {
440
440
  const t = lt();
441
- n.value = t.nodes, e.value = t.edges, O.value = null, T.value = null;
441
+ n.value = t.nodes, e.value = t.edges, O.value = null, w.value = null;
442
442
  },
443
443
  loadWorkflow: (t, a) => {
444
- n.value = t, e.value = a, O.value = null, T.value = null;
444
+ n.value = t, e.value = a, O.value = null, w.value = null;
445
445
  },
446
446
  refreshDataSourceLabels: $,
447
447
  createEmptyGroup: l,
@@ -449,7 +449,7 @@ const B = {
449
449
  removeNodeFromGroup: D,
450
450
  dissolveParallelGroup: v,
451
451
  initializeSubsequentFrames: (t) => {
452
- n.value.find((r) => r.id === t) && w(t, {
452
+ n.value.find((r) => r.id === t) && T(t, {
453
453
  subsequentFrames: [
454
454
  {
455
455
  id: "default-subsequent",
@@ -461,7 +461,7 @@ const B = {
461
461
  },
462
462
  addSubsequentFrame: (t, a) => {
463
463
  const r = n.value.find((b) => b.id === t);
464
- !r || r.type !== "dataSource" || (r.data.subsequentFrames || (r.data.subsequentFrames = []), r.data.subsequentFrames.push(a), w(t, {
464
+ !r || r.type !== "dataSource" || (r.data.subsequentFrames || (r.data.subsequentFrames = []), r.data.subsequentFrames.push(a), T(t, {
465
465
  subsequentFrames: [...r.data.subsequentFrames]
466
466
  }));
467
467
  },
@@ -475,7 +475,7 @@ const B = {
475
475
  const z = r.data.subsequentFrames.filter((J) => J.id !== a);
476
476
  z.forEach((J, X) => {
477
477
  J.id === "default-subsequent" ? J.label = "后续帧检测" : J.label = `后续帧检测${X + 1}`;
478
- }), w(t, {
478
+ }), T(t, {
479
479
  subsequentFrames: z
480
480
  });
481
481
  },
@@ -488,7 +488,7 @@ const B = {
488
488
  };
489
489
  }), Jt = "", Yt = 3e4;
490
490
  async function Xt(c, n = {}) {
491
- const e = new AbortController(), O = setTimeout(() => e.abort(), Yt), T = {
491
+ const e = new AbortController(), O = setTimeout(() => e.abort(), Yt), w = {
492
492
  headers: {
493
493
  "Content-Type": "application/json",
494
494
  ...n.headers
@@ -497,7 +497,7 @@ async function Xt(c, n = {}) {
497
497
  ...n
498
498
  };
499
499
  try {
500
- const i = `${Jt}${c}`, g = await fetch(i, T);
500
+ const i = `${Jt}${c}`, g = await fetch(i, w);
501
501
  if (clearTimeout(O), !g.ok) {
502
502
  const h = await g.text().catch(() => "请求失败");
503
503
  throw new Error(`HTTP error! status: ${g.status}, message: ${h}`);
@@ -536,11 +536,11 @@ class Nt {
536
536
  * @returns {Object} 前端节点数据
537
537
  */
538
538
  static backendToFrontend(n) {
539
- const { id: e, title: O, name: T, inputSchema: i, extraConfig: g } = n, h = {
539
+ const { id: e, title: O, name: w, inputSchema: i, extraConfig: g } = n, h = {
540
540
  id: e,
541
541
  title: O,
542
542
  // 后端标识符
543
- label: T,
543
+ label: w,
544
544
  // 显示名称
545
545
  type: "DETECTION_TARGET",
546
546
  inputSchema: i,
@@ -550,9 +550,9 @@ class Nt {
550
550
  data: {
551
551
  targetId: O,
552
552
  // 用于后端识别
553
- targetName: T,
553
+ targetName: w,
554
554
  // 显示名称
555
- description: T,
555
+ description: w,
556
556
  // 从 inputSchema 提取字段(使用 default 值)
557
557
  areas: i?.properties?.areas?.default || [],
558
558
  threshold: i?.properties?.threshold?.default || 0.5,
@@ -580,7 +580,7 @@ const nn = () => {
580
580
  START_Y: 300,
581
581
  H_GAP: 240,
582
582
  V_GAP: 180
583
- }, e = (L) => Ht[L] || B.DETECTION_TARGET, O = (L) => zt[L] || L, T = (L) => {
583
+ }, e = (L) => Ht[L] || B.DETECTION_TARGET, O = (L) => zt[L] || L, w = (L) => {
584
584
  if (!L) return { targets: [], alertConditions: [{ operator: ">", value: 0 }], conditionRelation: "OR" };
585
585
  const P = L.rules || [], W = L.logic || "AND";
586
586
  return {
@@ -703,7 +703,7 @@ const nn = () => {
703
703
  break;
704
704
  }
705
705
  return L.branchLogic && (p.enableBranch = !0, p.branchLogic = L.branchLogic), R(W, P, p);
706
- }, w = () => ({
706
+ }, T = () => ({
707
707
  properties: {
708
708
  reportFrequency: {
709
709
  type: "string",
@@ -775,7 +775,7 @@ const nn = () => {
775
775
  E.push(z), r === 0 ? Y.push($(V, z.id, t)) : Y.push($(V, z.id)), V = z.id, M += n.H_GAP;
776
776
  }
777
777
  if (L.targetCount) {
778
- const r = T(L.targetCount), b = R("targetCount", { x: M, y: W }, {
778
+ const r = w(L.targetCount), b = R("targetCount", { x: M, y: W }, {
779
779
  label: "目标计数",
780
780
  arguments: r,
781
781
  input_schema: {
@@ -814,7 +814,7 @@ const nn = () => {
814
814
  const P = g(L.extraConfig);
815
815
  return R("end", { x: 0, y: n.START_Y }, {
816
816
  label: "结束",
817
- input_schema: w(),
817
+ input_schema: T(),
818
818
  arguments: {
819
819
  reportFrequency: "always",
820
820
  reportInterval: 30,
@@ -919,8 +919,8 @@ const nn = () => {
919
919
  };
920
920
  }, re = (c, n) => {
921
921
  const e = c.__vccOpts || c;
922
- for (const [O, T] of n)
923
- e[O] = T;
922
+ for (const [O, w] of n)
923
+ e[O] = w;
924
924
  return e;
925
925
  }, an = {
926
926
  key: 0,
@@ -932,7 +932,7 @@ const nn = () => {
932
932
  },
933
933
  emits: ["update:modelValue", "imported"],
934
934
  setup(c, { emit: n }) {
935
- const e = c, O = n, { importFromJSON: T } = nn(), i = le(!1), g = le("paste"), h = le(""), A = le(""), R = le(""), $ = le(null);
935
+ const e = c, O = n, { importFromJSON: w } = nn(), i = le(!1), g = le("paste"), h = le(""), A = le(""), R = le(""), $ = le(null);
936
936
  me(() => e.modelValue, (_) => {
937
937
  i.value = _;
938
938
  }), me(i, (_) => {
@@ -940,12 +940,12 @@ const nn = () => {
940
940
  });
941
941
  const S = (_) => {
942
942
  R.value = "";
943
- const w = new FileReader();
944
- w.onload = (u) => {
943
+ const T = new FileReader();
944
+ T.onload = (u) => {
945
945
  A.value = u.target.result;
946
- }, w.onerror = () => {
946
+ }, T.onerror = () => {
947
947
  R.value = "文件读取失败";
948
- }, w.readAsText(_.raw);
948
+ }, T.readAsText(_.raw);
949
949
  }, x = () => {
950
950
  A.value = "";
951
951
  }, I = async () => {
@@ -955,22 +955,22 @@ const nn = () => {
955
955
  R.value = "请输入或上传JSON数据";
956
956
  return;
957
957
  }
958
- let w;
958
+ let T;
959
959
  try {
960
- w = JSON.parse(_);
960
+ T = JSON.parse(_);
961
961
  } catch {
962
962
  R.value = "JSON格式不正确,请检查";
963
963
  return;
964
964
  }
965
- await T(w) && (O("imported"), F());
965
+ await w(T) && (O("imported"), F());
966
966
  }, F = () => {
967
967
  i.value = !1, h.value = "", A.value = "", R.value = "", g.value = "paste", $.value?.clearFiles();
968
968
  };
969
- return (_, w) => {
969
+ return (_, T) => {
970
970
  const u = y("el-input"), f = y("el-tab-pane"), m = y("el-icon"), l = y("el-upload"), k = y("el-tabs"), D = y("el-button"), v = y("el-dialog");
971
971
  return s(), G(v, {
972
972
  modelValue: i.value,
973
- "onUpdate:modelValue": w[2] || (w[2] = (N) => i.value = N),
973
+ "onUpdate:modelValue": T[2] || (T[2] = (N) => i.value = N),
974
974
  title: "导入工作流",
975
975
  width: "600px",
976
976
  "close-on-click-modal": !1,
@@ -978,7 +978,7 @@ const nn = () => {
978
978
  }, {
979
979
  footer: d(() => [
980
980
  o(D, { onClick: F }, {
981
- default: d(() => [...w[5] || (w[5] = [
981
+ default: d(() => [...T[5] || (T[5] = [
982
982
  te("取消", -1)
983
983
  ])]),
984
984
  _: 1
@@ -987,7 +987,7 @@ const nn = () => {
987
987
  type: "primary",
988
988
  onClick: I
989
989
  }, {
990
- default: d(() => [...w[6] || (w[6] = [
990
+ default: d(() => [...T[6] || (T[6] = [
991
991
  te("确认导入", -1)
992
992
  ])]),
993
993
  _: 1
@@ -996,7 +996,7 @@ const nn = () => {
996
996
  default: d(() => [
997
997
  o(k, {
998
998
  modelValue: g.value,
999
- "onUpdate:modelValue": w[1] || (w[1] = (N) => g.value = N)
999
+ "onUpdate:modelValue": T[1] || (T[1] = (N) => g.value = N)
1000
1000
  }, {
1001
1001
  default: d(() => [
1002
1002
  o(f, {
@@ -1006,7 +1006,7 @@ const nn = () => {
1006
1006
  default: d(() => [
1007
1007
  o(u, {
1008
1008
  modelValue: h.value,
1009
- "onUpdate:modelValue": w[0] || (w[0] = (N) => h.value = N),
1009
+ "onUpdate:modelValue": T[0] || (T[0] = (N) => h.value = N),
1010
1010
  type: "textarea",
1011
1011
  rows: 12,
1012
1012
  placeholder: "请粘贴导出的JSON数据...",
@@ -1030,7 +1030,7 @@ const nn = () => {
1030
1030
  "on-remove": x,
1031
1031
  drag: ""
1032
1032
  }, {
1033
- tip: d(() => [...w[3] || (w[3] = [
1033
+ tip: d(() => [...T[3] || (T[3] = [
1034
1034
  C("div", { class: "el-upload__tip" }, "仅支持 .json 文件", -1)
1035
1035
  ])]),
1036
1036
  default: d(() => [
@@ -1040,7 +1040,7 @@ const nn = () => {
1040
1040
  ]),
1041
1041
  _: 1
1042
1042
  }),
1043
- w[4] || (w[4] = C("div", { class: "el-upload__text" }, [
1043
+ T[4] || (T[4] = C("div", { class: "el-upload__text" }, [
1044
1044
  te(" 将 JSON 文件拖到此处,或"),
1045
1045
  C("em", null, "点击上传")
1046
1046
  ], -1))
@@ -1060,14 +1060,14 @@ const nn = () => {
1060
1060
  };
1061
1061
  }
1062
1062
  }, ln = /* @__PURE__ */ re(on, [["__scopeId", "data-v-87854a39"]]), kt = (c, n) => {
1063
- const e = [], O = [], T = c.filter((u) => u.type !== "group"), i = T.filter((u) => u.type === B.START);
1064
- i.length === 0 ? e.push("工作流必须包含一个开始节点") : i.length > 1 && e.push("工作流只能包含一个开始节点"), T.filter((u) => u.type === B.END).length === 0 && e.push("工作流必须至少包含一个结束节点");
1065
- const h = T.filter((u) => u.type === B.DATA_SOURCE);
1066
- h.length === 0 && e.push("工作流必须至少包含一个数据源节点"), T.filter(
1063
+ const e = [], O = [], w = c.filter((u) => u.type !== "group"), i = w.filter((u) => u.type === B.START);
1064
+ i.length === 0 ? e.push("工作流必须包含一个开始节点") : i.length > 1 && e.push("工作流只能包含一个开始节点"), w.filter((u) => u.type === B.END).length === 0 && e.push("工作流必须至少包含一个结束节点");
1065
+ const h = w.filter((u) => u.type === B.DATA_SOURCE);
1066
+ h.length === 0 && e.push("工作流必须至少包含一个数据源节点"), w.filter(
1067
1067
  (u) => u.type === B.DETECTION_TARGET || u.type === B.SMALL_MODEL || u.type === B.CLASSIFICATION_MODEL
1068
1068
  ).length === 0 && e.push("工作流必须至少包含一个检测目标、内置小模型或分类模型");
1069
- const R = T.some((u) => u.type === B.SMALL_MODEL), $ = h.some((u) => u.data.arguments?.needCooperativeDetection === !0), S = h.length > 1;
1070
- ($ || S) && O.push("当前配置下,算法任务将不支持轮巡"), R && O.push("包含内置小模型的算法任务不支持轮巡"), T.forEach((u) => {
1069
+ const R = w.some((u) => u.type === B.SMALL_MODEL), $ = h.some((u) => u.data.arguments?.needCooperativeDetection === !0), S = h.length > 1;
1070
+ ($ || S) && O.push("当前配置下,算法任务将不支持轮巡"), R && O.push("包含内置小模型的算法任务不支持轮巡"), w.forEach((u) => {
1071
1071
  const f = n.filter((l) => l.target === u.id), m = n.filter((l) => l.source === u.id);
1072
1072
  if (u.type === B.START && f.length > 0 && O.push("开始节点不应有输入连接"), u.type === B.END && m.length > 0 && O.push("结束节点不应有输出连接"), u.type === B.START && m.length === 0 && e.push("开始节点必须有输出连接"), u.type === B.END && f.length === 0 && e.push("结束节点必须有输入连接"), u.type === B.DATA_SOURCE && u.data.enableImageSequence)
1073
1073
  if (m.length === 0)
@@ -1096,17 +1096,17 @@ const nn = () => {
1096
1096
  edgeId: u.id,
1097
1097
  message: `分支"${u.data?.branchName || "未命名"}"缺少必填项:后续检测帧的持续时间`
1098
1098
  }), x.add(u.source), x.add(u.target);
1099
- }), T.forEach((u) => {
1100
- u.parentNode || !x.has(u.id) && T.length > 1 && O.push(`节点 "${u.data.label}" 未连接到工作流`);
1099
+ }), w.forEach((u) => {
1100
+ u.parentNode || !x.has(u.id) && w.length > 1 && O.push(`节点 "${u.data.label}" 未连接到工作流`);
1101
1101
  });
1102
- const I = sn(T, n);
1102
+ const I = sn(w, n);
1103
1103
  e.push(...I);
1104
- const F = rn(T, n);
1104
+ const F = rn(w, n);
1105
1105
  e.push(...F);
1106
- const _ = un(T, n);
1106
+ const _ = un(w, n);
1107
1107
  e.push(..._);
1108
- const w = dn(T, n);
1109
- return e.push(...w), {
1108
+ const T = dn(w, n);
1109
+ return e.push(...T), {
1110
1110
  valid: e.length === 0,
1111
1111
  errors: e,
1112
1112
  warnings: O
@@ -1114,7 +1114,7 @@ const nn = () => {
1114
1114
  }, sn = (c, n) => {
1115
1115
  const e = [], O = c.find((g) => g.type === B.START);
1116
1116
  if (!O) return e;
1117
- const T = /* @__PURE__ */ new Set(), i = (g, h, A, R) => {
1117
+ const w = /* @__PURE__ */ new Set(), i = (g, h, A, R) => {
1118
1118
  if (h.includes(g)) return;
1119
1119
  const $ = c.find((_) => _.id === g);
1120
1120
  if (!$) return;
@@ -1122,7 +1122,7 @@ const nn = () => {
1122
1122
  let x = [...A], I = [...R];
1123
1123
  if ($.type === B.TARGET_COUNT && x.push($), $.type === B.TIMER_TARGET && I.push($), $.type === B.END) {
1124
1124
  const _ = S.join("->");
1125
- T.has(_) || (T.add(_), x.length > 1 && e.push(`工作流分支中存在多个目标计数节点(${x.map((w) => `"${w.data.label}"`).join("、")}),每条分支只允许一个目标计数节点`), I.length > 1 && e.push(`工作流分支中存在多个目标计时节点(${I.map((w) => `"${w.data.label}"`).join("、")}),每条分支只允许一个目标计时节点`));
1125
+ w.has(_) || (w.add(_), x.length > 1 && e.push(`工作流分支中存在多个目标计数节点(${x.map((T) => `"${T.data.label}"`).join("、")}),每条分支只允许一个目标计数节点`), I.length > 1 && e.push(`工作流分支中存在多个目标计时节点(${I.map((T) => `"${T.data.label}"`).join("、")}),每条分支只允许一个目标计时节点`));
1126
1126
  return;
1127
1127
  }
1128
1128
  const F = n.filter((_) => _.source === g);
@@ -1133,18 +1133,18 @@ const nn = () => {
1133
1133
  return i(O.id, [], [], []), e;
1134
1134
  }, rn = (c, n) => {
1135
1135
  const e = [];
1136
- return c.filter((T) => T.type === B.DATA_SOURCE).forEach((T) => {
1137
- const i = n.filter((g) => g.source === T.id);
1136
+ return c.filter((w) => w.type === B.DATA_SOURCE).forEach((w) => {
1137
+ const i = n.filter((g) => g.source === w.id);
1138
1138
  if (i.length > 1) {
1139
1139
  const g = i.map((R) => R.target), A = c.filter((R) => g.includes(R.id)).filter((R) => R.type === B.SMALL_MODEL);
1140
1140
  if (A.length > 0) {
1141
1141
  const R = A.map(($) => `"${$.data.label || $.data.modelName}"`).join("、");
1142
- e.push(`数据源节点"${T.data.label}"开启了多分支,不能包含小模型节点(${R})。小模型节点只能出现在单分支场景中(数据源只有一个直连下游节点)`);
1142
+ e.push(`数据源节点"${w.data.label}"开启了多分支,不能包含小模型节点(${R})。小模型节点只能出现在单分支场景中(数据源只有一个直连下游节点)`);
1143
1143
  }
1144
1144
  }
1145
1145
  }), e;
1146
1146
  }, un = (c, n) => {
1147
- const e = [], O = [B.TARGET_COUNT, B.TIMER_TARGET], T = {
1147
+ const e = [], O = [B.TARGET_COUNT, B.TIMER_TARGET], w = {
1148
1148
  [B.TARGET_COUNT]: "目标计数",
1149
1149
  [B.TIMER_TARGET]: "目标计时"
1150
1150
  };
@@ -1152,26 +1152,26 @@ const nn = () => {
1152
1152
  n.filter((A) => A.source === g.id).forEach((A) => {
1153
1153
  const R = c.find(($) => $.id === A.target);
1154
1154
  if (R && O.includes(R.type)) {
1155
- const $ = T[R.type] || R.type;
1155
+ const $ = w[R.type] || R.type;
1156
1156
  e.push(`小模型节点"${g.data.label || g.data.modelName}"不能直接连接${$}节点"${R.data.label}",请先连接检测目标节点`);
1157
1157
  }
1158
1158
  });
1159
1159
  }), e;
1160
1160
  }, dn = (c, n) => {
1161
- const e = [], O = [B.OCR, B.LICENSE_PLATE, B.FACE_RECOGNITION], T = {
1161
+ const e = [], O = [B.OCR, B.LICENSE_PLATE, B.FACE_RECOGNITION], w = {
1162
1162
  [B.OCR]: "OCR识别",
1163
1163
  [B.LICENSE_PLATE]: "车牌识别",
1164
1164
  [B.FACE_RECOGNITION]: "人脸识别"
1165
1165
  };
1166
1166
  return c.filter((g) => O.includes(g.type)).forEach((g) => {
1167
- const h = n.filter(($) => $.source === g.id), A = O.filter(($) => $ !== g.type).concat(B.END), R = g.data.label || T[g.type];
1167
+ const h = n.filter(($) => $.source === g.id), A = O.filter(($) => $ !== g.type).concat(B.END), R = g.data.label || w[g.type];
1168
1168
  h.forEach(($) => {
1169
1169
  const S = c.find((x) => x.id === $.target);
1170
1170
  S && !A.includes(S.type) && e.push(`${R}节点"${R}"只能连接除自身外的辅助节点或结束节点,当前连接到了"${S.data.label || S.type}"节点`);
1171
1171
  }), h.length === 0 && e.push(`${R}节点"${R}"必须连接到其他辅助节点或结束节点`);
1172
1172
  }), e;
1173
1173
  }, Et = () => {
1174
- const c = de(), n = Me("editorMode", Ve.ALGORITHM), e = Me("pageMode", Pe.CREATE), O = Q(() => kt(c.nodes, c.edges)), T = (t) => {
1174
+ const c = de(), n = Me("editorMode", Ve.ALGORITHM), e = Me("pageMode", Pe.CREATE), O = Q(() => kt(c.nodes, c.edges)), w = (t) => {
1175
1175
  const a = /* @__PURE__ */ new Map();
1176
1176
  return t.forEach((r) => a.set(r.id, r)), a;
1177
1177
  }, i = (t, a, r) => (t[a] || []).map((b) => r.get(b)).filter(Boolean), g = (t, a) => {
@@ -1219,7 +1219,7 @@ const nn = () => {
1219
1219
  return X ? {
1220
1220
  toolTitle: X.data.title || X.data.modelName || "",
1221
1221
  toolType: "small",
1222
- arguments: w(X.data.arguments, B.SMALL_MODEL)
1222
+ arguments: T(X.data.arguments, B.SMALL_MODEL)
1223
1223
  } : null;
1224
1224
  }
1225
1225
  const J = t.find((X) => X.type === B.DETECTION_TARGET);
@@ -1231,7 +1231,7 @@ const nn = () => {
1231
1231
  mode: 0,
1232
1232
  interval: 0
1233
1233
  },
1234
- arguments: w(J.data.arguments, B.DETECTION_TARGET)
1234
+ arguments: T(J.data.arguments, B.DETECTION_TARGET)
1235
1235
  } : null;
1236
1236
  }, S = () => {
1237
1237
  const t = c.nodes.find((b) => b.type === B.END);
@@ -1297,7 +1297,7 @@ const nn = () => {
1297
1297
  // 前端隐藏
1298
1298
  "target_class"
1299
1299
  // 前端用于标识检测目标类型,导出时不需要
1300
- ], w = (t, a) => {
1300
+ ], T = (t, a) => {
1301
1301
  if (!t) return {};
1302
1302
  const r = F[a];
1303
1303
  if (r) return r(t);
@@ -1313,7 +1313,7 @@ const nn = () => {
1313
1313
  toolTitle: m(t),
1314
1314
  nodeName: t.data.label || t.data.targetName || "",
1315
1315
  sortOrder: a,
1316
- arguments: w(t.data.arguments, t.type)
1316
+ arguments: T(t.data.arguments, t.type)
1317
1317
  };
1318
1318
  if (t.data.enableBranch && t.data.branchLogic && (z.branchLogic = t.data.branchLogic), r) {
1319
1319
  const J = b.find((X) => X.source === r && X.target === t.id);
@@ -1404,7 +1404,7 @@ const nn = () => {
1404
1404
  const t = O.value;
1405
1405
  return t.errors.length > 0 ? (ie.error(`验证失败: ${t.errors.join(", ")}`), !1) : (t.warnings.length > 0 && ie.warning(`警告: ${t.warnings.join(", ")}`), !0);
1406
1406
  }, H = () => {
1407
- const t = c.nodes, a = c.edges, r = T(t), b = g(t, a), z = h(b, r), J = [...r.values()].find((X) => X.type === B.START);
1407
+ const t = c.nodes, a = c.edges, r = w(t), b = g(t, a), z = h(b, r), J = [...r.values()].find((X) => X.type === B.START);
1408
1408
  return { allNodes: t, edges: a, nodeMap: r, adj: b, orderedNodes: z, startNode: J };
1409
1409
  }, j = (t) => {
1410
1410
  const a = {
@@ -1493,13 +1493,13 @@ const nn = () => {
1493
1493
  },
1494
1494
  emits: ["update:modelValue"],
1495
1495
  setup(c, { emit: n }) {
1496
- const e = c, O = n, T = de(), { createWorkflowRule: i } = Et(), g = le(!1), h = le(!1);
1496
+ const e = c, O = n, w = de(), { createWorkflowRule: i } = Et(), g = le(!1), h = le(!1);
1497
1497
  me(() => e.modelValue, (S) => {
1498
1498
  g.value = S;
1499
1499
  }), me(g, (S) => {
1500
1500
  O("update:modelValue", S);
1501
1501
  });
1502
- const A = Q(() => T.nodes.find((x) => x.type === "start")?.data?.algorithmName || ""), R = Q(() => T.nodes.find((x) => x.type === "start")?.data?.algorithmDescription || ""), $ = async () => {
1502
+ const A = Q(() => w.nodes.find((x) => x.type === "start")?.data?.algorithmName || ""), R = Q(() => w.nodes.find((x) => x.type === "start")?.data?.algorithmDescription || ""), $ = async () => {
1503
1503
  h.value = !0;
1504
1504
  try {
1505
1505
  await i(), ie.success("工作流规则创建成功"), g.value = !1;
@@ -1512,8 +1512,8 @@ const nn = () => {
1512
1512
  }
1513
1513
  };
1514
1514
  return (S, x) => {
1515
- const I = y("el-descriptions-item"), F = y("el-descriptions"), _ = y("el-button"), w = y("el-dialog");
1516
- return s(), G(w, {
1515
+ const I = y("el-descriptions-item"), F = y("el-descriptions"), _ = y("el-button"), T = y("el-dialog");
1516
+ return s(), G(T, {
1517
1517
  modelValue: g.value,
1518
1518
  "onUpdate:modelValue": x[1] || (x[1] = (u) => g.value = u),
1519
1519
  title: "确认创建工作流规则",
@@ -1583,16 +1583,16 @@ const nn = () => {
1583
1583
  },
1584
1584
  emits: ["update:modelValue"],
1585
1585
  setup(c, { emit: n }) {
1586
- const e = c, O = n, T = le(!1);
1586
+ const e = c, O = n, w = le(!1);
1587
1587
  return me(() => e.modelValue, (i) => {
1588
- T.value = i;
1589
- }), me(T, (i) => {
1588
+ w.value = i;
1589
+ }), me(w, (i) => {
1590
1590
  O("update:modelValue", i);
1591
1591
  }), (i, g) => {
1592
1592
  const h = y("el-alert"), A = y("el-dialog");
1593
1593
  return s(), G(A, {
1594
- modelValue: T.value,
1595
- "onUpdate:modelValue": g[0] || (g[0] = (R) => T.value = R),
1594
+ modelValue: w.value,
1595
+ "onUpdate:modelValue": g[0] || (g[0] = (R) => w.value = R),
1596
1596
  title: "工作流JSON预览",
1597
1597
  width: "60%",
1598
1598
  "close-on-click-modal": !1
@@ -1634,7 +1634,7 @@ const nn = () => {
1634
1634
  }, 8, ["modelValue"]);
1635
1635
  };
1636
1636
  }
1637
- }, _n = /* @__PURE__ */ re(yn, [["__scopeId", "data-v-2a04a031"]]), st = 10, hn = Tt("draft", () => {
1637
+ }, _n = /* @__PURE__ */ re(yn, [["__scopeId", "data-v-e9bb0396"]]), st = 10, hn = wt("draft", () => {
1638
1638
  const c = le([]);
1639
1639
  return {
1640
1640
  drafts: c,
@@ -1673,14 +1673,14 @@ const nn = () => {
1673
1673
  }, Cn = { class: "draft-list" }, Sn = {
1674
1674
  key: 0,
1675
1675
  class: "draft-empty"
1676
- }, Tn = { class: "draft-info" }, wn = { class: "draft-name" }, Nn = { class: "draft-time" }, kn = { class: "draft-actions" }, En = {
1676
+ }, wn = { class: "draft-info" }, Tn = { class: "draft-name" }, Nn = { class: "draft-time" }, kn = { class: "draft-actions" }, En = {
1677
1677
  __name: "DraftDrawer",
1678
1678
  props: {
1679
1679
  modelValue: { type: Boolean, default: !1 }
1680
1680
  },
1681
1681
  emits: ["update:modelValue"],
1682
1682
  setup(c, { emit: n }) {
1683
- const e = c, O = n, T = Q({
1683
+ const e = c, O = n, w = Q({
1684
1684
  get: () => e.modelValue,
1685
1685
  set: (x) => O("update:modelValue", x)
1686
1686
  }), i = hn(), g = de(), h = le(""), A = () => {
@@ -1694,7 +1694,7 @@ const nn = () => {
1694
1694
  { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }
1695
1695
  ).then(() => {
1696
1696
  const I = i.getDraft(x.id);
1697
- I && (g.loadWorkflow(I.nodes, I.edges), T.value = !1);
1697
+ I && (g.loadWorkflow(I.nodes, I.edges), w.value = !1);
1698
1698
  }).catch(() => {
1699
1699
  });
1700
1700
  }, $ = (x) => {
@@ -1711,10 +1711,10 @@ const nn = () => {
1711
1711
  return `${I.getFullYear()}-${F(I.getMonth() + 1)}-${F(I.getDate())} ${F(I.getHours())}:${F(I.getMinutes())}`;
1712
1712
  };
1713
1713
  return (x, I) => {
1714
- const F = y("el-input"), _ = y("el-button"), w = y("el-drawer");
1715
- return s(), G(w, {
1716
- modelValue: T.value,
1717
- "onUpdate:modelValue": I[1] || (I[1] = (u) => T.value = u),
1714
+ const F = y("el-input"), _ = y("el-button"), T = y("el-drawer");
1715
+ return s(), G(T, {
1716
+ modelValue: w.value,
1717
+ "onUpdate:modelValue": I[1] || (I[1] = (u) => w.value = u),
1718
1718
  title: "草稿箱",
1719
1719
  direction: "rtl",
1720
1720
  size: "400px"
@@ -1748,8 +1748,8 @@ const nn = () => {
1748
1748
  key: u.id,
1749
1749
  class: "draft-item"
1750
1750
  }, [
1751
- C("div", Tn, [
1752
- C("span", wn, Z(u.name), 1),
1751
+ C("div", wn, [
1752
+ C("span", Tn, Z(u.name), 1),
1753
1753
  C("span", Nn, Z(S(u.createdAt)), 1)
1754
1754
  ]),
1755
1755
  C("div", kn, [
@@ -1785,8 +1785,8 @@ const nn = () => {
1785
1785
  }
1786
1786
  }, An = /* @__PURE__ */ re(En, [["__scopeId", "data-v-c812f47e"]]);
1787
1787
  function On() {
1788
- const c = de(), n = (T) => {
1789
- const { type: i, data: g } = T, h = g.arguments || {}, A = [];
1788
+ const c = de(), n = (w) => {
1789
+ const { type: i, data: g } = w, h = g.arguments || {}, A = [];
1790
1790
  switch (i) {
1791
1791
  case B.START:
1792
1792
  g.algorithmName?.trim() || A.push("算法名称");
@@ -1808,37 +1808,37 @@ function On() {
1808
1808
  break;
1809
1809
  }
1810
1810
  return A;
1811
- }, e = (T) => {
1812
- const i = c.nodes.find((h) => h.id === T.source);
1811
+ }, e = (w) => {
1812
+ const i = c.nodes.find((h) => h.id === w.source);
1813
1813
  if (!i) return [];
1814
1814
  const g = [];
1815
- return i.type === B.DATA_SOURCE && i.data?.enableImageSequence === !0 && T.sourceHandle !== "first-frame" && (!T.data?.timeWindowSeconds || T.data.timeWindowSeconds < 1) && g.push("后续检测帧的持续时间"), g;
1815
+ return i.type === B.DATA_SOURCE && i.data?.enableImageSequence === !0 && w.sourceHandle !== "first-frame" && (!w.data?.timeWindowSeconds || w.data.timeWindowSeconds < 1) && g.push("后续检测帧的持续时间"), g;
1816
1816
  };
1817
1817
  return { runValidation: () => {
1818
- const { nodes: T, edges: i } = c;
1818
+ const { nodes: w, edges: i } = c;
1819
1819
  c.clearInvalidIds();
1820
- const g = kt(T, i), h = g.errors, A = [], R = [], $ = [];
1821
- T.filter((w) => w.type !== "group").forEach((w) => {
1822
- const u = n(w);
1823
- u.length > 0 && (A.push(w.id), $.push(`节点"${w.data.label}"缺少必填参数:${u.join("、")}`));
1824
- }), i.forEach((w) => {
1825
- const u = e(w);
1826
- u.length > 0 && (R.push(w.id), $.push(`分支"${w.data?.branchName || "未命名"}"缺少:${u.join("、")}`));
1827
- }), h.forEach((w) => {
1828
- typeof w == "object" && (w.nodeId && A.push(w.nodeId), w.edgeId && R.push(w.edgeId));
1820
+ const g = kt(w, i), h = g.errors, A = [], R = [], $ = [];
1821
+ w.filter((T) => T.type !== "group").forEach((T) => {
1822
+ const u = n(T);
1823
+ u.length > 0 && (A.push(T.id), $.push(`节点"${T.data.label}"缺少必填参数:${u.join("、")}`));
1824
+ }), i.forEach((T) => {
1825
+ const u = e(T);
1826
+ u.length > 0 && (R.push(T.id), $.push(`分支"${T.data?.branchName || "未命名"}"缺少:${u.join("、")}`));
1827
+ }), h.forEach((T) => {
1828
+ typeof T == "object" && (T.nodeId && A.push(T.nodeId), T.edgeId && R.push(T.edgeId));
1829
1829
  }), (A.length > 0 || R.length > 0) && (c.setInvalidIds(A, R), setTimeout(() => {
1830
1830
  c.clearInvalidIds();
1831
1831
  }, 5e3));
1832
- const x = h.map((w) => typeof w == "object" ? w.message : w), I = g.warnings.map((w) => typeof w == "object" ? w.message : w), F = [
1833
- ...x.map((w) => ({ msg: w, type: "error" })),
1834
- ...$.map((w) => ({ msg: w, type: "warning" })),
1835
- ...I.map((w) => ({ msg: w, type: "warning" }))
1832
+ const x = h.map((T) => typeof T == "object" ? T.message : T), I = g.warnings.map((T) => typeof T == "object" ? T.message : T), F = [
1833
+ ...x.map((T) => ({ msg: T, type: "error" })),
1834
+ ...$.map((T) => ({ msg: T, type: "warning" })),
1835
+ ...I.map((T) => ({ msg: T, type: "warning" }))
1836
1836
  ], _ = x.length === 0 && $.length === 0;
1837
1837
  if (_ && I.length === 0)
1838
1838
  ie.success("校验通过,所有节点和分支参数配置正确");
1839
1839
  else if (F.length > 0) {
1840
- const w = F[0];
1841
- ie[w.type](w.msg);
1840
+ const T = F[0];
1841
+ ie[T.type](T.msg);
1842
1842
  }
1843
1843
  return _;
1844
1844
  } };
@@ -1849,7 +1849,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
1849
1849
  const n = de(), {
1850
1850
  validation: e,
1851
1851
  exportToJSON: O,
1852
- copyToClipboard: T,
1852
+ copyToClipboard: w,
1853
1853
  downloadJSON: i
1854
1854
  } = Et(), { runValidation: g } = On(), h = le(!1), A = le(""), R = le(!1), $ = le(!1), S = le(!1), x = () => {
1855
1855
  ye.confirm(
@@ -1882,8 +1882,8 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
1882
1882
  A.value = JSON.stringify(m, null, 2), h.value = !0;
1883
1883
  }
1884
1884
  }, _ = () => {
1885
- T();
1886
- }, w = () => {
1885
+ w();
1886
+ }, T = () => {
1887
1887
  i();
1888
1888
  }, u = () => {
1889
1889
  O() && ($.value = !0);
@@ -1949,7 +1949,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
1949
1949
  o(l, {
1950
1950
  type: "warning",
1951
1951
  icon: q(yt),
1952
- onClick: w
1952
+ onClick: T
1953
1953
  }, {
1954
1954
  default: d(() => [...m[11] || (m[11] = [
1955
1955
  te(" 导出JSON ", -1)
@@ -1999,13 +1999,13 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
1999
1999
  ], 64);
2000
2000
  };
2001
2001
  }
2002
- }, $n = /* @__PURE__ */ re(In, [["__scopeId", "data-v-4fe98d50"]]), Rn = { key: 0 }, Mn = { class: "node-list" }, Fn = { class: "node-list" }, qn = { class: "node-list" }, Bn = { class: "node-list" }, Vn = {
2002
+ }, $n = /* @__PURE__ */ re(In, [["__scopeId", "data-v-29757c1e"]]), Rn = { key: 0 }, Mn = { class: "node-list" }, Fn = { class: "node-list" }, qn = { class: "node-list" }, Bn = { class: "node-list" }, Vn = {
2003
2003
  __name: "NodeToolbox",
2004
2004
  setup(c) {
2005
- const n = le(!0), e = le(["basic", "data", "calculation", "algorithm"]), O = (T, i) => {
2006
- T.dataTransfer && (T.dataTransfer.setData("application/vueflow", i), T.dataTransfer.effectAllowed = "move");
2005
+ const n = le(!0), e = le(["basic", "data", "calculation", "algorithm"]), O = (w, i) => {
2006
+ w.dataTransfer && (w.dataTransfer.setData("application/vueflow", i), w.dataTransfer.effectAllowed = "move");
2007
2007
  };
2008
- return (T, i) => {
2008
+ return (w, i) => {
2009
2009
  const g = y("el-icon"), h = y("VideoPlay"), A = y("CircleClose"), R = y("el-collapse-item"), $ = y("FolderOpened"), S = y("Cpu"), x = y("View"), I = y("el-collapse");
2010
2010
  return s(), U("div", {
2011
2011
  class: be(["node-toolbox", { collapsed: !n.value }])
@@ -2230,7 +2230,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2230
2230
  ], 2);
2231
2231
  };
2232
2232
  }
2233
- }, Pn = /* @__PURE__ */ re(Vn, [["__scopeId", "data-v-d85c2cfd"]]), Gn = { class: "node-content" }, Un = { class: "node-label" }, jn = {
2233
+ }, Pn = /* @__PURE__ */ re(Vn, [["__scopeId", "data-v-fac9714d"]]), Gn = { class: "node-content" }, Un = { class: "node-label" }, jn = {
2234
2234
  __name: "StartNode",
2235
2235
  props: {
2236
2236
  data: {
@@ -2244,7 +2244,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2244
2244
  },
2245
2245
  setup(c) {
2246
2246
  return (n, e) => {
2247
- const O = y("VideoPlay"), T = y("el-icon");
2247
+ const O = y("VideoPlay"), w = y("el-icon");
2248
2248
  return s(), U("div", {
2249
2249
  class: be(["start-node", { selected: c.selected }])
2250
2250
  }, [
@@ -2253,7 +2253,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2253
2253
  position: q(ge).Right
2254
2254
  }, null, 8, ["position"]),
2255
2255
  C("div", Gn, [
2256
- o(T, { class: "node-icon" }, {
2256
+ o(w, { class: "node-icon" }, {
2257
2257
  default: d(() => [
2258
2258
  o(O)
2259
2259
  ]),
@@ -2264,7 +2264,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2264
2264
  ], 2);
2265
2265
  };
2266
2266
  }
2267
- }, zn = /* @__PURE__ */ re(jn, [["__scopeId", "data-v-0677a092"]]), Hn = { class: "node-content" }, Wn = { class: "node-label" }, Jn = {
2267
+ }, zn = /* @__PURE__ */ re(jn, [["__scopeId", "data-v-9bc41abb"]]), Hn = { class: "node-content" }, Wn = { class: "node-label" }, Jn = {
2268
2268
  __name: "EndNode",
2269
2269
  props: {
2270
2270
  data: {
@@ -2278,7 +2278,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2278
2278
  },
2279
2279
  setup(c) {
2280
2280
  return (n, e) => {
2281
- const O = y("CircleClose"), T = y("el-icon");
2281
+ const O = y("CircleClose"), w = y("el-icon");
2282
2282
  return s(), U("div", {
2283
2283
  class: be(["end-node", { selected: c.selected }])
2284
2284
  }, [
@@ -2287,7 +2287,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2287
2287
  position: q(ge).Left
2288
2288
  }, null, 8, ["position"]),
2289
2289
  C("div", Hn, [
2290
- o(T, { class: "node-icon" }, {
2290
+ o(w, { class: "node-icon" }, {
2291
2291
  default: d(() => [
2292
2292
  o(O)
2293
2293
  ]),
@@ -2298,7 +2298,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2298
2298
  ], 2);
2299
2299
  };
2300
2300
  }
2301
- }, Yn = /* @__PURE__ */ re(Jn, [["__scopeId", "data-v-505a54fa"]]), Xn = { class: "node-content" }, Kn = { class: "node-info" }, Qn = { class: "node-label" }, Zn = {
2301
+ }, Yn = /* @__PURE__ */ re(Jn, [["__scopeId", "data-v-2a723d0b"]]), Xn = { class: "node-content" }, Kn = { class: "node-info" }, Qn = { class: "node-label" }, Zn = {
2302
2302
  key: 1,
2303
2303
  class: "sequence-handles"
2304
2304
  }, ea = { class: "handle-item" }, ta = { class: "handle-label" }, na = { class: "handle-item add-button-item" }, aa = {
@@ -2321,7 +2321,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2321
2321
  const n = c, e = de(), O = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (A) => {
2322
2322
  const R = Math.random() * 16 | 0;
2323
2323
  return (A === "x" ? R : R & 3 | 8).toString(16);
2324
- }), T = Q(() => !n.data.subsequentFrames && n.data.enableImageSequence ? [{
2324
+ }), w = Q(() => !n.data.subsequentFrames && n.data.enableImageSequence ? [{
2325
2325
  id: "default-subsequent",
2326
2326
  label: "后续帧检测",
2327
2327
  handleId: "subsequent-frame"
@@ -2393,7 +2393,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2393
2393
  class: "handle-right"
2394
2394
  }, null, 8, ["position"])
2395
2395
  ]),
2396
- (s(!0), U(ae, null, oe(T.value, (I) => (s(), U("div", {
2396
+ (s(!0), U(ae, null, oe(w.value, (I) => (s(), U("div", {
2397
2397
  key: I.id,
2398
2398
  class: "handle-item"
2399
2399
  }, [
@@ -2428,7 +2428,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2428
2428
  ], 2);
2429
2429
  };
2430
2430
  }
2431
- }, oa = /* @__PURE__ */ re(aa, [["__scopeId", "data-v-17ba882f"]]), la = { class: "node-content" }, sa = { class: "node-info" }, ra = { class: "node-label" }, ia = {
2431
+ }, oa = /* @__PURE__ */ re(aa, [["__scopeId", "data-v-1d939740"]]), la = { class: "node-content" }, sa = { class: "node-info" }, ra = { class: "node-label" }, ia = {
2432
2432
  key: 0,
2433
2433
  class: "node-model"
2434
2434
  }, ua = {
@@ -2451,7 +2451,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2451
2451
  },
2452
2452
  setup(c) {
2453
2453
  return (n, e) => {
2454
- const O = y("Cpu"), T = y("el-icon");
2454
+ const O = y("Cpu"), w = y("el-icon");
2455
2455
  return s(), U("div", {
2456
2456
  class: be(["small-model-node", { selected: c.selected }])
2457
2457
  }, [
@@ -2460,7 +2460,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2460
2460
  position: q(ge).Left
2461
2461
  }, null, 8, ["position"]),
2462
2462
  C("div", la, [
2463
- o(T, { class: "node-icon" }, {
2463
+ o(w, { class: "node-icon" }, {
2464
2464
  default: d(() => [
2465
2465
  o(O)
2466
2466
  ]),
@@ -2472,7 +2472,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2472
2472
  ])
2473
2473
  ]),
2474
2474
  c.data.supportDirectAlert ? (s(), U("div", da, [
2475
- o(T, null, {
2475
+ o(w, null, {
2476
2476
  default: d(() => [
2477
2477
  o(q(xt))
2478
2478
  ]),
@@ -2486,7 +2486,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2486
2486
  ], 2);
2487
2487
  };
2488
2488
  }
2489
- }, ma = /* @__PURE__ */ re(ca, [["__scopeId", "data-v-b95de270"]]), pa = { class: "node-content" }, ga = { class: "node-info" }, fa = { class: "node-target" }, va = { class: "node-params" }, ya = {
2489
+ }, ma = /* @__PURE__ */ re(ca, [["__scopeId", "data-v-e278c903"]]), pa = { class: "node-content" }, ga = { class: "node-info" }, fa = { class: "node-target" }, va = { class: "node-params" }, ya = {
2490
2490
  __name: "DetectionTargetNode",
2491
2491
  props: {
2492
2492
  data: {
@@ -2499,7 +2499,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2499
2499
  }
2500
2500
  },
2501
2501
  setup(c) {
2502
- const n = c, e = () => n.data.targetName || n.data.label || "检测目标", O = Q(() => n.data.targetId === "other" ? !1 : n.data.arguments?.threshold !== void 0 && typeof n.data.arguments.threshold == "number"), T = Q(() => {
2502
+ const n = c, e = () => n.data.targetName || n.data.label || "检测目标", O = Q(() => n.data.targetId === "other" ? !1 : n.data.arguments?.threshold !== void 0 && typeof n.data.arguments.threshold == "number"), w = Q(() => {
2503
2503
  if (n.data.targetId === "other" && n.data.arguments?.object) {
2504
2504
  const i = n.data.arguments.object;
2505
2505
  if (Array.isArray(i))
@@ -2527,13 +2527,13 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2527
2527
  g[1] || (g[1] = C("div", { class: "node-label" }, "检测目标", -1)),
2528
2528
  C("div", fa, Z(e()), 1),
2529
2529
  C("div", va, [
2530
- T.value ? (s(), G(R, {
2530
+ w.value ? (s(), G(R, {
2531
2531
  key: 0,
2532
2532
  size: "small",
2533
2533
  type: "info"
2534
2534
  }, {
2535
2535
  default: d(() => [
2536
- te(Z(T.value) + "个目标 ", 1)
2536
+ te(Z(w.value) + "个目标 ", 1)
2537
2537
  ]),
2538
2538
  _: 1
2539
2539
  })) : K("", !0),
@@ -2577,16 +2577,16 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2577
2577
  ], 2);
2578
2578
  };
2579
2579
  }
2580
- }, _a = /* @__PURE__ */ re(ya, [["__scopeId", "data-v-2ea74416"]]), ha = { class: "node-content" }, ba = { class: "node-info" }, xa = { class: "node-label" }, Ca = {
2580
+ }, _a = /* @__PURE__ */ re(ya, [["__scopeId", "data-v-9a7ce2ec"]]), ha = { class: "node-content" }, ba = { class: "node-info" }, xa = { class: "node-label" }, Ca = {
2581
2581
  key: 0,
2582
2582
  class: "node-model"
2583
2583
  }, Sa = {
2584
2584
  key: 1,
2585
2585
  class: "node-placeholder"
2586
- }, Ta = {
2586
+ }, wa = {
2587
2587
  key: 2,
2588
2588
  class: "node-stats"
2589
- }, wa = {
2589
+ }, Ta = {
2590
2590
  __name: "ClassificationModelNode",
2591
2591
  props: {
2592
2592
  data: {
@@ -2600,7 +2600,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2600
2600
  },
2601
2601
  setup(c) {
2602
2602
  return (n, e) => {
2603
- const O = y("Grid"), T = y("el-icon"), i = y("el-tag");
2603
+ const O = y("Grid"), w = y("el-icon"), i = y("el-tag");
2604
2604
  return s(), U("div", {
2605
2605
  class: be(["classification-model-node", { selected: c.selected }])
2606
2606
  }, [
@@ -2609,7 +2609,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2609
2609
  position: q(ge).Left
2610
2610
  }, null, 8, ["position"]),
2611
2611
  C("div", ha, [
2612
- o(T, { class: "node-icon" }, {
2612
+ o(w, { class: "node-icon" }, {
2613
2613
  default: d(() => [
2614
2614
  o(O)
2615
2615
  ]),
@@ -2618,7 +2618,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2618
2618
  C("div", ba, [
2619
2619
  C("div", xa, Z(c.data.label), 1),
2620
2620
  c.data.arguments?.modelName ? (s(), U("div", Ca, Z(c.data.arguments.modelName), 1)) : (s(), U("div", Sa, "未选择模型")),
2621
- c.data.arguments?.modelName ? (s(), U("div", Ta, [
2621
+ c.data.arguments?.modelName ? (s(), U("div", wa, [
2622
2622
  c.data.arguments?.threshold !== void 0 ? (s(), G(i, {
2623
2623
  key: 0,
2624
2624
  size: "small",
@@ -2659,7 +2659,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2659
2659
  ], 2);
2660
2660
  };
2661
2661
  }
2662
- }, Na = /* @__PURE__ */ re(wa, [["__scopeId", "data-v-5835c18a"]]), ka = { class: "node-content" }, Ea = { class: "node-info" }, Aa = { class: "node-label" }, Oa = { class: "node-scope" }, La = { class: "node-params" }, Da = {
2662
+ }, Na = /* @__PURE__ */ re(Ta, [["__scopeId", "data-v-0af49326"]]), ka = { class: "node-content" }, Ea = { class: "node-info" }, Aa = { class: "node-label" }, Oa = { class: "node-scope" }, La = { class: "node-params" }, Da = {
2663
2663
  __name: "OCRNode",
2664
2664
  props: {
2665
2665
  data: {
@@ -2678,7 +2678,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2678
2678
  return "原图";
2679
2679
  const g = e.nodes.find((h) => h.id === i);
2680
2680
  return g && g.type === "detectionTarget" ? g.data.label || "检测目标" : i;
2681
- }, T = () => ({
2681
+ }, w = () => ({
2682
2682
  auto: "自动",
2683
2683
  zh: "中文",
2684
2684
  en: "英文",
@@ -2729,7 +2729,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2729
2729
  type: "info"
2730
2730
  }, {
2731
2731
  default: d(() => [
2732
- te(Z(T()), 1)
2732
+ te(Z(w()), 1)
2733
2733
  ]),
2734
2734
  _: 1
2735
2735
  })
@@ -2743,7 +2743,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2743
2743
  ], 2);
2744
2744
  };
2745
2745
  }
2746
- }, Ia = /* @__PURE__ */ re(Da, [["__scopeId", "data-v-24c085ff"]]), $a = { class: "node-content" }, Ra = { class: "node-info" }, Ma = { class: "node-label" }, Fa = { class: "node-scope" }, qa = { class: "node-params" }, Ba = {
2746
+ }, Ia = /* @__PURE__ */ re(Da, [["__scopeId", "data-v-0d7e26a8"]]), $a = { class: "node-content" }, Ra = { class: "node-info" }, Ma = { class: "node-label" }, Fa = { class: "node-scope" }, qa = { class: "node-params" }, Ba = {
2747
2747
  __name: "LicensePlateNode",
2748
2748
  props: {
2749
2749
  data: {
@@ -2757,12 +2757,12 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2757
2757
  },
2758
2758
  setup(c) {
2759
2759
  const n = c, e = de(), O = () => {
2760
- const T = n.data.arguments?.detectionScope;
2761
- if (!T) return "";
2762
- const i = e.nodes.find((g) => g.id === T);
2760
+ const w = n.data.arguments?.detectionScope;
2761
+ if (!w) return "";
2762
+ const i = e.nodes.find((g) => g.id === w);
2763
2763
  return i ? i.data.label : "检测范围";
2764
2764
  };
2765
- return (T, i) => {
2765
+ return (w, i) => {
2766
2766
  const g = y("Document"), h = y("el-icon"), A = y("el-tag");
2767
2767
  return s(), U("div", {
2768
2768
  class: be(["license-plate-node", { selected: c.selected }])
@@ -2812,7 +2812,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2812
2812
  ], 2);
2813
2813
  };
2814
2814
  }
2815
- }, Va = /* @__PURE__ */ re(Ba, [["__scopeId", "data-v-28986d7c"]]), Pa = { class: "node-content" }, Ga = { class: "node-info" }, Ua = { class: "node-params" }, ja = {
2815
+ }, Va = /* @__PURE__ */ re(Ba, [["__scopeId", "data-v-6d767970"]]), Pa = { class: "node-content" }, Ga = { class: "node-info" }, Ua = { class: "node-params" }, ja = {
2816
2816
  __name: "TargetCountNode",
2817
2817
  props: {
2818
2818
  data: {
@@ -2833,16 +2833,16 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2833
2833
  ">=": "≥",
2834
2834
  "<=": "≤"
2835
2835
  }, O = Q(() => {
2836
- const T = n.data.arguments?.alertConditions || [];
2837
- if (T.length === 0) return "";
2838
- if (T.length === 1) {
2839
- const g = T[0];
2836
+ const w = n.data.arguments?.alertConditions || [];
2837
+ if (w.length === 0) return "";
2838
+ if (w.length === 1) {
2839
+ const g = w[0];
2840
2840
  return `数量 ${e[g.operator] || g.operator} ${g.value}`;
2841
2841
  }
2842
2842
  const i = n.data.arguments?.conditionRelation || "OR";
2843
- return `${T.length} 个条件(${i})`;
2843
+ return `${w.length} 个条件(${i})`;
2844
2844
  });
2845
- return (T, i) => {
2845
+ return (w, i) => {
2846
2846
  const g = y("el-icon"), h = y("el-tag");
2847
2847
  return s(), U("div", {
2848
2848
  class: be(["target-count-node", { selected: c.selected }])
@@ -2881,7 +2881,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2881
2881
  ], 2);
2882
2882
  };
2883
2883
  }
2884
- }, za = /* @__PURE__ */ re(ja, [["__scopeId", "data-v-81ea4df9"]]), Ha = { class: "node-content" }, Wa = { class: "node-info" }, Ja = { class: "node-label" }, Ya = { class: "node-params" }, Xa = {
2884
+ }, za = /* @__PURE__ */ re(ja, [["__scopeId", "data-v-18949ab9"]]), Ha = { class: "node-content" }, Wa = { class: "node-info" }, Ja = { class: "node-label" }, Ya = { class: "node-params" }, Xa = {
2885
2885
  __name: "TimerTargetNode",
2886
2886
  props: {
2887
2887
  data: {
@@ -2894,7 +2894,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2894
2894
  }
2895
2895
  },
2896
2896
  setup(c) {
2897
- const n = c, e = Q(() => n.data.description || "目标计时"), O = Q(() => `${n.data.arguments?.duration || 30}秒`), T = Q(() => {
2897
+ const n = c, e = Q(() => n.data.description || "目标计时"), O = Q(() => `${n.data.arguments?.duration || 30}秒`), w = Q(() => {
2898
2898
  const i = n.data.arguments?.condition_type;
2899
2899
  return i === "similarity" ? `相似度 ${n.data.arguments?.similarity_threshold || 90}%` : i === "hit_rate" ? `命中率 ${n.data.arguments?.hit_rate_threshold || 80}%` : "";
2900
2900
  });
@@ -2926,13 +2926,13 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2926
2926
  ]),
2927
2927
  _: 1
2928
2928
  }),
2929
- T.value ? (s(), G(A, {
2929
+ w.value ? (s(), G(A, {
2930
2930
  key: 0,
2931
2931
  size: "small",
2932
2932
  type: "info"
2933
2933
  }, {
2934
2934
  default: d(() => [
2935
- te(Z(T.value), 1)
2935
+ te(Z(w.value), 1)
2936
2936
  ]),
2937
2937
  _: 1
2938
2938
  })) : K("", !0)
@@ -2946,14 +2946,14 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2946
2946
  ], 2);
2947
2947
  };
2948
2948
  }
2949
- }, Ka = /* @__PURE__ */ re(Xa, [["__scopeId", "data-v-10379815"]]), Qa = { class: "group-label" }, Za = {
2949
+ }, Ka = /* @__PURE__ */ re(Xa, [["__scopeId", "data-v-44ea79f7"]]), Qa = { class: "group-label" }, Za = {
2950
2950
  __name: "GroupNode",
2951
2951
  props: {
2952
2952
  data: { type: Object, required: !0 },
2953
2953
  selected: { type: Boolean, default: !1 }
2954
2954
  },
2955
2955
  setup(c) {
2956
- const n = c, e = { and: "ALL", or: "SOME" }, O = Q(() => e[n.data.branchLogic] ?? "ALL"), T = Q(() => n.data.branchLogic === "or" ? "warning" : "primary"), i = { width: "8px", height: "8px", borderRadius: "2px" }, g = { borderColor: "var(--color-brand-primary)", borderStyle: "dashed" };
2956
+ const n = c, e = { and: "ALL", or: "SOME" }, O = Q(() => e[n.data.branchLogic] ?? "ALL"), w = Q(() => n.data.branchLogic === "or" ? "warning" : "primary"), i = { width: "8px", height: "8px", borderRadius: "2px" }, g = { borderColor: "var(--aiflow-color-brand-primary)", borderStyle: "dashed" };
2957
2957
  return (h, A) => {
2958
2958
  const R = y("el-tag");
2959
2959
  return s(), U("div", {
@@ -2969,7 +2969,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2969
2969
  }, null, 8, ["position"]),
2970
2970
  C("div", Qa, [
2971
2971
  o(R, {
2972
- type: T.value,
2972
+ type: w.value,
2973
2973
  size: "small",
2974
2974
  effect: "dark"
2975
2975
  }, {
@@ -2989,7 +2989,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
2989
2989
  ], 2);
2990
2990
  };
2991
2991
  }
2992
- }, eo = /* @__PURE__ */ re(Za, [["__scopeId", "data-v-3b68005c"]]), to = { class: "node-content" }, no = { class: "node-info" }, ao = { class: "node-label" }, oo = { class: "node-scope" }, lo = { class: "node-params" }, so = {
2992
+ }, eo = /* @__PURE__ */ re(Za, [["__scopeId", "data-v-adf6607d"]]), to = { class: "node-content" }, no = { class: "node-info" }, ao = { class: "node-label" }, oo = { class: "node-scope" }, lo = { class: "node-params" }, so = {
2993
2993
  __name: "FaceRecognitionNode",
2994
2994
  props: {
2995
2995
  data: {
@@ -3003,12 +3003,12 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3003
3003
  },
3004
3004
  setup(c) {
3005
3005
  const n = c, e = de(), O = () => {
3006
- const T = n.data.arguments?.detectionScope;
3007
- if (!T) return "";
3008
- const i = e.nodes.find((g) => g.id === T);
3006
+ const w = n.data.arguments?.detectionScope;
3007
+ if (!w) return "";
3008
+ const i = e.nodes.find((g) => g.id === w);
3009
3009
  return i ? i.data.label : "检测范围";
3010
3010
  };
3011
- return (T, i) => {
3011
+ return (w, i) => {
3012
3012
  const g = y("el-icon"), h = y("el-tag");
3013
3013
  return s(), U("div", {
3014
3014
  class: be(["face-recognition-node", { selected: c.selected }])
@@ -3058,7 +3058,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3058
3058
  ], 2);
3059
3059
  };
3060
3060
  }
3061
- }, ro = /* @__PURE__ */ re(so, [["__scopeId", "data-v-3b35cb9b"]]), io = { class: "quick-add-menu__list" }, uo = ["onClick"], co = { class: "quick-add-menu__icon" }, mo = { class: "quick-add-menu__label" }, po = {
3061
+ }, ro = /* @__PURE__ */ re(so, [["__scopeId", "data-v-cedaa1a2"]]), io = { class: "quick-add-menu__list" }, uo = ["onClick"], co = { class: "quick-add-menu__icon" }, mo = { class: "quick-add-menu__label" }, po = {
3062
3062
  key: 0,
3063
3063
  class: "quick-add-menu__empty"
3064
3064
  }, Ae = 8, go = {
@@ -3080,7 +3080,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3080
3080
  S + A.width > R - Ae && (S = R - A.width - Ae), x + A.height > $ - Ae && (x = $ - A.height - Ae), S < Ae && (S = Ae), x < Ae && (x = Ae), O.value = { x: S, y: x };
3081
3081
  }
3082
3082
  );
3083
- const T = Q(() => ({
3083
+ const w = Q(() => ({
3084
3084
  left: O.value.x + "px",
3085
3085
  top: O.value.y + "px"
3086
3086
  })), i = [
@@ -3125,7 +3125,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3125
3125
  ref_key: "menuRef",
3126
3126
  ref: e,
3127
3127
  class: "quick-add-menu",
3128
- style: It(T.value)
3128
+ style: It(w.value)
3129
3129
  }, [
3130
3130
  A[1] || (A[1] = C("div", { class: "quick-add-menu__header" }, "添加节点", -1)),
3131
3131
  C("ul", io, [
@@ -3147,10 +3147,10 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3147
3147
  })) : K("", !0)
3148
3148
  ]));
3149
3149
  }
3150
- }, fo = /* @__PURE__ */ re(go, [["__scopeId", "data-v-57f25906"]]), vo = { class: "workflow-canvas" }, rt = 5, yo = {
3150
+ }, fo = /* @__PURE__ */ re(go, [["__scopeId", "data-v-05a5ee6d"]]), vo = { class: "workflow-canvas" }, rt = 5, yo = {
3151
3151
  __name: "WorkflowCanvas",
3152
3152
  setup(c) {
3153
- const n = de(), { screenToFlowCoordinate: e, findNode: O, onConnectStart: T, onConnectEnd: i } = Vt(), g = $t({
3153
+ const n = de(), { screenToFlowCoordinate: e, findNode: O, onConnectStart: w, onConnectEnd: i } = Vt(), g = $t({
3154
3154
  visible: !1,
3155
3155
  screenPos: { x: 0, y: 0 },
3156
3156
  sourceNodeId: null,
@@ -3165,7 +3165,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3165
3165
  const x = () => {
3166
3166
  $ && (document.removeEventListener("mousemove", $), $ = null), S && (document.removeEventListener("mouseup", S), S = null);
3167
3167
  };
3168
- T(({ nodeId: V, handleId: M, handleType: t, event: a }) => {
3168
+ w(({ nodeId: V, handleId: M, handleType: t, event: a }) => {
3169
3169
  if (t !== "source") return;
3170
3170
  const r = n.nodes.find((ee) => ee.id === V);
3171
3171
  if (!r || r.type === "end") return;
@@ -3311,7 +3311,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3311
3311
  return { valid: !1, message: "目标计时节点只能连接辅助节点或结束节点" };
3312
3312
  const t = [B.OCR, B.LICENSE_PLATE, B.FACE_RECOGNITION];
3313
3313
  return t.includes(V?.type) && !t.filter((r) => r !== V.type).concat(B.END).includes(M?.type) ? { valid: !1, message: "辅助节点只能连接除自身外的辅助节点或结束节点" } : { valid: !0 };
3314
- }, w = Rt({
3314
+ }, T = Rt({
3315
3315
  start: zn,
3316
3316
  end: Yn,
3317
3317
  dataSource: oa,
@@ -3400,7 +3400,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3400
3400
  }, N = () => {
3401
3401
  n.edges.forEach((V) => {
3402
3402
  const M = v(V);
3403
- V.label !== M && (V.label = M, V.labelStyle = M ? { fill: "#fff", fontWeight: 600, fontSize: "11px" } : void 0, V.labelBgStyle = M ? { fill: "var(--color-brand-primary)", rx: 4, ry: 4 } : void 0, V.labelBgPadding = M ? [4, 6] : void 0);
3403
+ V.label !== M && (V.label = M, V.labelStyle = M ? { fill: "#fff", fontWeight: 600, fontSize: "11px" } : void 0, V.labelBgStyle = M ? { fill: "var(--aiflow-color-brand-primary)", rx: 4, ry: 4 } : void 0, V.labelBgPadding = M ? [4, 6] : void 0);
3404
3404
  });
3405
3405
  }, H = () => {
3406
3406
  n.nodes.forEach((V) => {
@@ -3531,7 +3531,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3531
3531
  let z;
3532
3532
  switch (M) {
3533
3533
  case B.START:
3534
- z = wt(b);
3534
+ z = Tt(b);
3535
3535
  break;
3536
3536
  case B.END:
3537
3537
  z = Ge(b);
@@ -3574,7 +3574,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3574
3574
  "onUpdate:nodes": M[0] || (M[0] = (t) => u.value = t),
3575
3575
  edges: f.value,
3576
3576
  "onUpdate:edges": M[1] || (M[1] = (t) => f.value = t),
3577
- "node-types": q(w),
3577
+ "node-types": q(T),
3578
3578
  onNodesChange: m,
3579
3579
  onEdgesChange: l,
3580
3580
  onConnect: k,
@@ -3610,7 +3610,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3610
3610
  }, null, 8, ["visible", "position", "source-node-type"])
3611
3611
  ]));
3612
3612
  }
3613
- }, _o = /* @__PURE__ */ re(yo, [["__scopeId", "data-v-f4705e02"]]), ho = { class: "config-section" }, bo = {
3613
+ }, _o = /* @__PURE__ */ re(yo, [["__scopeId", "data-v-55e65511"]]), ho = { class: "config-section" }, bo = {
3614
3614
  key: 0,
3615
3615
  class: "config-section"
3616
3616
  }, xo = {
@@ -3626,7 +3626,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3626
3626
  if (!e.value) return !1;
3627
3627
  const h = n.nodes.find((A) => A.id === e.value.source);
3628
3628
  return (h?.type === "dataSource" || h?.type === "start") && h?.data?.enableBranch;
3629
- }), T = Q(() => {
3629
+ }), w = Q(() => {
3630
3630
  if (!e.value) return 1;
3631
3631
  const h = n.nodes.find((A) => A.id === e.value.source);
3632
3632
  return h ? n.edges.filter((A) => A.source === h.id).length : 1;
@@ -3638,7 +3638,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3638
3638
  e.value && n.updateEdgeData(e.value.id, h);
3639
3639
  };
3640
3640
  return (h, A) => {
3641
- const R = y("el-divider"), $ = y("el-input"), S = y("el-form-item"), x = y("el-form"), I = y("el-input-number"), F = y("el-text"), _ = y("el-option"), w = y("el-select");
3641
+ const R = y("el-divider"), $ = y("el-input"), S = y("el-form-item"), x = y("el-form"), I = y("el-input-number"), F = y("el-text"), _ = y("el-option"), T = y("el-select");
3642
3642
  return s(), U("div", null, [
3643
3643
  A[9] || (A[9] = C("div", { class: "config-header" }, [
3644
3644
  C("h3", null, "分支配置")
@@ -3728,7 +3728,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3728
3728
  default: d(() => [
3729
3729
  o(S, { label: "执行顺序" }, {
3730
3730
  default: d(() => [
3731
- o(w, {
3731
+ o(T, {
3732
3732
  "model-value": e.value?.data?.branchOrder ?? null,
3733
3733
  onChange: A[3] || (A[3] = (u) => g({ branchOrder: u })),
3734
3734
  style: { width: "100%" },
@@ -3736,7 +3736,7 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3736
3736
  clearable: ""
3737
3737
  }, {
3738
3738
  default: d(() => [
3739
- (s(!0), U(ae, null, oe(T.value, (u) => (s(), G(_, {
3739
+ (s(!0), U(ae, null, oe(w.value, (u) => (s(), G(_, {
3740
3740
  key: u,
3741
3741
  label: `执行顺序 ${u}`,
3742
3742
  value: u
@@ -3764,18 +3764,18 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3764
3764
  ]);
3765
3765
  };
3766
3766
  }
3767
- }, So = /* @__PURE__ */ re(Co, [["__scopeId", "data-v-00ce7bd1"]]), To = { class: "config-section" }, wo = {
3767
+ }, So = /* @__PURE__ */ re(Co, [["__scopeId", "data-v-d7948d88"]]), wo = { class: "config-section" }, To = {
3768
3768
  __name: "GroupNodeConfig",
3769
3769
  setup(c) {
3770
3770
  return (n, e) => {
3771
- const O = y("el-divider"), T = y("el-text");
3771
+ const O = y("el-divider"), w = y("el-text");
3772
3772
  return s(), U("div", null, [
3773
3773
  e[1] || (e[1] = C("div", { class: "config-header" }, [
3774
3774
  C("h3", null, "并行组")
3775
3775
  ], -1)),
3776
3776
  o(O),
3777
- C("div", To, [
3778
- o(T, {
3777
+ C("div", wo, [
3778
+ o(w, {
3779
3779
  type: "info",
3780
3780
  size: "small"
3781
3781
  }, {
@@ -3788,12 +3788,12 @@ const Ln = { class: "toolbar" }, Dn = { class: "toolbar-right" }, In = {
3788
3788
  ]);
3789
3789
  };
3790
3790
  }
3791
- }, No = /* @__PURE__ */ re(wo, [["__scopeId", "data-v-ce8a9246"]]);
3791
+ }, No = /* @__PURE__ */ re(To, [["__scopeId", "data-v-60b47589"]]);
3792
3792
  function ko(c, n, e, O) {
3793
- const T = O?.[c];
3794
- if (!T) return { schema: n, arguments: e };
3793
+ const w = O?.[c];
3794
+ if (!w) return { schema: n, arguments: e };
3795
3795
  const i = {};
3796
- return T.schema?.properties && Object.entries(T.schema.properties).forEach(([g, h]) => {
3796
+ return w.schema?.properties && Object.entries(w.schema.properties).forEach(([g, h]) => {
3797
3797
  i[g] = { ...h, "x-extension": !0 };
3798
3798
  }), {
3799
3799
  schema: {
@@ -3804,31 +3804,31 @@ function ko(c, n, e, O) {
3804
3804
  },
3805
3805
  required: [
3806
3806
  ...n?.required || [],
3807
- ...T.schema?.required || []
3807
+ ...w.schema?.required || []
3808
3808
  ]
3809
3809
  },
3810
3810
  arguments: {
3811
3811
  ...e || {},
3812
- ...T.arguments || {}
3812
+ ...w.arguments || {}
3813
3813
  }
3814
3814
  };
3815
3815
  }
3816
- function Te() {
3817
- const c = Me("nodeConfigExtensions", null), n = () => dt(c) ? c.value : c, e = Q(() => n()), O = (A, R, $) => ko(A, R, $, n()), T = (A, R, $, S, x, I) => {
3816
+ function we() {
3817
+ const c = Me("nodeConfigExtensions", null), n = () => dt(c) ? c.value : c, e = Q(() => n()), O = (A, R, $) => ko(A, R, $, n()), w = (A, R, $, S, x, I) => {
3818
3818
  const _ = n()?.[R]?.[A];
3819
3819
  if (_ && typeof _ == "function")
3820
3820
  try {
3821
3821
  _($, S, x, I);
3822
- } catch (w) {
3823
- console.warn(`[nodeConfigExtension] ${A} callback error for ${R}:`, w);
3822
+ } catch (T) {
3823
+ console.warn(`[nodeConfigExtension] ${A} callback error for ${R}:`, T);
3824
3824
  }
3825
3825
  };
3826
3826
  return { extensions: e, apply: O, notifyChange: (A, R, $, S, x) => {
3827
- T("onChange", A, R, $, S, x);
3827
+ w("onChange", A, R, $, S, x);
3828
3828
  }, notifyFocus: (A, R, $, S, x) => {
3829
- T("onFocus", A, R, $, S, x);
3829
+ w("onFocus", A, R, $, S, x);
3830
3830
  }, notifyBlur: (A, R, $, S, x) => {
3831
- T("onBlur", A, R, $, S, x);
3831
+ w("onBlur", A, R, $, S, x);
3832
3832
  } };
3833
3833
  }
3834
3834
  const Eo = {
@@ -3837,7 +3837,7 @@ const Eo = {
3837
3837
  }, Ao = {
3838
3838
  key: 3,
3839
3839
  class: "array-input"
3840
- }, we = {
3840
+ }, Te = {
3841
3841
  __name: "ExtensionFields",
3842
3842
  props: {
3843
3843
  fields: { type: Array, required: !0 },
@@ -3845,12 +3845,12 @@ const Eo = {
3845
3845
  },
3846
3846
  emits: ["update", "focus", "blur"],
3847
3847
  setup(c, { emit: n }) {
3848
- const e = c, O = n, T = (S) => e.nodeData?.arguments?.[S], i = (S, x) => O("update", S, x), g = (S) => O("focus", S, T(S)), h = (S) => O("blur", S, T(S)), A = (S) => {
3848
+ const e = c, O = n, w = (S) => e.nodeData?.arguments?.[S], i = (S, x) => O("update", S, x), g = (S) => O("focus", S, w(S)), h = (S) => O("blur", S, w(S)), A = (S) => {
3849
3849
  if (!S.dependsOn) return !0;
3850
- const { field: x, value: I } = S.dependsOn, F = T(x);
3850
+ const { field: x, value: I } = S.dependsOn, F = w(x);
3851
3851
  return typeof I == "string" && I.startsWith("!") ? F !== I.substring(1) : Array.isArray(I) ? I.includes(F) : F === I;
3852
3852
  }, R = (S) => {
3853
- const x = T(S);
3853
+ const x = w(S);
3854
3854
  return Array.isArray(x) ? JSON.stringify(x) : "";
3855
3855
  }, $ = (S, x) => {
3856
3856
  try {
@@ -3860,7 +3860,7 @@ const Eo = {
3860
3860
  }
3861
3861
  };
3862
3862
  return (S, x) => {
3863
- const I = y("el-icon"), F = y("el-tooltip"), _ = y("el-option"), w = y("el-select"), u = y("el-switch"), f = y("el-input-number"), m = y("el-input"), l = y("el-form-item"), k = y("el-form");
3863
+ const I = y("el-icon"), F = y("el-tooltip"), _ = y("el-option"), T = y("el-select"), u = y("el-switch"), f = y("el-input-number"), m = y("el-input"), l = y("el-form-item"), k = y("el-form");
3864
3864
  return c.fields.length > 0 ? (s(), U("div", Eo, [
3865
3865
  x[0] || (x[0] = C("h4", null, "扩展参数", -1)),
3866
3866
  o(k, {
@@ -3891,9 +3891,9 @@ const Eo = {
3891
3891
  }, 8, ["content"])) : K("", !0)
3892
3892
  ]),
3893
3893
  default: d(() => [
3894
- D.options && D.type === "string" ? (s(), G(w, {
3894
+ D.options && D.type === "string" ? (s(), G(T, {
3895
3895
  key: 0,
3896
- "model-value": T(D.key),
3896
+ "model-value": w(D.key),
3897
3897
  onChange: (v) => i(D.key, v),
3898
3898
  onFocus: (v) => g(D.key),
3899
3899
  onBlur: (v) => h(D.key),
@@ -3909,13 +3909,13 @@ const Eo = {
3909
3909
  _: 2
3910
3910
  }, 1032, ["model-value", "onChange", "onFocus", "onBlur"])) : D.type === "boolean" ? (s(), G(u, {
3911
3911
  key: 1,
3912
- "model-value": T(D.key),
3912
+ "model-value": w(D.key),
3913
3913
  onChange: (v) => i(D.key, v),
3914
3914
  onFocus: (v) => g(D.key),
3915
3915
  onBlur: (v) => h(D.key)
3916
3916
  }, null, 8, ["model-value", "onChange", "onFocus", "onBlur"])) : D.type === "number" || D.type === "integer" ? (s(), G(f, {
3917
3917
  key: 2,
3918
- "model-value": T(D.key),
3918
+ "model-value": w(D.key),
3919
3919
  onChange: (v) => i(D.key, v),
3920
3920
  onFocus: (v) => g(D.key),
3921
3921
  onBlur: (v) => h(D.key),
@@ -3933,9 +3933,9 @@ const Eo = {
3933
3933
  rows: 3,
3934
3934
  placeholder: D.description || "输入JSON数组"
3935
3935
  }, null, 8, ["model-value", "onChange", "onFocus", "onBlur", "placeholder"])
3936
- ])) : D.type === "array" && D.options ? (s(), G(w, {
3936
+ ])) : D.type === "array" && D.options ? (s(), G(T, {
3937
3937
  key: 4,
3938
- "model-value": T(D.key),
3938
+ "model-value": w(D.key),
3939
3939
  onChange: (v) => i(D.key, v),
3940
3940
  onFocus: (v) => g(D.key),
3941
3941
  onBlur: (v) => h(D.key),
@@ -3952,7 +3952,7 @@ const Eo = {
3952
3952
  _: 2
3953
3953
  }, 1032, ["model-value", "onChange", "onFocus", "onBlur"])) : (s(), G(m, {
3954
3954
  key: 5,
3955
- "model-value": T(D.key),
3955
+ "model-value": w(D.key),
3956
3956
  onInput: (v) => i(D.key, v),
3957
3957
  onFocus: (v) => g(D.key),
3958
3958
  onBlur: (v) => h(D.key),
@@ -3973,7 +3973,7 @@ const Eo = {
3973
3973
  }, Oo = { class: "config-section" }, Lo = { class: "config-section" }, Do = {
3974
3974
  __name: "StartNodeConfig",
3975
3975
  setup(c) {
3976
- const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: T, notifyFocus: i, notifyBlur: g } = Te(), h = Q(() => {
3976
+ const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: w, notifyFocus: i, notifyBlur: g } = we(), h = Q(() => {
3977
3977
  const x = O.value?.start;
3978
3978
  return !x || !x.schema?.properties ? [] : Object.entries(x.schema.properties).map(([I, F]) => ({
3979
3979
  key: I,
@@ -3993,7 +3993,7 @@ const Eo = {
3993
3993
  const F = { ...e.value.data.arguments, [x]: I };
3994
3994
  n.updateNodeData(e.value.id, {
3995
3995
  arguments: F
3996
- }), T("start", x, I, F, e.value.id);
3996
+ }), w("start", x, I, F, e.value.id);
3997
3997
  };
3998
3998
  me(() => e.value?.id, () => {
3999
3999
  const x = O.value?.start;
@@ -4009,7 +4009,7 @@ const Eo = {
4009
4009
  e.value && n.updateNodeData(e.value.id, { algorithmDescription: x });
4010
4010
  };
4011
4011
  return (x, I) => {
4012
- const F = y("el-divider"), _ = y("el-input"), w = y("el-form-item"), u = y("el-form"), f = y("el-option"), m = y("el-select"), l = y("el-input-number");
4012
+ const F = y("el-divider"), _ = y("el-input"), T = y("el-form-item"), u = y("el-form"), f = y("el-option"), m = y("el-select"), l = y("el-input-number");
4013
4013
  return s(), U("div", null, [
4014
4014
  I[8] || (I[8] = C("div", { class: "config-header" }, [
4015
4015
  C("h3", null, "节点配置")
@@ -4022,7 +4022,7 @@ const Eo = {
4022
4022
  size: "default"
4023
4023
  }, {
4024
4024
  default: d(() => [
4025
- o(w, {
4025
+ o(T, {
4026
4026
  label: "算法名称",
4027
4027
  required: ""
4028
4028
  }, {
@@ -4037,7 +4037,7 @@ const Eo = {
4037
4037
  ]),
4038
4038
  _: 1
4039
4039
  }),
4040
- o(w, { label: "算法描述" }, {
4040
+ o(T, { label: "算法描述" }, {
4041
4041
  default: d(() => [
4042
4042
  o(_, {
4043
4043
  "model-value": e.value?.data.algorithmDescription,
@@ -4062,7 +4062,7 @@ const Eo = {
4062
4062
  size: "default"
4063
4063
  }, {
4064
4064
  default: d(() => [
4065
- o(w, { label: "分支关系" }, {
4065
+ o(T, { label: "分支关系" }, {
4066
4066
  default: d(() => [
4067
4067
  o(m, {
4068
4068
  "model-value": e.value?.data.branchLogic || "and",
@@ -4084,7 +4084,7 @@ const Eo = {
4084
4084
  ]),
4085
4085
  _: 1
4086
4086
  }),
4087
- R.value ? (s(), G(w, {
4087
+ R.value ? (s(), G(T, {
4088
4088
  key: 0,
4089
4089
  label: "组间聚合窗口(秒)"
4090
4090
  }, {
@@ -4105,7 +4105,7 @@ const Eo = {
4105
4105
  _: 1
4106
4106
  })
4107
4107
  ]),
4108
- o(we, {
4108
+ o(Te, {
4109
4109
  fields: h.value,
4110
4110
  "node-data": e.value?.data,
4111
4111
  onUpdate: A,
@@ -4115,7 +4115,7 @@ const Eo = {
4115
4115
  ]);
4116
4116
  };
4117
4117
  }
4118
- }, Io = /* @__PURE__ */ re(Do, [["__scopeId", "data-v-5c3b25e1"]]), $o = {
4118
+ }, Io = /* @__PURE__ */ re(Do, [["__scopeId", "data-v-62f823fd"]]), $o = {
4119
4119
  detectionTarget: Ce.DETECTION,
4120
4120
  classificationModel: Ce.CLASSIFICATION,
4121
4121
  ocr: Ce.OCR,
@@ -4172,8 +4172,8 @@ const Eo = {
4172
4172
  setup(c) {
4173
4173
  const n = de(), e = Q(() => n.selectedNode), {
4174
4174
  schemaLoading: O,
4175
- fetchSchemaForNodeType: T
4176
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = Q(() => {
4175
+ fetchSchemaForNodeType: w
4176
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = Q(() => {
4177
4177
  if (!e.value) return [];
4178
4178
  const u = e.value.data.input_schema || e.value.data.inputSchema;
4179
4179
  if (!u || !u.properties) return [];
@@ -4220,7 +4220,7 @@ const Eo = {
4220
4220
  Array.isArray(m) && x(u, m);
4221
4221
  } catch {
4222
4222
  }
4223
- }, w = () => {
4223
+ }, T = () => {
4224
4224
  e.value && ye.confirm("确定要删除这个节点吗?", "确认删除", {
4225
4225
  confirmButtonText: "删除",
4226
4226
  cancelButtonText: "取消",
@@ -4241,7 +4241,7 @@ const Eo = {
4241
4241
  });
4242
4242
  return;
4243
4243
  }
4244
- const k = await T(f);
4244
+ const k = await w(f);
4245
4245
  if (!k) return;
4246
4246
  const D = e.value?.data;
4247
4247
  if (!D) return;
@@ -4265,7 +4265,7 @@ const Eo = {
4265
4265
  size: "small",
4266
4266
  icon: q(xe),
4267
4267
  circle: "",
4268
- onClick: w
4268
+ onClick: T
4269
4269
  }, null, 8, ["icon"])
4270
4270
  ]),
4271
4271
  o(l),
@@ -4364,7 +4364,7 @@ const Eo = {
4364
4364
  _: 1
4365
4365
  })
4366
4366
  ])) : K("", !0),
4367
- o(we, {
4367
+ o(Te, {
4368
4368
  fields: R.value.filter((p) => p.isExtension),
4369
4369
  "node-data": e.value?.data,
4370
4370
  onUpdate: x,
@@ -4372,12 +4372,12 @@ const Eo = {
4372
4372
  onBlur: f[1] || (f[1] = (p, E) => q(A)("end", p, E, e.value?.data?.arguments, e.value?.id))
4373
4373
  }, null, 8, ["fields", "node-data"]),
4374
4374
  q(O) && R.value.length === 0 ? (s(), U("div", Bo, [...f[4] || (f[4] = [
4375
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
4375
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
4376
4376
  ])])) : K("", !0)
4377
4377
  ]);
4378
4378
  };
4379
4379
  }
4380
- }, Po = /* @__PURE__ */ re(Vo, [["__scopeId", "data-v-cc1e3c65"]]), Go = { class: "config-header" }, Uo = { class: "config-section" }, jo = { style: { display: "flex", "justify-content": "space-between", "align-items": "center" } }, zo = { style: { color: "var(--el-text-color-secondary)", "font-size": "12px" } }, Ho = {
4380
+ }, Po = /* @__PURE__ */ re(Vo, [["__scopeId", "data-v-c2e1d92d"]]), Go = { class: "config-header" }, Uo = { class: "config-section" }, jo = { style: { display: "flex", "justify-content": "space-between", "align-items": "center" } }, zo = { style: { color: "var(--el-text-color-secondary)", "font-size": "12px" } }, Ho = {
4381
4381
  key: 0,
4382
4382
  style: { "margin-top": "8px", color: "var(--el-text-color-secondary)", "font-size": "12px" }
4383
4383
  }, Wo = {
@@ -4397,8 +4397,8 @@ const Eo = {
4397
4397
  setup(c) {
4398
4398
  const n = de(), e = Q(() => n.selectedNode), {
4399
4399
  schemaLoading: O,
4400
- fetchSchemaForNodeType: T
4401
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = le([]), $ = le(!1), S = Q({
4400
+ fetchSchemaForNodeType: w
4401
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = le([]), $ = le(!1), S = Q({
4402
4402
  get: () => e.value?.data.arguments?.modelId || null,
4403
4403
  set: (v) => {
4404
4404
  e.value && v && f("modelId", v);
@@ -4423,7 +4423,7 @@ const Eo = {
4423
4423
  modelName: N.name
4424
4424
  }
4425
4425
  });
4426
- const j = await T(e.value.type, "");
4426
+ const j = await w(e.value.type, "");
4427
4427
  if (!j) return;
4428
4428
  const L = e.value?.data;
4429
4429
  if (!L) return;
@@ -4474,7 +4474,7 @@ const Eo = {
4474
4474
  sort: j.sort,
4475
4475
  isExtension: j["x-extension"] || !1
4476
4476
  })).sort((H, j) => (H.sort ?? 1 / 0) - (j.sort ?? 1 / 0));
4477
- }), w = Q(() => _.value.filter((v) => !v.isExtension)), u = (v) => {
4477
+ }), T = Q(() => _.value.filter((v) => !v.isExtension)), u = (v) => {
4478
4478
  if (e.value)
4479
4479
  return e.value.data.arguments?.[v];
4480
4480
  }, f = (v, N) => {
@@ -4515,7 +4515,7 @@ const Eo = {
4515
4515
  R.value.length === 0 && await x();
4516
4516
  const N = e.value.type, H = e.value.data, j = H.input_schema || H.inputSchema, L = H.arguments?.modelId;
4517
4517
  if (L && j && j.properties && Object.keys(j.properties).length > 0 || !L) return;
4518
- const P = await T(N, "");
4518
+ const P = await w(N, "");
4519
4519
  if (!P) return;
4520
4520
  const W = e.value?.data;
4521
4521
  if (!W) return;
@@ -4591,14 +4591,14 @@ const Eo = {
4591
4591
  _: 1
4592
4592
  })
4593
4593
  ]),
4594
- S.value && w.value.length > 0 ? (s(), U("div", Wo, [
4594
+ S.value && T.value.length > 0 ? (s(), U("div", Wo, [
4595
4595
  N[5] || (N[5] = C("h4", null, "分类模型参数", -1)),
4596
4596
  o(p, {
4597
4597
  "label-position": "top",
4598
4598
  size: "default"
4599
4599
  }, {
4600
4600
  default: d(() => [
4601
- (s(!0), U(ae, null, oe(w.value, (a) => Ne((s(), G(W, {
4601
+ (s(!0), U(ae, null, oe(T.value, (a) => Ne((s(), G(W, {
4602
4602
  key: a.key,
4603
4603
  required: a.required
4604
4604
  }, {
@@ -4686,7 +4686,7 @@ const Eo = {
4686
4686
  _: 1
4687
4687
  })
4688
4688
  ])) : K("", !0),
4689
- o(we, {
4689
+ o(Te, {
4690
4690
  fields: _.value.filter((a) => a.isExtension),
4691
4691
  "node-data": e.value?.data,
4692
4692
  onUpdate: f,
@@ -4694,15 +4694,15 @@ const Eo = {
4694
4694
  onBlur: N[2] || (N[2] = (a, r) => q(A)("classificationModel", a, r, e.value?.data?.arguments, e.value?.id))
4695
4695
  }, null, 8, ["fields", "node-data"]),
4696
4696
  S.value && q(O) && _.value.length === 0 ? (s(), U("div", Yo, [...N[6] || (N[6] = [
4697
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
4697
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
4698
4698
  ])])) : K("", !0),
4699
4699
  !S.value && !$.value ? (s(), U("div", Xo, [...N[7] || (N[7] = [
4700
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 请先选择模型 ", -1)
4700
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 请先选择模型 ", -1)
4701
4701
  ])])) : K("", !0)
4702
4702
  ]);
4703
4703
  };
4704
4704
  }
4705
- }, Qo = /* @__PURE__ */ re(Ko, [["__scopeId", "data-v-65278495"]]), Zo = { class: "config-header" }, el = {
4705
+ }, Qo = /* @__PURE__ */ re(Ko, [["__scopeId", "data-v-18fecb62"]]), Zo = { class: "config-header" }, el = {
4706
4706
  key: 0,
4707
4707
  class: "config-section"
4708
4708
  }, tl = {
@@ -4716,8 +4716,8 @@ const Eo = {
4716
4716
  setup(c) {
4717
4717
  const n = de(), e = Q(() => n.selectedNode), {
4718
4718
  schemaLoading: O,
4719
- fetchSchemaForNodeType: T
4720
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = Q(() => {
4719
+ fetchSchemaForNodeType: w
4720
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = Q(() => {
4721
4721
  if (!e.value) return [];
4722
4722
  const u = e.value.data.input_schema || e.value.data.inputSchema;
4723
4723
  if (!u || !u.properties) return [];
@@ -4765,7 +4765,7 @@ const Eo = {
4765
4765
  Array.isArray(m) && x(u, m);
4766
4766
  } catch {
4767
4767
  }
4768
- }, w = () => {
4768
+ }, T = () => {
4769
4769
  e.value && ye.confirm("确定要删除这个节点吗?", "确认删除", {
4770
4770
  confirmButtonText: "删除",
4771
4771
  cancelButtonText: "取消",
@@ -4779,7 +4779,7 @@ const Eo = {
4779
4779
  if (!u || !e.value) return;
4780
4780
  const f = e.value.type, m = e.value.data, l = m.input_schema || m.inputSchema;
4781
4781
  if (l && l.properties && Object.keys(l.properties).length > 0) return;
4782
- const k = await T(f);
4782
+ const k = await w(f);
4783
4783
  if (!k) return;
4784
4784
  const D = e.value?.data;
4785
4785
  if (!D) return;
@@ -4803,7 +4803,7 @@ const Eo = {
4803
4803
  size: "small",
4804
4804
  icon: q(xe),
4805
4805
  circle: "",
4806
- onClick: w
4806
+ onClick: T
4807
4807
  }, null, 8, ["icon"])
4808
4808
  ]),
4809
4809
  o(l),
@@ -4902,7 +4902,7 @@ const Eo = {
4902
4902
  _: 1
4903
4903
  })
4904
4904
  ])) : K("", !0),
4905
- o(we, {
4905
+ o(Te, {
4906
4906
  fields: R.value.filter((p) => p.isExtension),
4907
4907
  "node-data": e.value?.data,
4908
4908
  onUpdate: x,
@@ -4910,12 +4910,12 @@ const Eo = {
4910
4910
  onBlur: f[1] || (f[1] = (p, E) => q(A)("ocr", p, E, e.value?.data?.arguments, e.value?.id))
4911
4911
  }, null, 8, ["fields", "node-data"]),
4912
4912
  q(O) && R.value.length === 0 ? (s(), U("div", nl, [...f[4] || (f[4] = [
4913
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
4913
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
4914
4914
  ])])) : K("", !0)
4915
4915
  ]);
4916
4916
  };
4917
4917
  }
4918
- }, ol = /* @__PURE__ */ re(al, [["__scopeId", "data-v-a1412d69"]]), ll = { class: "config-header" }, sl = {
4918
+ }, ol = /* @__PURE__ */ re(al, [["__scopeId", "data-v-a423df33"]]), ll = { class: "config-header" }, sl = {
4919
4919
  key: 0,
4920
4920
  class: "config-section"
4921
4921
  }, rl = {
@@ -4929,8 +4929,8 @@ const Eo = {
4929
4929
  setup(c) {
4930
4930
  const n = de(), e = Q(() => n.selectedNode), {
4931
4931
  schemaLoading: O,
4932
- fetchSchemaForNodeType: T
4933
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = Q(() => n.nodes.filter((m) => m.type === "detectionTarget").map((m) => ({
4932
+ fetchSchemaForNodeType: w
4933
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = Q(() => n.nodes.filter((m) => m.type === "detectionTarget").map((m) => ({
4934
4934
  id: m.id,
4935
4935
  label: m.data.label || "检测目标"
4936
4936
  }))), $ = Q(() => {
@@ -4975,7 +4975,7 @@ const Eo = {
4975
4975
  }, _ = (f) => {
4976
4976
  const m = x(f);
4977
4977
  return Array.isArray(m) ? JSON.stringify(m) : "";
4978
- }, w = (f, m) => {
4978
+ }, T = (f, m) => {
4979
4979
  try {
4980
4980
  const l = JSON.parse(m);
4981
4981
  Array.isArray(l) && I(f, l);
@@ -5015,7 +5015,7 @@ const Eo = {
5015
5015
  }
5016
5016
  return;
5017
5017
  }
5018
- const D = await T(m);
5018
+ const D = await w(m);
5019
5019
  if (!D) return;
5020
5020
  const v = e.value?.data;
5021
5021
  if (!v) return;
@@ -5116,7 +5116,7 @@ const Eo = {
5116
5116
  }, null, 8, ["model-value", "onChange", "min", "max", "step"])) : E.type === "array" && !E.options ? (s(), U("div", rl, [
5117
5117
  o(P, {
5118
5118
  "model-value": _(E.key),
5119
- onChange: (Y) => w(E.key, Y),
5119
+ onChange: (Y) => T(E.key, Y),
5120
5120
  type: "textarea",
5121
5121
  rows: 3,
5122
5122
  placeholder: E.description || "输入JSON数组"
@@ -5152,7 +5152,7 @@ const Eo = {
5152
5152
  _: 1
5153
5153
  })
5154
5154
  ])) : K("", !0),
5155
- o(we, {
5155
+ o(Te, {
5156
5156
  fields: $.value.filter((E) => E.isExtension),
5157
5157
  "node-data": e.value?.data,
5158
5158
  onUpdate: I,
@@ -5160,12 +5160,12 @@ const Eo = {
5160
5160
  onBlur: m[1] || (m[1] = (E, Y) => q(A)("licensePlate", E, Y, e.value?.data?.arguments, e.value?.id))
5161
5161
  }, null, 8, ["fields", "node-data"]),
5162
5162
  q(O) && $.value.length === 0 ? (s(), U("div", il, [...m[4] || (m[4] = [
5163
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
5163
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
5164
5164
  ])])) : K("", !0)
5165
5165
  ]);
5166
5166
  };
5167
5167
  }
5168
- }, dl = /* @__PURE__ */ re(ul, [["__scopeId", "data-v-90705836"]]), cl = { class: "config-header" }, ml = { class: "config-section" }, pl = {
5168
+ }, dl = /* @__PURE__ */ re(ul, [["__scopeId", "data-v-8e3a2a49"]]), cl = { class: "config-header" }, ml = { class: "config-section" }, pl = {
5169
5169
  key: 0,
5170
5170
  class: "config-section"
5171
5171
  }, gl = {
@@ -5179,8 +5179,8 @@ const Eo = {
5179
5179
  setup(c) {
5180
5180
  const n = de(), e = Q(() => n.selectedNode), {
5181
5181
  schemaLoading: O,
5182
- fetchSchemaForNodeType: T
5183
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = le([]), $ = le(!1);
5182
+ fetchSchemaForNodeType: w
5183
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = le([]), $ = le(!1);
5184
5184
  (async () => {
5185
5185
  $.value = !0;
5186
5186
  try {
@@ -5224,7 +5224,7 @@ const Eo = {
5224
5224
  }), F = Q(() => I.value.filter((k) => !k.isExtension)), _ = (k) => {
5225
5225
  if (e.value)
5226
5226
  return e.value.data.arguments?.[k];
5227
- }, w = (k, D) => {
5227
+ }, T = (k, D) => {
5228
5228
  if (!e.value) return;
5229
5229
  const N = { ...e.value.data.arguments || {}, [k]: D };
5230
5230
  n.updateNodeData(e.value.id, {
@@ -5244,7 +5244,7 @@ const Eo = {
5244
5244
  }, m = (k, D) => {
5245
5245
  try {
5246
5246
  const v = JSON.parse(D);
5247
- Array.isArray(v) && w(k, v);
5247
+ Array.isArray(v) && T(k, v);
5248
5248
  } catch {
5249
5249
  }
5250
5250
  }, l = () => {
@@ -5281,7 +5281,7 @@ const Eo = {
5281
5281
  }
5282
5282
  return;
5283
5283
  }
5284
- const H = await T(D);
5284
+ const H = await w(D);
5285
5285
  if (!H) return;
5286
5286
  const j = e.value?.data;
5287
5287
  if (!j) return;
@@ -5320,7 +5320,7 @@ const Eo = {
5320
5320
  default: d(() => [
5321
5321
  o(j, {
5322
5322
  "model-value": _("repositoryId"),
5323
- onChange: D[0] || (D[0] = (M) => w("repositoryId", M)),
5323
+ onChange: D[0] || (D[0] = (M) => T("repositoryId", M)),
5324
5324
  placeholder: "请选择人脸库",
5325
5325
  loading: $.value,
5326
5326
  style: { width: "100%" }
@@ -5374,7 +5374,7 @@ const Eo = {
5374
5374
  M.key === "detectionScope" ? (s(), G(j, {
5375
5375
  key: 0,
5376
5376
  "model-value": _(M.key),
5377
- onChange: (t) => w(M.key, t),
5377
+ onChange: (t) => T(M.key, t),
5378
5378
  style: { width: "100%" }
5379
5379
  }, {
5380
5380
  default: d(() => [
@@ -5388,7 +5388,7 @@ const Eo = {
5388
5388
  }, 8, ["model-value", "onChange"])) : M.options && M.type === "string" ? (s(), G(j, {
5389
5389
  key: 1,
5390
5390
  "model-value": _(M.key),
5391
- onChange: (t) => w(M.key, t),
5391
+ onChange: (t) => T(M.key, t),
5392
5392
  style: { width: "100%" }
5393
5393
  }, {
5394
5394
  default: d(() => [
@@ -5402,11 +5402,11 @@ const Eo = {
5402
5402
  }, 1032, ["model-value", "onChange"])) : M.type === "boolean" ? (s(), G(E, {
5403
5403
  key: 2,
5404
5404
  "model-value": _(M.key),
5405
- onChange: (t) => w(M.key, t)
5405
+ onChange: (t) => T(M.key, t)
5406
5406
  }, null, 8, ["model-value", "onChange"])) : M.type === "number" || M.type === "integer" ? (s(), G(Y, {
5407
5407
  key: 3,
5408
5408
  "model-value": _(M.key),
5409
- onChange: (t) => w(M.key, t),
5409
+ onChange: (t) => T(M.key, t),
5410
5410
  min: M.min,
5411
5411
  max: M.max,
5412
5412
  step: M.step || (M.type === "integer" ? 1 : 0.1),
@@ -5422,7 +5422,7 @@ const Eo = {
5422
5422
  ])) : M.type === "array" && M.options ? (s(), G(j, {
5423
5423
  key: 5,
5424
5424
  "model-value": _(M.key),
5425
- onChange: (t) => w(M.key, t),
5425
+ onChange: (t) => T(M.key, t),
5426
5426
  multiple: "",
5427
5427
  style: { width: "100%" }
5428
5428
  }, {
@@ -5437,7 +5437,7 @@ const Eo = {
5437
5437
  }, 1032, ["model-value", "onChange"])) : (s(), G(V, {
5438
5438
  key: 6,
5439
5439
  "model-value": _(M.key),
5440
- onInput: (t) => w(M.key, t),
5440
+ onInput: (t) => T(M.key, t),
5441
5441
  maxlength: M.maxLength,
5442
5442
  "show-word-limit": !!M.maxLength
5443
5443
  }, null, 8, ["model-value", "onInput", "maxlength", "show-word-limit"]))
@@ -5450,20 +5450,20 @@ const Eo = {
5450
5450
  _: 1
5451
5451
  })
5452
5452
  ])) : K("", !0),
5453
- o(we, {
5453
+ o(Te, {
5454
5454
  fields: I.value.filter((M) => M.isExtension),
5455
5455
  "node-data": e.value?.data,
5456
- onUpdate: w,
5456
+ onUpdate: T,
5457
5457
  onFocus: D[1] || (D[1] = (M, t) => q(h)(e.value?.type, M, t, e.value?.data?.arguments, e.value?.id)),
5458
5458
  onBlur: D[2] || (D[2] = (M, t) => q(A)(e.value?.type, M, t, e.value?.data?.arguments, e.value?.id))
5459
5459
  }, null, 8, ["fields", "node-data"]),
5460
5460
  q(O) && I.value.length === 0 ? (s(), U("div", fl, [...D[6] || (D[6] = [
5461
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
5461
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
5462
5462
  ])])) : K("", !0)
5463
5463
  ]);
5464
5464
  };
5465
5465
  }
5466
- }, it = /* @__PURE__ */ re(vl, [["__scopeId", "data-v-4782d162"]]), yl = { class: "config-header" }, _l = {
5466
+ }, it = /* @__PURE__ */ re(vl, [["__scopeId", "data-v-d24efeae"]]), yl = { class: "config-header" }, _l = {
5467
5467
  key: 0,
5468
5468
  class: "config-section"
5469
5469
  }, hl = {
@@ -5477,8 +5477,8 @@ const Eo = {
5477
5477
  setup(c) {
5478
5478
  const n = de(), e = Q(() => n.selectedNode), {
5479
5479
  schemaLoading: O,
5480
- fetchSchemaForNodeType: T
5481
- } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = Q(() => {
5480
+ fetchSchemaForNodeType: w
5481
+ } = Oe(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = Q(() => {
5482
5482
  if (!e.value) return [];
5483
5483
  const u = e.value.data.input_schema || e.value.data.inputSchema;
5484
5484
  if (!u || !u.properties) return [];
@@ -5526,7 +5526,7 @@ const Eo = {
5526
5526
  Array.isArray(m) && x(u, m);
5527
5527
  } catch {
5528
5528
  }
5529
- }, w = () => {
5529
+ }, T = () => {
5530
5530
  e.value && ye.confirm("确定要删除这个节点吗?", "确认删除", {
5531
5531
  confirmButtonText: "删除",
5532
5532
  cancelButtonText: "取消",
@@ -5540,7 +5540,7 @@ const Eo = {
5540
5540
  if (!u || !e.value) return;
5541
5541
  const f = e.value.type, m = e.value.data, l = m.input_schema || m.inputSchema;
5542
5542
  if (l && l.properties && Object.keys(l.properties).length > 0) return;
5543
- const k = await T(f);
5543
+ const k = await w(f);
5544
5544
  if (!k) return;
5545
5545
  const D = e.value?.data;
5546
5546
  if (!D) return;
@@ -5564,7 +5564,7 @@ const Eo = {
5564
5564
  size: "small",
5565
5565
  icon: q(xe),
5566
5566
  circle: "",
5567
- onClick: w
5567
+ onClick: T
5568
5568
  }, null, 8, ["icon"])
5569
5569
  ]),
5570
5570
  o(l),
@@ -5663,7 +5663,7 @@ const Eo = {
5663
5663
  _: 1
5664
5664
  })
5665
5665
  ])) : K("", !0),
5666
- o(we, {
5666
+ o(Te, {
5667
5667
  fields: R.value.filter((p) => p.isExtension),
5668
5668
  "node-data": e.value?.data,
5669
5669
  onUpdate: x,
@@ -5671,28 +5671,28 @@ const Eo = {
5671
5671
  onBlur: f[1] || (f[1] = (p, E) => q(A)("stream", p, E, e.value?.data?.arguments, e.value?.id))
5672
5672
  }, null, 8, ["fields", "node-data"]),
5673
5673
  q(O) && R.value.length === 0 ? (s(), U("div", bl, [...f[4] || (f[4] = [
5674
- C("div", { style: { "text-align": "center", padding: "20px", color: "var(--color-text-secondary)" } }, " 加载参数配置中... ", -1)
5674
+ C("div", { style: { "text-align": "center", padding: "20px", color: "var(--aiflow-color-text-secondary)" } }, " 加载参数配置中... ", -1)
5675
5675
  ])])) : K("", !0)
5676
5676
  ]);
5677
5677
  };
5678
5678
  }
5679
- }, Cl = /* @__PURE__ */ re(xl, [["__scopeId", "data-v-6c51757a"]]), Sl = { class: "config-header" }, Tl = { class: "config-section" }, wl = { class: "config-section" }, Nl = {
5679
+ }, Cl = /* @__PURE__ */ re(xl, [["__scopeId", "data-v-562806a9"]]), Sl = { class: "config-header" }, wl = { class: "config-section" }, Tl = { class: "config-section" }, Nl = {
5680
5680
  __name: "DataSourceConfig",
5681
5681
  setup(c) {
5682
5682
  const n = de(), e = Q(() => n.selectedNode), {
5683
5683
  fetchSchemaForNodeType: O
5684
- } = Oe(), { apply: T, notifyChange: i, notifyFocus: g, notifyBlur: h } = Te(), A = Q(() => {
5684
+ } = Oe(), { apply: w, notifyChange: i, notifyFocus: g, notifyBlur: h } = we(), A = Q(() => {
5685
5685
  if (!e.value) return [];
5686
5686
  const _ = e.value.data.input_schema || e.value.data.inputSchema;
5687
5687
  if (!_ || !_.properties) return [];
5688
- const w = _.required || [];
5688
+ const T = _.required || [];
5689
5689
  return Object.entries(_.properties).map(([u, f]) => ({
5690
5690
  key: u,
5691
5691
  type: f.type,
5692
5692
  label: f.title || f.label || f.description || u,
5693
5693
  description: f.description || "",
5694
5694
  default: f.default,
5695
- required: w.includes(u) || f.required || !1,
5695
+ required: T.includes(u) || f.required || !1,
5696
5696
  min: f.minimum !== void 0 ? f.minimum : f.min,
5697
5697
  max: f.maximum !== void 0 ? f.maximum : f.max,
5698
5698
  step: f.step,
@@ -5705,12 +5705,12 @@ const Eo = {
5705
5705
  }), R = Q(() => A.value.filter((_) => !_.isExtension)), $ = (_) => {
5706
5706
  if (e.value)
5707
5707
  return e.value.data.arguments?.[_];
5708
- }, S = (_, w) => {
5708
+ }, S = (_, T) => {
5709
5709
  if (!e.value) return;
5710
- const f = { ...e.value.data.arguments || {}, [_]: w };
5710
+ const f = { ...e.value.data.arguments || {}, [_]: T };
5711
5711
  n.updateNodeData(e.value.id, {
5712
5712
  arguments: f
5713
- }), i("dataSource", _, w, f, e.value.id);
5713
+ }), i("dataSource", _, T, f, e.value.id);
5714
5714
  }, x = async (_) => {
5715
5715
  if (!e.value) return;
5716
5716
  if (n.edges.some(
@@ -5737,7 +5737,7 @@ const Eo = {
5737
5737
  n.updateNodeData(e.value.id, { enableImageSequence: _ }), S("enableImageSequence", _), _ && n.initializeSubsequentFrames(e.value.id);
5738
5738
  }, I = (_) => {
5739
5739
  if (!_.dependsOn || !e.value) return !0;
5740
- const { field: w, value: u } = _.dependsOn, f = $(w);
5740
+ const { field: T, value: u } = _.dependsOn, f = $(T);
5741
5741
  if (typeof u == "string" && u.startsWith("!")) {
5742
5742
  const m = u.substring(1);
5743
5743
  return f !== m;
@@ -5755,8 +5755,8 @@ const Eo = {
5755
5755
  };
5756
5756
  return me(() => e.value?.id, async (_) => {
5757
5757
  if (!_ || !e.value) return;
5758
- const w = e.value.type, u = e.value.data, f = u.input_schema || u.inputSchema;
5759
- if (w === "dataSource" && f && f.properties && !f.properties.windowSeconds) {
5758
+ const T = e.value.type, u = e.value.data, f = u.input_schema || u.inputSchema;
5759
+ if (T === "dataSource" && f && f.properties && !f.properties.windowSeconds) {
5760
5760
  f.properties.windowSeconds = {
5761
5761
  type: "number",
5762
5762
  title: "协同窗口(秒)",
@@ -5779,11 +5779,11 @@ const Eo = {
5779
5779
  return;
5780
5780
  }
5781
5781
  if (f && f.properties && Object.keys(f.properties).length > 0) return;
5782
- const m = await O(w);
5782
+ const m = await O(T);
5783
5783
  if (!m) return;
5784
5784
  const l = e.value?.data;
5785
5785
  if (!l) return;
5786
- const k = T("dataSource", m.inputSchema, {
5786
+ const k = w("dataSource", m.inputSchema, {
5787
5787
  ...m.arguments,
5788
5788
  ...l.arguments
5789
5789
  });
@@ -5793,11 +5793,11 @@ const Eo = {
5793
5793
  extraConfig: m.extraConfig,
5794
5794
  arguments: k.arguments
5795
5795
  });
5796
- }, { immediate: !0 }), (_, w) => {
5796
+ }, { immediate: !0 }), (_, T) => {
5797
5797
  const u = y("el-button"), f = y("el-divider"), m = y("el-icon"), l = y("el-tooltip"), k = y("el-option"), D = y("el-select"), v = y("el-switch"), N = y("el-input-number"), H = y("el-input"), j = y("el-form-item"), L = y("el-form");
5798
5798
  return s(), U("div", null, [
5799
5799
  C("div", Sl, [
5800
- w[3] || (w[3] = C("h3", null, "节点配置", -1)),
5800
+ T[3] || (T[3] = C("h3", null, "节点配置", -1)),
5801
5801
  o(u, {
5802
5802
  type: "danger",
5803
5803
  size: "small",
@@ -5807,8 +5807,8 @@ const Eo = {
5807
5807
  }, null, 8, ["icon"])
5808
5808
  ]),
5809
5809
  o(f),
5810
- C("div", Tl, [
5811
- w[4] || (w[4] = C("h4", null, "数据源配置", -1)),
5810
+ C("div", wl, [
5811
+ T[4] || (T[4] = C("h4", null, "数据源配置", -1)),
5812
5812
  o(L, {
5813
5813
  "label-position": "top",
5814
5814
  size: "default"
@@ -5879,8 +5879,8 @@ const Eo = {
5879
5879
  _: 1
5880
5880
  })
5881
5881
  ]),
5882
- C("div", wl, [
5883
- w[5] || (w[5] = C("h4", null, "分支配置", -1)),
5882
+ C("div", Tl, [
5883
+ T[5] || (T[5] = C("h4", null, "分支配置", -1)),
5884
5884
  o(L, {
5885
5885
  "label-position": "top",
5886
5886
  size: "default"
@@ -5890,7 +5890,7 @@ const Eo = {
5890
5890
  default: d(() => [
5891
5891
  o(D, {
5892
5892
  "model-value": e.value?.data.branchLogic || "and",
5893
- onChange: w[0] || (w[0] = (P) => q(n).updateNodeData(e.value.id, { branchLogic: P })),
5893
+ onChange: T[0] || (T[0] = (P) => q(n).updateNodeData(e.value.id, { branchLogic: P })),
5894
5894
  style: { width: "100%" }
5895
5895
  }, {
5896
5896
  default: d(() => [
@@ -5912,23 +5912,23 @@ const Eo = {
5912
5912
  _: 1
5913
5913
  })
5914
5914
  ]),
5915
- o(we, {
5915
+ o(Te, {
5916
5916
  fields: A.value.filter((P) => P.isExtension),
5917
5917
  "node-data": e.value?.data,
5918
5918
  onUpdate: S,
5919
- onFocus: w[1] || (w[1] = (P, W) => q(g)("dataSource", P, W, e.value?.data?.arguments, e.value?.id)),
5920
- onBlur: w[2] || (w[2] = (P, W) => q(h)("dataSource", P, W, e.value?.data?.arguments, e.value?.id))
5919
+ onFocus: T[1] || (T[1] = (P, W) => q(g)("dataSource", P, W, e.value?.data?.arguments, e.value?.id)),
5920
+ onBlur: T[2] || (T[2] = (P, W) => q(h)("dataSource", P, W, e.value?.data?.arguments, e.value?.id))
5921
5921
  }, null, 8, ["fields", "node-data"])
5922
5922
  ]);
5923
5923
  };
5924
5924
  }
5925
- }, kl = /* @__PURE__ */ re(Nl, [["__scopeId", "data-v-73134f32"]]), El = {
5925
+ }, kl = /* @__PURE__ */ re(Nl, [["__scopeId", "data-v-cb2f277a"]]), El = {
5926
5926
  safety: "安全检测",
5927
5927
  security: "安防监控",
5928
5928
  traffic: "交通监控",
5929
5929
  behavior: "行为分析"
5930
5930
  }, At = () => {
5931
- const c = le([]), n = le(!1), e = le(null), O = le(""), T = async (x = !1) => {
5931
+ const c = le([]), n = le(!1), e = le(null), O = le(""), w = async (x = !1) => {
5932
5932
  n.value = !0, e.value = null;
5933
5933
  try {
5934
5934
  const I = await $e(Ce.SMALL, "");
@@ -5939,15 +5939,15 @@ const Eo = {
5939
5939
  n.value = !1;
5940
5940
  }
5941
5941
  }, i = async () => {
5942
- c.value = [], await T(!0);
5942
+ c.value = [], await w(!0);
5943
5943
  }, g = (x) => c.value.find((I) => I.id === x || I.title === x), h = (x) => {
5944
5944
  const I = g(x);
5945
5945
  if (!I) return {};
5946
5946
  const F = I.inputSchema || I.input_schema;
5947
5947
  if (!F || !F.properties) return {};
5948
5948
  const _ = {};
5949
- return Object.entries(F.properties).forEach(([w, u]) => {
5950
- u.default !== void 0 && (_[w] = u.default);
5949
+ return Object.entries(F.properties).forEach(([T, u]) => {
5950
+ u.default !== void 0 && (_[T] = u.default);
5951
5951
  }), _;
5952
5952
  }, A = (x) => {
5953
5953
  const I = g(x);
@@ -5955,13 +5955,13 @@ const Eo = {
5955
5955
  const F = I.inputSchema || I.input_schema;
5956
5956
  if (!F || !F.properties) return [];
5957
5957
  const _ = F.required || [];
5958
- return Object.entries(F.properties).map(([w, u]) => ({
5959
- key: w,
5958
+ return Object.entries(F.properties).map(([T, u]) => ({
5959
+ key: T,
5960
5960
  type: u.type,
5961
- label: u.title || u.description || w,
5961
+ label: u.title || u.description || T,
5962
5962
  description: u.description || "",
5963
5963
  default: u.default,
5964
- required: _.includes(w) || u.required || !1,
5964
+ required: _.includes(T) || u.required || !1,
5965
5965
  min: u.minimum,
5966
5966
  max: u.maximum,
5967
5967
  step: u.step,
@@ -5982,7 +5982,7 @@ const Eo = {
5982
5982
  error: e,
5983
5983
  searchKeyword: O,
5984
5984
  filteredModels: R,
5985
- loadSmallModels: T,
5985
+ loadSmallModels: w,
5986
5986
  reloadSmallModels: i,
5987
5987
  getModelConfig: g,
5988
5988
  getTypeLabel: $,
@@ -5991,8 +5991,8 @@ const Eo = {
5991
5991
  validateArguments: (x, I) => {
5992
5992
  const F = g(x);
5993
5993
  if (!F) return { valid: !1, errors: ["模型不存在"] };
5994
- const _ = [], w = F.inputSchema || F.input_schema;
5995
- return !w || !w.properties ? { valid: !0, errors: [] } : (Object.entries(w.properties).forEach(([u, f]) => {
5994
+ const _ = [], T = F.inputSchema || F.input_schema;
5995
+ return !T || !T.properties ? { valid: !0, errors: [] } : (Object.entries(T.properties).forEach(([u, f]) => {
5996
5996
  const m = I[u];
5997
5997
  if (f.required && (m == null || m === "")) {
5998
5998
  _.push(`${f.title || u} 为必填项`);
@@ -6035,7 +6035,7 @@ const Eo = {
6035
6035
  setup(c, { emit: n }) {
6036
6036
  const e = n, {
6037
6037
  loading: O,
6038
- error: T,
6038
+ error: w,
6039
6039
  searchKeyword: i,
6040
6040
  filteredModels: g,
6041
6041
  loadSmallModels: h,
@@ -6056,9 +6056,9 @@ const Eo = {
6056
6056
  return ct(() => {
6057
6057
  h();
6058
6058
  }), (F, _) => {
6059
- const w = y("el-input"), u = y("el-icon"), f = y("el-button"), m = y("el-tag");
6059
+ const T = y("el-input"), u = y("el-icon"), f = y("el-button"), m = y("el-tag");
6060
6060
  return s(), U("div", Al, [
6061
- o(w, {
6061
+ o(T, {
6062
6062
  modelValue: q(i),
6063
6063
  "onUpdate:modelValue": _[0] || (_[0] = (l) => dt(i) ? i.value = l : null),
6064
6064
  placeholder: "搜索小模型(名称、类型、描述)",
@@ -6075,14 +6075,14 @@ const Eo = {
6075
6075
  _: 1
6076
6076
  }),
6077
6077
  _[2] || (_[2] = C("span", null, "加载中...", -1))
6078
- ])) : q(T) ? (s(), U("div", Ll, [
6078
+ ])) : q(w) ? (s(), U("div", Ll, [
6079
6079
  o(u, { class: "error-icon" }, {
6080
6080
  default: d(() => [
6081
6081
  o(q(St))
6082
6082
  ]),
6083
6083
  _: 1
6084
6084
  }),
6085
- C("p", null, Z(q(T)), 1),
6085
+ C("p", null, Z(q(w)), 1),
6086
6086
  o(f, {
6087
6087
  type: "primary",
6088
6088
  onClick: S
@@ -6155,7 +6155,7 @@ const Eo = {
6155
6155
  ]);
6156
6156
  };
6157
6157
  }
6158
- }, Pl = /* @__PURE__ */ re(Vl, [["__scopeId", "data-v-6febf217"]]), Gl = { class: "config-header" }, Ul = { class: "config-section" }, jl = {
6158
+ }, Pl = /* @__PURE__ */ re(Vl, [["__scopeId", "data-v-e86dc514"]]), Gl = { class: "config-header" }, Ul = { class: "config-section" }, jl = {
6159
6159
  key: 0,
6160
6160
  class: "model-selector-wrapper"
6161
6161
  }, zl = {
@@ -6170,7 +6170,7 @@ const Eo = {
6170
6170
  }, Kl = {
6171
6171
  __name: "SmallModelConfig",
6172
6172
  setup(c) {
6173
- const n = de(), e = Q(() => n.selectedNode), { models: O, loadSmallModels: T } = At(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = Te(), R = Q(() => {
6173
+ const n = de(), e = Q(() => n.selectedNode), { models: O, loadSmallModels: w } = At(), { apply: i, notifyChange: g, notifyFocus: h, notifyBlur: A } = we(), R = Q(() => {
6174
6174
  if (!e.value) return [];
6175
6175
  const l = e.value.data.input_schema || e.value.data.inputSchema;
6176
6176
  if (!l || !l.properties) return [];
@@ -6218,9 +6218,9 @@ const Eo = {
6218
6218
  Array.isArray(D) && x(l, D);
6219
6219
  } catch {
6220
6220
  }
6221
- }, w = async (l) => {
6221
+ }, T = async (l) => {
6222
6222
  if (!e.value) return;
6223
- await T(!0);
6223
+ await w(!0);
6224
6224
  const k = l.inputSchema || l.input_schema || {}, D = {};
6225
6225
  k.properties && Object.entries(k.properties).forEach(([N, H]) => {
6226
6226
  H.default !== void 0 && (D[N] = H.default);
@@ -6316,7 +6316,7 @@ const Eo = {
6316
6316
  ])) : (s(), U("div", jl, [
6317
6317
  o(Pl, {
6318
6318
  "model-value": e.value?.data.modelId,
6319
- onSelect: w
6319
+ onSelect: T
6320
6320
  }, null, 8, ["model-value"])
6321
6321
  ]))
6322
6322
  ]),
@@ -6423,7 +6423,7 @@ const Eo = {
6423
6423
  _: 1
6424
6424
  })
6425
6425
  ])) : K("", !0),
6426
- o(we, {
6426
+ o(Te, {
6427
6427
  fields: R.value.filter((t) => t.isExtension),
6428
6428
  "node-data": e.value?.data,
6429
6429
  onUpdate: x,
@@ -6433,8 +6433,8 @@ const Eo = {
6433
6433
  ]);
6434
6434
  };
6435
6435
  }
6436
- }, Ql = /* @__PURE__ */ re(Kl, [["__scopeId", "data-v-45931342"]]), Zl = () => {
6437
- const c = de(), n = le([]), e = le(!1), O = le(null), T = async ($ = !1) => {
6436
+ }, Ql = /* @__PURE__ */ re(Kl, [["__scopeId", "data-v-952e2de1"]]), Zl = () => {
6437
+ const c = de(), n = le([]), e = le(!1), O = le(null), w = async ($ = !1) => {
6438
6438
  e.value = !0, O.value = null;
6439
6439
  try {
6440
6440
  const S = await $e(Ce.DETECTION, "");
@@ -6475,14 +6475,14 @@ const Eo = {
6475
6475
  ...$
6476
6476
  })));
6477
6477
  return ct(() => {
6478
- T();
6478
+ w();
6479
6479
  }), {
6480
6480
  // 数据状态
6481
6481
  detectionTargets: n,
6482
6482
  loading: e,
6483
6483
  error: O,
6484
6484
  // 加载方法
6485
- loadDetectionTargets: T,
6485
+ loadDetectionTargets: w,
6486
6486
  // 工具方法
6487
6487
  getTargetById: i,
6488
6488
  getDefaultConfig: g,
@@ -6518,7 +6518,7 @@ const Eo = {
6518
6518
  return (...I) => {
6519
6519
  clearTimeout(x), x = setTimeout(() => $(...I), S);
6520
6520
  };
6521
- }, O = c, T = n, i = le([]), g = () => {
6521
+ }, O = c, w = n, i = le([]), g = () => {
6522
6522
  const $ = O.primaryValue || [], S = O.pairedValue || [], x = Math.max($.length, S.length, 1);
6523
6523
  i.value = Array.from({ length: x }, (I, F) => ({
6524
6524
  primary: $[F] || "",
@@ -6529,7 +6529,7 @@ const Eo = {
6529
6529
  g();
6530
6530
  }, { immediate: !0, deep: !0 });
6531
6531
  const h = e(($, S) => {
6532
- T("update", $, S);
6532
+ w("update", $, S);
6533
6533
  }, 300);
6534
6534
  me(i, ($) => {
6535
6535
  const S = $.map((I) => I.primary), x = $.map((I) => I.paired);
@@ -6546,19 +6546,19 @@ const Eo = {
6546
6546
  return ($, S) => {
6547
6547
  const x = y("el-input"), I = y("el-input-number"), F = y("el-button");
6548
6548
  return s(), U("div", es, [
6549
- (s(!0), U(ae, null, oe(i.value, (_, w) => (s(), U("div", {
6550
- key: w,
6549
+ (s(!0), U(ae, null, oe(i.value, (_, T) => (s(), U("div", {
6550
+ key: T,
6551
6551
  class: "input-row"
6552
6552
  }, [
6553
6553
  o(x, {
6554
- modelValue: i.value[w].primary,
6555
- "onUpdate:modelValue": (u) => i.value[w].primary = u,
6554
+ modelValue: i.value[T].primary,
6555
+ "onUpdate:modelValue": (u) => i.value[T].primary = u,
6556
6556
  placeholder: c.primaryField.description || "输入内容",
6557
- class: be([{ "is-error": !i.value[w].primary || i.value[w].primary.trim() === "" }, "primary-input"])
6557
+ class: be([{ "is-error": !i.value[T].primary || i.value[T].primary.trim() === "" }, "primary-input"])
6558
6558
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "class"]),
6559
6559
  o(I, {
6560
- modelValue: i.value[w].paired,
6561
- "onUpdate:modelValue": (u) => i.value[w].paired = u,
6560
+ modelValue: i.value[T].paired,
6561
+ "onUpdate:modelValue": (u) => i.value[T].paired = u,
6562
6562
  min: c.pairedField.min || 0,
6563
6563
  max: c.pairedField.max || 1,
6564
6564
  step: c.pairedField.step || 0.1,
@@ -6570,7 +6570,7 @@ const Eo = {
6570
6570
  circle: "",
6571
6571
  size: "small",
6572
6572
  disabled: i.value.length === 1,
6573
- onClick: (u) => R(w)
6573
+ onClick: (u) => R(T)
6574
6574
  }, null, 8, ["icon", "disabled", "onClick"])
6575
6575
  ]))), 128)),
6576
6576
  o(F, {
@@ -6599,7 +6599,7 @@ const Eo = {
6599
6599
  }, is = {
6600
6600
  __name: "DetectionTargetConfig",
6601
6601
  setup(c) {
6602
- const n = de(), e = Q(() => n.selectedNode), { detectionTargets: O, loading: T, loadDetectionTargets: i } = Zl(), { apply: g, notifyChange: h, notifyFocus: A, notifyBlur: R } = Te(), $ = Q(() => {
6602
+ const n = de(), e = Q(() => n.selectedNode), { detectionTargets: O, loading: w, loadDetectionTargets: i } = Zl(), { apply: g, notifyChange: h, notifyFocus: A, notifyBlur: R } = we(), $ = Q(() => {
6603
6603
  if (!e.value) return [];
6604
6604
  const v = e.value.data.input_schema || e.value.data.inputSchema;
6605
6605
  if (!v || !v.properties) return [];
@@ -6638,7 +6638,7 @@ const Eo = {
6638
6638
  const _ = (v) => {
6639
6639
  if (e.value)
6640
6640
  return e.value.data.arguments?.[v];
6641
- }, w = (v, N) => {
6641
+ }, T = (v, N) => {
6642
6642
  if (!e.value) return;
6643
6643
  const j = { ...e.value.data.arguments || {}, [v]: N };
6644
6644
  n.updateNodeData(e.value.id, {
@@ -6658,7 +6658,7 @@ const Eo = {
6658
6658
  }, m = (v, N) => {
6659
6659
  try {
6660
6660
  const H = JSON.parse(N);
6661
- Array.isArray(H) && w(v, H);
6661
+ Array.isArray(H) && T(v, H);
6662
6662
  } catch {
6663
6663
  }
6664
6664
  }, l = (v, N, H, j) => {
@@ -6786,7 +6786,7 @@ const Eo = {
6786
6786
  onChange: k,
6787
6787
  placeholder: "请选择检测目标",
6788
6788
  style: { width: "100%" },
6789
- loading: q(T),
6789
+ loading: q(w),
6790
6790
  filterable: ""
6791
6791
  }, {
6792
6792
  default: d(() => [
@@ -6889,7 +6889,7 @@ const Eo = {
6889
6889
  a.options && a.type === "string" ? (s(), G(P, {
6890
6890
  key: 0,
6891
6891
  "model-value": _(a.key),
6892
- onChange: (r) => w(a.key, r),
6892
+ onChange: (r) => T(a.key, r),
6893
6893
  style: { width: "100%" }
6894
6894
  }, {
6895
6895
  default: d(() => [
@@ -6903,11 +6903,11 @@ const Eo = {
6903
6903
  }, 1032, ["model-value", "onChange"])) : a.type === "boolean" ? (s(), G(V, {
6904
6904
  key: 1,
6905
6905
  "model-value": _(a.key),
6906
- onChange: (r) => w(a.key, r)
6906
+ onChange: (r) => T(a.key, r)
6907
6907
  }, null, 8, ["model-value", "onChange"])) : a.type === "number" || a.type === "integer" ? (s(), G(M, {
6908
6908
  key: 2,
6909
6909
  "model-value": _(a.key),
6910
- onChange: (r) => w(a.key, r),
6910
+ onChange: (r) => T(a.key, r),
6911
6911
  min: a.min,
6912
6912
  max: a.max,
6913
6913
  step: a.step || (a.type === "integer" ? 1 : 0.1),
@@ -6930,7 +6930,7 @@ const Eo = {
6930
6930
  ])) : a.type === "array" && a.options ? (s(), G(P, {
6931
6931
  key: 5,
6932
6932
  "model-value": _(a.key),
6933
- onChange: (r) => w(a.key, r),
6933
+ onChange: (r) => T(a.key, r),
6934
6934
  multiple: "",
6935
6935
  style: { width: "100%" }
6936
6936
  }, {
@@ -6945,7 +6945,7 @@ const Eo = {
6945
6945
  }, 1032, ["model-value", "onChange"])) : (s(), G(t, {
6946
6946
  key: 6,
6947
6947
  "model-value": _(a.key),
6948
- onInput: (r) => w(a.key, r),
6948
+ onInput: (r) => T(a.key, r),
6949
6949
  maxlength: a.maxLength,
6950
6950
  "show-word-limit": !!a.maxLength
6951
6951
  }, null, 8, ["model-value", "onInput", "maxlength", "show-word-limit"]))
@@ -6958,43 +6958,43 @@ const Eo = {
6958
6958
  _: 1
6959
6959
  })
6960
6960
  ])) : K("", !0),
6961
- o(we, {
6961
+ o(Te, {
6962
6962
  fields: $.value.filter((a) => a.isExtension),
6963
6963
  "node-data": e.value?.data,
6964
- onUpdate: w,
6964
+ onUpdate: T,
6965
6965
  onFocus: N[0] || (N[0] = (a, r) => q(A)("detectionTarget", a, r, e.value?.data?.arguments, e.value?.id)),
6966
6966
  onBlur: N[1] || (N[1] = (a, r) => q(R)("detectionTarget", a, r, e.value?.data?.arguments, e.value?.id))
6967
6967
  }, null, 8, ["fields", "node-data"])
6968
6968
  ]);
6969
6969
  };
6970
6970
  }
6971
- }, us = /* @__PURE__ */ re(is, [["__scopeId", "data-v-47b88595"]]), ds = { class: "config-header" }, cs = { class: "config-section" }, ms = {
6971
+ }, us = /* @__PURE__ */ re(is, [["__scopeId", "data-v-a40b43c9"]]), ds = { class: "config-header" }, cs = { class: "config-section" }, ms = {
6972
6972
  key: 0,
6973
6973
  style: { "margin-bottom": "8px" }
6974
6974
  }, ps = {
6975
6975
  __name: "TargetCountConfig",
6976
6976
  setup(c) {
6977
- const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: T, notifyFocus: i, notifyBlur: g } = Te(), h = Q(() => {
6977
+ const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: w, notifyFocus: i, notifyBlur: g } = we(), h = Q(() => {
6978
6978
  const F = O.value?.targetCount;
6979
- return !F || !F.schema?.properties ? [] : Object.entries(F.schema.properties).map(([_, w]) => ({
6979
+ return !F || !F.schema?.properties ? [] : Object.entries(F.schema.properties).map(([_, T]) => ({
6980
6980
  key: _,
6981
- type: w.type,
6982
- label: w.title || _,
6983
- description: w.description || "",
6984
- default: w.default,
6981
+ type: T.type,
6982
+ label: T.title || _,
6983
+ description: T.description || "",
6984
+ default: T.default,
6985
6985
  required: (F.schema.required || []).includes(_),
6986
- min: w.minimum,
6987
- max: w.maximum,
6988
- step: w.step,
6989
- options: w.enum,
6990
- optionLabels: w.enumLabels || w.enum
6986
+ min: T.minimum,
6987
+ max: T.maximum,
6988
+ step: T.step,
6989
+ options: T.enum,
6990
+ optionLabels: T.enumLabels || T.enum
6991
6991
  }));
6992
6992
  }), A = (F, _) => {
6993
6993
  if (!e.value) return;
6994
- const w = { ...e.value.data.arguments, [F]: _ };
6994
+ const T = { ...e.value.data.arguments, [F]: _ };
6995
6995
  n.updateNodeData(e.value.id, {
6996
- arguments: w
6997
- }), T("targetCount", F, _, w, e.value.id);
6996
+ arguments: T
6997
+ }), w("targetCount", F, _, T, e.value.id);
6998
6998
  };
6999
6999
  me(() => e.value?.id, () => {
7000
7000
  const F = O.value?.targetCount;
@@ -7007,23 +7007,23 @@ const Eo = {
7007
7007
  const R = (F) => {
7008
7008
  if (!e.value) return;
7009
7009
  const _ = { ...e.value.data.arguments, conditionRelation: F };
7010
- n.updateNodeData(e.value.id, { arguments: _ }), T("targetCount", "conditionRelation", F, _, e.value.id);
7010
+ n.updateNodeData(e.value.id, { arguments: _ }), w("targetCount", "conditionRelation", F, _, e.value.id);
7011
7011
  }, $ = () => {
7012
7012
  if (!e.value) return;
7013
- const _ = [...e.value.data.arguments?.alertConditions || [], { operator: ">", value: 1 }], w = { ...e.value.data.arguments, alertConditions: _ };
7014
- n.updateNodeData(e.value.id, { arguments: w }), T("targetCount", "alertConditions", _, w, e.value.id);
7015
- }, S = (F, _, w) => {
7013
+ const _ = [...e.value.data.arguments?.alertConditions || [], { operator: ">", value: 1 }], T = { ...e.value.data.arguments, alertConditions: _ };
7014
+ n.updateNodeData(e.value.id, { arguments: T }), w("targetCount", "alertConditions", _, T, e.value.id);
7015
+ }, S = (F, _, T) => {
7016
7016
  if (!e.value) return;
7017
7017
  const u = [...e.value.data.arguments?.alertConditions || []];
7018
- u[F] = { ...u[F], [_]: w };
7018
+ u[F] = { ...u[F], [_]: T };
7019
7019
  const f = { ...e.value.data.arguments, alertConditions: u };
7020
- n.updateNodeData(e.value.id, { arguments: f }), T("targetCount", "alertConditions", u, f, e.value.id);
7020
+ n.updateNodeData(e.value.id, { arguments: f }), w("targetCount", "alertConditions", u, f, e.value.id);
7021
7021
  }, x = (F) => {
7022
7022
  if (!e.value) return;
7023
7023
  const _ = [...e.value.data.arguments?.alertConditions || []];
7024
7024
  _.splice(F, 1);
7025
- const w = { ...e.value.data.arguments, alertConditions: _ };
7026
- n.updateNodeData(e.value.id, { arguments: w }), T("targetCount", "alertConditions", _, w, e.value.id);
7025
+ const T = { ...e.value.data.arguments, alertConditions: _ };
7026
+ n.updateNodeData(e.value.id, { arguments: T }), w("targetCount", "alertConditions", _, T, e.value.id);
7027
7027
  }, I = () => {
7028
7028
  e.value && ye.confirm("确定要删除这个节点吗?", "确认删除", {
7029
7029
  confirmButtonText: "删除",
@@ -7035,11 +7035,11 @@ const Eo = {
7035
7035
  });
7036
7036
  };
7037
7037
  return (F, _) => {
7038
- const w = y("el-button"), u = y("el-divider"), f = y("el-text"), m = y("el-option"), l = y("el-select"), k = y("el-input-number"), D = y("el-radio"), v = y("el-radio-group"), N = y("el-form-item"), H = y("el-form");
7038
+ const T = y("el-button"), u = y("el-divider"), f = y("el-text"), m = y("el-option"), l = y("el-select"), k = y("el-input-number"), D = y("el-radio"), v = y("el-radio-group"), N = y("el-form-item"), H = y("el-form");
7039
7039
  return s(), U("div", null, [
7040
7040
  C("div", ds, [
7041
7041
  _[3] || (_[3] = C("h3", null, "节点配置", -1)),
7042
- o(w, {
7042
+ o(T, {
7043
7043
  type: "danger",
7044
7044
  size: "small",
7045
7045
  icon: q(xe),
@@ -7126,7 +7126,7 @@ const Eo = {
7126
7126
  "controls-position": "right",
7127
7127
  placeholder: "请输入数值"
7128
7128
  }, null, 8, ["model-value", "onChange"]),
7129
- (e.value?.data.arguments?.alertConditions || []).length > 1 ? (s(), G(w, {
7129
+ (e.value?.data.arguments?.alertConditions || []).length > 1 ? (s(), G(T, {
7130
7130
  key: 0,
7131
7131
  type: "danger",
7132
7132
  icon: q(xe),
@@ -7166,7 +7166,7 @@ const Eo = {
7166
7166
  _: 1
7167
7167
  }, 8, ["model-value"])
7168
7168
  ])) : K("", !0),
7169
- o(w, {
7169
+ o(T, {
7170
7170
  type: "primary",
7171
7171
  link: "",
7172
7172
  icon: q(Ie),
@@ -7184,7 +7184,7 @@ const Eo = {
7184
7184
  _: 1
7185
7185
  })
7186
7186
  ]),
7187
- o(we, {
7187
+ o(Te, {
7188
7188
  fields: h.value,
7189
7189
  "node-data": e.value?.data,
7190
7190
  onUpdate: A,
@@ -7194,10 +7194,10 @@ const Eo = {
7194
7194
  ]);
7195
7195
  };
7196
7196
  }
7197
- }, gs = /* @__PURE__ */ re(ps, [["__scopeId", "data-v-27bdc740"]]), fs = { class: "config-header" }, vs = { class: "config-section" }, ys = { style: { display: "flex", "align-items": "center", gap: "8px" } }, _s = { style: { display: "flex", "align-items": "center", gap: "8px" } }, hs = { style: { display: "flex", "align-items": "center", gap: "8px" } }, bs = {
7197
+ }, gs = /* @__PURE__ */ re(ps, [["__scopeId", "data-v-869ec3ef"]]), fs = { class: "config-header" }, vs = { class: "config-section" }, ys = { style: { display: "flex", "align-items": "center", gap: "8px" } }, _s = { style: { display: "flex", "align-items": "center", gap: "8px" } }, hs = { style: { display: "flex", "align-items": "center", gap: "8px" } }, bs = {
7198
7198
  __name: "TimerTargetConfig",
7199
7199
  setup(c) {
7200
- const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: T, notifyFocus: i, notifyBlur: g } = Te(), h = Q(() => {
7200
+ const n = de(), e = Q(() => n.selectedNode), { extensions: O, notifyChange: w, notifyFocus: i, notifyBlur: g } = we(), h = Q(() => {
7201
7201
  const m = O.value?.timerTarget;
7202
7202
  return !m || !m.schema?.properties ? [] : Object.entries(m.schema.properties).map(([l, k]) => ({
7203
7203
  key: l,
@@ -7217,7 +7217,7 @@ const Eo = {
7217
7217
  const k = { ...e.value.data.arguments, [m]: l };
7218
7218
  n.updateNodeData(e.value.id, {
7219
7219
  arguments: k
7220
- }), T("timerTarget", m, l, k, e.value.id);
7220
+ }), w("timerTarget", m, l, k, e.value.id);
7221
7221
  };
7222
7222
  me(() => e.value?.id, () => {
7223
7223
  const m = O.value?.timerTarget;
@@ -7230,23 +7230,23 @@ const Eo = {
7230
7230
  const R = (m) => {
7231
7231
  if (!e.value) return;
7232
7232
  const l = { ...e.value.data.arguments, duration: m };
7233
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "duration", m, l, e.value.id);
7233
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "duration", m, l, e.value.id);
7234
7234
  }, $ = (m) => {
7235
7235
  if (!e.value) return;
7236
7236
  const l = { ...e.value.data.arguments, similarity_enabled: m };
7237
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "similarity_enabled", m, l, e.value.id);
7237
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "similarity_enabled", m, l, e.value.id);
7238
7238
  }, S = (m) => {
7239
7239
  if (!e.value) return;
7240
7240
  const l = { ...e.value.data.arguments, similarity_threshold: m };
7241
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "similarity_threshold", m, l, e.value.id);
7241
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "similarity_threshold", m, l, e.value.id);
7242
7242
  }, x = (m) => {
7243
7243
  if (!e.value) return;
7244
7244
  const l = { ...e.value.data.arguments, hit_rate_enabled: m };
7245
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "hit_rate_enabled", m, l, e.value.id);
7245
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "hit_rate_enabled", m, l, e.value.id);
7246
7246
  }, I = (m) => {
7247
7247
  if (!e.value) return;
7248
7248
  const l = { ...e.value.data.arguments, hit_rate_threshold: m };
7249
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "hit_rate_threshold", m, l, e.value.id);
7249
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "hit_rate_threshold", m, l, e.value.id);
7250
7250
  }, F = (m) => {
7251
7251
  if (!e.value) return;
7252
7252
  const l = {
@@ -7256,7 +7256,7 @@ const Eo = {
7256
7256
  enabled: m
7257
7257
  }
7258
7258
  };
7259
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7259
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7260
7260
  }, _ = (m) => {
7261
7261
  if (!e.value) return;
7262
7262
  const l = {
@@ -7266,8 +7266,8 @@ const Eo = {
7266
7266
  operator: m
7267
7267
  }
7268
7268
  };
7269
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7270
- }, w = (m) => {
7269
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7270
+ }, T = (m) => {
7271
7271
  if (!e.value) return;
7272
7272
  const l = {
7273
7273
  ...e.value.data.arguments,
@@ -7276,11 +7276,11 @@ const Eo = {
7276
7276
  threshold: m
7277
7277
  }
7278
7278
  };
7279
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7279
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "overlap_detection", l.overlap_detection, l, e.value.id);
7280
7280
  }, u = (m) => {
7281
7281
  if (!e.value) return;
7282
7282
  const l = { ...e.value.data.arguments, reset_timer: m };
7283
- n.updateNodeData(e.value.id, { arguments: l }), T("timerTarget", "reset_timer", m, l, e.value.id);
7283
+ n.updateNodeData(e.value.id, { arguments: l }), w("timerTarget", "reset_timer", m, l, e.value.id);
7284
7284
  }, f = () => {
7285
7285
  e.value && ye.confirm("确定要删除这个节点吗?", "确认删除", {
7286
7286
  confirmButtonText: "删除",
@@ -7509,7 +7509,7 @@ const Eo = {
7509
7509
  default: d(() => [
7510
7510
  o(v, {
7511
7511
  "model-value": e.value?.data.arguments?.overlap_detection?.threshold,
7512
- onChange: l[7] || (l[7] = (t) => w(t)),
7512
+ onChange: l[7] || (l[7] = (t) => T(t)),
7513
7513
  min: 0,
7514
7514
  max: 100,
7515
7515
  precision: 0,
@@ -7562,7 +7562,7 @@ const Eo = {
7562
7562
  _: 1
7563
7563
  })
7564
7564
  ]),
7565
- o(we, {
7565
+ o(Te, {
7566
7566
  fields: h.value,
7567
7567
  "node-data": e.value?.data,
7568
7568
  onUpdate: A,
@@ -7572,7 +7572,7 @@ const Eo = {
7572
7572
  ]);
7573
7573
  };
7574
7574
  }
7575
- }, xs = /* @__PURE__ */ re(bs, [["__scopeId", "data-v-21bba915"]]), Cs = { class: "node-config-panel" }, Ss = { class: "config-content" }, Ts = {
7575
+ }, xs = /* @__PURE__ */ re(bs, [["__scopeId", "data-v-ebfd5be0"]]), Cs = { class: "node-config-panel" }, Ss = { class: "config-content" }, ws = {
7576
7576
  __name: "NodeConfigPanel",
7577
7577
  setup(c) {
7578
7578
  const n = de(), e = {
@@ -7592,21 +7592,24 @@ const Eo = {
7592
7592
  timerTarget: xs,
7593
7593
  faceRecognition: it
7594
7594
  }, O = Q(() => {
7595
- const T = n.selectedEdge;
7596
- if (T)
7595
+ const w = n.selectedEdge;
7596
+ if (w)
7597
7597
  return n.nodes.find(
7598
- (h) => h.id === T.source
7598
+ (h) => h.id === w.source
7599
7599
  )?.data?.enableBranch && e.edge || null;
7600
7600
  const i = n.selectedNode;
7601
7601
  return i && e[i.type] || null;
7602
7602
  });
7603
- return (T, i) => (s(), U("div", Cs, [
7603
+ return (w, i) => (s(), U("div", Cs, [
7604
7604
  C("div", Ss, [
7605
7605
  O.value ? (s(), G(Mt(O.value), { key: 0 })) : K("", !0)
7606
7606
  ])
7607
7607
  ]));
7608
7608
  }
7609
- }, ws = /* @__PURE__ */ re(Ts, [["__scopeId", "data-v-3f5afb56"]]), Ns = { class: "workflow-editor" }, ks = { class: "editor-content" }, Es = {
7609
+ }, Ts = /* @__PURE__ */ re(ws, [["__scopeId", "data-v-5b5a9ed3"]]), Ns = {
7610
+ class: "workflow-editor",
7611
+ id: "workflow-editor"
7612
+ }, ks = { class: "editor-content" }, Es = {
7610
7613
  __name: "WorkflowEditor",
7611
7614
  props: {
7612
7615
  mode: {
@@ -7629,24 +7632,24 @@ const Eo = {
7629
7632
  Re("editorMode", n.mode), Re("nodeConfigExtensions", Q(() => n.nodeConfigExtensions)), Re("pageMode", Q(() => n.pageMode));
7630
7633
  const e = de(), O = Q(() => {
7631
7634
  if (e.selectedNodeId) return !0;
7632
- const T = e.selectedEdge;
7633
- return T ? !!e.nodes.find((g) => g.id === T.source)?.data?.enableBranch : !1;
7635
+ const w = e.selectedEdge;
7636
+ return w ? !!e.nodes.find((g) => g.id === w.source)?.data?.enableBranch : !1;
7634
7637
  });
7635
- return (T, i) => (s(), U("div", Ns, [
7638
+ return (w, i) => (s(), U("div", Ns, [
7636
7639
  o($n),
7637
7640
  C("div", ks, [
7638
7641
  o(Pn),
7639
7642
  o(_o),
7640
7643
  o(Ft, { name: "slide-right" }, {
7641
7644
  default: d(() => [
7642
- O.value ? (s(), G(ws, { key: 0 })) : K("", !0)
7645
+ O.value ? (s(), G(Ts, { key: 0 })) : K("", !0)
7643
7646
  ]),
7644
7647
  _: 1
7645
7648
  })
7646
7649
  ])
7647
7650
  ]));
7648
7651
  }
7649
- }, As = /* @__PURE__ */ re(Es, [["__scopeId", "data-v-7184f8a0"]]), Os = {
7652
+ }, As = /* @__PURE__ */ re(Es, [["__scopeId", "data-v-2ee2d5d7"]]), Os = {
7650
7653
  Box: gt,
7651
7654
  CircleCheck: pt,
7652
7655
  CircleClose: St,