@mx-space/cli 0.13.2 → 0.14.0

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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/ROADMAP.md +1 -1
  3. package/dist/{Lexical.dev-BsbWMhb3.mjs → Lexical.dev-DTxuYHmG.mjs} +4 -4
  4. package/dist/{Lexical.node-DnR_u_Ke.mjs → Lexical.node-BlCLnfA6.mjs} +1 -1
  5. package/dist/{Lexical.prod-B7L8eVsO.mjs → Lexical.prod-CeB9UQuo.mjs} +4 -4
  6. package/dist/{LexicalClipboard.dev-BGSFbuTA.mjs → LexicalClipboard.dev-CdFkLR_D.mjs} +5 -5
  7. package/dist/{LexicalClipboard.node-CUD_tpWb.mjs → LexicalClipboard.node-ktUajxsv.mjs} +1 -1
  8. package/dist/{LexicalClipboard.prod-DQXfRt3h.mjs → LexicalClipboard.prod-DliyLofW.mjs} +5 -5
  9. package/dist/{LexicalCodeCore.dev-B9lK_GSN.mjs → LexicalCodeCore.dev-CL9tHWJX.mjs} +4 -4
  10. package/dist/{LexicalCodeCore.prod-CNWMPXhg.mjs → LexicalCodeCore.prod-BoMSJc29.mjs} +4 -4
  11. package/dist/{LexicalDragon.dev-DRm2bGZ1.mjs → LexicalDragon.dev-CqW7Aq5H.mjs} +2 -2
  12. package/dist/{LexicalDragon.node-d8gPruly.mjs → LexicalDragon.node-DLXctJyy.mjs} +1 -1
  13. package/dist/{LexicalDragon.prod-ey3uKDJF.mjs → LexicalDragon.prod-DHI3T6n5.mjs} +2 -2
  14. package/dist/{LexicalExtension.dev-CXtOJb83.mjs → LexicalExtension.dev-BP-18zns.mjs} +6 -6
  15. package/dist/{LexicalExtension.node-CMsupJZs.mjs → LexicalExtension.node-BWH6xbzG.mjs} +1 -1
  16. package/dist/{LexicalExtension.prod-BCLGhzcg.mjs → LexicalExtension.prod-Cs6OgrDn.mjs} +6 -6
  17. package/dist/{LexicalHeadless.dev-yVDOBd64.mjs → LexicalHeadless.dev-DJp__UcP.mjs} +1 -1
  18. package/dist/{LexicalHeadless.prod-B8qauuEA.mjs → LexicalHeadless.prod-o0v9cIu5.mjs} +1 -1
  19. package/dist/{LexicalHtml.dev-3rdckXIU.mjs → LexicalHtml.dev-DoymwFpG.mjs} +8 -8
  20. package/dist/{LexicalHtml.node-DagZUjQ_.mjs → LexicalHtml.node-CVkbWtUA.mjs} +1 -1
  21. package/dist/{LexicalHtml.prod-B5AQaJDb.mjs → LexicalHtml.prod-C2b3z99k.mjs} +8 -8
  22. package/dist/{LexicalLink.dev-CspSwLNB.mjs → LexicalLink.dev-7cgLOLIe.mjs} +5 -5
  23. package/dist/{LexicalLink.prod-Da-ZW6H5.mjs → LexicalLink.prod-DWFgoXHR.mjs} +5 -5
  24. package/dist/{LexicalList.dev-CNXmV6v8.mjs → LexicalList.dev-Ci2iOxFx.mjs} +4 -4
  25. package/dist/{LexicalList.prod-DgQzj4v9.mjs → LexicalList.prod-D0xX5d3G.mjs} +4 -4
  26. package/dist/{LexicalMarkdown.dev-0XURdo96.mjs → LexicalMarkdown.dev-C0ZYCyuR.mjs} +4 -4
  27. package/dist/{LexicalMarkdown.prod-qUsIQfJx.mjs → LexicalMarkdown.prod-0M-Nc-rh.mjs} +4 -4
  28. package/dist/{LexicalRichText.dev-BqsEA7I9.mjs → LexicalRichText.dev-Cnr1kDym.mjs} +7 -7
  29. package/dist/{LexicalRichText.node-D73RR0Ck.mjs → LexicalRichText.node-BUJZAiap.mjs} +4 -4
  30. package/dist/{LexicalRichText.prod-4Atyd7OR.mjs → LexicalRichText.prod-BfbMQ9uM.mjs} +7 -7
  31. package/dist/{LexicalSelection.dev-DK5xfxKP.mjs → LexicalSelection.dev-C4L7l8OB.mjs} +1 -1
  32. package/dist/{LexicalSelection.node-pyZyrANz.mjs → LexicalSelection.node-CLKroUMQ.mjs} +1 -1
  33. package/dist/{LexicalSelection.prod-C5GrCbDC.mjs → LexicalSelection.prod-DzFqpTlw.mjs} +1 -1
  34. package/dist/{LexicalTable.dev-DiR_4rdI.mjs → LexicalTable.dev-Cc9-zqKa.mjs} +7 -7
  35. package/dist/{LexicalTable.prod-Cbc5EasT.mjs → LexicalTable.prod-BgO4nCxy.mjs} +7 -7
  36. package/dist/{LexicalUtils.dev-jhPjn1vQ.mjs → LexicalUtils.dev-BRgK0L6G.mjs} +2 -2
  37. package/dist/{LexicalUtils.node-Ck74ludK.mjs → LexicalUtils.node-BVAwOkL4.mjs} +1 -1
  38. package/dist/{LexicalUtils.prod-nuTBxnk_.mjs → LexicalUtils.prod-C1gtvVDP.mjs} +2 -2
  39. package/dist/bin/mxs.mjs +1 -1
  40. package/dist/{esm-DupC6TTP.mjs → esm-BNu4sUWV.mjs} +6 -6
  41. package/dist/esm-jbwcVZth.mjs +2 -0
  42. package/dist/index.mjs +1 -1
  43. package/dist/{mxs-BgAyMQdq.mjs → mxs-BUqt-N3N.mjs} +928 -656
  44. package/dist/vendor/litexml/cli.mjs +24150 -0
  45. package/dist/vendor/litexml/litexml-html-preview-client.css +8862 -0
  46. package/dist/vendor/litexml/litexml-html-preview-client.js +163814 -0
  47. package/dist/vendor/litexml/style.css +96 -0
  48. package/package.json +13 -14
  49. package/skills/commands-draft.md +45 -0
  50. package/skills/commands-preview.md +3 -3
  51. package/dist/esm-BumPuCXw.mjs +0 -2
@@ -1,7 +1,7 @@
1
- import { $ as drain, $a as identity, $i as reduce$1, $n as try_, $r as get$16, $t as either, A as compose, Aa as pipeArguments, Ai as empty$11, An as orElse$3, Ar as Scope, At as encodeSync, B as ensuring$2, Ba as cached, Bi as head$2, Bn as scoped, Br as set$3, Bt as async, C as Number$, Ca as some, Ci as isConfigError, Cn as match$2, Ct as currentContext, D as String$, Da as left, Di as appendAll, Dn as onError, Dr as taggedEnum, Dt as unsafeMake, Ea as string$1, Ei as append$2, En as negate, Er as tagged, Et as get$20, Fa as redact$1, Fi as findFirstIndex, Fn as retry, Fr as isFailure, Ft as addFinalizer, G as mapError$1, Gi as join, Gn as suspend, Gr as updateAs, Gt as catchIf, H as fromChannel, Ha as hash, Hi as isArray$1, Hn as serviceOption, Hr as updateAndGet, Ht as catchAll, I as make$22, Ia as symbolRedactable, Ii as findLast, In as runFork$1, Ir as void_$1, It as all$5, J as splitLines, Ja as globalValue, Ji as match$1, Jn as tapError, Jr as cons$1, Jt as catchTags, K as run$6, Ka as isObject, Ki as make$23, Kn as sync, Kr as CommitPrototype, Kt as catchSome, L as isConfig, La as toStringUnknown, Li as flatMap$4, Ln as runSync, Lr as ParentSpan, Lt as annotateLogs, M as decodeUnknown, Ma as Class, Mi as filter$2, Mn as provide$1, Mr as isInterrupted, Mt as _void, N as int, Na as NodeInspectSymbol, Ni as filterMap, Nn as provideService, Nr as isInterruptedOnly, Nt as acquireRelease, O as TaggedError, Oa as merge$2, Oi as contains, On as onInterrupt, Or as error$1, Ot as nominal, P as optional$9, Pa as format$3, Pi as findFirst, Pn as repeatN, Pr as fail$3, Pt as acquireUseRelease, Q as unwrapScoped, Qa as dual, Qi as prepend$1, Qn as tryPromise, Qr as fromIterable$2, Qt as dieMessage, R as asyncScoped, Ra as equals, Ri as fromIterable$1, Rn as runtime, Rr as get$15, Rt as as, S as Literal, Sa as orElse$2, Si as omit, Sn as mapInputContext, Sr as unsafeDone, St as succeed$2, Ta as mapInput, Ti as allocate, Tn as matchEffect, Tr as TaggedError$1, Tt as currentTracerEnabled, Ua as string, Ui as isEmptyReadonlyArray, Un as sleep$1, Ur as allLevels, Ut as catchAllCause, Va as combine$2, Vi as headNonEmpty, Vn as serviceFunctions, Vr as update$8, Vt as cached$1, W as mapChunks, Wa as symbol$1, Wi as isNonEmptyReadonlyArray, Wn as succeed$1, Wr as getOrDefault, Wt as catchAllDefect, X as transduce, Xa as constUndefined, Xi as matchRight, Xn as timeout, Xr as of$3, Xt as contextWithEffect, Y as suspend$2, Ya as constFalse, Yi as matchLeft, Yn as tapErrorCause, Yr as isNil, Yt as context, Z as unwrap$16, Za as constVoid, Zi as of$2, Zn as tryMap, Zr as empty$12, Zt as die, _ as fromString, _a as isOption, _i as Reference, _n as logError, _r as failCause, _t as effect, a as make$30, aa as tailNonEmpty, ai as add$1, an as filterOrDieMessage, ar as useSpan, at as embedInput, b as Defect, ba as match, bi as getOption, bn as mapBoth, br as make$28, bt as provideMerge, c as defaultLogger, ci as remove$4, cn as fnUntraced, cr as withParentSpan, ct as fromEffect, d as get$17, da as flatMap$3, di as map$9, dn as forkScoped, dr as zipRight, dt as write, ea as reduceRight, ei as has, en as ensuring, eo as pipe, er as uninterruptible, et as foldLeftChunks, f as make$26, fa as fromNullable, fi as of$1, fn as gen, fr as zipWith, ft as spaced, g as when, ga as isNone, gi as GenericTag, gn as locally, gr as fail$4, gt as make$29, h as value$1, ha as getOrUndefined, hi as unsafeFromArray, hn as isEffect, hr as complete, ht as get$18, i as isMailbox, ia as splitAt, ii as make$27, in as filter$1, io as __toESM, ir as unsafeMakeSemaphore, it as acquireUseRelease$1, ja as BaseProto, ji as every, jn as orElseFail, jr as addFinalizer$1, jt as is$2, k as Union, ka as right, ki as drop, kn as orDie, kr as log, kt as decodeSync, l as prettyLoggerDefault, la as map$10, li as seconds, ln as forEach$1, lr as zip, lt as suspend$1, m as orElse$1, ma as getOrThrow, mi as toArray, mn as interruptible, mr as _await, mt as updateContext, n as make$31, na as sort$2, ni as make$25, nn as failCause$1, no as __exportAll, nr as unlessEffect, nt as fromChannel$1, o as toChannel, oa as take, oi as fromIterable$3, on as flatMap$1, or as when$1, ot as ensuring$1, p as updateEffect, pa as getOrElse, pi as reduce$2, pn as ignore, pr as DeferredTypeId, pt as runFork, q as runCollect, qa as isTagged, qi as map$7, qn as tap, qr as round, qt as catchTag, r as unsafeAdd, ra as span, ri as set$2, rn as failSync, ro as __require, rr as unsafeMakeLatch, rt as unwrapScoped$1, s as unify, sa as unsafeGet, si as has$1, sn as flatten$3, sr as withFiberRuntime, st as flatMap$2, t as join$1, ta as some$1, ti as isEmpty$5, tn as fail$2, to as __commonJSMin, tr as uninterruptibleMask, tt as forEach, u as withMinimumLogLevel, ua as filter$3, ui as appendAll$1, un as forkDaemon, ur as zipLeft, ut as void_, v as Cause, va as isSome, vi as Tag$2, vn as logWarning, vr as interrupt, vt as mergeAll, w as NumberFromString, wa as boolean$3, wi as isMissingDataOnly, wn as matchCauseEffect, wr as Error$1, wt as currentLoggers, x as Int, xa as none$3, xi as merge$3, xn as mapError, xr as succeed$3, xt as scoped$1, y as Date$, ya as map$8, yi as get$19, yn as map$6, yr as isDone, yt as provide, z as bufferChunks, za as symbol$2, zi as getSomes, zn as scope, zr as make$24, zt as asVoid } from "./esm-DupC6TTP.mjs";
2
- import { _ as LinkNode, a as HeadingNode, b as CodeHighlightNode, d as ListItemNode, f as ListNode, g as AutoLinkNode, o as QuoteNode, x as CodeNode } from "./LexicalRichText.node-D73RR0Ck.mjs";
3
- import { a as HorizontalRuleNode } from "./LexicalExtension.node-CMsupJZs.mjs";
4
- import { dn as ElementNode, un as DecoratorNode } from "./Lexical.node-DnR_u_Ke.mjs";
1
+ import { $ as drain, $a as identity, $i as reduce$1, $n as try_, $r as get$17, $t as either, A as compose, Aa as pipeArguments, Ai as empty$11, An as orElse$3, Ar as Scope, At as encodeSync, B as ensuring$2, Ba as cached, Bi as head$2, Bn as scoped, Br as set$3, Bt as async, C as Number$, Ca as some, Ci as isConfigError, Cn as match$2, Ct as currentContext, D as String$, Da as left, Di as appendAll, Dn as onError, Dr as taggedEnum, Dt as unsafeMake, Ea as string$1, Ei as append$2, En as negate, Er as tagged, Et as get$21, Fa as redact$1, Fi as findFirstIndex, Fn as retry, Fr as isFailure, Ft as addFinalizer, G as mapError$1, Gi as join$1, Gn as suspend, Gr as updateAs, Gt as catchIf, H as fromChannel, Ha as hash, Hi as isArray$1, Hn as serviceOption, Hr as updateAndGet, Ht as catchAll, I as make$22, Ia as symbolRedactable, Ii as findLast, In as runFork$1, Ir as void_$1, It as all$5, J as splitLines, Ja as globalValue, Ji as match$1, Jn as tapError, Jr as cons$1, Jt as catchTags, K as run$6, Ka as isObject, Ki as make$23, Kn as sync, Kr as CommitPrototype, Kt as catchSome, L as isConfig, La as toStringUnknown, Li as flatMap$4, Ln as runSync, Lr as ParentSpan, Lt as annotateLogs, M as decodeUnknown, Ma as Class, Mi as filter$2, Mn as provide$1, Mr as isInterrupted, Mt as _void, N as int, Na as NodeInspectSymbol, Ni as filterMap, Nn as provideService, Nr as isInterruptedOnly, Nt as acquireRelease, O as TaggedError, Oa as merge$2, Oi as contains, On as onInterrupt, Or as error$1, Ot as nominal, P as optional$9, Pa as format$3, Pi as findFirst, Pn as repeatN, Pr as fail$3, Pt as acquireUseRelease, Q as unwrapScoped, Qa as dual, Qi as prepend$1, Qn as tryPromise, Qr as fromIterable$2, Qt as dieMessage, R as asyncScoped, Ra as equals, Ri as fromIterable$1, Rn as runtime, Rr as get$16, Rt as as, S as Literal, Sa as orElse$2, Si as omit, Sn as mapInputContext, Sr as unsafeDone, St as succeed$2, Ta as mapInput, Ti as allocate, Tn as matchEffect, Tr as TaggedError$1, Tt as currentTracerEnabled, Ua as string, Ui as isEmptyReadonlyArray, Un as sleep$1, Ur as allLevels, Ut as catchAllCause, Va as combine$2, Vi as headNonEmpty, Vn as serviceFunctions, Vr as update$9, Vt as cached$1, W as mapChunks, Wa as symbol$1, Wi as isNonEmptyReadonlyArray, Wn as succeed$1, Wr as getOrDefault, Wt as catchAllDefect, X as transduce, Xa as constUndefined, Xi as matchRight, Xn as timeout, Xr as of$3, Xt as contextWithEffect, Y as suspend$2, Ya as constFalse, Yi as matchLeft, Yn as tapErrorCause, Yr as isNil, Yt as context, Z as unwrap$17, Za as constVoid, Zi as of$2, Zn as tryMap, Zr as empty$12, Zt as die, _ as fromString, _a as isOption, _i as Reference, _n as logError, _r as failCause, _t as effect, a as make$30, aa as tailNonEmpty, ai as add$1, an as filterOrDieMessage, ar as useSpan, at as embedInput, b as Defect, ba as match, bi as getOption, bn as mapBoth, br as make$28, bt as provideMerge, c as defaultLogger, ci as remove$4, cn as fnUntraced, cr as withParentSpan, ct as fromEffect, d as get$18, da as flatMap$3, di as map$9, dn as forkScoped, dr as zipRight, dt as write, ea as reduceRight, ei as has, en as ensuring, eo as pipe, er as uninterruptible, et as foldLeftChunks, f as make$26, fa as fromNullable, fi as of$1, fn as gen, fr as zipWith, ft as spaced, g as when, ga as isNone, gi as GenericTag, gn as locally, gr as fail$4, gt as make$29, h as value$1, ha as getOrUndefined, hi as unsafeFromArray, hn as isEffect, hr as complete, ht as get$19, i as isMailbox, ia as splitAt, ii as make$27, in as filter$1, io as __toESM, ir as unsafeMakeSemaphore, it as acquireUseRelease$1, ja as BaseProto, ji as every, jn as orElseFail, jr as addFinalizer$1, jt as is$2, k as Union, ka as right, ki as drop, kn as orDie, kr as log, kt as decodeSync, l as prettyLoggerDefault, la as map$10, li as seconds, ln as forEach$1, lr as zip, lt as suspend$1, m as orElse$1, ma as getOrThrow, mi as toArray, mn as interruptible, mr as _await, mt as updateContext, n as make$31, na as sort$2, ni as make$25, nn as failCause$1, no as __exportAll, nr as unlessEffect, nt as fromChannel$1, o as toChannel, oa as take, oi as fromIterable$3, on as flatMap$1, or as when$1, ot as ensuring$1, p as updateEffect, pa as getOrElse, pi as reduce$2, pn as ignore, pr as DeferredTypeId, pt as runFork, q as runCollect, qa as isTagged, qi as map$7, qn as tap, qr as round, qt as catchTag, r as unsafeAdd, ra as span, ri as set$2, rn as failSync, ro as __require, rr as unsafeMakeLatch, rt as unwrapScoped$1, s as unify, sa as unsafeGet, si as has$1, sn as flatten$3, sr as withFiberRuntime, st as flatMap$2, t as join$2, ta as some$1, ti as isEmpty$5, tn as fail$2, to as __commonJSMin, tr as uninterruptibleMask, tt as forEach, u as withMinimumLogLevel, ua as filter$3, ui as appendAll$1, un as forkDaemon, ur as zipLeft, ut as void_, v as Cause, va as isSome, vi as Tag$2, vn as logWarning, vr as interrupt, vt as mergeAll, w as NumberFromString, wa as boolean$3, wi as isMissingDataOnly, wn as matchCauseEffect, wr as Error$1, wt as currentLoggers, x as Int, xa as none$3, xi as merge$3, xn as mapError, xr as succeed$3, xt as scoped$1, y as Date$, ya as map$8, yi as get$20, yn as map$6, yr as isDone, yt as provide, z as bufferChunks, za as symbol$2, zi as getSomes, zn as scope, zr as make$24, zt as asVoid } from "./esm-BNu4sUWV.mjs";
2
+ import { _ as LinkNode, a as HeadingNode, b as CodeHighlightNode, d as ListItemNode, f as ListNode, g as AutoLinkNode, o as QuoteNode, x as CodeNode } from "./LexicalRichText.node-BUJZAiap.mjs";
3
+ import { a as HorizontalRuleNode } from "./LexicalExtension.node-BWH6xbzG.mjs";
4
+ import { dn as ElementNode, un as DecoratorNode } from "./Lexical.node-BlCLnfA6.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import * as ChildProcess from "node:child_process";
7
7
  import childProcess, { execFile, spawn } from "node:child_process";
@@ -13,7 +13,7 @@ import fs, { existsSync, mkdirSync, openSync, readFileSync, realpathSync, rename
13
13
  import * as OS from "node:os";
14
14
  import os, { arch, platform } from "node:os";
15
15
  import * as Path from "node:path";
16
- import path, { basename } from "node:path";
16
+ import path, { basename, dirname, join } from "node:path";
17
17
  import * as NodeUrl from "node:url";
18
18
  import { fileURLToPath } from "node:url";
19
19
  import * as readline from "node:readline";
@@ -537,7 +537,7 @@ const stringifyInternal = (self) => {
537
537
  self.italicized,
538
538
  self.strikethrough,
539
539
  self.underlined
540
- ]))}${join(self.commands, "")}`;
540
+ ]))}${join$1(self.commands, "")}`;
541
541
  };
542
542
  //#endregion
543
543
  //#region ../../node_modules/.pnpm/@effect+printer-ansi@0.49.0_@effect+typeclass@0.40.0_effect@3.21.4__effect@3.21.4/node_modules/@effect/printer-ansi/dist/esm/Ansi.js
@@ -2164,16 +2164,16 @@ const spans = (spans) => {
2164
2164
  return empty$7;
2165
2165
  };
2166
2166
  /** @internal */
2167
- const isEmpty$3 = (self) => size$9(self) === 0;
2167
+ const isEmpty$3 = (self) => size$10(self) === 0;
2168
2168
  /** @internal */
2169
- const size$9 = (self) => {
2169
+ const size$10 = (self) => {
2170
2170
  switch (self._tag) {
2171
2171
  case "Text":
2172
2172
  case "URI": return self.value.length;
2173
2173
  case "Highlight":
2174
2174
  case "Strong":
2175
- case "Weak": return size$9(self.value);
2176
- case "Sequence": return size$9(self.left) + size$9(self.right);
2175
+ case "Weak": return size$10(self.value);
2176
+ case "Sequence": return size$10(self.left) + size$10(self.right);
2177
2177
  }
2178
2178
  };
2179
2179
  /** @internal */
@@ -3000,24 +3000,24 @@ function renderNextFrame$4(state, options) {
3000
3000
  return gen(function* () {
3001
3001
  const path = yield* Path$1;
3002
3002
  const columns = yield* (yield* Terminal).columns;
3003
- const figures$9 = yield* figures;
3003
+ const figures$10 = yield* figures;
3004
3004
  const currentPath = yield* resolveCurrentPath(state.path, options);
3005
3005
  const selectedPath = state.files[state.cursor];
3006
3006
  const resolvedPath = path.resolve(currentPath, selectedPath);
3007
- const resolvedPathMsg = figures$9.pointerSmall.pipe(cat(space$1), cat(text$11(resolvedPath)), annotate(blackBright));
3007
+ const resolvedPathMsg = figures$10.pointerSmall.pipe(cat(space$1), cat(text$11(resolvedPath)), annotate(blackBright));
3008
3008
  if (showConfirmation(state.confirm)) {
3009
3009
  const leadingSymbol = annotate(text$11("?"), cyanBright);
3010
- const trailingSymbol = annotate(figures$9.pointerSmall, blackBright);
3010
+ const trailingSymbol = annotate(figures$10.pointerSmall, blackBright);
3011
3011
  const promptMsg = renderPrompt(annotate(text$11("(Y/n)"), blackBright), CONFIRM_MESSAGE, leadingSymbol, trailingSymbol);
3012
3012
  return cursorHide.pipe(cat(promptMsg), cat(hardLine), cat(resolvedPathMsg), optimize(Deep), render$2({
3013
3013
  style: "pretty",
3014
3014
  options: { lineWidth: columns }
3015
3015
  }));
3016
3016
  }
3017
- const leadingSymbol = annotate(figures$9.tick, green);
3018
- const trailingSymbol = annotate(figures$9.ellipsis, blackBright);
3017
+ const leadingSymbol = annotate(figures$10.tick, green);
3018
+ const trailingSymbol = annotate(figures$10.ellipsis, blackBright);
3019
3019
  const promptMsg = renderPrompt(empty$8, options.message, leadingSymbol, trailingSymbol);
3020
- const files = renderFiles(state, state.files, figures$9, options);
3020
+ const files = renderFiles(state, state.files, figures$10, options);
3021
3021
  return cursorHide.pipe(cat(promptMsg), cat(hardLine), cat(resolvedPathMsg), cat(hardLine), cat(files), optimize(Deep), render$2({
3022
3022
  style: "pretty",
3023
3023
  options: { lineWidth: columns }
@@ -3027,9 +3027,9 @@ function renderNextFrame$4(state, options) {
3027
3027
  function renderSubmission$4(value, options) {
3028
3028
  return gen(function* () {
3029
3029
  const columns = yield* (yield* Terminal).columns;
3030
- const figures$10 = yield* figures;
3031
- const leadingSymbol = annotate(figures$10.tick, green);
3032
- const trailingSymbol = annotate(figures$10.ellipsis, blackBright);
3030
+ const figures$9 = yield* figures;
3031
+ const leadingSymbol = annotate(figures$9.tick, green);
3032
+ const trailingSymbol = annotate(figures$9.ellipsis, blackBright);
3033
3033
  return renderPrompt(empty$8, options.message, leadingSymbol, trailingSymbol).pipe(cat(space$1), cat(annotate(text$11(value), white$1)), cat(hardLine), render$2({
3034
3034
  style: "pretty",
3035
3035
  options: { lineWidth: columns }
@@ -3208,10 +3208,10 @@ function renderOutput$3(state, leadingSymbol, trailingSymbol, options, submitted
3208
3208
  function renderNextFrame$3(state, options) {
3209
3209
  return gen(function* () {
3210
3210
  const columns = yield* (yield* Terminal).columns;
3211
- const figures$7 = yield* figures;
3211
+ const figures$8 = yield* figures;
3212
3212
  const leadingSymbol = annotate(text$11("?"), cyanBright);
3213
- const trailingSymbol = annotate(figures$7.pointerSmall, blackBright);
3214
- const errorMsg = renderError$1(state, figures$7.pointerSmall);
3213
+ const trailingSymbol = annotate(figures$8.pointerSmall, blackBright);
3214
+ const errorMsg = renderError$1(state, figures$8.pointerSmall);
3215
3215
  return renderOutput$3(state, leadingSymbol, trailingSymbol, options).pipe(cat(errorMsg), optimize(Deep), render$2({
3216
3216
  style: "pretty",
3217
3217
  options: { lineWidth: columns }
@@ -3221,8 +3221,8 @@ function renderNextFrame$3(state, options) {
3221
3221
  function renderSubmission$3(nextState, options) {
3222
3222
  return gen(function* () {
3223
3223
  const columns = yield* (yield* Terminal).columns;
3224
- const figures$8 = yield* figures;
3225
- return renderOutput$3(nextState, annotate(figures$8.tick, green), annotate(figures$8.ellipsis, blackBright), options, true).pipe(cat(hardLine), optimize(Deep), render$2({
3224
+ const figures$7 = yield* figures;
3225
+ return renderOutput$3(nextState, annotate(figures$7.tick, green), annotate(figures$7.ellipsis, blackBright), options, true).pipe(cat(hardLine), optimize(Deep), render$2({
3226
3226
  style: "pretty",
3227
3227
  options: { lineWidth: columns }
3228
3228
  }));
@@ -3902,7 +3902,7 @@ const wizard$3 = /*#__PURE__*/ dual(2, (self, help) => wizardInternal$3(self, he
3902
3902
  const getChoicesInternal = (self) => {
3903
3903
  switch (self._tag) {
3904
3904
  case "Bool": return some("true | false");
3905
- case "Choice": return some(pipe(map$7(self.alternatives, ([choice]) => choice), join(" | ")));
3905
+ case "Choice": return some(pipe(map$7(self.alternatives, ([choice]) => choice), join$1(" | ")));
3906
3906
  case "DateTime": return some("date");
3907
3907
  case "Float":
3908
3908
  case "Integer":
@@ -3915,7 +3915,7 @@ const getChoicesInternal = (self) => {
3915
3915
  const getHelpInternal$3 = (self) => {
3916
3916
  switch (self._tag) {
3917
3917
  case "Bool": return text$10("A true or false value.");
3918
- case "Choice": return text$10(`One of the following: ${pipe(map$7(self.alternatives, ([choice]) => choice), join(", "))}`);
3918
+ case "Choice": return text$10(`One of the following: ${pipe(map$7(self.alternatives, ([choice]) => choice), join$1(", "))}`);
3919
3919
  case "DateTime": return text$10("A date without a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30.");
3920
3920
  case "Float": return text$10("A floating point number.");
3921
3921
  case "Integer": return text$10("An integer.");
@@ -3958,7 +3958,7 @@ const validateInternal$1 = (self, value, config) => {
3958
3958
  }));
3959
3959
  case "Choice": return orElseFail(value, () => `Choice options to not have a default value`).pipe(flatMap$1((value) => findFirst(self.alternatives, ([choice]) => choice === value)), mapBoth({
3960
3960
  onFailure: () => {
3961
- return `Expected one of the following cases: ${pipe(map$7(self.alternatives, ([choice]) => choice), join(", "))}`;
3961
+ return `Expected one of the following cases: ${pipe(map$7(self.alternatives, ([choice]) => choice), join$1(", "))}`;
3962
3962
  },
3963
3963
  onSuccess: ([, value]) => value
3964
3964
  }));
@@ -4045,7 +4045,7 @@ const getBashCompletions$2 = (self) => {
4045
4045
  case "directory": return self.pathExists === "yes" || self.pathExists === "either" ? "$(compgen -d \"${cur}\")" : "";
4046
4046
  case "either": return self.pathExists === "yes" || self.pathExists === "either" ? "$(compgen -f \"${cur}\")" : "";
4047
4047
  }
4048
- case "Choice": return `$(compgen -W "${pipe(map$7(self.alternatives, ([choice]) => choice), join(","))}" -- "\${cur}")`;
4048
+ case "Choice": return `$(compgen -W "${pipe(map$7(self.alternatives, ([choice]) => choice), join$1(","))}" -- "\${cur}")`;
4049
4049
  }
4050
4050
  };
4051
4051
  /** @internal */
@@ -4063,14 +4063,14 @@ const getFishCompletions$3 = (self) => {
4063
4063
  case "directory": return self.pathExists === "yes" || self.pathExists === "either" ? make$23("-r", "-f", "-a", `"(__fish_complete_directories (commandline -ct))"`) : make$23("-r");
4064
4064
  case "either": return self.pathExists === "yes" || self.pathExists === "either" ? make$23("-r", "-F") : make$23("-r");
4065
4065
  }
4066
- case "Choice": return make$23("-r", "-f", "-a", `"{${pipe(map$7(self.alternatives, ([choice]) => `${choice}''`), join(","))}}"`);
4066
+ case "Choice": return make$23("-r", "-f", "-a", `"{${pipe(map$7(self.alternatives, ([choice]) => `${choice}''`), join$1(","))}}"`);
4067
4067
  }
4068
4068
  };
4069
4069
  /** @internal */
4070
4070
  const getZshCompletions$3 = (self) => {
4071
4071
  switch (self._tag) {
4072
4072
  case "Bool": return "";
4073
- case "Choice": return `:CHOICE:(${pipe(map$7(self.alternatives, ([name]) => name), join(" "))})`;
4073
+ case "Choice": return `:CHOICE:(${pipe(map$7(self.alternatives, ([name]) => name), join$1(" "))})`;
4074
4074
  case "DateTime": return "";
4075
4075
  case "Float": return "";
4076
4076
  case "Integer": return "";
@@ -4166,7 +4166,7 @@ const render$1 = (self, config) => {
4166
4166
  onNone: () => empty$7,
4167
4167
  onSome: (s) => concat$1(space, text$10(s))
4168
4168
  }) : empty$7;
4169
- const nameInfo = text$10(join(config.showAllNames ? self.names : self.names.length > 1 ? pipe(filter$2(self.names, (name) => name.startsWith("--")), head$2, map$8(of$2), getOrElse(() => self.names)) : self.names, ", "));
4169
+ const nameInfo = text$10(join$1(config.showAllNames ? self.names : self.names.length > 1 ? pipe(filter$2(self.names, (name) => name.startsWith("--")), head$2, map$8(of$2), getOrElse(() => self.names)) : self.names, ", "));
4170
4170
  return config.showAllNames && self.names.length > 1 ? of$2(spans([
4171
4171
  text$10("("),
4172
4172
  nameInfo,
@@ -4503,7 +4503,7 @@ const wizardInternal$2 = (self, config) => {
4503
4503
  message: toAnsiText(pipe(getHelpInternal$2(self), sequence(repeatHelp))).trimEnd(),
4504
4504
  min: getMinSizeInternal$1(self),
4505
4505
  max: getMaxSizeInternal$1(self)
4506
- }).pipe(zipLeft(log()), flatMap$1((n) => n <= 0 ? succeed$1(empty$11()) : make$24(empty$11()).pipe(flatMap$1((ref) => wizardInternal$2(self.args, config).pipe(flatMap$1((args) => update$8(ref, appendAll(args))), repeatN(n - 1), zipRight(get$15(ref)), tap((args) => validateInternal(self, args, config)))))));
4506
+ }).pipe(zipLeft(log()), flatMap$1((n) => n <= 0 ? succeed$1(empty$11()) : make$24(empty$11()).pipe(flatMap$1((ref) => wizardInternal$2(self.args, config).pipe(flatMap$1((args) => update$9(ref, appendAll(args))), repeatN(n - 1), zipRight(get$16(ref)), tap((args) => validateInternal(self, args, config)))))));
4507
4507
  }
4508
4508
  case "WithDefault": {
4509
4509
  const defaultHelp = p$1(`This argument is optional - use the default?`);
@@ -4550,7 +4550,7 @@ const getFishCompletions$2 = (self) => {
4550
4550
  case "Empty": return empty$11();
4551
4551
  case "Single": {
4552
4552
  const description = getShortDescription$2(self);
4553
- return pipe(getFishCompletions$3(self.primitiveType), appendAll(description.length === 0 ? empty$11() : of$2(`-d '${description}'`)), join(" "), of$2);
4553
+ return pipe(getFishCompletions$3(self.primitiveType), appendAll(description.length === 0 ? empty$11() : of$2(`-d '${description}'`)), join$1(" "), of$2);
4554
4554
  }
4555
4555
  case "Both": return pipe(getFishCompletions$2(self.left), appendAll(getFishCompletions$2(self.right)));
4556
4556
  case "Map":
@@ -4640,7 +4640,7 @@ const levensteinDistance = (first, second, config) => {
4640
4640
  //#endregion
4641
4641
  //#region ../../node_modules/.pnpm/@effect+cli@0.75.2_@effect+platform@0.96.2_effect@3.21.4__@effect+printer-ansi@0.49.0_@_01a8c4d9bc0f75ad9760cebe2a3dffeb/node_modules/@effect/cli/dist/esm/internal/prompt/list.js
4642
4642
  /** @internal */
4643
- const list$15 = (options) => text$9(options).pipe(map$3((output) => output.split(options.delimiter || ",")));
4643
+ const list$16 = (options) => text$9(options).pipe(map$3((output) => output.split(options.delimiter || ",")));
4644
4644
  /** @internal */
4645
4645
  const OptionsTypeId = /*#__PURE__*/ Symbol.for("@effect/cli/Options");
4646
4646
  const proto$2 = {
@@ -4796,7 +4796,7 @@ const getIdentifierInternal = (self) => {
4796
4796
  case "Both":
4797
4797
  case "OrElse": return match$1(getSomes([getIdentifierInternal(self.left), getIdentifierInternal(self.right)]), {
4798
4798
  onEmpty: () => none$3(),
4799
- onNonEmpty: (ids) => some(join(ids, ", "))
4799
+ onNonEmpty: (ids) => some(join$1(ids, ", "))
4800
4800
  });
4801
4801
  case "KeyValueMap":
4802
4802
  case "Variadic": return getIdentifierInternal(self.argumentOption);
@@ -4980,7 +4980,7 @@ const parseInternal$1 = (self, args, config) => {
4980
4980
  switch (self._tag) {
4981
4981
  case "Empty": return _void;
4982
4982
  case "Single": {
4983
- const singleNames = filterMap(getNames$1(self), (name) => get$16(args, name));
4983
+ const singleNames = filterMap(getNames$1(self), (name) => get$17(args, name));
4984
4984
  if (isNonEmptyReadonlyArray(singleNames)) {
4985
4985
  const head = headNonEmpty(singleNames);
4986
4986
  if (isEmptyReadonlyArray(tailNonEmpty(singleNames))) {
@@ -5028,7 +5028,7 @@ const parseInternal$1 = (self, args, config) => {
5028
5028
  case "Variadic": {
5029
5029
  const min = getOrElse(self.min, () => 0);
5030
5030
  const max = getOrElse(self.max, () => Number.MAX_SAFE_INTEGER);
5031
- const matchedArgument = filterMap(getNames$1(self), (name) => get$16(args, name));
5031
+ const matchedArgument = filterMap(getNames$1(self), (name) => get$17(args, name));
5032
5032
  const validateMinMax = (values) => {
5033
5033
  if (values.length < min) return fail$2(invalidValue(p$1(`Expected at least ${min} value(s) for option: '${self.argumentOption.fullName}'`)));
5034
5034
  if (values.length > max) return fail$2(invalidValue(p$1(`Expected at most ${max} value(s) for option: '${self.argumentOption.fullName}'`)));
@@ -5060,7 +5060,7 @@ const wizardInternal$1 = (self, config) => {
5060
5060
  return parseCommandLine(self, args, config).pipe(as(args));
5061
5061
  }), zipLeft(log()));
5062
5062
  }
5063
- case "KeyValueMap": return list$15({
5063
+ case "KeyValueMap": return list$16({
5064
5064
  message: toAnsiText(p$1("Enter `key=value` pairs separated by spaces")).trim(),
5065
5065
  delimiter: " "
5066
5066
  }).pipe(flatMap$1((args) => {
@@ -5088,7 +5088,7 @@ const wizardInternal$1 = (self, config) => {
5088
5088
  message: toAnsiText(pipe(getHelpInternal$1(self), sequence(repeatHelp))).trimEnd(),
5089
5089
  min: getMinSizeInternal(self),
5090
5090
  max: getMaxSizeInternal(self)
5091
- }).pipe(flatMap$1((n) => n <= 0 ? succeed$1(empty$11()) : make$24(empty$11()).pipe(flatMap$1((ref) => wizardInternal$1(self.argumentOption, config).pipe(flatMap$1((args) => update$8(ref, appendAll(args))), repeatN(n - 1), zipRight(get$15(ref)))))));
5091
+ }).pipe(flatMap$1((n) => n <= 0 ? succeed$1(empty$11()) : make$24(empty$11()).pipe(flatMap$1((ref) => wizardInternal$1(self.argumentOption, config).pipe(flatMap$1((args) => update$9(ref, appendAll(args))), repeatN(n - 1), zipRight(get$16(ref)))))));
5092
5092
  }
5093
5093
  case "WithDefault": {
5094
5094
  if (isBoolInternal(self.options)) return wizardInternal$1(self.options, config);
@@ -5496,7 +5496,7 @@ const merge$1 = (map1, map2) => {
5496
5496
  if (isNonEmptyReadonlyArray(map2)) {
5497
5497
  const head = headNonEmpty(map2);
5498
5498
  const tail = tailNonEmpty(map2);
5499
- return merge$1(match(get$16(map1, head[0]), {
5499
+ return merge$1(match(get$17(map1, head[0]), {
5500
5500
  onNone: () => set$2(map1, head[0], head[1]),
5501
5501
  onSome: (elems) => set$2(map1, head[0], appendAll(elems, head[1]))
5502
5502
  }), tail);
@@ -5522,7 +5522,7 @@ const getBashCompletions$1 = (self) => {
5522
5522
  switch (self._tag) {
5523
5523
  case "Empty": return empty$11();
5524
5524
  case "Single": {
5525
- const cases = join(getNames$1(self), "|");
5525
+ const cases = join$1(getNames$1(self), "|");
5526
5526
  const compgen = getBashCompletions$2(self.primitiveType);
5527
5527
  return make$23(`${cases})`, ` COMPREPLY=( ${compgen} )`, ` return 0`, ` ;;`);
5528
5528
  }
@@ -5542,7 +5542,7 @@ const getFishCompletions$1 = (self) => {
5542
5542
  case "Single": {
5543
5543
  const description = getShortDescription$1(self);
5544
5544
  const order = mapInput(boolean$3, (tuple) => !tuple[0]);
5545
- return pipe(prepend$1(self.aliases, self.name), map$7((name) => [name.length === 1, name]), sort$2(order), flatMap$4(([isShort, name]) => make$23(isShort ? "-s" : "-l", name)), appendAll(getFishCompletions$3(self.primitiveType)), appendAll(description.length === 0 ? empty$11() : of$2(`-d '${description}'`)), join(" "), of$2);
5545
+ return pipe(prepend$1(self.aliases, self.name), map$7((name) => [name.length === 1, name]), sort$2(order), flatMap$4(([isShort, name]) => make$23(isShort ? "-s" : "-l", name)), appendAll(getFishCompletions$3(self.primitiveType)), appendAll(description.length === 0 ? empty$11() : of$2(`-d '${description}'`)), join$1(" "), of$2);
5546
5546
  }
5547
5547
  case "KeyValueMap":
5548
5548
  case "Variadic": return getFishCompletions$1(self.argumentOption);
@@ -5565,7 +5565,7 @@ const getZshCompletions$1 = (self, state = {
5565
5565
  const description = getShortDescription$1(self);
5566
5566
  const possibleValues = getZshCompletions$3(self.primitiveType);
5567
5567
  const multiple = state.multiple ? "*" : "";
5568
- const conflicts = isNonEmptyReadonlyArray(state.conflicts) ? `(${join(state.conflicts, " ")})` : "";
5568
+ const conflicts = isNonEmptyReadonlyArray(state.conflicts) ? `(${join$1(state.conflicts, " ")})` : "";
5569
5569
  return map$7(names, (name) => `${conflicts}${multiple}${name}[${escape$1(description)}]${possibleValues}`);
5570
5570
  }
5571
5571
  case "KeyValueMap": return getZshCompletions$1(self.argumentOption, {
@@ -5829,10 +5829,10 @@ const getHelpInternal = (self, config) => {
5829
5829
  }
5830
5830
  };
5831
5831
  const printSubcommands = (subcommands) => {
5832
- const maxUsageLength = reduceRight(subcommands, 0, (max, [usage]) => Math.max(size$9(usage), max));
5832
+ const maxUsageLength = reduceRight(subcommands, 0, (max, [usage]) => Math.max(size$10(usage), max));
5833
5833
  const documents = map$7(subcommands, ([usage, desc]) => p$1(spans([
5834
5834
  usage,
5835
- text$10(" ".repeat(maxUsageLength - size$9(usage) + 2)),
5835
+ text$10(" ".repeat(maxUsageLength - size$10(usage) + 2)),
5836
5836
  desc
5837
5837
  ])));
5838
5838
  if (isNonEmptyReadonlyArray(documents)) return enumeration(documents);
@@ -5991,7 +5991,7 @@ const parseInternal = (self, args, config) => {
5991
5991
  if (isCommandMismatch(err)) {
5992
5992
  const parentName = getOrElse(head$2(names), () => "");
5993
5993
  const childNames = map$7(subcommands, ([name]) => `'${name}'`);
5994
- return fail$2(commandMismatch(p$1(`Invalid subcommand for ${parentName} - use${childNames.length === 1 ? "" : " one of"} ${join(childNames, ", ")}`)));
5994
+ return fail$2(commandMismatch(p$1(`Invalid subcommand for ${parentName} - use${childNames.length === 1 ? "" : " one of"} ${join$1(childNames, ", ")}`)));
5995
5995
  }
5996
5996
  return fail$2(err);
5997
5997
  }));
@@ -6047,8 +6047,8 @@ const wizardInternal = (self, prefix, config) => {
6047
6047
  switch (self._tag) {
6048
6048
  case "GetUserInput":
6049
6049
  case "Standard": return gen(function* () {
6050
- const logCurrentCommand = get$15(commandLineRef).pipe(flatMap$1((commandLine) => {
6051
- return log(toAnsiText(p$1(pipe(strong(highlight("COMMAND:", cyan)), concat$1(space), concat$1(highlight(join(commandLine, " "), magenta))))));
6050
+ const logCurrentCommand = get$16(commandLineRef).pipe(flatMap$1((commandLine) => {
6051
+ return log(toAnsiText(p$1(pipe(strong(highlight("COMMAND:", cyan)), concat$1(space), concat$1(highlight(join$1(commandLine, " "), magenta))))));
6052
6052
  }));
6053
6053
  if (isStandard(self)) {
6054
6054
  yield* logCurrentCommand;
@@ -6064,7 +6064,7 @@ const wizardInternal = (self, prefix, config) => {
6064
6064
  yield* logCurrentCommand;
6065
6065
  }
6066
6066
  }
6067
- return yield* get$15(commandLineRef);
6067
+ return yield* get$16(commandLineRef);
6068
6068
  });
6069
6069
  case "Map": return loop(self.command, commandLineRef);
6070
6070
  case "Subcommands": {
@@ -6077,11 +6077,11 @@ const wizardInternal = (self, prefix, config) => {
6077
6077
  return loop(self.parent, commandLineRef).pipe(zipRight(select({
6078
6078
  message,
6079
6079
  choices
6080
- }).pipe(tap(([name]) => update$8(commandLineRef, append$2(name))), zipLeft(log()), flatMap$1(([, nextIndex]) => loop(self.children[nextIndex], commandLineRef)))));
6080
+ }).pipe(tap(([name]) => update$9(commandLineRef, append$2(name))), zipLeft(log()), flatMap$1(([, nextIndex]) => loop(self.children[nextIndex], commandLineRef)))));
6081
6081
  }
6082
6082
  }
6083
6083
  };
6084
- return make$24(prefix).pipe(flatMap$1((commandLineRef) => loop(self, commandLineRef).pipe(zipRight(get$15(commandLineRef)))));
6084
+ return make$24(prefix).pipe(flatMap$1((commandLineRef) => loop(self, commandLineRef).pipe(zipRight(get$16(commandLineRef)))));
6085
6085
  };
6086
6086
  const getShortDescription = (self) => {
6087
6087
  switch (self._tag) {
@@ -6125,7 +6125,7 @@ const traverseCommand = (self, initialState, f) => make$26(initialState).pipe(fl
6125
6125
  }
6126
6126
  }
6127
6127
  };
6128
- return suspend(() => loop(self, empty$11(), empty$11(), 0)).pipe(zipRight(get$17(ref)));
6128
+ return suspend(() => loop(self, empty$11(), empty$11(), 0)).pipe(zipRight(get$18(ref)));
6129
6129
  }));
6130
6130
  const indentAll = /*#__PURE__*/ dual(2, (self, indent) => {
6131
6131
  const indentation = allocate(indent + 1).join(" ");
@@ -6136,15 +6136,15 @@ const getBashCompletionsInternal = (self, executable) => traverseCommand(self, e
6136
6136
  const optionCases = isStandard(info.command) ? getBashCompletions$1(info.command.options) : empty$11();
6137
6137
  const wordList = appendAll(optionNames, pipe(info.subcommands, map$7(([name]) => name), sort$2(string$1)));
6138
6138
  const preformatted = isEmptyReadonlyArray(info.parentCommands) ? of$2(info.command.name) : pipe(info.parentCommands, append$2(info.command.name), map$7((command) => command.replaceAll("-", "__")));
6139
- const caseName = join(preformatted, ",");
6140
- const funcName = join(preformatted, "__");
6139
+ const caseName = join$1(preformatted, ",");
6140
+ const funcName = join$1(preformatted, "__");
6141
6141
  return succeed$1(append$2(state, [isEmptyReadonlyArray(info.parentCommands) ? empty$11() : [
6142
6142
  `${caseName})`,
6143
6143
  ` cmd="${funcName}"`,
6144
6144
  " ;;"
6145
6145
  ], [
6146
6146
  `${funcName})`,
6147
- ` opts="${join(wordList, " ")}"`,
6147
+ ` opts="${join$1(wordList, " ")}"`,
6148
6148
  ` if [[ \${cur} == -* || \${COMP_CWORD} -eq ${info.level + 1} ]] ; then`,
6149
6149
  " COMPREPLY=( $(compgen -W \"${opts}\" -- \"${cur}\") )",
6150
6150
  " return 0",
@@ -6193,26 +6193,26 @@ const getFishCompletionsInternal = (self, executable) => traverseCommand(self, e
6193
6193
  const baseTemplate = make$23("complete", "-c", executable);
6194
6194
  const optionsCompletions = getFishCompletions$1(isStandard(info.command) ? all$3([builtIns, info.command.options]) : builtIns);
6195
6195
  const argsCompletions = isStandard(info.command) ? getFishCompletions$2(info.command.args) : empty$11();
6196
- const rootCompletions = (conditionals) => pipe(map$7(optionsCompletions, (option) => pipe(baseTemplate, appendAll(conditionals), append$2(option), join(" "))), appendAll(map$7(argsCompletions, (option) => pipe(baseTemplate, appendAll(conditionals), append$2(option), join(" ")))));
6196
+ const rootCompletions = (conditionals) => pipe(map$7(optionsCompletions, (option) => pipe(baseTemplate, appendAll(conditionals), append$2(option), join$1(" "))), appendAll(map$7(argsCompletions, (option) => pipe(baseTemplate, appendAll(conditionals), append$2(option), join$1(" ")))));
6197
6197
  const subcommandCompletions = (conditionals) => map$7(info.subcommands, ([name, subcommand]) => {
6198
6198
  const description = getShortDescription(subcommand);
6199
- return pipe(baseTemplate, appendAll(conditionals), appendAll(make$23("-f", "-a", `"${name}"`)), appendAll(description.length === 0 ? empty$11() : make$23("-d", `'${description}'`)), join(" "));
6199
+ return pipe(baseTemplate, appendAll(conditionals), appendAll(make$23("-f", "-a", `"${name}"`)), appendAll(description.length === 0 ? empty$11() : make$23("-d", `'${description}'`)), join$1(" "));
6200
6200
  });
6201
6201
  if (isEmptyReadonlyArray(info.parentCommands)) {
6202
6202
  const conditionals = make$23("-n", "\"__fish_use_subcommand\"");
6203
6203
  return succeed$1(pipe(state, appendAll(rootCompletions(conditionals)), appendAll(subcommandCompletions(conditionals))));
6204
6204
  }
6205
- const conditionals = make$23("-n", `"${pipe(appendAll(pipe(info.parentCommands, drop(1), append$2(info.command.name), map$7((command) => `__fish_seen_subcommand_from ${command}`)), map$7(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`)), join("; and "))}"`);
6205
+ const conditionals = make$23("-n", `"${pipe(appendAll(pipe(info.parentCommands, drop(1), append$2(info.command.name), map$7((command) => `__fish_seen_subcommand_from ${command}`)), map$7(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`)), join$1("; and "))}"`);
6206
6206
  return succeed$1(pipe(state, appendAll(rootCompletions(conditionals)), appendAll(subcommandCompletions(conditionals))));
6207
6207
  });
6208
6208
  const getZshCompletionsInternal = (self, executable) => traverseCommand(self, empty$11(), (state, info) => {
6209
6209
  const preformatted = isEmptyReadonlyArray(info.parentCommands) ? of$2(info.command.name) : pipe(info.parentCommands, append$2(info.command.name), map$7((command) => command.replaceAll("-", "__")));
6210
- const underscoreName = join(preformatted, "__");
6211
- const spaceName = join(preformatted, " ");
6210
+ const underscoreName = join$1(preformatted, "__");
6211
+ const spaceName = join$1(preformatted, " ");
6212
6212
  const subcommands = pipe(info.subcommands, map$7(([name, subcommand]) => {
6213
6213
  return `'${name}:${getShortDescription(subcommand)}' \\`;
6214
6214
  }));
6215
- const commands = isEmptyReadonlyArray(subcommands) ? `commands=()` : `commands=(\n${join(indentAll(subcommands, 8), "\n")}\n )`;
6215
+ const commands = isEmptyReadonlyArray(subcommands) ? `commands=()` : `commands=(\n${join$1(indentAll(subcommands, 8), "\n")}\n )`;
6216
6216
  return succeed$1(appendAll(state, [
6217
6217
  `(( $+functions[_${underscoreName}_commands] )) ||`,
6218
6218
  `_${underscoreName}_commands() {`,
@@ -6293,7 +6293,7 @@ const getZshSubcommandCases = (self, parentCommands, subcommands) => {
6293
6293
  const parentNames = getNamesInternal(self.parent);
6294
6294
  const parentLines = getZshSubcommandCases(self.parent, parentCommands, appendAll(subcommands, nextSubcommands));
6295
6295
  const childCases = pipe(self.children, flatMap$4((child) => getZshSubcommandCases(child, appendAll(parentCommands, parentNames), subcommands)));
6296
- const hyphenName = pipe(appendAll(parentCommands, parentNames), join("-"));
6296
+ const hyphenName = pipe(appendAll(parentCommands, parentNames), join$1("-"));
6297
6297
  return appendAll(parentLines, pipe(parentNames, flatMap$4((parentName) => [
6298
6298
  "case $state in",
6299
6299
  ` (${parentName})`,
@@ -6392,9 +6392,9 @@ const handleBuiltInOption = (self, executable, args, builtIn, execute, config, o
6392
6392
  case "ShowCompletions": {
6393
6393
  const command = fromIterable$1(getNames(self.command))[0];
6394
6394
  switch (builtIn.shellType) {
6395
- case "bash": return getBashCompletions(self.command, command).pipe(flatMap$1((completions) => log(join(completions, "\n"))));
6396
- case "fish": return getFishCompletions(self.command, command).pipe(flatMap$1((completions) => log(join(completions, "\n"))));
6397
- case "zsh": return getZshCompletions(self.command, command).pipe(flatMap$1((completions) => log(join(completions, "\n"))));
6395
+ case "bash": return getBashCompletions(self.command, command).pipe(flatMap$1((completions) => log(join$1(completions, "\n"))));
6396
+ case "fish": return getFishCompletions(self.command, command).pipe(flatMap$1((completions) => log(join$1(completions, "\n"))));
6397
+ case "zsh": return getZshCompletions(self.command, command).pipe(flatMap$1((completions) => log(join$1(completions, "\n"))));
6398
6398
  }
6399
6399
  }
6400
6400
  case "ShowWizard": {
@@ -6468,7 +6468,7 @@ const getWizardPrefix = (builtIn, rootCommand, commandLineArgs) => {
6468
6468
  return appendAll(rootCommand.split(/\s+/), args);
6469
6469
  };
6470
6470
  const renderWizardArgs = (args) => {
6471
- const params = pipe(filter$2(args, (param) => param.length > 0), join(" "));
6471
+ const params = pipe(filter$2(args, (param) => param.length > 0), join$1(" "));
6472
6472
  const executeMsg = text$10("You may now execute your command directly with the following options and arguments:");
6473
6473
  return blocks([
6474
6474
  p$1(strong(code("Wizard Mode Complete!"))),
@@ -7350,7 +7350,7 @@ const watchNode = (path, options) => asyncScoped((emit) => acquireRelease(sync((
7350
7350
  });
7351
7351
  return watcher;
7352
7352
  }), (watcher) => sync(() => watcher.close())));
7353
- const watch = (backend, path, options) => stat(path).pipe(map$6((stat) => backend.pipe(flatMap$3((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, options)))), unwrap$16);
7353
+ const watch = (backend, path, options) => stat(path).pipe(map$6((stat) => backend.pipe(flatMap$3((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, options)))), unwrap$17);
7354
7354
  const writeFile = (path, data, options) => async((resume, signal) => {
7355
7355
  try {
7356
7356
  NFS.writeFile(path, data, {
@@ -7467,7 +7467,7 @@ const layer$3 = /* @__PURE__ */ scoped$1(Terminal, /*#__PURE__*/ (/* @__PURE__ *
7467
7467
  const rows = sync(() => stdout.rows ?? 0);
7468
7468
  const isTTY = sync(() => Boolean(stdout.isTTY));
7469
7469
  const readInput = gen(function* () {
7470
- yield* get$18(rlRef);
7470
+ yield* get$19(rlRef);
7471
7471
  const mailbox = yield* make$30();
7472
7472
  const handleKeypress = (s, k) => {
7473
7473
  const userInput = {
@@ -7486,7 +7486,7 @@ const layer$3 = /* @__PURE__ */ scoped$1(Terminal, /*#__PURE__*/ (/* @__PURE__ *
7486
7486
  stdin.on("keypress", handleKeypress);
7487
7487
  return mailbox;
7488
7488
  });
7489
- const readLine = get$18(rlRef).pipe(flatMap$1((readlineInterface) => async((resume) => {
7489
+ const readLine = get$19(rlRef).pipe(flatMap$1((readlineInterface) => async((resume) => {
7490
7490
  const onLine = (line) => resume(succeed$1(line));
7491
7491
  readlineInterface.once("line", onLine);
7492
7492
  return sync(() => readlineInterface.off("line", onLine));
@@ -7713,7 +7713,7 @@ const makePlatform$1 = () => (options) => PlatformWorker$1.of({
7713
7713
  for (const [message, transfers] of buffer) port.postMessage([0, message], transfers);
7714
7714
  buffer.length = 0;
7715
7715
  }
7716
- return yield* restore(join$1(fiberSet));
7716
+ return yield* restore(join$2(fiberSet));
7717
7717
  }).pipe(scoped));
7718
7718
  const send = (message, transfers) => try_({
7719
7719
  try: () => {
@@ -8350,7 +8350,7 @@ const make$11 = (method) => (url, options) => modify(empty, {
8350
8350
  ...options ?? void 0
8351
8351
  });
8352
8352
  /** @internal */
8353
- const get$14 = /*#__PURE__*/ make$11("GET");
8353
+ const get$15 = /*#__PURE__*/ make$11("GET");
8354
8354
  /** @internal */
8355
8355
  const post$1 = /*#__PURE__*/ make$11("POST");
8356
8356
  /** @internal */
@@ -8358,7 +8358,7 @@ const put$1 = /*#__PURE__*/ make$11("PUT");
8358
8358
  /** @internal */
8359
8359
  const patch$1 = /*#__PURE__*/ make$11("PATCH");
8360
8360
  /** @internal */
8361
- const del$14 = /*#__PURE__*/ make$11("DELETE");
8361
+ const del$15 = /*#__PURE__*/ make$11("DELETE");
8362
8362
  /** @internal */
8363
8363
  const head$1 = /*#__PURE__*/ make$11("HEAD");
8364
8364
  /** @internal */
@@ -8452,7 +8452,7 @@ const ClientProto = {
8452
8452
  return { _id: "@effect/platform/HttpClient" };
8453
8453
  },
8454
8454
  get(url, options) {
8455
- return this.execute(get$14(url, options));
8455
+ return this.execute(get$15(url, options));
8456
8456
  },
8457
8457
  head(url, options) {
8458
8458
  return this.execute(head$1(url, options));
@@ -8467,7 +8467,7 @@ const ClientProto = {
8467
8467
  return this.execute(patch$1(url, options));
8468
8468
  },
8469
8469
  del(url, options) {
8470
- return this.execute(del$14(url, options));
8470
+ return this.execute(del$15(url, options));
8471
8471
  },
8472
8472
  options(url, options) {
8473
8473
  return this.execute(options$1(url, options));
@@ -8536,7 +8536,7 @@ const make$10 = (f) => makeWith((effect) => flatMap$1(effect, (request) => withF
8536
8536
  }
8537
8537
  }));
8538
8538
  }
8539
- return useSpan(get$19(fiber.currentContext, SpanNameGenerator)(request), {
8539
+ return useSpan(get$20(fiber.currentContext, SpanNameGenerator)(request), {
8540
8540
  kind: "client",
8541
8541
  captureStackTrace: false
8542
8542
  }, (span) => {
@@ -8630,7 +8630,7 @@ var InterruptibleResponse = class {
8630
8630
  return this.original[NodeInspectSymbol]();
8631
8631
  }
8632
8632
  };
8633
- const { del: del$13, execute, get: get$13, head, options, patch, post, put } = /*#__PURE__*/ serviceFunctions(tag);
8633
+ const { del: del$14, execute, get: get$14, head, options, patch, post, put } = /*#__PURE__*/ serviceFunctions(tag);
8634
8634
  /** @internal */
8635
8635
  const transformResponse = /*#__PURE__*/ dual(2, (self, f) => {
8636
8636
  const client = self;
@@ -9235,7 +9235,7 @@ const normalizeErrorBody = (body) => {
9235
9235
  };
9236
9236
  //#endregion
9237
9237
  //#region src/domain/gate.ts
9238
- const SAFE_METHODS = new Set([
9238
+ const SAFE_METHODS = /* @__PURE__ */ new Set([
9239
9239
  "GET",
9240
9240
  "HEAD",
9241
9241
  "OPTIONS"
@@ -9919,7 +9919,7 @@ function makeApiService(http, config, auth, opts) {
9919
9919
  })));
9920
9920
  const maybeEmitBanner = (resolved) => gen(function* () {
9921
9921
  if (!resolved.isProduction || opts.quiet) return;
9922
- if (yield* get$15(bannerEmitted)) return;
9922
+ if (yield* get$16(bannerEmitted)) return;
9923
9923
  yield* set$3(bannerEmitted, true);
9924
9924
  yield* sync(() => {
9925
9925
  process.stderr.write(`mxs: profile=${resolved.profileName} (production) → ${resolved.apiUrl}\n`);
@@ -10011,7 +10011,7 @@ function makeApiService(http, config, auth, opts) {
10011
10011
  }
10012
10012
  const body = yield* parseBody(res);
10013
10013
  if (opts.verbose) {
10014
- if (!(yield* get$15(detectedWire))) {
10014
+ if (!(yield* get$16(detectedWire))) {
10015
10015
  const sniffed = detectWireVersion(body);
10016
10016
  if (sniffed) {
10017
10017
  yield* set$3(detectedWire, sniffed);
@@ -10048,7 +10048,7 @@ function parseBody(res) {
10048
10048
  function decodeWithSchema(schema, body) {
10049
10049
  return tryPromise({
10050
10050
  try: async () => {
10051
- const { Schema: SchemaMod } = await import("./esm-BumPuCXw.mjs");
10051
+ const { Schema: SchemaMod } = await import("./esm-jbwcVZth.mjs");
10052
10052
  return SchemaMod.decodeUnknownPromise(schema)(body);
10053
10053
  },
10054
10054
  catch: (err) => new ServerError({
@@ -10151,7 +10151,7 @@ function refreshOnce(auth, config, resolved, currentToken) {
10151
10151
  }
10152
10152
  //#endregion
10153
10153
  //#region src/services/Ai.ts
10154
- const unwrapData = (raw) => {
10154
+ const unwrapData$1 = (raw) => {
10155
10155
  if (raw && typeof raw === "object" && !Array.isArray(raw)) {
10156
10156
  const env = raw;
10157
10157
  if ("data" in env) return env.data;
@@ -10160,14 +10160,14 @@ const unwrapData = (raw) => {
10160
10160
  };
10161
10161
  const asRecord$1 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
10162
10162
  const readCreateTask = (raw) => {
10163
- const inner = asRecord$1(unwrapData(raw));
10163
+ const inner = asRecord$1(unwrapData$1(raw));
10164
10164
  return {
10165
10165
  taskId: typeof inner.taskId === "string" ? inner.taskId : void 0,
10166
10166
  created: typeof inner.created === "boolean" ? inner.created : void 0
10167
10167
  };
10168
10168
  };
10169
10169
  const readTaskRecord = (raw) => {
10170
- const inner = asRecord$1(unwrapData(raw));
10170
+ const inner = asRecord$1(unwrapData$1(raw));
10171
10171
  const result = asRecord$1(inner.result);
10172
10172
  const payload = asRecord$1(inner.payload);
10173
10173
  const errField = inner.error;
@@ -10191,7 +10191,7 @@ const toNumber$1 = (v) => {
10191
10191
  if (Number.isFinite(n)) return n;
10192
10192
  }
10193
10193
  };
10194
- const TERMINAL = new Set([
10194
+ const TERMINAL = /* @__PURE__ */ new Set([
10195
10195
  "completed",
10196
10196
  "partial_failed",
10197
10197
  "succeeded",
@@ -10289,7 +10289,7 @@ const make$5 = (api) => {
10289
10289
  page,
10290
10290
  size: SIZE
10291
10291
  } });
10292
- const data = unwrapData(raw);
10292
+ const data = unwrapData$1(raw);
10293
10293
  const groups = Array.isArray(data) ? data : [];
10294
10294
  for (const group of groups) for (const item of groupedItems(group, itemKeys)) {
10295
10295
  const r = asRecord$1(item);
@@ -11664,7 +11664,7 @@ function customAlphabet(alphabet, size = 21) {
11664
11664
  return customRandom(alphabet, size, random);
11665
11665
  }
11666
11666
  //#endregion
11667
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.29.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/src-B0q3dIvF.js
11667
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.30.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/src-B0q3dIvF.js
11668
11668
  var impl = null;
11669
11669
  function registerParseHTML(fn) {
11670
11670
  impl = fn;
@@ -13096,7 +13096,7 @@ const VALUE = Symbol("value");
13096
13096
  //#endregion
13097
13097
  //#region ../../node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode-codepoint.js
13098
13098
  var _a;
13099
- const decodeMap = new Map([
13099
+ const decodeMap = /* @__PURE__ */ new Map([
13100
13100
  [0, 65533],
13101
13101
  [128, 8364],
13102
13102
  [130, 8218],
@@ -14193,7 +14193,7 @@ var Tokenizer = class {
14193
14193
  };
14194
14194
  //#endregion
14195
14195
  //#region ../../node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/Parser.js
14196
- const formTags = new Set([
14196
+ const formTags = /* @__PURE__ */ new Set([
14197
14197
  "input",
14198
14198
  "option",
14199
14199
  "optgroup",
@@ -14202,28 +14202,28 @@ const formTags = new Set([
14202
14202
  "datalist",
14203
14203
  "textarea"
14204
14204
  ]);
14205
- const pTag = new Set(["p"]);
14206
- const tableSectionTags = new Set(["thead", "tbody"]);
14207
- const ddtTags = new Set(["dd", "dt"]);
14208
- const rtpTags = new Set(["rt", "rp"]);
14209
- const openImpliesClose = new Map([
14210
- ["tr", new Set([
14205
+ const pTag = /* @__PURE__ */ new Set(["p"]);
14206
+ const tableSectionTags = /* @__PURE__ */ new Set(["thead", "tbody"]);
14207
+ const ddtTags = /* @__PURE__ */ new Set(["dd", "dt"]);
14208
+ const rtpTags = /* @__PURE__ */ new Set(["rt", "rp"]);
14209
+ const openImpliesClose = /* @__PURE__ */ new Map([
14210
+ ["tr", /* @__PURE__ */ new Set([
14211
14211
  "tr",
14212
14212
  "th",
14213
14213
  "td"
14214
14214
  ])],
14215
- ["th", new Set(["th"])],
14216
- ["td", new Set([
14215
+ ["th", /* @__PURE__ */ new Set(["th"])],
14216
+ ["td", /* @__PURE__ */ new Set([
14217
14217
  "thead",
14218
14218
  "th",
14219
14219
  "td"
14220
14220
  ])],
14221
- ["body", new Set([
14221
+ ["body", /* @__PURE__ */ new Set([
14222
14222
  "head",
14223
14223
  "link",
14224
14224
  "script"
14225
14225
  ])],
14226
- ["li", new Set(["li"])],
14226
+ ["li", /* @__PURE__ */ new Set(["li"])],
14227
14227
  ["p", pTag],
14228
14228
  ["h1", pTag],
14229
14229
  ["h2", pTag],
@@ -14237,8 +14237,8 @@ const openImpliesClose = new Map([
14237
14237
  ["button", formTags],
14238
14238
  ["datalist", formTags],
14239
14239
  ["textarea", formTags],
14240
- ["option", new Set(["option"])],
14241
- ["optgroup", new Set(["optgroup", "option"])],
14240
+ ["option", /* @__PURE__ */ new Set(["option"])],
14241
+ ["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
14242
14242
  ["dd", ddtTags],
14243
14243
  ["dt", ddtTags],
14244
14244
  ["address", pTag],
@@ -14267,7 +14267,7 @@ const openImpliesClose = new Map([
14267
14267
  ["tbody", tableSectionTags],
14268
14268
  ["tfoot", tableSectionTags]
14269
14269
  ]);
14270
- const voidElements$1 = new Set([
14270
+ const voidElements$1 = /* @__PURE__ */ new Set([
14271
14271
  "area",
14272
14272
  "base",
14273
14273
  "basefont",
@@ -14288,8 +14288,8 @@ const voidElements$1 = new Set([
14288
14288
  "track",
14289
14289
  "wbr"
14290
14290
  ]);
14291
- const foreignContextElements = new Set(["math", "svg"]);
14292
- const htmlIntegrationElements = new Set([
14291
+ const foreignContextElements = /* @__PURE__ */ new Set(["math", "svg"]);
14292
+ const htmlIntegrationElements = /* @__PURE__ */ new Set([
14293
14293
  "mi",
14294
14294
  "mo",
14295
14295
  "mn",
@@ -15129,7 +15129,7 @@ var DomHandler = class {
15129
15129
  //#endregion
15130
15130
  //#region ../../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/escape.js
15131
15131
  const xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
15132
- const xmlCodeMap = new Map([
15132
+ const xmlCodeMap = /* @__PURE__ */ new Map([
15133
15133
  [34, "&quot;"],
15134
15134
  [38, "&amp;"],
15135
15135
  [39, "&apos;"],
@@ -15191,7 +15191,7 @@ function getEscaper(regex, map) {
15191
15191
  *
15192
15192
  * @param data String to escape.
15193
15193
  */
15194
- const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
15194
+ const escapeAttribute = getEscaper(/["&\u00A0]/g, /* @__PURE__ */ new Map([
15195
15195
  [34, "&quot;"],
15196
15196
  [38, "&amp;"],
15197
15197
  [160, "&nbsp;"]
@@ -15202,7 +15202,7 @@ const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([
15202
15202
  *
15203
15203
  * @param data String to escape.
15204
15204
  */
15205
- const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([
15205
+ const escapeText = getEscaper(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
15206
15206
  [38, "&amp;"],
15207
15207
  [60, "&lt;"],
15208
15208
  [62, "&gt;"],
@@ -15318,7 +15318,7 @@ const attributeNames = new Map([
15318
15318
  *
15319
15319
  * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
15320
15320
  */
15321
- const unencodedElements = new Set([
15321
+ const unencodedElements = /* @__PURE__ */ new Set([
15322
15322
  "style",
15323
15323
  "script",
15324
15324
  "xmp",
@@ -15349,7 +15349,7 @@ function formatAttributes(attributes, opts) {
15349
15349
  /**
15350
15350
  * Self-enclosing tags
15351
15351
  */
15352
- const singleTag = new Set([
15352
+ const singleTag = /* @__PURE__ */ new Set([
15353
15353
  "area",
15354
15354
  "base",
15355
15355
  "basefont",
@@ -15397,7 +15397,7 @@ function renderNode(node, options) {
15397
15397
  case Text$3: return renderText(node, options);
15398
15398
  }
15399
15399
  }
15400
- const foreignModeIntegrationPoints = new Set([
15400
+ const foreignModeIntegrationPoints = /* @__PURE__ */ new Set([
15401
15401
  "mi",
15402
15402
  "mo",
15403
15403
  "mn",
@@ -15408,7 +15408,7 @@ const foreignModeIntegrationPoints = new Set([
15408
15408
  "desc",
15409
15409
  "title"
15410
15410
  ]);
15411
- const foreignElements = new Set(["svg", "math"]);
15411
+ const foreignElements = /* @__PURE__ */ new Set(["svg", "math"]);
15412
15412
  function renderTag(elem, opts) {
15413
15413
  var _a;
15414
15414
  if (opts.xmlMode === "foreign") {
@@ -16388,7 +16388,7 @@ function parseFeed(feed, options = parseFeedDefaultOptions) {
16388
16388
  }
16389
16389
  //#endregion
16390
16390
  //#region ../../node_modules/.pnpm/linkedom@0.18.12/node_modules/linkedom/esm/shared/constants.js
16391
- const BLOCK_ELEMENTS = new Set([
16391
+ const BLOCK_ELEMENTS = /* @__PURE__ */ new Set([
16392
16392
  "ARTICLE",
16393
16393
  "ASIDE",
16394
16394
  "BLOCKQUOTE",
@@ -16423,7 +16423,7 @@ const BLOCK_ELEMENTS = new Set([
16423
16423
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
16424
16424
  //#endregion
16425
16425
  //#region ../../node_modules/.pnpm/linkedom@0.18.12/node_modules/linkedom/esm/shared/object.js
16426
- const { assign, create: create$8, defineProperties, entries, getOwnPropertyDescriptors, keys, setPrototypeOf } = Object;
16426
+ const { assign, create: create$9, defineProperties, entries, getOwnPropertyDescriptors, keys, setPrototypeOf } = Object;
16427
16427
  //#endregion
16428
16428
  //#region ../../node_modules/.pnpm/linkedom@0.18.12/node_modules/linkedom/esm/shared/utils.js
16429
16429
  const $String = String;
@@ -16887,7 +16887,7 @@ var MutationObserverClass = class {
16887
16887
  };
16888
16888
  //#endregion
16889
16889
  //#region ../../node_modules/.pnpm/linkedom@0.18.12/node_modules/linkedom/esm/shared/attributes.js
16890
- const emptyAttributes = new Set([
16890
+ const emptyAttributes = /* @__PURE__ */ new Set([
16891
16891
  "allowfullscreen",
16892
16892
  "allowpaymentrequest",
16893
16893
  "async",
@@ -17584,7 +17584,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
17584
17584
  var types_1 = require_types();
17585
17585
  var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;
17586
17586
  var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi;
17587
- var actionTypes = new Map([
17587
+ var actionTypes = /* @__PURE__ */ new Map([
17588
17588
  [126, types_1.AttributeAction.Element],
17589
17589
  [94, types_1.AttributeAction.Start],
17590
17590
  [36, types_1.AttributeAction.End],
@@ -17592,7 +17592,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
17592
17592
  [33, types_1.AttributeAction.Not],
17593
17593
  [124, types_1.AttributeAction.Hyphen]
17594
17594
  ]);
17595
- var unpackPseudos = new Set([
17595
+ var unpackPseudos = /* @__PURE__ */ new Set([
17596
17596
  "has",
17597
17597
  "not",
17598
17598
  "matches",
@@ -17620,7 +17620,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
17620
17620
  }
17621
17621
  }
17622
17622
  exports.isTraversal = isTraversal;
17623
- var stripQuotesFromPseudos = new Set(["contains", "icontains"]);
17623
+ var stripQuotesFromPseudos = /* @__PURE__ */ new Set(["contains", "icontains"]);
17624
17624
  function funescape(_, escaped, escapedWhitespace) {
17625
17625
  var high = parseInt(escaped, 16) - 65536;
17626
17626
  return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
@@ -18036,7 +18036,7 @@ var require_commonjs = /* @__PURE__ */ __commonJSMin(((exports) => {
18036
18036
  //#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/sort.js
18037
18037
  var import_boolbase = /* @__PURE__ */ __toESM(require_boolbase(), 1);
18038
18038
  var import_commonjs = require_commonjs();
18039
- const procedure = new Map([
18039
+ const procedure = /* @__PURE__ */ new Map([
18040
18040
  [import_commonjs.SelectorType.Universal, 50],
18041
18041
  [import_commonjs.SelectorType.Tag, 30],
18042
18042
  [import_commonjs.SelectorType.Attribute, 1],
@@ -18045,7 +18045,7 @@ const procedure = new Map([
18045
18045
  function isTraversal(token) {
18046
18046
  return !procedure.has(token.type);
18047
18047
  }
18048
- const attributes = new Map([
18048
+ const attributes = /* @__PURE__ */ new Map([
18049
18049
  [import_commonjs.AttributeAction.Exists, 10],
18050
18050
  [import_commonjs.AttributeAction.Equals, 8],
18051
18051
  [import_commonjs.AttributeAction.Not, 7],
@@ -18107,7 +18107,7 @@ function escapeRegex(value) {
18107
18107
  * @private
18108
18108
  * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors
18109
18109
  */
18110
- const caseInsensitiveAttributes = new Set([
18110
+ const caseInsensitiveAttributes = /* @__PURE__ */ new Set([
18111
18111
  "accept",
18112
18112
  "accept-charset",
18113
18113
  "align",
@@ -18274,7 +18274,7 @@ const attributeRules = {
18274
18274
  };
18275
18275
  //#endregion
18276
18276
  //#region ../../node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/parse.js
18277
- const whitespace = new Set([
18277
+ const whitespace = /* @__PURE__ */ new Set([
18278
18278
  9,
18279
18279
  10,
18280
18280
  12,
@@ -19327,7 +19327,7 @@ const { add } = Set.prototype;
19327
19327
  const addTokens = (self, tokens) => {
19328
19328
  for (const token of tokens) if (token) add.call(self, token);
19329
19329
  };
19330
- const update$7 = ({ [OWNER_ELEMENT]: ownerElement, value }) => {
19330
+ const update$8 = ({ [OWNER_ELEMENT]: ownerElement, value }) => {
19331
19331
  const attribute = ownerElement.getAttributeNode("class");
19332
19332
  if (attribute) attribute.value = value;
19333
19333
  else setAttribute(ownerElement, new Attr$1(ownerElement.ownerDocument, "class", value));
@@ -19353,7 +19353,7 @@ var DOMTokenList = class extends Set {
19353
19353
  */
19354
19354
  add(...tokens) {
19355
19355
  addTokens(this, tokens);
19356
- update$7(this);
19356
+ update$8(this);
19357
19357
  }
19358
19358
  /**
19359
19359
  * @param {string} token
@@ -19366,7 +19366,7 @@ var DOMTokenList = class extends Set {
19366
19366
  */
19367
19367
  remove(...tokens) {
19368
19368
  for (const token of tokens) this.delete(token);
19369
- update$7(this);
19369
+ update$8(this);
19370
19370
  }
19371
19371
  /**
19372
19372
  * @param {string} token
@@ -19376,10 +19376,10 @@ var DOMTokenList = class extends Set {
19376
19376
  if (this.has(token)) {
19377
19377
  if (force) return true;
19378
19378
  this.delete(token);
19379
- update$7(this);
19379
+ update$8(this);
19380
19380
  } else if (force || arguments.length === 1) {
19381
19381
  super.add(token);
19382
- update$7(this);
19382
+ update$8(this);
19383
19383
  return true;
19384
19384
  }
19385
19385
  return false;
@@ -19392,7 +19392,7 @@ var DOMTokenList = class extends Set {
19392
19392
  if (this.has(token)) {
19393
19393
  this.delete(token);
19394
19394
  super.add(newToken);
19395
- update$7(this);
19395
+ update$8(this);
19396
19396
  return true;
19397
19397
  }
19398
19398
  return false;
@@ -19636,7 +19636,7 @@ var ShadowRoot$1 = class extends NonElementParentNode {
19636
19636
  const attributesHandler = { get(target, key) {
19637
19637
  return key in target ? target[key] : target.find(({ name }) => name === key);
19638
19638
  } };
19639
- const create$7 = (ownerDocument, element, localName) => {
19639
+ const create$8 = (ownerDocument, element, localName) => {
19640
19640
  if ("ownerSVGElement" in element) {
19641
19641
  const svg = ownerDocument.createElementNS(SVG_NAMESPACE, localName);
19642
19642
  svg.ownerSVGElement = element.ownerSVGElement;
@@ -19946,7 +19946,7 @@ var Element$1 = class extends ParentNode {
19946
19946
  knownAdjacent($next, next);
19947
19947
  $next = next;
19948
19948
  };
19949
- const clone = create$7(ownerDocument, this, localName);
19949
+ const clone = create$8(ownerDocument, this, localName);
19950
19950
  let parentNode = clone, $next = clone;
19951
19951
  let { [NEXT]: next, [END]: prev } = this;
19952
19952
  while (next !== prev && (deep || next.nodeType === 2)) {
@@ -19957,7 +19957,7 @@ var Element$1 = class extends ParentNode {
19957
19957
  parentNode = parentNode.parentNode;
19958
19958
  break;
19959
19959
  case 1: {
19960
- const node = create$7(ownerDocument, next, next.localName);
19960
+ const node = create$8(ownerDocument, next, next.localName);
19961
19961
  addNext(node);
19962
19962
  parentNode = node;
19963
19963
  break;
@@ -23845,7 +23845,7 @@ var Document$1 = class extends NonElementParentNode {
23845
23845
  return this.createTreeWalker(root, whatToShow);
23846
23846
  }
23847
23847
  createEvent(name) {
23848
- const event = create$8(name === "Event" ? new GlobalEvent("") : new CustomEvent(""));
23848
+ const event = create$9(name === "Event" ? new GlobalEvent("") : new CustomEvent(""));
23849
23849
  event.initEvent = event.initCustomEvent = (type, canBubble = false, cancelable = false, detail) => {
23850
23850
  event.bubbles = !!canBubble;
23851
23851
  defineProperties(event, {
@@ -24059,7 +24059,7 @@ function Document() {
24059
24059
  }
24060
24060
  setPrototypeOf(Document, Document$1).prototype = Document$1.prototype;
24061
24061
  //#endregion
24062
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.29.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/node.mjs
24062
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.30.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/node.mjs
24063
24063
  registerParseHTML((html) => parseHTML(html).document);
24064
24064
  //#endregion
24065
24065
  //#region ../editor/src/core/litexml.ts
@@ -24103,7 +24103,7 @@ function stripMxLitexmlDocWrapper(xml) {
24103
24103
  * LICENSE file in the root directory of this source tree.
24104
24104
  *
24105
24105
  */
24106
- const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalTable.dev-DiR_4rdI.mjs") : import("./LexicalTable.prod-Cbc5EasT.mjs"));
24106
+ const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalTable.dev-Cc9-zqKa.mjs") : import("./LexicalTable.prod-BgO4nCxy.mjs"));
24107
24107
  mod$2.$computeTableMap;
24108
24108
  mod$2.$computeTableMapSkipCellCheck;
24109
24109
  mod$2.$createTableCellNode;
@@ -24172,7 +24172,7 @@ mod$2.setScrollableTablesActive;
24172
24172
  * LICENSE file in the root directory of this source tree.
24173
24173
  *
24174
24174
  */
24175
- const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalMarkdown.dev-0XURdo96.mjs") : import("./LexicalMarkdown.prod-qUsIQfJx.mjs"));
24175
+ const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalMarkdown.dev-C0ZYCyuR.mjs") : import("./LexicalMarkdown.prod-0M-Nc-rh.mjs"));
24176
24176
  mod$1.$convertFromMarkdownString;
24177
24177
  mod$1.$convertSelectionToMarkdownString;
24178
24178
  const $convertToMarkdownString = mod$1.$convertToMarkdownString;
@@ -24200,7 +24200,7 @@ mod$1.UNORDERED_LIST;
24200
24200
  mod$1.isTableRowDivider;
24201
24201
  mod$1.registerMarkdownShortcuts;
24202
24202
  //#endregion
24203
- //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.29.1_lexical@0.46.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/transformers.mjs
24203
+ //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.30.0_lexical@0.46.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/transformers.mjs
24204
24204
  /**
24205
24205
  * Headless Markdown transformers — export-only (Lexical → Markdown).
24206
24206
  * Import stubs are no-ops; used only for $convertToMarkdownString.
@@ -24627,7 +24627,7 @@ function $toMarkdown() {
24627
24627
  return $convertToMarkdownString(allHeadlessTransformers);
24628
24628
  }
24629
24629
  //#endregion
24630
- //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.29.1_lexical@0.46.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/index.mjs
24630
+ //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.30.0_lexical@0.46.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/index.mjs
24631
24631
  var INTRINSIC_TYPES = [
24632
24632
  "root",
24633
24633
  "paragraph",
@@ -25026,6 +25026,191 @@ var ChatNode = headlessDecorator("chat", [
25026
25026
  participants: [],
25027
25027
  messages: []
25028
25028
  });
25029
+ var BannerNode = class BannerNode extends DecoratorNode {
25030
+ static getType() {
25031
+ return "banner";
25032
+ }
25033
+ constructor(key) {
25034
+ super(key);
25035
+ this.__bannerType = "note";
25036
+ this.__contentState = null;
25037
+ }
25038
+ static clone(node) {
25039
+ const n = new BannerNode(node.__key);
25040
+ n.__bannerType = node.__bannerType;
25041
+ n.__contentState = node.__contentState;
25042
+ return n;
25043
+ }
25044
+ static importJSON(_json) {
25045
+ const json = _json;
25046
+ const node = new BannerNode();
25047
+ node.__bannerType = json.bannerType ?? "note";
25048
+ node.__contentState = json.content ?? null;
25049
+ return node;
25050
+ }
25051
+ exportJSON() {
25052
+ return {
25053
+ type: "banner",
25054
+ version: 1,
25055
+ bannerType: this.__bannerType,
25056
+ content: this.__contentState
25057
+ };
25058
+ }
25059
+ createDOM() {
25060
+ return stubDOM();
25061
+ }
25062
+ updateDOM() {
25063
+ return false;
25064
+ }
25065
+ decorate() {
25066
+ return null;
25067
+ }
25068
+ isInline() {
25069
+ return false;
25070
+ }
25071
+ getTextContent() {
25072
+ return extractText(this.__contentState);
25073
+ }
25074
+ };
25075
+ var AlertQuoteNode = class AlertQuoteNode extends DecoratorNode {
25076
+ static getType() {
25077
+ return "alert-quote";
25078
+ }
25079
+ constructor(key) {
25080
+ super(key);
25081
+ this.__alertType = "note";
25082
+ this.__contentState = null;
25083
+ }
25084
+ static clone(node) {
25085
+ const n = new AlertQuoteNode(node.__key);
25086
+ n.__alertType = node.__alertType;
25087
+ n.__contentState = node.__contentState;
25088
+ return n;
25089
+ }
25090
+ static importJSON(_json) {
25091
+ const json = _json;
25092
+ const node = new AlertQuoteNode();
25093
+ node.__alertType = json.alertType ?? "note";
25094
+ node.__contentState = json.content ?? null;
25095
+ return node;
25096
+ }
25097
+ exportJSON() {
25098
+ return {
25099
+ type: "alert-quote",
25100
+ version: 1,
25101
+ alertType: this.__alertType,
25102
+ content: this.__contentState
25103
+ };
25104
+ }
25105
+ createDOM() {
25106
+ return stubDOM();
25107
+ }
25108
+ updateDOM() {
25109
+ return false;
25110
+ }
25111
+ decorate() {
25112
+ return null;
25113
+ }
25114
+ isInline() {
25115
+ return false;
25116
+ }
25117
+ getTextContent() {
25118
+ return extractText(this.__contentState);
25119
+ }
25120
+ };
25121
+ var NestedDocNode = class NestedDocNode extends DecoratorNode {
25122
+ static getType() {
25123
+ return "nested-doc";
25124
+ }
25125
+ constructor(key) {
25126
+ super(key);
25127
+ this.__contentState = null;
25128
+ }
25129
+ static clone(node) {
25130
+ const n = new NestedDocNode(node.__key);
25131
+ n.__contentState = node.__contentState;
25132
+ return n;
25133
+ }
25134
+ static importJSON(_json) {
25135
+ const json = _json;
25136
+ const node = new NestedDocNode();
25137
+ node.__contentState = json.content ?? null;
25138
+ return node;
25139
+ }
25140
+ exportJSON() {
25141
+ return {
25142
+ type: "nested-doc",
25143
+ version: 1,
25144
+ content: this.__contentState
25145
+ };
25146
+ }
25147
+ createDOM() {
25148
+ return stubDOM();
25149
+ }
25150
+ updateDOM() {
25151
+ return false;
25152
+ }
25153
+ decorate() {
25154
+ return null;
25155
+ }
25156
+ isInline() {
25157
+ return false;
25158
+ }
25159
+ getTextContent() {
25160
+ return extractText(this.__contentState);
25161
+ }
25162
+ };
25163
+ var GridContainerNode = class GridContainerNode extends DecoratorNode {
25164
+ static getType() {
25165
+ return "grid-container";
25166
+ }
25167
+ constructor(key) {
25168
+ super(key);
25169
+ this.__cols = 2;
25170
+ this.__gap = "16px";
25171
+ this.__cells = [];
25172
+ }
25173
+ static clone(node) {
25174
+ const n = new GridContainerNode(node.__key);
25175
+ n.__cols = node.__cols;
25176
+ n.__gap = node.__gap;
25177
+ n.__cells = node.__cells;
25178
+ return n;
25179
+ }
25180
+ static importJSON(_json) {
25181
+ const json = _json;
25182
+ const node = new GridContainerNode();
25183
+ node.__cols = json.cols ?? 2;
25184
+ const rawGap = json.gap;
25185
+ node.__gap = typeof rawGap === "number" ? `${rawGap}px` : rawGap ?? "16px";
25186
+ node.__cells = json.cells ?? [];
25187
+ return node;
25188
+ }
25189
+ exportJSON() {
25190
+ return {
25191
+ type: "grid-container",
25192
+ version: 1,
25193
+ cols: this.__cols,
25194
+ gap: this.__gap,
25195
+ cells: this.__cells
25196
+ };
25197
+ }
25198
+ createDOM() {
25199
+ return stubDOM();
25200
+ }
25201
+ updateDOM() {
25202
+ return false;
25203
+ }
25204
+ decorate() {
25205
+ return null;
25206
+ }
25207
+ isInline() {
25208
+ return false;
25209
+ }
25210
+ getTextContent() {
25211
+ return this.__cells.map((cell) => extractText(cell)).join("\n");
25212
+ }
25213
+ };
25029
25214
  var customHeadlessNodes = [
25030
25215
  SpoilerNode,
25031
25216
  RubyNode,
@@ -25048,196 +25233,23 @@ var customHeadlessNodes = [
25048
25233
  DynamicNode,
25049
25234
  TagNode,
25050
25235
  CommentNode,
25051
- class BannerNode extends DecoratorNode {
25052
- static getType() {
25053
- return "banner";
25054
- }
25055
- constructor(key) {
25056
- super(key);
25057
- this.__bannerType = "note";
25058
- this.__contentState = null;
25059
- }
25060
- static clone(node) {
25061
- const n = new BannerNode(node.__key);
25062
- n.__bannerType = node.__bannerType;
25063
- n.__contentState = node.__contentState;
25064
- return n;
25065
- }
25066
- static importJSON(_json) {
25067
- const json = _json;
25068
- const node = new BannerNode();
25069
- node.__bannerType = json.bannerType ?? "note";
25070
- node.__contentState = json.content ?? null;
25071
- return node;
25072
- }
25073
- exportJSON() {
25074
- return {
25075
- type: "banner",
25076
- version: 1,
25077
- bannerType: this.__bannerType,
25078
- content: this.__contentState
25079
- };
25080
- }
25081
- createDOM() {
25082
- return stubDOM();
25083
- }
25084
- updateDOM() {
25085
- return false;
25086
- }
25087
- decorate() {
25088
- return null;
25089
- }
25090
- isInline() {
25091
- return false;
25092
- }
25093
- getTextContent() {
25094
- return extractText(this.__contentState);
25095
- }
25096
- },
25097
- class AlertQuoteNode extends DecoratorNode {
25098
- static getType() {
25099
- return "alert-quote";
25100
- }
25101
- constructor(key) {
25102
- super(key);
25103
- this.__alertType = "note";
25104
- this.__contentState = null;
25105
- }
25106
- static clone(node) {
25107
- const n = new AlertQuoteNode(node.__key);
25108
- n.__alertType = node.__alertType;
25109
- n.__contentState = node.__contentState;
25110
- return n;
25111
- }
25112
- static importJSON(_json) {
25113
- const json = _json;
25114
- const node = new AlertQuoteNode();
25115
- node.__alertType = json.alertType ?? "note";
25116
- node.__contentState = json.content ?? null;
25117
- return node;
25118
- }
25119
- exportJSON() {
25120
- return {
25121
- type: "alert-quote",
25122
- version: 1,
25123
- alertType: this.__alertType,
25124
- content: this.__contentState
25125
- };
25126
- }
25127
- createDOM() {
25128
- return stubDOM();
25129
- }
25130
- updateDOM() {
25131
- return false;
25132
- }
25133
- decorate() {
25134
- return null;
25135
- }
25136
- isInline() {
25137
- return false;
25138
- }
25139
- getTextContent() {
25140
- return extractText(this.__contentState);
25141
- }
25142
- },
25143
- class NestedDocNode extends DecoratorNode {
25144
- static getType() {
25145
- return "nested-doc";
25146
- }
25147
- constructor(key) {
25148
- super(key);
25149
- this.__contentState = null;
25150
- }
25151
- static clone(node) {
25152
- const n = new NestedDocNode(node.__key);
25153
- n.__contentState = node.__contentState;
25154
- return n;
25155
- }
25156
- static importJSON(_json) {
25157
- const json = _json;
25158
- const node = new NestedDocNode();
25159
- node.__contentState = json.content ?? null;
25160
- return node;
25161
- }
25162
- exportJSON() {
25163
- return {
25164
- type: "nested-doc",
25165
- version: 1,
25166
- content: this.__contentState
25167
- };
25168
- }
25169
- createDOM() {
25170
- return stubDOM();
25171
- }
25172
- updateDOM() {
25173
- return false;
25174
- }
25175
- decorate() {
25176
- return null;
25177
- }
25178
- isInline() {
25179
- return false;
25180
- }
25181
- getTextContent() {
25182
- return extractText(this.__contentState);
25183
- }
25184
- },
25185
- class GridContainerNode extends DecoratorNode {
25186
- static getType() {
25187
- return "grid-container";
25188
- }
25189
- constructor(key) {
25190
- super(key);
25191
- this.__cols = 2;
25192
- this.__gap = "16px";
25193
- this.__cells = [];
25194
- }
25195
- static clone(node) {
25196
- const n = new GridContainerNode(node.__key);
25197
- n.__cols = node.__cols;
25198
- n.__gap = node.__gap;
25199
- n.__cells = node.__cells;
25200
- return n;
25201
- }
25202
- static importJSON(_json) {
25203
- const json = _json;
25204
- const node = new GridContainerNode();
25205
- node.__cols = json.cols ?? 2;
25206
- const rawGap = json.gap;
25207
- node.__gap = typeof rawGap === "number" ? `${rawGap}px` : rawGap ?? "16px";
25208
- node.__cells = json.cells ?? [];
25209
- return node;
25210
- }
25211
- exportJSON() {
25212
- return {
25213
- type: "grid-container",
25214
- version: 1,
25215
- cols: this.__cols,
25216
- gap: this.__gap,
25217
- cells: this.__cells
25218
- };
25219
- }
25220
- createDOM() {
25221
- return stubDOM();
25222
- }
25223
- updateDOM() {
25224
- return false;
25225
- }
25226
- decorate() {
25227
- return null;
25228
- }
25229
- isInline() {
25230
- return false;
25231
- }
25232
- getTextContent() {
25233
- return this.__cells.map((cell) => extractText(cell)).join("\n");
25234
- }
25235
- },
25236
+ BannerNode,
25237
+ AlertQuoteNode,
25238
+ NestedDocNode,
25239
+ GridContainerNode,
25236
25240
  PollNode,
25237
25241
  ChatNode
25238
25242
  ];
25239
25243
  var allHeadlessNodes = [...builtinNodes, ...customHeadlessNodes];
25240
- const createHeadlessEditor = (await (process.env.NODE_ENV !== "production" ? import("./LexicalHeadless.dev-yVDOBd64.mjs") : import("./LexicalHeadless.prod-B8qauuEA.mjs"))).createHeadlessEditor;
25244
+ //#endregion
25245
+ //#region ../editor/src/core/haklex-isinline-patch.ts
25246
+ for (const klass of [
25247
+ BannerNode,
25248
+ AlertQuoteNode,
25249
+ GridContainerNode,
25250
+ NestedDocNode
25251
+ ]) klass.prototype.isInline = () => false;
25252
+ const createHeadlessEditor = (await (process.env.NODE_ENV !== "production" ? import("./LexicalHeadless.dev-DJp__UcP.mjs") : import("./LexicalHeadless.prod-o0v9cIu5.mjs"))).createHeadlessEditor;
25241
25253
  //#endregion
25242
25254
  //#region ../editor/src/core/nodes/litexml.ts
25243
25255
  const XML_ESCAPE_MAP = {
@@ -27037,11 +27049,11 @@ const LIMIT_TIER_ALL = "all";
27037
27049
  * @returns {Set<string>}
27038
27050
  */
27039
27051
  function parseLimitTiers(raw) {
27040
- if (!raw || raw === LIMIT_TIER_EXTERNAL) return new Set([LIMIT_TIER_EXTERNAL]);
27041
- if (raw === LIMIT_TIER_ALL) return new Set([LIMIT_TIER_ALL]);
27042
- if (raw === LIMIT_TIER_BASE) return new Set([LIMIT_TIER_BASE]);
27052
+ if (!raw || raw === LIMIT_TIER_EXTERNAL) return /* @__PURE__ */ new Set([LIMIT_TIER_EXTERNAL]);
27053
+ if (raw === LIMIT_TIER_ALL) return /* @__PURE__ */ new Set([LIMIT_TIER_ALL]);
27054
+ if (raw === LIMIT_TIER_BASE) return /* @__PURE__ */ new Set([LIMIT_TIER_BASE]);
27043
27055
  if (Array.isArray(raw)) return new Set(raw);
27044
- return new Set([LIMIT_TIER_EXTERNAL]);
27056
+ return /* @__PURE__ */ new Set([LIMIT_TIER_EXTERNAL]);
27045
27057
  }
27046
27058
  const NCR_LEVEL = Object.freeze({
27047
27059
  allow: 0,
@@ -27049,7 +27061,7 @@ const NCR_LEVEL = Object.freeze({
27049
27061
  remove: 2,
27050
27062
  throw: 3
27051
27063
  });
27052
- const XML10_ALLOWED_C0 = new Set([
27064
+ const XML10_ALLOWED_C0 = /* @__PURE__ */ new Set([
27053
27065
  9,
27054
27066
  10,
27055
27067
  13
@@ -27924,7 +27936,7 @@ const SCRIPT_ZEROS = [
27924
27936
  const HIGH_MAP = /* @__PURE__ */ new Map();
27925
27937
  const LOW_MAX = 65535;
27926
27938
  const TABLE_OFFSET = 1632;
27927
- const TABLE = new Uint8Array(63904).fill(255);
27939
+ const TABLE = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
27928
27940
  for (const zero of SCRIPT_ZEROS) for (let d = 0; d < 10; d++) {
27929
27941
  const cp = zero + d;
27930
27942
  if (cp <= LOW_MAX) TABLE[cp - TABLE_OFFSET] = d;
@@ -27935,7 +27947,7 @@ for (const zero of SCRIPT_ZEROS) for (let d = 0; d < 10; d++) {
27935
27947
  const CHAR_0 = 48;
27936
27948
  const CHAR_9 = 57;
27937
27949
  const CHAR_MINUS = 45;
27938
- const MINUS_SET = new Set([
27950
+ const MINUS_SET = /* @__PURE__ */ new Set([
27939
27951
  8722,
27940
27952
  65293,
27941
27953
  65123
@@ -30954,7 +30966,7 @@ const renderReadableGeneric = (data) => renderReadableLines(data, 0).join("\n");
30954
30966
  //#endregion
30955
30967
  //#region src/services/Renderer/service.ts
30956
30968
  const makeService$3 = () => {
30957
- const getOpts = get$20(currentOutputOptions);
30969
+ const getOpts = get$21(currentOutputOptions);
30958
30970
  const emitSuccessSync = (data, opts) => {
30959
30971
  if (opts.json || opts.output === "json") {
30960
30972
  writeStdout(`${JSON.stringify({
@@ -31293,12 +31305,12 @@ const resolveArticleId = (resolver, ref) => gen(function* () {
31293
31305
  });
31294
31306
  //#endregion
31295
31307
  //#region src/cli/ai/insights/by-article.ts
31296
- const id$8 = text$6({ name: "idOrSlug" });
31308
+ const id$12 = text$6({ name: "idOrSlug" });
31297
31309
  const lang$3 = text$4("lang").pipe(optional$4);
31298
31310
  const onlyDb$1 = boolean("only-db").pipe(withDescription$3("do not auto-generate on miss"));
31299
- const unwrap$15 = (value) => getOrUndefined(value);
31311
+ const unwrap$16 = (value) => getOrUndefined(value);
31300
31312
  const byArticle$2 = make$14("by-article", {
31301
- id: id$8,
31313
+ id: id$12,
31302
31314
  lang: lang$3,
31303
31315
  onlyDb: onlyDb$1
31304
31316
  }, ({ id, lang, onlyDb }) => gen(function* () {
@@ -31306,12 +31318,12 @@ const byArticle$2 = make$14("by-article", {
31306
31318
  const renderer = yield* Renderer;
31307
31319
  const refId = yield* resolveArticleId(yield* Resolver, id);
31308
31320
  const res = yield* ai.getInsightsByArticle(refId, {
31309
- lang: unwrap$15(lang),
31321
+ lang: unwrap$16(lang),
31310
31322
  onlyDb
31311
31323
  });
31312
31324
  yield* renderer.emitSuccess(res);
31313
31325
  })).pipe(withDescription("show an article's AI insights"));
31314
- const del$12 = make$14("delete", {
31326
+ const del$13 = make$14("delete", {
31315
31327
  recordId: text$6({ name: "recordId" }),
31316
31328
  force: boolean("force").pipe(withDescription$3("skip the non-TTY guard"))
31317
31329
  }, ({ recordId, force }) => gen(function* () {
@@ -31658,7 +31670,7 @@ var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
31658
31670
  };
31659
31671
  })))();
31660
31672
  const settings = {
31661
- actions: new Set([
31673
+ actions: /* @__PURE__ */ new Set([
31662
31674
  "up",
31663
31675
  "down",
31664
31676
  "left",
@@ -32167,7 +32179,7 @@ const edit$9 = make$14("edit", { recordId: recordId$9 }, ({ recordId }) => gen(f
32167
32179
  const res = yield* ai.updateInsights(recordId, parsed);
32168
32180
  yield* renderer.emitSuccess(res);
32169
32181
  })).pipe(withDescription("edit AI insights via $EDITOR"));
32170
- const get$12 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32182
+ const get$13 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32171
32183
  const ai = yield* Ai;
32172
32184
  const renderer = yield* Renderer;
32173
32185
  const res = yield* ai.getInsights(recordId);
@@ -32175,20 +32187,20 @@ const get$12 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ rec
32175
32187
  })).pipe(withDescription("get AI insights by record id"));
32176
32188
  //#endregion
32177
32189
  //#region src/cli/ai/insights/list.ts
32178
- const page$8 = integer("page").pipe(optional$4);
32179
- const size$8 = integer("size").pipe(optional$4);
32190
+ const page$9 = integer("page").pipe(optional$4);
32191
+ const size$9 = integer("size").pipe(optional$4);
32180
32192
  const grouped$1 = boolean("grouped").pipe(withDescription$3("group rows by article"));
32181
- const unwrap$14 = (value) => getOrUndefined(value);
32182
- const list$14 = make$14("list", {
32183
- page: page$8,
32184
- size: size$8,
32193
+ const unwrap$15 = (value) => getOrUndefined(value);
32194
+ const list$15 = make$14("list", {
32195
+ page: page$9,
32196
+ size: size$9,
32185
32197
  grouped: grouped$1
32186
32198
  }, ({ page, size, grouped }) => gen(function* () {
32187
32199
  const ai = yield* Ai;
32188
32200
  const renderer = yield* Renderer;
32189
32201
  const res = yield* ai.listInsights({
32190
- page: unwrap$14(page),
32191
- size: unwrap$14(size),
32202
+ page: unwrap$15(page),
32203
+ size: unwrap$15(size),
32192
32204
  grouped
32193
32205
  });
32194
32206
  yield* renderer.emitSuccess(res);
@@ -32232,7 +32244,7 @@ const formatCost = (cost) => {
32232
32244
  const formatList = (values) => values && values.length ? values.join(", ") : void 0;
32233
32245
  const aiTaskView = {
32234
32246
  kind: "ai-task",
32235
- modes: new Set(["readable", "llm"]),
32247
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
32236
32248
  readable: (data) => {
32237
32249
  const lines = [`ai ${data.type} task ${data.status}`];
32238
32250
  const fields = [
@@ -32274,20 +32286,20 @@ const refresh = make$14("refresh", {
32274
32286
  //#region src/cli/ai/insights/index.ts
32275
32287
  const insightsCmd = make$14("insights").pipe(withDescription("manage AI insights"), withSubcommands([
32276
32288
  refresh,
32277
- list$14,
32278
- get$12,
32289
+ list$15,
32290
+ get$13,
32279
32291
  byArticle$2,
32280
32292
  edit$9,
32281
- del$12
32293
+ del$13
32282
32294
  ]));
32283
32295
  //#endregion
32284
32296
  //#region src/cli/ai/summary/by-article.ts
32285
- const id$6 = text$6({ name: "idOrSlug" });
32297
+ const id$10 = text$6({ name: "idOrSlug" });
32286
32298
  const lang$2 = text$4("lang").pipe(optional$4);
32287
32299
  const onlyDb = boolean("only-db").pipe(withDescription$3("do not auto-generate on miss"));
32288
- const unwrap$13 = (value) => getOrUndefined(value);
32300
+ const unwrap$14 = (value) => getOrUndefined(value);
32289
32301
  const byArticle$1 = make$14("by-article", {
32290
- id: id$6,
32302
+ id: id$10,
32291
32303
  lang: lang$2,
32292
32304
  onlyDb
32293
32305
  }, ({ id, lang, onlyDb }) => gen(function* () {
@@ -32295,12 +32307,12 @@ const byArticle$1 = make$14("by-article", {
32295
32307
  const renderer = yield* Renderer;
32296
32308
  const refId = yield* resolveArticleId(yield* Resolver, id);
32297
32309
  const res = yield* ai.getSummariesByArticle(refId, {
32298
- lang: unwrap$13(lang),
32310
+ lang: unwrap$14(lang),
32299
32311
  onlyDb
32300
32312
  });
32301
32313
  yield* renderer.emitSuccess(res);
32302
32314
  })).pipe(withDescription("show an article's AI summary"));
32303
- const del$11 = make$14("delete", {
32315
+ const del$12 = make$14("delete", {
32304
32316
  recordId: text$6({ name: "recordId" }),
32305
32317
  force: boolean("force").pipe(withDescription$3("skip the non-TTY guard"))
32306
32318
  }, ({ recordId, force }) => gen(function* () {
@@ -32351,7 +32363,7 @@ const edit$8 = make$14("edit", { recordId: recordId$6 }, ({ recordId }) => gen(f
32351
32363
  const res = yield* ai.updateSummary(recordId, parsed);
32352
32364
  yield* renderer.emitSuccess(res);
32353
32365
  })).pipe(withDescription("edit an AI summary via $EDITOR"));
32354
- const get$11 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32366
+ const get$12 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32355
32367
  const ai = yield* Ai;
32356
32368
  const renderer = yield* Renderer;
32357
32369
  const res = yield* ai.getSummary(recordId);
@@ -32359,20 +32371,20 @@ const get$11 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ rec
32359
32371
  })).pipe(withDescription("get an AI summary by record id"));
32360
32372
  //#endregion
32361
32373
  //#region src/cli/ai/summary/list.ts
32362
- const page$7 = integer("page").pipe(optional$4);
32363
- const size$7 = integer("size").pipe(optional$4);
32374
+ const page$8 = integer("page").pipe(optional$4);
32375
+ const size$8 = integer("size").pipe(optional$4);
32364
32376
  const grouped = boolean("grouped").pipe(withDescription$3("group rows by article"));
32365
- const unwrap$12 = (value) => getOrUndefined(value);
32366
- const list$13 = make$14("list", {
32367
- page: page$7,
32368
- size: size$7,
32377
+ const unwrap$13 = (value) => getOrUndefined(value);
32378
+ const list$14 = make$14("list", {
32379
+ page: page$8,
32380
+ size: size$8,
32369
32381
  grouped
32370
32382
  }, ({ page, size, grouped }) => gen(function* () {
32371
32383
  const ai = yield* Ai;
32372
32384
  const renderer = yield* Renderer;
32373
32385
  const res = yield* ai.listSummaries({
32374
- page: unwrap$12(page),
32375
- size: unwrap$12(size),
32386
+ page: unwrap$13(page),
32387
+ size: unwrap$13(size),
32376
32388
  grouped
32377
32389
  });
32378
32390
  yield* renderer.emitSuccess(res);
@@ -32395,28 +32407,28 @@ const regen = make$14("regen", {
32395
32407
  //#region src/cli/ai/summary/index.ts
32396
32408
  const summaryCmd = make$14("summary").pipe(withDescription("manage AI summaries"), withSubcommands([
32397
32409
  regen,
32398
- list$13,
32399
- get$11,
32410
+ list$14,
32411
+ get$12,
32400
32412
  byArticle$1,
32401
32413
  edit$8,
32402
- del$11
32414
+ del$12
32403
32415
  ]));
32404
32416
  //#endregion
32405
32417
  //#region src/cli/ai/translate/by-article.ts
32406
- const id$4 = text$6({ name: "idOrSlug" });
32418
+ const id$8 = text$6({ name: "idOrSlug" });
32407
32419
  const lang$1 = text$4("lang").pipe(optional$4);
32408
- const unwrap$11 = (value) => getOrUndefined(value);
32420
+ const unwrap$12 = (value) => getOrUndefined(value);
32409
32421
  const byArticle = make$14("by-article", {
32410
- id: id$4,
32422
+ id: id$8,
32411
32423
  lang: lang$1
32412
32424
  }, ({ id, lang }) => gen(function* () {
32413
32425
  const ai = yield* Ai;
32414
32426
  const renderer = yield* Renderer;
32415
32427
  const refId = yield* resolveArticleId(yield* Resolver, id);
32416
- const res = yield* ai.getTranslationsByArticle(refId, { lang: unwrap$11(lang) });
32428
+ const res = yield* ai.getTranslationsByArticle(refId, { lang: unwrap$12(lang) });
32417
32429
  yield* renderer.emitSuccess(res);
32418
32430
  })).pipe(withDescription("show an article's translations"));
32419
- const del$10 = make$14("delete", {
32431
+ const del$11 = make$14("delete", {
32420
32432
  recordId: text$6({ name: "recordId" }),
32421
32433
  force: boolean("force").pipe(withDescription$3("skip the non-TTY guard"))
32422
32434
  }, ({ recordId, force }) => gen(function* () {
@@ -32503,7 +32515,7 @@ const edit$7 = make$14("edit", { recordId: recordId$3 }, ({ recordId }) => gen(f
32503
32515
  const res = yield* ai.updateTranslation(recordId, parsed);
32504
32516
  yield* renderer.emitSuccess(res);
32505
32517
  })).pipe(withDescription("edit an AI translation via $EDITOR"));
32506
- const del$9 = make$14("delete", {
32518
+ const del$10 = make$14("delete", {
32507
32519
  recordId: text$6({ name: "recordId" }),
32508
32520
  force: boolean("force").pipe(withDescription$3("skip the non-TTY guard"))
32509
32521
  }, ({ recordId, force }) => gen(function* () {
@@ -32584,36 +32596,36 @@ const generate = make$14("generate", {
32584
32596
  })).pipe(withDescription("regenerate translation entries"));
32585
32597
  //#endregion
32586
32598
  //#region src/cli/ai/translate/entries/list.ts
32587
- const page$6 = integer("page").pipe(optional$4);
32588
- const size$6 = integer("size").pipe(optional$4);
32599
+ const page$7 = integer("page").pipe(optional$4);
32600
+ const size$7 = integer("size").pipe(optional$4);
32589
32601
  const keyPath = text$4("key-path").pipe(optional$4);
32590
32602
  const lang = text$4("lang").pipe(optional$4);
32591
- const unwrap$10 = (value) => getOrUndefined(value);
32592
- const list$12 = make$14("list", {
32593
- page: page$6,
32594
- size: size$6,
32603
+ const unwrap$11 = (value) => getOrUndefined(value);
32604
+ const list$13 = make$14("list", {
32605
+ page: page$7,
32606
+ size: size$7,
32595
32607
  keyPath,
32596
32608
  lang
32597
32609
  }, ({ page, size, keyPath, lang }) => gen(function* () {
32598
32610
  const ai = yield* Ai;
32599
32611
  const renderer = yield* Renderer;
32600
32612
  const res = yield* ai.listEntries({
32601
- page: unwrap$10(page),
32602
- size: unwrap$10(size),
32603
- keyPath: unwrap$10(keyPath),
32604
- lang: unwrap$10(lang)
32613
+ page: unwrap$11(page),
32614
+ size: unwrap$11(size),
32615
+ keyPath: unwrap$11(keyPath),
32616
+ lang: unwrap$11(lang)
32605
32617
  });
32606
32618
  yield* renderer.emitSuccess(res);
32607
32619
  })).pipe(withDescription("list AI translation entries (i18n dictionary)"));
32608
32620
  //#endregion
32609
32621
  //#region src/cli/ai/translate/entries/index.ts
32610
32622
  const entriesCmd = make$14("entries").pipe(withDescription("manage translation entries (i18n dictionary)"), withSubcommands([
32611
- list$12,
32623
+ list$13,
32612
32624
  generate,
32613
32625
  edit$6,
32614
- del$9
32626
+ del$10
32615
32627
  ]));
32616
- const get$10 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32628
+ const get$11 = make$14("get", { recordId: text$6({ name: "recordId" }) }, ({ recordId }) => gen(function* () {
32617
32629
  const ai = yield* Ai;
32618
32630
  const renderer = yield* Renderer;
32619
32631
  const res = yield* ai.getTranslation(recordId);
@@ -32628,18 +32640,18 @@ const languages = make$14("languages", { id: text$6({ name: "idOrSlug" }) }, ({
32628
32640
  })).pipe(withDescription("list languages an article has been translated into"));
32629
32641
  //#endregion
32630
32642
  //#region src/cli/ai/translate/list.ts
32631
- const page$5 = integer("page").pipe(optional$4);
32632
- const size$5 = integer("size").pipe(optional$4);
32633
- const unwrap$9 = (value) => getOrUndefined(value);
32634
- const list$11 = make$14("list", {
32635
- page: page$5,
32636
- size: size$5
32643
+ const page$6 = integer("page").pipe(optional$4);
32644
+ const size$6 = integer("size").pipe(optional$4);
32645
+ const unwrap$10 = (value) => getOrUndefined(value);
32646
+ const list$12 = make$14("list", {
32647
+ page: page$6,
32648
+ size: size$6
32637
32649
  }, ({ page, size }) => gen(function* () {
32638
32650
  const ai = yield* Ai;
32639
32651
  const renderer = yield* Renderer;
32640
32652
  const res = yield* ai.listTranslations({
32641
- page: unwrap$9(page),
32642
- size: unwrap$9(size),
32653
+ page: unwrap$10(page),
32654
+ size: unwrap$10(size),
32643
32655
  grouped: true
32644
32656
  });
32645
32657
  yield* renderer.emitSuccess(res);
@@ -32663,17 +32675,17 @@ const run$1 = make$14("run", {
32663
32675
  //#region src/cli/ai/translate/index.ts
32664
32676
  const translateCmd = make$14("translate").pipe(withDescription("manage AI translations"), withSubcommands([
32665
32677
  run$1,
32666
- list$11,
32667
- get$10,
32678
+ list$12,
32679
+ get$11,
32668
32680
  byArticle,
32669
32681
  languages,
32670
32682
  edit$7,
32671
- del$10,
32683
+ del$11,
32672
32684
  entriesCmd
32673
32685
  ]));
32674
32686
  //#endregion
32675
32687
  //#region src/cli/ai/index.ts
32676
- const help$13 = registerCommandHelp({
32688
+ const help$14 = registerCommandHelp({
32677
32689
  name: "ai",
32678
32690
  description: "manage AI artifacts (summary, translation, insights)",
32679
32691
  skillChapter: "commands-ai",
@@ -32695,7 +32707,7 @@ const help$13 = registerCommandHelp({
32695
32707
  }
32696
32708
  ]
32697
32709
  });
32698
- const aiCmd = make$14("ai").pipe(withDescription(help$13.description), withSubcommands([
32710
+ const aiCmd = make$14("ai").pipe(withDescription(help$14.description), withSubcommands([
32699
32711
  summaryCmd,
32700
32712
  translateCmd,
32701
32713
  insightsCmd
@@ -33237,7 +33249,7 @@ const defaultGlobalFlags = {
33237
33249
  verbose: false,
33238
33250
  dryRun: false
33239
33251
  };
33240
- const VALID_OUTPUT_MODES = new Set([
33252
+ const VALID_OUTPUT_MODES = /* @__PURE__ */ new Set([
33241
33253
  "pretty-json",
33242
33254
  "json",
33243
33255
  "readable",
@@ -33246,7 +33258,7 @@ const VALID_OUTPUT_MODES = new Set([
33246
33258
  ]);
33247
33259
  const isOutputMode = (s) => VALID_OUTPUT_MODES.has(s);
33248
33260
  /** Long-name flags that take a value (consume the next argv slot if no `=`). */
33249
- const VALUE_FLAGS = new Set([
33261
+ const VALUE_FLAGS = /* @__PURE__ */ new Set([
33250
33262
  "--output",
33251
33263
  "--api-url",
33252
33264
  "--token",
@@ -33255,7 +33267,7 @@ const VALUE_FLAGS = new Set([
33255
33267
  "--profile"
33256
33268
  ]);
33257
33269
  /** Long-name boolean flags (no value). */
33258
- const BOOL_FLAGS = new Set([
33270
+ const BOOL_FLAGS = /* @__PURE__ */ new Set([
33259
33271
  "--json",
33260
33272
  "--quiet",
33261
33273
  "--verbose",
@@ -33358,7 +33370,7 @@ const currentProfileFlag = unsafeMake(void 0);
33358
33370
  //#endregion
33359
33371
  //#region src/services/Profile.ts
33360
33372
  const PROFILE_NAME_RE = /^[\d_a-z-]{1,32}$/;
33361
- const RESERVED_PROFILE_NAMES = new Set(["current"]);
33373
+ const RESERVED_PROFILE_NAMES = /* @__PURE__ */ new Set(["current"]);
33362
33374
  const make$3 = gen(function* () {
33363
33375
  const config = yield* Config;
33364
33376
  const validateName = (name) => gen(function* () {
@@ -33518,7 +33530,7 @@ const login = make$14("login", { production: production$1 }, ({ production }) =>
33518
33530
  const editor = yield* Editor;
33519
33531
  const renderer = yield* Renderer;
33520
33532
  const opts = yield* renderer.options;
33521
- const flagProfile = yield* get$20(currentProfileFlag);
33533
+ const flagProfile = yield* get$21(currentProfileFlag);
33522
33534
  const resolved = yield* profile.resolve(flagProfile ? { profile: flagProfile } : {}).pipe(catchTags({
33523
33535
  Generic: (e) => {
33524
33536
  return e.cause?._tag === "ConfigMissingApiUrl" ? succeed$1(null) : fail$2(e);
@@ -33638,7 +33650,7 @@ const renderIdentLine = (user, color) => {
33638
33650
  };
33639
33651
  const whoamiView = {
33640
33652
  kind: "whoami",
33641
- modes: new Set(["readable", "llm"]),
33653
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
33642
33654
  readable: (data, { color }) => {
33643
33655
  const head = dot("signed in", color);
33644
33656
  const ident = renderIdentLine(data.user, color);
@@ -33651,7 +33663,7 @@ const whoamiView = {
33651
33663
  };
33652
33664
  const statusView = {
33653
33665
  kind: "status",
33654
- modes: new Set(["readable", "llm"]),
33666
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
33655
33667
  readable: (data, { color }) => {
33656
33668
  if (!data.authenticated) return `${fail("not authenticated", color)}\n ${dim("run `mxs auth login`", color)}`;
33657
33669
  const head = dot("signed in", color);
@@ -33714,7 +33726,7 @@ const whoami = make$14("whoami", {}, () => gen(function* () {
33714
33726
  }));
33715
33727
  //#endregion
33716
33728
  //#region src/cli/auth/index.ts
33717
- const help$12 = registerCommandHelp({
33729
+ const help$13 = registerCommandHelp({
33718
33730
  name: "auth",
33719
33731
  description: "authentication",
33720
33732
  skillChapter: "commands-auth",
@@ -33738,13 +33750,13 @@ const help$12 = registerCommandHelp({
33738
33750
  }
33739
33751
  ]
33740
33752
  });
33741
- const authCmd = make$14("auth").pipe(withDescription(help$12.description), withSubcommands([
33753
+ const authCmd = make$14("auth").pipe(withDescription(help$13.description), withSubcommands([
33742
33754
  login,
33743
33755
  logout,
33744
33756
  whoami,
33745
33757
  status
33746
33758
  ]));
33747
- const create$6 = make$14("create", {
33759
+ const create$7 = make$14("create", {
33748
33760
  name: text$4("name"),
33749
33761
  slug: text$4("slug"),
33750
33762
  type: choice("type", ["category", "tag"]).pipe(optional$4),
@@ -33766,7 +33778,7 @@ const create$6 = make$14("create", {
33766
33778
  });
33767
33779
  yield* renderer.emitSuccess(res);
33768
33780
  }));
33769
- const del$8 = make$14("delete", {
33781
+ const del$9 = make$14("delete", {
33770
33782
  slugOrId: text$6({ name: "slugOrId" }),
33771
33783
  force: boolean("force")
33772
33784
  }, ({ slugOrId, force }) => gen(function* () {
@@ -33777,7 +33789,7 @@ const del$8 = make$14("delete", {
33777
33789
  yield* api.request(`/categories/${id}`, { method: "DELETE" });
33778
33790
  yield* renderer.emitSuccess({ deleted: id });
33779
33791
  }));
33780
- const get$9 = make$14("get", { slugOrId: text$6({ name: "slugOrId" }) }, ({ slugOrId }) => gen(function* () {
33792
+ const get$10 = make$14("get", { slugOrId: text$6({ name: "slugOrId" }) }, ({ slugOrId }) => gen(function* () {
33781
33793
  const api = yield* Api;
33782
33794
  const renderer = yield* Renderer;
33783
33795
  const res = yield* api.request(`/categories/${encodeURIComponent(slugOrId)}`);
@@ -33785,13 +33797,13 @@ const get$9 = make$14("get", { slugOrId: text$6({ name: "slugOrId" }) }, ({ slug
33785
33797
  }));
33786
33798
  //#endregion
33787
33799
  //#region src/cli/category/list.ts
33788
- const list$10 = make$14("list", {}, () => gen(function* () {
33800
+ const list$11 = make$14("list", {}, () => gen(function* () {
33789
33801
  const api = yield* Api;
33790
33802
  const renderer = yield* Renderer;
33791
33803
  const res = yield* api.request("/categories");
33792
33804
  yield* renderer.emitSuccess(res);
33793
33805
  }));
33794
- const update$6 = make$14("update", {
33806
+ const update$7 = make$14("update", {
33795
33807
  slugOrId: text$6({ name: "slugOrId" }),
33796
33808
  name: text$4("name").pipe(optional$4),
33797
33809
  slug: text$4("slug").pipe(optional$4),
@@ -33818,7 +33830,7 @@ const update$6 = make$14("update", {
33818
33830
  }));
33819
33831
  //#endregion
33820
33832
  //#region src/cli/category/index.ts
33821
- const help$11 = registerCommandHelp({
33833
+ const help$12 = registerCommandHelp({
33822
33834
  name: "category",
33823
33835
  description: "manage categories / tags",
33824
33836
  skillChapter: "commands-category",
@@ -33859,12 +33871,12 @@ const help$11 = registerCommandHelp({
33859
33871
  }
33860
33872
  ]
33861
33873
  });
33862
- const categoryCmd = make$14("category").pipe(withDescription(help$11.description), withSubcommands([
33863
- list$10,
33864
- get$9,
33865
- create$6,
33866
- update$6,
33867
- del$8
33874
+ const categoryCmd = make$14("category").pipe(withDescription(help$12.description), withSubcommands([
33875
+ list$11,
33876
+ get$10,
33877
+ create$7,
33878
+ update$7,
33879
+ del$9
33868
33880
  ]));
33869
33881
  //#endregion
33870
33882
  //#region src/services/Comment.ts
@@ -33967,7 +33979,7 @@ var Comment = class Comment extends Tag$2("Comment")() {
33967
33979
  //#region src/cli/comment/_flags.ts
33968
33980
  const ids = text$6({ name: "id" }).pipe(repeated$2);
33969
33981
  const all$1 = boolean("all").pipe(withDescription$3("apply to every comment (optionally filtered by --state)"));
33970
- const force$9 = boolean("force").pipe(withDescription$3("skip TTY confirmation guard"));
33982
+ const force$10 = boolean("force").pipe(withDescription$3("skip TTY confirmation guard"));
33971
33983
  const stateFilter = choice("state", [
33972
33984
  "unread",
33973
33985
  "read",
@@ -33998,7 +34010,7 @@ const requireForceForSingleDelete = (params) => suspend(() => {
33998
34010
  const approve = make$14("approve", {
33999
34011
  ids,
34000
34012
  all: all$1,
34001
- force: force$9,
34013
+ force: force$10,
34002
34014
  state: stateFilter
34003
34015
  }, ({ ids, all, force, state }) => gen(function* () {
34004
34016
  yield* validateBatchSelection({
@@ -34022,10 +34034,10 @@ const approve = make$14("approve", {
34022
34034
  })).pipe(withDescription("mark comments as read; pass ids or --all [--state <s>]"));
34023
34035
  //#endregion
34024
34036
  //#region src/cli/comment/delete.ts
34025
- const del$7 = make$14("delete", {
34037
+ const del$8 = make$14("delete", {
34026
34038
  ids,
34027
34039
  all: all$1,
34028
- force: force$9,
34040
+ force: force$10,
34029
34041
  state: stateFilter
34030
34042
  }, ({ ids, all, force, state }) => gen(function* () {
34031
34043
  yield* validateBatchSelection({
@@ -34120,7 +34132,7 @@ const renderCommentLlm = (data) => {
34120
34132
  };
34121
34133
  const commentView = {
34122
34134
  kind: "comment",
34123
- modes: new Set(["readable", "llm"]),
34135
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
34124
34136
  readable: (data, ctx) => renderCommentReadable(data, ctx.color),
34125
34137
  llm: (data) => renderCommentLlm(data)
34126
34138
  };
@@ -34185,17 +34197,17 @@ const renderCommentListLlm = (data) => {
34185
34197
  };
34186
34198
  const commentListView = {
34187
34199
  kind: "comment-list",
34188
- modes: new Set(["readable", "llm"]),
34200
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
34189
34201
  readable: (data, ctx) => renderCommentListReadable(data, ctx.color),
34190
34202
  llm: (data) => renderCommentListLlm(data)
34191
34203
  };
34192
- const get$8 = make$14("get", { id: text$6({ name: "id" }) }, ({ id }) => gen(function* () {
34204
+ const get$9 = make$14("get", { id: text$6({ name: "id" }) }, ({ id }) => gen(function* () {
34193
34205
  const comment = yield* Comment;
34194
34206
  const renderer = yield* Renderer;
34195
34207
  const res = yield* comment.get(id);
34196
34208
  yield* renderer.emit(commentView, res);
34197
34209
  })).pipe(withDescription("show a single comment by id"));
34198
- const list$9 = make$14("list", {
34210
+ const list$10 = make$14("list", {
34199
34211
  page: integer("page").pipe(optional$4),
34200
34212
  size: integer("size").pipe(optional$4),
34201
34213
  state: stateFilter,
@@ -34216,7 +34228,7 @@ const list$9 = make$14("list", {
34216
34228
  const reject = make$14("reject", {
34217
34229
  ids,
34218
34230
  all: all$1,
34219
- force: force$9,
34231
+ force: force$10,
34220
34232
  state: stateFilter
34221
34233
  }, ({ ids, all, force, state }) => gen(function* () {
34222
34234
  yield* validateBatchSelection({
@@ -34334,7 +34346,7 @@ const unread = make$14("unread", {
34334
34346
  })).pipe(withDescription("list unread comments (alias for `comment list --state unread`)"));
34335
34347
  //#endregion
34336
34348
  //#region src/cli/comment/index.ts
34337
- const help$10 = registerCommandHelp({
34349
+ const help$11 = registerCommandHelp({
34338
34350
  name: "comment",
34339
34351
  description: "list and moderate comments",
34340
34352
  skillChapter: "commands-comment",
@@ -34402,14 +34414,14 @@ const help$10 = registerCommandHelp({
34402
34414
  }
34403
34415
  ]
34404
34416
  });
34405
- const commentCmd = make$14("comment").pipe(withDescription(help$10.description), withSubcommands([
34406
- list$9,
34417
+ const commentCmd = make$14("comment").pipe(withDescription(help$11.description), withSubcommands([
34418
+ list$10,
34407
34419
  unread,
34408
- get$8,
34420
+ get$9,
34409
34421
  reply,
34410
34422
  approve,
34411
34423
  reject,
34412
- del$7
34424
+ del$8
34413
34425
  ]));
34414
34426
  //#endregion
34415
34427
  //#region src/cli/config/edit.ts
@@ -34438,7 +34450,7 @@ const edit$5 = make$14("edit", {}, () => gen(function* () {
34438
34450
  });
34439
34451
  yield* renderer.emitSuccess(results);
34440
34452
  }));
34441
- const get$7 = make$14("get", { key: text$6({ name: "key" }) }, ({ key }) => gen(function* () {
34453
+ const get$8 = make$14("get", { key: text$6({ name: "key" }) }, ({ key }) => gen(function* () {
34442
34454
  const api = yield* Api;
34443
34455
  const renderer = yield* Renderer;
34444
34456
  const res = yield* api.request(`/options/${encodeURIComponent(key)}`);
@@ -34446,7 +34458,7 @@ const get$7 = make$14("get", { key: text$6({ name: "key" }) }, ({ key }) => gen(
34446
34458
  }));
34447
34459
  //#endregion
34448
34460
  //#region src/cli/config/list.ts
34449
- const list$8 = make$14("list", {}, () => gen(function* () {
34461
+ const list$9 = make$14("list", {}, () => gen(function* () {
34450
34462
  const api = yield* Api;
34451
34463
  const renderer = yield* Renderer;
34452
34464
  const res = yield* api.request("/options");
@@ -34493,7 +34505,7 @@ const set = make$14("set", {
34493
34505
  }));
34494
34506
  //#endregion
34495
34507
  //#region src/cli/config/index.ts
34496
- const help$9 = registerCommandHelp({
34508
+ const help$10 = registerCommandHelp({
34497
34509
  name: "config",
34498
34510
  description: "manage server options",
34499
34511
  skillChapter: "commands-config",
@@ -34522,143 +34534,27 @@ const help$9 = registerCommandHelp({
34522
34534
  }
34523
34535
  ]
34524
34536
  });
34525
- const configCmd = make$14("config").pipe(withDescription(help$9.description), withSubcommands([
34526
- list$8,
34527
- get$7,
34537
+ const configCmd = make$14("config").pipe(withDescription(help$10.description), withSubcommands([
34538
+ list$9,
34539
+ get$8,
34528
34540
  set,
34529
34541
  edit$5
34530
34542
  ]));
34531
34543
  //#endregion
34532
- //#region src/cli/file/_shared.ts
34533
- /** Mirrors the server's `FileTypeEnum` (apps/core modules/file/file.type.ts). */
34534
- const FILE_TYPES = [
34535
- "file",
34536
- "image",
34537
- "icon",
34538
- "avatar"
34539
- ];
34540
- const typeOption = choice("type", FILE_TYPES).pipe(withDescription$3("server-side storage bucket for the file"), withDefault("file"));
34541
- const silentFlag$5 = boolean("silent").pipe(withDescription$3("On success, emit a minimal `ok` instead of the full server response."));
34542
- const del$6 = make$14("delete", {
34543
- name: text$6({ name: "name" }),
34544
- type: typeOption,
34545
- force: boolean("force").pipe(withDescription$3("skip confirmation"))
34546
- }, ({ name, type, force }) => gen(function* () {
34547
- if (!force && !process.stdin.isTTY) return yield* fail$2(new ValidationFailed({ message: "refusing to delete without --force in non-TTY context" }));
34548
- const api = yield* Api;
34549
- const renderer = yield* Renderer;
34550
- yield* api.request(`/objects/${type}/${encodeURIComponent(name)}`, { method: "DELETE" });
34551
- yield* renderer.emitSuccess({ deleted: `${type}/${name}` });
34552
- })).pipe(withDescription("delete an uploaded file"));
34553
- //#endregion
34554
- //#region src/cli/file/list.ts
34555
- const list$7 = make$14("list", { type: typeOption }, ({ type }) => gen(function* () {
34556
- const api = yield* Api;
34557
- const renderer = yield* Renderer;
34558
- const res = yield* api.request(`/objects/${type}`);
34559
- yield* renderer.emitSuccess(res);
34560
- })).pipe(withDescription("list uploaded files of a type (name, url, created)"));
34561
- const rename = make$14("rename", {
34562
- name: text$6({ name: "name" }),
34563
- newName: text$6({ name: "newName" }),
34564
- type: typeOption
34565
- }, ({ name, newName, type }) => gen(function* () {
34566
- const api = yield* Api;
34567
- const renderer = yield* Renderer;
34568
- yield* api.request(`/objects/${type}/${encodeURIComponent(name)}/rename`, {
34569
- method: "PATCH",
34570
- query: { newName }
34571
- });
34572
- yield* renderer.emitSuccess({
34573
- renamed: `${type}/${name}`,
34574
- to: newName
34575
- });
34576
- })).pipe(withDescription("rename an uploaded file"));
34577
- const upload = make$14("upload", {
34578
- path: text$6({ name: "path" }),
34579
- type: typeOption,
34580
- name: text$4("name").pipe(withDescription$3("override the uploaded filename (defaults to the local basename)"), optional$4),
34581
- silent: silentFlag$5
34582
- }, ({ path, type, name, silent }) => gen(function* () {
34583
- const buffer = yield* tryPromise({
34584
- try: () => readFile(path),
34585
- catch: (err) => new Generic({
34586
- message: `cannot read file: ${path}`,
34587
- cause: err
34588
- })
34589
- });
34590
- const filename = name._tag === "Some" ? name.value : basename(path);
34591
- const form = new FormData();
34592
- form.append("file", new File([new Uint8Array(buffer)], filename));
34593
- const api = yield* Api;
34594
- const renderer = yield* Renderer;
34595
- const res = yield* api.request(`/objects/upload`, {
34596
- method: "POST",
34597
- query: { type },
34598
- body: form
34599
- });
34600
- yield* renderer.emitSuccess(silent ? { ok: true } : res);
34601
- })).pipe(withDescription(`upload a local file (--type ${FILE_TYPES.join("|")}); returns { url, name }`));
34602
- //#endregion
34603
- //#region src/cli/file/index.ts
34604
- const help$8 = registerCommandHelp({
34605
- name: "file",
34606
- description: "upload and manage static files (images, icons, avatars)",
34607
- verbs: [
34608
- {
34609
- name: "upload",
34610
- args: [
34611
- "<path>",
34612
- "[--type file|image|icon|avatar]",
34613
- "[--name <n>]"
34614
- ],
34615
- description: "upload a local file; returns { url, name }"
34616
- },
34617
- {
34618
- name: "list",
34619
- args: ["[--type <t>]"],
34620
- description: "list uploaded files of a type"
34621
- },
34622
- {
34623
- name: "delete",
34624
- args: [
34625
- "<name>",
34626
- "[--type <t>]",
34627
- "[--force]"
34628
- ],
34629
- description: "delete an uploaded file"
34630
- },
34631
- {
34632
- name: "rename",
34633
- args: [
34634
- "<name>",
34635
- "<newName>",
34636
- "[--type <t>]"
34637
- ],
34638
- description: "rename an uploaded file"
34639
- }
34640
- ]
34641
- });
34642
- const fileCmd = make$14("file").pipe(withDescription(help$8.description), withSubcommands([
34643
- upload,
34644
- list$7,
34645
- del$6,
34646
- rename
34647
- ]));
34648
- //#endregion
34649
34544
  //#region src/domain/admin-link.ts
34650
34545
  const buildEditUrl = (adminUrl, kind, id) => {
34651
34546
  const base = adminUrl.replace(/\/+$/, "");
34652
34547
  if (kind === "projects") return `${base}#/projects/${encodeURIComponent(id)}`;
34653
34548
  return `${base}#/${kind}/edit?id=${encodeURIComponent(id)}`;
34654
34549
  };
34655
- /**
34656
- * Resolve the server's admin URL from `/options/url`, build the admin
34657
- * edit-page URL for the given resource, and open it in the user's browser.
34658
- * Non-fatal: missing admin_url or browser-launch failures emit a warning
34659
- * and the parent effect continues.
34660
- */
34661
- const openAdminEdit = (kind, id) => gen(function* () {
34550
+ const buildDraftEditUrl = (adminUrl, kind, draftId, refId) => {
34551
+ const base = adminUrl.replace(/\/+$/, "");
34552
+ const params = new URLSearchParams();
34553
+ params.set("draftId", draftId);
34554
+ if (refId) params.set("id", refId);
34555
+ return `${base}#/${kind}/edit?${params.toString()}`;
34556
+ };
34557
+ const openAdminUrl = (buildUrl) => gen(function* () {
34662
34558
  const renderer = yield* Renderer;
34663
34559
  const opts = yield* (yield* Api).request("/options/url");
34664
34560
  const adminUrl = opts.data?.admin_url ?? opts.admin_url;
@@ -34666,13 +34562,21 @@ const openAdminEdit = (kind, id) => gen(function* () {
34666
34562
  yield* renderer.emitWarn("admin_url is not configured on the server; skipping --open");
34667
34563
  return;
34668
34564
  }
34669
- const url = buildEditUrl(adminUrl, kind, id);
34565
+ const url = buildUrl(adminUrl);
34670
34566
  yield* renderer.emitInfo(`opening admin: ${url}`);
34671
34567
  yield* tryPromise({
34672
34568
  try: () => open(url),
34673
34569
  catch: () => /* @__PURE__ */ new Error("failed to launch browser")
34674
34570
  }).pipe(catchAll((e) => renderer.emitWarn(`could not launch browser: ${e instanceof Error ? e.message : String(e)}`)));
34675
34571
  });
34572
+ /**
34573
+ * Resolve the server's admin URL from `/options/url`, build the admin
34574
+ * edit-page URL for the given resource, and open it in the user's browser.
34575
+ * Non-fatal: missing admin_url or browser-launch failures emit a warning
34576
+ * and the parent effect continues.
34577
+ */
34578
+ const openAdminEdit = (kind, id) => openAdminUrl((adminUrl) => buildEditUrl(adminUrl, kind, id));
34579
+ const openAdminDraftEdit = (kind, draftId, refId) => openAdminUrl((adminUrl) => buildDraftEditUrl(adminUrl, kind, draftId, refId));
34676
34580
  //#endregion
34677
34581
  //#region src/services/Lexical.ts
34678
34582
  const messageOf$1 = (err) => {
@@ -35186,7 +35090,7 @@ const resolveContent = (flagSpec, envelope, format) => gen(function* () {
35186
35090
  //#endregion
35187
35091
  //#region src/cli/post/_flags.ts
35188
35092
  const optional$3 = (self) => optional$4(self);
35189
- const unwrap$8 = (value) => getOrUndefined(value);
35093
+ const unwrap$9 = (value) => getOrUndefined(value);
35190
35094
  const title$2 = optional$3(text$4("title"));
35191
35095
  const slug$4 = optional$3(text$4("slug"));
35192
35096
  const category = optional$3(text$4("category"));
@@ -35202,7 +35106,7 @@ const related = optional$3(text$4("related"));
35202
35106
  const pinOrder = optional$3(integer("pin-order"));
35203
35107
  const copyright = optional$3(text$4("copyright"));
35204
35108
  const openFlag$4 = boolean("open").pipe(withDescription$3("After success, open the admin edit page in the default browser."));
35205
- const silentFlag$4 = boolean("silent").pipe(withDescription$3("On success, emit a minimal `ok` instead of the full server response (saves output tokens). Errors still print normally."));
35109
+ const silentFlag$5 = boolean("silent").pipe(withDescription$3("On success, emit a minimal `ok` instead of the full server response (saves output tokens). Errors still print normally."));
35206
35110
  const parseCsv$1 = (v) => {
35207
35111
  if (v === void 0) return void 0;
35208
35112
  return v.split(",").map((s) => s.trim()).filter(Boolean);
@@ -35224,7 +35128,7 @@ const postWriteOptions = {
35224
35128
  meta: meta$2,
35225
35129
  file: file$4,
35226
35130
  open: openFlag$4,
35227
- silent: silentFlag$4
35131
+ silent: silentFlag$5
35228
35132
  };
35229
35133
  /** Resolve `__categoryName` placeholder (set by `buildPostPayload`) → `categoryId`. */
35230
35134
  const resolveCategoryRefs = (payload) => gen(function* () {
@@ -35235,20 +35139,20 @@ const resolveCategoryRefs = (payload) => gen(function* () {
35235
35139
  return next;
35236
35140
  });
35237
35141
  const toPostFlagInputs = (opts) => ({
35238
- title: unwrap$8(opts.title),
35239
- slug: unwrap$8(opts.slug),
35240
- category: unwrap$8(opts.category),
35241
- content: unwrap$8(opts.content),
35242
- format: unwrap$8(opts.format),
35243
- summary: unwrap$8(opts.summary),
35244
- state: unwrap$8(opts.state),
35245
- tags: parseCsv$1(unwrap$8(opts.tags)),
35246
- copyright: parseCopyright(unwrap$8(opts.copyright)),
35247
- pin: unwrap$8(opts.pin),
35248
- pinOrder: unwrap$8(opts.pinOrder),
35249
- related: parseCsv$1(unwrap$8(opts.related)),
35250
- meta: unwrap$8(opts.meta),
35251
- file: unwrap$8(opts.file)
35142
+ title: unwrap$9(opts.title),
35143
+ slug: unwrap$9(opts.slug),
35144
+ category: unwrap$9(opts.category),
35145
+ content: unwrap$9(opts.content),
35146
+ format: unwrap$9(opts.format),
35147
+ summary: unwrap$9(opts.summary),
35148
+ state: unwrap$9(opts.state),
35149
+ tags: parseCsv$1(unwrap$9(opts.tags)),
35150
+ copyright: parseCopyright(unwrap$9(opts.copyright)),
35151
+ pin: unwrap$9(opts.pin),
35152
+ pinOrder: unwrap$9(opts.pinOrder),
35153
+ related: parseCsv$1(unwrap$9(opts.related)),
35154
+ meta: unwrap$9(opts.meta),
35155
+ file: unwrap$9(opts.file)
35252
35156
  });
35253
35157
  /**
35254
35158
  * Extract the id from a server response — handles both `id` and `_id`,
@@ -35263,6 +35167,353 @@ const extractId$1 = (res) => {
35263
35167
  if (r.data && typeof r.data === "object") return extractId$1(r.data);
35264
35168
  };
35265
35169
  //#endregion
35170
+ //#region src/cli/draft/_shared.ts
35171
+ /** Draft-native fields; everything else rides along in `typeSpecificData`. */
35172
+ const DRAFT_CORE_KEYS$1 = /* @__PURE__ */ new Set([
35173
+ "title",
35174
+ "text",
35175
+ "content",
35176
+ "contentFormat",
35177
+ "meta"
35178
+ ]);
35179
+ const REF_TYPE_TO_RESOURCE = {
35180
+ post: "posts",
35181
+ note: "notes",
35182
+ page: "pages"
35183
+ };
35184
+ const splitDraftBody = (payload) => {
35185
+ const draftBody = {};
35186
+ const typeSpecificData = {};
35187
+ for (const [key, value] of Object.entries(payload)) if (DRAFT_CORE_KEYS$1.has(key)) draftBody[key] = value;
35188
+ else typeSpecificData[key] = value;
35189
+ if (Object.keys(typeSpecificData).length > 0) draftBody.typeSpecificData = typeSpecificData;
35190
+ return draftBody;
35191
+ };
35192
+ const parseTypeSpecificData$1 = (raw) => {
35193
+ if (!raw) return {};
35194
+ if (typeof raw === "object") return raw;
35195
+ try {
35196
+ const parsed = JSON.parse(raw);
35197
+ return typeof parsed === "object" && parsed !== null ? parsed : {};
35198
+ } catch {
35199
+ return {};
35200
+ }
35201
+ };
35202
+ /** Single-object responses may arrive wrapped in an outer `data` envelope. */
35203
+ const unwrapData = (res) => {
35204
+ if (res && typeof res === "object" && "data" in res) {
35205
+ const inner = res.data;
35206
+ if (inner && typeof inner === "object") return inner;
35207
+ }
35208
+ return res;
35209
+ };
35210
+ //#endregion
35211
+ //#region src/cli/draft/create.ts
35212
+ const create$6 = make$14("create", postWriteOptions, (opts) => gen(function* () {
35213
+ const payload = yield* resolveCategoryRefs({ ...(yield* buildPostPayload(toPostFlagInputs(opts))).payload });
35214
+ delete payload.isPublished;
35215
+ if (Object.keys(payload).filter((k) => k !== "contentFormat").length === 0) return yield* fail$2(new ValidationFailed({ message: "nothing to save: provide --file or content/meta flags" }));
35216
+ const body = splitDraftBody(payload);
35217
+ const api = yield* Api;
35218
+ const renderer = yield* Renderer;
35219
+ const res = yield* api.request("/drafts", {
35220
+ method: "POST",
35221
+ body: {
35222
+ refType: "post",
35223
+ ...body
35224
+ }
35225
+ });
35226
+ const id = extractId$1(res);
35227
+ yield* renderer.emitSuccess(opts.silent ? {
35228
+ ok: true,
35229
+ id
35230
+ } : res);
35231
+ if (opts.open && id) yield* openAdminDraftEdit("posts", id);
35232
+ })).pipe(withDescription("create a standalone post draft (not linked to any published post; publish later with `draft publish`)"));
35233
+ const del$7 = make$14("delete", {
35234
+ id: text$6({ name: "id" }),
35235
+ force: boolean("force")
35236
+ }, ({ id, force }) => gen(function* () {
35237
+ if (!force && !process.stdin.isTTY) return yield* fail$2(new ValidationFailed({ message: "refusing to delete without --force in non-TTY context" }));
35238
+ const api = yield* Api;
35239
+ const renderer = yield* Renderer;
35240
+ yield* api.request(`/drafts/${encodeURIComponent(id)}`, { method: "DELETE" });
35241
+ yield* renderer.emitSuccess({ deleted: id });
35242
+ })).pipe(withDescription("delete a draft"));
35243
+ const get$7 = make$14("get", { id: text$6({ name: "id" }) }, ({ id }) => gen(function* () {
35244
+ const api = yield* Api;
35245
+ const renderer = yield* Renderer;
35246
+ const res = yield* api.request(`/drafts/${encodeURIComponent(id)}`);
35247
+ yield* renderer.emitSuccess(res);
35248
+ })).pipe(withDescription("show a single draft by id"));
35249
+ //#endregion
35250
+ //#region src/cli/draft/list.ts
35251
+ const page$3 = integer("page").pipe(optional$4);
35252
+ const size$3 = integer("size").pipe(optional$4);
35253
+ const type$1 = choice("type", [
35254
+ "post",
35255
+ "note",
35256
+ "page"
35257
+ ]).pipe(optional$4);
35258
+ const newOnly = boolean("new").pipe(withDescription$3("only drafts not linked to a published resource"));
35259
+ const linkedOnly = boolean("linked").pipe(withDescription$3("only drafts linked to a published resource"));
35260
+ const unwrap$8 = (value) => getOrUndefined(value);
35261
+ const list$8 = make$14("list", {
35262
+ page: page$3,
35263
+ size: size$3,
35264
+ type: type$1,
35265
+ new: newOnly,
35266
+ linked: linkedOnly
35267
+ }, ({ page, size, type, new: newOnly, linked: linkedOnly }) => gen(function* () {
35268
+ const api = yield* Api;
35269
+ const renderer = yield* Renderer;
35270
+ const res = yield* api.request("/drafts", { query: {
35271
+ page: unwrap$8(page),
35272
+ size: unwrap$8(size),
35273
+ refType: unwrap$8(type),
35274
+ hasRef: newOnly ? false : linkedOnly ? true : void 0
35275
+ } });
35276
+ yield* renderer.emitSuccess(res);
35277
+ })).pipe(withDescription("list drafts"));
35278
+ const publish$2 = make$14("publish", {
35279
+ id: text$6({ name: "id" }),
35280
+ open: openFlag$4,
35281
+ silent: silentFlag$5
35282
+ }, ({ id, open, silent }) => gen(function* () {
35283
+ const api = yield* Api;
35284
+ const renderer = yield* Renderer;
35285
+ const draft = unwrapData(yield* api.request(`/drafts/${encodeURIComponent(id)}`));
35286
+ if (!draft?.id || !draft.refType) return yield* fail$2(new Generic({ message: `draft not found: ${id}` }));
35287
+ const resource = REF_TYPE_TO_RESOURCE[draft.refType];
35288
+ if (!resource) return yield* fail$2(new Generic({ message: `unsupported draft refType: ${draft.refType}` }));
35289
+ const body = { ...parseTypeSpecificData$1(draft.typeSpecificData) };
35290
+ if (draft.title !== void 0) body.title = draft.title;
35291
+ if (draft.text !== void 0) body.text = draft.text;
35292
+ if (draft.content !== void 0 && draft.content !== null) body.content = draft.content;
35293
+ if (draft.contentFormat !== void 0) body.contentFormat = draft.contentFormat;
35294
+ if (draft.meta !== void 0 && draft.meta !== null) body.meta = draft.meta;
35295
+ body.draftId = draft.id;
35296
+ let res;
35297
+ if (draft.refId) {
35298
+ if (draft.refType !== "page") body.isPublished = true;
35299
+ res = yield* api.request(`/${resource}/${draft.refId}`, {
35300
+ method: "PATCH",
35301
+ body
35302
+ });
35303
+ } else {
35304
+ if (draft.refType !== "page") body.isPublished = true;
35305
+ res = yield* api.request(`/${resource}`, {
35306
+ method: "POST",
35307
+ body
35308
+ });
35309
+ }
35310
+ const publishedId = extractId$1(res) ?? draft.refId;
35311
+ yield* renderer.emitSuccess(silent ? {
35312
+ ok: true,
35313
+ id: publishedId
35314
+ } : res);
35315
+ if (open && publishedId && draft.refType !== "page") yield* openAdminEdit(resource, publishedId);
35316
+ })).pipe(withDescription("publish a draft: creates the post/note/page (or applies to the linked one) and marks it live"));
35317
+ const update$6 = make$14("update", {
35318
+ id: text$6({ name: "id" }),
35319
+ ...postWriteOptions
35320
+ }, ({ id, ...rest }) => gen(function* () {
35321
+ const payload = yield* resolveCategoryRefs({ ...(yield* buildPostPayload(toPostFlagInputs(rest))).payload });
35322
+ delete payload.isPublished;
35323
+ if (Object.keys(payload).filter((k) => k !== "contentFormat").length === 0) return yield* fail$2(new ValidationFailed({ message: "nothing to update: provide --file or content/meta flags" }));
35324
+ const body = splitDraftBody(payload);
35325
+ const api = yield* Api;
35326
+ const renderer = yield* Renderer;
35327
+ const res = yield* api.request(`/drafts/${encodeURIComponent(id)}`, {
35328
+ method: "PUT",
35329
+ body
35330
+ });
35331
+ yield* renderer.emitSuccess(rest.silent ? {
35332
+ ok: true,
35333
+ id
35334
+ } : res);
35335
+ })).pipe(withDescription("update a draft (bumps its version and records history on content change)"));
35336
+ //#endregion
35337
+ //#region src/cli/draft/index.ts
35338
+ const help$9 = registerCommandHelp({
35339
+ name: "draft",
35340
+ description: "manage standalone drafts (server-side draft entities)",
35341
+ skillChapter: "commands-draft",
35342
+ verbs: [
35343
+ {
35344
+ name: "list",
35345
+ args: [
35346
+ "[--type <t>]",
35347
+ "[--new]",
35348
+ "[--linked]"
35349
+ ],
35350
+ description: "list drafts"
35351
+ },
35352
+ {
35353
+ name: "get",
35354
+ args: ["<id>"],
35355
+ description: "show a single draft"
35356
+ },
35357
+ {
35358
+ name: "create",
35359
+ args: [
35360
+ "--file <envelope.xml>",
35361
+ "[--title ...]",
35362
+ "..."
35363
+ ],
35364
+ description: "create a standalone post draft"
35365
+ },
35366
+ {
35367
+ name: "update",
35368
+ args: [
35369
+ "<id>",
35370
+ "--file <envelope.xml>",
35371
+ "..."
35372
+ ],
35373
+ description: "update a draft (versioned)"
35374
+ },
35375
+ {
35376
+ name: "publish",
35377
+ args: [
35378
+ "<id>",
35379
+ "[--silent]",
35380
+ "[--open]"
35381
+ ],
35382
+ description: "publish a draft as a live post/note/page"
35383
+ },
35384
+ {
35385
+ name: "delete",
35386
+ args: ["<id>", "[--force]"],
35387
+ description: "delete a draft"
35388
+ }
35389
+ ]
35390
+ });
35391
+ const draftCmd = make$14("draft").pipe(withDescription(help$9.description), withSubcommands([
35392
+ list$8,
35393
+ get$7,
35394
+ create$6,
35395
+ update$6,
35396
+ publish$2,
35397
+ del$7
35398
+ ]));
35399
+ //#endregion
35400
+ //#region src/cli/file/_shared.ts
35401
+ /** Mirrors the server's `FileTypeEnum` (apps/core modules/file/file.type.ts). */
35402
+ const FILE_TYPES = [
35403
+ "file",
35404
+ "image",
35405
+ "icon",
35406
+ "avatar"
35407
+ ];
35408
+ const typeOption = choice("type", FILE_TYPES).pipe(withDescription$3("server-side storage bucket for the file"), withDefault("file"));
35409
+ const silentFlag$4 = boolean("silent").pipe(withDescription$3("On success, emit a minimal `ok` instead of the full server response."));
35410
+ const del$6 = make$14("delete", {
35411
+ name: text$6({ name: "name" }),
35412
+ type: typeOption,
35413
+ force: boolean("force").pipe(withDescription$3("skip confirmation"))
35414
+ }, ({ name, type, force }) => gen(function* () {
35415
+ if (!force && !process.stdin.isTTY) return yield* fail$2(new ValidationFailed({ message: "refusing to delete without --force in non-TTY context" }));
35416
+ const api = yield* Api;
35417
+ const renderer = yield* Renderer;
35418
+ yield* api.request(`/objects/${type}/${encodeURIComponent(name)}`, { method: "DELETE" });
35419
+ yield* renderer.emitSuccess({ deleted: `${type}/${name}` });
35420
+ })).pipe(withDescription("delete an uploaded file"));
35421
+ //#endregion
35422
+ //#region src/cli/file/list.ts
35423
+ const list$7 = make$14("list", { type: typeOption }, ({ type }) => gen(function* () {
35424
+ const api = yield* Api;
35425
+ const renderer = yield* Renderer;
35426
+ const res = yield* api.request(`/objects/${type}`);
35427
+ yield* renderer.emitSuccess(res);
35428
+ })).pipe(withDescription("list uploaded files of a type (name, url, created)"));
35429
+ const rename = make$14("rename", {
35430
+ name: text$6({ name: "name" }),
35431
+ newName: text$6({ name: "newName" }),
35432
+ type: typeOption
35433
+ }, ({ name, newName, type }) => gen(function* () {
35434
+ const api = yield* Api;
35435
+ const renderer = yield* Renderer;
35436
+ yield* api.request(`/objects/${type}/${encodeURIComponent(name)}/rename`, {
35437
+ method: "PATCH",
35438
+ query: { newName }
35439
+ });
35440
+ yield* renderer.emitSuccess({
35441
+ renamed: `${type}/${name}`,
35442
+ to: newName
35443
+ });
35444
+ })).pipe(withDescription("rename an uploaded file"));
35445
+ const upload = make$14("upload", {
35446
+ path: text$6({ name: "path" }),
35447
+ type: typeOption,
35448
+ name: text$4("name").pipe(withDescription$3("override the uploaded filename (defaults to the local basename)"), optional$4),
35449
+ silent: silentFlag$4
35450
+ }, ({ path, type, name, silent }) => gen(function* () {
35451
+ const buffer = yield* tryPromise({
35452
+ try: () => readFile(path),
35453
+ catch: (err) => new Generic({
35454
+ message: `cannot read file: ${path}`,
35455
+ cause: err
35456
+ })
35457
+ });
35458
+ const filename = name._tag === "Some" ? name.value : basename(path);
35459
+ const form = new FormData();
35460
+ form.append("file", new File([new Uint8Array(buffer)], filename));
35461
+ const api = yield* Api;
35462
+ const renderer = yield* Renderer;
35463
+ const res = yield* api.request(`/objects/upload`, {
35464
+ method: "POST",
35465
+ query: { type },
35466
+ body: form
35467
+ });
35468
+ yield* renderer.emitSuccess(silent ? { ok: true } : res);
35469
+ })).pipe(withDescription(`upload a local file (--type ${FILE_TYPES.join("|")}); returns { url, name }`));
35470
+ //#endregion
35471
+ //#region src/cli/file/index.ts
35472
+ const help$8 = registerCommandHelp({
35473
+ name: "file",
35474
+ description: "upload and manage static files (images, icons, avatars)",
35475
+ verbs: [
35476
+ {
35477
+ name: "upload",
35478
+ args: [
35479
+ "<path>",
35480
+ "[--type file|image|icon|avatar]",
35481
+ "[--name <n>]"
35482
+ ],
35483
+ description: "upload a local file; returns { url, name }"
35484
+ },
35485
+ {
35486
+ name: "list",
35487
+ args: ["[--type <t>]"],
35488
+ description: "list uploaded files of a type"
35489
+ },
35490
+ {
35491
+ name: "delete",
35492
+ args: [
35493
+ "<name>",
35494
+ "[--type <t>]",
35495
+ "[--force]"
35496
+ ],
35497
+ description: "delete an uploaded file"
35498
+ },
35499
+ {
35500
+ name: "rename",
35501
+ args: [
35502
+ "<name>",
35503
+ "<newName>",
35504
+ "[--type <t>]"
35505
+ ],
35506
+ description: "rename an uploaded file"
35507
+ }
35508
+ ]
35509
+ });
35510
+ const fileCmd = make$14("file").pipe(withDescription(help$8.description), withSubcommands([
35511
+ upload,
35512
+ list$7,
35513
+ del$6,
35514
+ rename
35515
+ ]));
35516
+ //#endregion
35266
35517
  //#region src/cli/note/_flags.ts
35267
35518
  const optional$2 = (self) => optional$4(self);
35268
35519
  const unwrap$7 = (value) => getOrUndefined(value);
@@ -35486,7 +35737,7 @@ const pickSummary$2 = (doc) => {
35486
35737
  };
35487
35738
  const noteView = {
35488
35739
  kind: "note",
35489
- modes: new Set([
35740
+ modes: /* @__PURE__ */ new Set([
35490
35741
  "readable",
35491
35742
  "llm",
35492
35743
  "xml"
@@ -35574,7 +35825,7 @@ const renderNoteListReadable = (data) => {
35574
35825
  };
35575
35826
  const noteListView = {
35576
35827
  kind: "note-list",
35577
- modes: new Set(["readable", "llm"]),
35828
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
35578
35829
  readable: (data) => renderNoteListReadable(data)
35579
35830
  };
35580
35831
  const get$6 = make$14("get", { slugOrId: text$6({ name: "slugOrId" }) }, ({ slugOrId }) => gen(function* () {
@@ -35923,7 +36174,7 @@ const pickSummary$1 = (doc) => {
35923
36174
  };
35924
36175
  const pageView = {
35925
36176
  kind: "page",
35926
- modes: new Set([
36177
+ modes: /* @__PURE__ */ new Set([
35927
36178
  "readable",
35928
36179
  "llm",
35929
36180
  "xml"
@@ -36260,7 +36511,7 @@ const pickSummary = (doc) => {
36260
36511
  };
36261
36512
  const postView = {
36262
36513
  kind: "post",
36263
- modes: new Set([
36514
+ modes: /* @__PURE__ */ new Set([
36264
36515
  "readable",
36265
36516
  "llm",
36266
36517
  "xml"
@@ -36343,7 +36594,7 @@ const renderPostListReadable = (data) => {
36343
36594
  };
36344
36595
  const postListView = {
36345
36596
  kind: "post-list",
36346
- modes: new Set(["readable", "llm"]),
36597
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
36347
36598
  readable: (data) => renderPostListReadable(data)
36348
36599
  };
36349
36600
  const get$4 = make$14("get", { slugOrId: text$6({ name: "slugOrId" }) }, ({ slugOrId }) => gen(function* () {
@@ -36391,7 +36642,7 @@ const publish = make$14("publish", { slugOrId: text$6({ name: "slugOrId" }) }, (
36391
36642
  //#region src/cli/post/stage.ts
36392
36643
  const slugOrId$5 = text$6({ name: "slugOrId" });
36393
36644
  /** Draft-native fields; everything else rides along in `typeSpecificData`. */
36394
- const DRAFT_CORE_KEYS = new Set([
36645
+ const DRAFT_CORE_KEYS = /* @__PURE__ */ new Set([
36395
36646
  "title",
36396
36647
  "text",
36397
36648
  "content",
@@ -36590,7 +36841,27 @@ const saveOpt = text$4("save").pipe(optional$4);
36590
36841
  const printOpt = boolean("print").pipe(optional$4);
36591
36842
  const openOpt = boolean("open").pipe(optional$4);
36592
36843
  const requireFrom$3 = createRequire(import.meta.url);
36844
+ const findCliPackageRoot$1 = () => {
36845
+ let dir = dirname(fileURLToPath(import.meta.url));
36846
+ for (let i = 0; i < 8; i++) {
36847
+ if (!dir || dir === dirname(dir)) break;
36848
+ try {
36849
+ if (requireFrom$3(join(dir, "package.json")).name === "@mx-space/cli") return dir;
36850
+ } catch {}
36851
+ dir = dirname(dir);
36852
+ }
36853
+ return null;
36854
+ };
36855
+ const resolveBundledLitexmlBin = () => {
36856
+ const root = findCliPackageRoot$1();
36857
+ if (!root) return null;
36858
+ const candidate = join(root, "dist", "vendor", "litexml", "cli.mjs");
36859
+ return existsSync(candidate) ? candidate : null;
36860
+ };
36861
+ const isSourcePreviewModule = () => /[\\/]src[\\/]cli[\\/]preview[\\/]index\.ts$/.test(fileURLToPath(import.meta.url));
36593
36862
  const resolveLitexmlBin = () => {
36863
+ const bundled = resolveBundledLitexmlBin();
36864
+ if (!isSourcePreviewModule() && bundled) return bundled;
36594
36865
  try {
36595
36866
  return requireFrom$3.resolve("@haklex/rich-litexml-cli/dist/cli.mjs");
36596
36867
  } catch {}
@@ -36599,17 +36870,15 @@ const resolveLitexmlBin = () => {
36599
36870
  let dir = filePath.slice(0, Math.max(0, filePath.lastIndexOf("/")));
36600
36871
  for (let i = 0; i < 8; i++) {
36601
36872
  const candidate = `${dir}/node_modules/@haklex/rich-litexml-cli/dist/cli.mjs`;
36602
- try {
36603
- requireFrom$3(`${candidate}`);
36604
- return candidate;
36605
- } catch {}
36873
+ if (existsSync(candidate)) return candidate;
36606
36874
  const next = dir.slice(0, Math.max(0, dir.lastIndexOf("/")));
36607
36875
  if (next === dir) break;
36608
36876
  dir = next;
36609
36877
  }
36878
+ if (bundled) return bundled;
36610
36879
  throw new Generic({
36611
- message: "cannot resolve @haklex/rich-litexml-cli binary",
36612
- hint: "reinstall mxs or run `pnpm install` so the dependency is present"
36880
+ message: "cannot resolve LiteXML preview renderer",
36881
+ hint: "rebuild @mx-space/cli or reinstall mxs so the vendored preview renderer is present"
36613
36882
  });
36614
36883
  };
36615
36884
  const detectVariant = (body) => {
@@ -36713,7 +36982,7 @@ const previewCmd = make$14("preview", {
36713
36982
  //#region src/cli/profile/view.ts
36714
36983
  const profileListView = {
36715
36984
  kind: "profile-list",
36716
- modes: new Set(["readable", "llm"]),
36985
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
36717
36986
  readable: (rows, { color }) => {
36718
36987
  if (rows.length === 0) return "";
36719
36988
  return renderTable([
@@ -37093,7 +37362,7 @@ const pickText = (doc) => {
37093
37362
  };
37094
37363
  const projectView = {
37095
37364
  kind: "project",
37096
- modes: new Set(["readable", "llm"]),
37365
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
37097
37366
  readable: (data, ctx) => {
37098
37367
  const doc = normalize(data);
37099
37368
  const body = pickText(doc);
@@ -37147,7 +37416,7 @@ const renderProjectListReadable = (data) => {
37147
37416
  };
37148
37417
  const projectListView = {
37149
37418
  kind: "project-list",
37150
- modes: new Set(["readable", "llm"]),
37419
+ modes: /* @__PURE__ */ new Set(["readable", "llm"]),
37151
37420
  readable: (data) => renderProjectListReadable(data)
37152
37421
  };
37153
37422
  //#endregion
@@ -39298,14 +39567,14 @@ const make$2 = gen(function* () {
39298
39567
  const cache = yield* make$24(null);
39299
39568
  const indexCache = yield* make$24(null);
39300
39569
  const load = gen(function* () {
39301
- const cached = yield* get$15(cache);
39570
+ const cached = yield* get$16(cache);
39302
39571
  if (cached) return cached;
39303
39572
  const chapters = yield* buildRegistry(fs, path, cliDir, haklexDir);
39304
39573
  yield* set$3(cache, chapters);
39305
39574
  return chapters;
39306
39575
  });
39307
39576
  const loadIndex = gen(function* () {
39308
- const cached = yield* get$15(indexCache);
39577
+ const cached = yield* get$16(indexCache);
39309
39578
  if (cached) return cached;
39310
39579
  const mini = buildIndex(yield* load);
39311
39580
  yield* set$3(indexCache, mini);
@@ -39355,7 +39624,7 @@ var Skill = class Skill extends Tag$2("Skill")() {
39355
39624
  const xmlEscape = (s) => s.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;");
39356
39625
  const skillListView = {
39357
39626
  kind: "skill-list",
39358
- modes: new Set([
39627
+ modes: /* @__PURE__ */ new Set([
39359
39628
  "readable",
39360
39629
  "llm",
39361
39630
  "xml"
@@ -39396,7 +39665,7 @@ const renderChapterReadable = (chapter, color) => {
39396
39665
  };
39397
39666
  const skillChapterView = {
39398
39667
  kind: "skill-chapter",
39399
- modes: new Set([
39668
+ modes: /* @__PURE__ */ new Set([
39400
39669
  "readable",
39401
39670
  "llm",
39402
39671
  "xml"
@@ -39407,7 +39676,7 @@ const skillChapterView = {
39407
39676
  };
39408
39677
  const skillAllView = {
39409
39678
  kind: "skill-all",
39410
- modes: new Set([
39679
+ modes: /* @__PURE__ */ new Set([
39411
39680
  "readable",
39412
39681
  "llm",
39413
39682
  "xml"
@@ -39420,7 +39689,7 @@ const skillAllView = {
39420
39689
  };
39421
39690
  const skillSearchView = {
39422
39691
  kind: "skill-search",
39423
- modes: new Set([
39692
+ modes: /* @__PURE__ */ new Set([
39424
39693
  "readable",
39425
39694
  "llm",
39426
39695
  "xml"
@@ -39708,7 +39977,7 @@ const list$1 = make$14("ls", {
39708
39977
  })).pipe(withDescription("list snippet VFS paths"));
39709
39978
  //#endregion
39710
39979
  //#region src/cli/snippet/_sync.ts
39711
- const IGNORED_NAMES = new Set([
39980
+ const IGNORED_NAMES = /* @__PURE__ */ new Set([
39712
39981
  ".git",
39713
39982
  "node_modules",
39714
39983
  "__pycache__",
@@ -40072,7 +40341,7 @@ const topicCmd = make$14("topic").pipe(withDescription(help.description), withSu
40072
40341
  del
40073
40342
  ]));
40074
40343
  //#endregion
40075
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/constants.js
40344
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
40076
40345
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40077
40346
  const SEMVER_SPEC_VERSION = "2.0.0";
40078
40347
  const MAX_LENGTH = 256;
@@ -40097,12 +40366,12 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40097
40366
  };
40098
40367
  }));
40099
40368
  //#endregion
40100
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/debug.js
40369
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
40101
40370
  var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40102
40371
  module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
40103
40372
  }));
40104
40373
  //#endregion
40105
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/re.js
40374
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
40106
40375
  var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40107
40376
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
40108
40377
  const debug = require_debug();
@@ -40181,7 +40450,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40181
40450
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
40182
40451
  }));
40183
40452
  //#endregion
40184
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/parse-options.js
40453
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
40185
40454
  var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40186
40455
  const looseOption = Object.freeze({ loose: true });
40187
40456
  const emptyOpts = Object.freeze({});
@@ -40193,7 +40462,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40193
40462
  module.exports = parseOptions;
40194
40463
  }));
40195
40464
  //#endregion
40196
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/identifiers.js
40465
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
40197
40466
  var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40198
40467
  const numeric = /^[0-9]+$/;
40199
40468
  const compareIdentifiers = (a, b) => {
@@ -40213,7 +40482,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40213
40482
  };
40214
40483
  }));
40215
40484
  //#endregion
40216
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/semver.js
40485
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
40217
40486
  var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40218
40487
  const debug = require_debug();
40219
40488
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
@@ -40398,7 +40667,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40398
40667
  };
40399
40668
  }));
40400
40669
  //#endregion
40401
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/parse.js
40670
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
40402
40671
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40403
40672
  const SemVer = require_semver$1();
40404
40673
  const parse = (version, options, throwErrors = false) => {
@@ -40413,7 +40682,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40413
40682
  module.exports = parse;
40414
40683
  }));
40415
40684
  //#endregion
40416
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/valid.js
40685
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
40417
40686
  var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40418
40687
  const parse = require_parse();
40419
40688
  const valid = (version, options) => {
@@ -40423,7 +40692,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40423
40692
  module.exports = valid;
40424
40693
  }));
40425
40694
  //#endregion
40426
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/clean.js
40695
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
40427
40696
  var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40428
40697
  const parse = require_parse();
40429
40698
  const clean = (version, options) => {
@@ -40433,7 +40702,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40433
40702
  module.exports = clean;
40434
40703
  }));
40435
40704
  //#endregion
40436
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/inc.js
40705
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
40437
40706
  var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40438
40707
  const SemVer = require_semver$1();
40439
40708
  const inc = (version, release, options, identifier, identifierBase) => {
@@ -40451,7 +40720,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40451
40720
  module.exports = inc;
40452
40721
  }));
40453
40722
  //#endregion
40454
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/diff.js
40723
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
40455
40724
  var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40456
40725
  const parse = require_parse();
40457
40726
  const diff = (version1, version2) => {
@@ -40479,28 +40748,28 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40479
40748
  module.exports = diff;
40480
40749
  }));
40481
40750
  //#endregion
40482
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/major.js
40751
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
40483
40752
  var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40484
40753
  const SemVer = require_semver$1();
40485
40754
  const major = (a, loose) => new SemVer(a, loose).major;
40486
40755
  module.exports = major;
40487
40756
  }));
40488
40757
  //#endregion
40489
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/minor.js
40758
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
40490
40759
  var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40491
40760
  const SemVer = require_semver$1();
40492
40761
  const minor = (a, loose) => new SemVer(a, loose).minor;
40493
40762
  module.exports = minor;
40494
40763
  }));
40495
40764
  //#endregion
40496
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/patch.js
40765
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
40497
40766
  var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40498
40767
  const SemVer = require_semver$1();
40499
40768
  const patch = (a, loose) => new SemVer(a, loose).patch;
40500
40769
  module.exports = patch;
40501
40770
  }));
40502
40771
  //#endregion
40503
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/prerelease.js
40772
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
40504
40773
  var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40505
40774
  const parse = require_parse();
40506
40775
  const prerelease = (version, options) => {
@@ -40510,28 +40779,28 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40510
40779
  module.exports = prerelease;
40511
40780
  }));
40512
40781
  //#endregion
40513
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare.js
40782
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
40514
40783
  var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40515
40784
  const SemVer = require_semver$1();
40516
40785
  const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
40517
40786
  module.exports = compare;
40518
40787
  }));
40519
40788
  //#endregion
40520
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rcompare.js
40789
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
40521
40790
  var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40522
40791
  const compare = require_compare();
40523
40792
  const rcompare = (a, b, loose) => compare(b, a, loose);
40524
40793
  module.exports = rcompare;
40525
40794
  }));
40526
40795
  //#endregion
40527
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-loose.js
40796
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
40528
40797
  var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40529
40798
  const compare = require_compare();
40530
40799
  const compareLoose = (a, b) => compare(a, b, true);
40531
40800
  module.exports = compareLoose;
40532
40801
  }));
40533
40802
  //#endregion
40534
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-build.js
40803
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
40535
40804
  var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40536
40805
  const SemVer = require_semver$1();
40537
40806
  const compareBuild = (a, b, loose) => {
@@ -40542,63 +40811,63 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
40542
40811
  module.exports = compareBuild;
40543
40812
  }));
40544
40813
  //#endregion
40545
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/sort.js
40814
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
40546
40815
  var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40547
40816
  const compareBuild = require_compare_build();
40548
40817
  const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
40549
40818
  module.exports = sort;
40550
40819
  }));
40551
40820
  //#endregion
40552
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rsort.js
40821
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
40553
40822
  var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40554
40823
  const compareBuild = require_compare_build();
40555
40824
  const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
40556
40825
  module.exports = rsort;
40557
40826
  }));
40558
40827
  //#endregion
40559
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gt.js
40828
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
40560
40829
  var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40561
40830
  const compare = require_compare();
40562
40831
  const gt = (a, b, loose) => compare(a, b, loose) > 0;
40563
40832
  module.exports = gt;
40564
40833
  }));
40565
40834
  //#endregion
40566
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lt.js
40835
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
40567
40836
  var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40568
40837
  const compare = require_compare();
40569
40838
  const lt = (a, b, loose) => compare(a, b, loose) < 0;
40570
40839
  module.exports = lt;
40571
40840
  }));
40572
40841
  //#endregion
40573
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/eq.js
40842
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
40574
40843
  var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40575
40844
  const compare = require_compare();
40576
40845
  const eq = (a, b, loose) => compare(a, b, loose) === 0;
40577
40846
  module.exports = eq;
40578
40847
  }));
40579
40848
  //#endregion
40580
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/neq.js
40849
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
40581
40850
  var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40582
40851
  const compare = require_compare();
40583
40852
  const neq = (a, b, loose) => compare(a, b, loose) !== 0;
40584
40853
  module.exports = neq;
40585
40854
  }));
40586
40855
  //#endregion
40587
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gte.js
40856
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
40588
40857
  var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40589
40858
  const compare = require_compare();
40590
40859
  const gte = (a, b, loose) => compare(a, b, loose) >= 0;
40591
40860
  module.exports = gte;
40592
40861
  }));
40593
40862
  //#endregion
40594
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lte.js
40863
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
40595
40864
  var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40596
40865
  const compare = require_compare();
40597
40866
  const lte = (a, b, loose) => compare(a, b, loose) <= 0;
40598
40867
  module.exports = lte;
40599
40868
  }));
40600
40869
  //#endregion
40601
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/cmp.js
40870
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
40602
40871
  var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40603
40872
  const eq = require_eq();
40604
40873
  const neq = require_neq();
@@ -40630,7 +40899,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40630
40899
  module.exports = cmp;
40631
40900
  }));
40632
40901
  //#endregion
40633
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/coerce.js
40902
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
40634
40903
  var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40635
40904
  const SemVer = require_semver$1();
40636
40905
  const parse = require_parse();
@@ -40658,7 +40927,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40658
40927
  module.exports = coerce;
40659
40928
  }));
40660
40929
  //#endregion
40661
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/truncate.js
40930
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
40662
40931
  var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40663
40932
  const parse = require_parse();
40664
40933
  const constants = require_constants();
@@ -40691,7 +40960,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40691
40960
  module.exports = truncate;
40692
40961
  }));
40693
40962
  //#endregion
40694
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/lrucache.js
40963
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
40695
40964
  var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40696
40965
  var LRUCache = class {
40697
40966
  constructor() {
@@ -40724,7 +40993,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40724
40993
  module.exports = LRUCache;
40725
40994
  }));
40726
40995
  //#endregion
40727
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/range.js
40996
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
40728
40997
  var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40729
40998
  const SPACE_CHARACTERS = /\s+/g;
40730
40999
  module.exports = class Range {
@@ -40874,12 +41143,13 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
40874
41143
  };
40875
41144
  const replaceTilde = (comp, options) => {
40876
41145
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
41146
+ const z = options.includePrerelease ? "-0" : "";
40877
41147
  return comp.replace(r, (_, M, m, p, pr) => {
40878
41148
  debug("tilde", comp, _, M, m, p, pr);
40879
41149
  let ret;
40880
41150
  if (isX(M)) ret = "";
40881
- else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
40882
- else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
41151
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
41152
+ else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
40883
41153
  else if (pr) {
40884
41154
  debug("replaceTilde pr", pr);
40885
41155
  ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
@@ -41000,7 +41270,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41000
41270
  };
41001
41271
  }));
41002
41272
  //#endregion
41003
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/comparator.js
41273
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
41004
41274
  var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41005
41275
  const ANY = Symbol("SemVer ANY");
41006
41276
  module.exports = class Comparator {
@@ -41070,7 +41340,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41070
41340
  const Range = require_range();
41071
41341
  }));
41072
41342
  //#endregion
41073
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/satisfies.js
41343
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
41074
41344
  var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41075
41345
  const Range = require_range();
41076
41346
  const satisfies = (version, range, options) => {
@@ -41084,14 +41354,14 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41084
41354
  module.exports = satisfies;
41085
41355
  }));
41086
41356
  //#endregion
41087
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/to-comparators.js
41357
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
41088
41358
  var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41089
41359
  const Range = require_range();
41090
41360
  const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
41091
41361
  module.exports = toComparators;
41092
41362
  }));
41093
41363
  //#endregion
41094
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/max-satisfying.js
41364
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
41095
41365
  var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41096
41366
  const SemVer = require_semver$1();
41097
41367
  const Range = require_range();
@@ -41117,7 +41387,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
41117
41387
  module.exports = maxSatisfying;
41118
41388
  }));
41119
41389
  //#endregion
41120
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-satisfying.js
41390
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
41121
41391
  var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41122
41392
  const SemVer = require_semver$1();
41123
41393
  const Range = require_range();
@@ -41143,7 +41413,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
41143
41413
  module.exports = minSatisfying;
41144
41414
  }));
41145
41415
  //#endregion
41146
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-version.js
41416
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
41147
41417
  var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41148
41418
  const SemVer = require_semver$1();
41149
41419
  const Range = require_range();
@@ -41183,7 +41453,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41183
41453
  module.exports = minVersion;
41184
41454
  }));
41185
41455
  //#endregion
41186
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/valid.js
41456
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
41187
41457
  var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41188
41458
  const Range = require_range();
41189
41459
  const validRange = (range, options) => {
@@ -41196,7 +41466,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41196
41466
  module.exports = validRange;
41197
41467
  }));
41198
41468
  //#endregion
41199
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/outside.js
41469
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
41200
41470
  var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41201
41471
  const SemVer = require_semver$1();
41202
41472
  const Comparator = require_comparator();
@@ -41249,21 +41519,21 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41249
41519
  module.exports = outside;
41250
41520
  }));
41251
41521
  //#endregion
41252
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/gtr.js
41522
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
41253
41523
  var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41254
41524
  const outside = require_outside();
41255
41525
  const gtr = (version, range, options) => outside(version, range, ">", options);
41256
41526
  module.exports = gtr;
41257
41527
  }));
41258
41528
  //#endregion
41259
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/ltr.js
41529
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
41260
41530
  var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41261
41531
  const outside = require_outside();
41262
41532
  const ltr = (version, range, options) => outside(version, range, "<", options);
41263
41533
  module.exports = ltr;
41264
41534
  }));
41265
41535
  //#endregion
41266
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/intersects.js
41536
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
41267
41537
  var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41268
41538
  const Range = require_range();
41269
41539
  const intersects = (r1, r2, options) => {
@@ -41274,7 +41544,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41274
41544
  module.exports = intersects;
41275
41545
  }));
41276
41546
  //#endregion
41277
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/simplify.js
41547
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
41278
41548
  var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41279
41549
  const satisfies = require_satisfies();
41280
41550
  const compare = require_compare();
@@ -41304,7 +41574,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41304
41574
  };
41305
41575
  }));
41306
41576
  //#endregion
41307
- //#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/subset.js
41577
+ //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
41308
41578
  var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
41309
41579
  const Range = require_range();
41310
41580
  const Comparator = require_comparator();
@@ -41761,7 +42031,7 @@ const planAutoUpdate = (entry, channel) => {
41761
42031
  args
41762
42032
  };
41763
42033
  };
41764
- const KNOWN_PMS = new Set([
42034
+ const KNOWN_PMS = /* @__PURE__ */ new Set([
41765
42035
  "npm",
41766
42036
  "pnpm",
41767
42037
  "yarn",
@@ -42106,6 +42376,7 @@ const GROUP_NAMES = [
42106
42376
  "post",
42107
42377
  "note",
42108
42378
  "page",
42379
+ "draft",
42109
42380
  "project",
42110
42381
  "category",
42111
42382
  "topic",
@@ -42315,7 +42586,7 @@ const emitGroupHelp = (data) => {
42315
42586
  * this is the contract. Ported from `src/core/preaction-guards.ts`.
42316
42587
  */
42317
42588
  /** Parent command names whose entire subtree is exempt from the none_active guard. */
42318
- const PREFLIGHT_EXEMPT_PARENTS = new Set(["profile", "skill"]);
42589
+ const PREFLIGHT_EXEMPT_PARENTS = /* @__PURE__ */ new Set(["profile", "skill"]);
42319
42590
  /**
42320
42591
  * Individual (parent, name) pairs that are exempt regardless of profile state.
42321
42592
  * `auth login` is included unconditionally so a fresh install can bootstrap.
@@ -42328,7 +42599,7 @@ const PREFLIGHT_EXEMPT_COMMANDS = [{
42328
42599
  * Top-level command names that are exempt from the profile.none_active guard.
42329
42600
  * Used for commands that should work without a configured server (e.g. `mxs update`).
42330
42601
  */
42331
- const PREFLIGHT_EXEMPT_TOPLEVEL = new Set([
42602
+ const PREFLIGHT_EXEMPT_TOPLEVEL = /* @__PURE__ */ new Set([
42332
42603
  "update",
42333
42604
  "skill",
42334
42605
  "preview"
@@ -42349,7 +42620,7 @@ function requiresActiveProfile(input) {
42349
42620
  return true;
42350
42621
  }
42351
42622
  /** Set of valid top-level subcommand names. Used to walk `process.argv`. */
42352
- const TOPLEVEL_COMMANDS = new Set([
42623
+ const TOPLEVEL_COMMANDS = /* @__PURE__ */ new Set([
42353
42624
  "auth",
42354
42625
  "profile",
42355
42626
  "post",
@@ -42404,7 +42675,7 @@ function detectInvokedCommand(argv, knownGlobalFlags = DEFAULT_KNOWN_GLOBAL_FLAG
42404
42675
  };
42405
42676
  }
42406
42677
  /** Known global flag names; used by `detectInvokedCommand` to skip their values. */
42407
- const DEFAULT_KNOWN_GLOBAL_FLAGS = new Set([
42678
+ const DEFAULT_KNOWN_GLOBAL_FLAGS = /* @__PURE__ */ new Set([
42408
42679
  "--json",
42409
42680
  "--output",
42410
42681
  "--api-url",
@@ -42419,7 +42690,7 @@ const DEFAULT_KNOWN_GLOBAL_FLAGS = new Set([
42419
42690
  "--version"
42420
42691
  ]);
42421
42692
  /** Subset of global flags that take a value. */
42422
- const FLAG_TAKES_VALUE = new Set([
42693
+ const FLAG_TAKES_VALUE = /* @__PURE__ */ new Set([
42423
42694
  "--output",
42424
42695
  "--api-url",
42425
42696
  "--token",
@@ -42608,6 +42879,7 @@ const rootCmd = make$14("mxs", {}, () => flatMap$1(Renderer, (r) => r.emitInfo("
42608
42879
  postCmd,
42609
42880
  noteCmd,
42610
42881
  pageCmd,
42882
+ draftCmd,
42611
42883
  projectCmd,
42612
42884
  categoryCmd,
42613
42885
  topicCmd,
@@ -42663,7 +42935,7 @@ const preflight = (flags) => gen(function* () {
42663
42935
  parentName: invoked.parentName
42664
42936
  }));
42665
42937
  });
42666
- const LEAF_COMMANDS = new Set([
42938
+ const LEAF_COMMANDS = /* @__PURE__ */ new Set([
42667
42939
  "update",
42668
42940
  "skill",
42669
42941
  "preview"