st-comp 0.0.254 → 0.0.255

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.
@@ -6980,7 +6980,7 @@ var WX = { exports: {} };
6980
6980
  });
6981
6981
  })(WX);
6982
6982
  var f7e = WX.exports;
6983
- const qt = /* @__PURE__ */ h7e(f7e);
6983
+ const Ut = /* @__PURE__ */ h7e(f7e);
6984
6984
  var Vv = /* @__PURE__ */ ((n) => (n[n.TEXT = 1] = "TEXT", n[n.CLASS = 2] = "CLASS", n[n.STYLE = 4] = "STYLE", n[n.PROPS = 8] = "PROPS", n[n.FULL_PROPS = 16] = "FULL_PROPS", n[n.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", n[n.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", n[n.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", n[n.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", n[n.NEED_PATCH = 512] = "NEED_PATCH", n[n.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", n[n.HOISTED = -1] = "HOISTED", n[n.BAIL = -2] = "BAIL", n))(Vv || {});
6985
6985
  const M4 = (n) => {
6986
6986
  const e = pn(n) ? n : [n], t = [];
@@ -67650,7 +67650,7 @@ const $1t = (n) => {
67650
67650
  rich: {},
67651
67651
  formatter: (h) => {
67652
67652
  const { axisDimension: f, value: p } = h;
67653
- return f === "x" ? d ? "" : ["6", "7", "8"].includes(r) ? qt(p).format("YYYY-MM-DD") : p : String(Af(p));
67653
+ return f === "x" ? d ? "" : ["6", "7", "8"].includes(r) ? Ut(p).format("YYYY-MM-DD") : p : String(Af(p));
67654
67654
  }
67655
67655
  }
67656
67656
  },
@@ -67664,7 +67664,7 @@ const $1t = (n) => {
67664
67664
  show: !1
67665
67665
  },
67666
67666
  axisLabel: {
67667
- formatter: (h) => ["6", "7", "8"].includes(r) ? qt(h).format("YYYY-MM-DD") : h
67667
+ formatter: (h) => ["6", "7", "8"].includes(r) ? Ut(h).format("YYYY-MM-DD") : h
67668
67668
  }
67669
67669
  },
67670
67670
  yAxis: {
@@ -68079,7 +68079,7 @@ const oct = { class: "klineSub" }, sct = { class: "klineSub-tips" }, act = {
68079
68079
  formatter: (w) => {
68080
68080
  const { axisDimension: C, value: x } = w;
68081
68081
  if (C === "x")
68082
- return ["6", "7", "8"].includes(l.cycle) ? qt(x).format("YYYY-MM-DD") : x;
68082
+ return ["6", "7", "8"].includes(l.cycle) ? Ut(x).format("YYYY-MM-DD") : x;
68083
68083
  if (w.axisIndex === 1)
68084
68084
  return String(i(x));
68085
68085
  }
@@ -68097,7 +68097,7 @@ const oct = { class: "klineSub" }, sct = { class: "klineSub-tips" }, act = {
68097
68097
  show: !1
68098
68098
  },
68099
68099
  axisLabel: {
68100
- formatter: (w) => ["6", "7", "8"].includes(l.cycle) ? qt(w).format("YYYY-MM-DD") : w
68100
+ formatter: (w) => ["6", "7", "8"].includes(l.cycle) ? Ut(w).format("YYYY-MM-DD") : w
68101
68101
  }
68102
68102
  },
68103
68103
  yAxis: [
@@ -68381,26 +68381,26 @@ const gue = (n) => (yu("data-v-ae370bef"), n = n(), wu(), n), hct = {
68381
68381
  const { time: ue } = y.value;
68382
68382
  if (!h.brushRange || !(ue != null && ue.length) || !o)
68383
68383
  return;
68384
- let ne = qt(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"), de = qt(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"), ve = null, we = null;
68384
+ let ne = Ut(h.brushRange[0]).format("YYYY-MM-DD 00:00:00"), de = Ut(h.brushRange[1]).format("YYYY-MM-DD 23:59:59"), ve = null, we = null;
68385
68385
  switch (String(h.cycle)) {
68386
68386
  case "6": {
68387
- ve = ue.find((ge) => qt(ge).format("YYYY-MM-DD") === qt(ne).format("YYYY-MM-DD")), we = ve;
68387
+ ve = ue.find((ge) => Ut(ge).format("YYYY-MM-DD") === Ut(ne).format("YYYY-MM-DD")), we = ve;
68388
68388
  break;
68389
68389
  }
68390
68390
  case "7": {
68391
- ve = ue.find((ge) => qt(ge).day(5).format("YYYY-MM-DD") === qt(ne).day(5).format("YYYY-MM-DD")), we = ue.findLast((ge) => qt(ge).day(5).format("YYYY-MM-DD") === qt(de).day(5).format("YYYY-MM-DD"));
68391
+ ve = ue.find((ge) => Ut(ge).day(5).format("YYYY-MM-DD") === Ut(ne).day(5).format("YYYY-MM-DD")), we = ue.findLast((ge) => Ut(ge).day(5).format("YYYY-MM-DD") === Ut(de).day(5).format("YYYY-MM-DD"));
68392
68392
  break;
68393
68393
  }
68394
68394
  case "8": {
68395
- ve = ue.find((ge) => qt(ge).endOf("month").format("YYYY-MM-DD") === qt(ne).endOf("month").format("YYYY-MM-DD")), we = ue.findLast((ge) => qt(ge).endOf("month").format("YYYY-MM-DD") === qt(de).endOf("month").format("YYYY-MM-DD"));
68395
+ ve = ue.find((ge) => Ut(ge).endOf("month").format("YYYY-MM-DD") === Ut(ne).endOf("month").format("YYYY-MM-DD")), we = ue.findLast((ge) => Ut(ge).endOf("month").format("YYYY-MM-DD") === Ut(de).endOf("month").format("YYYY-MM-DD"));
68396
68396
  break;
68397
68397
  }
68398
68398
  default:
68399
68399
  ve = ue.find((ge) => {
68400
- const xe = qt(ge).format("YYYY-MM-DD") === qt(ne).format("YYYY-MM-DD"), Ae = new Date(ge).getTime() >= new Date(ne).getTime();
68400
+ const xe = Ut(ge).format("YYYY-MM-DD") === Ut(ne).format("YYYY-MM-DD"), Ae = new Date(ge).getTime() >= new Date(ne).getTime();
68401
68401
  return xe && Ae;
68402
68402
  }), we = ue.findLast((ge) => {
68403
- const xe = qt(ge).format("YYYY-MM-DD") === qt(de).format("YYYY-MM-DD"), Ae = new Date(ge).getTime() <= new Date(de).getTime();
68403
+ const xe = Ut(ge).format("YYYY-MM-DD") === Ut(de).format("YYYY-MM-DD"), Ae = new Date(ge).getTime() <= new Date(de).getTime();
68404
68404
  return xe && Ae;
68405
68405
  });
68406
68406
  }
@@ -68438,7 +68438,7 @@ const gue = (n) => (yu("data-v-ae370bef"), n = n(), wu(), n), hct = {
68438
68438
  showWarningLine: ee,
68439
68439
  getFactorData: z
68440
68440
  };
68441
- te && ce ? (B.startTime = te, B.endTime = ce) : te ? (B.startTime = te, B.limit = J) : ce ? (B.endTime = ce, B.limit = J) : (B.endTime = qt().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), B.limit = J);
68441
+ te && ce ? (B.startTime = te, B.endTime = ce) : te ? (B.startTime = te, B.limit = J) : ce ? (B.endTime = ce, B.limit = J) : (B.endTime = Ut().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), B.limit = J);
68442
68442
  const q = await U1t(B);
68443
68443
  if (!((de = (ne = (ue = q == null ? void 0 : q.body) == null ? void 0 : ue.kline) == null ? void 0 : ne.time) != null && de.length)) {
68444
68444
  p.value = !0, g.value = !1, L();
@@ -69719,16 +69719,16 @@ const vdt = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lP
69719
69719
  8: 0.033
69720
69720
  // 每月1根(按21个交易日算)
69721
69721
  }, CU = ({ startTime: n, endTime: e, cycle: t, type: i = "end" }) => {
69722
- const { maxValueSpan: r } = X2, o = Math.ceil((r + 1e3) / wdt[t]), s = qt(n);
69723
- if (qt(e).diff(s, "day") <= o)
69722
+ const { maxValueSpan: r } = X2, o = Math.ceil((r + 1e3) / wdt[t]), s = Ut(n);
69723
+ if (Ut(e).diff(s, "day") <= o)
69724
69724
  return [n, e];
69725
69725
  if (i === "end")
69726
- return [qt(e).subtract(o, "day").format("YYYY-MM-DD HH:mm:ss"), e];
69726
+ return [Ut(e).subtract(o, "day").format("YYYY-MM-DD HH:mm:ss"), e];
69727
69727
  if (i === "middle") {
69728
- const u = qt((qt(n).valueOf() + qt(e).valueOf()) / 2).format("YYYY-MM-DD HH:mm:ss");
69728
+ const u = Ut((Ut(n).valueOf() + Ut(e).valueOf()) / 2).format("YYYY-MM-DD HH:mm:ss");
69729
69729
  return console.log("超过一屏数量上限, 进行中间时间计算", u, o / 2), [
69730
- qt(u).subtract(o / 2, "day").format("YYYY-MM-DD HH:mm:ss"),
69731
- qt(u).add(o / 2, "day").format("YYYY-MM-DD HH:mm:ss")
69730
+ Ut(u).subtract(o / 2, "day").format("YYYY-MM-DD HH:mm:ss"),
69731
+ Ut(u).add(o / 2, "day").format("YYYY-MM-DD HH:mm:ss")
69732
69732
  ];
69733
69733
  }
69734
69734
  }, Cdt = (n, e) => {
@@ -69986,16 +69986,16 @@ const vdt = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lP
69986
69986
  const [o, s] = e;
69987
69987
  switch (t) {
69988
69988
  case "6": {
69989
- i = n.find((a) => new Date(qt(a).format("YYYY-MM-DD 23:59:59")).getTime() >= new Date(o).getTime()), r = n.findLast((a) => new Date(qt(a).format("YYYY-MM-DD 00:00:00")).getTime() <= new Date(s).getTime());
69989
+ i = n.find((a) => new Date(Ut(a).format("YYYY-MM-DD 23:59:59")).getTime() >= new Date(o).getTime()), r = n.findLast((a) => new Date(Ut(a).format("YYYY-MM-DD 00:00:00")).getTime() <= new Date(s).getTime());
69990
69990
  break;
69991
69991
  }
69992
69992
  case "7": {
69993
- const a = qt(s).endOf("week").add(1, "day").format("YYYY-MM-DD 23:59:59");
69994
- i = n.find((l) => qt(l).endOf("week").add(1, "day").format("YYYY-MM-DD") === qt(o).endOf("week").add(1, "day").format("YYYY-MM-DD")), r = n.findLast((l) => new Date(l).getTime() <= new Date(a).getTime());
69993
+ const a = Ut(s).endOf("week").add(1, "day").format("YYYY-MM-DD 23:59:59");
69994
+ i = n.find((l) => Ut(l).endOf("week").add(1, "day").format("YYYY-MM-DD") === Ut(o).endOf("week").add(1, "day").format("YYYY-MM-DD")), r = n.findLast((l) => new Date(l).getTime() <= new Date(a).getTime());
69995
69995
  break;
69996
69996
  }
69997
69997
  case "8": {
69998
- i = n.find((a) => qt(a).format("YYYY-MM") === qt(o).format("YYYY-MM")), r = n.findLast((a) => qt(a).format("YYYY-MM") === qt(s).format("YYYY-MM"));
69998
+ i = n.find((a) => Ut(a).format("YYYY-MM") === Ut(o).format("YYYY-MM")), r = n.findLast((a) => Ut(a).format("YYYY-MM") === Ut(s).format("YYYY-MM"));
69999
69999
  break;
70000
70000
  }
70001
70001
  default:
@@ -70183,11 +70183,11 @@ const vdt = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lP
70183
70183
  }, Ndt = (n, e) => {
70184
70184
  let t = [];
70185
70185
  if (Number(e) <= 5)
70186
- t = n.map(({ tradeDate: i, netPositionValue: r }) => [qt(i).format("YYYY-MM-DD HH:mm:ss"), r]);
70186
+ t = n.map(({ tradeDate: i, netPositionValue: r }) => [Ut(i).format("YYYY-MM-DD HH:mm:ss"), r]);
70187
70187
  else if (Number(e) === 6) {
70188
70188
  const i = n.reduce((r, o) => {
70189
70189
  const { tradeDate: s, netPositionValue: a } = o;
70190
- return r.set(qt(s).format("YYYY-MM-DD 09:00:00"), a), r;
70190
+ return r.set(Ut(s).format("YYYY-MM-DD 09:00:00"), a), r;
70191
70191
  }, /* @__PURE__ */ new Map());
70192
70192
  t = Array.from(i, ([r, o]) => [r, o]);
70193
70193
  } else
@@ -70261,7 +70261,7 @@ const kdt = {
70261
70261
  contractType: a.varietyStock ? null : a.klineType,
70262
70262
  // 合约类型
70263
70263
  startTime: "1999-01-01 00:00:00",
70264
- endTime: qt().format("YYYY-MM-DD 23:59:59"),
70264
+ endTime: Ut().format("YYYY-MM-DD 23:59:59"),
70265
70265
  deleteFirstNumber: a.deleteFirstNumber,
70266
70266
  withoutPermission: a.withoutPermission
70267
70267
  }, { body: p } = await i.post("/middleLayer/kline/getKline", f);
@@ -70325,10 +70325,10 @@ const kdt = {
70325
70325
  break;
70326
70326
  }
70327
70327
  case "reset": {
70328
- const { time: g } = l.value, b = qt(p.startTime).format("YYYY-MM-DD"), v = qt(p.endTime).format("YYYY-MM-DD");
70328
+ const { time: g } = l.value, b = Ut(p.startTime).format("YYYY-MM-DD"), v = Ut(p.endTime).format("YYYY-MM-DD");
70329
70329
  let _ = -1, m = -1;
70330
70330
  for (let y = 0; y < g.length; y++) {
70331
- const w = qt(g[y]).format("YYYY-MM-DD");
70331
+ const w = Ut(g[y]).format("YYYY-MM-DD");
70332
70332
  if (_ !== -1 && m !== -1)
70333
70333
  break;
70334
70334
  _ === -1 && (new Date(w) === new Date(b) ? _ = y : new Date(w) > new Date(b) && (_ = y - 1)), m === -1 && (new Date(w) === new Date(v) ? m = y : new Date(w) > new Date(v) && (m = y - 1));
@@ -70499,20 +70499,20 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70499
70499
  withoutPermission: a.withoutPermission
70500
70500
  };
70501
70501
  ["1", "2", "3", "4", "5"].includes(a.cycle) ? Object.assign(U, {
70502
- startTime: qt(O).subtract(1, "day").format("YYYY-MM-DD HH:mm:ss"),
70503
- endTime: qt(R).add(1, "day").format("YYYY-MM-DD HH:mm:ss")
70502
+ startTime: Ut(O).subtract(1, "day").format("YYYY-MM-DD HH:mm:ss"),
70503
+ endTime: Ut(R).add(1, "day").format("YYYY-MM-DD HH:mm:ss")
70504
70504
  }) : ["6", "7"].includes(a.cycle) ? Object.assign(U, {
70505
- startTime: qt(O).subtract(50, "day").format("YYYY-MM-DD HH:mm:ss"),
70506
- endTime: qt(R).add(50, "day").format("YYYY-MM-DD HH:mm:ss")
70505
+ startTime: Ut(O).subtract(50, "day").format("YYYY-MM-DD HH:mm:ss"),
70506
+ endTime: Ut(R).add(50, "day").format("YYYY-MM-DD HH:mm:ss")
70507
70507
  }) : Object.assign(U, {
70508
- startTime: qt(O).subtract(10, "month").format("YYYY-MM-DD HH:mm:ss"),
70509
- endTime: qt(R).add(10, "month").format("YYYY-MM-DD HH:mm:ss")
70508
+ startTime: Ut(O).subtract(10, "month").format("YYYY-MM-DD HH:mm:ss"),
70509
+ endTime: Ut(R).add(10, "month").format("YYYY-MM-DD HH:mm:ss")
70510
70510
  });
70511
70511
  const { body: Y } = await r.post("/middleLayer/kline/getKline", U);
70512
70512
  _.value = Y ?? { data: [], mainIndicator: [], subIndicator: [], time: [] };
70513
70513
  let G = -1, V = -1;
70514
70514
  for (let pe = 0; pe < _.value.time.length; pe++) {
70515
- const fe = qt(_.value.time[pe]).format("YYYY-MM-DD");
70515
+ const fe = Ut(_.value.time[pe]).format("YYYY-MM-DD");
70516
70516
  if (G !== -1 && V !== -1)
70517
70517
  break;
70518
70518
  G === -1 && (new Date(fe) === new Date(O) ? G = pe : new Date(fe) > new Date(O) && (G = pe - 1)), V === -1 && (new Date(fe) === new Date(R) ? V = pe : new Date(fe) > new Date(R) && (V = pe - 1));
@@ -70579,7 +70579,7 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70579
70579
  if (!_.value.time.length)
70580
70580
  return y.value = [];
70581
70581
  const { time: O } = _.value, { startValue: R, endValue: U } = ((V = p.getOption()) == null ? void 0 : V.dataZoom[0]) ?? {}, Y = O[R], G = O[U];
70582
- ["6", "7", "8"].includes(a.cycle) ? y.value = [qt(Y).format("YYYY-MM-DD"), qt(G).format("YYYY-MM-DD")] : y.value = [Y, G];
70582
+ ["6", "7", "8"].includes(a.cycle) ? y.value = [Ut(Y).format("YYYY-MM-DD"), Ut(G).format("YYYY-MM-DD")] : y.value = [Y, G];
70583
70583
  }, P = (O = { startValue: 0, endValue: 0 }) => {
70584
70584
  if (!N() || !p)
70585
70585
  return console.warn("[st-klinePlus]: 图表未准备就绪, 跳过绘制");
@@ -70626,7 +70626,7 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70626
70626
  rich: {},
70627
70627
  formatter: (ge) => {
70628
70628
  const { axisDimension: xe, value: Ae } = ge;
70629
- return xe === "x" ? ["6", "7", "8"].includes(a.cycle) ? qt(Ae).format("YYYY-MM-DD") : Ae : String(t(Ae));
70629
+ return xe === "x" ? ["6", "7", "8"].includes(a.cycle) ? Ut(Ae).format("YYYY-MM-DD") : Ae : String(t(Ae));
70630
70630
  }
70631
70631
  }
70632
70632
  },
@@ -70658,7 +70658,7 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70658
70658
  }), !xe)
70659
70659
  return null;
70660
70660
  let Ae = ge[0].axisValue;
70661
- return ["6", "7", "8"].includes(a.cycle) && (Ae = qt(Ae).format("YYYY-MM-DD")), `
70661
+ return ["6", "7", "8"].includes(a.cycle) && (Ae = Ut(Ae).format("YYYY-MM-DD")), `
70662
70662
  <div>
70663
70663
  <span style="font-weight: bold;">${Ae}</span>
70664
70664
  ${xe}
@@ -70674,7 +70674,7 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70674
70674
  show: !1
70675
70675
  },
70676
70676
  axisLabel: {
70677
- formatter: (ge) => ["6", "7", "8"].includes(a.cycle) ? qt(ge).format("YYYY-MM-DD") : ge
70677
+ formatter: (ge) => ["6", "7", "8"].includes(a.cycle) ? Ut(ge).format("YYYY-MM-DD") : ge
70678
70678
  }
70679
70679
  },
70680
70680
  yAxis: [
@@ -70804,7 +70804,7 @@ const Adt = { class: "main-chart" }, Idt = { class: "indicator" }, Odt = {
70804
70804
  });
70805
70805
  }
70806
70806
  if (a.positionTime) {
70807
- const [xe, Ae] = [qt(a.positionTime).format("YYYY-MM-DD 00:00:00"), qt(a.positionTime).format("YYYY-MM-DD 23:59:59")], oe = HS(Y, [xe, Ae], a.cycle);
70807
+ const [xe, Ae] = [Ut(a.positionTime).format("YYYY-MM-DD 00:00:00"), Ut(a.positionTime).format("YYYY-MM-DD 23:59:59")], oe = HS(Y, [xe, Ae], a.cycle);
70808
70808
  ge.push({
70809
70809
  brushId: "强制定位高亮",
70810
70810
  brushType: "lineX",
@@ -186303,7 +186303,7 @@ class a3 extends UC {
186303
186303
  return a3.runEditorCommand(e, t, this.precondition, (i, r, o) => this.runEditorCommand(i, r, o));
186304
186304
  }
186305
186305
  }
186306
- function Ut(n) {
186306
+ function qt(n) {
186307
186307
  return ec.INSTANCE.registerEditorCommand(n), n;
186308
186308
  }
186309
186309
  function T1e(n, e, t) {
@@ -201113,11 +201113,11 @@ var Hr;
201113
201113
  ]) && m.revealType !== 2 && _.revealPrimaryCursor(m.source, !0, !0);
201114
201114
  }
201115
201115
  }
201116
- n.MoveTo = Ut(new e({
201116
+ n.MoveTo = qt(new e({
201117
201117
  id: "_moveTo",
201118
201118
  inSelectionMode: !1,
201119
201119
  precondition: void 0
201120
- })), n.MoveToSelect = Ut(new e({
201120
+ })), n.MoveToSelect = qt(new e({
201121
201121
  id: "_moveToSelect",
201122
201122
  inSelectionMode: !0,
201123
201123
  precondition: void 0
@@ -201135,7 +201135,7 @@ var Hr;
201135
201135
  }), y.reversed ? _.revealTopMostCursor(m.source) : _.revealBottomMostCursor(m.source));
201136
201136
  }
201137
201137
  }
201138
- n.ColumnSelect = Ut(new class extends t {
201138
+ n.ColumnSelect = qt(new class extends t {
201139
201139
  constructor() {
201140
201140
  super({
201141
201141
  id: "columnSelect",
@@ -201148,7 +201148,7 @@ var Hr;
201148
201148
  const w = v.model.validatePosition(y.position), C = v.coordinatesConverter.validateViewPosition(new Ve(y.viewPosition.lineNumber, y.viewPosition.column), w), x = y.doColumnSelect ? m.fromViewLineNumber : C.lineNumber, D = y.doColumnSelect ? m.fromViewVisualColumn : y.mouseColumn - 1;
201149
201149
  return rf.columnSelect(v.cursorConfig, v, x, D, C.lineNumber, y.mouseColumn - 1);
201150
201150
  }
201151
- }()), n.CursorColumnSelectLeft = Ut(new class extends t {
201151
+ }()), n.CursorColumnSelectLeft = qt(new class extends t {
201152
201152
  constructor() {
201153
201153
  super({
201154
201154
  id: "cursorColumnSelectLeft",
@@ -201164,7 +201164,7 @@ var Hr;
201164
201164
  _getColumnSelectResult(v, _, m, y) {
201165
201165
  return rf.columnSelectLeft(v.cursorConfig, v, m);
201166
201166
  }
201167
- }()), n.CursorColumnSelectRight = Ut(new class extends t {
201167
+ }()), n.CursorColumnSelectRight = qt(new class extends t {
201168
201168
  constructor() {
201169
201169
  super({
201170
201170
  id: "cursorColumnSelectRight",
@@ -201189,7 +201189,7 @@ var Hr;
201189
201189
  return rf.columnSelectUp(_.cursorConfig, _, y, this._isPaged);
201190
201190
  }
201191
201191
  }
201192
- n.CursorColumnSelectUp = Ut(new i({
201192
+ n.CursorColumnSelectUp = qt(new i({
201193
201193
  isPaged: !1,
201194
201194
  id: "cursorColumnSelectUp",
201195
201195
  precondition: void 0,
@@ -201199,7 +201199,7 @@ var Hr;
201199
201199
  primary: 3600,
201200
201200
  linux: { primary: 0 }
201201
201201
  }
201202
- })), n.CursorColumnSelectPageUp = Ut(new i({
201202
+ })), n.CursorColumnSelectPageUp = qt(new i({
201203
201203
  isPaged: !0,
201204
201204
  id: "cursorColumnSelectPageUp",
201205
201205
  precondition: void 0,
@@ -201218,7 +201218,7 @@ var Hr;
201218
201218
  return rf.columnSelectDown(_.cursorConfig, _, y, this._isPaged);
201219
201219
  }
201220
201220
  }
201221
- n.CursorColumnSelectDown = Ut(new r({
201221
+ n.CursorColumnSelectDown = qt(new r({
201222
201222
  isPaged: !1,
201223
201223
  id: "cursorColumnSelectDown",
201224
201224
  precondition: void 0,
@@ -201228,7 +201228,7 @@ var Hr;
201228
201228
  primary: 3602,
201229
201229
  linux: { primary: 0 }
201230
201230
  }
201231
- })), n.CursorColumnSelectPageDown = Ut(new r({
201231
+ })), n.CursorColumnSelectPageDown = qt(new r({
201232
201232
  isPaged: !0,
201233
201233
  id: "cursorColumnSelectPageDown",
201234
201234
  precondition: void 0,
@@ -201279,7 +201279,7 @@ var Hr;
201279
201279
  }
201280
201280
  }
201281
201281
  }
201282
- n.CursorMoveImpl = o, n.CursorMove = Ut(new o());
201282
+ n.CursorMoveImpl = o, n.CursorMove = qt(new o());
201283
201283
  class s extends Qi {
201284
201284
  constructor(_) {
201285
201285
  super(_), this._staticArgs = _.args;
@@ -201294,7 +201294,7 @@ var Hr;
201294
201294
  }), _.model.pushStackElement(), _.setCursorStates(m.source, 3, $o.simpleMove(_, _.getCursorStates(), y.direction, y.select, y.value, y.unit)), _.revealPrimaryCursor(m.source, !0);
201295
201295
  }
201296
201296
  }
201297
- n.CursorLeft = Ut(new s({
201297
+ n.CursorLeft = qt(new s({
201298
201298
  args: {
201299
201299
  direction: 0,
201300
201300
  unit: 0,
@@ -201312,7 +201312,7 @@ var Hr;
201312
201312
  /* KeyCode.KeyB */
201313
201313
  ] }
201314
201314
  }
201315
- })), n.CursorLeftSelect = Ut(new s({
201315
+ })), n.CursorLeftSelect = qt(new s({
201316
201316
  args: {
201317
201317
  direction: 0,
201318
201318
  unit: 0,
@@ -201327,7 +201327,7 @@ var Hr;
201327
201327
  primary: 1039
201328
201328
  /* KeyCode.LeftArrow */
201329
201329
  }
201330
- })), n.CursorRight = Ut(new s({
201330
+ })), n.CursorRight = qt(new s({
201331
201331
  args: {
201332
201332
  direction: 1,
201333
201333
  unit: 0,
@@ -201345,7 +201345,7 @@ var Hr;
201345
201345
  /* KeyCode.KeyF */
201346
201346
  ] }
201347
201347
  }
201348
- })), n.CursorRightSelect = Ut(new s({
201348
+ })), n.CursorRightSelect = qt(new s({
201349
201349
  args: {
201350
201350
  direction: 1,
201351
201351
  unit: 0,
@@ -201360,7 +201360,7 @@ var Hr;
201360
201360
  primary: 1041
201361
201361
  /* KeyCode.RightArrow */
201362
201362
  }
201363
- })), n.CursorUp = Ut(new s({
201363
+ })), n.CursorUp = qt(new s({
201364
201364
  args: {
201365
201365
  direction: 2,
201366
201366
  unit: 2,
@@ -201378,7 +201378,7 @@ var Hr;
201378
201378
  /* KeyCode.KeyP */
201379
201379
  ] }
201380
201380
  }
201381
- })), n.CursorUpSelect = Ut(new s({
201381
+ })), n.CursorUpSelect = qt(new s({
201382
201382
  args: {
201383
201383
  direction: 2,
201384
201384
  unit: 2,
@@ -201404,7 +201404,7 @@ var Hr;
201404
201404
  /* KeyCode.UpArrow */
201405
201405
  }
201406
201406
  }
201407
- })), n.CursorPageUp = Ut(new s({
201407
+ })), n.CursorPageUp = qt(new s({
201408
201408
  args: {
201409
201409
  direction: 2,
201410
201410
  unit: 2,
@@ -201420,7 +201420,7 @@ var Hr;
201420
201420
  primary: 11
201421
201421
  /* KeyCode.PageUp */
201422
201422
  }
201423
- })), n.CursorPageUpSelect = Ut(new s({
201423
+ })), n.CursorPageUpSelect = qt(new s({
201424
201424
  args: {
201425
201425
  direction: 2,
201426
201426
  unit: 2,
@@ -201436,7 +201436,7 @@ var Hr;
201436
201436
  primary: 1035
201437
201437
  /* KeyCode.PageUp */
201438
201438
  }
201439
- })), n.CursorDown = Ut(new s({
201439
+ })), n.CursorDown = qt(new s({
201440
201440
  args: {
201441
201441
  direction: 3,
201442
201442
  unit: 2,
@@ -201454,7 +201454,7 @@ var Hr;
201454
201454
  /* KeyCode.KeyN */
201455
201455
  ] }
201456
201456
  }
201457
- })), n.CursorDownSelect = Ut(new s({
201457
+ })), n.CursorDownSelect = qt(new s({
201458
201458
  args: {
201459
201459
  direction: 3,
201460
201460
  unit: 2,
@@ -201480,7 +201480,7 @@ var Hr;
201480
201480
  /* KeyCode.DownArrow */
201481
201481
  }
201482
201482
  }
201483
- })), n.CursorPageDown = Ut(new s({
201483
+ })), n.CursorPageDown = qt(new s({
201484
201484
  args: {
201485
201485
  direction: 3,
201486
201486
  unit: 2,
@@ -201496,7 +201496,7 @@ var Hr;
201496
201496
  primary: 12
201497
201497
  /* KeyCode.PageDown */
201498
201498
  }
201499
- })), n.CursorPageDownSelect = Ut(new s({
201499
+ })), n.CursorPageDownSelect = qt(new s({
201500
201500
  args: {
201501
201501
  direction: 3,
201502
201502
  unit: 2,
@@ -201512,7 +201512,7 @@ var Hr;
201512
201512
  primary: 1036
201513
201513
  /* KeyCode.PageDown */
201514
201514
  }
201515
- })), n.CreateCursor = Ut(new class extends Qi {
201515
+ })), n.CreateCursor = qt(new class extends Qi {
201516
201516
  constructor() {
201517
201517
  super({
201518
201518
  id: "createCursor",
@@ -201537,7 +201537,7 @@ var Hr;
201537
201537
  }
201538
201538
  y.push(m), v.model.pushStackElement(), v.setCursorStates(_.source, 3, y);
201539
201539
  }
201540
- }()), n.LastCursorMoveToSelect = Ut(new class extends Qi {
201540
+ }()), n.LastCursorMoveToSelect = qt(new class extends Qi {
201541
201541
  constructor() {
201542
201542
  super({
201543
201543
  id: "_lastCursorMoveToSelect",
@@ -201559,7 +201559,7 @@ var Hr;
201559
201559
  _.model.pushStackElement(), _.setCursorStates(m.source, 3, $o.moveToBeginningOfLine(_, _.getCursorStates(), this._inSelectionMode)), _.revealPrimaryCursor(m.source, !0);
201560
201560
  }
201561
201561
  }
201562
- n.CursorHome = Ut(new a({
201562
+ n.CursorHome = qt(new a({
201563
201563
  inSelectionMode: !1,
201564
201564
  id: "cursorHome",
201565
201565
  precondition: void 0,
@@ -201572,7 +201572,7 @@ var Hr;
201572
201572
  /* KeyCode.LeftArrow */
201573
201573
  ] }
201574
201574
  }
201575
- })), n.CursorHomeSelect = Ut(new a({
201575
+ })), n.CursorHomeSelect = qt(new a({
201576
201576
  inSelectionMode: !0,
201577
201577
  id: "cursorHomeSelect",
201578
201578
  precondition: void 0,
@@ -201602,7 +201602,7 @@ var Hr;
201602
201602
  return m;
201603
201603
  }
201604
201604
  }
201605
- n.CursorLineStart = Ut(new l({
201605
+ n.CursorLineStart = qt(new l({
201606
201606
  inSelectionMode: !1,
201607
201607
  id: "cursorLineStart",
201608
201608
  precondition: void 0,
@@ -201615,7 +201615,7 @@ var Hr;
201615
201615
  /* KeyCode.KeyA */
201616
201616
  }
201617
201617
  }
201618
- })), n.CursorLineStartSelect = Ut(new l({
201618
+ })), n.CursorLineStartSelect = qt(new l({
201619
201619
  inSelectionMode: !0,
201620
201620
  id: "cursorLineStartSelect",
201621
201621
  precondition: void 0,
@@ -201637,7 +201637,7 @@ var Hr;
201637
201637
  _.model.pushStackElement(), _.setCursorStates(m.source, 3, $o.moveToEndOfLine(_, _.getCursorStates(), this._inSelectionMode, m.sticky || !1)), _.revealPrimaryCursor(m.source, !0);
201638
201638
  }
201639
201639
  }
201640
- n.CursorEnd = Ut(new u({
201640
+ n.CursorEnd = qt(new u({
201641
201641
  inSelectionMode: !1,
201642
201642
  id: "cursorEnd",
201643
201643
  precondition: void 0,
@@ -201667,7 +201667,7 @@ var Hr;
201667
201667
  }
201668
201668
  }]
201669
201669
  }
201670
- })), n.CursorEndSelect = Ut(new u({
201670
+ })), n.CursorEndSelect = qt(new u({
201671
201671
  inSelectionMode: !0,
201672
201672
  id: "cursorEndSelect",
201673
201673
  precondition: void 0,
@@ -201714,7 +201714,7 @@ var Hr;
201714
201714
  return y;
201715
201715
  }
201716
201716
  }
201717
- n.CursorLineEnd = Ut(new c({
201717
+ n.CursorLineEnd = qt(new c({
201718
201718
  inSelectionMode: !1,
201719
201719
  id: "cursorLineEnd",
201720
201720
  precondition: void 0,
@@ -201727,7 +201727,7 @@ var Hr;
201727
201727
  /* KeyCode.KeyE */
201728
201728
  }
201729
201729
  }
201730
- })), n.CursorLineEndSelect = Ut(new c({
201730
+ })), n.CursorLineEndSelect = qt(new c({
201731
201731
  inSelectionMode: !0,
201732
201732
  id: "cursorLineEndSelect",
201733
201733
  precondition: void 0,
@@ -201749,7 +201749,7 @@ var Hr;
201749
201749
  _.model.pushStackElement(), _.setCursorStates(m.source, 3, $o.moveToBeginningOfBuffer(_, _.getCursorStates(), this._inSelectionMode)), _.revealPrimaryCursor(m.source, !0);
201750
201750
  }
201751
201751
  }
201752
- n.CursorTop = Ut(new d({
201752
+ n.CursorTop = qt(new d({
201753
201753
  inSelectionMode: !1,
201754
201754
  id: "cursorTop",
201755
201755
  precondition: void 0,
@@ -201762,7 +201762,7 @@ var Hr;
201762
201762
  /* KeyCode.UpArrow */
201763
201763
  }
201764
201764
  }
201765
- })), n.CursorTopSelect = Ut(new d({
201765
+ })), n.CursorTopSelect = qt(new d({
201766
201766
  inSelectionMode: !0,
201767
201767
  id: "cursorTopSelect",
201768
201768
  precondition: void 0,
@@ -201784,7 +201784,7 @@ var Hr;
201784
201784
  _.model.pushStackElement(), _.setCursorStates(m.source, 3, $o.moveToEndOfBuffer(_, _.getCursorStates(), this._inSelectionMode)), _.revealPrimaryCursor(m.source, !0);
201785
201785
  }
201786
201786
  }
201787
- n.CursorBottom = Ut(new h({
201787
+ n.CursorBottom = qt(new h({
201788
201788
  inSelectionMode: !1,
201789
201789
  id: "cursorBottom",
201790
201790
  precondition: void 0,
@@ -201797,7 +201797,7 @@ var Hr;
201797
201797
  /* KeyCode.DownArrow */
201798
201798
  }
201799
201799
  }
201800
- })), n.CursorBottomSelect = Ut(new h({
201800
+ })), n.CursorBottomSelect = qt(new h({
201801
201801
  inSelectionMode: !0,
201802
201802
  id: "cursorBottomSelect",
201803
201803
  precondition: void 0,
@@ -201893,7 +201893,7 @@ var Hr;
201893
201893
  return _.viewLayout.getCurrentScrollLeft() + y * _.cursorConfig.typicalHalfwidthCharacterWidth;
201894
201894
  }
201895
201895
  }
201896
- n.EditorScrollImpl = f, n.EditorScroll = Ut(new f()), n.ScrollLineUp = Ut(new class extends Qi {
201896
+ n.EditorScrollImpl = f, n.EditorScroll = qt(new f()), n.ScrollLineUp = qt(new class extends Qi {
201897
201897
  constructor() {
201898
201898
  super({
201899
201899
  id: "scrollLineUp",
@@ -201919,7 +201919,7 @@ var Hr;
201919
201919
  source: _.source
201920
201920
  });
201921
201921
  }
201922
- }()), n.ScrollPageUp = Ut(new class extends Qi {
201922
+ }()), n.ScrollPageUp = qt(new class extends Qi {
201923
201923
  constructor() {
201924
201924
  super({
201925
201925
  id: "scrollPageUp",
@@ -201949,7 +201949,7 @@ var Hr;
201949
201949
  source: _.source
201950
201950
  });
201951
201951
  }
201952
- }()), n.ScrollEditorTop = Ut(new class extends Qi {
201952
+ }()), n.ScrollEditorTop = qt(new class extends Qi {
201953
201953
  constructor() {
201954
201954
  super({
201955
201955
  id: "scrollEditorTop",
@@ -201970,7 +201970,7 @@ var Hr;
201970
201970
  source: _.source
201971
201971
  });
201972
201972
  }
201973
- }()), n.ScrollLineDown = Ut(new class extends Qi {
201973
+ }()), n.ScrollLineDown = qt(new class extends Qi {
201974
201974
  constructor() {
201975
201975
  super({
201976
201976
  id: "scrollLineDown",
@@ -201996,7 +201996,7 @@ var Hr;
201996
201996
  source: _.source
201997
201997
  });
201998
201998
  }
201999
- }()), n.ScrollPageDown = Ut(new class extends Qi {
201999
+ }()), n.ScrollPageDown = qt(new class extends Qi {
202000
202000
  constructor() {
202001
202001
  super({
202002
202002
  id: "scrollPageDown",
@@ -202026,7 +202026,7 @@ var Hr;
202026
202026
  source: _.source
202027
202027
  });
202028
202028
  }
202029
- }()), n.ScrollEditorBottom = Ut(new class extends Qi {
202029
+ }()), n.ScrollEditorBottom = qt(new class extends Qi {
202030
202030
  constructor() {
202031
202031
  super({
202032
202032
  id: "scrollEditorBottom",
@@ -202047,7 +202047,7 @@ var Hr;
202047
202047
  source: _.source
202048
202048
  });
202049
202049
  }
202050
- }()), n.ScrollLeft = Ut(new class extends Qi {
202050
+ }()), n.ScrollLeft = qt(new class extends Qi {
202051
202051
  constructor() {
202052
202052
  super({
202053
202053
  id: "scrollLeft",
@@ -202068,7 +202068,7 @@ var Hr;
202068
202068
  source: _.source
202069
202069
  });
202070
202070
  }
202071
- }()), n.ScrollRight = Ut(new class extends Qi {
202071
+ }()), n.ScrollRight = qt(new class extends Qi {
202072
202072
  constructor() {
202073
202073
  super({
202074
202074
  id: "scrollRight",
@@ -202100,15 +202100,15 @@ var Hr;
202100
202100
  ]), m.revealType !== 2 && _.revealPrimaryCursor(m.source, !0, !0));
202101
202101
  }
202102
202102
  }
202103
- n.WordSelect = Ut(new p({
202103
+ n.WordSelect = qt(new p({
202104
202104
  inSelectionMode: !1,
202105
202105
  id: "_wordSelect",
202106
202106
  precondition: void 0
202107
- })), n.WordSelectDrag = Ut(new p({
202107
+ })), n.WordSelectDrag = qt(new p({
202108
202108
  inSelectionMode: !0,
202109
202109
  id: "_wordSelectDrag",
202110
202110
  precondition: void 0
202111
- })), n.LastCursorWordSelect = Ut(new class extends Qi {
202111
+ })), n.LastCursorWordSelect = qt(new class extends Qi {
202112
202112
  constructor() {
202113
202113
  super({
202114
202114
  id: "lastCursorWordSelect",
@@ -202132,11 +202132,11 @@ var Hr;
202132
202132
  ]), m.revealType !== 2 && _.revealPrimaryCursor(m.source, !1, !0));
202133
202133
  }
202134
202134
  }
202135
- n.LineSelect = Ut(new g({
202135
+ n.LineSelect = qt(new g({
202136
202136
  inSelectionMode: !1,
202137
202137
  id: "_lineSelect",
202138
202138
  precondition: void 0
202139
- })), n.LineSelectDrag = Ut(new g({
202139
+ })), n.LineSelectDrag = qt(new g({
202140
202140
  inSelectionMode: !0,
202141
202141
  id: "_lineSelectDrag",
202142
202142
  precondition: void 0
@@ -202152,15 +202152,15 @@ var Hr;
202152
202152
  C[y] = $o.line(_, w[y], this._inSelectionMode, m.position, m.viewPosition), _.model.pushStackElement(), _.setCursorStates(m.source, 3, C);
202153
202153
  }
202154
202154
  }
202155
- n.LastCursorLineSelect = Ut(new b({
202155
+ n.LastCursorLineSelect = qt(new b({
202156
202156
  inSelectionMode: !1,
202157
202157
  id: "lastCursorLineSelect",
202158
202158
  precondition: void 0
202159
- })), n.LastCursorLineSelectDrag = Ut(new b({
202159
+ })), n.LastCursorLineSelectDrag = qt(new b({
202160
202160
  inSelectionMode: !0,
202161
202161
  id: "lastCursorLineSelectDrag",
202162
202162
  precondition: void 0
202163
- })), n.CancelSelection = Ut(new class extends Qi {
202163
+ })), n.CancelSelection = qt(new class extends Qi {
202164
202164
  constructor() {
202165
202165
  super({
202166
202166
  id: "cancelSelection",
@@ -202181,7 +202181,7 @@ var Hr;
202181
202181
  $o.cancelSelection(v, v.getPrimaryCursorState())
202182
202182
  ]), v.revealPrimaryCursor(_.source, !0);
202183
202183
  }
202184
- }()), n.RemoveSecondaryCursors = Ut(new class extends Qi {
202184
+ }()), n.RemoveSecondaryCursors = qt(new class extends Qi {
202185
202185
  constructor() {
202186
202186
  super({
202187
202187
  id: "removeSecondaryCursors",
@@ -202202,7 +202202,7 @@ var Hr;
202202
202202
  v.getPrimaryCursorState()
202203
202203
  ]), v.revealPrimaryCursor(_.source, !0), ny(M("removedCursor", "Removed secondary cursors"));
202204
202204
  }
202205
- }()), n.RevealLine = Ut(new class extends Qi {
202205
+ }()), n.RevealLine = qt(new class extends Qi {
202206
202206
  constructor() {
202207
202207
  super({
202208
202208
  id: "revealLine",
@@ -202256,7 +202256,7 @@ var Hr;
202256
202256
  $o.selectAll(v, v.getPrimaryCursorState())
202257
202257
  ]);
202258
202258
  }
202259
- }(), n.SetSelection = Ut(new class extends Qi {
202259
+ }(), n.SetSelection = qt(new class extends Qi {
202260
202260
  constructor() {
202261
202261
  super({
202262
202262
  id: "setSelection",
@@ -202320,7 +202320,7 @@ var kK;
202320
202320
  s && this.runCoreEditingCommand(r, s, o || {});
202321
202321
  }
202322
202322
  }
202323
- n.CoreEditingCommand = e, n.LineBreakInsert = Ut(new class extends e {
202323
+ n.CoreEditingCommand = e, n.LineBreakInsert = qt(new class extends e {
202324
202324
  constructor() {
202325
202325
  super({
202326
202326
  id: "lineBreakInsert",
@@ -202339,7 +202339,7 @@ var kK;
202339
202339
  runCoreEditingCommand(t, i, r) {
202340
202340
  t.pushUndoStop(), t.executeCommands(this.id, ir.lineBreakInsert(i.cursorConfig, i.model, i.getCursorStates().map((o) => o.modelState.selection)));
202341
202341
  }
202342
- }()), n.Outdent = Ut(new class extends e {
202342
+ }()), n.Outdent = qt(new class extends e {
202343
202343
  constructor() {
202344
202344
  super({
202345
202345
  id: "outdent",
@@ -202355,7 +202355,7 @@ var kK;
202355
202355
  runCoreEditingCommand(t, i, r) {
202356
202356
  t.pushUndoStop(), t.executeCommands(this.id, ir.outdent(i.cursorConfig, i.model, i.getCursorStates().map((o) => o.modelState.selection))), t.pushUndoStop();
202357
202357
  }
202358
- }()), n.Tab = Ut(new class extends e {
202358
+ }()), n.Tab = qt(new class extends e {
202359
202359
  constructor() {
202360
202360
  super({
202361
202361
  id: "tab",
@@ -202371,7 +202371,7 @@ var kK;
202371
202371
  runCoreEditingCommand(t, i, r) {
202372
202372
  t.pushUndoStop(), t.executeCommands(this.id, ir.tab(i.cursorConfig, i.model, i.getCursorStates().map((o) => o.modelState.selection))), t.pushUndoStop();
202373
202373
  }
202374
- }()), n.DeleteLeft = Ut(new class extends e {
202374
+ }()), n.DeleteLeft = qt(new class extends e {
202375
202375
  constructor() {
202376
202376
  super({
202377
202377
  id: "deleteLeft",
@@ -202400,7 +202400,7 @@ var kK;
202400
202400
  /* EditOperationType.DeletingLeft */
202401
202401
  );
202402
202402
  }
202403
- }()), n.DeleteRight = Ut(new class extends e {
202403
+ }()), n.DeleteRight = qt(new class extends e {
202404
202404
  constructor() {
202405
202405
  super({
202406
202406
  id: "deleteRight",
@@ -246808,7 +246808,7 @@ Kn(
246808
246808
  1
246809
246809
  /* InstantiationType.Delayed */
246810
246810
  );
246811
- Ut(new class extends a3 {
246811
+ qt(new class extends a3 {
246812
246812
  constructor() {
246813
246813
  super({
246814
246814
  id: "editor.cancelOperation",
@@ -247025,7 +247025,7 @@ rhe({
247025
247025
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
247026
247026
  aliases: ["Python", "py"],
247027
247027
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
247028
- loader: () => import("./python-b13b7faa.js")
247028
+ loader: () => import("./python-8821365d.js")
247029
247029
  });
247030
247030
  /*!-----------------------------------------------------------------------------
247031
247031
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -248965,53 +248965,78 @@ const HEt = async ({ appId: n, apiKey: e, value: t, callback: i }) => {
248965
248965
  "X-DashScope-SSE": "enable"
248966
248966
  }
248967
248967
  });
248968
- if (!o.ok)
248969
- throw new Error(`HTTP ${o.status}`);
248968
+ if (!o.ok) {
248969
+ i("error", `HTTP ${o.status}: ${o.statusText}`);
248970
+ return;
248971
+ }
248970
248972
  const s = o.body.getReader(), a = new TextDecoder();
248971
- let l = "";
248973
+ let l = "", u = null;
248972
248974
  for (; ; ) {
248973
- const { done: u, value: c } = await s.read();
248974
- if (u) {
248975
+ const { done: c, value: d } = await s.read();
248976
+ if (c) {
248975
248977
  l.trim() && WEt(l, i), i("finish", "");
248976
248978
  break;
248977
248979
  }
248978
- l += a.decode(c, { stream: !0 });
248979
- let d;
248980
- for (; (d = l.indexOf(`
248980
+ l += a.decode(d, { stream: !0 });
248981
+ let h;
248982
+ for (; (h = l.indexOf(`
248981
248983
  `)) !== -1; ) {
248982
- const h = l.substring(0, d).trim();
248983
- if (l = l.substring(d + 1), h.startsWith("data:")) {
248984
- const f = h.substring(5).trim();
248985
- if (f && f !== "[DONE]")
248984
+ const f = l.substring(0, h).trim();
248985
+ if (l = l.substring(h + 1), f.startsWith("event:")) {
248986
+ u = f.substring(6).trim();
248987
+ continue;
248988
+ }
248989
+ if (f.startsWith("data:")) {
248990
+ const p = f.substring(5).trim();
248991
+ if (u === "error" || p && p.startsWith("{"))
248986
248992
  try {
248987
- const p = JSON.parse(f), g = (r = p == null ? void 0 : p.output) == null ? void 0 : r.text;
248988
- g && i && i("message", g);
248993
+ const g = JSON.parse(p);
248994
+ if (g.code || g.message || u === "error") {
248995
+ const v = g.message || g.code || "未知错误";
248996
+ i("error", `百炼服务端错误: ${v}`);
248997
+ return;
248998
+ }
248999
+ const b = (r = g == null ? void 0 : g.output) == null ? void 0 : r.text;
249000
+ b && i && i("message", b);
248989
249001
  } catch {
248990
- console.debug("等待完整数据...");
249002
+ console.debug("JSON 解析失败:", p);
248991
249003
  }
249004
+ u = null;
248992
249005
  }
248993
249006
  }
248994
249007
  }
248995
249008
  } catch (o) {
248996
249009
  console.error("流式请求失败:", o), i("error", o.message);
248997
249010
  }
248998
- };
248999
- function WEt(n, e) {
249000
- var i;
249011
+ }, WEt = (n, e) => {
249012
+ var r;
249001
249013
  const t = n.split(`
249002
249014
  `);
249003
- for (const r of t)
249004
- if (r.startsWith("data:")) {
249005
- const o = r.substring(5).trim();
249006
- if (o && o !== "[DONE]")
249015
+ let i = null;
249016
+ for (const o of t) {
249017
+ if (o.startsWith("event:")) {
249018
+ i = o.substring(6).trim();
249019
+ continue;
249020
+ }
249021
+ if (o.startsWith("data:")) {
249022
+ const s = o.substring(5).trim();
249023
+ if (s && s !== "[DONE]")
249007
249024
  try {
249008
- const s = JSON.parse(o), a = (i = s == null ? void 0 : s.output) == null ? void 0 : i.text;
249009
- a && e && e("message", a);
249025
+ const a = JSON.parse(s);
249026
+ if (i === "error" || a.code || a.message) {
249027
+ const u = a.message || a.code || "未知错误";
249028
+ e("error", `百炼服务端错误: ${u}`);
249029
+ return;
249030
+ }
249031
+ const l = (r = a == null ? void 0 : a.output) == null ? void 0 : r.text;
249032
+ l && e && e("message", l);
249010
249033
  } catch {
249011
249034
  }
249035
+ i = null;
249012
249036
  }
249013
- }
249014
- const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "chat-container" }, $Et = { class: "avatar" }, UEt = { class: "message-content" }, qEt = { class: "message-text" }, KEt = { class: "message-createTime" }, GEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), YEt = { class: "feedback-buttons" }, QEt = ["onClick"], ZEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-emoji" }, "👍", -1)), XEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-text" }, "满意", -1)), JEt = [
249037
+ }
249038
+ };
249039
+ const v0 = (n) => (yu("data-v-b571a3f5"), n = n(), wu(), n), jEt = { class: "chat-container" }, $Et = { class: "avatar" }, UEt = { class: "message-content" }, qEt = { class: "message-text" }, KEt = { class: "message-createTime" }, GEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), YEt = { class: "feedback-buttons" }, QEt = ["onClick"], ZEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-emoji" }, "👍", -1)), XEt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-text" }, "满意", -1)), JEt = [
249015
249040
  ZEt,
249016
249041
  XEt
249017
249042
  ], eLt = ["onClick"], tLt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-emoji" }, "👎", -1)), nLt = /* @__PURE__ */ v0(() => /* @__PURE__ */ le("span", { class: "btn-text" }, "不满意", -1)), iLt = [
@@ -249054,7 +249079,7 @@ const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "cha
249054
249079
  // 是否展示反馈按钮(默认信息不用展示)
249055
249080
  hasFeedback: !1,
249056
249081
  // 是否已进行过反馈
249057
- createTime: qt().format("YYYY-MM-DD HH:mm:ss"),
249082
+ createTime: Ut().format("YYYY-MM-DD HH:mm:ss"),
249058
249083
  // 消息发起时间
249059
249084
  resTime: 0,
249060
249085
  // 响应总耗时
@@ -249117,14 +249142,14 @@ const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "cha
249117
249142
  d.value.push({
249118
249143
  role: "user",
249119
249144
  content: y,
249120
- createTime: qt().format("YYYY-MM-DD HH:mm:ss")
249145
+ createTime: Ut().format("YYYY-MM-DD HH:mm:ss")
249121
249146
  }), h.value = "", await m(), d.value.push({
249122
249147
  role: "assistant",
249123
249148
  content: "",
249124
249149
  userContent: y,
249125
249150
  showFeedback: !1,
249126
249151
  hasFeedback: !1,
249127
- createTime: qt().format("YYYY-MM-DD HH:mm:ss"),
249152
+ createTime: Ut().format("YYYY-MM-DD HH:mm:ss"),
249128
249153
  resTime: 0,
249129
249154
  firstPackageTime: 0
249130
249155
  }), await m(), l.value = !0, u.value = !0;
@@ -249135,7 +249160,19 @@ const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "cha
249135
249160
  apiKey: "sk-d995eb26a4334bdeb2ccb4cbfaf51de8",
249136
249161
  value: y,
249137
249162
  callback: (S, N) => {
249138
- if (S === "message") {
249163
+ if (S === "error") {
249164
+ u.value = !1, l.value = !1, d.value.pop(), d.value.push({
249165
+ role: "assistant",
249166
+ userContent: y,
249167
+ content: `❌ ${N}`,
249168
+ showFeedback: !1,
249169
+ hasFeedback: !1,
249170
+ createTime: Ut().format("YYYY-MM-DD HH:mm:ss"),
249171
+ resTime: (/* @__PURE__ */ new Date()).getTime() - C,
249172
+ firstPackageTime: 0
249173
+ }), b("default", d.value.length - 1), m();
249174
+ return;
249175
+ } else if (S === "message") {
249139
249176
  w += N;
249140
249177
  const E = d.value[d.value.length - 1];
249141
249178
  E && E.role === "assistant" && (E.content = w, m()), E.firstPackageTime === 0 && (E.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - C);
@@ -249156,10 +249193,10 @@ const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "cha
249156
249193
  Jt.error(`AI响应异常: ${x}`), d.value.pop(), d.value.push({
249157
249194
  role: "assistant",
249158
249195
  userContent: y,
249159
- content: "抱歉,AI服务响应异常,请稍后重试。",
249196
+ content: "抱歉,AI服务响应异常,请稍后重试。",
249160
249197
  showFeedback: !0,
249161
249198
  hasFeedback: !1,
249162
- createTime: qt().format("YYYY-MM-DD HH:mm:ss"),
249199
+ createTime: Ut().format("YYYY-MM-DD HH:mm:ss"),
249163
249200
  resTime: (/* @__PURE__ */ new Date()).getTime() - C,
249164
249201
  firstPackageTime: 0
249165
249202
  }), b("default", d.value.length - 1), await m(), l.value = !1, u.value = !1;
@@ -249339,7 +249376,7 @@ const v0 = (n) => (yu("data-v-24220a5f"), n = n(), wu(), n), jEt = { class: "cha
249339
249376
  ], 64);
249340
249377
  };
249341
249378
  }
249342
- }, mLt = /* @__PURE__ */ xn(gLt, [["__scopeId", "data-v-24220a5f"]]), vLt = {
249379
+ }, mLt = /* @__PURE__ */ xn(gLt, [["__scopeId", "data-v-b571a3f5"]]), vLt = {
249343
249380
  install(n) {
249344
249381
  n.component("st-varietyAiHelper", mLt);
249345
249382
  }