page-agent-sdk 4.23.3 → 4.24.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.
@@ -431,17 +431,17 @@ function te(e, t = {}) {
431
431
  ...e.extraBody ? { modelKwargs: e.extraBody } : {}
432
432
  });
433
433
  }
434
- function P(e) {
434
+ function ne(e) {
435
435
  return e.some((e, t) => t > 0 && e.getType() === "system") ? e.map((e, t) => t === 0 || e.getType() !== "system" ? e : new i({ content: typeof e.content == "string" ? `〔系统注记〕\n${e.content}` : e.content })) : e;
436
436
  }
437
- function F(e) {
438
- let t = e, n = (e) => Array.isArray(e) ? P(e) : e, r = t.invoke.bind(e), i = t.stream.bind(e);
437
+ function P(e) {
438
+ let t = e, n = (e) => Array.isArray(e) ? ne(e) : e, r = t.invoke.bind(e), i = t.stream.bind(e);
439
439
  return t.invoke = async (e, t) => r(n(e), t), t.stream = async (e, t) => i(n(e), t), e;
440
440
  }
441
- async function I(e, t = {}) {
441
+ async function F(e, t = {}) {
442
442
  if (e = j(e, M(e, t.thinkingMode, t.thinkingFallback)), (e.provider ?? "openai") === "openai") return te(e, t);
443
443
  let { ChatAnthropic: n } = await import("@langchain/anthropic");
444
- return F(new n({
444
+ return P(new n({
445
445
  apiKey: e.apiKey,
446
446
  model: e.model,
447
447
  temperature: e.thinking ? 1 : t.temperature ?? e.temperature,
@@ -458,15 +458,15 @@ async function I(e, t = {}) {
458
458
  }
459
459
  //#endregion
460
460
  //#region src/core/utils/contentParts.ts
461
- function ne(e) {
461
+ function re(e) {
462
462
  let t = e.content;
463
463
  return typeof t == "string" ? t : Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : e?.type === "text" && typeof e.text == "string" ? e.text : "").join("") : "";
464
464
  }
465
- function re(e) {
465
+ function ie(e) {
466
466
  let t = e.additional_kwargs || {}, n = t.reasoning_content || t.reasoning || "";
467
467
  return !n && Array.isArray(e.content) && (n = e.content.map((e) => e?.type === "thinking" ? e.thinking ?? "" : e?.type === "thinking_delta" ? e.delta ?? e.thinking ?? "" : "").join("")), n;
468
468
  }
469
- function ie(e) {
469
+ function ae(e) {
470
470
  let t = e, n = [
471
471
  t?.additional_kwargs?.usage,
472
472
  t?.usage_metadata,
@@ -474,9 +474,9 @@ function ie(e) {
474
474
  t?.response_metadata?.token_usage,
475
475
  t?.response_metadata?.tokenUsage
476
476
  ];
477
- for (let e of n) if (e && typeof e == "object" && ae(e)) return e;
477
+ for (let e of n) if (e && typeof e == "object" && oe(e)) return e;
478
478
  }
479
- function ae(e) {
479
+ function oe(e) {
480
480
  return [
481
481
  "prompt_tokens",
482
482
  "completion_tokens",
@@ -490,8 +490,8 @@ function ae(e) {
490
490
  "outputTokens"
491
491
  ].some((t) => typeof e[t] == "number" && e[t] > 0);
492
492
  }
493
- function oe(e) {
494
- let t = ie(e);
493
+ function se(e) {
494
+ let t = ae(e);
495
495
  if (!t || typeof t != "object") return null;
496
496
  let n = t, r = Number(n.prompt_tokens ?? n.promptTokens ?? n.input_tokens ?? n.inputTokens ?? 0) || 0, i = Number(n.completion_tokens ?? n.completionTokens ?? n.output_tokens ?? n.outputTokens ?? 0) || 0, a = Number(n.total_tokens ?? n.totalTokens ?? r + i) || 0;
497
497
  if (!r && !i && !a) return null;
@@ -508,15 +508,15 @@ function oe(e) {
508
508
  //#endregion
509
509
  //#region node_modules/@vue/shared/dist/shared.esm-bundler.js
510
510
  // @__NO_SIDE_EFFECTS__
511
- function se(e) {
511
+ function ce(e) {
512
512
  let t = /* @__PURE__ */ Object.create(null);
513
513
  for (let n of e.split(",")) t[n] = 1;
514
514
  return (e) => e in t;
515
515
  }
516
- var ce = process.env.NODE_ENV === "production" ? {} : Object.freeze({}), L = process.env.NODE_ENV === "production" ? [] : Object.freeze([]), R = () => {}, le = () => !1, ue = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), de = (e) => e.startsWith("onUpdate:"), fe = Object.assign, pe = (e, t) => {
516
+ var le = process.env.NODE_ENV === "production" ? {} : Object.freeze({}), I = process.env.NODE_ENV === "production" ? [] : Object.freeze([]), L = () => {}, ue = () => !1, de = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), fe = (e) => e.startsWith("onUpdate:"), R = Object.assign, pe = (e, t) => {
517
517
  let n = e.indexOf(t);
518
518
  n > -1 && e.splice(n, 1);
519
- }, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */ se(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"), Ee = /* @__PURE__ */ se("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"), De = (e) => {
519
+ }, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */ ce(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"), Ee = /* @__PURE__ */ ce("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"), De = (e) => {
520
520
  let t = /* @__PURE__ */ Object.create(null);
521
521
  return ((n) => t[n] || (t[n] = e(n)));
522
522
  }, Oe = /-\w/g, ke = De((e) => e.replace(Oe, (e) => e.slice(1).toUpperCase())), Ae = /\B([A-Z])/g, je = De((e) => e.replace(Ae, "-$1").toLowerCase()), Me = De((e) => e.charAt(0).toUpperCase() + e.slice(1)), Ne = De((e) => e ? `on${Me(e)}` : ""), Pe = (e, t) => !Object.is(e, t), Fe = (e, ...t) => {
@@ -565,7 +565,7 @@ function Ke(e) {
565
565
  else if (U(e)) for (let n in e) e[n] && (t += n + " ");
566
566
  return t.trim();
567
567
  }
568
- var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */ se(qe), Ze = /* @__PURE__ */ se(Je), Qe = /* @__PURE__ */ se(Ye), $e = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", et = /* @__PURE__ */ se($e);
568
+ var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */ ce(qe), Ze = /* @__PURE__ */ ce(Je), Qe = /* @__PURE__ */ ce(Ye), $e = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", et = /* @__PURE__ */ ce($e);
569
569
  $e + "";
570
570
  function tt(e) {
571
571
  return !!e || e === "";
@@ -825,7 +825,7 @@ var Mt = 0, Nt = class {
825
825
  let e = t.nextDep;
826
826
  e.prevDep = t.prevDep, t.prevDep && (t.prevDep.nextDep = e), t.prevDep = ft.depsTail, t.nextDep = void 0, ft.depsTail.nextDep = t, ft.depsTail = t, ft.deps === t && (ft.deps = e);
827
827
  }
828
- return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(fe({ effect: ft }, e)), t;
828
+ return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(R({ effect: ft }, e)), t;
829
829
  }
830
830
  trigger(e) {
831
831
  this.version++, Mt++, this.notify(e);
@@ -833,7 +833,7 @@ var Mt = 0, Nt = class {
833
833
  notify(e) {
834
834
  yt();
835
835
  try {
836
- if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(fe({ effect: t.sub }, e));
836
+ if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(R({ effect: t.sub }, e));
837
837
  for (let e = this.subs; e; e = e.prevSub) e.sub.notify() && e.sub.dep.notify();
838
838
  } finally {
839
839
  bt();
@@ -1040,7 +1040,7 @@ function Zt(e, t, n = []) {
1040
1040
  let r = (/* @__PURE__ */ Nn(e))[t].apply(e, n);
1041
1041
  return bt(), At(), r;
1042
1042
  }
1043
- var Qt = /* @__PURE__ */ se("__proto__,__v_isRef,__isVue"), $t = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ve));
1043
+ var Qt = /* @__PURE__ */ ce("__proto__,__v_isRef,__isVue"), $t = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ve));
1044
1044
  function en(e) {
1045
1045
  ve(e) || (e = String(e));
1046
1046
  let t = /* @__PURE__ */ Nn(this);
@@ -1109,7 +1109,7 @@ var tn = class {
1109
1109
  function dn(e, t, n) {
1110
1110
  return function(...r) {
1111
1111
  let i = this.__v_raw, a = /* @__PURE__ */ Nn(i), o = V(a), s = e === "entries" || e === Symbol.iterator && o, c = e === "keys" && o, l = i[e](...r), u = n ? ln : t ? In : Fn;
1112
- return !t && Bt(a, "iterate", c ? Rt : Lt), fe(Object.create(l), { next() {
1112
+ return !t && Bt(a, "iterate", c ? Rt : Lt), R(Object.create(l), { next() {
1113
1113
  let { value: e, done: t } = l.next();
1114
1114
  return t ? {
1115
1115
  value: e,
@@ -1121,7 +1121,7 @@ function dn(e, t, n) {
1121
1121
  } });
1122
1122
  };
1123
1123
  }
1124
- function G(e) {
1124
+ function fn(e) {
1125
1125
  return function(...t) {
1126
1126
  if (process.env.NODE_ENV !== "production") {
1127
1127
  let n = t[0] ? `on key "${t[0]}" ` : "";
@@ -1130,7 +1130,7 @@ function G(e) {
1130
1130
  return e === "delete" ? !1 : e === "clear" ? void 0 : this;
1131
1131
  };
1132
1132
  }
1133
- function fn(e, t) {
1133
+ function pn(e, t) {
1134
1134
  let n = {
1135
1135
  get(n) {
1136
1136
  let r = this.__v_raw, i = /* @__PURE__ */ Nn(r), a = /* @__PURE__ */ Nn(n);
@@ -1153,11 +1153,11 @@ function fn(e, t) {
1153
1153
  return !e && Bt(o, "iterate", Lt), a.forEach((e, t) => n.call(r, s(e), s(t), i));
1154
1154
  }
1155
1155
  };
1156
- return fe(n, e ? {
1157
- add: G("add"),
1158
- set: G("set"),
1159
- delete: G("delete"),
1160
- clear: G("clear")
1156
+ return R(n, e ? {
1157
+ add: fn("add"),
1158
+ set: fn("set"),
1159
+ delete: fn("delete"),
1160
+ clear: fn("clear")
1161
1161
  } : {
1162
1162
  add(e) {
1163
1163
  let n = /* @__PURE__ */ Nn(this), r = un(n), i = /* @__PURE__ */ Nn(e), a = !t && !/* @__PURE__ */ jn(e) && !/* @__PURE__ */ An(e) ? i : e;
@@ -1189,11 +1189,11 @@ function fn(e, t) {
1189
1189
  n[r] = dn(r, e, t);
1190
1190
  }), n;
1191
1191
  }
1192
- function pn(e, t) {
1193
- let n = fn(e, t);
1192
+ function G(e, t) {
1193
+ let n = pn(e, t);
1194
1194
  return (t, r, i) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? t : Reflect.get(z(n, r) && r in t ? n : t, r, i);
1195
1195
  }
1196
- var mn = { get: /* @__PURE__ */ pn(!1, !1) }, hn = { get: /* @__PURE__ */ pn(!1, !0) }, gn = { get: /* @__PURE__ */ pn(!0, !1) }, _n = { get: /* @__PURE__ */ pn(!0, !0) };
1196
+ var mn = { get: /* @__PURE__ */ G(!1, !1) }, hn = { get: /* @__PURE__ */ G(!1, !0) }, gn = { get: /* @__PURE__ */ G(!0, !1) }, _n = { get: /* @__PURE__ */ G(!0, !0) };
1197
1197
  function vn(e, t, n) {
1198
1198
  let r = /* @__PURE__ */ Nn(n);
1199
1199
  if (r !== n && t.call(e, r)) {
@@ -1356,7 +1356,7 @@ function Xn(e, t = !1, n = Yn) {
1356
1356
  t || Jn.set(n, t = []), t.push(e);
1357
1357
  } else process.env.NODE_ENV !== "production" && !t && st("onWatcherCleanup() was called when there was no active watcher to associate with.");
1358
1358
  }
1359
- function Zn(e, t, n = ce) {
1359
+ function Zn(e, t, n = le) {
1360
1360
  let { immediate: r, deep: i, once: a, scheduler: o, augmentJob: s, call: c } = n, l = (e) => {
1361
1361
  (n.onWarn || st)("Invalid watch source: ", e, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.");
1362
1362
  }, u = (e) => i ? e : /* @__PURE__ */ jn(e) || i === !1 || i === 0 ? Qn(e, 1) : Qn(e), d, f, p, m, h = !1, g = !1;
@@ -1381,7 +1381,7 @@ function Zn(e, t, n = ce) {
1381
1381
  } finally {
1382
1382
  Yn = t;
1383
1383
  }
1384
- } : (f = R, process.env.NODE_ENV !== "production" && l(e)), t && i) {
1384
+ } : (f = L, process.env.NODE_ENV !== "production" && l(e)), t && i) {
1385
1385
  let e = f, t = i === !0 ? Infinity : i;
1386
1386
  f = () => Qn(e(), t);
1387
1387
  }
@@ -1562,7 +1562,7 @@ function dr(e, t, n, r) {
1562
1562
  } else process.env.NODE_ENV !== "production" && q(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`);
1563
1563
  }
1564
1564
  function fr(e, t, n, r = !0) {
1565
- let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config || ce;
1565
+ let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config || le;
1566
1566
  if (t) {
1567
1567
  let r = t.parent, i = t.proxy, o = process.env.NODE_ENV === "production" ? `https://vuejs.org/error-reference/#runtime-${n}` : lr[n];
1568
1568
  for (; r;) {
@@ -1642,7 +1642,7 @@ function Or(e) {
1642
1642
  var kr = (e) => e.id == null ? e.flags & 2 ? -1 : Infinity : e.id;
1643
1643
  function Ar(e) {
1644
1644
  process.env.NODE_ENV !== "production" && (e ||= /* @__PURE__ */ new Map());
1645
- let t = process.env.NODE_ENV === "production" ? R : (t) => jr(e, t);
1645
+ let t = process.env.NODE_ENV === "production" ? L : (t) => jr(e, t);
1646
1646
  try {
1647
1647
  for (hr = 0; hr < mr.length; hr++) {
1648
1648
  let e = mr[hr];
@@ -1718,7 +1718,7 @@ function Vr(e, t) {
1718
1718
  });
1719
1719
  }
1720
1720
  function Hr(e, t) {
1721
- fe(e, t);
1721
+ R(e, t);
1722
1722
  for (let n in e) n !== "__file" && !(n in t) && delete e[n];
1723
1723
  }
1724
1724
  function Ur(e) {
@@ -1799,7 +1799,7 @@ function di(e, t) {
1799
1799
  if (oi === null) return process.env.NODE_ENV !== "production" && q("withDirectives can only be used inside render functions."), e;
1800
1800
  let n = sc(oi), r = e.dirs ||= [];
1801
1801
  for (let e = 0; e < t.length; e++) {
1802
- let [i, a, o, s = ce] = t[e];
1802
+ let [i, a, o, s = le] = t[e];
1803
1803
  i && (H(i) && (i = {
1804
1804
  mounted: i,
1805
1805
  updated: i
@@ -1852,10 +1852,10 @@ var hi = /* @__PURE__ */ Symbol.for("v-scx"), gi = () => {
1852
1852
  function _i(e, t, n) {
1853
1853
  return process.env.NODE_ENV !== "production" && !H(t) && q("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."), vi(e, t, n);
1854
1854
  }
1855
- function vi(e, t, n = ce) {
1855
+ function vi(e, t, n = le) {
1856
1856
  let { immediate: r, deep: i, flush: a, once: o } = n;
1857
1857
  process.env.NODE_ENV !== "production" && !t && (r !== void 0 && q("watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature."), i !== void 0 && q("watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature."), o !== void 0 && q("watch() \"once\" option is only respected when using the watch(source, callback, options?) signature."));
1858
- let s = fe({}, n);
1858
+ let s = R({}, n);
1859
1859
  process.env.NODE_ENV !== "production" && (s.onWarn = q);
1860
1860
  let c = t && r || !t && a !== "post", l;
1861
1861
  if (Xs) {
@@ -1864,7 +1864,7 @@ function vi(e, t, n = ce) {
1864
1864
  l = e.__watcherHandles ||= [];
1865
1865
  } else if (!c) {
1866
1866
  let e = () => {};
1867
- return e.stop = R, e.resume = R, e.pause = R, e;
1867
+ return e.stop = L, e.resume = L, e.pause = L, e;
1868
1868
  }
1869
1869
  }
1870
1870
  let u = Vs;
@@ -2159,7 +2159,7 @@ function Yi(e, t = !1, n) {
2159
2159
  }
2160
2160
  // @__NO_SIDE_EFFECTS__
2161
2161
  function Xi(e, t) {
2162
- return H(e) ? /* @__PURE__ */ fe({ name: e.name }, t, { setup: e }) : e;
2162
+ return H(e) ? /* @__PURE__ */ R({ name: e.name }, t, { setup: e }) : e;
2163
2163
  }
2164
2164
  function Zi(e) {
2165
2165
  e.ids = [
@@ -2188,7 +2188,7 @@ function ta(e, t, n, r, i = !1) {
2188
2188
  q("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");
2189
2189
  return;
2190
2190
  }
2191
- let l = t && t.r, u = s.refs === ce ? s.refs = {} : s.refs, d = s.setupState, f = /* @__PURE__ */ Nn(d), p = d === ce ? le : (e) => process.env.NODE_ENV !== "production" && (z(f, e) && !/* @__PURE__ */ Ln(f[e]) && q(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`), Qi.has(f[e])) || $i(u, e) ? !1 : z(f, e), m = (e, t) => !(process.env.NODE_ENV !== "production" && Qi.has(e) || t && $i(u, t));
2191
+ let l = t && t.r, u = s.refs === le ? s.refs = {} : s.refs, d = s.setupState, f = /* @__PURE__ */ Nn(d), p = d === le ? ue : (e) => process.env.NODE_ENV !== "production" && (z(f, e) && !/* @__PURE__ */ Ln(f[e]) && q(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`), Qi.has(f[e])) || $i(u, e) ? !1 : z(f, e), m = (e, t) => !(process.env.NODE_ENV !== "production" && Qi.has(e) || t && $i(u, t));
2192
2192
  if (l != null && l !== c) {
2193
2193
  if (na(t), _e(l)) u[l] = null, p(l) && (d[l] = null);
2194
2194
  else if (/* @__PURE__ */ Ln(l)) {
@@ -2312,7 +2312,7 @@ function Ca(e, t, n = {}, r, i) {
2312
2312
  function wa(e) {
2313
2313
  return e.some((e) => !xs(e) || !(e.type === fs || e.type === J && !wa(e.children))) ? e : null;
2314
2314
  }
2315
- var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe(/* @__PURE__ */ Object.create(null), {
2315
+ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ R(/* @__PURE__ */ Object.create(null), {
2316
2316
  $: (e) => e,
2317
2317
  $el: (e) => e.vnode.el,
2318
2318
  $data: (e) => e.data,
@@ -2330,7 +2330,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2330
2330
  },
2331
2331
  $nextTick: (e) => e.n ||= Sr.bind(e.proxy),
2332
2332
  $watch: (e) => yi.bind(e)
2333
- }), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !== ce && !e.__isScriptSetup && z(e, t), ka = {
2333
+ }), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !== le && !e.__isScriptSetup && z(e, t), ka = {
2334
2334
  get({ _: e }, t) {
2335
2335
  if (t === "__v_skip") return !0;
2336
2336
  let { ctx: n, setupState: r, data: i, props: a, accessCache: o, type: s, appContext: c } = e;
@@ -2344,21 +2344,21 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2344
2344
  case 3: return a[t];
2345
2345
  }
2346
2346
  else if (Oa(r, t)) return o[t] = 1, r[t];
2347
- else if (i !== ce && z(i, t)) return o[t] = 2, i[t];
2347
+ else if (i !== le && z(i, t)) return o[t] = 2, i[t];
2348
2348
  else if (z(a, t)) return o[t] = 3, a[t];
2349
- else if (n !== ce && z(n, t)) return o[t] = 4, n[t];
2349
+ else if (n !== le && z(n, t)) return o[t] = 4, n[t];
2350
2350
  else Fa && (o[t] = 0);
2351
2351
  }
2352
2352
  let l = Ea[t], u, d;
2353
2353
  if (l) return t === "$attrs" ? (Bt(e.attrs, "get", ""), process.env.NODE_ENV !== "production" && oo()) : process.env.NODE_ENV !== "production" && t === "$slots" && Bt(e, "get", t), l(e);
2354
2354
  if ((u = s.__cssModules) && (u = u[t])) return u;
2355
- if (n !== ce && z(n, t)) return o[t] = 4, n[t];
2355
+ if (n !== le && z(n, t)) return o[t] = 4, n[t];
2356
2356
  if (d = c.config.globalProperties, z(d, t)) return d[t];
2357
- process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !== ce && Da(t[0]) && z(i, t) ? q(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === oi && q(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`));
2357
+ process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !== le && Da(t[0]) && z(i, t) ? q(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === oi && q(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`));
2358
2358
  },
2359
2359
  set({ _: e }, t, n) {
2360
2360
  let { data: r, setupState: i, ctx: a } = e;
2361
- return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !== ce && z(r, t) ? (r[t] = n, !0) : z(e.props, t) ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(a, t, {
2361
+ return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !== le && z(r, t) ? (r[t] = n, !0) : z(e.props, t) ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(a, t, {
2362
2362
  enumerable: !0,
2363
2363
  configurable: !0,
2364
2364
  value: n
@@ -2366,7 +2366,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
2366
2366
  },
2367
2367
  has({ _: { data: e, setupState: t, accessCache: n, ctx: r, appContext: i, props: a, type: o } }, s) {
2368
2368
  let c;
2369
- return !!(n[s] || e !== ce && s[0] !== "$" && z(e, s) || Oa(t, s) || z(a, s) || z(r, s) || z(Ea, s) || z(i.config.globalProperties, s) || (c = o.__cssModules) && c[s]);
2369
+ return !!(n[s] || e !== le && s[0] !== "$" && z(e, s) || Oa(t, s) || z(a, s) || z(r, s) || z(Ea, s) || z(i.config.globalProperties, s) || (c = o.__cssModules) && c[s]);
2370
2370
  },
2371
2371
  defineProperty(e, t, n) {
2372
2372
  return n.get == null ? z(n, "value") && this.set(e, t, n.value, null) : e._.accessCache[t] = 0, Reflect.defineProperty(e, t, n);
@@ -2384,7 +2384,7 @@ function Aa(e) {
2384
2384
  configurable: !0,
2385
2385
  enumerable: !1,
2386
2386
  get: () => Ea[n](e),
2387
- set: R
2387
+ set: L
2388
2388
  });
2389
2389
  }), t;
2390
2390
  }
@@ -2395,7 +2395,7 @@ function ja(e) {
2395
2395
  enumerable: !0,
2396
2396
  configurable: !0,
2397
2397
  get: () => e.props[n],
2398
- set: R
2398
+ set: L
2399
2399
  });
2400
2400
  });
2401
2401
  }
@@ -2411,7 +2411,7 @@ function Ma(e) {
2411
2411
  enumerable: !0,
2412
2412
  configurable: !0,
2413
2413
  get: () => n[e],
2414
- set: R
2414
+ set: L
2415
2415
  });
2416
2416
  }
2417
2417
  });
@@ -2451,15 +2451,15 @@ function Ia(e) {
2451
2451
  configurable: !0,
2452
2452
  enumerable: !0,
2453
2453
  get: () => t[e],
2454
- set: R
2454
+ set: L
2455
2455
  });
2456
2456
  }
2457
2457
  if (Fa = !0, a) for (let e in a) {
2458
- let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) : R;
2459
- process.env.NODE_ENV !== "production" && i === R && q(`Computed property "${e}" has no getter.`);
2458
+ let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) : L;
2459
+ process.env.NODE_ENV !== "production" && i === L && q(`Computed property "${e}" has no getter.`);
2460
2460
  let o = pc({
2461
2461
  get: i,
2462
- set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ? R : () => {
2462
+ set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ? L : () => {
2463
2463
  q(`Write operation failed: computed property "${e}" is readonly.`);
2464
2464
  }
2465
2465
  });
@@ -2491,9 +2491,9 @@ function Ia(e) {
2491
2491
  });
2492
2492
  });
2493
2493
  } else e.exposed ||= {};
2494
- x && e.render === R && (e.render = x), D != null && (e.inheritAttrs = D), O && (e.components = O), k && (e.directives = k), T && Zi(e);
2494
+ x && e.render === L && (e.render = x), D != null && (e.inheritAttrs = D), O && (e.components = O), k && (e.directives = k), T && Zi(e);
2495
2495
  }
2496
- function La(e, t, n = R) {
2496
+ function La(e, t, n = L) {
2497
2497
  B(e) && (e = Ga(e));
2498
2498
  for (let r in e) {
2499
2499
  let i = e[r], a;
@@ -2563,7 +2563,7 @@ var Ha = {
2563
2563
  };
2564
2564
  function Ua(e, t) {
2565
2565
  return t ? e ? function() {
2566
- return fe(H(e) ? e.call(this, this) : e, H(t) ? t.call(this, this) : t);
2566
+ return R(H(e) ? e.call(this, this) : e, H(t) ? t.call(this, this) : t);
2567
2567
  } : t : e;
2568
2568
  }
2569
2569
  function Wa(e, t) {
@@ -2581,15 +2581,15 @@ function Ka(e, t) {
2581
2581
  return e ? [...new Set([].concat(e, t))] : t;
2582
2582
  }
2583
2583
  function qa(e, t) {
2584
- return e ? fe(/* @__PURE__ */ Object.create(null), e, t) : t;
2584
+ return e ? R(/* @__PURE__ */ Object.create(null), e, t) : t;
2585
2585
  }
2586
2586
  function Ja(e, t) {
2587
- return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : fe(/* @__PURE__ */ Object.create(null), Na(e), Na(t ?? {})) : t;
2587
+ return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : R(/* @__PURE__ */ Object.create(null), Na(e), Na(t ?? {})) : t;
2588
2588
  }
2589
2589
  function Ya(e, t) {
2590
2590
  if (!e) return t;
2591
2591
  if (!t) return e;
2592
- let n = fe(/* @__PURE__ */ Object.create(null), e);
2592
+ let n = R(/* @__PURE__ */ Object.create(null), e);
2593
2593
  for (let r in t) n[r] = Ka(e[r], t[r]);
2594
2594
  return n;
2595
2595
  }
@@ -2597,7 +2597,7 @@ function Xa() {
2597
2597
  return {
2598
2598
  app: null,
2599
2599
  config: {
2600
- isNativeTag: le,
2600
+ isNativeTag: ue,
2601
2601
  performance: !1,
2602
2602
  globalProperties: {},
2603
2603
  optionMergeStrategies: {},
@@ -2617,7 +2617,7 @@ function Xa() {
2617
2617
  var Za = 0;
2618
2618
  function Qa(e, t) {
2619
2619
  return function(n, r = null) {
2620
- H(n) || (n = fe({}, n)), r != null && !U(r) && (process.env.NODE_ENV !== "production" && q("root props passed to app.mount() must be an object."), r = null);
2620
+ H(n) || (n = R({}, n)), r != null && !U(r) && (process.env.NODE_ENV !== "production" && q("root props passed to app.mount() must be an object."), r = null);
2621
2621
  let i = Xa(), a = /* @__PURE__ */ new WeakSet(), o = [], s = !1, c = i.app = {
2622
2622
  _uid: Za++,
2623
2623
  _component: n,
@@ -2680,7 +2680,7 @@ function Qa(e, t) {
2680
2680
  var $a = null, eo = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${ke(t)}Modifiers`] || e[`${je(t)}Modifiers`];
2681
2681
  function to(e, t, ...n) {
2682
2682
  if (e.isUnmounted) return;
2683
- let r = e.vnode.props || ce;
2683
+ let r = e.vnode.props || le;
2684
2684
  if (process.env.NODE_ENV !== "production") {
2685
2685
  let { emitsOptions: r, propsOptions: [i] } = e;
2686
2686
  if (r) if (!(t in r)) (!i || !(Ne(ke(t)) in i)) && q(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Ne(ke(t))}" prop.`);
@@ -2711,14 +2711,14 @@ function ro(e, t, n = !1) {
2711
2711
  if (!H(e)) {
2712
2712
  let r = (e) => {
2713
2713
  let n = ro(e, t, !0);
2714
- n && (s = !0, fe(o, n));
2714
+ n && (s = !0, R(o, n));
2715
2715
  };
2716
2716
  !n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
2717
2717
  }
2718
- return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) : fe(o, a), U(e) && r.set(e, o), o);
2718
+ return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) : R(o, a), U(e) && r.set(e, o), o);
2719
2719
  }
2720
2720
  function io(e, t) {
2721
- return !e || !ue(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), z(e, t[0].toLowerCase() + t.slice(1)) || z(e, je(t)) || z(e, t));
2721
+ return !e || !de(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), z(e, t[0].toLowerCase() + t.slice(1)) || z(e, je(t)) || z(e, t));
2722
2722
  }
2723
2723
  var ao = !1;
2724
2724
  function oo() {
@@ -2754,12 +2754,12 @@ function so(e) {
2754
2754
  if (process.env.NODE_ENV !== "production" && _.patchFlag > 0 && _.patchFlag & 2048 && ([y, b] = co(_)), v && h !== !1) {
2755
2755
  let e = Object.keys(v), { shapeFlag: t } = y;
2756
2756
  if (e.length) {
2757
- if (t & 7) a && e.some(de) && (v = fo(v, a)), y = As(y, v, !1, !0);
2757
+ if (t & 7) a && e.some(fe) && (v = fo(v, a)), y = As(y, v, !1, !0);
2758
2758
  else if (process.env.NODE_ENV !== "production" && !ao && y.type !== fs) {
2759
2759
  let e = Object.keys(s), t = [], n = [];
2760
2760
  for (let r = 0, i = e.length; r < i; r++) {
2761
2761
  let i = e[r];
2762
- ue(i) ? de(i) || t.push(i[2].toLowerCase() + i.slice(3)) : n.push(i);
2762
+ de(i) ? fe(i) || t.push(i[2].toLowerCase() + i.slice(3)) : n.push(i);
2763
2763
  }
2764
2764
  n.length && q(`Extraneous non-props attributes (${n.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`), t.length && q(`Extraneous non-emits event listeners (${t.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
2765
2765
  }
@@ -2791,11 +2791,11 @@ function lo(e, t = !0) {
2791
2791
  }
2792
2792
  var uo = (e) => {
2793
2793
  let t;
2794
- for (let n in e) (n === "class" || n === "style" || ue(n)) && ((t ||= {})[n] = e[n]);
2794
+ for (let n in e) (n === "class" || n === "style" || de(n)) && ((t ||= {})[n] = e[n]);
2795
2795
  return t;
2796
2796
  }, fo = (e, t) => {
2797
2797
  let n = {};
2798
- for (let r in e) (!de(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
2798
+ for (let r in e) (!fe(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
2799
2799
  return n;
2800
2800
  }, po = (e) => e.shapeFlag & 7 || e.type === fs;
2801
2801
  function mo(e, t, n) {
@@ -2881,7 +2881,7 @@ function wo(e, t, n, r) {
2881
2881
  i && z(i, u = ke(c)) ? !a || !a.includes(u) ? n[u] = l : (s ||= {})[u] = l : io(e.emitsOptions, c) || (!(c in r) || l !== r[c]) && (r[c] = l, o = !0);
2882
2882
  }
2883
2883
  if (a) {
2884
- let t = /* @__PURE__ */ Nn(n), r = s || ce;
2884
+ let t = /* @__PURE__ */ Nn(n), r = s || le;
2885
2885
  for (let o = 0; o < a.length; o++) {
2886
2886
  let s = a[o];
2887
2887
  n[s] = To(i, t, s, r[s], e, !z(r, s));
@@ -2918,22 +2918,22 @@ function Do(e, t, n = !1) {
2918
2918
  let r = (e) => {
2919
2919
  c = !0;
2920
2920
  let [n, r] = Do(e, t, !0);
2921
- fe(o, n), r && s.push(...r);
2921
+ R(o, n), r && s.push(...r);
2922
2922
  };
2923
2923
  !n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
2924
2924
  }
2925
- if (!a && !c) return U(e) && r.set(e, L), L;
2925
+ if (!a && !c) return U(e) && r.set(e, I), I;
2926
2926
  if (B(a)) for (let e = 0; e < a.length; e++) {
2927
2927
  process.env.NODE_ENV !== "production" && !_e(a[e]) && q("props must be strings when using array syntax.", a[e]);
2928
2928
  let t = ke(a[e]);
2929
- Oo(t) && (o[t] = ce);
2929
+ Oo(t) && (o[t] = le);
2930
2930
  }
2931
2931
  else if (a) {
2932
2932
  process.env.NODE_ENV !== "production" && !U(a) && q("invalid props options", a);
2933
2933
  for (let e in a) {
2934
2934
  let t = ke(e);
2935
2935
  if (Oo(t)) {
2936
- let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } : fe({}, n), i = r.type, c = !1, l = !0;
2936
+ let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } : R({}, n), i = r.type, c = !1, l = !0;
2937
2937
  if (B(i)) for (let e = 0; e < i.length; ++e) {
2938
2938
  let t = i[e], n = H(t) && t.name;
2939
2939
  if (n === "Boolean") {
@@ -2983,7 +2983,7 @@ function jo(e, t, n, r, i) {
2983
2983
  s && !s(t, r) && q("Invalid prop: custom validator check failed for prop \"" + e + "\".");
2984
2984
  }
2985
2985
  }
2986
- var Mo = /* @__PURE__ */ se("String,Number,Boolean,Function,Symbol,BigInt");
2986
+ var Mo = /* @__PURE__ */ ce("String,Number,Boolean,Function,Symbol,BigInt");
2987
2987
  function No(e, t) {
2988
2988
  let n, r = ko(t);
2989
2989
  if (r === "null") n = e === null;
@@ -3046,7 +3046,7 @@ var Ro = (e) => e === "_" || e === "_ctx" || e === "$stable", zo = (e) => B(e) ?
3046
3046
  e ? (Uo(r, t, n), n && Ie(r, "_", e, !0)) : Vo(t, r);
3047
3047
  } else t && Ho(e, t);
3048
3048
  }, Go = (e, t, n) => {
3049
- let { vnode: r, slots: i } = e, a = !0, o = ce;
3049
+ let { vnode: r, slots: i } = e, a = !0, o = le;
3050
3050
  if (r.shapeFlag & 32) {
3051
3051
  let r = t._;
3052
3052
  r ? process.env.NODE_ENV !== "production" && Mr ? (Uo(i, t, n), Vt(e, "set", "$slots")) : n && r === 1 ? a = !1 : Uo(i, t, n) : (a = !t.$stable, Vo(t, i)), o = t;
@@ -3083,9 +3083,9 @@ function es(e, t) {
3083
3083
  Zo();
3084
3084
  let n = Be();
3085
3085
  n.__VUE__ = !0, process.env.NODE_ENV !== "production" && Jr(n.__VUE_DEVTOOLS_GLOBAL_HOOK__, n);
3086
- let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p = R, insertStaticContent: m } = e, h = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = process.env.NODE_ENV !== "production" && Mr ? !1 : !!t.dynamicChildren) => {
3086
+ let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p = L, insertStaticContent: m } = e, h = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = process.env.NODE_ENV !== "production" && Mr ? !1 : !!t.dynamicChildren) => {
3087
3087
  if (e === t) return;
3088
- e && !Ss(e, t) && (r = se(e), ne(e, i, a, !0), e = null), t.patchFlag === -2 && (c = !1, t.dynamicChildren = null);
3088
+ e && !Ss(e, t) && (r = ce(e), re(e, i, a, !0), e = null), t.patchFlag === -2 && (c = !1, t.dynamicChildren = null);
3089
3089
  let { type: l, ref: u, shapeFlag: d } = t;
3090
3090
  switch (l) {
3091
3091
  case ds:
@@ -3100,7 +3100,7 @@ function es(e, t) {
3100
3100
  case J:
3101
3101
  k(e, t, n, r, i, a, o, s, c);
3102
3102
  break;
3103
- default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c, de) : process.env.NODE_ENV !== "production" && q("Invalid VNode type:", l, `(${typeof l})`);
3103
+ default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c, fe) : process.env.NODE_ENV !== "production" && q("Invalid VNode type:", l, `(${typeof l})`);
3104
3104
  }
3105
3105
  u != null && i ? ta(u, e && e.ref, a, t || e, !t) : u == null && e && e.ref != null && ta(e.ref, null, a, e, !0);
3106
3106
  }, g = (e, t, n, i) => {
@@ -3175,7 +3175,7 @@ function es(e, t) {
3175
3175
  process.env.NODE_ENV !== "production" && (c.__vnode = t);
3176
3176
  let { patchFlag: l, dynamicChildren: d, dirs: f } = t;
3177
3177
  l |= e.patchFlag & 16;
3178
- let p = e.props || ce, m = t.props || ce, h;
3178
+ let p = e.props || le, m = t.props || le, h;
3179
3179
  if (n && ns(n, !1), (h = m.onVnodeBeforeUpdate) && Ls(h, n, t, e), f && fi(t, e, n, "beforeUpdate"), n && ns(n, !0), (process.env.NODE_ENV !== "production" && Mr || d && (!e.dynamicChildren || e.dynamicChildren.length !== d.length)) && (l = 0, s = !1, d = null), (p.innerHTML && m.innerHTML == null || p.textContent && m.textContent == null) && u(c, ""), d ? (D(e.dynamicChildren, d, c, n, r, ts(t, i), o), process.env.NODE_ENV !== "production" && is(e, t)) : s || te(e, t, c, null, n, r, ts(t, i), o, !1), l > 0) {
3180
3180
  if (l & 16) O(c, p, m, n, i);
3181
3181
  else if (l & 2 && p.class !== m.class && a(c, "class", null, m.class, i), l & 4 && a(c, "style", p.style, m.style, i), l & 8) {
@@ -3197,7 +3197,7 @@ function es(e, t) {
3197
3197
  }
3198
3198
  }, O = (e, t, n, r, i) => {
3199
3199
  if (t !== n) {
3200
- if (t !== ce) for (let o in t) !Te(o) && !(o in n) && a(e, o, t[o], null, i, r);
3200
+ if (t !== le) for (let o in t) !Te(o) && !(o in n) && a(e, o, t[o], null, i, r);
3201
3201
  for (let o in n) {
3202
3202
  if (Te(o)) continue;
3203
3203
  let s = n[o], c = t[o];
@@ -3212,7 +3212,7 @@ function es(e, t) {
3212
3212
  t.slotScopeIds = s, e == null ? t.shapeFlag & 512 ? i.ctx.activate(t, n, r, o, c) : j(t, n, r, i, a, o, c) : M(e, t, c);
3213
3213
  }, j = (e, t, n, r, i, a, o) => {
3214
3214
  let s = e.component = Bs(e, r, i);
3215
- if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer = de), process.env.NODE_ENV !== "production" && Jo(s, "init"), Zs(s, !1, o), process.env.NODE_ENV !== "production" && Yo(s, "init"), process.env.NODE_ENV !== "production" && Mr && (e.el = null), s.asyncDep) {
3215
+ if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer = fe), process.env.NODE_ENV !== "production" && Jo(s, "init"), Zs(s, !1, o), process.env.NODE_ENV !== "production" && Yo(s, "init"), process.env.NODE_ENV !== "production" && Mr && (e.el = null), s.asyncDep) {
3216
3216
  if (i && i.registerDep(s, ee, o), !e.el) {
3217
3217
  let r = s.subTree = Ds(fs);
3218
3218
  _(null, r, t, n), e.placeholder = r.el;
@@ -3246,7 +3246,7 @@ function es(e, t) {
3246
3246
  let p = so(e);
3247
3247
  process.env.NODE_ENV !== "production" && Yo(e, "render");
3248
3248
  let m = e.subTree;
3249
- e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el), se(m), e, i, a), process.env.NODE_ENV !== "production" && Yo(e, "patch"), t.el = p.el, u === null && _o(e, p.el), r && Qo(r, i), (f = t.props && t.props.onVnodeUpdated) && Qo(() => Ls(f, s, t, c), i), process.env.NODE_ENV !== "production" && Qr(e), process.env.NODE_ENV !== "production" && tr();
3249
+ e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el), ce(m), e, i, a), process.env.NODE_ENV !== "production" && Yo(e, "patch"), t.el = p.el, u === null && _o(e, p.el), r && Qo(r, i), (f = t.props && t.props.onVnodeUpdated) && Qo(() => Ls(f, s, t, c), i), process.env.NODE_ENV !== "production" && Qr(e), process.env.NODE_ENV !== "production" && tr();
3250
3250
  } else {
3251
3251
  let o, { el: s, props: c } = t, { bm: l, m: u, parent: d, root: f, type: p } = e, m = ra(t);
3252
3252
  if (ns(e, !1), l && Fe(l), !m && (o = c && c.onVnodeBeforeMount) && Ls(o, d, t), ns(e, !0), s && pe) {
@@ -3279,23 +3279,23 @@ function es(e, t) {
3279
3279
  let l = e && e.children, d = e ? e.shapeFlag : 0, f = t.children, { patchFlag: p, shapeFlag: m } = t;
3280
3280
  if (p > 0) {
3281
3281
  if (p & 128) {
3282
- F(l, f, n, r, i, a, o, s, c);
3282
+ P(l, f, n, r, i, a, o, s, c);
3283
3283
  return;
3284
3284
  } else if (p & 256) {
3285
- P(l, f, n, r, i, a, o, s, c);
3285
+ ne(l, f, n, r, i, a, o, s, c);
3286
3286
  return;
3287
3287
  }
3288
3288
  }
3289
- m & 8 ? (d & 16 && oe(l, i, a), f !== l && u(n, f)) : d & 16 ? m & 16 ? F(l, f, n, r, i, a, o, s, c) : oe(l, i, a, !0) : (d & 8 && u(n, ""), m & 16 && T(f, n, r, i, a, o, s, c));
3290
- }, P = (e, t, n, r, i, a, o, s, c) => {
3291
- e ||= L, t ||= L;
3289
+ m & 8 ? (d & 16 && se(l, i, a), f !== l && u(n, f)) : d & 16 ? m & 16 ? P(l, f, n, r, i, a, o, s, c) : se(l, i, a, !0) : (d & 8 && u(n, ""), m & 16 && T(f, n, r, i, a, o, s, c));
3290
+ }, ne = (e, t, n, r, i, a, o, s, c) => {
3291
+ e ||= I, t ||= I;
3292
3292
  let l = e.length, u = t.length, d = Math.min(l, u), f;
3293
3293
  for (f = 0; f < d; f++) {
3294
3294
  let r = t[f] = c ? Ps(t[f]) : Ns(t[f]);
3295
3295
  h(e[f], r, n, null, i, a, o, s, c);
3296
3296
  }
3297
- l > u ? oe(e, i, a, !0, !1, d) : T(t, n, r, i, a, o, s, c, d);
3298
- }, F = (e, t, n, r, i, a, o, s, c) => {
3297
+ l > u ? se(e, i, a, !0, !1, d) : T(t, n, r, i, a, o, s, c, d);
3298
+ }, P = (e, t, n, r, i, a, o, s, c) => {
3299
3299
  let l = 0, u = t.length, d = e.length - 1, f = u - 1;
3300
3300
  for (; l <= d && l <= f;) {
3301
3301
  let r = e[l], u = t[l] = c ? Ps(t[l]) : Ns(t[l]);
@@ -3314,7 +3314,7 @@ function es(e, t) {
3314
3314
  let e = f + 1, d = e < u ? t[e].el : r;
3315
3315
  for (; l <= f;) h(null, t[l] = c ? Ps(t[l]) : Ns(t[l]), n, d, i, a, o, s, c), l++;
3316
3316
  }
3317
- } else if (l > f) for (; l <= d;) ne(e[l], i, a, !0), l++;
3317
+ } else if (l > f) for (; l <= d;) re(e[l], i, a, !0), l++;
3318
3318
  else {
3319
3319
  let p = l, m = l, g = /* @__PURE__ */ new Map();
3320
3320
  for (l = m; l <= f; l++) {
@@ -3326,7 +3326,7 @@ function es(e, t) {
3326
3326
  for (l = p; l <= d; l++) {
3327
3327
  let r = e[l];
3328
3328
  if (v >= y) {
3329
- ne(r, i, a, !0);
3329
+ re(r, i, a, !0);
3330
3330
  continue;
3331
3331
  }
3332
3332
  let u;
@@ -3335,18 +3335,18 @@ function es(e, t) {
3335
3335
  u = _;
3336
3336
  break;
3337
3337
  }
3338
- u === void 0 ? ne(r, i, a, !0) : (S[u - m] = l + 1, u >= x ? x = u : b = !0, h(r, t[u], n, null, i, a, o, s, c), v++);
3338
+ u === void 0 ? re(r, i, a, !0) : (S[u - m] = l + 1, u >= x ? x = u : b = !0, h(r, t[u], n, null, i, a, o, s, c), v++);
3339
3339
  }
3340
- let C = b ? as(S) : L;
3340
+ let C = b ? as(S) : I;
3341
3341
  for (_ = C.length - 1, l = y - 1; l >= 0; l--) {
3342
3342
  let e = m + l, d = t[e], f = t[e + 1], p = e + 1 < u ? f.el || cs(f) : r;
3343
- S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ? I(d, n, p, 2) : _--);
3343
+ S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ? F(d, n, p, 2) : _--);
3344
3344
  }
3345
3345
  }
3346
- }, I = (e, t, n, a, o = null) => {
3346
+ }, F = (e, t, n, a, o = null) => {
3347
3347
  let { el: s, type: c, transition: l, children: u, shapeFlag: d } = e;
3348
3348
  if (d & 6) {
3349
- I(e.component.subTree, t, n, a);
3349
+ F(e.component.subTree, t, n, a);
3350
3350
  return;
3351
3351
  }
3352
3352
  if (d & 128) {
@@ -3354,12 +3354,12 @@ function es(e, t) {
3354
3354
  return;
3355
3355
  }
3356
3356
  if (d & 64) {
3357
- c.move(e, t, n, de);
3357
+ c.move(e, t, n, fe);
3358
3358
  return;
3359
3359
  }
3360
3360
  if (c === J) {
3361
3361
  r(s, t, n);
3362
- for (let e = 0; e < u.length; e++) I(u[e], t, n, a);
3362
+ for (let e = 0; e < u.length; e++) F(u[e], t, n, a);
3363
3363
  r(e.anchor, t, n);
3364
3364
  return;
3365
3365
  }
@@ -3380,31 +3380,31 @@ function es(e, t) {
3380
3380
  o ? o(s, u, d) : d();
3381
3381
  }
3382
3382
  else r(s, t, n);
3383
- }, ne = (e, t, n, r = !1, i = !1) => {
3383
+ }, re = (e, t, n, r = !1, i = !1) => {
3384
3384
  let { type: a, props: o, ref: s, children: c, dynamicChildren: l, shapeFlag: u, patchFlag: d, dirs: f, cacheIndex: p, memo: m } = e;
3385
3385
  if (d === -2 && (i = !1), s != null && (kt(), ta(s, null, n, e, !0), At()), p != null && (t.renderCache[p] = void 0), u & 256) {
3386
3386
  t.ctx.deactivate(e);
3387
3387
  return;
3388
3388
  }
3389
3389
  let h = u & 1 && f, g = !ra(e), _;
3390
- if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6) ae(e.component, n, r);
3390
+ if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6) oe(e.component, n, r);
3391
3391
  else {
3392
3392
  if (u & 128) {
3393
3393
  e.suspense.unmount(n, r);
3394
3394
  return;
3395
3395
  }
3396
- h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n, de, r) : l && !l.hasOnce && (a !== J || d > 0 && d & 64) ? oe(l, t, n, !1, !0) : (a === J && d & 384 || !i && u & 16) && oe(c, t, n), r && re(e);
3396
+ h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n, fe, r) : l && !l.hasOnce && (a !== J || d > 0 && d & 64) ? se(l, t, n, !1, !0) : (a === J && d & 384 || !i && u & 16) && se(c, t, n), r && ie(e);
3397
3397
  }
3398
3398
  let v = m != null && p == null;
3399
3399
  (g && (_ = o && o.onVnodeUnmounted) || h || v) && Qo(() => {
3400
3400
  _ && Ls(_, t, e), h && fi(e, null, t, "unmounted"), v && (e.el = null);
3401
3401
  }, n);
3402
- }, re = (e) => {
3402
+ }, ie = (e) => {
3403
3403
  let { type: t, el: n, anchor: r, transition: a } = e;
3404
3404
  if (t === J) {
3405
3405
  process.env.NODE_ENV !== "production" && e.patchFlag > 0 && e.patchFlag & 2048 && a && !a.persisted ? e.children.forEach((e) => {
3406
- e.type === fs ? i(e.el) : re(e);
3407
- }) : ie(n, r);
3406
+ e.type === fs ? i(e.el) : ie(e);
3407
+ }) : ae(n, r);
3408
3408
  return;
3409
3409
  }
3410
3410
  if (t === ps) {
@@ -3418,42 +3418,42 @@ function es(e, t) {
3418
3418
  let { leave: t, delayLeave: r } = a, i = () => t(n, o);
3419
3419
  r ? r(e.el, o, i) : i();
3420
3420
  } else o();
3421
- }, ie = (e, t) => {
3421
+ }, ae = (e, t) => {
3422
3422
  let n;
3423
3423
  for (; e !== t;) n = f(e), i(e), e = n;
3424
3424
  i(t);
3425
- }, ae = (e, t, n) => {
3425
+ }, oe = (e, t, n) => {
3426
3426
  process.env.NODE_ENV !== "production" && e.type.__hmrId && Lr(e);
3427
3427
  let { bum: r, scope: i, job: a, subTree: o, um: s, m: c, a: l } = e;
3428
- ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8, ne(o, e, t, n)), s && Qo(s, t), Qo(() => {
3428
+ ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8, re(o, e, t, n)), s && Qo(s, t), Qo(() => {
3429
3429
  e.isUnmounted = !0;
3430
3430
  }, t), process.env.NODE_ENV !== "production" && ei(e);
3431
- }, oe = (e, t, n, r = !1, i = !1, a = 0) => {
3432
- for (let o = a; o < e.length; o++) ne(e[o], t, n, r, i);
3433
- }, se = (e) => {
3434
- if (e.shapeFlag & 6) return se(e.component.subTree);
3431
+ }, se = (e, t, n, r = !1, i = !1, a = 0) => {
3432
+ for (let o = a; o < e.length; o++) re(e[o], t, n, r, i);
3433
+ }, ce = (e) => {
3434
+ if (e.shapeFlag & 6) return ce(e.component.subTree);
3435
3435
  if (e.shapeFlag & 128) return e.suspense.next();
3436
3436
  let t = f(e.anchor || e.el), n = t && t[Si];
3437
3437
  return n ? f(n) : t;
3438
- }, le = !1, ue = (e, t, n) => {
3438
+ }, ue = !1, de = (e, t, n) => {
3439
3439
  let r;
3440
- e == null ? t._vnode && (ne(t._vnode, null, null, !0), r = t._vnode.component) : h(t._vnode || null, e, t, null, null, null, n), t._vnode = e, le ||= (le = !0, Dr(r), Or(), !1);
3441
- }, de = {
3440
+ e == null ? t._vnode && (re(t._vnode, null, null, !0), r = t._vnode.component) : h(t._vnode || null, e, t, null, null, null, n), t._vnode = e, ue ||= (ue = !0, Dr(r), Or(), !1);
3441
+ }, fe = {
3442
3442
  p: h,
3443
- um: ne,
3444
- m: I,
3445
- r: re,
3443
+ um: re,
3444
+ m: F,
3445
+ r: ie,
3446
3446
  mt: j,
3447
3447
  mc: T,
3448
3448
  pc: te,
3449
3449
  pbc: D,
3450
- n: se,
3450
+ n: ce,
3451
3451
  o: e
3452
- }, fe, pe;
3453
- return t && ([fe, pe] = t(de)), {
3454
- render: ue,
3455
- hydrate: fe,
3456
- createApp: Qa(ue, fe)
3452
+ }, R, pe;
3453
+ return t && ([R, pe] = t(fe)), {
3454
+ render: de,
3455
+ hydrate: R,
3456
+ createApp: Qa(de, R)
3457
3457
  };
3458
3458
  }
3459
3459
  function ts({ type: e, props: t }, n) {
@@ -3516,7 +3516,7 @@ function vs(e, t = !1) {
3516
3516
  _s += e, e < 0 && hs && t && (hs.hasOnce = !0);
3517
3517
  }
3518
3518
  function ys(e) {
3519
- return e.dynamicChildren = _s > 0 ? hs || L : null, gs(), _s > 0 && hs && hs.push(e), e;
3519
+ return e.dynamicChildren = _s > 0 ? hs || I : null, gs(), _s > 0 && hs && hs.push(e), e;
3520
3520
  }
3521
3521
  function X(e, t, n, r, i, a) {
3522
3522
  return ys(Z(e, t, n, r, i, a, !0));
@@ -3581,13 +3581,13 @@ function Os(e, t = null, n = null, r = 0, i = null, a = !1) {
3581
3581
  if (fc(e) && (e = e.__vccOpts), t) {
3582
3582
  t = ks(t);
3583
3583
  let { class: e, style: n } = t;
3584
- e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n = fe({}, n)), t.style = Ve(n));
3584
+ e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n = R({}, n)), t.style = Ve(n));
3585
3585
  }
3586
3586
  let o = _e(e) ? 1 : ls(e) ? 128 : Ci(e) ? 64 : U(e) ? 4 : H(e) ? 2 : 0;
3587
3587
  return process.env.NODE_ENV !== "production" && o & 4 && /* @__PURE__ */ Mn(e) && (e = /* @__PURE__ */ Nn(e), q("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.", "\nComponent that was made reactive: ", e)), Z(e, t, n, r, i, o, a, !0);
3588
3588
  }
3589
3589
  function ks(e) {
3590
- return e ? /* @__PURE__ */ Mn(e) || bo(e) ? fe({}, e) : e : null;
3590
+ return e ? /* @__PURE__ */ Mn(e) || bo(e) ? R({}, e) : e : null;
3591
3591
  }
3592
3592
  function As(e, t, n = !1, r = !1) {
3593
3593
  let { props: i, ref: a, patchFlag: o, children: s, transition: c } = e, l = t ? Is(i || {}, t) : i, u = {
@@ -3670,9 +3670,9 @@ function Is(...e) {
3670
3670
  let r = e[n];
3671
3671
  for (let e in r) if (e === "class") t.class !== r.class && (t.class = Ke([t.class, r.class]));
3672
3672
  else if (e === "style") t.style = Ve([t.style, r.style]);
3673
- else if (ue(e)) {
3673
+ else if (de(e)) {
3674
3674
  let n = t[e], i = r[e];
3675
- i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !de(e) && (t[e] = i);
3675
+ i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !fe(e) && (t[e] = i);
3676
3676
  } else e !== "" && (t[e] = r[e]);
3677
3677
  }
3678
3678
  return t;
@@ -3714,15 +3714,15 @@ function Bs(e, t, n) {
3714
3714
  emitsOptions: ro(r, i),
3715
3715
  emit: null,
3716
3716
  emitted: null,
3717
- propsDefaults: ce,
3717
+ propsDefaults: le,
3718
3718
  inheritAttrs: r.inheritAttrs,
3719
- ctx: ce,
3720
- data: ce,
3721
- props: ce,
3722
- attrs: ce,
3723
- slots: ce,
3724
- refs: ce,
3725
- setupState: ce,
3719
+ ctx: le,
3720
+ data: le,
3721
+ props: le,
3722
+ attrs: le,
3723
+ slots: le,
3724
+ refs: le,
3725
+ setupState: le,
3726
3726
  setupContext: null,
3727
3727
  suspense: n,
3728
3728
  suspenseId: n ? n.pendingId : 0,
@@ -3765,7 +3765,7 @@ var Gs = (e) => {
3765
3765
  };
3766
3766
  }, Ks = () => {
3767
3767
  Vs && Vs.scope.off(), Us(null);
3768
- }, qs = /* @__PURE__ */ se("slot,component");
3768
+ }, qs = /* @__PURE__ */ ce("slot,component");
3769
3769
  function Js(e, { isNativeTag: t }) {
3770
3770
  (qs(e) || t(e)) && q("Do not use built-in or reserved HTML elements as component id: " + e);
3771
3771
  }
@@ -3820,13 +3820,13 @@ function rc(e, t, n) {
3820
3820
  if (t) {
3821
3821
  process.env.NODE_ENV !== "production" && Jo(e, "compile");
3822
3822
  let { isCustomElement: n, compilerOptions: i } = e.appContext.config, { delimiters: a, compilerOptions: o } = r;
3823
- r.render = ec(t, fe(fe({
3823
+ r.render = ec(t, R(R({
3824
3824
  isCustomElement: n,
3825
3825
  delimiters: a
3826
3826
  }, i), o)), process.env.NODE_ENV !== "production" && Yo(e, "compile");
3827
3827
  }
3828
3828
  }
3829
- e.render = r.render || R, tc && tc(e);
3829
+ e.render = r.render || L, tc && tc(e);
3830
3830
  }
3831
3831
  {
3832
3832
  let t = Gs(e);
@@ -3837,7 +3837,7 @@ function rc(e, t, n) {
3837
3837
  At(), t();
3838
3838
  }
3839
3839
  }
3840
- process.env.NODE_ENV !== "production" && !r.render && e.render === R && !t && (!ec && r.template ? q("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".") : q("Component is missing template or render function: ", r));
3840
+ process.env.NODE_ENV !== "production" && !r.render && e.render === L && !t && (!ec && r.template ? q("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".") : q("Component is missing template or render function: ", r));
3841
3841
  }
3842
3842
  var ic = process.env.NODE_ENV === "production" ? { get(e, t) {
3843
3843
  return Bt(e, "get", ""), e[t];
@@ -4000,7 +4000,7 @@ function hc() {
4000
4000
  };
4001
4001
  function a(e) {
4002
4002
  let t = [];
4003
- e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !== ce && t.push(o("setup", e.setupState)), e.data !== ce && t.push(o("data", /* @__PURE__ */ Nn(e.data)));
4003
+ e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !== le && t.push(o("setup", e.setupState)), e.data !== le && t.push(o("data", /* @__PURE__ */ Nn(e.data)));
4004
4004
  let n = c(e, "computed");
4005
4005
  n && t.push(o("computed", n));
4006
4006
  let i = c(e, "inject");
@@ -4016,7 +4016,7 @@ function hc() {
4016
4016
  ]), t;
4017
4017
  }
4018
4018
  function o(e, t) {
4019
- return t = fe({}, t), Object.keys(t).length ? [
4019
+ return t = R({}, t), Object.keys(t).length ? [
4020
4020
  "div",
4021
4021
  { style: "line-height:1.25em;margin-bottom:0.6em" },
4022
4022
  [
@@ -4075,7 +4075,7 @@ function hc() {
4075
4075
  }
4076
4076
  window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i];
4077
4077
  }
4078
- var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ? R : q;
4078
+ var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ? L : q;
4079
4079
  process.env.NODE_ENV, process.env.NODE_ENV;
4080
4080
  //#endregion
4081
4081
  //#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
@@ -4147,7 +4147,7 @@ var bc = vc ? (e) => vc.createHTML(e) : (e) => e, xc = "http://www.w3.org/2000/s
4147
4147
  leaveFromClass: String,
4148
4148
  leaveActiveClass: String,
4149
4149
  leaveToClass: String
4150
- }, Ac = /* @__PURE__ */ fe({}, zi, kc), jc = /* @__PURE__ */ ((e) => (e.displayName = "Transition", e.props = Ac, e))((e, { slots: t }) => mc(Ui, Pc(e), t)), Mc = (e, t = []) => {
4150
+ }, Ac = /* @__PURE__ */ R({}, zi, kc), jc = /* @__PURE__ */ ((e) => (e.displayName = "Transition", e.props = Ac, e))((e, { slots: t }) => mc(Ui, Pc(e), t)), Mc = (e, t = []) => {
4151
4151
  B(e) ? e.forEach((e) => e(...t)) : e && e(...t);
4152
4152
  }, Nc = (e) => e ? B(e) ? e.some((e) => e.length > 1) : e.length > 1 : !1;
4153
4153
  function Pc(e) {
@@ -4164,7 +4164,7 @@ function Pc(e) {
4164
4164
  Rc(t, e ? c : a), Lc(t, e ? u : s), Nc(i) || Vc(t, r, h, o);
4165
4165
  });
4166
4166
  };
4167
- return fe(t, {
4167
+ return R(t, {
4168
4168
  onBeforeEnter(e) {
4169
4169
  Mc(_, [e]), Lc(e, a), Lc(e, o);
4170
4170
  },
@@ -4399,11 +4399,11 @@ function bl(e, t) {
4399
4399
  }
4400
4400
  function xl(e, t) {
4401
4401
  return H(e) || B(e) ? e : (_c(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
4402
- Expected function or array of functions, received type ${typeof e}.`), R);
4402
+ Expected function or array of functions, received type ${typeof e}.`), L);
4403
4403
  }
4404
4404
  var Sl = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, Cl = (e, t, n, r, i, a) => {
4405
4405
  let o = i === "svg";
4406
- t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) : ue(t) ? de(t) || pl(e, t, n, r, a) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : wl(e, t, r, o)) ? (ll(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && cl(e, t, r, o, a, t !== "value")) : e._isVueCE && (Tl(e, t) || e._def.__asyncLoader && (/[A-Z]/.test(t) || !_e(r))) ? ll(e, ke(t), r, a, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), cl(e, t, r, o));
4406
+ t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) : de(t) ? fe(t) || pl(e, t, n, r, a) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : wl(e, t, r, o)) ? (ll(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && cl(e, t, r, o, a, t !== "value")) : e._isVueCE && (Tl(e, t) || e._def.__asyncLoader && (/[A-Z]/.test(t) || !_e(r))) ? ll(e, ke(t), r, a, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), cl(e, t, r, o));
4407
4407
  };
4408
4408
  function wl(e, t, n, r) {
4409
4409
  if (r) return !!(t === "innerHTML" || t === "textContent" || t in e && Sl(t) && H(n));
@@ -4497,7 +4497,7 @@ var jl = {
4497
4497
  let r = je(n.key);
4498
4498
  if (t.some((e) => e === r || Fl[e] === r)) return e(n);
4499
4499
  }));
4500
- }, Ll = /* @__PURE__ */ fe({ patchProp: Cl }, Tc), Rl;
4500
+ }, Ll = /* @__PURE__ */ R({ patchProp: Cl }, Tc), Rl;
4501
4501
  function zl() {
4502
4502
  return Rl ||= $o(Ll);
4503
4503
  }
@@ -6429,52 +6429,52 @@ function vp(e) {
6429
6429
  return Array.isArray(r) && r.length && r[0] && typeof r[0].jsonPath == "string" ? r[0].jsonPath : "";
6430
6430
  }
6431
6431
  function yp(e) {
6432
- let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug: P = !1 } = e, F = g ?? cp;
6433
- (!Number.isFinite(F) || F < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${F} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), F = 1);
6434
- let I = D({
6432
+ let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug: ne = !1 } = e, P = g ?? cp;
6433
+ (!Number.isFinite(P) || P < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${P} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), P = 1);
6434
+ let F = D({
6435
6435
  model: c,
6436
6436
  contextWindow: e.contextWindow,
6437
6437
  maxOutputTokens: e.maxOutputTokens,
6438
6438
  vision: e.vision
6439
- }), ie = u ?? I.maxOutputTokens, ae = k(I.contextWindow), se = A(I.contextWindow);
6440
- function ce(e) {
6441
- I = e, ae = k(I.contextWindow), se = A(I.contextWindow);
6439
+ }), ae = u ?? F.maxOutputTokens, oe = k(F.contextWindow), ce = A(F.contextWindow);
6440
+ function le(e) {
6441
+ F = e, oe = k(F.contextWindow), ce = A(F.contextWindow);
6442
6442
  }
6443
- let L = /* @__PURE__ */ zn([]), R = 0, le = () => ({
6443
+ let I = /* @__PURE__ */ zn([]), L = 0, ue = () => ({
6444
6444
  retries: 0,
6445
6445
  exhausted: 0
6446
- }), ue = {
6447
- transitional_retry: le(),
6448
- completion_gate: le(),
6449
- evidence_audit_gate: le(),
6450
- zero_tool_gate: le(),
6451
- status_query_gate: le(),
6452
- ...e.pageAssertionGate === !0 ? { page_assertion_gate: le() } : {}
6453
- }, de = {
6446
+ }), de = {
6447
+ transitional_retry: ue(),
6448
+ completion_gate: ue(),
6449
+ evidence_audit_gate: ue(),
6450
+ zero_tool_gate: ue(),
6451
+ status_query_gate: ue(),
6452
+ ...e.pageAssertionGate === !0 ? { page_assertion_gate: ue() } : {}
6453
+ }, fe = {
6454
6454
  ZERO_TOOL_GATE_EXHAUSTED: "zero_tool_gate",
6455
6455
  AUDIT_GATE_EXHAUSTED: "evidence_audit_gate",
6456
6456
  COMPLETION_GATE_EXHAUSTED: "completion_gate",
6457
6457
  PAGE_ASSERTION_GATE_EXHAUSTED: "page_assertion_gate"
6458
- }, fe = [], pe = 0, me = 0, z = /* @__PURE__ */ new Set();
6458
+ }, R = [], pe = 0, me = 0, z = /* @__PURE__ */ new Set();
6459
6459
  function B(e, t) {
6460
6460
  let n = {
6461
6461
  timestamp: Date.now(),
6462
6462
  type: e,
6463
6463
  data: pp(t)
6464
6464
  };
6465
- L.value.push(n), L.value.length > lp && L.value.splice(0, L.value.length - lp), Hn(L), E?.(n), P && console.log(`%c[Agent] ${e}`, "color:#667eea;font-weight:bold", t);
6465
+ I.value.push(n), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I), E?.(n), ne && console.log(`%c[Agent] ${e}`, "color:#667eea;font-weight:bold", t);
6466
6466
  }
6467
6467
  let V = (e) => {
6468
- L.value.push({
6468
+ I.value.push({
6469
6469
  ...e,
6470
6470
  timestamp: typeof e.timestamp == "number" ? e.timestamp : Date.now(),
6471
6471
  data: pp(e.data)
6472
- }), L.value.length > lp && L.value.splice(0, L.value.length - lp), Hn(L);
6472
+ }), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I);
6473
6473
  }, he = [...h.flatMap((e) => e.tools || []), ...m], ge = e.llm ?? new n({
6474
6474
  apiKey: t,
6475
6475
  model: c,
6476
6476
  temperature: l,
6477
- maxTokens: ie,
6477
+ maxTokens: ae,
6478
6478
  maxRetries: 0,
6479
6479
  configuration: {
6480
6480
  ...s ? { baseURL: N(s) } : {},
@@ -6511,16 +6511,16 @@ function yp(e) {
6511
6511
  pin: be.has(e.name)
6512
6512
  });
6513
6513
  }
6514
- let n = Math.max(2e3, Math.round(I.contextWindow * ye)), r = O(e) + t.reduce((e, t) => e + t.tokens, 0), i = /* @__PURE__ */ new Set();
6514
+ let n = Math.max(2e3, Math.round(F.contextWindow * ye)), r = O(e) + t.reduce((e, t) => e + t.tokens, 0), i = /* @__PURE__ */ new Set();
6515
6515
  if (r > n) {
6516
6516
  let e = r, a = [];
6517
6517
  for (let e of t.filter((e) => !e.pin).sort((e, t) => t.tokens - e.tokens)) {
6518
6518
  if (r <= n) break;
6519
6519
  a.push(`${e.name}(${e.tokens})`), i.add(e.name), r -= e.tokens, e.text = "";
6520
6520
  }
6521
- a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${I.contextWindow} 的 ${ye * 100}%),drop 非核心段:${a.join(", ")}(保 base/mission/workingMemory)`);
6521
+ a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%),drop 非核心段:${a.join(", ")}(保 base/mission/workingMemory)`);
6522
6522
  }
6523
- return fe = t.map((e) => ({
6523
+ return R = t.map((e) => ({
6524
6524
  name: e.name,
6525
6525
  tokens: e.tokens,
6526
6526
  dropped: i.has(e.name)
@@ -6529,7 +6529,7 @@ function yp(e) {
6529
6529
  function Se(e) {
6530
6530
  let t = [new a(xe())];
6531
6531
  for (let n of e) if (n.role === "user") {
6532
- let e = n.quote ? bu(n.content, n.quote) : n.content, r = I.vision && n.images?.length ? au(e, n.images, M) : null;
6532
+ let e = n.quote ? bu(n.content, n.quote) : n.content, r = F.vision && n.images?.length ? au(e, n.images, M) : null;
6533
6533
  r ? t.push(new i({ content: r })) : n.images?.some((e) => e.description) ? t.push(new i(ou(e, n.images))) : t.push(new i(e));
6534
6534
  } else n.role === "assistant" ? t.push(new r(n.content)) : n.role === "system" && t.push(new a(n.content));
6535
6535
  return t;
@@ -6578,13 +6578,13 @@ function yp(e) {
6578
6578
  };
6579
6579
  if (rd(a) && !e._ctxRetry) {
6580
6580
  e._ctxRetry = !0;
6581
- let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(I.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6581
+ let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6582
6582
  return B("error", {
6583
6583
  stage: "context_overflow_retry",
6584
6584
  at: "launch",
6585
6585
  beforeTokens: a,
6586
6586
  afterTokens: s,
6587
- window: I.contextWindow
6587
+ window: F.contextWindow
6588
6588
  }), console.warn(`[page-agent-sdk] 上下文超限(启动)→ 激进 trim 重试:${a} → ${s} tokens`), we({
6589
6589
  ...e,
6590
6590
  messages: o
@@ -6611,12 +6611,12 @@ function yp(e) {
6611
6611
  try {
6612
6612
  for await (let e of nd(c, b, x)) {
6613
6613
  l = l ? l.concat(e) : e;
6614
- let n = ne(e);
6614
+ let n = re(e);
6615
6615
  n && t && (u += n, t({
6616
6616
  type: "text",
6617
6617
  delta: n
6618
6618
  }));
6619
- let r = re(e);
6619
+ let r = ie(e);
6620
6620
  r && t && t({
6621
6621
  type: "reasoning",
6622
6622
  delta: r
@@ -6637,13 +6637,13 @@ function yp(e) {
6637
6637
  };
6638
6638
  if (rd(a) && l === null && u === "" && !e._ctxRetry) {
6639
6639
  e._ctxRetry = !0;
6640
- let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(I.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6640
+ let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
6641
6641
  return B("error", {
6642
6642
  stage: "context_overflow_retry",
6643
6643
  beforeTokens: a,
6644
6644
  afterTokens: s,
6645
- window: I.contextWindow
6646
- }), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${I.contextWindow})`), we({
6645
+ window: F.contextWindow
6646
+ }), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${F.contextWindow})`), we({
6647
6647
  ...e,
6648
6648
  messages: o
6649
6649
  }, t, n, i);
@@ -6745,8 +6745,8 @@ function yp(e) {
6745
6745
  files: e.state.files,
6746
6746
  vfsAvailable: !!e.state.files && o,
6747
6747
  toolName: e.name,
6748
- threshold: ae,
6749
- passThroughChars: se
6748
+ threshold: oe,
6749
+ passThroughChars: ce
6750
6750
  }).content, {
6751
6751
  content: a,
6752
6752
  status: "done"
@@ -6765,7 +6765,7 @@ function yp(e) {
6765
6765
  return mp(e, t);
6766
6766
  }
6767
6767
  function Oe(e) {
6768
- return !P && !E ? [] : e.map((e) => {
6768
+ return !ne && !E ? [] : e.map((e) => {
6769
6769
  let t = Ee(e), n = { role: t === "human" ? "user" : t === "ai" ? "assistant" : t }, r = typeof e.content == "string" ? e.content : JSON.stringify(e.content);
6770
6770
  r && (n.content = r.length > up ? r.slice(0, up) + `…(截断 ${r.length - up} 字符)` : r);
6771
6771
  let i = e.tool_calls;
@@ -6793,9 +6793,9 @@ function yp(e) {
6793
6793
  });
6794
6794
  }
6795
6795
  {
6796
- let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(I.contextWindow * ye));
6796
+ let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(F.contextWindow * ye));
6797
6797
  if (e > t) {
6798
- let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${I.contextWindow} 的 ${ye * 100}%);请缩减 systemPrompt 或换更大窗口模型`;
6798
+ let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%);请缩减 systemPrompt 或换更大窗口模型`;
6799
6799
  return console.error(r), n({
6800
6800
  type: "error",
6801
6801
  message: r,
@@ -6815,7 +6815,7 @@ function yp(e) {
6815
6815
  });
6816
6816
  let l = ep(h, (e) => we(e, n, r)), u = tp(h, Te), d = {
6817
6817
  rounds: 0,
6818
- maxToolRounds: F,
6818
+ maxToolRounds: P,
6819
6819
  invokeUsage: {
6820
6820
  prompt_tokens: 0,
6821
6821
  completion_tokens: 0,
@@ -6834,8 +6834,8 @@ function yp(e) {
6834
6834
  }])), v = /* @__PURE__ */ new Map(), y = 0, b = (e) => {
6835
6835
  let t = he.find((t) => t.name === e);
6836
6836
  return t && "writeCapable" in t ? typeof t.writeCapable == "function" || t.writeCapable === !0 : _p.has(e);
6837
- }, x = 0, S = 0, E = hp(F, _), D = null, k = 0, A = !1, j = !1;
6838
- for (; (x < F || j) && S < E && (S++, !r?.aborted);) {
6837
+ }, x = 0, S = 0, E = hp(P, _), D = null, k = 0, A = !1, j = !1;
6838
+ for (; (x < P || j) && S < E && (S++, !r?.aborted);) {
6839
6839
  if (T > 0 && d.invokeUsage.total_tokens > T) {
6840
6840
  let e = `本轮 token 预算(约 ${T})已用尽:任务在 ${x} 轮工具调用后中断,已完成的部分均保留。可继续对话,指定下一步(如「继续完成」/「只改 X」/「提高预算重试」)。`;
6841
6841
  return B("error", {
@@ -6863,7 +6863,7 @@ function yp(e) {
6863
6863
  }), U = Xf(h, {
6864
6864
  messages: c,
6865
6865
  state: U
6866
- }), c = Ce(c, gp(x, F, e.hasSubagent)), c = De(c, Math.round(I.contextWindow * .6)), B("llm_request", {
6866
+ }), c = Ce(c, gp(x, P, e.hasSubagent)), c = De(c, Math.round(F.contextWindow * .6)), B("llm_request", {
6867
6867
  round: x + 1,
6868
6868
  model: _e(),
6869
6869
  tools: he.map((e) => e.name),
@@ -6874,7 +6874,7 @@ function yp(e) {
6874
6874
  state: U
6875
6875
  });
6876
6876
  c.push(t.message);
6877
- let a = oe(t.message);
6877
+ let a = se(t.message);
6878
6878
  if (B("llm_response", {
6879
6879
  round: x + 1,
6880
6880
  content: t.content,
@@ -6886,7 +6886,7 @@ function yp(e) {
6886
6886
  }), t.content;
6887
6887
  if (!t.toolCalls.length) {
6888
6888
  {
6889
- let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r = oe(t.message);
6889
+ let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r = se(t.message);
6890
6890
  if ((n === "length" || !t.content && (r?.completion_tokens ?? 0) >= 4e3) && !A) {
6891
6891
  A = !0, j = !0, B("error", {
6892
6892
  stage: "completion_truncated_retry",
@@ -6950,7 +6950,7 @@ function yp(e) {
6950
6950
  });
6951
6951
  if (a?.kind === "feedback") {
6952
6952
  j = !0;
6953
- let e = ue[a.gate.stage];
6953
+ let e = de[a.gate.stage];
6954
6954
  e && (e.retries += 1), B("middleware", {
6955
6955
  stage: a.gate.stage,
6956
6956
  attempt: a.gate.attempt,
@@ -6960,8 +6960,8 @@ function yp(e) {
6960
6960
  continue;
6961
6961
  }
6962
6962
  if (a?.kind === "observable") {
6963
- let e = de[a.obs.code];
6964
- e && ue[e] && (ue[e].exhausted += 1), B("error", {
6963
+ let e = fe[a.obs.code];
6964
+ e && de[e] && (de[e].exhausted += 1), B("error", {
6965
6965
  stage: a.obs.code,
6966
6966
  ...a.obs.context,
6967
6967
  content: t.content.slice(0, 160)
@@ -7116,7 +7116,7 @@ function yp(e) {
7116
7116
  round: x + 1,
7117
7117
  maxParallelTools: C
7118
7118
  });
7119
- e.invalidatedCount > 0 && (c = e.messages, R += e.invalidatedCount, B("middleware", {
7119
+ e.invalidatedCount > 0 && (c = e.messages, L += e.invalidatedCount, B("middleware", {
7120
7120
  stage: "stale_read_invalidated",
7121
7121
  round: x + 1,
7122
7122
  writtenPaths: E.map((e) => vp(e.args) || "(整体)"),
@@ -7130,28 +7130,28 @@ function yp(e) {
7130
7130
  type: "done",
7131
7131
  content: ""
7132
7132
  }), "";
7133
- let M = `\n\n(提示:工具调用次数已达上限(${F} 轮 / ${E} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
7133
+ let M = `\n\n(提示:工具调用次数已达上限(${P} 轮 / ${E} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
7134
7134
  B("error", {
7135
7135
  stage: "react_call_limit_exceeded",
7136
7136
  rounds: x,
7137
- maxToolRounds: F,
7137
+ maxToolRounds: P,
7138
7138
  iterations: S,
7139
7139
  maxIterations: E
7140
7140
  }), n({
7141
7141
  type: "error",
7142
- message: `ReAct 循环达到调用上限(rounds=${x}/${F},iterations=${S}/${E}),已强制收口,可回复「继续」。`,
7142
+ message: `ReAct 循环达到调用上限(rounds=${x}/${P},iterations=${S}/${E}),已强制收口,可回复「继续」。`,
7143
7143
  severity: "observable",
7144
7144
  code: "REACT_CALL_LIMIT_EXCEEDED",
7145
7145
  context: {
7146
7146
  rounds: x,
7147
- maxToolRounds: F,
7147
+ maxToolRounds: P,
7148
7148
  iterations: S,
7149
7149
  maxIterations: E
7150
7150
  }
7151
7151
  });
7152
7152
  let ee = Gf(U.todos ?? [], g, z);
7153
7153
  if (ee.length) {
7154
- ue.evidence_audit_gate.exhausted += 1;
7154
+ de.evidence_audit_gate.exhausted += 1;
7155
7155
  let e = ee.map((e) => ({
7156
7156
  id: e.id,
7157
7157
  evidence: e.evidence
@@ -7215,11 +7215,11 @@ function yp(e) {
7215
7215
  }), e + M;
7216
7216
  }
7217
7217
  }
7218
- let P = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
7218
+ let ne = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
7219
7219
  return n({
7220
7220
  type: "done",
7221
- content: P + M
7222
- }), P + M;
7221
+ content: ne + M
7222
+ }), ne + M;
7223
7223
  } finally {
7224
7224
  try {
7225
7225
  await Qf(h, U);
@@ -7248,19 +7248,19 @@ function yp(e) {
7248
7248
  get allTools() {
7249
7249
  return he;
7250
7250
  },
7251
- getStaleReadsInvalidated: () => R,
7251
+ getStaleReadsInvalidated: () => L,
7252
7252
  getLlmRetries: () => pe,
7253
7253
  getLlmCallFailures: () => me,
7254
- getGateStats: () => ue,
7255
- getLastSystemSegments: () => fe,
7254
+ getGateStats: () => de,
7255
+ getLastSystemSegments: () => R,
7256
7256
  resetSessionCounters: () => {
7257
- R = 0, pe = 0, me = 0;
7258
- for (let e of Object.keys(ue)) ue[e] = le();
7257
+ L = 0, pe = 0, me = 0;
7258
+ for (let e of Object.keys(de)) de[e] = ue();
7259
7259
  },
7260
7260
  setTools: je,
7261
7261
  setLlm: Me,
7262
- setModelCaps: ce,
7263
- debugLogs: L,
7262
+ setModelCaps: le,
7263
+ debugLogs: I,
7264
7264
  getEffectiveSystemPrompt: () => xe()
7265
7265
  };
7266
7266
  }
@@ -7742,6 +7742,36 @@ var Qp = {
7742
7742
  "5. Prefer incremental write patches (send only the change, e.g. write({ value, patch:{ op, jsonPath } })) over resending the whole large JSON, which risks truncation;",
7743
7743
  "6. If a write hits an optimistic-lock conflict (VERSION_CONFLICT returned, or the tool suspends awaiting the user decision): after the tool returns, follow its instruction (keep external → re-read then edit; overwritten/restored → continue from the result); do not abandon the task."
7744
7744
  ].join("\n"),
7745
+ answerLanes: [
7746
+ "【作答车道:先判问题形态,再选纪律】",
7747
+ "用户的问题分三类,判错车道是最大的答非所问:",
7748
+ "A. 问页面内容(「这页写了什么 / 哪里提到 / 原文是什么 / 这段在说什么」)",
7749
+ " → 以页面实料为准并点明出处;页面内容与你的先验知识冲突时以页面为准;页面没写就说没写,一句话即可,不列举查过哪些节。",
7750
+ "B. 问概念术语(「X 是什么 / 啥意思 / X 和 Y 什么区别」)",
7751
+ " → 页面有语境就先按页面语境讲;页面没有也必须直接用自己的知识解释,",
7752
+ " 开头一句「本页未提及,以下是通用解释:」即可 —— 不许把「页面上没有」当答案。",
7753
+ "C. 求观点经验(「你觉得呢 / 按你的经验 / 是不是很难 / 该怎么选」)",
7754
+ " → 直接给判断和理由;笔记口径与个人观点分开说(「本页的立场是…;我的看法是…」)。",
7755
+ " 页面没写不构成不答的理由。",
7756
+ "",
7757
+ "出处密度:只有「对页面内容的断言」才标出处(句末括注即可);概念解释、个人观点、",
7758
+ "过渡句一律不标。「没找到」的说明压成一句,不报检索过程。"
7759
+ ].join("\n"),
7760
+ answerLanesEn: [
7761
+ "[Answer lanes: classify the question first, then pick the discipline]",
7762
+ "User questions fall into three categories; picking the wrong lane is the biggest way to miss the point:",
7763
+ "A. Asking about page content (\"what does this page say / where is it mentioned / what is the original text / what does this passage mean\")",
7764
+ " → Ground answers in what the page actually says and cite where it came from; when the page conflicts with your prior knowledge, the page wins; if the page does not say it, say so in one sentence — do not enumerate which sections you searched.",
7765
+ "B. Asking about a concept or term (\"what is X / what does it mean / how do X and Y differ\")",
7766
+ " → If the page has context for it, explain in that context first; if the page does not, you MUST still explain it directly from your own knowledge,",
7767
+ " opening with one line like \"Not covered on this page — general explanation:\" — never treat \"it is not on the page\" as the answer.",
7768
+ "C. Asking for your opinion or experience (\"what do you think / in your experience / is it hard to match / which should I choose\")",
7769
+ " → Give your judgment and reasoning directly; keep the notes' stance and your own view separate (\"this page's position is ...; my take is ...\").",
7770
+ " The page not covering it is never a reason to refuse.",
7771
+ "",
7772
+ "Citation density: only claims about page content get a citation (a short parenthetical); concept explanations,",
7773
+ "personal opinions, and transitions get none. Compress \"not found\" statements to one sentence; never narrate the search process."
7774
+ ].join("\n"),
7745
7775
  htmlPageOrchestrator: Zp("html"),
7746
7776
  htmlPageProposeFirst: ["【新建/创意类请求】先用简短文字给出 2~3 套方案(每套一两句风格/配色/结构要点),询问用户选哪套;选定前不要委派生成代码、不要写 components。", "【方案切换】已生成某套方案后改选另一套:不重新罗列,直接依据之前描述重新委派生成并覆盖相应组件(委派工具见编排段 use_<id>)。"].join("\n"),
7747
7777
  htmlDirectWriteFallback: [
@@ -8937,7 +8967,7 @@ async function Kh(e, t, n, r, i, a) {
8937
8967
  } : { contextWindow: g.contextWindow }), v = t.onUsage ? {
8938
8968
  name: "sub-usage",
8939
8969
  afterModel: (e) => {
8940
- let n = oe(e.message);
8970
+ let n = se(e.message);
8941
8971
  n && t.onUsage(n);
8942
8972
  }
8943
8973
  } : void 0;
@@ -8962,7 +8992,7 @@ async function Kh(e, t, n, r, i, a) {
8962
8992
  });
8963
8993
  }
8964
8994
  let b;
8965
- !Oh(y) && y.provider === "anthropic" && (b = await I({
8995
+ !Oh(y) && y.provider === "anthropic" && (b = await F({
8966
8996
  ...y,
8967
8997
  model: e.model ?? y.model
8968
8998
  }, {
@@ -10260,14 +10290,14 @@ var Zg = [
10260
10290
  "你是一个页面内容助手,帮助用户理解、查找与排查其当前所在的网页。",
10261
10291
  "你可以经专用工具探查页面:read_page 读页面正文(长文按 hasMore 分页续读)、get_dom 读渲染后结构、dom_search / dom_info 定位元素与查属性" + (e ? "、take_screenshot 截图查看实际渲染效果(视觉问题优先截图,结构推断不能代替)" : "") + ";一切以工具读到的页面实料为准。",
10262
10292
  "用户消息可能带 [引用原文] 块(其在页面上选中的文字):优先围绕引用内容作答,需要更多上下文再向外探索(所在小节 → 整页)。",
10263
- "回答纪律:答案须来自你实际读到的页面内容并点明出处;页面内容与你的先验知识冲突时以页面为准;页面没写的不要编造,本页找不到的如实说明。",
10293
+ Qp.answerLanes,
10264
10294
  "输出从简:直接说内容,不写过程 —— 不要「我先读一下页面」这类旁白、不要「先给结论/依据是」这类包装、不要解释结论是怎么推出来的、不要「下面分三点/综上」这类套话;出处用句末括注(如「(§小节名)」)带过即可。",
10265
10295
  $g
10266
10296
  ].join("\n"), n_ = (e) => [
10267
10297
  "You are a page content assistant that helps users understand, locate, and troubleshoot the web page they are on.",
10268
10298
  "You can inspect the page through dedicated tools: read_page for page text (paginate via hasMore on long documents), get_dom for the rendered structure, dom_search / dom_info to locate elements and read attributes" + (e ? ", and take_screenshot to see the actual rendered appearance (prefer a screenshot for visual questions; structural inference is no substitute)" : "") + "; the page as read by tools is the source of truth.",
10269
10299
  "User messages may carry a [quoted text] block (text they selected on the page): answer around the quote first, then explore outward (its section → the whole page) if more context is needed.",
10270
- "Answer discipline: answers must come from the page content you actually read, citing where it came from; when the page conflicts with your prior knowledge, the page wins; never invent what the page does not say, and state honestly when something cannot be found on this page.",
10300
+ Qp.answerLanesEn,
10271
10301
  "Be terse: state the content directly, never narrate process — no \"let me first read the page\" asides, no \"in summary / the evidence is\" packaging, no explaining how you derived the conclusion, no \"here are three points\" preambles; cite sources inline as a short parenthetical such as \"(§ section name)\".",
10272
10302
  e_,
10273
10303
  "Respond in English."
@@ -11795,32 +11825,32 @@ function rv(e, n = {}) {
11795
11825
  let N = (e) => {
11796
11826
  let t = k();
11797
11827
  return T(t, e), t;
11798
- }, te = n.largeTextThreshold ?? 200, P = (n.largeTextPaths ?? []).map((e) => {
11828
+ }, te = n.largeTextThreshold ?? 200, ne = (n.largeTextPaths ?? []).map((e) => {
11799
11829
  let t = e.lastIndexOf(".");
11800
11830
  return t > 0 ? {
11801
11831
  arrayPath: e.slice(0, t),
11802
11832
  field: e.slice(t + 1)
11803
11833
  } : null;
11804
- }).filter((e) => e !== null), F = !0;
11805
- function I() {
11806
- F = !0;
11834
+ }).filter((e) => e !== null), P = !0;
11835
+ function F() {
11836
+ P = !0;
11807
11837
  }
11808
- let ne = {
11838
+ let re = {
11809
11839
  get: () => ({
11810
11840
  schema: o,
11811
11841
  bind: c,
11812
11842
  description: u
11813
11843
  }),
11814
11844
  set: (e) => {
11815
- o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(), I();
11845
+ o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(), F();
11816
11846
  },
11817
11847
  update: (e) => {
11818
- c = e, g.length = 0, v.clear(), I();
11848
+ c = e, g.length = 0, v.clear(), F();
11819
11849
  },
11820
- markDataDirty: I,
11850
+ markDataDirty: F,
11821
11851
  consumeDataDirty: () => {
11822
- let e = F;
11823
- return F = !1, e;
11852
+ let e = P;
11853
+ return P = !1, e;
11824
11854
  },
11825
11855
  enterScope: (e) => {
11826
11856
  let t = y;
@@ -11874,14 +11904,14 @@ function rv(e, n = {}) {
11874
11904
  } : void 0,
11875
11905
  updateResource: p ? (e, t) => {
11876
11906
  let n = T_(e);
11877
- p.update(n, t), mm(c, n, t), I(), T(k(), "");
11907
+ p.update(n, t), mm(c, n, t), F(), T(k(), "");
11878
11908
  } : void 0,
11879
11909
  deleteResource: p ? (e) => p.delete(e) : void 0,
11880
11910
  listResources: p ? () => p.list() : void 0
11881
- }, re = (e) => {
11911
+ }, ie = (e) => {
11882
11912
  n.onAudit?.(e);
11883
11913
  };
11884
- function ie(e, t) {
11914
+ function ae(e, t) {
11885
11915
  let n = gm(l()), r = g.length ? g[g.length - 1].id + 1 : 1;
11886
11916
  for (g.push({
11887
11917
  id: r,
@@ -11892,7 +11922,7 @@ function rv(e, n = {}) {
11892
11922
  }); g.length > _;) g.shift();
11893
11923
  return r;
11894
11924
  }
11895
- async function ae(e, t, r, i, a) {
11925
+ async function oe(e, t, r, i, a) {
11896
11926
  if (!t || t === "") return null;
11897
11927
  let o = k();
11898
11928
  if (o === t) return null;
@@ -11914,7 +11944,7 @@ function rv(e, n = {}) {
11914
11944
  if (u.action === "restore") {
11915
11945
  await i?.reacquire();
11916
11946
  let e = k();
11917
- if (e !== o) return re({
11947
+ if (e !== o) return ie({
11918
11948
  op: "conflict_recheck",
11919
11949
  detail: `restore 裁决基于 ${o} 恢复时 ${e}(ask 窗口新修改落地,回退被拦)`,
11920
11950
  timestamp: Date.now()
@@ -11930,13 +11960,13 @@ function rv(e, n = {}) {
11930
11960
  message: `restore 裁决所锚定的快照 #${s} 已不在快照栈(可能被 maxSnapshots 淘汰)`,
11931
11961
  hint: "重新 read 拿最新值,或用 restore_data 显式指定快照 id 回退"
11932
11962
  });
11933
- km(c, gm(t.value)), I();
11963
+ km(c, gm(t.value)), F();
11934
11964
  let n = k();
11935
11965
  return T(n, a), `已回退主数据到历史快照 #${t.id}[${t.op}]。当前值:${xm(l(), 400)} (hash=${n})。请基于回退后的值重写或停止。`;
11936
11966
  }
11937
11967
  await i?.reacquire();
11938
11968
  let d = k();
11939
- return d === o ? (T(d, a), null) : (re({
11969
+ return d === o ? (T(d, a), null) : (ie({
11940
11970
  op: "conflict_recheck",
11941
11971
  detail: `裁决基于 ${o} 恢复时 ${d}(ask 窗口新修改落地,overwrite 被拦)`,
11942
11972
  timestamp: Date.now()
@@ -11946,9 +11976,9 @@ function rv(e, n = {}) {
11946
11976
  hint: "重新 read 拿最新值与 hash,基于最新值修改后再写入(单次校验,不再二次挂起)。"
11947
11977
  }));
11948
11978
  }
11949
- let oe = (e, t = !0) => {
11979
+ let se = (e, t = !0) => {
11950
11980
  e.writeCapable = t;
11951
- }, se = s(async ({ id: e }, t) => {
11981
+ }, ce = s(async ({ id: e }, t) => {
11952
11982
  let n = b(t), r = await ee();
11953
11983
  try {
11954
11984
  if (!g.length) return $({
@@ -11963,7 +11993,7 @@ function rv(e, n = {}) {
11963
11993
  hint: "用 history_data({list:true}) 查看可用快照序号"
11964
11994
  });
11965
11995
  let r = o.safeParse(t.value);
11966
- r.success || re({
11996
+ r.success || ie({
11967
11997
  op: "restore",
11968
11998
  detail: `#${t.id} 快照含当前 schema 违例 ${r.error.issues.length} 处(历史既有数据非本次写入,放行回退)`,
11969
11999
  timestamp: Date.now()
@@ -11976,7 +12006,7 @@ function rv(e, n = {}) {
11976
12006
  cur: n
11977
12007
  });
11978
12008
  }
11979
- if (!i.length) return km(c, gm(t.value)), I(), re({
12009
+ if (!i.length) return km(c, gm(t.value)), F(), ie({
11980
12010
  op: "restore",
11981
12011
  detail: `#${t.id}`,
11982
12012
  timestamp: Date.now()
@@ -12009,7 +12039,7 @@ function rv(e, n = {}) {
12009
12039
  }
12010
12040
  e.val === void 0 ? l.push(e.p) : mm(c, n, e.val), s.push(e.p);
12011
12041
  }
12012
- I(), re({
12042
+ F(), ie({
12013
12043
  op: "restore",
12014
12044
  detail: `#${t.id}(保护字段保留 ${s.length}${l.length ? `,未能回填 ${l.length}` : ""})`,
12015
12045
  timestamp: Date.now()
@@ -12024,8 +12054,8 @@ function rv(e, n = {}) {
12024
12054
  description: "把主数据回退到某个快照(不传 id 回退最近一次)。快照列表用 history_data({list:true})。",
12025
12055
  schema: t.object({ id: t.number().int().optional().describe("快照序号;不传回退最近一次") })
12026
12056
  });
12027
- oe(se);
12028
- let ce = s(async ({ id: e, jsonPath: t, list: n }) => {
12057
+ se(ce);
12058
+ let le = s(async ({ id: e, jsonPath: t, list: n }) => {
12029
12059
  if (n) {
12030
12060
  if (!g.length) return "无快照。set/edit/delete 会自动存快照。";
12031
12061
  let e = g.map((e) => {
@@ -12070,7 +12100,7 @@ function rv(e, n = {}) {
12070
12100
  jsonPath: t.string().optional().describe("只看快照的某子路径"),
12071
12101
  list: t.boolean().optional().describe("true 列出快照时间线(序号/操作/标签/时间/大小)")
12072
12102
  })
12073
- }), L = s(async ({ expr: e, queries: t, limit: n }, r) => {
12103
+ }), I = s(async ({ expr: e, queries: t, limit: n }, r) => {
12074
12104
  let i = b(r);
12075
12105
  if (typeof c != "object" || !c) return $({
12076
12106
  code: "NOT_OBJECT",
@@ -12089,7 +12119,7 @@ function rv(e, n = {}) {
12089
12119
  details: { expr: e }
12090
12120
  });
12091
12121
  }
12092
- let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "", P, te, {
12122
+ let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "", ne, te, {
12093
12123
  rootExempt: !1,
12094
12124
  rootPath: String(e.path ?? ""),
12095
12125
  fullTextPrefixes: s,
@@ -12113,7 +12143,7 @@ function rv(e, n = {}) {
12113
12143
  queries: t.array(t.string()).min(2).max(10).optional().describe("批量模式:2-10 条 JSONPath 一次取回(与 expr 同传按 queries);逐条独立返回,单条失败该项标 error 不整批"),
12114
12144
  limit: t.number().int().min(1).max(200).optional().describe("返回结果上限(批量时逐条适用),默认 50")
12115
12145
  })
12116
- }), R = s(async ({ query: e, mode: t, fuzzyThreshold: n, matchKey: r, limit: i }) => {
12146
+ }), L = s(async ({ query: e, mode: t, fuzzyThreshold: n, matchKey: r, limit: i }) => {
12117
12147
  if (c == null) return $({
12118
12148
  code: "EMPTY",
12119
12149
  message: "主数据为空,无可搜索内容"
@@ -12151,7 +12181,7 @@ function rv(e, n = {}) {
12151
12181
  matchKey: t.boolean().optional().describe("是否同时匹配 key 名,默认 true"),
12152
12182
  limit: t.number().int().min(1).max(200).optional().describe("返回上限,默认 50")
12153
12183
  })
12154
- }), le = s(async ({ script: e, mode: t, jsonPath: n }, r) => {
12184
+ }), ue = s(async ({ script: e, mode: t, jsonPath: n }, r) => {
12155
12185
  let s = b(r);
12156
12186
  if (e.length > 8e3) return $({
12157
12187
  code: "SCRIPT_TOO_LARGE",
@@ -12194,7 +12224,7 @@ function rv(e, n = {}) {
12194
12224
  if (u) {
12195
12225
  let e = await ee();
12196
12226
  try {
12197
- let n = await ae("edit", O ? w(s) : void 0, void 0, e, s);
12227
+ let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
12198
12228
  if (n !== null) return n;
12199
12229
  let r = K_({
12200
12230
  bindRef: c,
@@ -12207,13 +12237,13 @@ function rv(e, n = {}) {
12207
12237
  allowKeys: d,
12208
12238
  snapshots: g,
12209
12239
  maxSnapshots: _,
12210
- markDataDirty: I,
12240
+ markDataDirty: F,
12211
12241
  schemaErrorMode: "schema_invalid",
12212
12242
  snapshotLabel: "eval_transform_subtree",
12213
12243
  internalAfterWrite: a,
12214
12244
  protectedCtx: h
12215
12245
  });
12216
- return r.ok ? (re({
12246
+ return r.ok ? (ie({
12217
12247
  op: "edit",
12218
12248
  detail: `eval_transform_subtree @ ${u}`,
12219
12249
  timestamp: Date.now()
@@ -12230,7 +12260,7 @@ function rv(e, n = {}) {
12230
12260
  });
12231
12261
  let e = await ee();
12232
12262
  try {
12233
- let n = await ae("edit", O ? w(s) : void 0, void 0, e, s);
12263
+ let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
12234
12264
  if (n !== null) return n;
12235
12265
  let r = K_({
12236
12266
  bindRef: c,
@@ -12239,13 +12269,13 @@ function rv(e, n = {}) {
12239
12269
  allowKeys: d,
12240
12270
  snapshots: g,
12241
12271
  maxSnapshots: _,
12242
- markDataDirty: I,
12272
+ markDataDirty: F,
12243
12273
  schemaErrorMode: "schema_invalid",
12244
12274
  snapshotLabel: "eval_transform",
12245
12275
  internalAfterWrite: a,
12246
12276
  protectedCtx: h
12247
12277
  });
12248
- return r.ok ? (re({
12278
+ return r.ok ? (ie({
12249
12279
  op: "edit",
12250
12280
  detail: `eval_transform(${r.applied.length} patches)`,
12251
12281
  timestamp: Date.now()
@@ -12271,7 +12301,7 @@ function rv(e, n = {}) {
12271
12301
  });
12272
12302
  let i = await ee();
12273
12303
  try {
12274
- let e = await ae("set", O ? w(s) : void 0, n, i, s);
12304
+ let e = await oe("set", O ? w(s) : void 0, n, i, s);
12275
12305
  if (e !== null) return e;
12276
12306
  let t = a ? gm(l()) : null, r = U_({
12277
12307
  schema: o,
@@ -12279,7 +12309,7 @@ function rv(e, n = {}) {
12279
12309
  value: n,
12280
12310
  bindRef: c
12281
12311
  });
12282
- return r.ok ? (ie("edit", "eval_transform"), r.wholeParsed ? Am(c, r.assembly) : r.assembly !== null && typeof r.assembly == "object" && fm(c, r.assembly), I(), a && (a(c, t), I()), re({
12312
+ return r.ok ? (ae("edit", "eval_transform"), r.wholeParsed ? Am(c, r.assembly) : r.assembly !== null && typeof r.assembly == "object" && fm(c, r.assembly), F(), a && (a(c, t), F()), ie({
12283
12313
  op: "edit",
12284
12314
  detail: "eval_transform",
12285
12315
  timestamp: Date.now()
@@ -12307,8 +12337,8 @@ function rv(e, n = {}) {
12307
12337
  jsonPath: t.string().optional().describe("子树模式:仅对该子树执行;transform 返回值作为子树新值")
12308
12338
  })
12309
12339
  });
12310
- oe(le, (e) => e?.mode === "transform");
12311
- let ue = s(async ({ jsonPath: e, jsonPaths: t, fields: n, depth: r, offset: i, limit: a }, s) => {
12340
+ se(ue, (e) => e?.mode === "transform");
12341
+ let de = s(async ({ jsonPath: e, jsonPaths: t, fields: n, depth: r, offset: i, limit: a }, s) => {
12312
12342
  let c = b(s), f = x(s), p = l(), m, g = () => m ??= k();
12313
12343
  if (t && t.length) {
12314
12344
  let e = !1, i = t.map((t) => {
@@ -12327,7 +12357,7 @@ function rv(e, n = {}) {
12327
12357
  resolved: s,
12328
12358
  resourcesByPath: h.resourcesByPath,
12329
12359
  resourceStore: h.resourceStore
12330
- })), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "", P, te, {
12360
+ })), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "", ne, te, {
12331
12361
  rootExempt: !0,
12332
12362
  rootPath: i,
12333
12363
  fullTextPrefixes: f,
@@ -12375,7 +12405,7 @@ function rv(e, n = {}) {
12375
12405
  resolved: S,
12376
12406
  resourcesByPath: h.resourcesByPath,
12377
12407
  resourceStore: h.resourceStore
12378
- })), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "", P, te, {
12408
+ })), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "", ne, te, {
12379
12409
  rootExempt: !0,
12380
12410
  rootPath: _,
12381
12411
  fullTextPrefixes: f,
@@ -12398,7 +12428,7 @@ function rv(e, n = {}) {
12398
12428
  offset: t.number().int().min(0).optional().describe("数组分页起始偏移(仅数组目标,默认 0)"),
12399
12429
  limit: t.number().int().min(1).max(200).optional().describe("数组分页每页条数(默认 50,上限 200),返回切片+total/hasMore")
12400
12430
  })
12401
- }), de = s(async ({ value: e, patch: t, patches: n, del: i, dryRun: s }, u) => {
12431
+ }), fe = s(async ({ value: e, patch: t, patches: n, del: i, dryRun: s }, u) => {
12402
12432
  let f = b(u), p = "set";
12403
12433
  i ? p = "delete" : (n && n.length || t) && (p = "edit");
12404
12434
  let m = t?.value === void 0 ? e : t.value, v = await ee();
@@ -12436,19 +12466,19 @@ function rv(e, n = {}) {
12436
12466
  hint: e.spec.mode === "freeze" ? "冻结字段不可删" : "verbatim 字段不可直接删;先 resource_delete 释放"
12437
12467
  });
12438
12468
  }
12439
- let n = await ae("delete", e, void 0, v, f);
12469
+ let n = await oe("delete", e, void 0, v, f);
12440
12470
  if (n !== null) return n;
12441
12471
  if (s) {
12442
12472
  let e = gm(l());
12443
12473
  return hm(e, t.jsonPath) ? `dryRun(delete): 将删除 @ ${t.jsonPath}。预览剩余:${xm(e, 600)}。未实际写入、未入快照。` : `dryRun(delete): @ ${t.jsonPath} 不存在(无需删除)。未实际写入。`;
12444
12474
  }
12445
- ie("delete");
12475
+ ae("delete");
12446
12476
  let r = hm(c, t.jsonPath);
12447
- return I(), re({
12477
+ return F(), ie({
12448
12478
  op: "delete",
12449
12479
  detail: t.jsonPath,
12450
12480
  timestamp: Date.now()
12451
- }), a && (a(c, null), I()), T(k(), f), r ? `已删除主数据 @ ${t.jsonPath}` : `主数据 @ ${t.jsonPath} 不存在(无需删除)`;
12481
+ }), a && (a(c, null), F()), T(k(), f), r ? `已删除主数据 @ ${t.jsonPath}` : `主数据 @ ${t.jsonPath} 不存在(无需删除)`;
12452
12482
  }
12453
12483
  if (p === "edit") {
12454
12484
  if (typeof c != "object" || !c) return $({
@@ -12456,7 +12486,7 @@ function rv(e, n = {}) {
12456
12486
  message: `edit 仅适用于对象/数组主数据,当前是 ${c === void 0 ? "undefined" : typeof c}`,
12457
12487
  hint: "叶子用 write(value) 整体设置"
12458
12488
  });
12459
- let r = await ae("edit", e, void 0, v, f);
12489
+ let r = await oe("edit", e, void 0, v, f);
12460
12490
  if (r !== null) return r;
12461
12491
  let i = n && n.length ? n : [{
12462
12492
  op: t.op ?? "set",
@@ -12469,7 +12499,7 @@ function rv(e, n = {}) {
12469
12499
  allowKeys: d,
12470
12500
  snapshots: g,
12471
12501
  maxSnapshots: _,
12472
- markDataDirty: I,
12502
+ markDataDirty: F,
12473
12503
  schemaErrorMode: "zod",
12474
12504
  dryRun: s,
12475
12505
  internalAfterWrite: a,
@@ -12477,7 +12507,7 @@ function rv(e, n = {}) {
12477
12507
  });
12478
12508
  if (!l.ok) return l.error;
12479
12509
  if (s) return `dryRun(edit): ${l.applied.length} 个 patch 预检通过(schema 校验 OK)。预览结果:${xm(l.clone, 600)}。未实际写入、未入快照。`;
12480
- re({
12510
+ ie({
12481
12511
  op: "edit",
12482
12512
  detail: `${l.applied.length} 个 patch${l.applied.length > 1 ? "(批量)" : ""}`,
12483
12513
  value: l.applied.map((e) => `${e.op}@${e.jp}`),
@@ -12488,7 +12518,7 @@ function rv(e, n = {}) {
12488
12518
  }
12489
12519
  let i = vm(m);
12490
12520
  if (i.parseError) return Jl("", m, i.parseError);
12491
- let u = await ae("set", e, m, v, f);
12521
+ let u = await oe("set", e, m, v, f);
12492
12522
  if (u !== null) return u;
12493
12523
  let y = G_({
12494
12524
  bindRef: c,
@@ -12497,9 +12527,9 @@ function rv(e, n = {}) {
12497
12527
  allowKeys: d,
12498
12528
  snapshots: g,
12499
12529
  maxSnapshots: _,
12500
- audit: re,
12530
+ audit: ie,
12501
12531
  dryRun: s,
12502
- onWrite: I,
12532
+ onWrite: F,
12503
12533
  internalAfterWrite: a,
12504
12534
  protectedCtx: h,
12505
12535
  hashFn: k
@@ -12544,8 +12574,8 @@ function rv(e, n = {}) {
12544
12574
  dryRun: t.boolean().optional().describe("预检:走完整校验链但不落盘不入快照;冲突返回 VERSION_CONFLICT 不挂起")
12545
12575
  })
12546
12576
  });
12547
- oe(de);
12548
- let fe = s(async ({ jsonPath: e }) => {
12577
+ se(fe);
12578
+ let R = s(async ({ jsonPath: e }) => {
12549
12579
  let t = e || "", n = t ? Cp(o, t) : o;
12550
12580
  return n ? `schema${t ? ` @ ${t}` : ""} = ${xm(Up(n))}` : $({
12551
12581
  code: "PATH_DENIED",
@@ -12631,7 +12661,7 @@ function rv(e, n = {}) {
12631
12661
  }
12632
12662
  let f = await ee();
12633
12663
  try {
12634
- let n = await ae("set", O ? w(i) : void 0, u, f, i);
12664
+ let n = await oe("set", O ? w(i) : void 0, u, f, i);
12635
12665
  if (n !== null) return n;
12636
12666
  let r = G_({
12637
12667
  bindRef: c,
@@ -12640,9 +12670,9 @@ function rv(e, n = {}) {
12640
12670
  allowKeys: d,
12641
12671
  snapshots: g,
12642
12672
  maxSnapshots: _,
12643
- audit: re,
12673
+ audit: ie,
12644
12674
  op: "draft_commit",
12645
- onWrite: I,
12675
+ onWrite: F,
12646
12676
  internalAfterWrite: a,
12647
12677
  protectedCtx: h,
12648
12678
  hashFn: k
@@ -12656,7 +12686,7 @@ function rv(e, n = {}) {
12656
12686
  description: "把 draft_write 累积的草稿合并 + JSON.parse + 乐观锁 + schema 校验,原子提交主数据(任一步失败不写,草稿保留可修后重试;成功清草稿 + 自动快照可回退)。仅大 JSON 从零生成用;小改用 write。",
12657
12687
  schema: t.object({ draftId: t.string().describe("要提交的草稿标识(对应 draft_write 的 draftId)") })
12658
12688
  });
12659
- oe(l), me.push(i, l);
12689
+ se(l), me.push(i, l);
12660
12690
  }
12661
12691
  let z = [];
12662
12692
  if (e.resources?.length && p) {
@@ -12730,7 +12760,7 @@ function rv(e, n = {}) {
12730
12760
  }
12731
12761
  let l = await ee();
12732
12762
  try {
12733
- p.update(i, t), mm(c, i, t), T(k(), r), I();
12763
+ p.update(i, t), mm(c, i, t), T(k(), r), F();
12734
12764
  } finally {
12735
12765
  l.release();
12736
12766
  }
@@ -12744,7 +12774,7 @@ function rv(e, n = {}) {
12744
12774
  value: t.unknown().describe("新值(需符合字段 schema 类型)")
12745
12775
  })
12746
12776
  });
12747
- oe(n);
12777
+ se(n);
12748
12778
  let r = s(async () => {
12749
12779
  let e = p.list();
12750
12780
  if (!e.length) {
@@ -12775,17 +12805,17 @@ function rv(e, n = {}) {
12775
12805
  handle: t.string().optional().describe("占位符句柄(与 path 二选一)")
12776
12806
  })
12777
12807
  });
12778
- oe(i), z.push(e, n, r, i);
12808
+ se(i), z.push(e, n, r, i);
12779
12809
  }
12780
12810
  let B = [
12781
- se,
12782
12811
  ce,
12783
- L,
12784
- R,
12785
12812
  le,
12813
+ I,
12814
+ L,
12786
12815
  ue,
12787
12816
  de,
12788
12817
  fe,
12818
+ R,
12789
12819
  pe,
12790
12820
  ...me,
12791
12821
  ...z
@@ -12885,7 +12915,7 @@ function rv(e, n = {}) {
12885
12915
  };
12886
12916
  }
12887
12917
  Object.defineProperty(B, "controller", {
12888
- value: ne,
12918
+ value: re,
12889
12919
  enumerable: !1,
12890
12920
  configurable: !1,
12891
12921
  writable: !1
@@ -14337,7 +14367,7 @@ function gy(e) {
14337
14367
  function _y(e) {
14338
14368
  if (!e) return e;
14339
14369
  let t = e;
14340
- return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0, F(e));
14370
+ return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0, P(e));
14341
14371
  }
14342
14372
  function vy(e) {
14343
14373
  return !!e && typeof e == "object" && typeof e.invoke == "function" && typeof e.stream == "function";
@@ -14375,7 +14405,7 @@ function Sy(e) {
14375
14405
  return async (e) => {
14376
14406
  let t = new AbortController(), s = setTimeout(() => t.abort(), o);
14377
14407
  try {
14378
- return !l && c && (l = await I(c, {
14408
+ return !l && c && (l = await F(c, {
14379
14409
  temperature: n,
14380
14410
  maxTokens: r,
14381
14411
  thinkingFallback: "simple"
@@ -14394,7 +14424,7 @@ function Cy(e) {
14394
14424
  return async (t) => {
14395
14425
  let n = t.filter((e) => e.role === "user" || e.role === "assistant").map((e) => `${e.role === "user" ? "用户" : "助手"}: ${e.content}`).join("\n").slice(0, 800), s = new AbortController(), c = setTimeout(() => s.abort(), 1e4);
14396
14426
  try {
14397
- !o && r && (o = await I(r, {
14427
+ !o && r && (o = await F(r, {
14398
14428
  temperature: 0,
14399
14429
  maxTokens: 30,
14400
14430
  thinkingFallback: "simple"
@@ -14460,7 +14490,7 @@ function Oy(e) {
14460
14490
  return async (e) => {
14461
14491
  let t = new AbortController(), n = setTimeout(() => t.abort(), o);
14462
14492
  try {
14463
- !c && r && (c = await I(r, {
14493
+ !c && r && (c = await F(r, {
14464
14494
  temperature: 0,
14465
14495
  maxTokens: s,
14466
14496
  thinkingFallback: "simple"
@@ -17510,7 +17540,7 @@ function RC(e, t, n, r) {
17510
17540
  }), i;
17511
17541
  },
17512
17542
  afterModel: (t) => {
17513
- let n = oe(t.message);
17543
+ let n = se(t.message);
17514
17544
  n && (r.prompt_tokens = (r.prompt_tokens ?? 0) + (n.prompt_tokens ?? 0), r.completion_tokens = (r.completion_tokens ?? 0) + (n.completion_tokens ?? 0), r.total_tokens = (r.total_tokens ?? 0) + (n.total_tokens ?? 0), n.reasoning_tokens && (r.reasoning_tokens = (r.reasoning_tokens ?? 0) + n.reasoning_tokens), i++, e({
17515
17545
  type: "usage",
17516
17546
  round: i,
@@ -17554,7 +17584,7 @@ function BC(e, n, r) {
17554
17584
  prompt_tokens: 0,
17555
17585
  completion_tokens: 0,
17556
17586
  total_tokens: 0
17557
- }, o = Ay(() => Kt, () => e.conflictPolicy ?? "ask", () => G.agent?.debugLogs?.value), c = /* @__PURE__ */ Rn(0), l = ab(e.storage);
17587
+ }, o = Ay(() => Jt, () => e.conflictPolicy ?? "ask", () => G.agent?.debugLogs?.value), c = /* @__PURE__ */ Rn(0), l = ab(e.storage);
17558
17588
  l && (e.debug && l.onEvent((e) => console.log("[page-agent-sdk][storage]", e)), l.onEvent((e) => {
17559
17589
  e.type === "quota" && G.agent?.debugLogs?.value?.push({
17560
17590
  timestamp: Date.now(),
@@ -17576,7 +17606,7 @@ function BC(e, n, r) {
17576
17606
  e.debug && !d && console.warn("[page-agent-sdk][summarization] 未构造 llmInvoke(apiKey 缺失?),摘要回退零成本索引摘要");
17577
17607
  let b = /* @__PURE__ */ wn([]), x = u_(e.vfs?.initialFiles, {
17578
17608
  persist: l ? { save: (e) => {
17579
- vn.persistSave({ vfs: e });
17609
+ bn.persistSave({ vfs: e });
17580
17610
  } } : void 0,
17581
17611
  maxBytes: e.vfs?.maxBytes,
17582
17612
  poolBytes: e.vfs?.poolBytes
@@ -17596,7 +17626,7 @@ function BC(e, n, r) {
17596
17626
  data: { stage: "resume_notice" }
17597
17627
  });
17598
17628
  }), A = _b(), j = e.approval?.timeoutMs, M = j !== void 0 && Number.isFinite(j) && j > 0 ? j : j !== void 0 && (!Number.isFinite(j) || j < 0) ? 0 : 3e4, ee = (e) => {
17599
- Kt({
17629
+ Jt({
17600
17630
  type: "error",
17601
17631
  message: `确认请求(${e.toolName})${Math.round(e.waitedMs / 1e3)}s 无响应已自动拒绝 —— 当前路径无 UI 响应方;可传 approval.timeoutMs 调整(Infinity = 无限等)`,
17602
17632
  severity: "observable",
@@ -17604,7 +17634,7 @@ function BC(e, n, r) {
17604
17634
  context: e
17605
17635
  });
17606
17636
  }, N = pg((e) => {
17607
- A.lastPlanConfirmation = e, vn.persistSave({ planConfirmation: e }), G.agent?.debugLogs?.value?.push({
17637
+ A.lastPlanConfirmation = e, bn.persistSave({ planConfirmation: e }), G.agent?.debugLogs?.value?.push({
17608
17638
  timestamp: Date.now(),
17609
17639
  type: "middleware",
17610
17640
  data: {
@@ -17616,62 +17646,62 @@ function BC(e, n, r) {
17616
17646
  }, {
17617
17647
  timeoutMs: M,
17618
17648
  onAutoReject: ee
17619
- }), P = Bm({
17649
+ }), ne = Bm({
17620
17650
  getSchema: () => Ce()?.schema,
17621
17651
  getBind: () => Ce()?.bind,
17622
- onChange: (e) => Kt({
17652
+ onChange: (e) => Jt({
17623
17653
  type: "focus_change",
17624
17654
  focuses: e
17625
17655
  })
17626
- }), F = (e) => {
17656
+ }), P = (e) => {
17627
17657
  let t = Rm(Ce()?.bind, e.path);
17628
17658
  return t ? {
17629
17659
  ...e,
17630
17660
  pgId: t
17631
17661
  } : e;
17632
- }, ne = tg(), re = ng(e.memory || "");
17633
- typeof e.memory == "function" && re.refresh();
17634
- let ie = { current: null }, ae = e.data ? {
17662
+ }, re = tg(), ie = ng(e.memory || "");
17663
+ typeof e.memory == "function" && ie.refresh();
17664
+ let ae = { current: null }, oe = e.data ? {
17635
17665
  ...e.data,
17636
17666
  description: e.data.description ?? "主数据对象"
17637
- } : void 0, oe = !(e.subagents ?? []).some((e) => e._codeAsset) && ub(e.capabilities).subagent, se = e.subagents;
17638
- oe && ae?.schema && Fp(ae.schema).length && (se = [...e.subagents ?? [], dy()], console.info("[page-agent-sdk] 检测到 schema 含代码组件数组(如 components[].code),已自动装配 HTML 代码子 agent(委派编排 + vfs 工作副本 + 格式校验 + 增量 commit)。需定制(codeField/formatCheck/craftNotes 等)请显式传 createHtmlSubagent(...)"));
17639
- let ce = (se ?? []).filter((e) => !!e._codeAsset), L = /* @__PURE__ */ new Set();
17640
- for (let e of ce) {
17667
+ } : void 0, se = !(e.subagents ?? []).some((e) => e._codeAsset) && ub(e.capabilities).subagent, ce = e.subagents;
17668
+ se && oe?.schema && Fp(oe.schema).length && (ce = [...e.subagents ?? [], dy()], console.info("[page-agent-sdk] 检测到 schema 含代码组件数组(如 components[].code),已自动装配 HTML 代码子 agent(委派编排 + vfs 工作副本 + 格式校验 + 增量 commit)。需定制(codeField/formatCheck/craftNotes 等)请显式传 createHtmlSubagent(...)"));
17669
+ let le = (ce ?? []).filter((e) => !!e._codeAsset), I = /* @__PURE__ */ new Set();
17670
+ for (let e of le) {
17641
17671
  if (e._codeAsset.writablePaths.length) continue;
17642
- let t = Fp(ae?.schema, e._codeAsset.codeField);
17643
- t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"), L.add(e));
17672
+ let t = Fp(oe?.schema, e._codeAsset.codeField);
17673
+ t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"), I.add(e));
17644
17674
  }
17645
- let R = L.size ? ce.filter((e) => !L.has(e)) : ce, le = L.size ? (se ?? []).filter((e) => !L.has(e)) : se, ue = R.length > 0, de = R.flatMap((e) => e._codeAsset.writablePaths), fe = R.flatMap((e) => e._codeAsset.writablePaths.map((t) => `${t}.${e._codeAsset.codeField}`)), pe = e.checkpoint, me = pe !== void 0 && pe !== !1, z = me ? xg({
17675
+ let L = I.size ? le.filter((e) => !I.has(e)) : le, ue = I.size ? (ce ?? []).filter((e) => !I.has(e)) : ce, de = L.length > 0, fe = L.flatMap((e) => e._codeAsset.writablePaths), R = L.flatMap((e) => e._codeAsset.writablePaths.map((t) => `${t}.${e._codeAsset.codeField}`)), pe = e.checkpoint, me = pe !== void 0 && pe !== !1, z = me ? xg({
17646
17676
  getData: () => Ce()?.bind,
17647
17677
  consumeDataDirty: () => be?.consumeDataDirty?.() ?? !0,
17648
- slotPaths: ae ? [""] : [],
17678
+ slotPaths: oe ? [""] : [],
17649
17679
  vfsStore: x,
17650
17680
  todosMw: C,
17651
- getTodos: () => ie.current?.getState?.()?.todos ?? [],
17681
+ getTodos: () => ae.current?.getState?.()?.todos ?? [],
17652
17682
  messages: b,
17653
17683
  maxCheckpoints: pe && typeof pe == "object" ? pe.maxCheckpoints : void 0
17654
17684
  }) : null, B = !pe || typeof pe != "object" || pe.auto !== !1, V = ub(e.capabilities), he = V.dataOps, ge = V.draftWrite, H = V.automation, _e = V.domInspect && (m.vision === !0 || typeof e.images?.describe == "function"), ve = o_({
17655
17685
  ...e,
17656
17686
  locale: e.i18n?.locale,
17657
- dataOps: he && !!ae,
17687
+ dataOps: he && !!oe,
17658
17688
  domInspect: V.domInspect === !0,
17659
17689
  screenshot: _e
17660
17690
  });
17661
- if (ue) {
17662
- let e = R.map((e) => e._codeAsset.orchestratorPrompt).filter(Boolean).join("\n\n");
17691
+ if (de) {
17692
+ let e = L.map((e) => e._codeAsset.orchestratorPrompt).filter(Boolean).join("\n\n");
17663
17693
  e && (ve += "\n\n" + e);
17664
- } else ae?.schema && Pp(ae.schema) && (ve += "\n\n" + Qp.htmlDirectWriteFallback, console.warn("[page-agent-sdk] 检测到 schema 含 code 字段但未注册 html 子 agent:已自动注入「主 agent 自己写 HTML」编排(code 作普通字段直接 write,无 vfs 工作副本 / 无格式校验门禁)。如需代码资产机制(vfs + 格式校验 + 增量 commit + 主上下文 code 摘要),注册 createHtmlSubagent;若确为降级意图可忽略。"));
17665
- let U = he && ae ? rv(ae, {
17694
+ } else oe?.schema && Pp(oe.schema) && (ve += "\n\n" + Qp.htmlDirectWriteFallback, console.warn("[page-agent-sdk] 检测到 schema 含 code 字段但未注册 html 子 agent:已自动注入「主 agent 自己写 HTML」编排(code 作普通字段直接 write,无 vfs 工作副本 / 无格式校验门禁)。如需代码资产机制(vfs + 格式校验 + 增量 commit + 主上下文 code 摘要),注册 createHtmlSubagent;若确为降级意图可忽略。"));
17695
+ let U = he && oe ? rv(oe, {
17666
17696
  onAudit: e.onAudit ?? (e.debug ? (e) => console.log("[page-agent-sdk][data audit]", e) : void 0),
17667
17697
  maxSnapshots: e.maxSnapshots,
17668
17698
  onConflict: o.set,
17669
17699
  conflictWatchFields: e.conflictWatchFields,
17670
17700
  maxParallelTools: e.maxParallelTools,
17671
- vfsStore: ge || ae?.resources?.length ? x : void 0,
17672
- ...de.length ? { pgIdPaths: de } : {},
17673
- ...fe.length ? { largeTextPaths: fe } : {}
17674
- }) : [], ye = he ? U : [], be = he && ae ? U.controller ?? null : null, xe = he && ae ? U.previewWrite : void 0, Se = he && ae?.resources?.length && be?.getResourcesSnapshot ? wC({ getResourcesSnapshot: () => be?.getResourcesSnapshot?.() ?? [] }) : void 0, Ce = () => be?.get() ?? ae, we = new Set(U.map((e) => e.name)), Te = e.conflictWatchFields ?? [], Ee = !Te.includes("*") && Te.length ? new Set(Te) : void 0, De = be ? Iv({
17701
+ vfsStore: ge || oe?.resources?.length ? x : void 0,
17702
+ ...fe.length ? { pgIdPaths: fe } : {},
17703
+ ...R.length ? { largeTextPaths: R } : {}
17704
+ }) : [], ye = he ? U : [], be = he && oe ? U.controller ?? null : null, xe = he && oe ? U.previewWrite : void 0, Se = he && oe?.resources?.length && be?.getResourcesSnapshot ? wC({ getResourcesSnapshot: () => be?.getResourcesSnapshot?.() ?? [] }) : void 0, Ce = () => be?.get() ?? oe, we = new Set(U.map((e) => e.name)), Te = e.conflictWatchFields ?? [], Ee = !Te.includes("*") && Te.length ? new Set(Te) : void 0, De = be ? Iv({
17675
17705
  getBind: () => Ce()?.bind,
17676
17706
  recomputeAll: () => be.recomputeAllBaselines?.(),
17677
17707
  hasBaselines: () => be.hasBaselines?.() ?? !1,
@@ -17769,7 +17799,7 @@ function BC(e, n, r) {
17769
17799
  let Re = e.proposals ? TS(e.proposals, {
17770
17800
  emit: (e) => {
17771
17801
  try {
17772
- Kt(e);
17802
+ Jt(e);
17773
17803
  } catch {}
17774
17804
  },
17775
17805
  log: (e, t) => {
@@ -17807,7 +17837,7 @@ function BC(e, n, r) {
17807
17837
  Ye.forEach((e) => Oe.set(e.name, "builtin"));
17808
17838
  let Xe = V.focus, Ze = s(async ({ path: e, label: t }) => {
17809
17839
  let n = Ce()?.schema;
17810
- return n ? Cp(n, e) ? (P.setFocus(F({
17840
+ return n ? Cp(n, e) ? (ne.setFocus(P({
17811
17841
  path: e,
17812
17842
  ...t ? { label: t } : {}
17813
17843
  }), "agent"), `已聚焦到 ${e}${t ? `(${t})` : ""}。后续仅可写该子树(越界被拒),每轮只看到该组件结构。完成精修后调 clear_focus 退出。`) : `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。` : "聚焦失败:当前无主数据 schema,无法聚焦。";
@@ -17818,7 +17848,7 @@ function BC(e, n, r) {
17818
17848
  path: t.string().describe("要聚焦的组件 jsonPath,如 components.3"),
17819
17849
  label: t.string().optional().describe("人类可读标签,如「导航栏」")
17820
17850
  })
17821
- }), Qe = s(async () => (P.clearFocus("agent"), "已清除聚焦,恢复全量可操作范围(可读写所有组件)。"), {
17851
+ }), Qe = s(async () => (ne.clearFocus("agent"), "已清除聚焦,恢复全量可操作范围(可读写所有组件)。"), {
17822
17852
  name: "clear_focus",
17823
17853
  description: "清除当前聚焦,退出精修模式,恢复对全部组件的读写权限。",
17824
17854
  schema: t.object({}).optional()
@@ -17826,11 +17856,11 @@ function BC(e, n, r) {
17826
17856
  let n = Ce()?.schema;
17827
17857
  if (!n) return "聚焦失败:当前无主数据 schema,无法聚焦。";
17828
17858
  if (!Cp(n, e)) return `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。`;
17829
- P.addFocus(F({
17859
+ ne.addFocus(P({
17830
17860
  path: e,
17831
17861
  ...t ? { label: t } : {}
17832
17862
  }), "agent");
17833
- let r = P.getFocuses();
17863
+ let r = ne.getFocuses();
17834
17864
  return `已聚焦 ${e}${t ? `(${t})` : ""}(当前共 ${r.length} 个焦点:${r.map((e) => e.path).join(", ")})。后续仅可写这些子树之一(越界被拒)。`;
17835
17865
  }, {
17836
17866
  name: "add_focus",
@@ -17840,9 +17870,9 @@ function BC(e, n, r) {
17840
17870
  label: t.string().optional().describe("人类可读标签")
17841
17871
  })
17842
17872
  }), et = s(async ({ path: e }) => {
17843
- let t = P.getFocuses().length;
17844
- P.removeFocus(e, "agent");
17845
- let n = P.getFocuses();
17873
+ let t = ne.getFocuses().length;
17874
+ ne.removeFocus(e, "agent");
17875
+ let n = ne.getFocuses();
17846
17876
  return n.length === t ? `path "${e}" 不在当前焦点列表中(当前:${n.map((e) => e.path).join(", ") || "无"})。` : n.length ? `已移除焦点 ${e}(剩余 ${n.length} 个:${n.map((e) => e.path).join(", ")})。` : `已移除焦点 ${e},聚焦已清空,恢复全量操作范围。`;
17847
17877
  }, {
17848
17878
  name: "remove_focus",
@@ -17864,23 +17894,23 @@ function BC(e, n, r) {
17864
17894
  focusTools: () => tt,
17865
17895
  mcpTools: () => Ge,
17866
17896
  loadedSkillTools: () => nt
17867
- }), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs || ue;
17897
+ }), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs || de;
17868
17898
  if (lt) for (let e of g_) Oe.set(e, "builtin");
17869
17899
  if (at) for (let e of C.tools ?? []) Oe.set(e.name, "builtin");
17870
17900
  let ut = V.summarization, dt = V.agentCompression && !!p;
17871
17901
  e.debug && V.agentCompression && !p && console.warn("[page-agent-sdk][agentCompression] agentCompression 开启但 summaryLlm 不可用(或缺 apiKey / 模型不支持工具),压缩决策不启用,回退静态压缩");
17872
17902
  let ft = V.memory, pt = V.subagent, mt = pt ? Dh() : void 0, ht = e.verify?.maxAttempts ?? 2, gt = !!(e.verify?.check || e.verify?.maxAttempts || e.verify?.adversarial), _t = e.capabilities?.verify === !1, vt = (V.verify || gt && !_t) && e.verify?.enabled !== !1 && ht > 0, yt = V.contextInspector;
17873
17903
  gt && !vt && e.verify?.enabled !== !1 && console.warn("[page-agent-sdk][verify] 检测到 verify 配置(check/maxAttempts/adversarial)但未装载(capabilities.verify:false 显式关闭 或 maxAttempts≤0)");
17874
- let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
17904
+ let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval?.preview === !0 && xe ? (e, t) => e === "write" ? xe(t) : null : void 0, wt = e.approval?.previewWrite || Ct ? (t, n) => e.approval?.previewWrite?.(t, n) ?? Ct?.(t, n) ?? null : void 0, Tt = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
17875
17905
  ...e.approval,
17876
17906
  timeoutMs: e.approval.timeoutMs ?? M,
17877
17907
  onAutoReject: ee,
17878
- previewWrite: e.approval.preview === !0 && xe ? (e, t) => e === "write" ? xe(t) : null : void 0
17879
- }) : void 0, wt = [
17908
+ previewWrite: wt
17909
+ }) : void 0, Et = [
17880
17910
  ...St ? [St] : [],
17881
- ...Ct ? [Ct] : [],
17911
+ ...Tt ? [Tt] : [],
17882
17912
  ...De ? [De] : []
17883
- ], Tt = !pt || bt?.enabled === !1 ? void 0 : qh({
17913
+ ], Dt = !pt || bt?.enabled === !1 ? void 0 : qh({
17884
17914
  llm: bt?.llm ?? e.llm,
17885
17915
  allTools: () => G.agent?.allTools ?? W,
17886
17916
  allowedTools: xt.length ? xt : void 0,
@@ -17893,10 +17923,10 @@ function BC(e, n, r) {
17893
17923
  maxParallel: bt?.maxParallel,
17894
17924
  thinkingMode: bt?.thinkingMode,
17895
17925
  debug: e.debug,
17896
- getFocuses: () => P.getActiveFocuses(),
17926
+ getFocuses: () => ne.getActiveFocuses(),
17897
17927
  getSchema: () => Ce()?.schema ?? null,
17898
17928
  tracker: mt,
17899
- guardMiddleware: wt.length ? wt : void 0,
17929
+ guardMiddleware: Et.length ? Et : void 0,
17900
17930
  getVfsFiles: lt ? () => x.files : void 0,
17901
17931
  enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
17902
17932
  exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
@@ -17904,7 +17934,7 @@ function BC(e, n, r) {
17904
17934
  a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
17905
17935
  },
17906
17936
  timeoutMs: bt?.timeoutMs
17907
- }), Et = le?.map((e) => {
17937
+ }), Ot = ue?.map((e) => {
17908
17938
  if (!e._codeAsset) return e;
17909
17939
  let t = e._codeAsset, n = xv({
17910
17940
  writablePaths: t.writablePaths,
@@ -17921,29 +17951,29 @@ function BC(e, n, r) {
17921
17951
  ...e,
17922
17952
  middleware: r
17923
17953
  };
17924
- }), Dt = ue && pt ? Sv() : void 0, Ot = Dt ? kv({
17954
+ }), kt = de && pt ? Sv() : void 0, At = kt ? kv({
17925
17955
  getBind: () => Ce()?.bind,
17926
- writablePaths: de,
17927
- getLocked: () => Dt.locked(),
17956
+ writablePaths: fe,
17957
+ getLocked: () => kt.locked(),
17928
17958
  tools: W,
17929
- getCodeFieldPaths: () => Dv(Ce()?.bind, R.map((e) => ({
17959
+ getCodeFieldPaths: () => Dv(Ce()?.bind, L.map((e) => ({
17930
17960
  writablePaths: e._codeAsset.writablePaths,
17931
17961
  codeField: e._codeAsset.codeField
17932
17962
  })))
17933
- }) : void 0, kt = be?.getSummarizedPaths && be.clearSummarizedPaths ? Mv({
17963
+ }) : void 0, jt = be?.getSummarizedPaths && be.clearSummarizedPaths ? Mv({
17934
17964
  getSummarizedPaths: () => be.getSummarizedPaths(),
17935
17965
  clearSummarizedPaths: () => be.clearSummarizedPaths()
17936
- }) : void 0, At = pt && Et !== void 0 ? Xh(Et, {
17966
+ }) : void 0, Mt = pt && Ot !== void 0 ? Xh(Ot, {
17937
17967
  llm: e.llm,
17938
17968
  thinkingModeDefault: e.subagent?.thinkingMode,
17939
17969
  staleReadInvalidation: e.staleReadInvalidation,
17940
17970
  allTools: () => G.agent?.allTools ?? W,
17941
17971
  debug: e.debug,
17942
- getFocuses: () => P.getActiveFocuses(),
17972
+ getFocuses: () => ne.getActiveFocuses(),
17943
17973
  getSchema: () => Ce()?.schema ?? null,
17944
17974
  getBind: () => Ce()?.bind,
17945
17975
  tracker: mt,
17946
- guardMiddleware: wt.length ? wt : void 0,
17976
+ guardMiddleware: Et.length ? Et : void 0,
17947
17977
  getVfsFiles: lt ? () => x.files : void 0,
17948
17978
  enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
17949
17979
  exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
@@ -17951,30 +17981,30 @@ function BC(e, n, r) {
17951
17981
  a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
17952
17982
  },
17953
17983
  timeoutMs: e.subagent?.timeoutMs,
17954
- ...Dt ? {
17955
- componentLock: Dt,
17956
- resolveComponents: (e) => Cv(e, _v(Ce()?.bind, de))
17984
+ ...kt ? {
17985
+ componentLock: kt,
17986
+ resolveComponents: (e) => Cv(e, _v(Ce()?.bind, fe))
17957
17987
  } : {}
17958
- }) : void 0, jt = At ? At.controller : null, Mt = (t) => {
17988
+ }) : void 0, Nt = Mt ? Mt.controller : null, Pt = (t) => {
17959
17989
  let n = t.thinkingMode ?? e.subagent?.thinkingMode, r = n ? vy(t.llm ?? e.llm) ? "instance-noop" : "applied" : "inherited";
17960
17990
  return {
17961
17991
  ...t,
17962
17992
  ...n ? { thinkingMode: n } : {},
17963
17993
  thinkingApplied: r
17964
17994
  };
17965
- }, Nt = ["read", "fetch_document"], Pt = W.filter((e) => Nt.includes(e.name)), Ft = vt ? wg({
17995
+ }, Ft = ["read", "fetch_document"], It = W.filter((e) => Ft.includes(e.name)), Lt = vt ? wg({
17966
17996
  check: e.verify.check ?? Ag({
17967
17997
  schemas: () => Ce() ? { "": Ce().schema } : {},
17968
17998
  root: () => Ce()?.bind
17969
17999
  }),
17970
18000
  adversarial: e.verify?.adversarial ? {
17971
18001
  llm: e.llm,
17972
- tools: Pt
18002
+ tools: It
17973
18003
  } : void 0
17974
- }) : void 0, It = yt ? Wg({
18004
+ }) : void 0, Rt = yt ? Wg({
17975
18005
  contextWindow: m.contextWindow,
17976
18006
  thresholdRatio: mb(e, m.contextWindow).summaryThresholdRatio
17977
- }) : void 0, Lt = xC({
18007
+ }) : void 0, zt = xC({
17978
18008
  ...V,
17979
18009
  humanConfirm: qe,
17980
18010
  screenshot: !!Me,
@@ -17982,21 +18012,21 @@ function BC(e, n, r) {
17982
18012
  hasActions: !!e.actions && Object.keys(e.actions).length > 0,
17983
18013
  hasProposals: !!e.proposals,
17984
18014
  viewImage: !!je,
17985
- subagents: le?.map(Mt)
17986
- }, he && !!ae, { promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens) }), Rt = V.pageContext ? CC({
18015
+ subagents: ue?.map(Pt)
18016
+ }, he && !!oe, { promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens) }), Bt = V.pageContext ? CC({
17987
18017
  getPageInfo: () => typeof document < "u" && typeof location < "u" ? {
17988
18018
  title: document.title || "",
17989
18019
  url: location.href
17990
18020
  } : null,
17991
18021
  canReadPage: V.domInspect === !0
17992
- }) : void 0, zt = {
18022
+ }) : void 0, Vt = {
17993
18023
  epoch: 0,
17994
18024
  notices: [],
17995
18025
  readsInvalidated: 0
17996
- }, Bt = 0, Vt = {
18026
+ }, Ht = 0, Ut = {
17997
18027
  name: "hostNotice",
17998
18028
  beforeAgent: () => {
17999
- Bt = zt.epoch;
18029
+ Ht = Vt.epoch;
18000
18030
  },
18001
18031
  wrapModelCall: async (e, t) => {
18002
18032
  if (Fe) {
@@ -18014,18 +18044,18 @@ function BC(e, n, r) {
18014
18044
  });
18015
18045
  }
18016
18046
  }
18017
- if (zt.epoch > Bt) {
18018
- Bt = zt.epoch;
18019
- let t = zt.notices[zt.notices.length - 1] ?? "", n = Vd(e.messages, t || void 0, Ue);
18047
+ if (Vt.epoch > Ht) {
18048
+ Ht = Vt.epoch;
18049
+ let t = Vt.notices[Vt.notices.length - 1] ?? "", n = Vd(e.messages, t || void 0, Ue);
18020
18050
  if (n.invalidatedCount > 0) {
18021
18051
  for (let t = 0; t < n.messages.length; t++) e.messages[t] = n.messages[t];
18022
- zt.readsInvalidated += n.invalidatedCount, G.agent?.debugLogs?.value?.push({
18052
+ Vt.readsInvalidated += n.invalidatedCount, G.agent?.debugLogs?.value?.push({
18023
18053
  timestamp: Date.now(),
18024
18054
  type: "middleware",
18025
18055
  data: {
18026
18056
  stage: "host_read_invalidated",
18027
18057
  count: n.invalidatedCount,
18028
- epoch: zt.epoch,
18058
+ epoch: Vt.epoch,
18029
18059
  reason: t || void 0
18030
18060
  }
18031
18061
  });
@@ -18033,24 +18063,24 @@ function BC(e, n, r) {
18033
18063
  }
18034
18064
  return t(e);
18035
18065
  },
18036
- augmentPrompt: () => zt.notices.length ? [
18066
+ augmentPrompt: () => Vt.notices.length ? [
18037
18067
  "【宿主页面已变更】",
18038
- ...zt.notices.filter(Boolean).map((e) => `· ${e}`),
18068
+ ...Vt.notices.filter(Boolean).map((e) => `· ${e}`),
18039
18069
  V.domInspect === !0 ? "此前的页面读取/截图结果已过期,回答任何关于当前页面的问题前必须重新 read_page / get_dom 读取当前页面;不要凭此前的读取结果或记忆作答。" : "页面内容可能已变化,断言页面前先核实当前状态;不要凭此前的印象作答。"
18040
18070
  ].join("\n") : void 0,
18041
18071
  afterAgent: () => {
18042
- zt.notices.length = 0;
18072
+ Vt.notices.length = 0;
18043
18073
  }
18044
- }, Ht = Re ? {
18074
+ }, Wt = Re ? {
18045
18075
  name: "proposalNotice",
18046
18076
  augmentPrompt: () => Re.state.notices.length ? ["【内容提案裁决结果】(以此为准,不要凭提案前状态作答)", ...Re.state.notices].join("\n") : void 0,
18047
18077
  afterAgent: () => {
18048
18078
  Re.state.notices.length = 0;
18049
18079
  }
18050
- } : null, Ut = ae ? {
18080
+ } : null, Gt = oe ? {
18051
18081
  name: "dataHint",
18052
18082
  augmentPrompt: () => a_(Ce(), e.schemaHint) || void 0
18053
- } : null, Wt = e.augmentSystem ? {
18083
+ } : null, Kt = e.augmentSystem ? {
18054
18084
  name: "augmentSystem",
18055
18085
  augmentPrompt: (t) => {
18056
18086
  try {
@@ -18063,51 +18093,51 @@ function BC(e, n, r) {
18063
18093
  return;
18064
18094
  }
18065
18095
  }
18066
- } : null, Gt = db(e.onEvent), Kt = Gt.emit, qt, Jt = [], Yt = (e) => ({
18096
+ } : null, qt = db(e.onEvent), Jt = qt.emit, Yt, Xt = [], Zt = (e) => ({
18067
18097
  name: e.name,
18068
18098
  description: e.description,
18069
18099
  content: typeof e.getContent == "function" ? e.getContent() : ""
18070
- }), Xt = (e) => ({
18100
+ }), Qt = (e) => ({
18071
18101
  name: e.name,
18072
18102
  description: e.description,
18073
18103
  getContent: () => e.content
18074
- }), Zt = e.skillStorage === !1 ? null : kC({
18104
+ }), $t = e.skillStorage === !1 ? null : kC({
18075
18105
  ...typeof e.skillStorage == "object" ? e.skillStorage : {},
18076
18106
  id: e.skillStorage && typeof e.skillStorage == "object" && e.skillStorage.id ? e.skillStorage.id : `agent::${n}`
18077
- }), Qt = () => {
18078
- let t = qt ? qt.controller : null;
18107
+ }), en = () => {
18108
+ let t = Yt ? Yt.controller : null;
18079
18109
  if (t) {
18080
- let n = (e.skills || []).filter((e) => !Jt.some((t) => t.name === e.name));
18081
- t.set([...n, ...Jt]);
18110
+ let n = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
18111
+ t.set([...n, ...Xt]);
18082
18112
  }
18083
18113
  G.infoTick.value++;
18084
- }, $t = async () => {
18085
- if (Zt) try {
18086
- let t = await Zt.list();
18114
+ }, tn = async () => {
18115
+ if ($t) try {
18116
+ let t = await $t.list();
18087
18117
  if (t.length) {
18088
- Jt = t.map(Xt);
18089
- let n = qt ? qt.controller : null;
18118
+ Xt = t.map(Qt);
18119
+ let n = Yt ? Yt.controller : null;
18090
18120
  if (n) {
18091
- let t = (e.skills || []).filter((e) => !Jt.some((t) => t.name === e.name));
18092
- n.set([...t, ...Jt]);
18121
+ let t = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
18122
+ n.set([...t, ...Xt]);
18093
18123
  }
18094
18124
  G.infoTick.value++;
18095
18125
  }
18096
18126
  } catch {}
18097
- }, en = ut ? Eh({
18127
+ }, nn = ut ? Eh({
18098
18128
  ...h,
18099
18129
  llmInvoke: d,
18100
18130
  getRegisteredData: () => Ce() ? [{ description: Ce().description ?? "主数据对象" }] : [],
18101
18131
  preserveLastToolResults: _,
18102
18132
  ...dt ? {
18103
18133
  decideInvoke: p,
18104
- getSnapshot: () => It?.getSnapshot()
18134
+ getSnapshot: () => Rt?.getSnapshot()
18105
18135
  } : {}
18106
- }) : void 0, tn = ct ? th([
18136
+ }) : void 0, rn = ct ? th([
18107
18137
  ...V.domInspect && !(e.skills || []).some((e) => e.name === "dom-inspect") ? [QS({
18108
18138
  withScreenshot: !!Me,
18109
18139
  withDomEdit: V.domEdit,
18110
- withDataOps: he && !!ae
18140
+ withDataOps: he && !!oe
18111
18141
  })] : [],
18112
18142
  ...V.domInspect && !(e.skills || []).some((e) => e.name === "page-analysis") ? [eC({
18113
18143
  withScreenshot: !!Me,
@@ -18125,78 +18155,78 @@ function BC(e, n, r) {
18125
18155
  W = it(), G.agent && G.agent.setTools(W), G.infoTick.value++;
18126
18156
  }
18127
18157
  }) : void 0;
18128
- qt = tn;
18129
- let nn = gb([
18130
- ...Ut ? [Ut] : [],
18131
- Lt,
18132
- ...Rt ? [Rt] : [],
18133
- Vt,
18134
- ...Ht ? [Ht] : [],
18158
+ Yt = rn;
18159
+ let an = gb([
18160
+ ...Gt ? [Gt] : [],
18161
+ zt,
18162
+ ...Bt ? [Bt] : [],
18163
+ Ut,
18164
+ ...Wt ? [Wt] : [],
18135
18165
  ...ot ? [T] : [],
18136
18166
  O,
18137
18167
  k,
18138
18168
  ...at ? [C] : [],
18139
- ...tn ? [tn] : [],
18169
+ ...rn ? [rn] : [],
18140
18170
  ...lt ? [v_(x)] : [],
18141
- ...en ? [en] : [],
18142
- ...st ? [ne] : [],
18143
- ...Xe ? [P] : [],
18171
+ ...nn ? [nn] : [],
18172
+ ...st ? [re] : [],
18173
+ ...Xe ? [ne] : [],
18144
18174
  ...Se ? [Se] : [],
18145
- ...ft ? [re] : [],
18175
+ ...ft ? [ie] : [],
18146
18176
  ...St ? [St] : [],
18147
18177
  ...me && B && z ? [Sg(z)] : [],
18148
18178
  ...qe ? [N] : [],
18149
- ...Ct ? [Ct] : [],
18150
- ...De ? [De] : [],
18151
- ...Ft ? [Ft] : [],
18152
18179
  ...Tt ? [Tt] : [],
18180
+ ...De ? [De] : [],
18181
+ ...Lt ? [Lt] : [],
18182
+ ...Dt ? [Dt] : [],
18183
+ ...Mt ? [Mt] : [],
18153
18184
  ...At ? [At] : [],
18154
- ...Ot ? [Ot] : [],
18155
- ...kt ? [kt] : [],
18185
+ ...jt ? [jt] : [],
18156
18186
  ...be && pt ? [Fv({
18157
18187
  getBind: () => Ce()?.bind,
18158
18188
  getTools: () => G.agent?.allTools ?? W
18159
18189
  })] : [],
18160
- ...Wt ? [Wt] : [],
18161
- ...It ? [It] : [],
18190
+ ...Kt ? [Kt] : [],
18191
+ ...Rt ? [Rt] : [],
18162
18192
  ...Pe ? [Pe] : [],
18163
18193
  ...e.middleware || [],
18164
18194
  ...H ? [lC(a, {
18165
18195
  tokenBudget: e.tokenBudget,
18166
18196
  timeBudgetMs: e.timeBudgetMs
18167
- }, Kt)] : [],
18168
- RC(Kt, b, Ce, a)
18169
- ]), rn = e.maxMemoryRounds ?? PC;
18170
- function an(e) {
18197
+ }, Jt)] : [],
18198
+ RC(Jt, b, Ce, a)
18199
+ ]), on = e.maxMemoryRounds ?? PC;
18200
+ function sn(e) {
18171
18201
  return (e) => {
18172
- e.type !== "approval_request" && Kt(Ae(e));
18202
+ e.type !== "approval_request" && Jt(Ae(e));
18173
18203
  };
18174
18204
  }
18175
- let on = /* @__PURE__ */ Rn([]), sn = NC(), cn = /* @__PURE__ */ new Set();
18176
- function ln(e) {
18205
+ let cn = /* @__PURE__ */ Rn([]), ln = NC(), un = /* @__PURE__ */ new Set();
18206
+ function dn(e) {
18177
18207
  let t = new AbortController(), n = () => t.abort();
18178
- return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), cn.add(t), {
18208
+ return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), un.add(t), {
18179
18209
  controller: t,
18180
18210
  untrack: () => {
18181
- cn.delete(t), e?.removeEventListener("abort", n);
18211
+ un.delete(t), e?.removeEventListener("abort", n);
18182
18212
  }
18183
18213
  };
18184
18214
  }
18185
- function un() {
18186
- for (let e of cn) e.abort();
18187
- cn.clear();
18215
+ function fn() {
18216
+ for (let e of un) e.abort();
18217
+ un.clear();
18188
18218
  }
18189
- let dn = /* @__PURE__ */ Rn(null), G = {
18219
+ let pn = /* @__PURE__ */ Rn(null), G = {
18190
18220
  agentId: n,
18191
18221
  store: l,
18192
18222
  messages: b,
18193
18223
  vfsStore: x,
18194
- listeners: Gt.listeners,
18224
+ listeners: qt.listeners,
18195
18225
  todosMw: C,
18196
- memoryMw: re,
18226
+ memoryMw: ie,
18197
18227
  missionMw: T,
18198
- workingMemoryMw: ne,
18199
- focusMw: P,
18228
+ workingMemoryMw: re,
18229
+ focusMw: ne,
18200
18230
  agent: null,
18201
18231
  initDone: Promise.resolve(),
18202
18232
  sessionId: "",
@@ -18206,18 +18236,18 @@ function BC(e, n, r) {
18206
18236
  mcpFailed: [],
18207
18237
  checkpoint: z,
18208
18238
  dataOpsController: be,
18209
- skillsController: qt ? qt.controller : null,
18239
+ skillsController: Yt ? Yt.controller : null,
18210
18240
  infoTick: c,
18211
18241
  pendingConflict: o.pendingConflict,
18212
- pendingQuote: dn,
18213
- sessions: on,
18214
- refreshSessions: () => vn.refreshSessions(),
18242
+ pendingQuote: pn,
18243
+ sessions: cn,
18244
+ refreshSessions: () => bn.refreshSessions(),
18215
18245
  liveData: Ce,
18216
18246
  usage: a,
18217
- emit: Kt,
18218
- runSerial: sn,
18219
- trackActive: ln,
18220
- abortAllActive: un,
18247
+ emit: Jt,
18248
+ runSerial: ln,
18249
+ trackActive: dn,
18250
+ abortAllActive: fn,
18221
18251
  unloadSkillTools(e) {
18222
18252
  if (e) {
18223
18253
  let t = nt.length;
@@ -18230,31 +18260,31 @@ function BC(e, n, r) {
18230
18260
  W = it(), G.agent && G.agent.setTools(W);
18231
18261
  },
18232
18262
  applySnapshot(t) {
18233
- if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory && re.reset(t.memory), t.checkpoints?.length && z && z.importStack(t.checkpoints), t.usage && Object.assign(a, t.usage), t.mission && ot && T.setMission(t.mission), t.workingMemory && st && ne.restore(t.workingMemory), t.planConfirmation && (A.lastPlanConfirmation = t.planConfirmation), Xe) {
18263
+ if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory && ie.reset(t.memory), t.checkpoints?.length && z && z.importStack(t.checkpoints), t.usage && Object.assign(a, t.usage), t.mission && ot && T.setMission(t.mission), t.workingMemory && st && re.restore(t.workingMemory), t.planConfirmation && (A.lastPlanConfirmation = t.planConfirmation), Xe) {
18234
18264
  let n = t.focus, r = n ? Array.isArray(n) ? n : [n] : [];
18235
18265
  if (r.length) {
18236
18266
  let t = Ce()?.schema, n = t ? r.filter((e) => Cp(t, e.path)) : [];
18237
- if (n.length && (P.setFocus(null), n.forEach((e) => P.addFocus(F(e)))), e.debug && n.length < r.length) {
18267
+ if (n.length && (ne.setFocus(null), n.forEach((e) => ne.addFocus(P(e)))), e.debug && n.length < r.length) {
18238
18268
  let e = r.filter((e) => !n.includes(e)).map((e) => e.path);
18239
18269
  console.warn("[page-agent-sdk][focus] 恢复的焦点部分 path 已失效(schema 变化/无 schema),剔除:", e);
18240
18270
  }
18241
18271
  }
18242
18272
  }
18243
- hn();
18273
+ _n();
18244
18274
  },
18245
18275
  addSkill(e) {
18246
- let t = Jt.findIndex((t) => t.name === e.name);
18247
- t >= 0 ? Jt[t] = e : Jt.push(e), Qt(), Zt && Zt.put(Yt(e));
18276
+ let t = Xt.findIndex((t) => t.name === e.name);
18277
+ t >= 0 ? Xt[t] = e : Xt.push(e), en(), $t && $t.put(Zt(e));
18248
18278
  },
18249
18279
  removeSkill(e) {
18250
- let t = Jt.findIndex((t) => t.name === e);
18251
- return t < 0 ? !1 : (Jt.splice(t, 1), Qt(), Zt && Zt.remove(e), !0);
18280
+ let t = Xt.findIndex((t) => t.name === e);
18281
+ return t < 0 ? !1 : (Xt.splice(t, 1), en(), $t && $t.remove(e), !0);
18252
18282
  },
18253
18283
  listUserSkills() {
18254
- return Jt.map((e) => e.name);
18284
+ return Xt.map((e) => e.name);
18255
18285
  },
18256
18286
  getUserSkill(e) {
18257
- let t = Jt.find((t) => t.name === e);
18287
+ let t = Xt.find((t) => t.name === e);
18258
18288
  if (t) return {
18259
18289
  name: t.name,
18260
18290
  description: t.description,
@@ -18262,7 +18292,7 @@ function BC(e, n, r) {
18262
18292
  };
18263
18293
  },
18264
18294
  afterRound() {
18265
- gn(), vn.persistRuntime();
18295
+ vn(), bn.persistRuntime();
18266
18296
  },
18267
18297
  clearCodeReuse() {
18268
18298
  let e = x;
@@ -18273,9 +18303,9 @@ function BC(e, n, r) {
18273
18303
  t ??= {}, t?.mission && ot && T.setMission(t.mission);
18274
18304
  let n = e, r = (t.images ?? []).filter((e) => e && (e.dataUri || e.vfsRef || e.url));
18275
18305
  if (r.length > 4) throw Error(`[page-agent-sdk] 单轮最多 4 张图片(收到 ${r.length})`);
18276
- if (r.length && (await _n.stowImages(r), await _n.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
18306
+ if (r.length && (await yn.stowImages(r), await yn.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
18277
18307
  let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述(集成方识图子 agent / 自有 vision API)";
18278
- throw Kt({
18308
+ throw Jt({
18279
18309
  type: "error",
18280
18310
  message: e,
18281
18311
  severity: "recoverable",
@@ -18283,7 +18313,7 @@ function BC(e, n, r) {
18283
18313
  }), Error(`[page-agent-sdk] ${e}`);
18284
18314
  }
18285
18315
  x?.setProtectedRefs?.(jC(b));
18286
- let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = an(t.signal);
18316
+ let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = sn(t.signal);
18287
18317
  if (t.signal) {
18288
18318
  let e = () => o.resolve("keep_external");
18289
18319
  t.signal.aborted ? e() : t.signal.addEventListener("abort", e, { once: !0 });
@@ -18300,14 +18330,14 @@ function BC(e, n, r) {
18300
18330
  ...n ? { anchor: n } : {}
18301
18331
  };
18302
18332
  }
18303
- let i = e ?? dn.value ?? void 0;
18333
+ let i = e ?? pn.value ?? void 0;
18304
18334
  b.push({
18305
18335
  role: "user",
18306
18336
  content: n,
18307
18337
  timestamp: Date.now(),
18308
18338
  ...r.length ? { images: r } : {},
18309
18339
  ...i ? { quote: i } : {}
18310
- }), s = !0, !e && dn.value && (dn.value = null);
18340
+ }), s = !0, !e && pn.value && (pn.value = null);
18311
18341
  }
18312
18342
  try {
18313
18343
  let e = await G.agent.invoke(b, t.signal, c);
@@ -18328,7 +18358,7 @@ function BC(e, n, r) {
18328
18358
  }), G.afterRound(), l) try {
18329
18359
  await l.flush();
18330
18360
  } catch (e) {
18331
- Kt({
18361
+ Jt({
18332
18362
  type: "error",
18333
18363
  message: `落盘失败(不影响本轮回复):${e instanceof Error ? e.message : String(e)}`,
18334
18364
  severity: "observable",
@@ -18344,7 +18374,7 @@ function BC(e, n, r) {
18344
18374
  code: "MODEL_UNAVAILABLE",
18345
18375
  message: e instanceof Error ? e.message : n.message
18346
18376
  }), a < i && z?.canRestore()) {
18347
- a += 1, z.restore(), s = !0, Kt({
18377
+ a += 1, z.restore(), s = !0, Jt({
18348
18378
  type: "error",
18349
18379
  message: `致命错误自动恢复(${a}/${i}):${n.message},已回退 checkpoint 重试`,
18350
18380
  severity: "observable",
@@ -18356,7 +18386,7 @@ function BC(e, n, r) {
18356
18386
  });
18357
18387
  continue;
18358
18388
  }
18359
- throw Kt({
18389
+ throw Jt({
18360
18390
  type: "error",
18361
18391
  message: n.message,
18362
18392
  severity: n.severity,
@@ -18369,7 +18399,7 @@ function BC(e, n, r) {
18369
18399
  async batch(e, t, n) {
18370
18400
  if (await G.initDone, !e.length) return [];
18371
18401
  if (G.refCount <= 0) throw Error("page-agent-sdk: agent 已释放(unmount),拒绝排队中的 batch");
18372
- let r = [], i = an(n);
18402
+ let r = [], i = sn(n);
18373
18403
  if (x?.setProtectedRefs?.(jC(b)), n) {
18374
18404
  let e = () => o.resolve("keep_external");
18375
18405
  n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
@@ -18401,7 +18431,7 @@ function BC(e, n, r) {
18401
18431
  }), G.afterRound(), l) try {
18402
18432
  await l.flush();
18403
18433
  } catch (e) {
18404
- Kt({
18434
+ Jt({
18405
18435
  type: "error",
18406
18436
  message: `落盘失败(不影响本任务结果):${e instanceof Error ? e.message : String(e)}`,
18407
18437
  severity: "observable",
@@ -18437,7 +18467,7 @@ function BC(e, n, r) {
18437
18467
  }
18438
18468
  od(i);
18439
18469
  let c = Xl(i, "fatal");
18440
- Kt({
18470
+ Jt({
18441
18471
  type: "error",
18442
18472
  message: `批量任务 ${a + 1}/${e.length} 失败:${c.message}`,
18443
18473
  severity: "observable",
@@ -18461,16 +18491,16 @@ function BC(e, n, r) {
18461
18491
  }
18462
18492
  return r;
18463
18493
  },
18464
- switchSession: (e) => vn.switchSession(e),
18465
- exportSession: (e) => vn.exportSession(e),
18466
- importSession: (e) => vn.importSession(e),
18467
- resetSession: () => vn.resetSession(),
18494
+ switchSession: (e) => bn.switchSession(e),
18495
+ exportSession: (e) => bn.exportSession(e),
18496
+ importSession: (e) => bn.importSession(e),
18497
+ resetSession: () => bn.resetSession(),
18468
18498
  stream: async (e, t, n) => {
18469
18499
  if (!G.agent) throw Error("page-agent-sdk: agent 尚未初始化完成,请先 await mount()");
18470
18500
  let r = [...e].reverse().find((e) => e.role === "user" && e.images?.length);
18471
- if (r?.images?.length && (await _n.stowImages(r.images), await _n.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
18501
+ if (r?.images?.length && (await yn.stowImages(r.images), await yn.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
18472
18502
  let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述";
18473
- throw Kt({
18503
+ throw Jt({
18474
18504
  type: "error",
18475
18505
  message: e,
18476
18506
  severity: "recoverable",
@@ -18479,18 +18509,18 @@ function BC(e, n, r) {
18479
18509
  }
18480
18510
  x?.setProtectedRefs?.(jC(e));
18481
18511
  let i = (e) => {
18482
- t?.(Ae(e)), Kt(Ae(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
18512
+ t?.(Ae(e)), Jt(Ae(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
18483
18513
  };
18484
18514
  if (n) {
18485
18515
  let e = () => o.resolve("keep_external");
18486
18516
  n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
18487
18517
  }
18488
- let { controller: a, untrack: s } = ln(n);
18518
+ let { controller: a, untrack: s } = dn(n);
18489
18519
  return G.agent.stream(e, i, a.signal).finally(s);
18490
18520
  },
18491
18521
  release() {
18492
18522
  if (G.refCount--, G.refCount <= 0) {
18493
- un(), Ke = !0, l && (x.flush?.(), l.flush(), l.dispose()), Zt && Zt.dispose();
18523
+ fn(), Ke = !0, l && (x.flush?.(), l.flush(), l.dispose()), $t && $t.dispose();
18494
18524
  let e = G.mcpClosers.splice(0);
18495
18525
  e.length && Promise.allSettled(e.map((e) => e())), FC.delete(n);
18496
18526
  }
@@ -18518,7 +18548,7 @@ function BC(e, n, r) {
18518
18548
  if ((e.provider ?? "openai") === "anthropic") throw Error("[page-agent-sdk][setLlm] 切换到 Anthropic 需传 BaseChatModel 实例(动态 import 无法同步);请先 const { ChatAnthropic } = await import(\"@langchain/anthropic\") 构造实例后传入");
18519
18549
  n = te(e);
18520
18550
  }
18521
- typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit: Kt }), y = t;
18551
+ typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit: Jt }), y = t;
18522
18552
  let r = vy(t) ? void 0 : t;
18523
18553
  if (m = D({
18524
18554
  model: r?.model ?? t.model ?? t.modelName,
@@ -18526,31 +18556,31 @@ function BC(e, n, r) {
18526
18556
  maxOutputTokens: e.maxOutputTokens ?? r?.maxOutputTokens,
18527
18557
  vision: r?.vision ?? t.vision
18528
18558
  }), m.contextWindow < 2e5) throw Error(`[page-agent-sdk][setLlm] 新模型上下文窗口 ${m.contextWindow} 小于最小支持 ${S}(需 ≥200K 窗口模型)`);
18529
- G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)), en?.setContextWindow?.(m.contextWindow), It?.setContextWindow?.(m.contextWindow), G.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
18559
+ G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)), nn?.setContextWindow?.(m.contextWindow), Rt?.setContextWindow?.(m.contextWindow), G.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
18530
18560
  },
18531
18561
  setMemory(e) {
18532
- re.reset(e), typeof e == "function" && re.refresh(), G.infoTick.value++;
18562
+ ie.reset(e), typeof e == "function" && ie.refresh(), G.infoTick.value++;
18533
18563
  },
18534
18564
  refreshMemory() {
18535
- return re.refresh();
18565
+ return ie.refresh();
18536
18566
  },
18537
18567
  setSubagents(t) {
18538
- if (!jt) {
18568
+ if (!Nt) {
18539
18569
  e.debug && console.warn("[page-agent-sdk][setSubagents] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
18540
18570
  return;
18541
18571
  }
18542
- jt.set(t), G.infoTick.value++;
18572
+ Nt.set(t), G.infoTick.value++;
18543
18573
  },
18544
18574
  addSubagent(t) {
18545
- if (!jt) {
18575
+ if (!Nt) {
18546
18576
  e.debug && console.warn("[page-agent-sdk][addSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
18547
18577
  return;
18548
18578
  }
18549
- jt.add(t), G.infoTick.value++;
18579
+ Nt.add(t), G.infoTick.value++;
18550
18580
  },
18551
18581
  removeSubagent(t) {
18552
- if (!jt) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
18553
- let n = jt.remove(t);
18582
+ if (!Nt) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
18583
+ let n = Nt.remove(t);
18554
18584
  return n && G.infoTick.value++, n;
18555
18585
  },
18556
18586
  getActiveSubagents() {
@@ -18571,7 +18601,7 @@ function BC(e, n, r) {
18571
18601
  schema: e.schema,
18572
18602
  source: Oe.get(e.name) || "user"
18573
18603
  })),
18574
- skills: (qt ? qt.controller.get() : e.skills ?? []).map((e) => ({
18604
+ skills: (Yt ? Yt.controller.get() : e.skills ?? []).map((e) => ({
18575
18605
  name: e.name,
18576
18606
  description: e.description
18577
18607
  })),
@@ -18585,16 +18615,16 @@ function BC(e, n, r) {
18585
18615
  summaryThresholdRatio: h.summaryThresholdRatio ?? .5,
18586
18616
  promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens)
18587
18617
  },
18588
- memory: re.get(),
18618
+ memory: ie.get(),
18589
18619
  staleReadsInvalidated: G.agent?.getStaleReadsInvalidated?.() ?? 0,
18590
- hostReadsInvalidated: zt.readsInvalidated,
18620
+ hostReadsInvalidated: Vt.readsInvalidated,
18591
18621
  ...Re ? { proposals: Re.snapshot() } : {},
18592
18622
  ...r ? { hostWatch: { ...r } } : {},
18593
18623
  llmRetries: G.agent?.getLlmRetries?.() ?? 0,
18594
18624
  llmCallFailures: G.agent?.getLlmCallFailures?.() ?? 0,
18595
18625
  gates: G.agent?.getGateStats?.(),
18596
18626
  systemSegments: G.agent?.getLastSystemSegments?.() ?? [],
18597
- middleware: nn.map((e) => e.name),
18627
+ middleware: an.map((e) => e.name),
18598
18628
  todos: (G.agent?.getState?.()?.todos ?? []).map((e) => ({
18599
18629
  id: e.id,
18600
18630
  content: e.content,
@@ -18607,28 +18637,28 @@ function BC(e, n, r) {
18607
18637
  planPhase: C.getPlanPhase(),
18608
18638
  mission: ot ? T.getMission() : void 0,
18609
18639
  planConfirmation: A.lastPlanConfirmation,
18610
- workingMemory: st ? ne.getWorkingMemory() : void 0,
18611
- focus: Xe ? P.getFocus() : void 0,
18612
- focuses: Xe ? P.getFocuses() : [],
18640
+ workingMemory: st ? re.getWorkingMemory() : void 0,
18641
+ focus: Xe ? ne.getFocus() : void 0,
18642
+ focuses: Xe ? ne.getFocuses() : [],
18613
18643
  actions: fC(e.actions ?? {}),
18614
18644
  subagent: {
18615
- enabled: !!Tt,
18645
+ enabled: !!Dt,
18616
18646
  maxDepth: e.subagent?.maxDepth ?? 1,
18617
18647
  maxParallel: e.subagent?.maxParallel ?? 4,
18618
18648
  timeoutMs: e.subagent?.timeoutMs === void 0 ? 18e5 : e.subagent.timeoutMs > 0 ? e.subagent.timeoutMs : 0,
18619
18649
  allowedTools: e.subagent?.allowedTools ?? [],
18620
- subagents: (jt?.get() ?? []).map(Mt),
18650
+ subagents: (Nt?.get() ?? []).map(Pt),
18621
18651
  active: mt?.getActive() ?? [],
18622
18652
  history: mt?.getHistory() ?? [],
18623
- lockedComponents: Dt?.locked() ?? {}
18653
+ lockedComponents: kt?.locked() ?? {}
18624
18654
  },
18625
18655
  verify: {
18626
- enabled: !!Ft,
18656
+ enabled: !!Lt,
18627
18657
  maxAttempts: vt ? ht : 0,
18628
18658
  adversarial: vt && !!e.verify?.adversarial
18629
18659
  },
18630
18660
  context: (() => {
18631
- let e = It?.getSnapshot();
18661
+ let e = Rt?.getSnapshot();
18632
18662
  if (e) {
18633
18663
  let t = G.agent?.getState?.()?.lastCompression;
18634
18664
  t && (e.compression = t);
@@ -18691,31 +18721,31 @@ function BC(e, n, r) {
18691
18721
  T.setMission(t), G.infoTick.value++;
18692
18722
  },
18693
18723
  getFocus() {
18694
- return Xe ? P.getFocus() : void 0;
18724
+ return Xe ? ne.getFocus() : void 0;
18695
18725
  },
18696
18726
  getFocuses() {
18697
- return Xe ? P.getFocuses() : [];
18727
+ return Xe ? ne.getFocuses() : [];
18698
18728
  },
18699
18729
  setFocus(t) {
18700
18730
  let n = zC(t, "setFocus", Xe, () => Ce()?.schema, e.debug);
18701
- return n.ok ? (P.setFocus(F(t)), e.debug && P.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18731
+ return n.ok ? (ne.setFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18702
18732
  },
18703
18733
  addFocus(t) {
18704
18734
  let n = zC(t, "addFocus", Xe, () => Ce()?.schema, e.debug);
18705
- return n.ok ? P.getFocuses().length >= 8 ? (e.debug && console.warn("[page-agent-sdk][focus] addFocus 拒绝:焦点数已达上限 8(augmentPrompt 注入每焦点子树 schema,过多致 system prompt 超预算)"), {
18735
+ return n.ok ? ne.getFocuses().length >= 8 ? (e.debug && console.warn("[page-agent-sdk][focus] addFocus 拒绝:焦点数已达上限 8(augmentPrompt 注入每焦点子树 schema,过多致 system prompt 超预算)"), {
18706
18736
  ok: !1,
18707
18737
  error: "焦点数上限 8(避免 system prompt 撑爆)"
18708
- }) : (P.addFocus(F(t)), e.debug && P.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18738
+ }) : (ne.addFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
18709
18739
  },
18710
18740
  removeFocus(e) {
18711
- Xe && (P.removeFocus(e), G.infoTick.value++);
18741
+ Xe && (ne.removeFocus(e), G.infoTick.value++);
18712
18742
  },
18713
18743
  clearFocus() {
18714
- Xe && (P.clearFocus(), G.infoTick.value++);
18744
+ Xe && (ne.clearFocus(), G.infoTick.value++);
18715
18745
  },
18716
18746
  setQuote(e, t, n) {
18717
18747
  let r = yu(e ?? ""), i = Mu(n);
18718
- dn.value = r ? {
18748
+ pn.value = r ? {
18719
18749
  text: r,
18720
18750
  ...t ? { source: t } : {},
18721
18751
  ...i ? { anchor: i } : {}
@@ -18723,18 +18753,18 @@ function BC(e, n, r) {
18723
18753
  },
18724
18754
  notifyHostChange(e) {
18725
18755
  let t = typeof e?.reason == "string" ? e.reason.trim().slice(0, 200) : "";
18726
- zt.epoch += 1, t && !zt.notices.includes(t) ? zt.notices.push(t) : t || zt.notices.push(""), zt.notices.length > 5 && zt.notices.splice(0, zt.notices.length - 5), G.agent?.debugLogs?.value?.push({
18756
+ Vt.epoch += 1, t && !Vt.notices.includes(t) ? Vt.notices.push(t) : t || Vt.notices.push(""), Vt.notices.length > 5 && Vt.notices.splice(0, Vt.notices.length - 5), G.agent?.debugLogs?.value?.push({
18727
18757
  timestamp: Date.now(),
18728
18758
  type: "middleware",
18729
18759
  data: {
18730
18760
  stage: "host_change_notified",
18731
- epoch: zt.epoch,
18761
+ epoch: Vt.epoch,
18732
18762
  reason: t || void 0
18733
18763
  }
18734
18764
  }), G.infoTick.value++;
18735
18765
  },
18736
18766
  clearQuote() {
18737
- dn.value = null;
18767
+ pn.value = null;
18738
18768
  },
18739
18769
  resolveProposal(e, t, n) {
18740
18770
  let r = Re ? Re.resolve(e, t, n) : !1;
@@ -18744,13 +18774,13 @@ function BC(e, n, r) {
18744
18774
  return Re ? Re.snapshot() : null;
18745
18775
  }
18746
18776
  };
18747
- async function fn() {
18777
+ async function mn() {
18748
18778
  if (!l) return;
18749
18779
  let t = async (e) => {
18750
18780
  try {
18751
18781
  return await l.load(n, e);
18752
18782
  } catch (t) {
18753
- Kt({
18783
+ Jt({
18754
18784
  type: "error",
18755
18785
  message: `会话快照读取失败,已降级空会话:${t instanceof Error ? t.message : String(t)}`,
18756
18786
  severity: "observable",
@@ -18763,7 +18793,7 @@ function BC(e, n, r) {
18763
18793
  try {
18764
18794
  return await l.listSessions(n);
18765
18795
  } catch (e) {
18766
- return Kt({
18796
+ return Jt({
18767
18797
  type: "error",
18768
18798
  message: `会话列表读取失败,已降级新建会话:${e instanceof Error ? e.message : String(e)}`,
18769
18799
  severity: "observable",
@@ -18771,7 +18801,7 @@ function BC(e, n, r) {
18771
18801
  }), [];
18772
18802
  }
18773
18803
  }, i = Symbol("storage-ready-timeout");
18774
- await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Kt({
18804
+ await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Jt({
18775
18805
  type: "error",
18776
18806
  message: "存储初始化 5s 未就绪(IDB blocked?),已放行降级运行",
18777
18807
  severity: "observable",
@@ -18781,7 +18811,7 @@ function BC(e, n, r) {
18781
18811
  if (a.id) {
18782
18812
  G.sessionId = a.id;
18783
18813
  let e = await t(G.sessionId);
18784
- e ? (G.applySnapshot(e), Kt({
18814
+ e ? (G.applySnapshot(e), Jt({
18785
18815
  type: "session_restored",
18786
18816
  sessionId: G.sessionId,
18787
18817
  rounds: e.messages?.length ?? 0
@@ -18791,19 +18821,19 @@ function BC(e, n, r) {
18791
18821
  if (e.debug && console.log("[page-agent-sdk][restore] listSessions", n, i.length, i.map((e) => e.sessionId)), i.length) {
18792
18822
  G.sessionId = i[0].sessionId;
18793
18823
  let n = await t(G.sessionId);
18794
- n ? (G.applySnapshot(n), Kt({
18824
+ n ? (G.applySnapshot(n), Jt({
18795
18825
  type: "session_restored",
18796
18826
  sessionId: G.sessionId,
18797
18827
  rounds: n.messages?.length ?? 0
18798
18828
  }), e.debug && console.log("[page-agent-sdk][restore] 恢复会话", G.sessionId, `${n.messages?.length ?? 0} msgs`)) : e.debug && console.log("[page-agent-sdk][restore] 会话 meta 存在但快照为空", G.sessionId);
18799
18829
  } else G.sessionId = await l.createSession(n, a.title), e.debug && console.log("[page-agent-sdk][restore] 新建会话(无历史)", G.sessionId);
18800
18830
  } else G.sessionId = await l.createSession(n, a.title);
18801
- e.memory && vn.persistSave({ memory: re.get() || (typeof e.memory == "string" ? e.memory : "") }), vn.refreshSessions();
18831
+ e.memory && bn.persistSave({ memory: ie.get() || (typeof e.memory == "string" ? e.memory : "") }), bn.refreshSessions();
18802
18832
  }
18803
- async function pn() {
18804
- await $t();
18833
+ async function hn() {
18834
+ await tn();
18805
18835
  }
18806
- function mn(e) {
18836
+ function gn(e) {
18807
18837
  let t = {};
18808
18838
  for (let n of jC(e)) {
18809
18839
  let e = x.files[n];
@@ -18811,15 +18841,15 @@ function BC(e, n, r) {
18811
18841
  }
18812
18842
  return t;
18813
18843
  }
18814
- function hn() {
18844
+ function _n() {
18815
18845
  let e = MC(x.files, jC(b));
18816
18846
  for (let t of e) delete x.files[t];
18817
18847
  }
18818
- function gn() {
18819
- let e = uh(b, rn);
18848
+ function vn() {
18849
+ let e = uh(b, on);
18820
18850
  if (!e.trimmed) return;
18821
18851
  let { older: t, summary: n } = e;
18822
- if (Kt({
18852
+ if (Jt({
18823
18853
  type: "context_trimmed",
18824
18854
  dropped: t.map((e) => ({
18825
18855
  round: e.round,
@@ -18827,43 +18857,43 @@ function BC(e, n, r) {
18827
18857
  assistant: e.assistantMsgs.map((e) => e.content),
18828
18858
  steps: e.assistantMsgs.flatMap((e) => e.steps ?? [])
18829
18859
  })),
18830
- vfsResults: mn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
18860
+ vfsResults: gn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
18831
18861
  summary: n.content,
18832
18862
  reason: "max_memory_rounds"
18833
- }), b.splice(e.deleteFrom, e.deleteCount, n), hn(), g && d) {
18863
+ }), b.splice(e.deleteFrom, e.deleteCount, n), _n(), g && d) {
18834
18864
  let n = e.summary, { prevSeg: r } = e;
18835
18865
  (async () => {
18836
18866
  try {
18837
18867
  let e = await d(_h(t, v)), i = b.indexOf(n);
18838
18868
  if (i < 0) return;
18839
- b[i].content = lh(t, r, e), vn.persistRuntime();
18869
+ b[i].content = lh(t, r, e), bn.persistRuntime();
18840
18870
  } catch {}
18841
18871
  })();
18842
18872
  }
18843
18873
  }
18844
- let _n = hu({
18874
+ let yn = hu({
18845
18875
  getConfig: () => e.images,
18846
18876
  getVision: () => m.vision === !0,
18847
- emit: Kt,
18877
+ emit: Jt,
18848
18878
  getVfsStore: () => G.vfsStore,
18849
- noteFailure: (e, t) => vn.notePersistFailure(e, t)
18850
- }), vn = yb({
18879
+ noteFailure: (e, t) => bn.notePersistFailure(e, t)
18880
+ }), bn = yb({
18851
18881
  agentId: n,
18852
18882
  options: e,
18853
- emit: Kt,
18883
+ emit: Jt,
18854
18884
  getStore: () => l,
18855
18885
  core: G,
18856
- sessionsRef: on,
18886
+ sessionsRef: cn,
18857
18887
  sessionVars: A,
18858
18888
  messages: b,
18859
18889
  getUsage: () => a,
18860
18890
  mw: {
18861
18891
  todosMw: C,
18862
- memoryMw: re,
18892
+ memoryMw: ie,
18863
18893
  missionMw: T,
18864
- workingMemoryMw: ne,
18865
- focusMw: P,
18866
- summarizationMw: en,
18894
+ workingMemoryMw: re,
18895
+ focusMw: ne,
18896
+ summarizationMw: nn,
18867
18897
  resumeNoticeMw: k,
18868
18898
  useMission: ot,
18869
18899
  useWorkingMemory: st,
@@ -18873,13 +18903,13 @@ function BC(e, n, r) {
18873
18903
  vfsStore: x,
18874
18904
  checkpointMgr: z,
18875
18905
  conflictResolve: (e) => o.resolve(e),
18876
- abortAllActive: un,
18906
+ abortAllActive: fn,
18877
18907
  titleLlmInvoke: f
18878
18908
  });
18879
18909
  return G.initDone = (async () => {
18880
- await fn(), await pn(), e.mcp?.length && Xg({
18910
+ await mn(), await hn(), e.mcp?.length && Xg({
18881
18911
  servers: e.mcp,
18882
- emit: Kt,
18912
+ emit: Jt,
18883
18913
  isReleased: () => Ke,
18884
18914
  core: {
18885
18915
  mcpClosers: G.mcpClosers,
@@ -18901,12 +18931,12 @@ function BC(e, n, r) {
18901
18931
  },
18902
18932
  debug: e.debug
18903
18933
  });
18904
- let t = vy(e.llm) ? e.llm : await I(e.llm);
18905
- by(t, { emit: Kt }), G.agent = yp({
18934
+ let t = vy(e.llm) ? e.llm : await F(e.llm);
18935
+ by(t, { emit: Jt }), G.agent = yp({
18906
18936
  llm: t,
18907
18937
  systemPrompt: ve,
18908
18938
  tools: W,
18909
- middleware: nn,
18939
+ middleware: an,
18910
18940
  maxToolRounds: e.maxToolRounds,
18911
18941
  hasSubagent: pt,
18912
18942
  pageAssertionGate: V.domInspect === !0,
@@ -18928,7 +18958,7 @@ function BC(e, n, r) {
18928
18958
  y = e;
18929
18959
  },
18930
18960
  debug: e.debug
18931
- }), ie.current = G.agent, At && At.setReconfigureHook(() => {
18961
+ }), ae.current = G.agent, Mt && Mt.setReconfigureHook(() => {
18932
18962
  G.agent && G.agent.setTools(it());
18933
18963
  });
18934
18964
  })(), G;
@@ -19809,13 +19839,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19809
19839
  }, te = (e, t) => {
19810
19840
  let [, n] = A(), r = { xt: n };
19811
19841
  return M(r), n && !t && j(r, e ? o : i), r;
19812
- }, P = (e, t, n) => {
19842
+ }, ne = (e, t, n) => {
19813
19843
  let r = { Ht: t };
19814
19844
  return M(r), t && !n && j(r, i), r;
19815
- }, [F, I] = y ? OD(g, ee) : [], ne = !b && DD(g, N, { ft: !0 }), [re, ie] = TD(g, !1, P, {
19845
+ }, [P, F] = y ? OD(g, ee) : [], re = !b && DD(g, N, { ft: !0 }), [ie, ae] = TD(g, !1, ne, {
19816
19846
  ct: m,
19817
19847
  et: m
19818
- }), ae = b && nw && new nw(((e) => {
19848
+ }), oe = b && nw && new nw(((e) => {
19819
19849
  let t = e[e.length - 1].contentRect;
19820
19850
  N({
19821
19851
  _t: !0,
@@ -19824,8 +19854,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19824
19854
  }));
19825
19855
  return [
19826
19856
  () => {
19827
- ae && ae.observe(g);
19828
- let e = ne && ne(), t = F && F(), n = re(), r = O.G(((e) => {
19857
+ oe && oe.observe(g);
19858
+ let e = re && re(), t = P && P(), n = ie(), r = O.G(((e) => {
19829
19859
  let [, t] = A();
19830
19860
  j({
19831
19861
  Et: e,
@@ -19834,7 +19864,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19834
19864
  }, s);
19835
19865
  }));
19836
19866
  return () => {
19837
- ae && ae.disconnect(), e && e(), t && t(), l && l(), n(), r();
19867
+ oe && oe.disconnect(), e && e(), t && t(), l && l(), n(), r();
19838
19868
  };
19839
19869
  },
19840
19870
  ({ Dt: e, zt: t, It: n }) => {
@@ -19853,8 +19883,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19853
19883
  l = e(), c = t;
19854
19884
  }
19855
19885
  if (S && (j.O(), uw(x) || ow(x) ? (i = x, a = !1, o = pD, s = mD) : pw(x) ? (i = x.mutation, a = x.resize, o = x.event, s = x.env) : (i = !1, a = !1, o = !1, s = !1)), w) {
19856
- let e = ie(), t = I && I(), n = c && c();
19857
- e && Xw(r, P(e[0], e[1], w)), t && Xw(r, ee(t[0], w)), n && Xw(r, te(n[0], w));
19886
+ let e = ae(), t = F && F(), n = c && c();
19887
+ e && Xw(r, ne(e[0], e[1], w)), t && Xw(r, ee(t[0], w)), n && Xw(r, te(n[0], w));
19858
19888
  }
19859
19889
  return M(r), r;
19860
19890
  },
@@ -19983,21 +20013,21 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
19983
20013
  }, O = (e) => {
19984
20014
  let { Rt: t } = n, r = UT(h)[c] - UT(g)[c], i = 1 / T * e / r;
19985
20015
  D(i * t[l]);
19986
- }, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N, P = (e) => {
19987
- ww(ne), _.releasePointerCapture(e.pointerId);
19988
- }, F = m || e, I = p(), ne = [
19989
- QT(f, t, P),
20016
+ }, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N, ne = (e) => {
20017
+ ww(re), _.releasePointerCapture(e.pointerId);
20018
+ }, P = m || e, F = p(), re = [
20019
+ QT(f, t, ne),
19990
20020
  QT(f, "selectstart", ((e) => eE(e)), { D: !1 }),
19991
- QT(h, t, P),
19992
- F && QT(h, "pointermove", ((e) => O(te + e[i] - k))),
19993
- F && (() => {
20021
+ QT(h, t, ne),
20022
+ P && QT(h, "pointermove", ((e) => O(te + e[i] - k))),
20023
+ P && (() => {
19994
20024
  let e = rE(d);
19995
- I();
20025
+ F();
19996
20026
  let t = rE(d), n = {
19997
20027
  x: t.x - e.x,
19998
20028
  y: t.y - e.y
19999
20029
  };
20000
- (qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(I));
20030
+ (qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(F));
20001
20031
  })
20002
20032
  ];
20003
20033
  if (_.setPointerCapture(r.pointerId), e) O(N);
@@ -20005,9 +20035,9 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20005
20035
  let e = gE(lD);
20006
20036
  if (e) {
20007
20037
  let { Vt: t } = n, r = e(D, O, Ww(w), N, t[l], S, !!s, ((e) => {
20008
- e ? I() : yw(ne, I);
20038
+ e ? F() : yw(re, F);
20009
20039
  }));
20010
- yw(ne, r), yw(u, Ww(r, !0));
20040
+ yw(re, r), yw(u, Ww(r, !0));
20011
20041
  }
20012
20042
  }
20013
20043
  }
@@ -20061,7 +20091,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20061
20091
  }, ID = (e, t, n, r, i, a, o) => {
20062
20092
  let s, c, l, u, d, f = $w, p = 0, m = ["mouse", "pen"], h = (e) => (t) => {
20063
20093
  n.Kt || e(t);
20064
- }, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) && P()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: ee, Bt: N } = T, te = (e, t) => {
20094
+ }, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) && ne()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: ee, Bt: N } = T, te = (e, t) => {
20065
20095
  w();
20066
20096
  let r = (e) => {
20067
20097
  n.Kt || A(QE, e);
@@ -20071,45 +20101,45 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20071
20101
  let e = !l || !s;
20072
20102
  p > 0 && !t ? C(Ww(r, e)) : r(e);
20073
20103
  }
20074
- }, P = () => {
20104
+ }, ne = () => {
20075
20105
  (l ? !s : !u) && (te(!0), y((() => {
20076
20106
  te(!1);
20077
20107
  })));
20078
- }, F = (e) => {
20108
+ }, P = (e) => {
20079
20109
  g(e) && (s = !0, !n.Kt && l && te(!0));
20080
- }, I = (e) => {
20110
+ }, F = (e) => {
20081
20111
  g(e) && (s = !1, !n.Kt && l && te(!1));
20082
- }, ne = (e) => {
20112
+ }, re = (e) => {
20083
20113
  A(ZE, e, !0), A(ZE, e, !1);
20084
- }, re = [
20114
+ }, ie = [
20085
20115
  w,
20086
20116
  b,
20087
20117
  S,
20088
20118
  v,
20089
20119
  () => f(),
20090
- QT(D, "pointerover", F, { A: !0 }),
20091
- QT(D, "pointerenter", F),
20092
- QT(D, "pointerleave", I),
20120
+ QT(D, "pointerover", P, { A: !0 }),
20121
+ QT(D, "pointerenter", P),
20122
+ QT(D, "pointerleave", F),
20093
20123
  QT(D, "pointermove", h(((e) => {
20094
- g(e) && c && P();
20124
+ g(e) && c && ne();
20095
20125
  }))),
20096
20126
  QT(O, "scroll", h(((e) => {
20097
20127
  _((() => {
20098
- M(), P();
20128
+ M(), ne();
20099
20129
  })), o(e), N();
20100
20130
  })))
20101
- ], ie = gE(cD);
20131
+ ], ae = gE(cD);
20102
20132
  return [
20103
- () => Ww(ww, yw(re, E())),
20133
+ () => Ww(ww, yw(ie, E())),
20104
20134
  ({ Dt: e, It: t, Zt: n, tn: a }) => {
20105
- let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, P] = e("scrollbars.theme"), [F, I] = e("scrollbars.visibility"), [re, ae] = e("scrollbars.autoHide"), [oe, se] = e("scrollbars.autoHideSuspend"), [ce] = e("scrollbars.autoHideDelay"), [L, R] = e("scrollbars.dragScroll"), [le, ue] = e("scrollbars.clickScroll"), [de, fe] = e("overflow"), pe = v && !t, me = o || s || g || _ || t, z = m || I || fe, B = T && b.x && b.y, V = !S && !ie, he = B || V, ge = (e, t, n) => {
20106
- let r = e.includes(Rw) && (F === Iw || F === "auto" && t === Rw);
20135
+ let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, ne] = e("scrollbars.theme"), [P, F] = e("scrollbars.visibility"), [ie, oe] = e("scrollbars.autoHide"), [se, ce] = e("scrollbars.autoHideSuspend"), [le] = e("scrollbars.autoHideDelay"), [I, L] = e("scrollbars.dragScroll"), [ue, de] = e("scrollbars.clickScroll"), [fe, R] = e("overflow"), pe = v && !t, me = o || s || g || _ || t, z = m || F || R, B = T && b.x && b.y, V = !S && !ae, he = B || V, ge = (e, t, n) => {
20136
+ let r = e.includes(Rw) && (P === Iw || P === "auto" && t === Rw);
20107
20137
  return A(qE, r, n), r;
20108
20138
  };
20109
- if (p = ce, (E || V) && A(BE, he), P && (A(d), A(D, !0), d = D), (se || pe) && (ne(!oe), pe && oe && (w.x || w.y ? (f(), x((() => {
20110
- f = QT(O, Rw, h(Ww(ne, !0)), { A: !0 });
20111
- }))) : ne(!0))), ae && (c = re === "move", l = re === "leave", u = re === "never", te(u, !0)), R && A(tD, L), ue && A(eD, !!le), z) {
20112
- let e = ge(de.x, C.x, !0), t = ge(de.y, C.y, !1);
20139
+ if (p = le, (E || V) && A(BE, he), ne && (A(d), A(D, !0), d = D), (ce || pe) && (re(!se), pe && se && (w.x || w.y ? (f(), x((() => {
20140
+ f = QT(O, Rw, h(Ww(re, !0)), { A: !0 });
20141
+ }))) : re(!0))), oe && (c = ie === "move", l = ie === "leave", u = ie === "never", te(u, !0)), L && A(tD, I), de && A(eD, !!ue), z) {
20142
+ let e = ge(fe.x, C.x, !0), t = ge(fe.y, C.y, !1);
20113
20143
  A(JE, !(e && t));
20114
20144
  }
20115
20145
  me && (M(), j(), N(), g && ee(), A(XE, !w.x, !0), A(XE, !w.y, !1), A(HE, y && !k));
@@ -20126,13 +20156,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20126
20156
  k,
20127
20157
  j,
20128
20158
  A
20129
- ].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p, P = E ? g : k, F = {
20159
+ ].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p, ne = E ? g : k, P = {
20130
20160
  dt: p,
20131
20161
  vt: A,
20132
20162
  L: k,
20133
20163
  ln: j,
20134
20164
  ht: M,
20135
- gt: P,
20165
+ gt: ne,
20136
20166
  Qt: E ? h : k,
20137
20167
  an: m ? g : te,
20138
20168
  Gt: h,
@@ -20142,31 +20172,31 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20142
20172
  un: _,
20143
20173
  yt: (e) => uT(k, EE, e),
20144
20174
  wt: (e, t) => lT(k, EE, e, t),
20145
- St: () => lT(P, EE, jE, !0)
20146
- }, { dt: I, vt: ne, ln: re, L: ie, ht: ae } = F, oe = [() => {
20147
- aT(ne, [wE, xE]), aT(I, xE), m && aT(g, [xE, wE]);
20148
- }], se = vT([
20175
+ St: () => lT(ne, EE, jE, !0)
20176
+ }, { dt: F, vt: re, ln: ie, L: ae, ht: oe } = P, se = [() => {
20177
+ aT(re, [wE, xE]), aT(F, xE), m && aT(g, [xE, wE]);
20178
+ }], ce = vT([
20179
+ oe,
20149
20180
  ae,
20150
20181
  ie,
20151
20182
  re,
20152
- ne,
20153
- I
20154
- ].find(((e) => e && !N(e)))), ce = E ? I : ae || ie, L = Ww(ww, oe);
20183
+ F
20184
+ ].find(((e) => e && !N(e)))), le = E ? F : oe || ae, I = Ww(ww, se);
20155
20185
  return [
20156
- F,
20186
+ P,
20157
20187
  () => {
20158
20188
  let e = _(), t = xT(), r = (e) => {
20159
20189
  wT(yT(e), vT(e)), CT(e);
20160
20190
  }, i = (e) => QT(e, "focusin focusout focus blur", tE, {
20161
20191
  I: !0,
20162
20192
  D: !1
20163
- }), a = "tabindex", o = nT(ie, a), s = i(t);
20164
- return iT(ne, wE, T ? "" : TE), iT(re, PE, ""), iT(ie, EE, ""), iT(ae, FE, ""), T || (iT(ie, a, o || "-1"), m && iT(g, CE, "")), wT(ce, se), wT(ne, re), wT(re || ne, !T && ie), wT(ie, ae), yw(oe, [s, () => {
20165
- let e = xT(), t = N(ie), n = t && e === ie ? I : e, s = i(n);
20166
- aT(re, PE), aT(ae, FE), aT(ie, EE), m && aT(g, CE), o ? iT(ie, a, o) : aT(ie, a), N(ae) && r(ae), t && r(ie), N(re) && r(re), cE(n), s();
20167
- }]), n && !T && (cT(ie, EE, ME), yw(oe, Ww(aT, ie, EE))), cE(!T && m && t === I && e.top === e ? ie : t), s(), se = 0, L;
20193
+ }), a = "tabindex", o = nT(ae, a), s = i(t);
20194
+ return iT(re, wE, T ? "" : TE), iT(ie, PE, ""), iT(ae, EE, ""), iT(oe, FE, ""), T || (iT(ae, a, o || "-1"), m && iT(g, CE, "")), wT(le, ce), wT(re, ie), wT(ie || re, !T && ae), wT(ae, oe), yw(se, [s, () => {
20195
+ let e = xT(), t = N(ae), n = t && e === ae ? F : e, s = i(n);
20196
+ aT(ie, PE), aT(oe, FE), aT(ae, EE), m && aT(g, CE), o ? iT(ae, a, o) : aT(ae, a), N(oe) && r(oe), t && r(ae), N(ie) && r(ie), cE(n), s();
20197
+ }]), n && !T && (cT(ae, EE, ME), yw(se, Ww(aT, ae, EE))), cE(!T && m && t === F && e.top === e ? ae : t), s(), ce = 0, I;
20168
20198
  },
20169
- L
20199
+ I
20170
20200
  ];
20171
20201
  }, RD = ({ ht: e }) => ({ Zt: t, fn: n, It: r }) => {
20172
20202
  let { $t: i } = t || {}, { Ot: a } = n;
@@ -20294,20 +20324,20 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20294
20324
  Iw,
20295
20325
  Lw,
20296
20326
  Rw
20297
- ].map(((t) => ne(oD(t), e))), n = t(!0).concat(t()).join(" ");
20298
- u(n), u(Yw(e).map(((t) => ne(e[t], t === "x"))).join(" "), !0);
20327
+ ].map(((t) => re(oD(t), e))), n = t(!0).concat(t()).join(" ");
20328
+ u(n), u(Yw(e).map(((t) => re(e[t], t === "x"))).join(" "), !0);
20299
20329
  }, [T, E] = HC(_, Ww(KT, a)), [D, O] = HC(_, Ww(GT, a)), [k, A] = HC(_), [j] = HC(v), [M, ee] = HC(_), [N] = HC(v), [te] = HC({
20300
20330
  i: (e, t) => Bw(e, t, Cw(vw(Yw(e), Yw(t)))),
20301
20331
  o: {}
20302
- }), [P, F] = HC({
20332
+ }), [ne, P] = HC({
20303
20333
  i: (e, t) => Hw(e.T, t.T) && Hw(e.k, t.k),
20304
20334
  o: iE()
20305
- }), I = gE(cD), ne = (e, t) => `${t ? DE : OE}${zw(e)}`;
20335
+ }), F = gE(cD), re = (e, t) => `${t ? DE : OE}${zw(e)}`;
20306
20336
  return ({ Dt: o, Zt: s, fn: c, It: l }, { dn: h }) => {
20307
- let { _t: g, Ht: _, xt: v, Ct: ne, ft: re, Et: ie } = s || {}, { X: ae, Y: oe, W: se } = I && I.R(e, t, c, n, o) || {}, [ce, L] = rD(o, n), [R, le] = o("overflow"), ue = iD(R.x), de = iD(R.y), fe = g || h || v || ne || ie || L, pe = E(l), me = O(l), z = A(l), B = ee(l);
20308
- if (L && f && u(ME, !ce), fe) {
20337
+ let { _t: g, Ht: _, xt: v, Ct: re, ft: ie, Et: ae } = s || {}, { X: oe, Y: se, W: ce } = F && F.R(e, t, c, n, o) || {}, [le, I] = rD(o, n), [L, ue] = o("overflow"), de = iD(L.x), fe = iD(L.y), R = g || h || v || re || ae || I, pe = E(l), me = O(l), z = A(l), B = ee(l);
20338
+ if (I && f && u(ME, !le), R) {
20309
20339
  uT(r, wE, SE) && y(!0);
20310
- let e = oe && oe(), [t] = pe = T(l), [n] = me = D(l), i = WT(a), o = p && HT(d()), s = {
20340
+ let e = se && se(), [t] = pe = T(l), [n] = me = D(l), i = WT(a), o = p && HT(d()), s = {
20311
20341
  w: m(n.w + t.w),
20312
20342
  h: m(n.h + t.h)
20313
20343
  }, c = {
@@ -20319,8 +20349,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
20319
20349
  let [V, he] = B, [ge, H] = z, [_e, ve] = me, [U, ye] = pe, [be] = j({
20320
20350
  x: ge.w > 0,
20321
20351
  y: ge.h > 0
20322
- }), xe = ue && de && (be.x || be.y) || ue && be.x && !be.y || de && be.y && !be.x, Se = h || ne || ie || ye || ve || he || H || le || L || fe || _ && p, [Ce] = o("update.flowDirectionStyles"), [we, Te] = te(Ce ? Ce(a) || {} : b(), l), [Ee, De] = ne || re || Te || l ? P(x(we, !!Ce), l) : F(), Oe = C(be, R);
20323
- y(!1), Se && (w(Oe), Oe = sD(a, be), se && ae && (ae(Oe, _e, U), FT(a, se(Oe))));
20352
+ }), xe = de && fe && (be.x || be.y) || de && be.x && !be.y || fe && be.y && !be.x, Se = h || re || ae || ye || ve || he || H || ue || I || R || _ && p, [Ce] = o("update.flowDirectionStyles"), [we, Te] = te(Ce ? Ce(a) || {} : b(), l), [Ee, De] = re || ie || Te || l ? ne(x(we, !!Ce), l) : P(), Oe = C(be, L);
20353
+ y(!1), Se && (w(Oe), Oe = sD(a, be), ce && oe && (oe(Oe, _e, U), FT(a, ce(Oe))));
20324
20354
  let [ke, Ae] = N(Oe);
20325
20355
  return lT(r, wE, SE, xe), lT(i, PE, SE, xe), Xw(t, {
20326
20356
  rn: ke,
@@ -21361,12 +21391,12 @@ function iO(e = {}) {
21361
21391
  };
21362
21392
  }), x = pc(() => (n.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), S = () => {
21363
21393
  e.onUndo?.() && (n.error = null);
21364
- }, C = (e) => new Date(e).toLocaleTimeString(ce, {
21394
+ }, C = (e) => new Date(e).toLocaleTimeString(le, {
21365
21395
  hour: "2-digit",
21366
21396
  minute: "2-digit"
21367
21397
  }), w = () => {
21368
21398
  let e = T.value, t = M.value;
21369
- !o.value.trim() && !e.length || (r(o.value, I.value, e.length ? [...e] : void 0, t ?? void 0), o.value = "", T.value = [], t && N());
21399
+ !o.value.trim() && !e.length || (r(o.value, F.value, e.length ? [...e] : void 0, t ?? void 0), o.value = "", T.value = [], t && N());
21370
21400
  }, T = /* @__PURE__ */ Rn([]), E = /* @__PURE__ */ Rn(""), D = /* @__PURE__ */ Rn(!1), O, k = (e) => {
21371
21401
  E.value = e, clearTimeout(O), O = setTimeout(() => {
21372
21402
  E.value = "";
@@ -21376,16 +21406,16 @@ function iO(e = {}) {
21376
21406
  if (!t.length) return;
21377
21407
  let n = 4 - T.value.length;
21378
21408
  if (n <= 0) {
21379
- k(`${L.imageCountLimitPrefix}4${L.imageCountLimitSuffix}`);
21409
+ k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`);
21380
21410
  return;
21381
21411
  }
21382
- t.length > n && k(`${L.imageCountLimitPrefix}4${L.imageCountLimitSuffix}`), D.value = !0;
21412
+ t.length > n && k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`), D.value = !0;
21383
21413
  try {
21384
21414
  for (let e of t.slice(0, n)) try {
21385
21415
  let t = await fu(e, { name: e.name });
21386
21416
  T.value.push(t);
21387
21417
  } catch (e) {
21388
- k(e instanceof tu ? `${e.message}` : L.imageInvalid);
21418
+ k(e instanceof tu ? `${e.message}` : I.imageInvalid);
21389
21419
  }
21390
21420
  } finally {
21391
21421
  D.value = !1;
@@ -21398,23 +21428,23 @@ function iO(e = {}) {
21398
21428
  e.onClearQuote?.();
21399
21429
  }, te = (e) => {
21400
21430
  e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), w());
21401
- }, P = (e) => {
21431
+ }, ne = (e) => {
21402
21432
  o.value = a.value[e] || "", i(e);
21403
- }, F = (e) => {
21433
+ }, P = (e) => {
21404
21434
  let t = n.messages, r = t[e];
21405
21435
  if (!r || r.role !== "assistant") return !1;
21406
21436
  let i = "reasoning" in r ? r.reasoning : void 0, a = "steps" in r ? r.steps : void 0;
21407
21437
  return n.loading && e === t.length - 1 && !r.content && !i && !(a && a.length);
21408
- }, I = pc(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), ne = pc(() => (e.infoTick?.value, e.getInfo?.()?.planConfirmation)), re = (t) => e.onAddFocus ? e.onAddFocus(t) : {
21438
+ }, F = pc(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), re = pc(() => (e.infoTick?.value, e.getInfo?.()?.planConfirmation)), ie = (t) => e.onAddFocus ? e.onAddFocus(t) : {
21409
21439
  ok: !1,
21410
21440
  error: "focus 未启用"
21411
- }, ie = (t) => {
21441
+ }, ae = (t) => {
21412
21442
  e.onRemoveFocus?.(t);
21413
- }, ae = () => {
21443
+ }, oe = () => {
21414
21444
  e.onClearFocus?.();
21415
- }, oe = (t) => {
21445
+ }, se = (t) => {
21416
21446
  e.onFocusChipClick?.(t);
21417
- }, se = QD(e.icons), ce = e.locale ?? "zh-CN", L = nO(ce, e.dialogMessages);
21447
+ }, ce = QD(e.icons), le = e.locale ?? "zh-CN", I = nO(le, e.dialogMessages);
21418
21448
  return {
21419
21449
  chat: t,
21420
21450
  inputText: o,
@@ -21445,17 +21475,17 @@ function iO(e = {}) {
21445
21475
  quote: M,
21446
21476
  setQuote: ee,
21447
21477
  clearQuote: N,
21448
- editQueued: P,
21449
- isPendingAssistant: F,
21450
- focuses: I,
21451
- planConfirmation: ne,
21452
- addFocus: re,
21453
- removeFocus: ie,
21454
- clearFocus: ae,
21455
- focusChipClick: oe,
21456
- icons: se,
21457
- locale: ce,
21458
- messages: L,
21478
+ editQueued: ne,
21479
+ isPendingAssistant: P,
21480
+ focuses: F,
21481
+ planConfirmation: re,
21482
+ addFocus: ie,
21483
+ removeFocus: ae,
21484
+ clearFocus: oe,
21485
+ focusChipClick: se,
21486
+ icons: ce,
21487
+ locale: le,
21488
+ messages: I,
21459
21489
  toolStepView: e.toolStepView
21460
21490
  };
21461
21491
  }
@@ -21746,20 +21776,20 @@ function Dk() {
21746
21776
  }
21747
21777
  }, A = function() {
21748
21778
  return T ||= (w = wk(u, i), !0), w;
21749
- }, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName, P = r.importNode, F = Tk();
21779
+ }, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName, ne = r.importNode, P = Tk();
21750
21780
  t.isSupported = typeof fO == "function" && typeof g == "function" && M && M.createHTMLDocument !== void 0;
21751
- let I = ck, ne = lk, re = uk, ie = dk, ae = fk, oe = mk, se = hk, ce = _k, L = pk, R = null, le = GO({}, [
21781
+ let F = ck, re = lk, ie = uk, ae = dk, oe = fk, se = mk, ce = hk, le = _k, I = pk, L = null, ue = GO({}, [
21752
21782
  ...ZO,
21753
21783
  ...QO,
21754
21784
  ...$O,
21755
21785
  ...tk,
21756
21786
  ...rk
21757
- ]), ue = null, de = GO({}, [
21787
+ ]), de = null, fe = GO({}, [
21758
21788
  ...ik,
21759
21789
  ...ak,
21760
21790
  ...ok,
21761
21791
  ...sk
21762
- ]), fe = Object.seal(yO(null, {
21792
+ ]), R = Object.seal(yO(null, {
21763
21793
  tagNameCheck: {
21764
21794
  writable: !0,
21765
21795
  configurable: !1,
@@ -21834,19 +21864,19 @@ function Dk() {
21834
21864
  }, tt = function() {
21835
21865
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
21836
21866
  if (Qe && Qe === e) return;
21837
- (!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO, R = Ek(e, "ALLOWED_TAGS", le, { transform: Ze }), ue = Ek(e, "ALLOWED_ATTR", de, { transform: Ze }), He = Ek(e, "ALLOWED_NAMESPACES", Ue, { transform: AO }), Fe = Ek(e, "ADD_URI_SAFE_ATTR", Ie, {
21867
+ (!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO, L = Ek(e, "ALLOWED_TAGS", ue, { transform: Ze }), de = Ek(e, "ALLOWED_ATTR", fe, { transform: Ze }), He = Ek(e, "ALLOWED_NAMESPACES", Ue, { transform: AO }), Fe = Ek(e, "ADD_URI_SAFE_ATTR", Ie, {
21838
21868
  transform: Ze,
21839
21869
  base: Ie
21840
21870
  }), Ne = Ek(e, "ADD_DATA_URI_TAGS", Pe, {
21841
21871
  transform: Ze,
21842
21872
  base: Pe
21843
- }), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, L = XO(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : pk, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, Ge = zO(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? qO(e.MATHML_TEXT_INTEGRATION_POINTS) : GO({}, We), qe = zO(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? qO(e.HTML_INTEGRATION_POINTS) : GO({}, Ke);
21873
+ }), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, I = XO(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : pk, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, Ge = zO(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? qO(e.MATHML_TEXT_INTEGRATION_POINTS) : GO({}, We), qe = zO(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? qO(e.HTML_INTEGRATION_POINTS) : GO({}, Ke);
21844
21874
  let t = zO(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? qO(e.CUSTOM_ELEMENT_HANDLING) : yO(null);
21845
- if (fe = yO(null), zO(t, "tagNameCheck") && et(t.tagNameCheck) && (fe.tagNameCheck = t.tagNameCheck), zO(t, "attributeNameCheck") && et(t.attributeNameCheck) && (fe.attributeNameCheck = t.attributeNameCheck), zO(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (fe.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), vO(fe), H && (V = !1), Ce && (Se = !0), Ae && (R = GO({}, rk), ue = yO(null), Ae.html === !0 && (GO(R, ZO), GO(ue, ik)), Ae.svg === !0 && (GO(R, QO), GO(ue, ak), GO(ue, sk)), Ae.svgFilters === !0 && (GO(R, $O), GO(ue, ak), GO(ue, sk)), Ae.mathMl === !0 && (GO(R, tk), GO(ue, ok), GO(ue, sk))), z.tagCheck = null, z.attributeCheck = null, zO(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : OO(e.ADD_TAGS) && (R === le && (R = qO(R)), GO(R, e.ADD_TAGS, Ze))), zO(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : OO(e.ADD_ATTR) && (ue === de && (ue = qO(ue)), GO(ue, e.ADD_ATTR, Ze))), zO(e, "ADD_URI_SAFE_ATTR") && OO(e.ADD_URI_SAFE_ATTR) && GO(Fe, e.ADD_URI_SAFE_ATTR, Ze), zO(e, "FORBID_CONTENTS") && OO(e.FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.FORBID_CONTENTS, Ze)), zO(e, "ADD_FORBID_CONTENTS") && OO(e.ADD_FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.ADD_FORBID_CONTENTS, Ze)), Oe && (R["#text"] = !0), ve && GO(R, [
21875
+ if (R = yO(null), zO(t, "tagNameCheck") && et(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), zO(t, "attributeNameCheck") && et(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), zO(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), vO(R), H && (V = !1), Ce && (Se = !0), Ae && (L = GO({}, rk), de = yO(null), Ae.html === !0 && (GO(L, ZO), GO(de, ik)), Ae.svg === !0 && (GO(L, QO), GO(de, ak), GO(de, sk)), Ae.svgFilters === !0 && (GO(L, $O), GO(de, ak), GO(de, sk)), Ae.mathMl === !0 && (GO(L, tk), GO(de, ok), GO(de, sk))), z.tagCheck = null, z.attributeCheck = null, zO(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : OO(e.ADD_TAGS) && (L === ue && (L = qO(L)), GO(L, e.ADD_TAGS, Ze))), zO(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : OO(e.ADD_ATTR) && (de === fe && (de = qO(de)), GO(de, e.ADD_ATTR, Ze))), zO(e, "ADD_URI_SAFE_ATTR") && OO(e.ADD_URI_SAFE_ATTR) && GO(Fe, e.ADD_URI_SAFE_ATTR, Ze), zO(e, "FORBID_CONTENTS") && OO(e.FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.FORBID_CONTENTS, Ze)), zO(e, "ADD_FORBID_CONTENTS") && OO(e.ADD_FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.ADD_FORBID_CONTENTS, Ze)), Oe && (L["#text"] = !0), ve && GO(L, [
21846
21876
  "html",
21847
21877
  "head",
21848
21878
  "body"
21849
- ]), R.table && (GO(R, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
21879
+ ]), L.table && (GO(L, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
21850
21880
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
21851
21881
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
21852
21882
  let t = S;
@@ -21925,7 +21955,7 @@ function Dk() {
21925
21955
  let t = v(e);
21926
21956
  if (t) for (let n = t.length - 1; n >= 0; --n) {
21927
21957
  let r = t[n], i = r && r.name;
21928
- if (!(typeof i != "string" || ue[Ze(i)])) try {
21958
+ if (!(typeof i != "string" || de[Ze(i)])) try {
21929
21959
  e.removeAttribute(i);
21930
21960
  } catch {}
21931
21961
  }
@@ -21981,7 +22011,7 @@ function Dk() {
21981
22011
  let t = x ? x(e) : e.ownerDocument;
21982
22012
  return ee.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
21983
22013
  }, ht = function(e) {
21984
- return e = MO(e, I, " "), e = MO(e, ne, " "), e = MO(e, re, " "), e;
22014
+ return e = MO(e, F, " "), e = MO(e, re, " "), e = MO(e, ie, " "), e;
21985
22015
  }, gt = function(e) {
21986
22016
  e.normalize();
21987
22017
  let t = x ? x(e) : e.ownerDocument, n = ee.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
@@ -22016,7 +22046,7 @@ function Dk() {
22016
22046
  let xt = function(e, t) {
22017
22047
  return !!(_e && e.hasChildNodes() && !yt(e.firstElementChild) && VO(vk, e.textContent) && VO(vk, e.innerHTML) || _e && e.namespaceURI === ze && t === "style" && yt(e.firstElementChild) || e.nodeType === Sk.processingInstruction || _e && e.nodeType === Sk.comment && VO(yk, e.data));
22018
22048
  }, St = function(e, t, n) {
22019
- if (!pe[t] && Dt(t) && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, t) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(t))) return !1;
22049
+ if (!pe[t] && Dt(t) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, t) || R.tagNameCheck instanceof Function && R.tagNameCheck(t))) return !1;
22020
22050
  if (Oe && !je[t]) {
22021
22051
  let t = g(e), r = h(e);
22022
22052
  if (r && t) {
@@ -22031,31 +22061,31 @@ function Dk() {
22031
22061
  }, Ct = function(e, t, n, r) {
22032
22062
  return e.length === 0 ? t : t === n || t === r ? qO(t) : t;
22033
22063
  }, wt = function(e, n) {
22034
- if (bt(F.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
22064
+ if (bt(P.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
22035
22065
  if (_t(e)) return st(e), !0;
22036
22066
  let r = Ze(b ? b(e) : e.nodeName);
22037
- if (R = Ct(F.uponSanitizeElement, R, le, ye), bt(F.uponSanitizeElement, e, {
22067
+ if (L = Ct(P.uponSanitizeElement, L, ue, ye), bt(P.uponSanitizeElement, e, {
22038
22068
  tagName: r,
22039
- allowedTags: R
22069
+ allowedTags: L
22040
22070
  }), e !== n && g(e) === null) return ke && dt(e), !0;
22041
22071
  if (xt(e, r)) return st(e), !0;
22042
- if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !R[r]) {
22072
+ if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !L[r]) {
22043
22073
  let t = St(e, r, n);
22044
- return t === !1 && bt(F.afterSanitizeElements, e, null), t;
22074
+ return t === !1 && bt(P.afterSanitizeElements, e, null), t;
22045
22075
  }
22046
22076
  if ((y ? y(e) : e.nodeType) === Sk.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && VO(bk, e.innerHTML)) return st(e), !0;
22047
22077
  if (H && e.nodeType === Sk.text) {
22048
22078
  let n = ht(e.textContent);
22049
22079
  e.textContent !== n && (EO(t.removed, { element: e.cloneNode() }), e.textContent = n);
22050
22080
  }
22051
- return bt(F.afterSanitizeElements, e, null), !1;
22081
+ return bt(P.afterSanitizeElements, e, null), !1;
22052
22082
  }, Tt = function(e, t, r) {
22053
22083
  if (me[t] || _e && t === "patchsrc" || _e && t === "for" && e !== "label" && e !== "output" || Te && (t === "id" || t === "name") && (r in n || r in $e)) return !1;
22054
- let i = ue[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
22055
- if (!(V && VO(ie, t)) && !(B && VO(ae, t))) {
22084
+ let i = de[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
22085
+ if (!(V && VO(ae, t)) && !(B && VO(oe, t))) {
22056
22086
  if (!i) {
22057
- if (!(Dt(e) && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, e) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(e)) && (fe.attributeNameCheck instanceof RegExp && VO(fe.attributeNameCheck, t) || fe.attributeNameCheck instanceof Function && fe.attributeNameCheck(t, e)) || t === "is" && fe.allowCustomizedBuiltInElements && (fe.tagNameCheck instanceof RegExp && VO(fe.tagNameCheck, r) || fe.tagNameCheck instanceof Function && fe.tagNameCheck(r)))) return !1;
22058
- } else if (!Fe[t] && !VO(L, MO(r, se, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && NO(r, "data:") === 0 && Ne[e]) && !(he && !VO(oe, MO(r, se, ""))) && r) return !1;
22087
+ if (!(Dt(e) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && VO(R.attributeNameCheck, t) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(t, e)) || t === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, r) || R.tagNameCheck instanceof Function && R.tagNameCheck(r)))) return !1;
22088
+ } else if (!Fe[t] && !VO(I, MO(r, ce, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && NO(r, "data:") === 0 && Ne[e]) && !(he && !VO(se, MO(r, ce, ""))) && r) return !1;
22059
22089
  }
22060
22090
  return !0;
22061
22091
  }, Et = GO({}, [
@@ -22068,7 +22098,7 @@ function Dk() {
22068
22098
  "font-face-uri",
22069
22099
  "missing-glyph"
22070
22100
  ]), Dt = function(e) {
22071
- return !Et[kO(e)] && VO(ce, e);
22101
+ return !Et[kO(e)] && VO(le, e);
22072
22102
  }, Ot = function(e, t, n, r) {
22073
22103
  if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
22074
22104
  case "TrustedHTML": return O(r);
@@ -22082,20 +22112,20 @@ function Dk() {
22082
22112
  lt(n, e);
22083
22113
  }
22084
22114
  }, At = function(e) {
22085
- bt(F.beforeSanitizeAttributes, e, null);
22115
+ bt(P.beforeSanitizeAttributes, e, null);
22086
22116
  let t = e.attributes;
22087
22117
  if (!t || _t(e)) return;
22088
- ue = Ct(F.uponSanitizeAttribute, ue, de, be);
22118
+ de = Ct(P.uponSanitizeAttribute, de, fe, be);
22089
22119
  let n = {
22090
22120
  attrName: "",
22091
22121
  attrValue: "",
22092
22122
  keepAttr: !0,
22093
- allowedAttributes: ue,
22123
+ allowedAttributes: de,
22094
22124
  forceKeepAttr: void 0
22095
22125
  }, r = t.length, i = Ze(e.nodeName);
22096
22126
  for (; r--;) {
22097
22127
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : PO(u);
22098
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Ee && (l === "id" || l === "name") && NO(d, De) !== 0 && (lt(o, e), d = De + d), _e && VO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
22128
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(P.uponSanitizeAttribute, e, n), d = n.attrValue, Ee && (l === "id" || l === "name") && NO(d, De) !== 0 && (lt(o, e), d = De + d), _e && VO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
22099
22129
  lt(o, e);
22100
22130
  continue;
22101
22131
  }
@@ -22119,14 +22149,14 @@ function Dk() {
22119
22149
  d = Ot(i, l, s, d), d !== u && kt(e, o, s, d);
22120
22150
  }
22121
22151
  }
22122
- bt(F.afterSanitizeAttributes, e, null);
22152
+ bt(P.afterSanitizeAttributes, e, null);
22123
22153
  }, jt = function(e) {
22124
22154
  let t = null, n = mt(e);
22125
- for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), At(t), vt(t.content) && jt(t.content), (y ? y(t) : t.nodeType) === Sk.element) {
22155
+ for (bt(P.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(P.uponSanitizeShadowNode, t, null), wt(t, e), At(t), vt(t.content) && jt(t.content), (y ? y(t) : t.nodeType) === Sk.element) {
22126
22156
  let e = _(t);
22127
22157
  vt(e) && (Mt(e), jt(e));
22128
22158
  }
22129
- bt(F.afterSanitizeShadowDOM, e, null);
22159
+ bt(P.afterSanitizeShadowDOM, e, null);
22130
22160
  }, Mt = function(e) {
22131
22161
  let t = [{
22132
22162
  node: e,
@@ -22169,14 +22199,14 @@ function Dk() {
22169
22199
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
22170
22200
  if (Ve = !e, Ve && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = JO(e), typeof e != "string")) throw HO("dirty is not a string, aborting");
22171
22201
  if (!t.isSupported) return e;
22172
- U ? (R = ye, ue = be) : tt(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (R = qO(R)), F.uponSanitizeAttribute.length > 0 && (ue = qO(ue)), t.removed = [];
22202
+ U ? (L = ye, de = be) : tt(n), (P.uponSanitizeElement.length > 0 || P.uponSanitizeAttribute.length > 0) && (L = qO(L)), P.uponSanitizeAttribute.length > 0 && (de = qO(de)), t.removed = [];
22173
22203
  let c = ke && typeof e != "string" && yt(e);
22174
22204
  if (c) {
22175
22205
  ft(e);
22176
22206
  let t = b ? b(e) : e.nodeName;
22177
22207
  if (typeof t == "string") {
22178
22208
  let n = Ze(t);
22179
- if (!R[n] || pe[n]) throw ct(e), HO("root node is forbidden and cannot be sanitized in-place");
22209
+ if (!L[n] || pe[n]) throw ct(e), HO("root node is forbidden and cannot be sanitized in-place");
22180
22210
  }
22181
22211
  if (_t(e)) throw ct(e), HO("root node is clobbered and cannot be sanitized in-place");
22182
22212
  try {
@@ -22205,13 +22235,13 @@ function Dk() {
22205
22235
  if (Se) {
22206
22236
  if (H && gt(i), Ce) for (s = N.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
22207
22237
  else s = i;
22208
- return (ue.shadowroot || ue.shadowrootmode) && (s = P.call(r, s, !0)), s;
22238
+ return (de.shadowroot || de.shadowrootmode) && (s = ne.call(r, s, !0)), s;
22209
22239
  }
22210
22240
  let u = ve ? i.outerHTML : i.innerHTML;
22211
- return ve && R["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && VO(gk, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = ht(u)), S && we ? O(u) : u;
22241
+ return ve && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && VO(gk, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = ht(u)), S && we ? O(u) : u;
22212
22242
  }, t.setConfig = function() {
22213
22243
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
22214
- tt(e), U = !0, ye = R, be = ue;
22244
+ tt(e), U = !0, ye = L, be = de;
22215
22245
  }, t.clearConfig = function() {
22216
22246
  Qe = null, U = !1, ye = null, be = null, S = w, C = "";
22217
22247
  }, t.isValidAttribute = function(e, t, n) {
@@ -22219,19 +22249,19 @@ function Dk() {
22219
22249
  let r = Ze(e), i = Ze(t);
22220
22250
  return Tt(r, i, n);
22221
22251
  }, t.addHook = function(e, t) {
22222
- typeof t == "function" && zO(F, e) && EO(F[e], t);
22252
+ typeof t == "function" && zO(P, e) && EO(P[e], t);
22223
22253
  }, t.removeHook = function(e, t) {
22224
- if (zO(F, e)) {
22254
+ if (zO(P, e)) {
22225
22255
  if (t !== void 0) {
22226
- let n = wO(F[e], t);
22227
- return n === -1 ? void 0 : DO(F[e], n, 1)[0];
22256
+ let n = wO(P[e], t);
22257
+ return n === -1 ? void 0 : DO(P[e], n, 1)[0];
22228
22258
  }
22229
- return TO(F[e]);
22259
+ return TO(P[e]);
22230
22260
  }
22231
22261
  }, t.removeHooks = function(e) {
22232
- zO(F, e) && (F[e] = []);
22262
+ zO(P, e) && (P[e] = []);
22233
22263
  }, t.removeAllHooks = function() {
22234
- F = Tk();
22264
+ P = Tk();
22235
22265
  }, t;
22236
22266
  }
22237
22267
  var Ok = Dk();
@@ -24709,7 +24739,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24709
24739
  end: "\"",
24710
24740
  illegal: "\\n",
24711
24741
  contains: [M]
24712
- }, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, P = function(e, t, n = {}) {
24742
+ }, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, ne = function(e, t, n = {}) {
24713
24743
  let r = a({
24714
24744
  scope: "comment",
24715
24745
  begin: e,
@@ -24725,7 +24755,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24725
24755
  });
24726
24756
  let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
24727
24757
  return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
24728
- }, F = P("//", "$"), I = P("/\\*", "\\*/"), ne = P("#", "$"), re = /*#__PURE__*/ Object.freeze({
24758
+ }, P = ne("//", "$"), F = ne("/\\*", "\\*/"), re = ne("#", "$"), ie = /*#__PURE__*/ Object.freeze({
24729
24759
  __proto__: null,
24730
24760
  APOS_STRING_MODE: ee,
24731
24761
  BACKSLASH_ESCAPE: M,
@@ -24735,9 +24765,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24735
24765
  relevance: 0
24736
24766
  },
24737
24767
  BINARY_NUMBER_RE: k,
24738
- COMMENT: P,
24739
- C_BLOCK_COMMENT_MODE: I,
24740
- C_LINE_COMMENT_MODE: F,
24768
+ COMMENT: ne,
24769
+ C_BLOCK_COMMENT_MODE: F,
24770
+ C_LINE_COMMENT_MODE: P,
24741
24771
  C_NUMBER_MODE: {
24742
24772
  scope: "number",
24743
24773
  begin: O,
@@ -24754,7 +24784,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24754
24784
  }
24755
24785
  });
24756
24786
  },
24757
- HASH_COMMENT_MODE: ne,
24787
+ HASH_COMMENT_MODE: re,
24758
24788
  IDENT_RE: T,
24759
24789
  MATCH_NOTHING_RE: w,
24760
24790
  METHOD_GUARD: {
@@ -24794,28 +24824,28 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24794
24824
  relevance: 0
24795
24825
  }
24796
24826
  });
24797
- function ie(e, t) {
24798
- e.input[e.index - 1] === "." && t.ignoreMatch();
24799
- }
24800
24827
  function ae(e, t) {
24801
- e.className !== void 0 && (e.scope = e.className, delete e.className);
24828
+ e.input[e.index - 1] === "." && t.ignoreMatch();
24802
24829
  }
24803
24830
  function oe(e, t) {
24804
- t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ie, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
24831
+ e.className !== void 0 && (e.scope = e.className, delete e.className);
24805
24832
  }
24806
24833
  function se(e, t) {
24807
- Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
24834
+ t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ae, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
24808
24835
  }
24809
24836
  function ce(e, t) {
24837
+ Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
24838
+ }
24839
+ function le(e, t) {
24810
24840
  if (e.match) {
24811
24841
  if (e.begin || e.end) throw Error("begin & end are not supported with match");
24812
24842
  e.begin = e.match, delete e.match;
24813
24843
  }
24814
24844
  }
24815
- function L(e, t) {
24845
+ function I(e, t) {
24816
24846
  e.relevance === void 0 && (e.relevance = 1);
24817
24847
  }
24818
- var R = (e, t) => {
24848
+ var L = (e, t) => {
24819
24849
  if (!e.beforeMatch) return;
24820
24850
  if (e.starts) throw Error("beforeMatch cannot be used with starts");
24821
24851
  let n = Object.assign({}, e);
@@ -24825,7 +24855,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24825
24855
  relevance: 0,
24826
24856
  contains: [Object.assign(n, { endsParent: !0 })]
24827
24857
  }, e.relevance = 0, delete n.beforeMatch;
24828
- }, le = [
24858
+ }, ue = [
24829
24859
  "of",
24830
24860
  "and",
24831
24861
  "for",
@@ -24837,24 +24867,24 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24837
24867
  "parent",
24838
24868
  "list",
24839
24869
  "value"
24840
- ], ue = "keyword";
24841
- function de(e, t, n = ue) {
24870
+ ], de = "keyword";
24871
+ function fe(e, t, n = de) {
24842
24872
  let r = Object.create(null);
24843
24873
  return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
24844
- Object.assign(r, de(e[n], t, n));
24874
+ Object.assign(r, fe(e[n], t, n));
24845
24875
  }), r;
24846
24876
  function i(e, n) {
24847
24877
  t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
24848
24878
  let n = t.split("|");
24849
- r[n[0]] = [e, fe(n[0], n[1])];
24879
+ r[n[0]] = [e, R(n[0], n[1])];
24850
24880
  });
24851
24881
  }
24852
24882
  }
24853
- function fe(e, t) {
24883
+ function R(e, t) {
24854
24884
  return t ? Number(t) : +!pe(e);
24855
24885
  }
24856
24886
  function pe(e) {
24857
- return le.includes(e.toLowerCase());
24887
+ return ue.includes(e.toLowerCase());
24858
24888
  }
24859
24889
  var me = {}, z = (e) => {
24860
24890
  console.error(e);
@@ -24952,17 +24982,17 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
24952
24982
  let a = n;
24953
24983
  if (n.isCompiled) return a;
24954
24984
  [
24955
- ae,
24956
- ce,
24985
+ oe,
24986
+ le,
24957
24987
  U,
24958
- R
24988
+ L
24959
24989
  ].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
24960
- oe,
24961
24990
  se,
24962
- L
24991
+ ce,
24992
+ I
24963
24993
  ].forEach((e) => e(n, r)), n.isCompiled = !0;
24964
24994
  let s = null;
24965
- return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= de(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
24995
+ return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= fe(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
24966
24996
  return xe(e === "self" ? n : e);
24967
24997
  })), n.contains.forEach(function(e) {
24968
24998
  o(e, a);
@@ -25018,9 +25048,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25018
25048
  code: r,
25019
25049
  language: i
25020
25050
  };
25021
- ne("before:highlight", a);
25051
+ re("before:highlight", a);
25022
25052
  let o = a.result ? a.result : v(a.language, a.code, n);
25023
- return o.code = a.code, ne("after:highlight", o), o;
25053
+ return o.code = a.code, re("after:highlight", o), o;
25024
25054
  }
25025
25055
  function v(e, n, i, a) {
25026
25056
  let c = Object.create(null);
@@ -25097,7 +25127,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25097
25127
  if (e.endsWithParent) return _(e.parent, t, n);
25098
25128
  }
25099
25129
  function y(e) {
25100
- return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (I = !0, 0);
25130
+ return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (F = !0, 0);
25101
25131
  }
25102
25132
  function b(e) {
25103
25133
  let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
@@ -25139,25 +25169,25 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25139
25169
  if (e !== Ee) return e;
25140
25170
  }
25141
25171
  if (r.type === "illegal" && a === "") return N += "\n", 1;
25142
- if (F > 1e5 && F > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
25172
+ if (P > 1e5 && P > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
25143
25173
  return N += a, a.length;
25144
25174
  }
25145
25175
  let D = ee(e);
25146
25176
  if (!D) throw z(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
25147
25177
  let O = ye(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
25148
25178
  w();
25149
- let N = "", te = 0, P = 0, F = 0, I = !1;
25179
+ let N = "", te = 0, ne = 0, P = 0, F = !1;
25150
25180
  try {
25151
25181
  if (D.__emitTokens) D.__emitTokens(n, M);
25152
25182
  else {
25153
25183
  for (A.matcher.considerAll();;) {
25154
- F++, I ? I = !1 : A.matcher.considerAll(), A.matcher.lastIndex = P;
25184
+ P++, F ? F = !1 : A.matcher.considerAll(), A.matcher.lastIndex = ne;
25155
25185
  let e = A.matcher.exec(n);
25156
25186
  if (!e) break;
25157
- let t = E(n.substring(P, e.index), e);
25158
- P = e.index + t;
25187
+ let t = E(n.substring(ne, e.index), e);
25188
+ ne = e.index + t;
25159
25189
  }
25160
- E(n.substring(P));
25190
+ E(n.substring(ne));
25161
25191
  }
25162
25192
  return M.finalize(), k = M.toHTML(), {
25163
25193
  language: e,
@@ -25175,8 +25205,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25175
25205
  relevance: 0,
25176
25206
  _illegalBy: {
25177
25207
  message: t.message,
25178
- index: P,
25179
- context: n.slice(P - 100, P + 100),
25208
+ index: ne,
25209
+ context: n.slice(ne - 100, ne + 100),
25180
25210
  mode: t.mode,
25181
25211
  resultSoFar: k
25182
25212
  },
@@ -25225,7 +25255,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25225
25255
  function w(e) {
25226
25256
  let t = null, n = d(e);
25227
25257
  if (u(n)) return;
25228
- if (ne("before:highlightElement", {
25258
+ if (re("before:highlightElement", {
25229
25259
  el: e,
25230
25260
  language: n
25231
25261
  }), e.dataset.highlighted) {
@@ -25245,7 +25275,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25245
25275
  }, i.secondBest && (e.secondBest = {
25246
25276
  language: i.secondBest.language,
25247
25277
  relevance: i.secondBest.relevance
25248
- }), ne("after:highlightElement", {
25278
+ }), re("after:highlightElement", {
25249
25279
  el: e,
25250
25280
  result: i,
25251
25281
  text: r
@@ -25301,27 +25331,27 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25301
25331
  let t = ee(e);
25302
25332
  return t && !t.disableAutodetect;
25303
25333
  }
25304
- function P(e) {
25334
+ function ne(e) {
25305
25335
  e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
25306
25336
  e["before:highlightBlock"](Object.assign({ block: t.el }, t));
25307
25337
  }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
25308
25338
  e["after:highlightBlock"](Object.assign({ block: t.el }, t));
25309
25339
  });
25310
25340
  }
25311
- function F(e) {
25312
- P(e), a.push(e);
25341
+ function P(e) {
25342
+ ne(e), a.push(e);
25313
25343
  }
25314
- function I(e) {
25344
+ function F(e) {
25315
25345
  let t = a.indexOf(e);
25316
25346
  t !== -1 && a.splice(t, 1);
25317
25347
  }
25318
- function ne(e, t) {
25348
+ function re(e, t) {
25319
25349
  let n = e;
25320
25350
  a.forEach(function(e) {
25321
25351
  e[n] && e[n](t);
25322
25352
  });
25323
25353
  }
25324
- function ie(e) {
25354
+ function ae(e) {
25325
25355
  return V("10.7.0", "highlightBlock will be removed entirely in v12.0"), V("10.7.0", "Please use highlightElement now."), w(e);
25326
25356
  }
25327
25357
  Object.assign(e, {
@@ -25329,7 +25359,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25329
25359
  highlightAuto: S,
25330
25360
  highlightAll: k,
25331
25361
  highlightElement: w,
25332
- highlightBlock: ie,
25362
+ highlightBlock: ae,
25333
25363
  configure: T,
25334
25364
  initHighlighting: E,
25335
25365
  initHighlightingOnLoad: D,
@@ -25340,8 +25370,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25340
25370
  registerAliases: N,
25341
25371
  autoDetection: te,
25342
25372
  inherit: Te,
25343
- addPlugin: F,
25344
- removePlugin: I
25373
+ addPlugin: P,
25374
+ removePlugin: F
25345
25375
  }), e.debugMode = function() {
25346
25376
  o = !1;
25347
25377
  }, e.safeMode = function() {
@@ -25353,8 +25383,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
25353
25383
  optional: g,
25354
25384
  anyNumberOfTimes: h
25355
25385
  };
25356
- for (let e in re) typeof re[e] == "object" && n(re[e]);
25357
- return Object.assign(e, re), e;
25386
+ for (let e in ie) typeof ie[e] == "object" && n(ie[e]);
25387
+ return Object.assign(e, ie), e;
25358
25388
  }, ke = Oe({});
25359
25389
  ke.newInstance = () => Oe({}), t.exports = ke, ke.HighlightJS = ke, ke.default = ke;
25360
25390
  })), QM = /* @__PURE__ */ h(((e, t) => {
@@ -27680,7 +27710,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27680
27710
  function te(e) {
27681
27711
  return t.concat("(?!", e.join("|"), ")");
27682
27712
  }
27683
- let P = {
27713
+ let ne = {
27684
27714
  match: t.concat(/\b/, te([
27685
27715
  ...s,
27686
27716
  "super",
@@ -27688,14 +27718,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27688
27718
  ].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
27689
27719
  className: "title.function",
27690
27720
  relevance: 0
27691
- }, F = {
27721
+ }, P = {
27692
27722
  begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
27693
27723
  end: d,
27694
27724
  excludeBegin: !0,
27695
27725
  keywords: "prototype",
27696
27726
  className: "property",
27697
27727
  relevance: 0
27698
- }, I = {
27728
+ }, F = {
27699
27729
  match: [
27700
27730
  /get|set/,
27701
27731
  /\s+/,
@@ -27707,7 +27737,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27707
27737
  3: "title.function"
27708
27738
  },
27709
27739
  contains: [{ begin: /\(\)/ }, k]
27710
- }, ne = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", re = {
27740
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
27711
27741
  match: [
27712
27742
  /const|var|let/,
27713
27743
  /\s+/,
@@ -27715,7 +27745,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27715
27745
  /\s*/,
27716
27746
  /=\s*/,
27717
27747
  /(async\s*)?/,
27718
- t.lookahead(ne)
27748
+ t.lookahead(re)
27719
27749
  ],
27720
27750
  keywords: "async",
27721
27751
  className: {
@@ -27760,7 +27790,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27760
27790
  match: d + t.lookahead(":"),
27761
27791
  relevance: 0
27762
27792
  },
27763
- re,
27793
+ ie,
27764
27794
  {
27765
27795
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
27766
27796
  keywords: "return throw case",
@@ -27770,7 +27800,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27770
27800
  e.REGEXP_MODE,
27771
27801
  {
27772
27802
  className: "function",
27773
- begin: ne,
27803
+ begin: re,
27774
27804
  returnBegin: !0,
27775
27805
  end: "\\s*=>",
27776
27806
  contains: [{
@@ -27842,7 +27872,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27842
27872
  match: /\.\.\./,
27843
27873
  relevance: 0
27844
27874
  },
27845
- F,
27875
+ P,
27846
27876
  {
27847
27877
  match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
27848
27878
  relevance: 0
@@ -27852,10 +27882,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
27852
27882
  className: { 1: "title.function" },
27853
27883
  contains: [k]
27854
27884
  },
27855
- P,
27885
+ ne,
27856
27886
  N,
27857
27887
  A,
27858
- I,
27888
+ F,
27859
27889
  { match: /\$[(.]/ }
27860
27890
  ]
27861
27891
  };
@@ -30121,68 +30151,68 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30121
30151
  }, te = (e = "") => ({
30122
30152
  className: "subst",
30123
30153
  variants: [{ match: i(/\\/, e, /[0\\tnr"']/) }, { match: i(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
30124
- }), P = (e = "") => ({
30154
+ }), ne = (e = "") => ({
30125
30155
  className: "subst",
30126
30156
  match: i(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
30127
- }), F = (e = "") => ({
30157
+ }), P = (e = "") => ({
30128
30158
  className: "subst",
30129
30159
  label: "interpol",
30130
30160
  begin: i(/\\/, e, /\(/),
30131
30161
  end: /\)/
30132
- }), I = (e = "") => ({
30162
+ }), F = (e = "") => ({
30133
30163
  begin: i(e, /"""/),
30134
30164
  end: i(/"""/, e),
30135
30165
  contains: [
30136
30166
  te(e),
30137
- P(e),
30138
- F(e)
30167
+ ne(e),
30168
+ P(e)
30139
30169
  ]
30140
- }), ne = (e = "") => ({
30170
+ }), re = (e = "") => ({
30141
30171
  begin: i(e, /"/),
30142
30172
  end: i(/"/, e),
30143
- contains: [te(e), F(e)]
30144
- }), re = {
30173
+ contains: [te(e), P(e)]
30174
+ }), ie = {
30145
30175
  className: "string",
30146
30176
  variants: [
30147
- I(),
30148
- I("#"),
30149
- I("##"),
30150
- I("###"),
30151
- ne(),
30152
- ne("#"),
30153
- ne("##"),
30154
- ne("###")
30177
+ F(),
30178
+ F("#"),
30179
+ F("##"),
30180
+ F("###"),
30181
+ re(),
30182
+ re("#"),
30183
+ re("##"),
30184
+ re("###")
30155
30185
  ]
30156
- }, ie = [e.BACKSLASH_ESCAPE, {
30186
+ }, ae = [e.BACKSLASH_ESCAPE, {
30157
30187
  begin: /\[/,
30158
30188
  end: /\]/,
30159
30189
  relevance: 0,
30160
30190
  contains: [e.BACKSLASH_ESCAPE]
30161
- }], ae = {
30191
+ }], oe = {
30162
30192
  begin: /\/[^\s](?=[^/\n]*\/)/,
30163
30193
  end: /\//,
30164
- contains: ie
30165
- }, oe = (e) => {
30194
+ contains: ae
30195
+ }, se = (e) => {
30166
30196
  let t = i(e, /\//), n = i(/\//, e);
30167
30197
  return {
30168
30198
  begin: t,
30169
30199
  end: n,
30170
- contains: [...ie, {
30200
+ contains: [...ae, {
30171
30201
  scope: "comment",
30172
30202
  begin: `#(?!.*${n})`,
30173
30203
  end: /$/
30174
30204
  }]
30175
30205
  };
30176
- }, se = {
30206
+ }, ce = {
30177
30207
  scope: "regexp",
30178
30208
  variants: [
30179
- oe("###"),
30180
- oe("##"),
30181
- oe("#"),
30182
- ae
30209
+ se("###"),
30210
+ se("##"),
30211
+ se("#"),
30212
+ oe
30183
30213
  ]
30184
- }, ce = { match: i(/`/, x, /`/) }, L = [
30185
- ce,
30214
+ }, le = { match: i(/`/, x, /`/) }, I = [
30215
+ le,
30186
30216
  {
30187
30217
  className: "variable",
30188
30218
  match: /\$\d+/
@@ -30191,7 +30221,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30191
30221
  className: "variable",
30192
30222
  match: `\\$${b}+`
30193
30223
  }
30194
- ], R = [
30224
+ ], L = [
30195
30225
  {
30196
30226
  match: /(@|#(un)?)available/,
30197
30227
  scope: "keyword",
@@ -30202,7 +30232,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30202
30232
  contains: [
30203
30233
  ...j,
30204
30234
  N,
30205
- re
30235
+ ie
30206
30236
  ]
30207
30237
  }] }
30208
30238
  },
@@ -30214,7 +30244,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30214
30244
  scope: "meta",
30215
30245
  match: i(/@/, x)
30216
30246
  }
30217
- ], le = {
30247
+ ], ue = {
30218
30248
  match: r(/\b[A-Z]/),
30219
30249
  relevance: 0,
30220
30250
  contains: [
@@ -30240,20 +30270,20 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30240
30270
  relevance: 0
30241
30271
  }
30242
30272
  ]
30243
- }, ue = {
30273
+ }, de = {
30244
30274
  begin: /</,
30245
30275
  end: />/,
30246
30276
  keywords: D,
30247
30277
  contains: [
30248
30278
  ...a,
30249
30279
  ...O,
30250
- ...R,
30280
+ ...L,
30251
30281
  A,
30252
- le
30282
+ ue
30253
30283
  ]
30254
30284
  };
30255
- le.contains.push(ue);
30256
- let de = {
30285
+ ue.contains.push(de);
30286
+ let fe = {
30257
30287
  begin: /\(/,
30258
30288
  end: /\)/,
30259
30289
  relevance: 0,
@@ -30266,21 +30296,21 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30266
30296
  relevance: 0
30267
30297
  },
30268
30298
  ...a,
30269
- se,
30299
+ ce,
30270
30300
  ...O,
30271
30301
  ...k,
30272
30302
  ...j,
30273
30303
  N,
30274
- re,
30304
+ ie,
30305
+ ...I,
30275
30306
  ...L,
30276
- ...R,
30277
- le
30307
+ ue
30278
30308
  ]
30279
- }, fe = {
30309
+ }, R = {
30280
30310
  begin: /</,
30281
30311
  end: />/,
30282
30312
  keywords: "repeat each",
30283
- contains: [...a, le]
30313
+ contains: [...a, ue]
30284
30314
  }, pe = {
30285
30315
  begin: /\(/,
30286
30316
  end: /\)/,
@@ -30302,10 +30332,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30302
30332
  ...O,
30303
30333
  ...j,
30304
30334
  N,
30305
- re,
30306
- ...R,
30307
- le,
30308
- de
30335
+ ie,
30336
+ ...L,
30337
+ ue,
30338
+ fe
30309
30339
  ],
30310
30340
  endsParent: !0,
30311
30341
  illegal: /["']/
@@ -30313,14 +30343,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30313
30343
  match: [
30314
30344
  /(func|macro)/,
30315
30345
  /\s+/,
30316
- o(ce.match, x, v)
30346
+ o(le.match, x, v)
30317
30347
  ],
30318
30348
  className: {
30319
30349
  1: "keyword",
30320
30350
  3: "title.function"
30321
30351
  },
30322
30352
  contains: [
30323
- fe,
30353
+ R,
30324
30354
  pe,
30325
30355
  t
30326
30356
  ],
@@ -30329,7 +30359,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30329
30359
  match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
30330
30360
  className: { 1: "keyword" },
30331
30361
  contains: [
30332
- fe,
30362
+ R,
30333
30363
  pe,
30334
30364
  t
30335
30365
  ],
@@ -30354,7 +30384,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30354
30384
  1: "keyword",
30355
30385
  3: "title"
30356
30386
  },
30357
- contains: [le],
30387
+ contains: [ue],
30358
30388
  keywords: [...p, ...f],
30359
30389
  end: /}/
30360
30390
  }, he = {
@@ -30393,7 +30423,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30393
30423
  },
30394
30424
  keywords: D,
30395
30425
  contains: [
30396
- fe,
30426
+ R,
30397
30427
  ...O,
30398
30428
  {
30399
30429
  begin: /:/,
@@ -30407,7 +30437,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30407
30437
  }
30408
30438
  ]
30409
30439
  };
30410
- for (let e of re.variants) {
30440
+ for (let e of ie.variants) {
30411
30441
  let t = e.contains.find((e) => e.label === "interpol");
30412
30442
  t.keywords = D;
30413
30443
  let n = [
@@ -30415,8 +30445,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30415
30445
  ...k,
30416
30446
  ...j,
30417
30447
  N,
30418
- re,
30419
- ...L
30448
+ ie,
30449
+ ...I
30420
30450
  ];
30421
30451
  t.contains = [...n, {
30422
30452
  begin: /\(/,
@@ -30442,16 +30472,16 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30442
30472
  contains: [...a],
30443
30473
  relevance: 0
30444
30474
  },
30445
- se,
30475
+ ce,
30446
30476
  ...O,
30447
30477
  ...k,
30448
30478
  ...j,
30449
30479
  N,
30450
- re,
30480
+ ie,
30481
+ ...I,
30451
30482
  ...L,
30452
- ...R,
30453
- le,
30454
- de
30483
+ ue,
30484
+ fe
30455
30485
  ]
30456
30486
  };
30457
30487
  }
@@ -30853,7 +30883,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30853
30883
  function te(e) {
30854
30884
  return t.concat("(?!", e.join("|"), ")");
30855
30885
  }
30856
- let P = {
30886
+ let ne = {
30857
30887
  match: t.concat(/\b/, te([
30858
30888
  ...s,
30859
30889
  "super",
@@ -30861,14 +30891,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30861
30891
  ].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
30862
30892
  className: "title.function",
30863
30893
  relevance: 0
30864
- }, F = {
30894
+ }, P = {
30865
30895
  begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
30866
30896
  end: d,
30867
30897
  excludeBegin: !0,
30868
30898
  keywords: "prototype",
30869
30899
  className: "property",
30870
30900
  relevance: 0
30871
- }, I = {
30901
+ }, F = {
30872
30902
  match: [
30873
30903
  /get|set/,
30874
30904
  /\s+/,
@@ -30880,7 +30910,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30880
30910
  3: "title.function"
30881
30911
  },
30882
30912
  contains: [{ begin: /\(\)/ }, k]
30883
- }, ne = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", re = {
30913
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
30884
30914
  match: [
30885
30915
  /const|var|let/,
30886
30916
  /\s+/,
@@ -30888,7 +30918,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30888
30918
  /\s*/,
30889
30919
  /=\s*/,
30890
30920
  /(async\s*)?/,
30891
- t.lookahead(ne)
30921
+ t.lookahead(re)
30892
30922
  ],
30893
30923
  keywords: "async",
30894
30924
  className: {
@@ -30933,7 +30963,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30933
30963
  match: d + t.lookahead(":"),
30934
30964
  relevance: 0
30935
30965
  },
30936
- re,
30966
+ ie,
30937
30967
  {
30938
30968
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
30939
30969
  keywords: "return throw case",
@@ -30943,7 +30973,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
30943
30973
  e.REGEXP_MODE,
30944
30974
  {
30945
30975
  className: "function",
30946
- begin: ne,
30976
+ begin: re,
30947
30977
  returnBegin: !0,
30948
30978
  end: "\\s*=>",
30949
30979
  contains: [{
@@ -31015,7 +31045,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
31015
31045
  match: /\.\.\./,
31016
31046
  relevance: 0
31017
31047
  },
31018
- F,
31048
+ P,
31019
31049
  {
31020
31050
  match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
31021
31051
  relevance: 0
@@ -31025,10 +31055,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
31025
31055
  className: { 1: "title.function" },
31026
31056
  contains: [k]
31027
31057
  },
31028
- P,
31058
+ ne,
31029
31059
  N,
31030
31060
  A,
31031
- I,
31061
+ F,
31032
31062
  { match: /\$[(.]/ }
31033
31063
  ]
31034
31064
  };
@@ -32016,13 +32046,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32016
32046
  e.target instanceof Element && (ee = e.target, N && clearTimeout(N), N = setTimeout(() => {
32017
32047
  ee = null;
32018
32048
  }, 2e3));
32019
- }, P = () => {
32049
+ }, ne = () => {
32020
32050
  ee = null;
32021
32051
  };
32022
32052
  return fa(() => {
32023
- t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend", P, !0));
32053
+ t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend", ne, !0));
32024
32054
  }), ha(() => {
32025
- window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend", P, !0), N && clearTimeout(N);
32055
+ window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend", ne, !0), N && clearTimeout(N);
32026
32056
  }), (t, n) => (Y(), X("div", OF, [K(o) ? (Y(), X("button", {
32027
32057
  key: 0,
32028
32058
  class: "undo-foot-btn",
@@ -32565,7 +32595,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32565
32595
  function te(e) {
32566
32596
  return e.kind === "pre" ? y.value.debugFlowPrep : e.kind === "wrap_up" ? y.value.debugLogsWrapUp : `${y.value.debugRoundPrefix}${e.round}${y.value.debugRoundSuffix}`;
32567
32597
  }
32568
- function P(e, t, n) {
32598
+ function ne(e, t, n) {
32569
32599
  let r = e.data?.messages ?? [];
32570
32600
  return n && t != null && t > 0 && t < r.length ? {
32571
32601
  list: r.slice(t),
@@ -32575,25 +32605,25 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32575
32605
  base: 0
32576
32606
  };
32577
32607
  }
32578
- function F(e) {
32608
+ function P(e) {
32579
32609
  return new Date(e).toLocaleTimeString(n.locale, { hour12: !1 }) + "." + String(e % 1e3).padStart(3, "0");
32580
32610
  }
32581
- function I(e) {
32611
+ function F(e) {
32582
32612
  let t = new Set(a.value);
32583
32613
  t.has(e) ? t.delete(e) : t.add(e), a.value = t;
32584
32614
  }
32585
- function ne(e) {
32615
+ function re(e) {
32586
32616
  let t = new Set(d.value);
32587
32617
  t.has(e) ? t.delete(e) : t.add(e), d.value = t;
32588
32618
  }
32589
- function re(e) {
32619
+ function ie(e) {
32590
32620
  try {
32591
32621
  return JSON.stringify(e, null, 2);
32592
32622
  } catch {
32593
32623
  return String(e);
32594
32624
  }
32595
32625
  }
32596
- let ie = {
32626
+ let ae = {
32597
32627
  system: {
32598
32628
  label: "SYSTEM",
32599
32629
  color: "#6b7280"
@@ -32619,27 +32649,27 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32619
32649
  color: "#2563eb"
32620
32650
  }
32621
32651
  };
32622
- function ae(e) {
32623
- return ie[e] || {
32652
+ function oe(e) {
32653
+ return ae[e] || {
32624
32654
  label: (e || "?").toUpperCase(),
32625
32655
  color: "#9ca3af"
32626
32656
  };
32627
32657
  }
32628
- function oe() {
32658
+ function se() {
32629
32659
  r("update:visible", !1);
32630
32660
  }
32631
- function se() {
32661
+ function ce() {
32632
32662
  a.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Set(), j.value = /* @__PURE__ */ new Set(), r("clear");
32633
32663
  }
32634
- let ce = /* @__PURE__ */ Rn("logs"), L = /* @__PURE__ */ Rn(null), R = /* @__PURE__ */ Rn({});
32635
- async function le(e) {
32636
- if (R.value[e]) {
32637
- delete R.value[e], R.value = { ...R.value };
32664
+ let le = /* @__PURE__ */ Rn("logs"), I = /* @__PURE__ */ Rn(null), L = /* @__PURE__ */ Rn({});
32665
+ async function ue(e) {
32666
+ if (L.value[e]) {
32667
+ delete L.value[e], L.value = { ...L.value };
32638
32668
  return;
32639
32669
  }
32640
32670
  if (!n.getSkillContent) {
32641
- R.value = {
32642
- ...R.value,
32671
+ L.value = {
32672
+ ...L.value,
32643
32673
  [e]: {
32644
32674
  loading: !1,
32645
32675
  content: null,
@@ -32648,8 +32678,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32648
32678
  };
32649
32679
  return;
32650
32680
  }
32651
- R.value = {
32652
- ...R.value,
32681
+ L.value = {
32682
+ ...L.value,
32653
32683
  [e]: {
32654
32684
  loading: !0,
32655
32685
  content: null
@@ -32657,8 +32687,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32657
32687
  };
32658
32688
  try {
32659
32689
  let t = await n.getSkillContent(e);
32660
- R.value = {
32661
- ...R.value,
32690
+ L.value = {
32691
+ ...L.value,
32662
32692
  [e]: {
32663
32693
  loading: !1,
32664
32694
  content: t,
@@ -32666,8 +32696,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32666
32696
  }
32667
32697
  };
32668
32698
  } catch (t) {
32669
- R.value = {
32670
- ...R.value,
32699
+ L.value = {
32700
+ ...L.value,
32671
32701
  [e]: {
32672
32702
  loading: !1,
32673
32703
  content: null,
@@ -32676,20 +32706,20 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32676
32706
  };
32677
32707
  }
32678
32708
  }
32679
- function ue() {
32709
+ function de() {
32680
32710
  if (n.getInfo) try {
32681
- L.value = n.getInfo();
32711
+ I.value = n.getInfo();
32682
32712
  } catch {
32683
- L.value = null;
32713
+ I.value = null;
32684
32714
  }
32685
32715
  }
32686
- function de(e) {
32687
- ce.value = e, (e === "subagent" || e === "info" || e === "context") && ue();
32716
+ function fe(e) {
32717
+ le.value = e, (e === "subagent" || e === "info" || e === "context") && de();
32688
32718
  }
32689
32719
  _i(() => n.infoTick?.value, () => {
32690
- n.visible && (ce.value === "subagent" || ce.value === "info" || ce.value === "context") && ue();
32720
+ n.visible && (le.value === "subagent" || le.value === "info" || le.value === "context") && de();
32691
32721
  });
32692
- let fe = pc(() => ({
32722
+ let R = pc(() => ({
32693
32723
  pending: {
32694
32724
  label: y.value.debugTodoPending,
32695
32725
  color: "#9ca3af"
@@ -32704,7 +32734,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32704
32734
  }
32705
32735
  }));
32706
32736
  function pe(e) {
32707
- return fe.value[e]?.label ?? e;
32737
+ return R.value[e]?.label ?? e;
32708
32738
  }
32709
32739
  function me(e) {
32710
32740
  return e ? e === "builtin" ? "builtin" : e.startsWith("mcp:") ? "mcp" : "user" : "";
@@ -32719,10 +32749,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32719
32749
  }
32720
32750
  return `${e}ms`;
32721
32751
  }
32722
- let V = pc(() => L.value?.context), he = pc(() => {
32752
+ let V = pc(() => I.value?.context), he = pc(() => {
32723
32753
  let e = V.value;
32724
32754
  return e ? e.occupancy >= 1 ? "red" : e.thresholdRatio > 0 && e.occupancy >= e.thresholdRatio ? "yellow" : "green" : "";
32725
- }), ge = pc(() => L.value?.subagent?.active ?? []), H = pc(() => L.value?.subagent?.history ?? []), _e = pc(() => Object.entries(L.value?.subagent?.lockedComponents ?? {})), ve = pc(() => ({
32755
+ }), ge = pc(() => I.value?.subagent?.active ?? []), H = pc(() => I.value?.subagent?.history ?? []), _e = pc(() => Object.entries(I.value?.subagent?.lockedComponents ?? {})), ve = pc(() => ({
32726
32756
  running: {
32727
32757
  label: y.value.debugSubRunning,
32728
32758
  color: "#059669"
@@ -32747,23 +32777,23 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32747
32777
  default: li(() => [e.visible ? (Y(), X("div", iI, [Z("div", { class: Ke(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
32748
32778
  Z("div", aI, [Z("div", oI, [
32749
32779
  Z("button", {
32750
- class: Ke(["tab-btn", { active: ce.value === "logs" }]),
32751
- onClick: n[0] ||= (e) => de("logs")
32780
+ class: Ke(["tab-btn", { active: le.value === "logs" }]),
32781
+ onClick: n[0] ||= (e) => fe("logs")
32752
32782
  }, "🐛 " + W(y.value.debugTabLogs), 3),
32753
32783
  e.getInfo ? (Y(), X("button", {
32754
32784
  key: 0,
32755
- class: Ke(["tab-btn", { active: ce.value === "context" }]),
32756
- onClick: n[1] ||= (e) => de("context")
32785
+ class: Ke(["tab-btn", { active: le.value === "context" }]),
32786
+ onClick: n[1] ||= (e) => fe("context")
32757
32787
  }, "📊 " + W(y.value.debugTabContext), 3)) : Q("", !0),
32758
32788
  e.getInfo ? (Y(), X("button", {
32759
32789
  key: 1,
32760
- class: Ke(["tab-btn", { active: ce.value === "subagent" }]),
32761
- onClick: n[2] ||= (e) => de("subagent")
32790
+ class: Ke(["tab-btn", { active: le.value === "subagent" }]),
32791
+ onClick: n[2] ||= (e) => fe("subagent")
32762
32792
  }, "🤖 " + W(y.value.debugTabSubagent), 3)) : Q("", !0),
32763
32793
  e.getInfo ? (Y(), X("button", {
32764
32794
  key: 2,
32765
- class: Ke(["tab-btn", { active: ce.value === "info" }]),
32766
- onClick: n[3] ||= (e) => de("info")
32795
+ class: Ke(["tab-btn", { active: le.value === "info" }]),
32796
+ onClick: n[3] ||= (e) => fe("info")
32767
32797
  }, "🧬 " + W(y.value.debugTabInfo), 3)) : Q("", !0)
32768
32798
  ]), Z("div", sI, [
32769
32799
  Z("button", {
@@ -32771,19 +32801,19 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32771
32801
  title: y.value.debugCopyReport,
32772
32802
  onClick: v
32773
32803
  }, W(g.value === "report" ? "✓" : "💾"), 9, cI),
32774
- ce.value === "logs" ? (Y(), X("button", {
32804
+ le.value === "logs" ? (Y(), X("button", {
32775
32805
  key: 0,
32776
32806
  class: "hd-btn",
32777
32807
  title: y.value.debugClearLogs,
32778
- onClick: se
32808
+ onClick: ce
32779
32809
  }, "🗑️", 8, lI)) : Q("", !0),
32780
32810
  Z("button", {
32781
32811
  class: "hd-btn",
32782
32812
  title: y.value.close,
32783
- onClick: oe
32813
+ onClick: se
32784
32814
  }, "✕", 8, uI)
32785
32815
  ])]),
32786
- ce.value === "logs" ? (Y(), X("div", dI, [(Y(!0), X(J, null, Sa(b.value, (e, t) => (Y(), X("button", {
32816
+ le.value === "logs" ? (Y(), X("div", dI, [(Y(!0), X(J, null, Sa(b.value, (e, t) => (Y(), X("button", {
32787
32817
  key: t,
32788
32818
  class: Ke(["filter-chip", { active: i.value === t }]),
32789
32819
  style: Ve({ "--chip-color": e.color }),
@@ -32805,7 +32835,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32805
32835
  ref_key: "drawerContentsEl",
32806
32836
  ref: c
32807
32837
  }, [
32808
- ce.value === "context" ? (Y(), X("div", hI, [V.value ? (Y(), X(J, { key: 1 }, [V.value ? (Y(), X(J, { key: 0 }, [
32838
+ le.value === "context" ? (Y(), X("div", hI, [V.value ? (Y(), X(J, { key: 1 }, [V.value ? (Y(), X(J, { key: 0 }, [
32809
32839
  Z("div", _I, [Z("div", vI, [Z("div", {
32810
32840
  class: "ctx-bar-track",
32811
32841
  title: `${y.value.debugCtxOccupancy} ${Math.round(V.value.occupancy * 100)}%`
@@ -32844,7 +32874,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32844
32874
  V.value.compression.decision ? (Y(), X("span", II, "🤖 " + W(y.value.debugCtxAgentDecision) + W(be(V.value.compression.decision)), 1)) : Q("", !0)
32845
32875
  ])])) : Q("", !0)
32846
32876
  ], 64)) : Q("", !0)], 64)) : (Y(), X("div", gI, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
32847
- ce.value === "subagent" ? (Y(), X("div", LI, [_e.value.length ? (Y(), X("div", RI, [Z("div", zI, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(_e.value.length) + ")", 1), (Y(!0), X(J, null, Sa(_e.value, ([e, t]) => (Y(), X("div", {
32877
+ le.value === "subagent" ? (Y(), X("div", LI, [_e.value.length ? (Y(), X("div", RI, [Z("div", zI, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(_e.value.length) + ")", 1), (Y(!0), X(J, null, Sa(_e.value, ([e, t]) => (Y(), X("div", {
32848
32878
  key: "lock-" + e,
32849
32879
  class: "sub-task"
32850
32880
  }, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !ge.value.length && !H.value.length ? (Y(), X("div", BI, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [ge.value.length ? (Y(), X("div", VI, [Z("div", HI, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(ge.value.length) + ")", 1), (Y(!0), X(J, null, Sa(ge.value, (e, t) => (Y(), X("div", {
@@ -32882,10 +32912,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32882
32912
  }, [
32883
32913
  Z("span", nL, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
32884
32914
  Z("span", rL, W(e.name), 1),
32885
- Z("span", iL, W(F(e.ts)), 1)
32915
+ Z("span", iL, W(P(e.ts)), 1)
32886
32916
  ]))), 128))])) : Q("", !0)
32887
32917
  ], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
32888
- ce.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", aL, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, Sa(k.value, (e) => (Y(), X("div", {
32918
+ le.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", aL, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, Sa(k.value, (e) => (Y(), X("div", {
32889
32919
  key: e.key,
32890
32920
  class: "log-group"
32891
32921
  }, [Z("div", {
@@ -32895,8 +32925,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32895
32925
  Z("span", { class: Ke(["log-group-arrow", { open: ee(e.key) }]) }, "▶", 2),
32896
32926
  Z("span", sL, W(te(e)), 1),
32897
32927
  Z("span", cL, [
32898
- Ms(W(F(e.firstTs)), 1),
32899
- e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(F(e.lastTs)), 1)], 64)) : Q("", !0),
32928
+ Ms(W(P(e.firstTs)), 1),
32929
+ e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(P(e.lastTs)), 1)], 64)) : Q("", !0),
32900
32930
  Ms(" · " + W(B(e.lastTs - e.firstTs)), 1)
32901
32931
  ]),
32902
32932
  e.toolCount ? (Y(), X("span", lL, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
@@ -32912,7 +32942,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32912
32942
  style: Ve({ background: b.value[e.type].color })
32913
32943
  }, W(b.value[e.type].icon) + " " + W(b.value[e.type].label), 5),
32914
32944
  e.source ? (Y(), X("span", mL, "↳ " + W(e.source), 1)) : Q("", !0),
32915
- Z("span", hL, W(F(e.timestamp)), 1)
32945
+ Z("span", hL, W(P(e.timestamp)), 1)
32916
32946
  ]),
32917
32947
  Z("div", gL, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
32918
32948
  Z("div", _L, [
@@ -32932,8 +32962,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32932
32962
  class: "msg-row"
32933
32963
  }, [Z("span", {
32934
32964
  class: "msg-role",
32935
- style: Ve({ background: ae(e.type).color })
32936
- }, W(ae(e.type).label), 5), Z("span", NL, W(e.content), 1)]))), 128))])
32965
+ style: Ve({ background: oe(e.type).color })
32966
+ }, W(oe(e.type).label), 5), Z("span", NL, W(e.content), 1)]))), 128))])
32937
32967
  ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", PL, [
32938
32968
  Z("span", FL, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
32939
32969
  e.data.model ? (Y(), X("span", IL, W(e.data.model), 1)) : Q("", !0),
@@ -32947,13 +32977,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32947
32977
  Z("button", {
32948
32978
  class: "view-toggle copy-btn",
32949
32979
  title: y.value.copy,
32950
- onClick: (t) => _(re(e.data.messages), "req" + i)
32980
+ onClick: (t) => _(ie(e.data.messages), "req" + i)
32951
32981
  }, W(g.value === "req" + i ? "✓" : "📋"), 9, BL),
32952
32982
  Z("button", {
32953
32983
  class: "view-toggle",
32954
- onClick: (e) => ne(i)
32984
+ onClick: (e) => re(i)
32955
32985
  }, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, VL)
32956
- ]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(re(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, Sa([P(e, r, m.value.has(i))], (e) => (Y(), X("div", {
32986
+ ]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(ie(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, Sa([ne(e, r, m.value.has(i))], (e) => (Y(), X("div", {
32957
32987
  key: e.base,
32958
32988
  class: "msg-list"
32959
32989
  }, [(Y(!0), X(J, null, Sa(e.list, (t, n) => (Y(), X("div", {
@@ -32963,8 +32993,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32963
32993
  onClick: (r) => String(t.content ?? "").length > fB && p(i + ":" + (e.base + n))
32964
32994
  }, [Z("span", {
32965
32995
  class: "msg-role",
32966
- style: Ve({ background: ae(t.role).color })
32967
- }, W(ae(t.role).label), 5), Z("div", UL, [
32996
+ style: Ve({ background: oe(t.role).color })
32997
+ }, W(oe(t.role).label), 5), Z("div", UL, [
32968
32998
  t.content ? (Y(), X("span", WL, W(t.content), 1)) : Q("", !0),
32969
32999
  (Y(!0), X(J, null, Sa(t.tool_calls || [], (e, t) => (Y(), X("div", {
32970
33000
  key: t,
@@ -32977,7 +33007,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32977
33007
  e.data.toolCalls?.length ? (Y(), X("div", $L, [(Y(!0), X(J, null, Sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
32978
33008
  key: t,
32979
33009
  class: "tc-card"
32980
- }, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(re(e.args)), 1)]))), 128))])) : Q("", !0),
33010
+ }, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(ie(e.args)), 1)]))), 128))])) : Q("", !0),
32981
33011
  e.data.usage ? (Y(), X("div", nR, [
32982
33012
  Z("span", rR, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
32983
33013
  Z("span", iR, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
@@ -32997,90 +33027,90 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
32997
33027
  onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
32998
33028
  }, W(g.value === "res" + i ? "✓" : "📋"), 9, lR)
32999
33029
  ]),
33000
- Z("pre", uR, W(re(t.data.args)), 1),
33030
+ Z("pre", uR, W(ie(t.data.args)), 1),
33001
33031
  Z("div", dR, "↓ " + W(y.value.resultLabel), 1),
33002
33032
  Z("pre", fR, W(e.data.result), 1)
33003
- ], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ? re(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", _R, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
33033
+ ], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ? ie(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", _R, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
33004
33034
  Z("div", vR, [Z("button", {
33005
33035
  class: "raw-toggle",
33006
- onClick: (e) => I(i)
33036
+ onClick: (e) => F(i)
33007
33037
  }, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, yR), Z("button", {
33008
33038
  class: "raw-toggle",
33009
- onClick: (t) => K(XD)(re(e.data))
33039
+ onClick: (t) => K(XD)(ie(e.data))
33010
33040
  }, W(y.value.copy), 9, bR)]),
33011
- a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(re(e.data)), 1)])) : Q("", !0)
33012
- ]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) : ce.value === "info" ? (Y(), X("div", SR, [L.value ? (Y(), X(J, { key: 1 }, [
33041
+ a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(ie(e.data)), 1)])) : Q("", !0)
33042
+ ]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) : le.value === "info" ? (Y(), X("div", SR, [I.value ? (Y(), X(J, { key: 1 }, [
33013
33043
  Z("div", wR, [
33014
33044
  Z("div", TR, W(y.value.debugInfoBasic), 1),
33015
33045
  Z("div", ER, [
33016
- Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(L.value.id), 1)]),
33017
- Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(L.value.model || "-"), 1)]),
33018
- Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(L.value.tools.length), 1)]),
33019
- Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(L.value.middleware.length), 1)])
33046
+ Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(I.value.id), 1)]),
33047
+ Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(I.value.model || "-"), 1)]),
33048
+ Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(I.value.tools.length), 1)]),
33049
+ Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(I.value.middleware.length), 1)])
33020
33050
  ]),
33021
- Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(L.value.middleware.join(" → ") || "-"), 1)])
33051
+ Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(I.value.middleware.join(" → ") || "-"), 1)])
33022
33052
  ]),
33023
- Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(L.value.tools.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.tools, (e) => (Y(), X("div", {
33053
+ Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(I.value.tools.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.tools, (e) => (Y(), X("div", {
33024
33054
  key: e.name,
33025
33055
  class: "info-item"
33026
33056
  }, [Z("div", UR, [Ms(W(e.name), 1), e.source ? (Y(), X("span", {
33027
33057
  key: 0,
33028
33058
  class: Ke(["src-tag", me(e.source)])
33029
33059
  }, W(e.source), 3)) : Q("", !0)]), Z("div", WR, W(e.description), 1)]))), 128))]),
33030
- L.value.skills.length ? (Y(), X("div", GR, [Z("div", KR, [Ms("📘 " + W(y.value.debugSkillsTitle) + " (" + W(L.value.skills.length) + ")", 1), Z("span", qR, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, Sa(L.value.skills, (e) => (Y(), X("div", {
33060
+ I.value.skills.length ? (Y(), X("div", GR, [Z("div", KR, [Ms("📘 " + W(y.value.debugSkillsTitle) + " (" + W(I.value.skills.length) + ")", 1), Z("span", qR, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, Sa(I.value.skills, (e) => (Y(), X("div", {
33031
33061
  key: e.name,
33032
33062
  class: "info-item"
33033
33063
  }, [
33034
33064
  Z("div", {
33035
33065
  class: "info-name skill-toggle",
33036
- onClick: (t) => le(e.name)
33037
- }, [Z("span", { class: Ke(["skill-arrow", { open: !!R.value[e.name] }]) }, "▶", 2), Ms(" " + W(e.name), 1)], 8, JR),
33066
+ onClick: (t) => ue(e.name)
33067
+ }, [Z("span", { class: Ke(["skill-arrow", { open: !!L.value[e.name] }]) }, "▶", 2), Ms(" " + W(e.name), 1)], 8, JR),
33038
33068
  Z("div", YR, W(e.description), 1),
33039
- R.value[e.name] ? (Y(), X("div", XR, [R.value[e.name].loading ? (Y(), X("div", ZR, W(y.value.debugLoading), 1)) : R.value[e.name].error ? (Y(), X("div", QR, W(R.value[e.name].error), 1)) : R.value[e.name].content ? (Y(), X("pre", $R, W(R.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
33069
+ L.value[e.name] ? (Y(), X("div", XR, [L.value[e.name].loading ? (Y(), X("div", ZR, W(y.value.debugLoading), 1)) : L.value[e.name].error ? (Y(), X("div", QR, W(L.value[e.name].error), 1)) : L.value[e.name].content ? (Y(), X("pre", $R, W(L.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
33040
33070
  ]))), 128))])) : Q("", !0),
33041
- L.value.data ? (Y(), X("div", ez, [Z("div", tz, "📊 " + W(y.value.debugDataTitle), 1), Z("div", nz, [Z("div", rz, W(L.value.data.description || y.value.debugDataFallback), 1), Z("div", iz, W(y.value.debugSchemaPrefix) + W(L.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
33071
+ I.value.data ? (Y(), X("div", ez, [Z("div", tz, "📊 " + W(y.value.debugDataTitle), 1), Z("div", nz, [Z("div", rz, W(I.value.data.description || y.value.debugDataFallback), 1), Z("div", iz, W(y.value.debugSchemaPrefix) + W(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
33042
33072
  Z("div", az, [Z("div", oz, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", sz, [
33043
- Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(L.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33044
- Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(L.value.subagent.maxDepth), 1)]),
33045
- Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(L.value.subagent.maxParallel), 1)]),
33046
- Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(L.value.subagent.allowedTools.length ? L.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
33073
+ Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33074
+ Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(I.value.subagent.maxDepth), 1)]),
33075
+ Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(I.value.subagent.maxParallel), 1)]),
33076
+ Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
33047
33077
  ])]),
33048
- L.value.mcp?.servers?.length ? (Y(), X("div", bz, [Z("div", xz, "🔌 MCP (" + W(L.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.mcp.servers, (e) => (Y(), X("div", {
33078
+ I.value.mcp?.servers?.length ? (Y(), X("div", bz, [Z("div", xz, "🔌 MCP (" + W(I.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.mcp.servers, (e) => (Y(), X("div", {
33049
33079
  key: e.name,
33050
33080
  class: "info-item"
33051
33081
  }, [Z("div", Sz, [Ms(W(e.name) + " ", 1), Z("span", Cz, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", wz, W(e.url), 1)]))), 128))])) : Q("", !0),
33052
- L.value.verify ? (Y(), X("div", Tz, [Z("div", Ez, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", Dz, [
33053
- Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(L.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33054
- Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(L.value.verify.maxAttempts), 1)]),
33055
- Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(L.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
33056
- L.value.verify.adversarial ? (Y(), X("div", Lz, [Z("span", Rz, W(y.value.debugAdversarialModel), 1), Z("span", zz, W(L.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
33082
+ I.value.verify ? (Y(), X("div", Tz, [Z("div", Ez, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", Dz, [
33083
+ Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
33084
+ Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(I.value.verify.maxAttempts), 1)]),
33085
+ Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
33086
+ I.value.verify.adversarial ? (Y(), X("div", Lz, [Z("span", Rz, W(y.value.debugAdversarialModel), 1), Z("span", zz, W(I.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
33057
33087
  ])])) : Q("", !0),
33058
- L.value.todos.length ? (Y(), X("div", Bz, [Z("div", Vz, "📋 " + W(y.value.debugTodosTitle) + " (" + W(L.value.todos.length) + ")", 1), (Y(!0), X(J, null, Sa(L.value.todos, (e, t) => (Y(), X("div", {
33088
+ I.value.todos.length ? (Y(), X("div", Bz, [Z("div", Vz, "📋 " + W(y.value.debugTodosTitle) + " (" + W(I.value.todos.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.todos, (e, t) => (Y(), X("div", {
33059
33089
  key: t,
33060
33090
  class: "info-todo"
33061
33091
  }, [Z("span", {
33062
33092
  class: "todo-tag",
33063
- style: Ve({ background: fe.value[e.status] && fe.value[e.status].color || "#9ca3af" })
33093
+ style: Ve({ background: R.value[e.status] && R.value[e.status].color || "#9ca3af" })
33064
33094
  }, W(pe(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
33065
- L.value.memory ? (Y(), X("div", Hz, [Z("div", Uz, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", Wz, W(L.value.memory), 1)])) : Q("", !0),
33066
- L.value.lastCompression ? (Y(), X("div", Gz, [Z("div", Kz, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", qz, [
33067
- Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(L.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
33068
- Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(L.value.lastCompression.roundsSummarized) + " / " + W(L.value.lastCompression.roundsTotal), 1)]),
33069
- Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(L.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
33070
- Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(L.value.lastCompression.originalMessages) + " → " + W(L.value.lastCompression.compressedMessages), 1)]),
33071
- Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(L.value.lastCompression.strategy), 1)]),
33072
- L.value.lastCompression.decision ? (Y(), X("div", lB, [Z("span", uB, W(y.value.debugDecision), 1), Z("span", dB, "🤖 " + W(be(L.value.lastCompression.decision)), 1)])) : Q("", !0)
33095
+ I.value.memory ? (Y(), X("div", Hz, [Z("div", Uz, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", Wz, W(I.value.memory), 1)])) : Q("", !0),
33096
+ I.value.lastCompression ? (Y(), X("div", Gz, [Z("div", Kz, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", qz, [
33097
+ Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
33098
+ Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(I.value.lastCompression.roundsSummarized) + " / " + W(I.value.lastCompression.roundsTotal), 1)]),
33099
+ Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(I.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
33100
+ Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(I.value.lastCompression.originalMessages) + " → " + W(I.value.lastCompression.compressedMessages), 1)]),
33101
+ Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(I.value.lastCompression.strategy), 1)]),
33102
+ I.value.lastCompression.decision ? (Y(), X("div", lB, [Z("span", uB, W(y.value.debugDecision), 1), Z("span", dB, "🤖 " + W(be(I.value.lastCompression.decision)), 1)])) : Q("", !0)
33073
33103
  ])])) : Q("", !0)
33074
33104
  ], 64)) : (Y(), X("div", CR, W(y.value.debugNoInfo), 1))])) : Q("", !0)
33075
33105
  ], 512)], 512)], 512)
33076
33106
  ], 2), Z("div", {
33077
33107
  class: "drawer-mask",
33078
- onClick: oe
33108
+ onClick: se
33079
33109
  })])) : Q("", !0)]),
33080
33110
  _: 1
33081
33111
  })]));
33082
33112
  }
33083
- }), [["__scopeId", "data-v-ffd46605"]]), mB = ["title"], hB = /*#__PURE__*/ Bk(/* @__PURE__ */ Xi({
33113
+ }), [["__scopeId", "data-v-6d9e98b4"]]), mB = ["title"], hB = /*#__PURE__*/ Bk(/* @__PURE__ */ Xi({
33084
33114
  __name: "SelectionMenu",
33085
33115
  emits: ["quote"],
33086
33116
  setup(e, { emit: t }) {
@@ -34159,4 +34189,4 @@ function bV(e) {
34159
34189
  return VC(e, JB);
34160
34190
  }
34161
34191
  //#endregion
34162
- export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp, I as constructLlmFromConfig, te as constructOpenLlmSync, XD as copyText, yS as countOccurrences, yp as createAgent, lg as createApprovalMiddleware, iO as createChatContext, bV as createChatSdk, xg as createCheckpointManager, Sg as createCheckpointMiddleware, Ay as createConflictManager, Wg as createContextInspectorMiddleware, ly as createCraftNoteCheck, rv as createDataOps, iV as createEvalHarness, sy as createHtmlFormatCheck, ty as createHtmlRenderCheck, dy as createHtmlSubagent, pg as createHumanConfirmMiddleware, fg as createHumanConfirmTool, tV as createIdleDetector, Qy as createMemoryBackend, ng as createMemoryMiddleware, y as createProxyLlm, eV as createRagSubagent, dd as createSandboxRunner, db as createSdkEvents, NC as createSerialRunner, nb as createSessionStore, rb as createSessionStoreWithBackend, kC as createSkillStore, qh as createSubagentMiddleware, Dh as createSubagentTracker, Xh as createSubagentsMiddleware, xC as createUsageHintsMiddleware, wg as createVerifyMiddleware, u_ as createVfs, eb as createWebStorageBackend, Ag as createWriteBackCheck, od as decorateModelUnavailable, gm as deepClone, hC as defineDataToolset, Vm as defineSkill, fy as defineTool, hm as deleteByPath, gy as deriveTitle, Up as describeSchemaNode, np as detectGarbledToolCall, ff as detectTransitionalReply, Mm as diffObjects, rV as diffReport, XS as domInfoTool, tC as domInspectSkill, YS as domSearchTool, jS as domToStructure, zS as domTools, mC as domToolsStatic, Ap as elementSchemaCandidates, US as ensureDomListenerRecorder, ph as estimateMessageTokens, gh as estimateRoundTokens, O as estimateTokens, re as extractReasoningDelta, nm as extractSchemaHint, Gg as extractText, ne as extractTextDelta, ie as extractUsage, DS as fetchDocTools, pC as fetchTools, jm as findStrippedKeys, Wp as formatConstraints, Kl as formatZodIssues, pm as getByPath, MS as getDomTool, JS as getElementInfo, iC as getEnvSummary, WS as getRecordedListeners, $v as getSandboxLifecycle, Cp as getSchemaAtPath, bp as getSchemaTopKeys, xS as hashContent, Cm as hashValue, oy as htmlFragmentSkill, Zp as htmlOrchestratorPrompt, _h as indexSummarize, sC as inspectEnvTool, cC as inspectTools, vy as isChatModel, rd as isContextLengthError, kk as isIconHtml, id as isModelUnavailableError, xp as isPathAllowed, Wy as isQuotaError, dm as isUnsafePath, xd as jpEval, Jl as jsonParseError, bm as limitDepth, _S as lineDiff, E as lowCapsHint, VN as markedToHtml, zv as maskUrlCredentials, vm as maybeParseValue, Nv as measureWriteScale, Dm as moveByPath, N as normalizeBaseUrl, Jv as normalizeRenderResult, oe as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, Xp as presets, Lp as projectBySchema, Ip as projectBySchemaDeep, ym as projectFields, vh as recallRounds, ey as renderInSandbox, HN as renderMarkdownHtml, Gp as renderSchemaHint, Kp as renderSchemaOverview, Yp as renderSchemaShallow, ub as resolveCapabilities, mb as resolveContextOptions, ob as resolveDialogConfig, QD as resolveDialogIcons, nO as resolveDialogMessages, ky as resolveLlm, D as resolveModelCaps, Sh as resolvePromptSoftCap, Ep as resolveSchemaPath, ab as resolveStorage, Am as restoreInPlace, km as restoreLive, Yl as routeError, Td as runSandboxedScript, fm as safeMerge, rC as safeSerialize, xm as safeStringify, rp as sanitizeGarbledContent, Nk as sanitizeIconHtml, Ik as sanitizeMessageHtml, Op as schemaHasRefinement, KS as searchDom, Cd as searchJson, gC as selectBuiltinTools, mm as setByPath, Ch as shouldTriggerCompression, Hv as stringifyDiagnosticsReport, ee as stripStainlessFetch, Qp as systemPromptHelpers, w as tableMaxOutputTokens, fh as tokenize, $ as toolError, Sp as unwrapSchema, YD as useChat, aO as useChatContext, Dp as validateAtPath, ov as validateHtmlFormat, U_ as validateRootValueLocally, W_ as validateWriteLocally, wm as watchFieldsHash, e as z, ql as zodError };
34192
+ export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp, F as constructLlmFromConfig, te as constructOpenLlmSync, XD as copyText, yS as countOccurrences, yp as createAgent, lg as createApprovalMiddleware, iO as createChatContext, bV as createChatSdk, xg as createCheckpointManager, Sg as createCheckpointMiddleware, Ay as createConflictManager, Wg as createContextInspectorMiddleware, ly as createCraftNoteCheck, rv as createDataOps, iV as createEvalHarness, sy as createHtmlFormatCheck, ty as createHtmlRenderCheck, dy as createHtmlSubagent, pg as createHumanConfirmMiddleware, fg as createHumanConfirmTool, tV as createIdleDetector, Qy as createMemoryBackend, ng as createMemoryMiddleware, y as createProxyLlm, eV as createRagSubagent, dd as createSandboxRunner, db as createSdkEvents, NC as createSerialRunner, nb as createSessionStore, rb as createSessionStoreWithBackend, kC as createSkillStore, qh as createSubagentMiddleware, Dh as createSubagentTracker, Xh as createSubagentsMiddleware, xC as createUsageHintsMiddleware, wg as createVerifyMiddleware, u_ as createVfs, eb as createWebStorageBackend, Ag as createWriteBackCheck, od as decorateModelUnavailable, gm as deepClone, hC as defineDataToolset, Vm as defineSkill, fy as defineTool, hm as deleteByPath, gy as deriveTitle, Up as describeSchemaNode, np as detectGarbledToolCall, ff as detectTransitionalReply, Mm as diffObjects, rV as diffReport, XS as domInfoTool, tC as domInspectSkill, YS as domSearchTool, jS as domToStructure, zS as domTools, mC as domToolsStatic, Ap as elementSchemaCandidates, US as ensureDomListenerRecorder, ph as estimateMessageTokens, gh as estimateRoundTokens, O as estimateTokens, ie as extractReasoningDelta, nm as extractSchemaHint, Gg as extractText, re as extractTextDelta, ae as extractUsage, DS as fetchDocTools, pC as fetchTools, jm as findStrippedKeys, Wp as formatConstraints, Kl as formatZodIssues, pm as getByPath, MS as getDomTool, JS as getElementInfo, iC as getEnvSummary, WS as getRecordedListeners, $v as getSandboxLifecycle, Cp as getSchemaAtPath, bp as getSchemaTopKeys, xS as hashContent, Cm as hashValue, oy as htmlFragmentSkill, Zp as htmlOrchestratorPrompt, _h as indexSummarize, sC as inspectEnvTool, cC as inspectTools, vy as isChatModel, rd as isContextLengthError, kk as isIconHtml, id as isModelUnavailableError, xp as isPathAllowed, Wy as isQuotaError, dm as isUnsafePath, xd as jpEval, Jl as jsonParseError, bm as limitDepth, _S as lineDiff, E as lowCapsHint, VN as markedToHtml, zv as maskUrlCredentials, vm as maybeParseValue, Nv as measureWriteScale, Dm as moveByPath, N as normalizeBaseUrl, Jv as normalizeRenderResult, se as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, Xp as presets, Lp as projectBySchema, Ip as projectBySchemaDeep, ym as projectFields, vh as recallRounds, ey as renderInSandbox, HN as renderMarkdownHtml, Gp as renderSchemaHint, Kp as renderSchemaOverview, Yp as renderSchemaShallow, ub as resolveCapabilities, mb as resolveContextOptions, ob as resolveDialogConfig, QD as resolveDialogIcons, nO as resolveDialogMessages, ky as resolveLlm, D as resolveModelCaps, Sh as resolvePromptSoftCap, Ep as resolveSchemaPath, ab as resolveStorage, Am as restoreInPlace, km as restoreLive, Yl as routeError, Td as runSandboxedScript, fm as safeMerge, rC as safeSerialize, xm as safeStringify, rp as sanitizeGarbledContent, Nk as sanitizeIconHtml, Ik as sanitizeMessageHtml, Op as schemaHasRefinement, KS as searchDom, Cd as searchJson, gC as selectBuiltinTools, mm as setByPath, Ch as shouldTriggerCompression, Hv as stringifyDiagnosticsReport, ee as stripStainlessFetch, Qp as systemPromptHelpers, w as tableMaxOutputTokens, fh as tokenize, $ as toolError, Sp as unwrapSchema, YD as useChat, aO as useChatContext, Dp as validateAtPath, ov as validateHtmlFormat, U_ as validateRootValueLocally, W_ as validateWriteLocally, wm as watchFieldsHash, e as z, ql as zodError };