flavor-code 1.4.1 → 1.4.3-beta.2

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 (76) hide show
  1. package/README.md +32 -2
  2. package/README.zh-CN.md +32 -2
  3. package/dist/{app-4YRKE7VI.js → app-G35YBHPR.js} +873 -641
  4. package/dist/apply-WOW3QU5I.js +51 -0
  5. package/dist/broker-cli-X5H46FZV.js +15 -0
  6. package/dist/check-CSKTV4O2.js +16 -0
  7. package/dist/chunk-3563SW4X.js +10513 -0
  8. package/dist/chunk-3UX2CGDW.js +1955 -0
  9. package/dist/chunk-4TMLXZVZ.js +75 -0
  10. package/dist/chunk-6F66UXBI.js +48 -0
  11. package/dist/{chunk-FAORPP4F.js → chunk-6URQ7FIF.js} +24 -88
  12. package/dist/chunk-6X62CGMA.js +193 -0
  13. package/dist/chunk-7Y64WNBB.js +8930 -0
  14. package/dist/chunk-AA4QNKTF.js +501 -0
  15. package/dist/chunk-BDX777JR.js +11 -0
  16. package/dist/chunk-CVP5OUHD.js +103 -0
  17. package/dist/chunk-EWD7FWTH.js +14547 -0
  18. package/dist/chunk-FAJ6YDZK.js +630 -0
  19. package/dist/{chunk-N5MXHJKD.js → chunk-GTFP2R5I.js} +1 -1
  20. package/dist/{chunk-7YFHRORG.js → chunk-HGTCIHWA.js} +383 -172
  21. package/dist/chunk-IDJAHEG6.js +43501 -0
  22. package/dist/chunk-IQEEFDEE.js +389 -0
  23. package/dist/chunk-IU3UBETC.js +30 -0
  24. package/dist/chunk-K7UGGWJV.js +1003 -0
  25. package/dist/chunk-KRWWCVXA.js +74 -0
  26. package/dist/chunk-OKHV7CTB.js +482 -0
  27. package/dist/chunk-PULWAH6E.js +474 -0
  28. package/dist/chunk-PZ5NKRVA.js +85 -0
  29. package/dist/chunk-RBAZLFKB.js +1022 -0
  30. package/dist/chunk-RV3EXUXM.js +30 -0
  31. package/dist/chunk-SJUIIHIA.js +2130 -0
  32. package/dist/{chunk-VMQWXQEC.js → chunk-T6RE76D2.js} +2003 -493
  33. package/dist/chunk-TIEOVQW6.js +61 -0
  34. package/dist/chunk-WLZUAVVU.js +15 -0
  35. package/dist/chunk-X442CJJH.js +114 -0
  36. package/dist/{chunk-RAYH6K2H.js → chunk-Y7EH4NVO.js} +1 -1
  37. package/dist/{chunk-S32JRDZK.js → chunk-ZKKVSR37.js} +6 -1
  38. package/dist/{claude-ink-JZXNSAQS.js → claude-ink-BE56DB6N.js} +9 -4
  39. package/dist/cli-3MF6EL2H.js +163 -0
  40. package/dist/cli-main.js +3805 -473
  41. package/dist/cli.js +50 -4
  42. package/dist/config/load.d.ts +8 -0
  43. package/dist/config/schema.d.ts +11 -0
  44. package/dist/context/manager.d.ts +2 -0
  45. package/dist/desktop/main.js +4303 -1171
  46. package/dist/desktop/preload.cjs +30 -0
  47. package/dist/desktop-renderer/assets/index-BWklSoOO.css +1 -0
  48. package/dist/desktop-renderer/assets/index-DCqIrF1S.js +153 -0
  49. package/dist/desktop-renderer/assets/{interactive-terminal-1agnYY5L.js → interactive-terminal-B6GbpzIn.js} +1 -1
  50. package/dist/desktop-renderer/index.html +2 -2
  51. package/dist/doctor-OHCGK52S.js +20 -0
  52. package/dist/load-QK6CMLDF.js +25 -0
  53. package/dist/log-ATFIPRNU.js +19 -0
  54. package/dist/manager-5SI4MPES.js +191 -0
  55. package/dist/models/anthropic.d.ts +3 -0
  56. package/dist/node-LOIXT44J.js +879 -0
  57. package/dist/plugin-worker-entry.js +1 -1
  58. package/dist/production-6DIZ6YLQ.js +46 -0
  59. package/dist/production.d.ts +28 -1
  60. package/dist/project-3QXE22TG.js +11 -0
  61. package/dist/react-M6JGXSJZ.js +7 -0
  62. package/dist/recorder-FAGJJH3N.js +11 -0
  63. package/dist/sdk/index.js +30 -8
  64. package/dist/server-2KLKPHPL.js +11 -0
  65. package/dist/session/store.d.ts +1 -0
  66. package/dist/store-ZIHN6363.js +18 -0
  67. package/dist/ui/commands.d.ts +1 -5
  68. package/dist/usage-summary-G5FBOJLK.js +13 -0
  69. package/dist/utils/execFileNoThrow.d.ts +1 -0
  70. package/dist/write-stream-CGD57URC.js +77 -0
  71. package/package.json +1 -1
  72. package/dist/chunk-O2PC44GY.js +0 -26120
  73. package/dist/chunk-ZJCAQXA7.js +0 -169
  74. package/dist/desktop-renderer/assets/index-BM9ugkh9.js +0 -154
  75. package/dist/desktop-renderer/assets/index-Bk6FYhyh.css +0 -1
  76. package/dist/load-UPOG3XQR.js +0 -19
@@ -0,0 +1,474 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as createFlavorRequire } from "node:module"; const require = createFlavorRequire(import.meta.url);
3
+ import {
4
+ __commonJS
5
+ } from "./chunk-ZKKVSR37.js";
6
+
7
+ // node_modules/react/cjs/react.production.js
8
+ var require_react_production = __commonJS({
9
+ "node_modules/react/cjs/react.production.js"(exports) {
10
+ "use strict";
11
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
12
+ var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
13
+ var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
14
+ var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
15
+ var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
16
+ var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
17
+ var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
18
+ var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
19
+ var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
20
+ var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
21
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
22
+ var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
23
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
24
+ function getIteratorFn(maybeIterable) {
25
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
26
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
27
+ return "function" === typeof maybeIterable ? maybeIterable : null;
28
+ }
29
+ var ReactNoopUpdateQueue = {
30
+ isMounted: function() {
31
+ return false;
32
+ },
33
+ enqueueForceUpdate: function() {
34
+ },
35
+ enqueueReplaceState: function() {
36
+ },
37
+ enqueueSetState: function() {
38
+ }
39
+ };
40
+ var assign = Object.assign;
41
+ var emptyObject = {};
42
+ function Component(props, context, updater) {
43
+ this.props = props;
44
+ this.context = context;
45
+ this.refs = emptyObject;
46
+ this.updater = updater || ReactNoopUpdateQueue;
47
+ }
48
+ Component.prototype.isReactComponent = {};
49
+ Component.prototype.setState = function(partialState, callback) {
50
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
51
+ throw Error(
52
+ "takes an object of state variables to update or a function which returns an object of state variables."
53
+ );
54
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
55
+ };
56
+ Component.prototype.forceUpdate = function(callback) {
57
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
58
+ };
59
+ function ComponentDummy() {
60
+ }
61
+ ComponentDummy.prototype = Component.prototype;
62
+ function PureComponent(props, context, updater) {
63
+ this.props = props;
64
+ this.context = context;
65
+ this.refs = emptyObject;
66
+ this.updater = updater || ReactNoopUpdateQueue;
67
+ }
68
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
69
+ pureComponentPrototype.constructor = PureComponent;
70
+ assign(pureComponentPrototype, Component.prototype);
71
+ pureComponentPrototype.isPureReactComponent = true;
72
+ var isArrayImpl = Array.isArray;
73
+ function noop() {
74
+ }
75
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null };
76
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
77
+ function ReactElement(type, key, props) {
78
+ var refProp = props.ref;
79
+ return {
80
+ $$typeof: REACT_ELEMENT_TYPE,
81
+ type,
82
+ key,
83
+ ref: void 0 !== refProp ? refProp : null,
84
+ props
85
+ };
86
+ }
87
+ function cloneAndReplaceKey(oldElement, newKey) {
88
+ return ReactElement(oldElement.type, newKey, oldElement.props);
89
+ }
90
+ function isValidElement(object) {
91
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
92
+ }
93
+ function escape(key) {
94
+ var escaperLookup = { "=": "=0", ":": "=2" };
95
+ return "$" + key.replace(/[=:]/g, function(match) {
96
+ return escaperLookup[match];
97
+ });
98
+ }
99
+ var userProvidedKeyEscapeRegex = /\/+/g;
100
+ function getElementKey(element, index) {
101
+ return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
102
+ }
103
+ function resolveThenable(thenable) {
104
+ switch (thenable.status) {
105
+ case "fulfilled":
106
+ return thenable.value;
107
+ case "rejected":
108
+ throw thenable.reason;
109
+ default:
110
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
111
+ function(fulfilledValue) {
112
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
113
+ },
114
+ function(error) {
115
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
116
+ }
117
+ )), thenable.status) {
118
+ case "fulfilled":
119
+ return thenable.value;
120
+ case "rejected":
121
+ throw thenable.reason;
122
+ }
123
+ }
124
+ throw thenable;
125
+ }
126
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
127
+ var type = typeof children;
128
+ if ("undefined" === type || "boolean" === type) children = null;
129
+ var invokeCallback = false;
130
+ if (null === children) invokeCallback = true;
131
+ else
132
+ switch (type) {
133
+ case "bigint":
134
+ case "string":
135
+ case "number":
136
+ invokeCallback = true;
137
+ break;
138
+ case "object":
139
+ switch (children.$$typeof) {
140
+ case REACT_ELEMENT_TYPE:
141
+ case REACT_PORTAL_TYPE:
142
+ invokeCallback = true;
143
+ break;
144
+ case REACT_LAZY_TYPE:
145
+ return invokeCallback = children._init, mapIntoArray(
146
+ invokeCallback(children._payload),
147
+ array,
148
+ escapedPrefix,
149
+ nameSoFar,
150
+ callback
151
+ );
152
+ }
153
+ }
154
+ if (invokeCallback)
155
+ return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
156
+ return c;
157
+ })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
158
+ callback,
159
+ escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
160
+ userProvidedKeyEscapeRegex,
161
+ "$&/"
162
+ ) + "/") + invokeCallback
163
+ )), array.push(callback)), 1;
164
+ invokeCallback = 0;
165
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
166
+ if (isArrayImpl(children))
167
+ for (var i = 0; i < children.length; i++)
168
+ nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
169
+ nameSoFar,
170
+ array,
171
+ escapedPrefix,
172
+ type,
173
+ callback
174
+ );
175
+ else if (i = getIteratorFn(children), "function" === typeof i)
176
+ for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
177
+ nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
178
+ nameSoFar,
179
+ array,
180
+ escapedPrefix,
181
+ type,
182
+ callback
183
+ );
184
+ else if ("object" === type) {
185
+ if ("function" === typeof children.then)
186
+ return mapIntoArray(
187
+ resolveThenable(children),
188
+ array,
189
+ escapedPrefix,
190
+ nameSoFar,
191
+ callback
192
+ );
193
+ array = String(children);
194
+ throw Error(
195
+ "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
196
+ );
197
+ }
198
+ return invokeCallback;
199
+ }
200
+ function mapChildren(children, func, context) {
201
+ if (null == children) return children;
202
+ var result = [], count = 0;
203
+ mapIntoArray(children, result, "", "", function(child) {
204
+ return func.call(context, child, count++);
205
+ });
206
+ return result;
207
+ }
208
+ function lazyInitializer(payload) {
209
+ if (-1 === payload._status) {
210
+ var ctor = payload._result;
211
+ ctor = ctor();
212
+ ctor.then(
213
+ function(moduleObject) {
214
+ if (0 === payload._status || -1 === payload._status)
215
+ payload._status = 1, payload._result = moduleObject;
216
+ },
217
+ function(error) {
218
+ if (0 === payload._status || -1 === payload._status)
219
+ payload._status = 2, payload._result = error;
220
+ }
221
+ );
222
+ -1 === payload._status && (payload._status = 0, payload._result = ctor);
223
+ }
224
+ if (1 === payload._status) return payload._result.default;
225
+ throw payload._result;
226
+ }
227
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
228
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
229
+ var event = new window.ErrorEvent("error", {
230
+ bubbles: true,
231
+ cancelable: true,
232
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
233
+ error
234
+ });
235
+ if (!window.dispatchEvent(event)) return;
236
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
237
+ process.emit("uncaughtException", error);
238
+ return;
239
+ }
240
+ console.error(error);
241
+ };
242
+ var Children = {
243
+ map: mapChildren,
244
+ forEach: function(children, forEachFunc, forEachContext) {
245
+ mapChildren(
246
+ children,
247
+ function() {
248
+ forEachFunc.apply(this, arguments);
249
+ },
250
+ forEachContext
251
+ );
252
+ },
253
+ count: function(children) {
254
+ var n = 0;
255
+ mapChildren(children, function() {
256
+ n++;
257
+ });
258
+ return n;
259
+ },
260
+ toArray: function(children) {
261
+ return mapChildren(children, function(child) {
262
+ return child;
263
+ }) || [];
264
+ },
265
+ only: function(children) {
266
+ if (!isValidElement(children))
267
+ throw Error(
268
+ "React.Children.only expected to receive a single React element child."
269
+ );
270
+ return children;
271
+ }
272
+ };
273
+ exports.Activity = REACT_ACTIVITY_TYPE;
274
+ exports.Children = Children;
275
+ exports.Component = Component;
276
+ exports.Fragment = REACT_FRAGMENT_TYPE;
277
+ exports.Profiler = REACT_PROFILER_TYPE;
278
+ exports.PureComponent = PureComponent;
279
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
280
+ exports.Suspense = REACT_SUSPENSE_TYPE;
281
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
282
+ exports.__COMPILER_RUNTIME = {
283
+ __proto__: null,
284
+ c: function(size) {
285
+ return ReactSharedInternals.H.useMemoCache(size);
286
+ }
287
+ };
288
+ exports.cache = function(fn) {
289
+ return function() {
290
+ return fn.apply(null, arguments);
291
+ };
292
+ };
293
+ exports.cacheSignal = function() {
294
+ return null;
295
+ };
296
+ exports.cloneElement = function(element, config, children) {
297
+ if (null === element || void 0 === element)
298
+ throw Error(
299
+ "The argument must be a React element, but you passed " + element + "."
300
+ );
301
+ var props = assign({}, element.props), key = element.key;
302
+ if (null != config)
303
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
304
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
305
+ var propName = arguments.length - 2;
306
+ if (1 === propName) props.children = children;
307
+ else if (1 < propName) {
308
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
309
+ childArray[i] = arguments[i + 2];
310
+ props.children = childArray;
311
+ }
312
+ return ReactElement(element.type, key, props);
313
+ };
314
+ exports.createContext = function(defaultValue) {
315
+ defaultValue = {
316
+ $$typeof: REACT_CONTEXT_TYPE,
317
+ _currentValue: defaultValue,
318
+ _currentValue2: defaultValue,
319
+ _threadCount: 0,
320
+ Provider: null,
321
+ Consumer: null
322
+ };
323
+ defaultValue.Provider = defaultValue;
324
+ defaultValue.Consumer = {
325
+ $$typeof: REACT_CONSUMER_TYPE,
326
+ _context: defaultValue
327
+ };
328
+ return defaultValue;
329
+ };
330
+ exports.createElement = function(type, config, children) {
331
+ var propName, props = {}, key = null;
332
+ if (null != config)
333
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
334
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
335
+ var childrenLength = arguments.length - 2;
336
+ if (1 === childrenLength) props.children = children;
337
+ else if (1 < childrenLength) {
338
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
339
+ childArray[i] = arguments[i + 2];
340
+ props.children = childArray;
341
+ }
342
+ if (type && type.defaultProps)
343
+ for (propName in childrenLength = type.defaultProps, childrenLength)
344
+ void 0 === props[propName] && (props[propName] = childrenLength[propName]);
345
+ return ReactElement(type, key, props);
346
+ };
347
+ exports.createRef = function() {
348
+ return { current: null };
349
+ };
350
+ exports.forwardRef = function(render) {
351
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render };
352
+ };
353
+ exports.isValidElement = isValidElement;
354
+ exports.lazy = function(ctor) {
355
+ return {
356
+ $$typeof: REACT_LAZY_TYPE,
357
+ _payload: { _status: -1, _result: ctor },
358
+ _init: lazyInitializer
359
+ };
360
+ };
361
+ exports.memo = function(type, compare) {
362
+ return {
363
+ $$typeof: REACT_MEMO_TYPE,
364
+ type,
365
+ compare: void 0 === compare ? null : compare
366
+ };
367
+ };
368
+ exports.startTransition = function(scope) {
369
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
370
+ ReactSharedInternals.T = currentTransition;
371
+ try {
372
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
373
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
374
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
375
+ } catch (error) {
376
+ reportGlobalError(error);
377
+ } finally {
378
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
379
+ }
380
+ };
381
+ exports.unstable_useCacheRefresh = function() {
382
+ return ReactSharedInternals.H.useCacheRefresh();
383
+ };
384
+ exports.use = function(usable) {
385
+ return ReactSharedInternals.H.use(usable);
386
+ };
387
+ exports.useActionState = function(action, initialState, permalink) {
388
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
389
+ };
390
+ exports.useCallback = function(callback, deps) {
391
+ return ReactSharedInternals.H.useCallback(callback, deps);
392
+ };
393
+ exports.useContext = function(Context) {
394
+ return ReactSharedInternals.H.useContext(Context);
395
+ };
396
+ exports.useDebugValue = function() {
397
+ };
398
+ exports.useDeferredValue = function(value, initialValue) {
399
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
400
+ };
401
+ exports.useEffect = function(create, deps) {
402
+ return ReactSharedInternals.H.useEffect(create, deps);
403
+ };
404
+ exports.useEffectEvent = function(callback) {
405
+ return ReactSharedInternals.H.useEffectEvent(callback);
406
+ };
407
+ exports.useId = function() {
408
+ return ReactSharedInternals.H.useId();
409
+ };
410
+ exports.useImperativeHandle = function(ref, create, deps) {
411
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
412
+ };
413
+ exports.useInsertionEffect = function(create, deps) {
414
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
415
+ };
416
+ exports.useLayoutEffect = function(create, deps) {
417
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
418
+ };
419
+ exports.useMemo = function(create, deps) {
420
+ return ReactSharedInternals.H.useMemo(create, deps);
421
+ };
422
+ exports.useOptimistic = function(passthrough, reducer) {
423
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
424
+ };
425
+ exports.useReducer = function(reducer, initialArg, init) {
426
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
427
+ };
428
+ exports.useRef = function(initialValue) {
429
+ return ReactSharedInternals.H.useRef(initialValue);
430
+ };
431
+ exports.useState = function(initialState) {
432
+ return ReactSharedInternals.H.useState(initialState);
433
+ };
434
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
435
+ return ReactSharedInternals.H.useSyncExternalStore(
436
+ subscribe,
437
+ getSnapshot,
438
+ getServerSnapshot
439
+ );
440
+ };
441
+ exports.useTransition = function() {
442
+ return ReactSharedInternals.H.useTransition();
443
+ };
444
+ exports.version = "19.2.7";
445
+ }
446
+ });
447
+
448
+ // node_modules/react/index.js
449
+ var require_react = __commonJS({
450
+ "node_modules/react/index.js"(exports, module) {
451
+ if (true) {
452
+ module.exports = require_react_production();
453
+ } else {
454
+ module.exports = null;
455
+ }
456
+ }
457
+ });
458
+
459
+ export {
460
+ require_react
461
+ };
462
+ /*! Bundled license information:
463
+
464
+ react/cjs/react.production.js:
465
+ (**
466
+ * @license React
467
+ * react.production.js
468
+ *
469
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
470
+ *
471
+ * This source code is licensed under the MIT license found in the
472
+ * LICENSE file in the root directory of this source tree.
473
+ *)
474
+ */
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as createFlavorRequire } from "node:module"; const require = createFlavorRequire(import.meta.url);
3
+
4
+ // src/utils/spawn-executable.ts
5
+ import { accessSync, constants, existsSync, statSync } from "fs";
6
+ import { delimiter, extname, isAbsolute, resolve } from "path";
7
+ var WINDOWS_BATCH = /\.(?:bat|cmd)$/iu;
8
+ var WINDOWS_CMD_SHIM = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/iu;
9
+ var CMD_META = /([()\][%!^"`<>&|;, *?])/gu;
10
+ function prepareSpawnInvocation(command, args, options = {}) {
11
+ if ((options.platform ?? process.platform) !== "win32") return { command, args: [...args] };
12
+ const env = options.env ?? process.env;
13
+ const commandFile = resolveExecutablePath(command, options);
14
+ if (commandFile === void 0 || !WINDOWS_BATCH.test(commandFile)) {
15
+ return { command: commandFile ?? command, args: [...args] };
16
+ }
17
+ const doubleEscape = WINDOWS_CMD_SHIM.test(commandFile);
18
+ const shellCommand = [escapeCmdCommand(commandFile), ...args.map((arg) => escapeCmdArgument(arg, doubleEscape))].join(" ");
19
+ return {
20
+ command: environmentValue(env, "ComSpec") ?? "cmd.exe",
21
+ args: ["/d", "/s", "/c", `"${shellCommand}"`],
22
+ windowsVerbatimArguments: true
23
+ };
24
+ }
25
+ function resolveExecutablePath(command, options = {}) {
26
+ const platform = options.platform ?? process.platform;
27
+ const env = options.env ?? process.env;
28
+ if (platform === "win32") return resolveWindowsCommand(command, options.cwd, env);
29
+ const hasPath = isAbsolute(command) || command.includes("/");
30
+ const bases = hasPath ? [isAbsolute(command) ? command : resolve(options.cwd ?? process.cwd(), command)] : (env.PATH ?? "").split(delimiter).filter(Boolean).map((entry) => resolve(entry, command));
31
+ return bases.find(isExecutableFile);
32
+ }
33
+ function resolveWindowsCommand(command, cwd, env) {
34
+ const pathValue = environmentValue(env, "PATH") ?? "";
35
+ const pathExt = (environmentValue(env, "PATHEXT") ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
36
+ const hasPath = isAbsolute(command) || /[\\/]/u.test(command);
37
+ const bases = hasPath ? [isAbsolute(command) ? command : resolve(cwd ?? process.cwd(), command)] : [
38
+ resolve(cwd ?? process.cwd(), command),
39
+ ...pathValue.split(";").filter(Boolean).map((entry) => resolve(unquote(entry), command))
40
+ ];
41
+ for (const base of bases) {
42
+ const candidates = extname(base).length > 0 ? [base] : [...pathExt.map((extension) => `${base}${extension}`), base];
43
+ for (const candidate of candidates) {
44
+ if (isRegularFile(candidate)) return resolve(candidate);
45
+ }
46
+ }
47
+ return void 0;
48
+ }
49
+ function environmentValue(env, name) {
50
+ const key = Object.keys(env).find((candidate) => candidate.toLowerCase() === name.toLowerCase());
51
+ return key === void 0 ? void 0 : env[key];
52
+ }
53
+ function unquote(value) {
54
+ const trimmed = value.trim();
55
+ return trimmed.startsWith('"') && trimmed.endsWith('"') ? trimmed.slice(1, -1) : trimmed;
56
+ }
57
+ function isRegularFile(path) {
58
+ try {
59
+ return existsSync(path) && statSync(path).isFile();
60
+ } catch {
61
+ return false;
62
+ }
63
+ }
64
+ function isExecutableFile(path) {
65
+ try {
66
+ if (!existsSync(path) || !statSync(path).isFile()) return false;
67
+ accessSync(path, constants.X_OK);
68
+ return true;
69
+ } catch {
70
+ return false;
71
+ }
72
+ }
73
+ function escapeCmdCommand(value) {
74
+ return value.replace(CMD_META, "^$1");
75
+ }
76
+ function escapeCmdArgument(value, doubleEscapeMetaCharacters) {
77
+ let escaped = value.replace(/(?=(\\+?)?)\1"/gu, '$1$1\\"').replace(/(?=(\\+?)?)\1$/gu, "$1$1");
78
+ escaped = `"${escaped}"`.replace(CMD_META, "^$1");
79
+ return doubleEscapeMetaCharacters ? escaped.replace(CMD_META, "^$1") : escaped;
80
+ }
81
+
82
+ export {
83
+ prepareSpawnInvocation,
84
+ resolveExecutablePath
85
+ };