grok-bot-cli 0.6.0 → 0.7.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.
@@ -10,1922 +10,6 @@ import * as __rspack_external_node_path_806ed179 from "node:path";
10
10
  import * as __rspack_external_node_sqlite_cecf0237 from "node:sqlite";
11
11
  import * as __rspack_external_node_string_decoder_69b9bd04 from "node:string_decoder";
12
12
  var __webpack_modules__ = ({
13
- "./node_modules/react/cjs/react.development.js"(module, exports, __webpack_require__) {
14
- /* module decorator */ module = __webpack_require__.nmd(module);
15
- /**
16
- * @license React
17
- * react.development.js
18
- *
19
- * Copyright (c) Meta Platforms, Inc. and affiliates.
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- */
24
-
25
-
26
- "production" !== process.env.NODE_ENV &&
27
- (function () {
28
- function defineDeprecationWarning(methodName, info) {
29
- Object.defineProperty(Component.prototype, methodName, {
30
- get: function () {
31
- console.warn(
32
- "%s(...) is deprecated in plain JavaScript React classes. %s",
33
- info[0],
34
- info[1]
35
- );
36
- }
37
- });
38
- }
39
- function getIteratorFn(maybeIterable) {
40
- if (null === maybeIterable || "object" !== typeof maybeIterable)
41
- return null;
42
- maybeIterable =
43
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
44
- maybeIterable["@@iterator"];
45
- return "function" === typeof maybeIterable ? maybeIterable : null;
46
- }
47
- function warnNoop(publicInstance, callerName) {
48
- publicInstance =
49
- ((publicInstance = publicInstance.constructor) &&
50
- (publicInstance.displayName || publicInstance.name)) ||
51
- "ReactClass";
52
- var warningKey = publicInstance + "." + callerName;
53
- didWarnStateUpdateForUnmountedComponent[warningKey] ||
54
- (console.error(
55
- "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
56
- callerName,
57
- publicInstance
58
- ),
59
- (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
60
- }
61
- function Component(props, context, updater) {
62
- this.props = props;
63
- this.context = context;
64
- this.refs = emptyObject;
65
- this.updater = updater || ReactNoopUpdateQueue;
66
- }
67
- function ComponentDummy() {}
68
- function PureComponent(props, context, updater) {
69
- this.props = props;
70
- this.context = context;
71
- this.refs = emptyObject;
72
- this.updater = updater || ReactNoopUpdateQueue;
73
- }
74
- function noop() {}
75
- function testStringCoercion(value) {
76
- return "" + value;
77
- }
78
- function checkKeyStringCoercion(value) {
79
- try {
80
- testStringCoercion(value);
81
- var JSCompiler_inline_result = !1;
82
- } catch (e) {
83
- JSCompiler_inline_result = !0;
84
- }
85
- if (JSCompiler_inline_result) {
86
- JSCompiler_inline_result = console;
87
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
88
- var JSCompiler_inline_result$jscomp$0 =
89
- ("function" === typeof Symbol &&
90
- Symbol.toStringTag &&
91
- value[Symbol.toStringTag]) ||
92
- value.constructor.name ||
93
- "Object";
94
- JSCompiler_temp_const.call(
95
- JSCompiler_inline_result,
96
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
97
- JSCompiler_inline_result$jscomp$0
98
- );
99
- return testStringCoercion(value);
100
- }
101
- }
102
- function getComponentNameFromType(type) {
103
- if (null == type) return null;
104
- if ("function" === typeof type)
105
- return type.$$typeof === REACT_CLIENT_REFERENCE
106
- ? null
107
- : type.displayName || type.name || null;
108
- if ("string" === typeof type) return type;
109
- switch (type) {
110
- case REACT_FRAGMENT_TYPE:
111
- return "Fragment";
112
- case REACT_PROFILER_TYPE:
113
- return "Profiler";
114
- case REACT_STRICT_MODE_TYPE:
115
- return "StrictMode";
116
- case REACT_SUSPENSE_TYPE:
117
- return "Suspense";
118
- case REACT_SUSPENSE_LIST_TYPE:
119
- return "SuspenseList";
120
- case REACT_ACTIVITY_TYPE:
121
- return "Activity";
122
- case REACT_VIEW_TRANSITION_TYPE:
123
- return "ViewTransition";
124
- }
125
- if ("object" === typeof type)
126
- switch (
127
- ("number" === typeof type.tag &&
128
- console.error(
129
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
130
- ),
131
- type.$$typeof)
132
- ) {
133
- case REACT_PORTAL_TYPE:
134
- return "Portal";
135
- case REACT_CONTEXT_TYPE:
136
- return type.displayName || "Context";
137
- case REACT_CONSUMER_TYPE:
138
- return (type._context.displayName || "Context") + ".Consumer";
139
- case REACT_FORWARD_REF_TYPE:
140
- var innerType = type.render;
141
- type = type.displayName;
142
- type ||
143
- ((type = innerType.displayName || innerType.name || ""),
144
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
145
- return type;
146
- case REACT_MEMO_TYPE:
147
- return (
148
- (innerType = type.displayName || null),
149
- null !== innerType
150
- ? innerType
151
- : getComponentNameFromType(type.type) || "Memo"
152
- );
153
- case REACT_LAZY_TYPE:
154
- innerType = type._payload;
155
- type = type._init;
156
- try {
157
- return getComponentNameFromType(type(innerType));
158
- } catch (x) {}
159
- }
160
- return null;
161
- }
162
- function getTaskName(type) {
163
- if (type === REACT_FRAGMENT_TYPE) return "<>";
164
- if (
165
- "object" === typeof type &&
166
- null !== type &&
167
- type.$$typeof === REACT_LAZY_TYPE
168
- )
169
- return "<...>";
170
- try {
171
- var name = getComponentNameFromType(type);
172
- return name ? "<" + name + ">" : "<...>";
173
- } catch (x) {
174
- return "<...>";
175
- }
176
- }
177
- function getOwner() {
178
- var dispatcher = ReactSharedInternals.A;
179
- return null === dispatcher ? null : dispatcher.getOwner();
180
- }
181
- function UnknownOwner() {
182
- return Error("react-stack-top-frame");
183
- }
184
- function hasValidKey(config) {
185
- if (hasOwnProperty.call(config, "key")) {
186
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
187
- if (getter && getter.isReactWarning) return !1;
188
- }
189
- return void 0 !== config.key;
190
- }
191
- function defineKeyPropWarningGetter(props, displayName) {
192
- function warnAboutAccessingKey() {
193
- specialPropKeyWarningShown ||
194
- ((specialPropKeyWarningShown = !0),
195
- console.error(
196
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
197
- displayName
198
- ));
199
- }
200
- warnAboutAccessingKey.isReactWarning = !0;
201
- Object.defineProperty(props, "key", {
202
- get: warnAboutAccessingKey,
203
- configurable: !0
204
- });
205
- }
206
- function elementRefGetterWithDeprecationWarning() {
207
- var componentName = getComponentNameFromType(this.type);
208
- didWarnAboutElementRef[componentName] ||
209
- ((didWarnAboutElementRef[componentName] = !0),
210
- console.error(
211
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
212
- ));
213
- componentName = this.props.ref;
214
- return void 0 !== componentName ? componentName : null;
215
- }
216
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
217
- var refProp = props.ref;
218
- type = {
219
- $$typeof: REACT_ELEMENT_TYPE,
220
- type: type,
221
- key: key,
222
- props: props,
223
- _owner: owner
224
- };
225
- null !== (void 0 !== refProp ? refProp : null)
226
- ? Object.defineProperty(type, "ref", {
227
- enumerable: !1,
228
- get: elementRefGetterWithDeprecationWarning
229
- })
230
- : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
231
- type._store = {};
232
- Object.defineProperty(type._store, "validated", {
233
- configurable: !1,
234
- enumerable: !1,
235
- writable: !0,
236
- value: 0
237
- });
238
- Object.defineProperty(type, "_debugInfo", {
239
- configurable: !1,
240
- enumerable: !1,
241
- writable: !0,
242
- value: null
243
- });
244
- Object.defineProperty(type, "_debugStack", {
245
- configurable: !1,
246
- enumerable: !1,
247
- writable: !0,
248
- value: debugStack
249
- });
250
- Object.defineProperty(type, "_debugTask", {
251
- configurable: !1,
252
- enumerable: !1,
253
- writable: !0,
254
- value: debugTask
255
- });
256
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
257
- return type;
258
- }
259
- function cloneAndReplaceKey(oldElement, newKey) {
260
- newKey = ReactElement(
261
- oldElement.type,
262
- newKey,
263
- oldElement.props,
264
- oldElement._owner,
265
- oldElement._debugStack,
266
- oldElement._debugTask
267
- );
268
- oldElement._store &&
269
- (newKey._store.validated = oldElement._store.validated);
270
- return newKey;
271
- }
272
- function validateChildKeys(node) {
273
- isValidElement(node)
274
- ? node._store && (node._store.validated = 1)
275
- : "object" === typeof node &&
276
- null !== node &&
277
- node.$$typeof === REACT_LAZY_TYPE &&
278
- ("fulfilled" === node._payload.status
279
- ? isValidElement(node._payload.value) &&
280
- node._payload.value._store &&
281
- (node._payload.value._store.validated = 1)
282
- : node._store && (node._store.validated = 1));
283
- }
284
- function isValidElement(object) {
285
- return (
286
- "object" === typeof object &&
287
- null !== object &&
288
- object.$$typeof === REACT_ELEMENT_TYPE
289
- );
290
- }
291
- function escape(key) {
292
- var escaperLookup = { "=": "=0", ":": "=2" };
293
- return (
294
- "$" +
295
- key.replace(/[=:]/g, function (match) {
296
- return escaperLookup[match];
297
- })
298
- );
299
- }
300
- function getElementKey(element, index) {
301
- return "object" === typeof element &&
302
- null !== element &&
303
- null != element.key
304
- ? (checkKeyStringCoercion(element.key), escape("" + element.key))
305
- : index.toString(36);
306
- }
307
- function resolveThenable(thenable) {
308
- switch (thenable.status) {
309
- case "fulfilled":
310
- return thenable.value;
311
- case "rejected":
312
- throw thenable.reason;
313
- default:
314
- switch (
315
- ("string" === typeof thenable.status
316
- ? thenable.then(noop, noop)
317
- : ((thenable.status = "pending"),
318
- thenable.then(
319
- function (fulfilledValue) {
320
- "pending" === thenable.status &&
321
- ((thenable.status = "fulfilled"),
322
- (thenable.value = fulfilledValue));
323
- },
324
- function (error) {
325
- "pending" === thenable.status &&
326
- ((thenable.status = "rejected"),
327
- (thenable.reason = error));
328
- }
329
- )),
330
- thenable.status)
331
- ) {
332
- case "fulfilled":
333
- return thenable.value;
334
- case "rejected":
335
- throw thenable.reason;
336
- }
337
- }
338
- throw thenable;
339
- }
340
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
341
- var type = typeof children;
342
- if ("undefined" === type || "boolean" === type) children = null;
343
- var invokeCallback = !1;
344
- if (null === children) invokeCallback = !0;
345
- else
346
- switch (type) {
347
- case "bigint":
348
- case "string":
349
- case "number":
350
- invokeCallback = !0;
351
- break;
352
- case "object":
353
- switch (children.$$typeof) {
354
- case REACT_ELEMENT_TYPE:
355
- case REACT_PORTAL_TYPE:
356
- invokeCallback = !0;
357
- break;
358
- case REACT_LAZY_TYPE:
359
- return (
360
- (invokeCallback = children._init),
361
- mapIntoArray(
362
- invokeCallback(children._payload),
363
- array,
364
- escapedPrefix,
365
- nameSoFar,
366
- callback
367
- )
368
- );
369
- }
370
- }
371
- if (invokeCallback) {
372
- invokeCallback = children;
373
- callback = callback(invokeCallback);
374
- var childKey =
375
- "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
376
- isArrayImpl(callback)
377
- ? ((escapedPrefix = ""),
378
- null != childKey &&
379
- (escapedPrefix =
380
- childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
381
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
382
- return c;
383
- }))
384
- : null != callback &&
385
- (isValidElement(callback) &&
386
- (null != callback.key &&
387
- ((invokeCallback && invokeCallback.key === callback.key) ||
388
- checkKeyStringCoercion(callback.key)),
389
- (escapedPrefix = cloneAndReplaceKey(
390
- callback,
391
- escapedPrefix +
392
- (null == callback.key ||
393
- (invokeCallback && invokeCallback.key === callback.key)
394
- ? ""
395
- : ("" + callback.key).replace(
396
- userProvidedKeyEscapeRegex,
397
- "$&/"
398
- ) + "/") +
399
- childKey
400
- )),
401
- "" !== nameSoFar &&
402
- null != invokeCallback &&
403
- isValidElement(invokeCallback) &&
404
- null == invokeCallback.key &&
405
- invokeCallback._store &&
406
- !invokeCallback._store.validated &&
407
- (escapedPrefix._store.validated = 2),
408
- (callback = escapedPrefix)),
409
- array.push(callback));
410
- return 1;
411
- }
412
- invokeCallback = 0;
413
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
414
- if (isArrayImpl(children))
415
- for (var i = 0; i < children.length; i++)
416
- (nameSoFar = children[i]),
417
- (type = childKey + getElementKey(nameSoFar, i)),
418
- (invokeCallback += mapIntoArray(
419
- nameSoFar,
420
- array,
421
- escapedPrefix,
422
- type,
423
- callback
424
- ));
425
- else if (((i = getIteratorFn(children)), "function" === typeof i))
426
- for (
427
- i === children.entries &&
428
- (didWarnAboutMaps ||
429
- console.warn(
430
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
431
- ),
432
- (didWarnAboutMaps = !0)),
433
- children = i.call(children),
434
- i = 0;
435
- !(nameSoFar = children.next()).done;
436
-
437
- )
438
- (nameSoFar = nameSoFar.value),
439
- (type = childKey + getElementKey(nameSoFar, i++)),
440
- (invokeCallback += mapIntoArray(
441
- nameSoFar,
442
- array,
443
- escapedPrefix,
444
- type,
445
- callback
446
- ));
447
- else if ("object" === type) {
448
- if ("function" === typeof children.then)
449
- return mapIntoArray(
450
- resolveThenable(children),
451
- array,
452
- escapedPrefix,
453
- nameSoFar,
454
- callback
455
- );
456
- array = String(children);
457
- throw Error(
458
- "Objects are not valid as a React child (found: " +
459
- ("[object Object]" === array
460
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
461
- : array) +
462
- "). If you meant to render a collection of children, use an array instead."
463
- );
464
- }
465
- return invokeCallback;
466
- }
467
- function mapChildren(children, func, context) {
468
- if (null == children) return children;
469
- var result = [],
470
- count = 0;
471
- mapIntoArray(children, result, "", "", function (child) {
472
- return func.call(context, child, count++);
473
- });
474
- return result;
475
- }
476
- function lazyInitializer(payload) {
477
- if (-1 === payload._status) {
478
- var resolveDebugValue = null,
479
- rejectDebugValue = null,
480
- ioInfo = payload._ioInfo;
481
- null != ioInfo &&
482
- ((ioInfo.start = ioInfo.end = performance.now()),
483
- (ioInfo.value = new Promise(function (resolve, reject) {
484
- resolveDebugValue = resolve;
485
- rejectDebugValue = reject;
486
- })));
487
- ioInfo = payload._result;
488
- var thenable = ioInfo();
489
- thenable.then(
490
- function (moduleObject) {
491
- if (0 === payload._status || -1 === payload._status) {
492
- payload._status = 1;
493
- payload._result = moduleObject;
494
- var _ioInfo = payload._ioInfo;
495
- if (null != _ioInfo) {
496
- _ioInfo.end = performance.now();
497
- var debugValue =
498
- null == moduleObject ? void 0 : moduleObject.default;
499
- resolveDebugValue(debugValue);
500
- _ioInfo.value.status = "fulfilled";
501
- _ioInfo.value.value = debugValue;
502
- }
503
- void 0 === thenable.status &&
504
- ((thenable.status = "fulfilled"),
505
- (thenable.value = moduleObject));
506
- }
507
- },
508
- function (error) {
509
- if (0 === payload._status || -1 === payload._status) {
510
- payload._status = 2;
511
- payload._result = error;
512
- var _ioInfo2 = payload._ioInfo;
513
- null != _ioInfo2 &&
514
- ((_ioInfo2.end = performance.now()),
515
- _ioInfo2.value.then(noop, noop),
516
- rejectDebugValue(error),
517
- (_ioInfo2.value.status = "rejected"),
518
- (_ioInfo2.value.reason = error));
519
- void 0 === thenable.status &&
520
- ((thenable.status = "rejected"), (thenable.reason = error));
521
- }
522
- }
523
- );
524
- ioInfo = payload._ioInfo;
525
- if (null != ioInfo) {
526
- var displayName = thenable.displayName;
527
- "string" === typeof displayName && (ioInfo.name = displayName);
528
- }
529
- -1 === payload._status &&
530
- ((payload._status = 0), (payload._result = thenable));
531
- }
532
- if (1 === payload._status)
533
- return (
534
- (ioInfo = payload._result),
535
- void 0 === ioInfo &&
536
- console.error(
537
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
538
- ioInfo
539
- ),
540
- "default" in ioInfo ||
541
- console.error(
542
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
543
- ioInfo
544
- ),
545
- ioInfo.default
546
- );
547
- throw payload._result;
548
- }
549
- function resolveDispatcher() {
550
- var dispatcher = ReactSharedInternals.H;
551
- null === dispatcher &&
552
- console.error(
553
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
554
- );
555
- return dispatcher;
556
- }
557
- function releaseAsyncTransition() {
558
- ReactSharedInternals.asyncTransitions--;
559
- }
560
- function startTransition(scope) {
561
- var prevTransition = ReactSharedInternals.T,
562
- currentTransition = {};
563
- currentTransition.types =
564
- null !== prevTransition ? prevTransition.types : null;
565
- currentTransition._updatedFibers = new Set();
566
- ReactSharedInternals.T = currentTransition;
567
- try {
568
- var returnValue = scope(),
569
- onStartTransitionFinish = ReactSharedInternals.S;
570
- null !== onStartTransitionFinish &&
571
- onStartTransitionFinish(currentTransition, returnValue);
572
- "object" === typeof returnValue &&
573
- null !== returnValue &&
574
- "function" === typeof returnValue.then &&
575
- (ReactSharedInternals.asyncTransitions++,
576
- returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
577
- returnValue.then(noop, reportGlobalError));
578
- } catch (error) {
579
- reportGlobalError(error);
580
- } finally {
581
- null === prevTransition &&
582
- currentTransition._updatedFibers &&
583
- ((scope = currentTransition._updatedFibers.size),
584
- currentTransition._updatedFibers.clear(),
585
- 10 < scope &&
586
- console.warn(
587
- "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
588
- )),
589
- null !== prevTransition &&
590
- null !== currentTransition.types &&
591
- (null !== prevTransition.types &&
592
- prevTransition.types !== currentTransition.types &&
593
- console.error(
594
- "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
595
- ),
596
- (prevTransition.types = currentTransition.types)),
597
- (ReactSharedInternals.T = prevTransition);
598
- }
599
- }
600
- function addTransitionType(type) {
601
- var transition = ReactSharedInternals.T;
602
- if (null !== transition) {
603
- var transitionTypes = transition.types;
604
- null === transitionTypes
605
- ? (transition.types = [type])
606
- : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
607
- } else
608
- 0 === ReactSharedInternals.asyncTransitions &&
609
- console.error(
610
- "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
611
- ),
612
- startTransition(addTransitionType.bind(null, type));
613
- }
614
- function enqueueTask(task) {
615
- if (null === enqueueTaskImpl)
616
- try {
617
- var requireString = ("require" + Math.random()).slice(0, 7);
618
- enqueueTaskImpl = (module && module[requireString]).call(
619
- module,
620
- "timers"
621
- ).setImmediate;
622
- } catch (_err) {
623
- enqueueTaskImpl = function (callback) {
624
- !1 === didWarnAboutMessageChannel &&
625
- ((didWarnAboutMessageChannel = !0),
626
- "undefined" === typeof MessageChannel &&
627
- console.error(
628
- "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
629
- ));
630
- var channel = new MessageChannel();
631
- channel.port1.onmessage = callback;
632
- channel.port2.postMessage(void 0);
633
- };
634
- }
635
- return enqueueTaskImpl(task);
636
- }
637
- function aggregateErrors(errors) {
638
- return 1 < errors.length && "function" === typeof AggregateError
639
- ? new AggregateError(errors)
640
- : errors[0];
641
- }
642
- function popActScope(prevActQueue, prevActScopeDepth) {
643
- prevActScopeDepth !== actScopeDepth - 1 &&
644
- console.error(
645
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
646
- );
647
- actScopeDepth = prevActScopeDepth;
648
- }
649
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
650
- var queue = ReactSharedInternals.actQueue;
651
- if (null !== queue)
652
- if (0 !== queue.length)
653
- try {
654
- flushActQueue(queue);
655
- enqueueTask(function () {
656
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
657
- });
658
- return;
659
- } catch (error) {
660
- ReactSharedInternals.thrownErrors.push(error);
661
- }
662
- else ReactSharedInternals.actQueue = null;
663
- 0 < ReactSharedInternals.thrownErrors.length
664
- ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
665
- (ReactSharedInternals.thrownErrors.length = 0),
666
- reject(queue))
667
- : resolve(returnValue);
668
- }
669
- function flushActQueue(queue) {
670
- if (!isFlushing) {
671
- isFlushing = !0;
672
- var i = 0;
673
- try {
674
- for (; i < queue.length; i++) {
675
- var callback = queue[i];
676
- do {
677
- ReactSharedInternals.didUsePromise = !1;
678
- var continuation = callback(!1);
679
- if (null !== continuation) {
680
- if (ReactSharedInternals.didUsePromise) {
681
- queue[i] = callback;
682
- queue.splice(0, i);
683
- return;
684
- }
685
- callback = continuation;
686
- } else break;
687
- } while (1);
688
- }
689
- queue.length = 0;
690
- } catch (error) {
691
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
692
- } finally {
693
- isFlushing = !1;
694
- }
695
- }
696
- }
697
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
698
- "function" ===
699
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
700
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
701
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
702
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
703
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
704
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
705
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
706
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
707
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
708
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
709
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
710
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
711
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
712
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
713
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
714
- REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
715
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
716
- didWarnStateUpdateForUnmountedComponent = {},
717
- ReactNoopUpdateQueue = {
718
- isMounted: function () {
719
- return !1;
720
- },
721
- enqueueForceUpdate: function (publicInstance) {
722
- warnNoop(publicInstance, "forceUpdate");
723
- },
724
- enqueueReplaceState: function (publicInstance) {
725
- warnNoop(publicInstance, "replaceState");
726
- },
727
- enqueueSetState: function (publicInstance) {
728
- warnNoop(publicInstance, "setState");
729
- }
730
- },
731
- assign = Object.assign,
732
- emptyObject = {};
733
- Object.freeze(emptyObject);
734
- Component.prototype.isReactComponent = {};
735
- Component.prototype.setState = function (partialState, callback) {
736
- if (
737
- "object" !== typeof partialState &&
738
- "function" !== typeof partialState &&
739
- null != partialState
740
- )
741
- throw Error(
742
- "takes an object of state variables to update or a function which returns an object of state variables."
743
- );
744
- this.updater.enqueueSetState(this, partialState, callback, "setState");
745
- };
746
- Component.prototype.forceUpdate = function (callback) {
747
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
748
- };
749
- var deprecatedAPIs = {
750
- isMounted: [
751
- "isMounted",
752
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
753
- ],
754
- replaceState: [
755
- "replaceState",
756
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
757
- ]
758
- };
759
- for (fnName in deprecatedAPIs)
760
- deprecatedAPIs.hasOwnProperty(fnName) &&
761
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
762
- ComponentDummy.prototype = Component.prototype;
763
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
764
- deprecatedAPIs.constructor = PureComponent;
765
- assign(deprecatedAPIs, Component.prototype);
766
- deprecatedAPIs.isPureReactComponent = !0;
767
- var isArrayImpl = Array.isArray,
768
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
769
- ReactSharedInternals = {
770
- H: null,
771
- A: null,
772
- T: null,
773
- S: null,
774
- actQueue: null,
775
- asyncTransitions: 0,
776
- isBatchingLegacy: !1,
777
- didScheduleLegacyUpdate: !1,
778
- didUsePromise: !1,
779
- thrownErrors: [],
780
- getCurrentStack: null,
781
- recentlyCreatedOwnerStacks: 0
782
- },
783
- hasOwnProperty = Object.prototype.hasOwnProperty,
784
- createTask = console.createTask
785
- ? console.createTask
786
- : function () {
787
- return null;
788
- };
789
- deprecatedAPIs = {
790
- react_stack_bottom_frame: function (callStackForError) {
791
- return callStackForError();
792
- }
793
- };
794
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
795
- var didWarnAboutElementRef = {};
796
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
797
- deprecatedAPIs,
798
- UnknownOwner
799
- )();
800
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
801
- var didWarnAboutMaps = !1,
802
- userProvidedKeyEscapeRegex = /\/+/g,
803
- reportGlobalError =
804
- "function" === typeof reportError
805
- ? reportError
806
- : function (error) {
807
- if (
808
- "object" === typeof window &&
809
- "function" === typeof window.ErrorEvent
810
- ) {
811
- var event = new window.ErrorEvent("error", {
812
- bubbles: !0,
813
- cancelable: !0,
814
- message:
815
- "object" === typeof error &&
816
- null !== error &&
817
- "string" === typeof error.message
818
- ? String(error.message)
819
- : String(error),
820
- error: error
821
- });
822
- if (!window.dispatchEvent(event)) return;
823
- } else if (
824
- "object" === typeof process &&
825
- "function" === typeof process.emit
826
- ) {
827
- process.emit("uncaughtException", error);
828
- return;
829
- }
830
- console.error(error);
831
- },
832
- didWarnAboutMessageChannel = !1,
833
- enqueueTaskImpl = null,
834
- actScopeDepth = 0,
835
- didWarnNoAwaitAct = !1,
836
- isFlushing = !1,
837
- queueSeveralMicrotasks =
838
- "function" === typeof queueMicrotask
839
- ? function (callback) {
840
- queueMicrotask(function () {
841
- return queueMicrotask(callback);
842
- });
843
- }
844
- : enqueueTask;
845
- deprecatedAPIs = Object.freeze({
846
- __proto__: null,
847
- c: function (size) {
848
- return resolveDispatcher().useMemoCache(size);
849
- }
850
- });
851
- var fnName = {
852
- map: mapChildren,
853
- forEach: function (children, forEachFunc, forEachContext) {
854
- mapChildren(
855
- children,
856
- function () {
857
- forEachFunc.apply(this, arguments);
858
- },
859
- forEachContext
860
- );
861
- },
862
- count: function (children) {
863
- var n = 0;
864
- mapChildren(children, function () {
865
- n++;
866
- });
867
- return n;
868
- },
869
- toArray: function (children) {
870
- return (
871
- mapChildren(children, function (child) {
872
- return child;
873
- }) || []
874
- );
875
- },
876
- only: function (children) {
877
- if (!isValidElement(children))
878
- throw Error(
879
- "React.Children.only expected to receive a single React element child."
880
- );
881
- return children;
882
- }
883
- };
884
- exports.Activity = REACT_ACTIVITY_TYPE;
885
- exports.Children = fnName;
886
- exports.Component = Component;
887
- exports.Fragment = REACT_FRAGMENT_TYPE;
888
- exports.Profiler = REACT_PROFILER_TYPE;
889
- exports.PureComponent = PureComponent;
890
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
891
- exports.Suspense = REACT_SUSPENSE_TYPE;
892
- exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
893
- exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
894
- ReactSharedInternals;
895
- exports.__COMPILER_RUNTIME = deprecatedAPIs;
896
- exports.act = function (callback) {
897
- var prevActQueue = ReactSharedInternals.actQueue,
898
- prevActScopeDepth = actScopeDepth;
899
- actScopeDepth++;
900
- var queue = (ReactSharedInternals.actQueue =
901
- null !== prevActQueue ? prevActQueue : []),
902
- didAwaitActCall = !1;
903
- try {
904
- var result = callback();
905
- } catch (error) {
906
- ReactSharedInternals.thrownErrors.push(error);
907
- }
908
- if (0 < ReactSharedInternals.thrownErrors.length)
909
- throw (
910
- (popActScope(prevActQueue, prevActScopeDepth),
911
- (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
912
- (ReactSharedInternals.thrownErrors.length = 0),
913
- callback)
914
- );
915
- if (
916
- null !== result &&
917
- "object" === typeof result &&
918
- "function" === typeof result.then
919
- ) {
920
- var thenable = result;
921
- queueSeveralMicrotasks(function () {
922
- didAwaitActCall ||
923
- didWarnNoAwaitAct ||
924
- ((didWarnNoAwaitAct = !0),
925
- console.error(
926
- "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
927
- ));
928
- });
929
- return {
930
- then: function (resolve, reject) {
931
- didAwaitActCall = !0;
932
- thenable.then(
933
- function (returnValue) {
934
- popActScope(prevActQueue, prevActScopeDepth);
935
- if (0 === prevActScopeDepth) {
936
- try {
937
- flushActQueue(queue),
938
- enqueueTask(function () {
939
- return recursivelyFlushAsyncActWork(
940
- returnValue,
941
- resolve,
942
- reject
943
- );
944
- });
945
- } catch (error$0) {
946
- ReactSharedInternals.thrownErrors.push(error$0);
947
- }
948
- if (0 < ReactSharedInternals.thrownErrors.length) {
949
- var _thrownError = aggregateErrors(
950
- ReactSharedInternals.thrownErrors
951
- );
952
- ReactSharedInternals.thrownErrors.length = 0;
953
- reject(_thrownError);
954
- }
955
- } else resolve(returnValue);
956
- },
957
- function (error) {
958
- popActScope(prevActQueue, prevActScopeDepth);
959
- 0 < ReactSharedInternals.thrownErrors.length
960
- ? ((error = aggregateErrors(
961
- ReactSharedInternals.thrownErrors
962
- )),
963
- (ReactSharedInternals.thrownErrors.length = 0),
964
- reject(error))
965
- : reject(error);
966
- }
967
- );
968
- }
969
- };
970
- }
971
- var returnValue$jscomp$0 = result;
972
- popActScope(prevActQueue, prevActScopeDepth);
973
- 0 === prevActScopeDepth &&
974
- (flushActQueue(queue),
975
- 0 !== queue.length &&
976
- queueSeveralMicrotasks(function () {
977
- didAwaitActCall ||
978
- didWarnNoAwaitAct ||
979
- ((didWarnNoAwaitAct = !0),
980
- console.error(
981
- "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
982
- ));
983
- }),
984
- (ReactSharedInternals.actQueue = null));
985
- if (0 < ReactSharedInternals.thrownErrors.length)
986
- throw (
987
- ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
988
- (ReactSharedInternals.thrownErrors.length = 0),
989
- callback)
990
- );
991
- return {
992
- then: function (resolve, reject) {
993
- didAwaitActCall = !0;
994
- 0 === prevActScopeDepth
995
- ? ((ReactSharedInternals.actQueue = queue),
996
- enqueueTask(function () {
997
- return recursivelyFlushAsyncActWork(
998
- returnValue$jscomp$0,
999
- resolve,
1000
- reject
1001
- );
1002
- }))
1003
- : resolve(returnValue$jscomp$0);
1004
- }
1005
- };
1006
- };
1007
- exports.addTransitionType = addTransitionType;
1008
- exports.cache = function (fn) {
1009
- return function () {
1010
- return fn.apply(null, arguments);
1011
- };
1012
- };
1013
- exports.cacheSignal = function () {
1014
- return null;
1015
- };
1016
- exports.captureOwnerStack = function () {
1017
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
1018
- return null === getCurrentStack ? null : getCurrentStack();
1019
- };
1020
- exports.cloneElement = function (element, config, children) {
1021
- if (null === element || void 0 === element)
1022
- throw Error(
1023
- "The argument must be a React element, but you passed " +
1024
- element +
1025
- "."
1026
- );
1027
- var props = assign({}, element.props),
1028
- key = element.key,
1029
- owner = element._owner;
1030
- if (null != config) {
1031
- var JSCompiler_inline_result;
1032
- a: {
1033
- if (
1034
- hasOwnProperty.call(config, "ref") &&
1035
- (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1036
- config,
1037
- "ref"
1038
- ).get) &&
1039
- JSCompiler_inline_result.isReactWarning
1040
- ) {
1041
- JSCompiler_inline_result = !1;
1042
- break a;
1043
- }
1044
- JSCompiler_inline_result = void 0 !== config.ref;
1045
- }
1046
- JSCompiler_inline_result && (owner = getOwner());
1047
- hasValidKey(config) &&
1048
- (checkKeyStringCoercion(config.key), (key = "" + config.key));
1049
- for (propName in config)
1050
- !hasOwnProperty.call(config, propName) ||
1051
- "key" === propName ||
1052
- "__self" === propName ||
1053
- "__source" === propName ||
1054
- ("ref" === propName && void 0 === config.ref) ||
1055
- (props[propName] = config[propName]);
1056
- }
1057
- var propName = arguments.length - 2;
1058
- if (1 === propName) props.children = children;
1059
- else if (1 < propName) {
1060
- JSCompiler_inline_result = Array(propName);
1061
- for (var i = 0; i < propName; i++)
1062
- JSCompiler_inline_result[i] = arguments[i + 2];
1063
- props.children = JSCompiler_inline_result;
1064
- }
1065
- props = ReactElement(
1066
- element.type,
1067
- key,
1068
- props,
1069
- owner,
1070
- element._debugStack,
1071
- element._debugTask
1072
- );
1073
- for (key = 2; key < arguments.length; key++)
1074
- validateChildKeys(arguments[key]);
1075
- return props;
1076
- };
1077
- exports.createContext = function (defaultValue) {
1078
- defaultValue = {
1079
- $$typeof: REACT_CONTEXT_TYPE,
1080
- _currentValue: defaultValue,
1081
- _currentValue2: defaultValue,
1082
- _threadCount: 0,
1083
- Provider: null,
1084
- Consumer: null
1085
- };
1086
- defaultValue.Provider = defaultValue;
1087
- defaultValue.Consumer = {
1088
- $$typeof: REACT_CONSUMER_TYPE,
1089
- _context: defaultValue
1090
- };
1091
- defaultValue._currentRenderer = null;
1092
- defaultValue._currentRenderer2 = null;
1093
- return defaultValue;
1094
- };
1095
- exports.createElement = function (type, config, children) {
1096
- for (var i = 2; i < arguments.length; i++)
1097
- validateChildKeys(arguments[i]);
1098
- var propName;
1099
- i = {};
1100
- var key = null;
1101
- if (null != config)
1102
- for (propName in (didWarnAboutOldJSXRuntime ||
1103
- !("__self" in config) ||
1104
- "key" in config ||
1105
- ((didWarnAboutOldJSXRuntime = !0),
1106
- console.warn(
1107
- "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1108
- )),
1109
- hasValidKey(config) &&
1110
- (checkKeyStringCoercion(config.key), (key = "" + config.key)),
1111
- config))
1112
- hasOwnProperty.call(config, propName) &&
1113
- "key" !== propName &&
1114
- "__self" !== propName &&
1115
- "__source" !== propName &&
1116
- (i[propName] = config[propName]);
1117
- var childrenLength = arguments.length - 2;
1118
- if (1 === childrenLength) i.children = children;
1119
- else if (1 < childrenLength) {
1120
- for (
1121
- var childArray = Array(childrenLength), _i = 0;
1122
- _i < childrenLength;
1123
- _i++
1124
- )
1125
- childArray[_i] = arguments[_i + 2];
1126
- Object.freeze && Object.freeze(childArray);
1127
- i.children = childArray;
1128
- }
1129
- if (type && type.defaultProps)
1130
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
1131
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1132
- key &&
1133
- defineKeyPropWarningGetter(
1134
- i,
1135
- "function" === typeof type
1136
- ? type.displayName || type.name || "Unknown"
1137
- : type
1138
- );
1139
- (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
1140
- ? ((childArray = Error.stackTraceLimit),
1141
- (Error.stackTraceLimit = 10),
1142
- (childrenLength = Error("react-stack-top-frame")),
1143
- (Error.stackTraceLimit = childArray))
1144
- : (childrenLength = unknownOwnerDebugStack);
1145
- return ReactElement(
1146
- type,
1147
- key,
1148
- i,
1149
- getOwner(),
1150
- childrenLength,
1151
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1152
- );
1153
- };
1154
- exports.createRef = function () {
1155
- var refObject = { current: null };
1156
- Object.seal(refObject);
1157
- return refObject;
1158
- };
1159
- exports.forwardRef = function (render) {
1160
- null != render && render.$$typeof === REACT_MEMO_TYPE
1161
- ? console.error(
1162
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1163
- )
1164
- : "function" !== typeof render
1165
- ? console.error(
1166
- "forwardRef requires a render function but was given %s.",
1167
- null === render ? "null" : typeof render
1168
- )
1169
- : 0 !== render.length &&
1170
- 2 !== render.length &&
1171
- console.error(
1172
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1173
- 1 === render.length
1174
- ? "Did you forget to use the ref parameter?"
1175
- : "Any additional parameter will be undefined."
1176
- );
1177
- null != render &&
1178
- null != render.defaultProps &&
1179
- console.error(
1180
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1181
- );
1182
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
1183
- ownName;
1184
- Object.defineProperty(elementType, "displayName", {
1185
- enumerable: !1,
1186
- configurable: !0,
1187
- get: function () {
1188
- return ownName;
1189
- },
1190
- set: function (name) {
1191
- ownName = name;
1192
- render.name ||
1193
- render.displayName ||
1194
- (Object.defineProperty(render, "name", { value: name }),
1195
- (render.displayName = name));
1196
- }
1197
- });
1198
- return elementType;
1199
- };
1200
- exports.isValidElement = isValidElement;
1201
- exports.lazy = function (ctor) {
1202
- ctor = { _status: -1, _result: ctor };
1203
- var lazyType = {
1204
- $$typeof: REACT_LAZY_TYPE,
1205
- _payload: ctor,
1206
- _init: lazyInitializer
1207
- },
1208
- ioInfo = {
1209
- name: "lazy",
1210
- start: -1,
1211
- end: -1,
1212
- value: null,
1213
- owner: null,
1214
- debugStack: Error("react-stack-top-frame"),
1215
- debugTask: console.createTask ? console.createTask("lazy()") : null
1216
- };
1217
- ctor._ioInfo = ioInfo;
1218
- lazyType._debugInfo = [{ awaited: ioInfo }];
1219
- return lazyType;
1220
- };
1221
- exports.memo = function (type, compare) {
1222
- null == type &&
1223
- console.error(
1224
- "memo: The first argument must be a component. Instead received: %s",
1225
- null === type ? "null" : typeof type
1226
- );
1227
- compare = {
1228
- $$typeof: REACT_MEMO_TYPE,
1229
- type: type,
1230
- compare: void 0 === compare ? null : compare
1231
- };
1232
- var ownName;
1233
- Object.defineProperty(compare, "displayName", {
1234
- enumerable: !1,
1235
- configurable: !0,
1236
- get: function () {
1237
- return ownName;
1238
- },
1239
- set: function (name) {
1240
- ownName = name;
1241
- type.name ||
1242
- type.displayName ||
1243
- (Object.defineProperty(type, "name", { value: name }),
1244
- (type.displayName = name));
1245
- }
1246
- });
1247
- return compare;
1248
- };
1249
- exports.startTransition = startTransition;
1250
- exports.unstable_useCacheRefresh = function () {
1251
- return resolveDispatcher().useCacheRefresh();
1252
- };
1253
- exports.use = function (usable) {
1254
- return resolveDispatcher().use(usable);
1255
- };
1256
- exports.useActionState = function (action, initialState, permalink) {
1257
- return resolveDispatcher().useActionState(
1258
- action,
1259
- initialState,
1260
- permalink
1261
- );
1262
- };
1263
- exports.useCallback = function (callback, deps) {
1264
- return resolveDispatcher().useCallback(callback, deps);
1265
- };
1266
- exports.useContext = function (Context) {
1267
- var dispatcher = resolveDispatcher();
1268
- Context.$$typeof === REACT_CONSUMER_TYPE &&
1269
- console.error(
1270
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1271
- );
1272
- return dispatcher.useContext(Context);
1273
- };
1274
- exports.useDebugValue = function (value, formatterFn) {
1275
- return resolveDispatcher().useDebugValue(value, formatterFn);
1276
- };
1277
- exports.useDeferredValue = function (value, initialValue) {
1278
- return resolveDispatcher().useDeferredValue(value, initialValue);
1279
- };
1280
- exports.useEffect = function (create, deps) {
1281
- null == create &&
1282
- console.warn(
1283
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1284
- );
1285
- return resolveDispatcher().useEffect(create, deps);
1286
- };
1287
- exports.useEffectEvent = function (callback) {
1288
- return resolveDispatcher().useEffectEvent(callback);
1289
- };
1290
- exports.useId = function () {
1291
- return resolveDispatcher().useId();
1292
- };
1293
- exports.useImperativeHandle = function (ref, create, deps) {
1294
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1295
- };
1296
- exports.useInsertionEffect = function (create, deps) {
1297
- null == create &&
1298
- console.warn(
1299
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1300
- );
1301
- return resolveDispatcher().useInsertionEffect(create, deps);
1302
- };
1303
- exports.useLayoutEffect = function (create, deps) {
1304
- null == create &&
1305
- console.warn(
1306
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1307
- );
1308
- return resolveDispatcher().useLayoutEffect(create, deps);
1309
- };
1310
- exports.useMemo = function (create, deps) {
1311
- return resolveDispatcher().useMemo(create, deps);
1312
- };
1313
- exports.useOptimistic = function (passthrough, reducer) {
1314
- return resolveDispatcher().useOptimistic(passthrough, reducer);
1315
- };
1316
- exports.useReducer = function (reducer, initialArg, init) {
1317
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1318
- };
1319
- exports.useRef = function (initialValue) {
1320
- return resolveDispatcher().useRef(initialValue);
1321
- };
1322
- exports.useState = function (initialState) {
1323
- return resolveDispatcher().useState(initialState);
1324
- };
1325
- exports.useSyncExternalStore = function (
1326
- subscribe,
1327
- getSnapshot,
1328
- getServerSnapshot
1329
- ) {
1330
- return resolveDispatcher().useSyncExternalStore(
1331
- subscribe,
1332
- getSnapshot,
1333
- getServerSnapshot
1334
- );
1335
- };
1336
- exports.useTransition = function () {
1337
- return resolveDispatcher().useTransition();
1338
- };
1339
- exports.version = "19.3.0";
1340
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1341
- "function" ===
1342
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
1343
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1344
- })();
1345
-
1346
-
1347
- },
1348
- "./node_modules/react/cjs/react.production.js"(__unused_rspack_module, exports) {
1349
- var __rspack_unused_export;
1350
- /**
1351
- * @license React
1352
- * react.production.js
1353
- *
1354
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1355
- *
1356
- * This source code is licensed under the MIT license found in the
1357
- * LICENSE file in the root directory of this source tree.
1358
- */
1359
-
1360
-
1361
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
1362
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1363
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
1364
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
1365
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
1366
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
1367
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
1368
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
1369
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
1370
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
1371
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
1372
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
1373
- REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
1374
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1375
- function getIteratorFn(maybeIterable) {
1376
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
1377
- maybeIterable =
1378
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
1379
- maybeIterable["@@iterator"];
1380
- return "function" === typeof maybeIterable ? maybeIterable : null;
1381
- }
1382
- var ReactNoopUpdateQueue = {
1383
- isMounted: function () {
1384
- return !1;
1385
- },
1386
- enqueueForceUpdate: function () {},
1387
- enqueueReplaceState: function () {},
1388
- enqueueSetState: function () {}
1389
- },
1390
- assign = Object.assign,
1391
- emptyObject = {};
1392
- function Component(props, context, updater) {
1393
- this.props = props;
1394
- this.context = context;
1395
- this.refs = emptyObject;
1396
- this.updater = updater || ReactNoopUpdateQueue;
1397
- }
1398
- Component.prototype.isReactComponent = {};
1399
- Component.prototype.setState = function (partialState, callback) {
1400
- if (
1401
- "object" !== typeof partialState &&
1402
- "function" !== typeof partialState &&
1403
- null != partialState
1404
- )
1405
- throw Error(
1406
- "takes an object of state variables to update or a function which returns an object of state variables."
1407
- );
1408
- this.updater.enqueueSetState(this, partialState, callback, "setState");
1409
- };
1410
- Component.prototype.forceUpdate = function (callback) {
1411
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
1412
- };
1413
- function ComponentDummy() {}
1414
- ComponentDummy.prototype = Component.prototype;
1415
- function PureComponent(props, context, updater) {
1416
- this.props = props;
1417
- this.context = context;
1418
- this.refs = emptyObject;
1419
- this.updater = updater || ReactNoopUpdateQueue;
1420
- }
1421
- var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
1422
- pureComponentPrototype.constructor = PureComponent;
1423
- assign(pureComponentPrototype, Component.prototype);
1424
- pureComponentPrototype.isPureReactComponent = !0;
1425
- var isArrayImpl = Array.isArray;
1426
- function noop() {}
1427
- var ReactSharedInternals = { H: null, A: null, T: null, S: null },
1428
- hasOwnProperty = Object.prototype.hasOwnProperty;
1429
- function ReactElement(type, key, props) {
1430
- var refProp = props.ref;
1431
- return {
1432
- $$typeof: REACT_ELEMENT_TYPE,
1433
- type: type,
1434
- key: key,
1435
- ref: void 0 !== refProp ? refProp : null,
1436
- props: props
1437
- };
1438
- }
1439
- function cloneAndReplaceKey(oldElement, newKey) {
1440
- return ReactElement(oldElement.type, newKey, oldElement.props);
1441
- }
1442
- function isValidElement(object) {
1443
- return (
1444
- "object" === typeof object &&
1445
- null !== object &&
1446
- object.$$typeof === REACT_ELEMENT_TYPE
1447
- );
1448
- }
1449
- function escape(key) {
1450
- var escaperLookup = { "=": "=0", ":": "=2" };
1451
- return (
1452
- "$" +
1453
- key.replace(/[=:]/g, function (match) {
1454
- return escaperLookup[match];
1455
- })
1456
- );
1457
- }
1458
- var userProvidedKeyEscapeRegex = /\/+/g;
1459
- function getElementKey(element, index) {
1460
- return "object" === typeof element && null !== element && null != element.key
1461
- ? escape("" + element.key)
1462
- : index.toString(36);
1463
- }
1464
- function resolveThenable(thenable) {
1465
- switch (thenable.status) {
1466
- case "fulfilled":
1467
- return thenable.value;
1468
- case "rejected":
1469
- throw thenable.reason;
1470
- default:
1471
- switch (
1472
- ("string" === typeof thenable.status
1473
- ? thenable.then(noop, noop)
1474
- : ((thenable.status = "pending"),
1475
- thenable.then(
1476
- function (fulfilledValue) {
1477
- "pending" === thenable.status &&
1478
- ((thenable.status = "fulfilled"),
1479
- (thenable.value = fulfilledValue));
1480
- },
1481
- function (error) {
1482
- "pending" === thenable.status &&
1483
- ((thenable.status = "rejected"), (thenable.reason = error));
1484
- }
1485
- )),
1486
- thenable.status)
1487
- ) {
1488
- case "fulfilled":
1489
- return thenable.value;
1490
- case "rejected":
1491
- throw thenable.reason;
1492
- }
1493
- }
1494
- throw thenable;
1495
- }
1496
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1497
- var type = typeof children;
1498
- if ("undefined" === type || "boolean" === type) children = null;
1499
- var invokeCallback = !1;
1500
- if (null === children) invokeCallback = !0;
1501
- else
1502
- switch (type) {
1503
- case "bigint":
1504
- case "string":
1505
- case "number":
1506
- invokeCallback = !0;
1507
- break;
1508
- case "object":
1509
- switch (children.$$typeof) {
1510
- case REACT_ELEMENT_TYPE:
1511
- case REACT_PORTAL_TYPE:
1512
- invokeCallback = !0;
1513
- break;
1514
- case REACT_LAZY_TYPE:
1515
- return (
1516
- (invokeCallback = children._init),
1517
- mapIntoArray(
1518
- invokeCallback(children._payload),
1519
- array,
1520
- escapedPrefix,
1521
- nameSoFar,
1522
- callback
1523
- )
1524
- );
1525
- }
1526
- }
1527
- if (invokeCallback)
1528
- return (
1529
- (callback = callback(children)),
1530
- (invokeCallback =
1531
- "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
1532
- isArrayImpl(callback)
1533
- ? ((escapedPrefix = ""),
1534
- null != invokeCallback &&
1535
- (escapedPrefix =
1536
- invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
1537
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
1538
- return c;
1539
- }))
1540
- : null != callback &&
1541
- (isValidElement(callback) &&
1542
- (callback = cloneAndReplaceKey(
1543
- callback,
1544
- escapedPrefix +
1545
- (null == callback.key ||
1546
- (children && children.key === callback.key)
1547
- ? ""
1548
- : ("" + callback.key).replace(
1549
- userProvidedKeyEscapeRegex,
1550
- "$&/"
1551
- ) + "/") +
1552
- invokeCallback
1553
- )),
1554
- array.push(callback)),
1555
- 1
1556
- );
1557
- invokeCallback = 0;
1558
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
1559
- if (isArrayImpl(children))
1560
- for (var i = 0; i < children.length; i++)
1561
- (nameSoFar = children[i]),
1562
- (type = nextNamePrefix + getElementKey(nameSoFar, i)),
1563
- (invokeCallback += mapIntoArray(
1564
- nameSoFar,
1565
- array,
1566
- escapedPrefix,
1567
- type,
1568
- callback
1569
- ));
1570
- else if (((i = getIteratorFn(children)), "function" === typeof i))
1571
- for (
1572
- children = i.call(children), i = 0;
1573
- !(nameSoFar = children.next()).done;
1574
-
1575
- )
1576
- (nameSoFar = nameSoFar.value),
1577
- (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
1578
- (invokeCallback += mapIntoArray(
1579
- nameSoFar,
1580
- array,
1581
- escapedPrefix,
1582
- type,
1583
- callback
1584
- ));
1585
- else if ("object" === type) {
1586
- if ("function" === typeof children.then)
1587
- return mapIntoArray(
1588
- resolveThenable(children),
1589
- array,
1590
- escapedPrefix,
1591
- nameSoFar,
1592
- callback
1593
- );
1594
- array = String(children);
1595
- throw Error(
1596
- "Objects are not valid as a React child (found: " +
1597
- ("[object Object]" === array
1598
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
1599
- : array) +
1600
- "). If you meant to render a collection of children, use an array instead."
1601
- );
1602
- }
1603
- return invokeCallback;
1604
- }
1605
- function mapChildren(children, func, context) {
1606
- if (null == children) return children;
1607
- var result = [],
1608
- count = 0;
1609
- mapIntoArray(children, result, "", "", function (child) {
1610
- return func.call(context, child, count++);
1611
- });
1612
- return result;
1613
- }
1614
- function lazyInitializer(payload) {
1615
- if (-1 === payload._status) {
1616
- var ctor = payload._result,
1617
- thenable = ctor();
1618
- thenable.then(
1619
- function (moduleObject) {
1620
- if (0 === payload._status || -1 === payload._status)
1621
- (payload._status = 1),
1622
- (payload._result = moduleObject),
1623
- void 0 === thenable.status &&
1624
- ((thenable.status = "fulfilled"),
1625
- (thenable.value = moduleObject));
1626
- },
1627
- function (error) {
1628
- if (0 === payload._status || -1 === payload._status)
1629
- (payload._status = 2),
1630
- (payload._result = error),
1631
- void 0 === thenable.status &&
1632
- ((thenable.status = "rejected"), (thenable.reason = error));
1633
- }
1634
- );
1635
- -1 === payload._status &&
1636
- ((payload._status = 0), (payload._result = thenable));
1637
- }
1638
- if (1 === payload._status) return payload._result.default;
1639
- throw payload._result;
1640
- }
1641
- var reportGlobalError =
1642
- "function" === typeof reportError
1643
- ? reportError
1644
- : function (error) {
1645
- if (
1646
- "object" === typeof window &&
1647
- "function" === typeof window.ErrorEvent
1648
- ) {
1649
- var event = new window.ErrorEvent("error", {
1650
- bubbles: !0,
1651
- cancelable: !0,
1652
- message:
1653
- "object" === typeof error &&
1654
- null !== error &&
1655
- "string" === typeof error.message
1656
- ? String(error.message)
1657
- : String(error),
1658
- error: error
1659
- });
1660
- if (!window.dispatchEvent(event)) return;
1661
- } else if (
1662
- "object" === typeof process &&
1663
- "function" === typeof process.emit
1664
- ) {
1665
- process.emit("uncaughtException", error);
1666
- return;
1667
- }
1668
- console.error(error);
1669
- };
1670
- function startTransition(scope) {
1671
- var prevTransition = ReactSharedInternals.T,
1672
- currentTransition = {};
1673
- currentTransition.types =
1674
- null !== prevTransition ? prevTransition.types : null;
1675
- ReactSharedInternals.T = currentTransition;
1676
- try {
1677
- var returnValue = scope(),
1678
- onStartTransitionFinish = ReactSharedInternals.S;
1679
- null !== onStartTransitionFinish &&
1680
- onStartTransitionFinish(currentTransition, returnValue);
1681
- "object" === typeof returnValue &&
1682
- null !== returnValue &&
1683
- "function" === typeof returnValue.then &&
1684
- returnValue.then(noop, reportGlobalError);
1685
- } catch (error) {
1686
- reportGlobalError(error);
1687
- } finally {
1688
- null !== prevTransition &&
1689
- null !== currentTransition.types &&
1690
- (prevTransition.types = currentTransition.types),
1691
- (ReactSharedInternals.T = prevTransition);
1692
- }
1693
- }
1694
- function addTransitionType(type) {
1695
- var transition = ReactSharedInternals.T;
1696
- if (null !== transition) {
1697
- var transitionTypes = transition.types;
1698
- null === transitionTypes
1699
- ? (transition.types = [type])
1700
- : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
1701
- } else startTransition(addTransitionType.bind(null, type));
1702
- }
1703
- var Children = {
1704
- map: mapChildren,
1705
- forEach: function (children, forEachFunc, forEachContext) {
1706
- mapChildren(
1707
- children,
1708
- function () {
1709
- forEachFunc.apply(this, arguments);
1710
- },
1711
- forEachContext
1712
- );
1713
- },
1714
- count: function (children) {
1715
- var n = 0;
1716
- mapChildren(children, function () {
1717
- n++;
1718
- });
1719
- return n;
1720
- },
1721
- toArray: function (children) {
1722
- return (
1723
- mapChildren(children, function (child) {
1724
- return child;
1725
- }) || []
1726
- );
1727
- },
1728
- only: function (children) {
1729
- if (!isValidElement(children))
1730
- throw Error(
1731
- "React.Children.only expected to receive a single React element child."
1732
- );
1733
- return children;
1734
- }
1735
- };
1736
- __rspack_unused_export = REACT_ACTIVITY_TYPE;
1737
- __rspack_unused_export = Children;
1738
- __rspack_unused_export = Component;
1739
- __rspack_unused_export = REACT_FRAGMENT_TYPE;
1740
- __rspack_unused_export = REACT_PROFILER_TYPE;
1741
- __rspack_unused_export = PureComponent;
1742
- __rspack_unused_export = REACT_STRICT_MODE_TYPE;
1743
- __rspack_unused_export = REACT_SUSPENSE_TYPE;
1744
- __rspack_unused_export = REACT_VIEW_TRANSITION_TYPE;
1745
- __rspack_unused_export =
1746
- ReactSharedInternals;
1747
- __rspack_unused_export = {
1748
- __proto__: null,
1749
- c: function (size) {
1750
- return ReactSharedInternals.H.useMemoCache(size);
1751
- }
1752
- };
1753
- __rspack_unused_export = addTransitionType;
1754
- __rspack_unused_export = function (fn) {
1755
- return function () {
1756
- return fn.apply(null, arguments);
1757
- };
1758
- };
1759
- __rspack_unused_export = function () {
1760
- return null;
1761
- };
1762
- __rspack_unused_export = function (element, config, children) {
1763
- if (null === element || void 0 === element)
1764
- throw Error(
1765
- "The argument must be a React element, but you passed " + element + "."
1766
- );
1767
- var props = assign({}, element.props),
1768
- key = element.key;
1769
- if (null != config)
1770
- for (propName in (void 0 !== config.key && (key = "" + config.key), config))
1771
- !hasOwnProperty.call(config, propName) ||
1772
- "key" === propName ||
1773
- "__self" === propName ||
1774
- "__source" === propName ||
1775
- ("ref" === propName && void 0 === config.ref) ||
1776
- (props[propName] = config[propName]);
1777
- var propName = arguments.length - 2;
1778
- if (1 === propName) props.children = children;
1779
- else if (1 < propName) {
1780
- for (var childArray = Array(propName), i = 0; i < propName; i++)
1781
- childArray[i] = arguments[i + 2];
1782
- props.children = childArray;
1783
- }
1784
- return ReactElement(element.type, key, props);
1785
- };
1786
- __rspack_unused_export = function (defaultValue) {
1787
- defaultValue = {
1788
- $$typeof: REACT_CONTEXT_TYPE,
1789
- _currentValue: defaultValue,
1790
- _currentValue2: defaultValue,
1791
- _threadCount: 0,
1792
- Provider: null,
1793
- Consumer: null
1794
- };
1795
- defaultValue.Provider = defaultValue;
1796
- defaultValue.Consumer = {
1797
- $$typeof: REACT_CONSUMER_TYPE,
1798
- _context: defaultValue
1799
- };
1800
- return defaultValue;
1801
- };
1802
- __rspack_unused_export = function (type, config, children) {
1803
- var propName,
1804
- props = {},
1805
- key = null;
1806
- if (null != config)
1807
- for (propName in (void 0 !== config.key && (key = "" + config.key), config))
1808
- hasOwnProperty.call(config, propName) &&
1809
- "key" !== propName &&
1810
- "__self" !== propName &&
1811
- "__source" !== propName &&
1812
- (props[propName] = config[propName]);
1813
- var childrenLength = arguments.length - 2;
1814
- if (1 === childrenLength) props.children = children;
1815
- else if (1 < childrenLength) {
1816
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
1817
- childArray[i] = arguments[i + 2];
1818
- props.children = childArray;
1819
- }
1820
- if (type && type.defaultProps)
1821
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
1822
- void 0 === props[propName] &&
1823
- (props[propName] = childrenLength[propName]);
1824
- return ReactElement(type, key, props);
1825
- };
1826
- __rspack_unused_export = function () {
1827
- return { current: null };
1828
- };
1829
- __rspack_unused_export = function (render) {
1830
- return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
1831
- };
1832
- __rspack_unused_export = isValidElement;
1833
- __rspack_unused_export = function (ctor) {
1834
- return {
1835
- $$typeof: REACT_LAZY_TYPE,
1836
- _payload: { _status: -1, _result: ctor },
1837
- _init: lazyInitializer
1838
- };
1839
- };
1840
- __rspack_unused_export = function (type, compare) {
1841
- return {
1842
- $$typeof: REACT_MEMO_TYPE,
1843
- type: type,
1844
- compare: void 0 === compare ? null : compare
1845
- };
1846
- };
1847
- __rspack_unused_export = startTransition;
1848
- __rspack_unused_export = function () {
1849
- return ReactSharedInternals.H.useCacheRefresh();
1850
- };
1851
- __rspack_unused_export = function (usable) {
1852
- return ReactSharedInternals.H.use(usable);
1853
- };
1854
- __rspack_unused_export = function (action, initialState, permalink) {
1855
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
1856
- };
1857
- __rspack_unused_export = function (callback, deps) {
1858
- return ReactSharedInternals.H.useCallback(callback, deps);
1859
- };
1860
- __rspack_unused_export = function (Context) {
1861
- return ReactSharedInternals.H.useContext(Context);
1862
- };
1863
- __rspack_unused_export = function () {};
1864
- __rspack_unused_export = function (value, initialValue) {
1865
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
1866
- };
1867
- __rspack_unused_export = function (create, deps) {
1868
- return ReactSharedInternals.H.useEffect(create, deps);
1869
- };
1870
- __rspack_unused_export = function (callback) {
1871
- return ReactSharedInternals.H.useEffectEvent(callback);
1872
- };
1873
- __rspack_unused_export = function () {
1874
- return ReactSharedInternals.H.useId();
1875
- };
1876
- __rspack_unused_export = function (ref, create, deps) {
1877
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
1878
- };
1879
- __rspack_unused_export = function (create, deps) {
1880
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
1881
- };
1882
- __rspack_unused_export = function (create, deps) {
1883
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
1884
- };
1885
- __rspack_unused_export = function (create, deps) {
1886
- return ReactSharedInternals.H.useMemo(create, deps);
1887
- };
1888
- __rspack_unused_export = function (passthrough, reducer) {
1889
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
1890
- };
1891
- __rspack_unused_export = function (reducer, initialArg, init) {
1892
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
1893
- };
1894
- __rspack_unused_export = function (initialValue) {
1895
- return ReactSharedInternals.H.useRef(initialValue);
1896
- };
1897
- __rspack_unused_export = function (initialState) {
1898
- return ReactSharedInternals.H.useState(initialState);
1899
- };
1900
- __rspack_unused_export = function (
1901
- subscribe,
1902
- getSnapshot,
1903
- getServerSnapshot
1904
- ) {
1905
- return ReactSharedInternals.H.useSyncExternalStore(
1906
- subscribe,
1907
- getSnapshot,
1908
- getServerSnapshot
1909
- );
1910
- };
1911
- __rspack_unused_export = function () {
1912
- return ReactSharedInternals.H.useTransition();
1913
- };
1914
- __rspack_unused_export = "19.3.0";
1915
-
1916
-
1917
- },
1918
- "./node_modules/react/index.js"(module, __unused_rspack_exports, __webpack_require__) {
1919
-
1920
-
1921
- if (process.env.NODE_ENV === 'production') {
1922
- /* unused reexport */ __webpack_require__("./node_modules/react/cjs/react.production.js");
1923
- } else {
1924
- /* unused reexport */ __webpack_require__("./node_modules/react/cjs/react.development.js");
1925
- }
1926
-
1927
-
1928
- },
1929
13
  "./src/scripts/gbot-relay.ts"(module, __unused_rspack___webpack_exports__, __webpack_require__) {
1930
14
  __webpack_require__.a(module, async function (__rspack_load_async_deps, __rspack_async_done) { try {
1931
15
  /* import */ var _core_relay_worker_js__rspack_import_0 = __webpack_require__("./src/core/relay/worker.js");
@@ -2298,28 +382,7 @@ __webpack_require__.d(__webpack_exports__, {
2298
382
  },
2299
383
  "./node_modules/@agent-bundle/runtime/dist/302.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
2300
384
  /* import */ var node_buffer__rspack_import_0 = __webpack_require__("node:buffer");
2301
- /* import */ var react__rspack_import_1 = __webpack_require__("./node_modules/react/index.js");
2302
-
2303
385
 
2304
- const isServerComponent = (value)=>'function' == typeof value;
2305
- const asMcpElement = (node)=>{
2306
- let element = node;
2307
- while(isValidElement(element) && isServerComponent(element.type))element = element.type(element.props);
2308
- if (!isValidElement(element) || 'string' != typeof element.type || !element.type.startsWith('mcp-')) throw new Error('Expected an MCP result element');
2309
- return {
2310
- props: element.props,
2311
- type: element.type
2312
- };
2313
- };
2314
- const requiredString = (value, message)=>{
2315
- if ('string' != typeof value || '' === value.trim()) throw new Error(message);
2316
- return value;
2317
- };
2318
- const textChild = (children, message)=>{
2319
- const values = Children.toArray(children);
2320
- if (1 !== values.length || 'string' != typeof values[0]) throw new Error(message);
2321
- return values[0];
2322
- };
2323
386
  const jsonLeafBytes = (value)=>Buffer.byteLength(JSON.stringify(value), 'utf8');
2324
387
  const isArrayIndex = (key, length)=>{
2325
388
  if ('0' === key) return length > 0;
@@ -2381,16 +444,6 @@ const cloneJsonValue = (value, ancestors, path, depth = 0, budget)=>{
2381
444
  ancestors.delete(value);
2382
445
  }
2383
446
  };
2384
- const jsonRecord = (value, message)=>{
2385
- try {
2386
- if (null === value || 'object' != typeof value || Array.isArray(value)) throw new Error('not a plain object');
2387
- return cloneJsonValue(value, new Set(), '');
2388
- } catch (error) {
2389
- throw new Error(`${message} (${error instanceof Error ? error.message : String(error)})`, {
2390
- cause: error
2391
- });
2392
- }
2393
- };
2394
447
  const deepFreezeJson = (value)=>{
2395
448
  if ('object' == typeof value && null !== value) {
2396
449
  for (const child of Object.values(value))deepFreezeJson(child);
@@ -2408,89 +461,6 @@ const snapshotJsonValue = (value, message, budget)=>{
2408
461
  });
2409
462
  }
2410
463
  };
2411
- const lowerContent = (node)=>{
2412
- const element = asMcpElement(node);
2413
- const { props } = element;
2414
- switch(element.type){
2415
- case 'mcp-text':
2416
- return {
2417
- text: textChild(props.children, 'mcp-text requires one text child'),
2418
- type: 'text'
2419
- };
2420
- case 'mcp-image':
2421
- return {
2422
- data: requiredString(props.data, 'mcp-image requires non-empty data and mimeType'),
2423
- mimeType: requiredString(props.mimeType, 'mcp-image requires non-empty data and mimeType'),
2424
- type: 'image'
2425
- };
2426
- case 'mcp-audio':
2427
- return {
2428
- data: requiredString(props.data, 'mcp-audio requires non-empty data and mimeType'),
2429
- mimeType: requiredString(props.mimeType, 'mcp-audio requires non-empty data and mimeType'),
2430
- type: 'audio'
2431
- };
2432
- case 'mcp-resource-link':
2433
- {
2434
- const mimeType = props.mimeType;
2435
- if (void 0 !== mimeType && 'string' != typeof mimeType) throw new Error('mcp-resource-link mimeType must be a string');
2436
- return {
2437
- ...void 0 === mimeType ? {} : {
2438
- mimeType
2439
- },
2440
- name: requiredString(props.name, 'mcp-resource-link requires non-empty uri and name'),
2441
- type: 'resource_link',
2442
- uri: requiredString(props.uri, 'mcp-resource-link requires non-empty uri and name')
2443
- };
2444
- }
2445
- case 'mcp-embedded-resource':
2446
- {
2447
- const hasText = void 0 !== props.text;
2448
- const hasTextChild = void 0 !== props.children;
2449
- const hasBlob = void 0 !== props.blob;
2450
- if (Number(hasText) + Number(hasTextChild) + Number(hasBlob) !== 1) throw new Error('mcp-embedded-resource accepts exactly one text or blob value');
2451
- const mimeType = props.mimeType;
2452
- if (void 0 !== mimeType && 'string' != typeof mimeType) throw new Error('mcp-embedded-resource mimeType must be a string');
2453
- const resource = {
2454
- ...void 0 === mimeType ? {} : {
2455
- mimeType
2456
- },
2457
- uri: requiredString(props.uri, 'mcp-embedded-resource requires a non-empty uri'),
2458
- ...hasBlob ? {
2459
- blob: requiredString(props.blob, 'mcp-embedded-resource blob must be non-empty')
2460
- } : {
2461
- text: hasTextChild ? textChild(props.children, 'mcp-embedded-resource requires one text child') : requiredString(props.text, 'mcp-embedded-resource text must be non-empty')
2462
- }
2463
- };
2464
- return {
2465
- resource,
2466
- type: 'resource'
2467
- };
2468
- }
2469
- case 'mcp-result':
2470
- throw new Error('mcp-result may not be nested');
2471
- default:
2472
- throw new Error(`Unsupported MCP result element: ${element.type}`);
2473
- }
2474
- };
2475
- const lowerMcpResult = (node)=>{
2476
- const root = asMcpElement(node);
2477
- if ('mcp-result' !== root.type) throw new Error('Expected mcp-result as the root element');
2478
- if (void 0 !== root.props.isError && 'boolean' != typeof root.props.isError) throw new Error('mcp-result isError must be a boolean');
2479
- const structuredContent = root.props.structuredContent;
2480
- const metadata = root.props._meta;
2481
- return {
2482
- content: Children.toArray(root.props.children).map(lowerContent),
2483
- ...void 0 === metadata ? {} : {
2484
- _meta: jsonRecord(metadata, 'mcp-result _meta must be JSON-serializable')
2485
- },
2486
- ...void 0 === structuredContent ? {} : {
2487
- structuredContent: jsonRecord(structuredContent, 'mcp-result structuredContent must be JSON-serializable')
2488
- },
2489
- ...void 0 === root.props.isError ? {} : {
2490
- isError: root.props.isError
2491
- }
2492
- };
2493
- };
2494
464
  const AGENT_DOCUMENT_VERSION = 1;
2495
465
  const agentRenderAbortError = ()=>new DOMException('Agent render was aborted', 'AbortError');
2496
466
  const DEFAULT_AGENT_RENDER_LIMITS = Object.freeze({
@@ -2518,7 +488,7 @@ const resolveAgentRenderLimits = (overrides = {})=>{
2518
488
  for (const [name, value] of Object.entries(limits))if (!Number.isSafeInteger(value) || value <= 0) throw new AgentContractError('invalid-document', `${name} must be a positive safe integer`);
2519
489
  return Object.freeze(limits);
2520
490
  };
2521
- const agent_document_requiredString = (value, field)=>{
491
+ const requiredString = (value, field)=>{
2522
492
  if ('string' != typeof value || '' === value.trim()) throw new AgentContractError('invalid-document', `${field} must be a non-empty string`);
2523
493
  return value;
2524
494
  };
@@ -2526,7 +496,7 @@ const agent_document_text = (value, field)=>{
2526
496
  if ('string' != typeof value) throw new AgentContractError('invalid-document', `${field} must be a string`);
2527
497
  return value;
2528
498
  };
2529
- const optionalString = (value, field)=>void 0 === value ? void 0 : agent_document_requiredString(value, field);
499
+ const optionalString = (value, field)=>void 0 === value ? void 0 : requiredString(value, field);
2530
500
  const elapsedTimeExceeded = (maxElapsedMs)=>new AgentContractError('elapsed-time-exceeded', `Agent render elapsed time exceeds ${String(maxElapsedMs)}ms`);
2531
501
  const expectDocumentDepth = (depth, limits)=>{
2532
502
  if (depth > limits.maxDocumentDepth) throw new AgentContractError('document-depth-exceeded', `Agent Document depth exceeds ${String(limits.maxDocumentDepth)}`);
@@ -2624,15 +594,15 @@ const snapshotNode = (node, depth, state)=>{
2624
594
  }
2625
595
  case 'image':
2626
596
  return Object.freeze({
2627
- data: agent_document_requiredString(node.data, 'Agent image data'),
597
+ data: requiredString(node.data, 'Agent image data'),
2628
598
  kind: 'image',
2629
- mimeType: agent_document_requiredString(node.mimeType, 'Agent image mimeType')
599
+ mimeType: requiredString(node.mimeType, 'Agent image mimeType')
2630
600
  });
2631
601
  case 'audio':
2632
602
  return Object.freeze({
2633
- data: agent_document_requiredString(node.data, 'Agent audio data'),
603
+ data: requiredString(node.data, 'Agent audio data'),
2634
604
  kind: 'audio',
2635
- mimeType: agent_document_requiredString(node.mimeType, 'Agent audio mimeType')
605
+ mimeType: requiredString(node.mimeType, 'Agent audio mimeType')
2636
606
  });
2637
607
  case 'resource':
2638
608
  {
@@ -2642,13 +612,13 @@ const snapshotNode = (node, depth, state)=>{
2642
612
  ...void 0 === mimeType ? {} : {
2643
613
  mimeType
2644
614
  },
2645
- name: agent_document_requiredString(node.name, 'Agent resource name'),
2646
- uri: agent_document_requiredString(node.uri, 'Agent resource uri')
615
+ name: requiredString(node.name, 'Agent resource name'),
616
+ uri: requiredString(node.uri, 'Agent resource uri')
2647
617
  });
2648
618
  }
2649
619
  case 'error':
2650
620
  return Object.freeze({
2651
- code: agent_document_requiredString(node.code, 'Agent error code'),
621
+ code: requiredString(node.code, 'Agent error code'),
2652
622
  kind: 'error',
2653
623
  message: agent_document_text(node.message, 'Agent error message')
2654
624
  });
@@ -2706,7 +676,7 @@ const snapshotRenderError = (error, limits)=>{
2706
676
  nodes: 0
2707
677
  });
2708
678
  return Object.freeze({
2709
- code: agent_document_requiredString(error.code, 'Agent render error code'),
679
+ code: requiredString(error.code, 'Agent render error code'),
2710
680
  ...void 0 === data ? {} : {
2711
681
  data
2712
682
  },
@@ -2741,7 +711,7 @@ const snapshotEvent = (input, sequence, limits)=>{
2741
711
  }
2742
712
  case 'replace':
2743
713
  return Object.freeze({
2744
- boundaryId: agent_document_requiredString(input.boundaryId, 'Agent render boundaryId'),
714
+ boundaryId: requiredString(input.boundaryId, 'Agent render boundaryId'),
2745
715
  document: createAgentDocument(input.document, limits),
2746
716
  sequence,
2747
717
  type: 'replace'
@@ -56217,10 +54187,10 @@ function listDesktopProcesses(timeoutMs = DESKTOP_PROCESS_LIST_TIMEOUT_MS) {
56217
54187
  const lines = Array.isArray(listProcesses) ? listProcesses : String(listProcesses ?? "").split(/\r?\n/);
56218
54188
  for (const line of lines){
56219
54189
  if (!/app-server/.test(line)) continue;
56220
- // Desktop's bundled binary, Mac or Windows-style separators with optional .exe.
54190
+ // Desktop's bundled binary only (Mac/Windows separators, optional .exe).
54191
+ // Do NOT match probe shells whose cmdline merely mentions ChatGPT.app +
54192
+ // app-server + codex-app-tools — that false-positives MATCH2 / Scout noise.
56221
54193
  if (/ChatGPT\.app[\\/].*Resources[\\/]codex(\.exe)?(["'\s]|$)/.test(line)) return "private-stdio";
56222
- // Same app-server line owned by ChatGPT.app carrying the app-tools override.
56223
- if (/ChatGPT\.app/.test(line) && /(codex_app|mcp_servers\.codex_app|codex-app-tools)/.test(line)) return "private-stdio";
56224
54194
  }
56225
54195
  return "unknown";
56226
54196
  }
@@ -57906,10 +55876,12 @@ function socketStateOf(path) {
57906
55876
  },
57907
55877
  "./src/core/gateway.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
57908
55878
  /* import */ var node_crypto__rspack_import_0 = __webpack_require__("node:crypto");
57909
- /* import */ var _headers_js__rspack_import_4 = __webpack_require__("./src/core/headers.js");
55879
+ /* import */ var _headers_js__rspack_import_5 = __webpack_require__("./src/core/headers.js");
57910
55880
  /* import */ var _app_session_js__rspack_import_1 = __webpack_require__("./src/core/app-session.js");
57911
55881
  /* import */ var _store_js__rspack_import_2 = __webpack_require__("./src/core/store.js");
57912
55882
  /* import */ var _url_policy_js__rspack_import_3 = __webpack_require__("./src/core/url-policy.js");
55883
+ /* import */ var _grok_approvals_js__rspack_import_4 = __webpack_require__("./src/core/grok-approvals.js");
55884
+
57913
55885
 
57914
55886
 
57915
55887
 
@@ -57959,7 +55931,7 @@ function gatewayOverride() {
57959
55931
  kind: "gateway"
57960
55932
  }),
57961
55933
  gatewayToken: token,
57962
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)()
55934
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)()
57963
55935
  };
57964
55936
  }
57965
55937
  return null;
@@ -57980,7 +55952,7 @@ function sessionFromApp() {
57980
55952
  kind: "gateway"
57981
55953
  }),
57982
55954
  gatewayToken: loaded.gatewayToken,
57983
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_4/* .normalizeHeaderMap */.dk)(loaded.headers), (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)())
55955
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_5/* .normalizeHeaderMap */.dk)(loaded.headers), (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)())
57984
55956
  };
57985
55957
  }
57986
55958
  function hasGatewayAuth() {
@@ -58040,7 +56012,7 @@ async function ensureSandbox(accessToken, { signal } = {}) {
58040
56012
  method: "POST",
58041
56013
  redirect: "error",
58042
56014
  signal: gatewayDeadline(signal),
58043
- headers: (0,_headers_js__rspack_import_4/* .ensureSandboxHeaders */._6)(accessToken),
56015
+ headers: (0,_headers_js__rspack_import_5/* .ensureSandboxHeaders */._6)(accessToken),
58044
56016
  body: "{}"
58045
56017
  });
58046
56018
  body = await readJson(res);
@@ -58066,7 +56038,7 @@ async function ensureSandbox(accessToken, { signal } = {}) {
58066
56038
  kind: "gateway"
58067
56039
  }),
58068
56040
  gatewayToken: String(gatewayToken),
58069
- gatewayHeaders: (0,_headers_js__rspack_import_4/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_4/* .headersFromEnsureSandbox */.Ew)(body), (0,_headers_js__rspack_import_4/* .headersFromEnv */.gx)())
56041
+ gatewayHeaders: (0,_headers_js__rspack_import_5/* .mergeGatewayHeaders */.bQ)((0,_headers_js__rspack_import_5/* .headersFromEnsureSandbox */.Ew)(body), (0,_headers_js__rspack_import_5/* .headersFromEnv */.gx)())
58070
56042
  };
58071
56043
  }
58072
56044
  async function connectGateway({ signal } = {}) {
@@ -58096,7 +56068,7 @@ async function gatewayCall(session, method, body = {}, { signal } = {}) {
58096
56068
  method: "POST",
58097
56069
  redirect: "error",
58098
56070
  signal: gatewayDeadline(prompt ? undefined : signal),
58099
- headers: (0,_headers_js__rspack_import_4/* .requestHeaders */.A1)(session),
56071
+ headers: (0,_headers_js__rspack_import_5/* .requestHeaders */.A1)(session),
58100
56072
  body: JSON.stringify(body)
58101
56073
  };
58102
56074
  assertGatewayActive(signal); // Final synchronous boundary before transmission.
@@ -58363,6 +56335,43 @@ async function getThread(session, ref, rootId) {
58363
56335
  thread: data
58364
56336
  };
58365
56337
  }
56338
+ async function listGrokApprovals(session, ref) {
56339
+ const { target, transcript } = await getTranscriptTail(session, ref, 200);
56340
+ if (!Array.isArray(transcript?.entries) || transcript.entries.length > 200) throw new GatewayError("Invalid approval transcript coverage");
56341
+ return {
56342
+ target: {
56343
+ id: target.id,
56344
+ name: target.name
56345
+ },
56346
+ approvals: transcript.entries.map(grokApproval).filter(Boolean),
56347
+ coverage: "Latest 200 transcript entries only; older requests require the owning Grok UI."
56348
+ };
56349
+ }
56350
+ async function respondGrokApproval(session, ref, input) {
56351
+ const { entryId, requestId, decision } = grokApprovalResponseSchema.parse({
56352
+ ...input,
56353
+ target: ref
56354
+ });
56355
+ const { target, approvals } = await listGrokApprovals(session, ref);
56356
+ const matches = approvals.filter((card)=>card.entryId === entryId && card.requestId === requestId);
56357
+ if (matches.length !== 1) throw new GatewayError("Stale, foreign or unsupported Grok approval; refresh pending requests or use the owning Grok UI");
56358
+ const approval = matches[0];
56359
+ if (decision === "accept" && approval.truncated) throw new GatewayError("Approval details are truncated; acceptance requires the owning Grok UI");
56360
+ const local = approval.type === "local-tool-permission";
56361
+ await gatewayCall(session, local ? "resolveLocalToolPermission" : "resolveAutoReviewApproval", {
56362
+ agentId: target.id,
56363
+ entryId,
56364
+ requestId,
56365
+ resolution: local ? decision === "accept" ? "allow-once" : "deny" : decision === "accept" ? "approved" : "denied"
56366
+ });
56367
+ return {
56368
+ target,
56369
+ entryId,
56370
+ requestId,
56371
+ decision,
56372
+ delivery: "accepted"
56373
+ };
56374
+ }
58366
56375
 
58367
56376
  __webpack_require__.d(__webpack_exports__, {
58368
56377
  LV: () => (sendPrompt),
@@ -58372,6 +56381,66 @@ __webpack_require__.d(__webpack_exports__, {
58372
56381
  });
58373
56382
 
58374
56383
 
56384
+ },
56385
+ "./src/core/grok-approvals.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
56386
+ /* import */ var zod__rspack_import_1 = __webpack_require__("./node_modules/zod/v4/classic/schemas.js");
56387
+ /* import */ var _url_policy_js__rspack_import_0 = __webpack_require__("./src/core/url-policy.js");
56388
+
56389
+
56390
+ const id = zod__rspack_import_1/* .string */.YjP().min(1).max(1024);
56391
+ const grokApprovalResponseSchema = zod__rspack_import_1/* .strictObject */.rej({
56392
+ target: id,
56393
+ entryId: id,
56394
+ requestId: id,
56395
+ decision: zod__rspack_import_1/* ["enum"] */.k5n([
56396
+ "accept",
56397
+ "decline"
56398
+ ])
56399
+ });
56400
+ function grokApproval(entry) {
56401
+ if (entry?.kind !== "send-message") return null;
56402
+ const type = entry.message?.type;
56403
+ const card = type === "auto-review-approval" ? entry.message.approval : type === "local-tool-permission" ? entry.message.ask : null;
56404
+ if (card?.status !== "pending" || !id.safeParse(card.requestId).success || !id.safeParse(entry.id).success) return null;
56405
+ const details = {};
56406
+ let truncated = false;
56407
+ for (const key of [
56408
+ "reason",
56409
+ "command",
56410
+ "summary",
56411
+ "action",
56412
+ "description",
56413
+ "target",
56414
+ "machineId",
56415
+ "surface",
56416
+ "workingDirectory"
56417
+ ]){
56418
+ if (typeof card[key] !== "string") continue;
56419
+ const text = (0,_url_policy_js__rspack_import_0/* .redactSecrets */.fp)(card[key]);
56420
+ truncated ||= text.length > 2048;
56421
+ details[key] = text.slice(0, 2048);
56422
+ }
56423
+ return {
56424
+ entryId: entry.id,
56425
+ requestId: card.requestId,
56426
+ type,
56427
+ ...details,
56428
+ truncated
56429
+ };
56430
+ }
56431
+ function grokApprovalNotice(entry, target) {
56432
+ const approval = grokApproval(entry);
56433
+ return approval ? `Grok approval pending. Requires an explicit user decision; never approve automatically.\n${JSON.stringify({
56434
+ botTarget: target,
56435
+ ...approval
56436
+ })}\nUse gbot_grok_respond with target=${JSON.stringify(target)}, entryId, requestId and decision accept (once) or decline.${approval.truncated ? " Details are truncated; acceptance requires the owning Grok UI." : ""} A chat reply is not authorization.` : null;
56437
+ }
56438
+
56439
+ __webpack_require__.d(__webpack_exports__, {
56440
+ xE: () => (grokApprovalNotice)
56441
+ });
56442
+
56443
+
58375
56444
  },
58376
56445
  "./src/core/headers.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
58377
56446
  function normalizeHeaderMap(obj) {
@@ -59172,8 +57241,10 @@ __webpack_require__.d(__webpack_exports__, {
59172
57241
 
59173
57242
  },
59174
57243
  "./src/core/relay/intake.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
59175
- /* import */ var _transcript_js__rspack_import_1 = __webpack_require__("./src/core/transcript.js");
57244
+ /* import */ var _transcript_js__rspack_import_2 = __webpack_require__("./src/core/transcript.js");
59176
57245
  /* import */ var _records_js__rspack_import_0 = __webpack_require__("./src/core/relay/records.js");
57246
+ /* import */ var _grok_approvals_js__rspack_import_1 = __webpack_require__("./src/core/grok-approvals.js");
57247
+
59177
57248
 
59178
57249
 
59179
57250
  /** Correlate the whole page before atomically recording intake and advancing its checkpoint. */ function createIntake({ state, gateway, clock, newRecord, stoppedBindings }) {
@@ -59185,7 +57256,7 @@ __webpack_require__.d(__webpack_exports__, {
59185
57256
  const page = (0,_records_js__rspack_import_0/* .pageEntries */.ci)(await gateway.tail(targetId));
59186
57257
  await change("targets", {
59187
57258
  id: targetId,
59188
- cursor: page.length ? (0,_transcript_js__rspack_import_1/* .sourceEntryId */.p2)(page.at(-1)) : null,
57259
+ cursor: page.length ? (0,_transcript_js__rspack_import_2/* .sourceEntryId */.p2)(page.at(-1)) : null,
59189
57260
  baseline: true,
59190
57261
  state: "running",
59191
57262
  reason: null,
@@ -59214,8 +57285,8 @@ __webpack_require__.d(__webpack_exports__, {
59214
57285
  });
59215
57286
  return;
59216
57287
  }
59217
- const current = page.length ? (0,_transcript_js__rspack_import_1/* .sourceEntryId */.p2)(page.at(-1)) : null;
59218
- const index = target.cursor === null ? -1 : page.findIndex((e)=>(0,_transcript_js__rspack_import_1/* .sourceEntryId */.p2)(e) === target.cursor);
57288
+ const current = page.length ? (0,_transcript_js__rspack_import_2/* .sourceEntryId */.p2)(page.at(-1)) : null;
57289
+ const index = target.cursor === null ? -1 : page.findIndex((e)=>(0,_transcript_js__rspack_import_2/* .sourceEntryId */.p2)(e) === target.cursor);
59219
57290
  if (target.cursor !== null && index === -1 || target.cursor === null && page.length === 200) {
59220
57291
  await change("targets", {
59221
57292
  ...target,
@@ -59225,6 +57296,15 @@ __webpack_require__.d(__webpack_exports__, {
59225
57296
  });
59226
57297
  return;
59227
57298
  }
57299
+ const incoming = page.slice(index + 1);
57300
+ if (incoming.some((entry)=>entry.kind === "send-message" && (typeof entry.requestId !== "string" || !entry.requestId))) {
57301
+ await change("targets", {
57302
+ ...target,
57303
+ state: "paused",
57304
+ reason: "invalid-coverage"
57305
+ });
57306
+ return;
57307
+ }
59228
57308
  const local = {
59229
57309
  ...state.read().records
59230
57310
  }, changes = [];
@@ -59254,7 +57334,7 @@ __webpack_require__.d(__webpack_exports__, {
59254
57334
  ...r,
59255
57335
  submission: "accepted",
59256
57336
  requestId: entry.requestId,
59257
- messageId: (0,_transcript_js__rspack_import_1/* .sourceEntryId */.p2)(entry),
57337
+ messageId: (0,_transcript_js__rspack_import_2/* .sourceEntryId */.p2)(entry),
59258
57338
  reason: null
59259
57339
  };
59260
57340
  local[r.id] = next;
@@ -59272,9 +57352,13 @@ __webpack_require__.d(__webpack_exports__, {
59272
57352
  "unknown",
59273
57353
  "accepted"
59274
57354
  ].includes(r.submission) && !r.requestId);
59275
- const incoming = page.slice(index + 1);
59276
57355
  for (const entry of incoming){
59277
57356
  if (entry.kind !== "send-message" || own.has(entry.requestId)) continue;
57357
+ const approvalNotice = (0,_grok_approvals_js__rspack_import_1/* .grokApprovalNotice */.xE)(entry, targetId);
57358
+ if ([
57359
+ "auto-review-approval",
57360
+ "local-tool-permission"
57361
+ ].includes(entry.message?.type) && !approvalNotice) continue;
59278
57362
  const parent = requests.get(entry.requestId);
59279
57363
  // Without nonce coverage, unsolicited classification could echo a return or misroute a reply.
59280
57364
  if (!parent && unresolved) {
@@ -59302,14 +57386,14 @@ __webpack_require__.d(__webpack_exports__, {
59302
57386
  ]);
59303
57387
  return;
59304
57388
  }
59305
- const sourceId = (0,_transcript_js__rspack_import_1/* .sourceEntryId */.p2)(entry), id = "inbound:" + (0,_records_js__rspack_import_0/* .hash */.tW)([
57389
+ const sourceId = (0,_transcript_js__rspack_import_2/* .sourceEntryId */.p2)(entry), id = "inbound:" + (0,_records_js__rspack_import_0/* .hash */.tW)([
59306
57390
  targetId,
59307
57391
  sourceId
59308
57392
  ]);
59309
57393
  if (local[id]) continue;
59310
57394
  let body;
59311
57395
  try {
59312
- body = (0,_records_js__rspack_import_0/* .messageText */.Lo)((0,_transcript_js__rspack_import_1/* .entryText */.u0)(entry));
57396
+ body = (0,_records_js__rspack_import_0/* .messageText */.Lo)(approvalNotice ?? (0,_transcript_js__rspack_import_2/* .entryText */.u0)(entry));
59313
57397
  } catch {
59314
57398
  await change("targets", {
59315
57399
  ...target,
@@ -59318,7 +57402,7 @@ __webpack_require__.d(__webpack_exports__, {
59318
57402
  });
59319
57403
  return;
59320
57404
  }
59321
- const text = `[Grok sender ${targetId}; message ${sourceId}]\n${parent ? "Reply to a tracked request. Your next final answer is not returned automatically." : "Linked conversation. Your corresponding final answer returns automatically to Grok."}\n\n${body}`;
57405
+ const text = `[Grok sender ${targetId}; message ${sourceId}]\n${approvalNotice ? "Approval notice. Your next final answer is not returned automatically." : parent ? "Reply to a tracked request. Your next final answer is not returned automatically." : "Linked conversation. Your corresponding final answer returns automatically to Grok."}\n\n${body}`;
59322
57406
  if (Buffer.byteLength(text) > (/* inlined export .MAX_TEXT */65536)) {
59323
57407
  await change("targets", {
59324
57408
  ...target,
@@ -59332,7 +57416,7 @@ __webpack_require__.d(__webpack_exports__, {
59332
57416
  sourceId
59333
57417
  ],
59334
57418
  parentId: parent?.id,
59335
- returnToGrok: !parent,
57419
+ returnToGrok: !parent && !approvalNotice,
59336
57420
  correlationId: parent?.correlationId,
59337
57421
  hop: parent ? parent.hop + 1 : 0,
59338
57422
  maxHops: parent?.maxHops
@@ -59649,7 +57733,10 @@ function relayProfile(env = process.env) {
59649
57733
  "GROK_BOT_ALLOW_LOCAL_GATEWAY",
59650
57734
  "GROK_BOT_ALLOW_ANY_GATEWAY",
59651
57735
  "GROK_BOT_TEST",
59652
- "NODE_ENV"
57736
+ "NODE_ENV",
57737
+ // Secret Service credentials depend on the caller's desktop session.
57738
+ "DBUS_SESSION_BUS_ADDRESS",
57739
+ "DISPLAY"
59653
57740
  ];
59654
57741
  return digest(JSON.stringify([
59655
57742
  (0,node_path__rspack_import_2.resolve)((0,_codex_bridge_js__rspack_import_3/* .codexSocketPath */.ql)(env)),
@@ -59719,7 +57806,6 @@ function pageEntries(payload) {
59719
57806
  _state_js__rspack_import_2/* .relayId.parse */.pT.parse(id);
59720
57807
  if (ids.has(id) || typeof e.kind !== "string" || !e.kind) throw new Error("Invalid transcript coverage");
59721
57808
  ids.add(id);
59722
- if (e.kind === "send-message" && (typeof e.requestId !== "string" || !e.requestId)) throw new Error("Message coverage lacks requestId");
59723
57809
  }
59724
57810
  return page;
59725
57811
  }
@@ -60834,7 +58920,7 @@ __webpack_require__.d(__webpack_exports__, {
60834
58920
 
60835
58921
  },
60836
58922
  "./package.json"(module) {
60837
- module.exports = {"rE":"0.6.0"}
58923
+ module.exports = {"rE":"0.7.0"}
60838
58924
 
60839
58925
  },
60840
58926
 
@@ -60998,14 +59084,6 @@ __webpack_require__.r = (exports) => {
60998
59084
  Object.defineProperty(exports, '__esModule', { value: true });
60999
59085
  };
61000
59086
  })();
61001
- // webpack/runtime/node_module_decorator
61002
- (() => {
61003
- __webpack_require__.nmd = (module) => {
61004
- module.paths = [];
61005
- if (!module.children) module.children = [];
61006
- return module;
61007
- };
61008
- })();
61009
59087
  // module cache are used so entry inlining is disabled
61010
59088
  // startup
61011
59089
  // Load entry module and return exports